2 * @module DashboardApplication
8 * Class which provides methods to fill content of status box for JQuery plugin.
9 * @class statusBoxPluginObj
12 var statusBoxPluginObj = {
14 * Method is initializing bottom panel.
16 * @param caption {String} Caption of status box.
17 * @param title {String} Title of status box.
18 * @param status {String} Status info of status box.
20 init: function (caption, title, status) {
22 var appendText = '<div id="leftTopCorner" class="corner leftTopCorner"></div>';
23 appendText += '<div id="leftBottomCorner" class="corner leftBottomCorner"></div>';
24 appendText += '<div id="rightTopCorner" class="corner rightTopCorner"></div>';
25 appendText += '<div id="rightBottomCorner" class="corner rightBottomCorner"></div>';
26 appendText += '<div id="captionIndicator' + this[0].id + '" class="boxIconText captionIndicator"></div>';
27 appendText += '<div id="textIndicator" class="fontSizeSmall fontWeightBold fontColorNormal textIndicator">' + title.toUpperCase() + '</div>';
28 appendText += '<div id="statusIndicator" class="fontSizeXSmall fontWeightBold fontColorDimmed statusIndicator">' + status.toUpperCase() + '</div>';
29 this.append(appendText);
30 $("#captionIndicator" + this[0].id).boxCaptionPlugin('initSmall', caption);
34 * Class which provides acces to {{#crossLink "statusBoxPluginObj"}}{{/crossLink}} methods.
35 * @class statusBoxPlugin
37 * @param method {Object} Identificator (name) of method.
38 * @return Result of called method.
40 $.fn.statusBoxPlugin = function (method) {
41 // Method calling logic
42 if (statusBoxPluginObj[method]) {
43 return statusBoxPluginObj[method].apply(this, Array.prototype.slice.call(arguments, 1));
44 } else if (typeof method === 'object' || !method) {
45 return statusBoxPluginObj.init.apply(this, arguments);
47 $.error('Method ' + method + ' does not exist on jQuery.boxCaptionPlugin ');