/**
* @module DashboardApplication
*/
(function ($) {
"use strict";
/**
* Class which provides methods to fill content of status box for JQuery plugin.
* @class statusBoxPluginObj
* @static
*/
var statusBoxPluginObj = {
/**
* Method is initializing bottom panel.
* @method init
* @param caption {String} Caption of status box.
* @param title {String} Title of status box.
* @param status {String} Status info of status box.
*/
init: function (caption, title, status) {
this.empty();
var appendText = '
';
appendText += '';
appendText += '';
appendText += '';
appendText += '';
appendText += '' + title.toUpperCase() + '
';
appendText += '' + status.toUpperCase() + '
';
this.append(appendText);
$("#captionIndicator" + this[0].id).boxCaptionPlugin('initSmall', caption);
}
};
/**
* Class which provides acces to {{#crossLink "statusBoxPluginObj"}}{{/crossLink}} methods.
* @class statusBoxPlugin
* @constructor
* @param method {Object} Identificator (name) of method.
* @return Result of called method.
*/
$.fn.statusBoxPlugin = function (method) {
// Method calling logic
if (statusBoxPluginObj[method]) {
return statusBoxPluginObj[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || !method) {
return statusBoxPluginObj.init.apply(this, arguments);
} else {
$.error('Method ' + method + ' does not exist on jQuery.boxCaptionPlugin ');
}
};
}(jQuery));