test/dummy/tmp/cache/assets/test/sprockets/b56dfad0b14283f2cc10c62f37d71cc7 in extface-0.4.0 vs test/dummy/tmp/cache/assets/test/sprockets/b56dfad0b14283f2cc10c62f37d71cc7 in extface-0.4.1a

- old
+ new

@@ -1,10 +1,43 @@ {I" class:ETI"BundledAsset;FI"logical_path;TI"extface/application.js;TI" pathname;TI"O/home/alex/workspace/extface/app/assets/javascripts/extface/application.js;FI"content_type;TI"application/javascript;TI" -mtime;Tl+:DSI" length;Ti/I" digest;TI"%d534f49de81ce5ca27c53914a30a71b2;FI" source;TI"/// Place all the behaviors and hooks related to the matching controller here. +mtime;Tl+MÖSI" length;TiÞI" digest;TI"%623778c29b126b3e756fcc653b1a5c4e;FI" source;TI"Þ// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. -; +$(document).ready(function() { + $('#push').click(function(e) { + $.ajax({ + type: "POST", + url: $(this).attr('href'), + data: $('#data').val(), + contentType: "application/octet-stream" + }); + e.preventDefault(); + }); +}); +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); + }; + } +}; document.open_sse = function(url) { if (!!window.EventSource) { var source = new EventSource(url); source.onmessage = function(e) { @@ -32,6 +65,6 @@ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details // about supported directives. // ; -;TI"required_assets_digest;TI"%cd36a21c47a7bd976743685c8efa0aeb;FI" _version;TI"%1005ed9f20e25fb0a0599a7017dd0e6b;F +;TI"required_assets_digest;TI"%5161e57033bd889dcd16f2e02df59841;FI" _version;TI"%1d4ceeee8fc386afc9292795d0cf77f8;F \ No newline at end of file