2013-05-27 19:45:33 +00:00
|
|
|
define([
|
2013-05-29 19:55:23 +00:00
|
|
|
"jquery",
|
|
|
|
"underscore"
|
2013-05-27 19:45:33 +00:00
|
|
|
], function($, _) {
|
2013-05-29 19:55:23 +00:00
|
|
|
|
|
|
|
var workingIndicator = {
|
|
|
|
extensionId: "workingIndicator",
|
2013-06-10 22:32:34 +00:00
|
|
|
extensionName: "Working Indicator",
|
2013-05-29 19:55:23 +00:00
|
|
|
settingsBloc: '<p>Displays an animated image when a network operation is running.</p>'
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
});
|