Sha256: 1ce8c79980da6f9c1750cf8655096fd91121fc6dff74446afee26ecc97f47a5c

Contents?: true

Size: 966 Bytes

Versions: 2

Compression:

Stored size: 966 Bytes

Contents

= serve_js
:javascript
  var production = #{production? ? "true" : "false"};
  $('.offcanvas').click(function(e){ 
    if( e.target !== this ) 
      return;
    $(this).toggleClass('show') 
  })

  start_deferred()

- if @reload_page 
  :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);


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rbbt-rest-1.4.12 share/views/layout/coda.haml
rbbt-rest-1.4.11 share/views/layout/coda.haml