Sha256: 5f318d1ad48bb74054a37fd291d56feca68c89d186982e005856efe287925c10
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
= serve_js :javascript var user = #{user ? user : '"none"'} var main_url = window.location.toString(); var production = #{production? ? "true" : "false"}; $('.offcanvas').click(function(e){ if( e.target !== this ) return; $(this).toggleClass('show') }) requirejs.config({baseUrl: '/js-find'}) start_deferred() - if @reload_page :javascript var wait_timeout = 2000; var url = main_url function reload(){ $.ajax({url: add_parameters(main_url, '_layout=false'), cache:false, success: function(data, stat, req){ if (req.status == 202){ $('#content').html(data) update_rbbt() window.setTimeout(reload, wait_timeout); }else{ window.location = main_url; } }, error:function(jqXHR, status, thrownError){ if (undefined === jqXHR.responseText || jqXHR.responseText == ''){ $('#content').html('No response. Server down?') }else{ $('#content').html(jqXHR.responseText) } update_rbbt() }}) } window.setTimeout(reload, wait_timeout);
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rbbt-rest-1.6.7 | share/views/layout/coda.haml |