Sha256: 8973c98f5224abb6e74a0ca2d0498c108751987825657ae04a2b59147cc407f9

Contents?: true

Size: 1.32 KB

Versions: 8

Compression:

Stored size: 1.32 KB

Contents

<html>
  <head>
    <%= js_include_tag "jquery-1.2.3", "jquery.fn", "jquery.print", "screw.builder", 
                       "screw.matchers", "screw.events", "screw.behaviors",
                       "screw.mock" %>
        
    <%= css_include_tag "screw.css" %>
  </head>
  <body>
    <iframe id="dom" src="<%= @spec_url %>?<%= MD5.hexdigest(Time.now.to_s) %>" style="display: none"></iframe>  
    <script type="text/javascript">
      Screw.Unit(function() {
        iframeWindow = $("#dom").contents()[0].defaultView;
        iframeWindow.XMLHttpRequest = Screw.XHR;
        runLivequeries = function() {
          if(iframeWindow.$.livequery) {
            queries = iframeWindow.$.livequery.queries;
            for(var i = 0; i<queries.length;i++) {
              queries[i].run();
            }
          }
        };
        
        before(function() {          
          $ = iframeWindow.$;
          $.ajaxSettings.async = false;
          $.fn.fireEvent = function(event, obj) {
            return this.each(function() {
              runLivequeries();
              var basic = {type: event, target: this, preventDefault: true}
              $.extend(basic, obj || {});
             	$(this).trigger(event, [basic]);
            })
          };
        })
        <%= catch_content :for_layout %>
      });
    </script>
  </body>
</html>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
merb_screw_unit-0.9.10 app/views/layout/merb_screw_unit.html.erb
merb_screw_unit-0.9.12 app/views/layout/merb_screw_unit.html.erb
merb_screw_unit-0.9.13 app/views/layout/merb_screw_unit.html.erb
merb_screw_unit-0.9.6 app/views/layout/merb_screw_unit.html.erb
merb_screw_unit-0.9.7 app/views/layout/merb_screw_unit.html.erb
merb_screw_unit-0.9.8 app/views/layout/merb_screw_unit.html.erb
merb_screw_unit-0.9.11 app/views/layout/merb_screw_unit.html.erb
merb_screw_unit-0.9.9 app/views/layout/merb_screw_unit.html.erb