Stackedit/js/extensions/workingIndicator.js

23 lines
663 B
JavaScript
Raw Normal View History

2013-05-27 19:45:33 +00:00
define([
2013-05-29 19:55:23 +00:00
"jquery",
2013-06-22 23:48:57 +00:00
"underscore",
"classes/Extension",
], function($, _, Extension) {
2013-05-29 19:55:23 +00:00
2013-06-22 23:48:57 +00:00
var workingIndicator = new Extension("workingIndicator", "Working Indicator");
workingIndicator.settingsBlock = '<p>Displays an animated image when a network operation is running.</p>';
2013-05-29 19:55:23 +00:00
workingIndicator.onAsyncRunning = function(isRunning) {
if(isRunning === false) {
$(".working-indicator").removeClass("show");
$("body").removeClass("working");
}
else {
$(".working-indicator").addClass("show");
$("body").addClass("working");
}
};
return workingIndicator;
2013-05-27 19:45:33 +00:00
});