!!! / paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ /[if lt IE 7 ] /[if IE 7 ] /[if IE 8 ] /[if IE 9 ] /[if (gt IE 9)|!(IE)] %head %meta{ :charset => "utf-8" }/ %meta(name="viewport" content="width=device-width, initial-scale=1.0") %link{:rel => "icon", :type => "image/gif", :href => "/favicon.gif"}/ %title= $title - record_css '/plugins/zurb-icons/foundation_icons_general/stylesheets/general_foundicons.css' - record_css '/stylesheets/app' = serve_css - record_js '/js/deffer' // Thid party frameworks - record_js "/plugins/underscore/js/underscore.js" = serve_js - %w(jquery-2.0.0 jquery.cookie jquery.form).each do |jquery_file| - record_js File.join('/plugins/jquery/js/', jquery_file) - record_js '/plugins/jquery-ui/js/jquery-ui-1.8.14.custom.min.js' -# %w(foundation foundation.cookie foundation.reveal foundation.dropdown foundation.section foundation.topbar custom.modernizr).each do |file| - record_js "/js/#{ file }" -# record_js '/plugins/jquery.tablesorter/jquery.tablesorter' - record_js '/plugins/jquery.scrollTo/jquery.scrollTo' - %w(helpers _md5 _ajax_replace _ellipsis).each do |file| - record_js "/js-find/#{ file }" - %w(dom_update workflow menu fragment favourites page_type modal reveal actions table list map hide).each do |file| - record_js "/js-find/rbbt/#{ file }" - record_js "/js-find/app" %body /{{{ CONTENT /----------- #content - $wait = false = yield /{{{ TOP MENU /------------ #top_menu = partial_render('layout/top_menu') #modal #coda = serve_js :javascript var production = #{production? ? "true" : "false"}; start_defferred() - if $wait :javascript var url = window.location.toString(); var wait_timeout = 2000; function reload(){ $.ajax({url: add_parameters(url, '_layout=false'), cache:false, success: function(data, stat, req){ if (req.status == 202){ $('#content').html(data) window.setTimeout(reload, wait_timeout); }else{ window.location = url; } }, error:function(jqXHR, status, thrownError){ if (undefined === jqXHR.responseText || jqXHR.responseText == ''){ $('#content').html('No response. Server down?') }else{ $('#content').html(jqXHR.responseText) } }}) } window.setTimeout(reload, wait_timeout);