Sha256: 8cec0dfa85b94473591d26efad6d4f92ce54eeb0511dd1c42a6003e36019aff0

Contents?: true

Size: 695 Bytes

Versions: 59

Compression:

Stored size: 695 Bytes

Contents

window.extface_fiscal_jobs = [];
document.extface_fiscal_monitor = function(url) {
  if (!!window.EventSource) {
    var source = new EventSource(url);
    var modal = $('#extface_fiscal_monitor');
    var message = $('#extface_fiscal_message');

    source.onmessage = function(e) {
      message.html(e.data);
    };
    
    source.onopen = function(e) {
      window.extface_fiscal_jobs.push(url);
      modal.modal('show');
    };
    
    source.onerror = function(e) {
      window.extface_fiscal_jobs.splice( $.inArray(url, window.extface_jobs), 1 );
      source.close();
      if (window.extface_fiscal_jobs.length == 0) setTimeout(function(){modal.modal('hide');},1000);
    };
  }
};

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
extface-0.7.3 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.7.2 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.7.1 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.7.0 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.9 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.8 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.7 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.6 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.5 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.4 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.3 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.2 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.1 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.6.0 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.5.9 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.5.8 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.5.7 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.5.6 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.5.5 app/assets/javascripts/extface/extface_fiscal_monitor.js
extface-0.5.4b app/assets/javascripts/extface/extface_fiscal_monitor.js