1 2 3(function ($, ej, undefined) { 4 5 // Example plugin creation code 6 // sfSample is the plugin name 7 // "ej.Sample" is "namespace.className" will hold functions and properties 8 9 ej.widget("ejPropertiesPanel", "ej.PropertiesPanel", { 10 _rootCSS: "e-prop", 11 // default model 12 element: null, 13 model: null, 14 header:"Properties", 15 defaults: { 16 delayRender: true 17 }, 18 // constructor function 19 _init: function () { 20 if (ej.browserInfo().name == "msie" && this.model.delayRender) { 21 var proxy = this; 22 setTimeout(function () { proxy._initialize(); }, 0); 23 } 24 else this._initialize(); 25 }, 26 // constructor function 27 _initialize: function () { 28 this._sfPropertiesPanel = this.element.wrap('<div class="cols-prop-area" />'); 29 this._sfPropertyTitlebar = ej.buildTag("div.heading").prependTo(this.element); 30 ej.buildTag("span", this.header).appendTo(this._sfPropertyTitlebar); 31 this.element.find(".heading").next().addClass("content"); 32 if (window.theme == "bootstrap") $(".e-prop").addClass("e-bootstrap"); 33 }, 34 35 hide: function () { 36 var panel = this._sfPropertiesPanel; 37 this._setSize(); 38 this._setPosition(); 39 panel.css({ display: "none" }); 40 return this; 41 }, 42 _setModel: function () { 43 }, 44 _setPosition: function () { 45 if ($(document).find(".samplesection").length > 0) { 46 this._sfPropertiesPanel.appendTo(".samplesection"); 47 } 48 //var x = ($(this._sfPropertiesPanel).prev().width()+25); 49 //this._sfPropertiesPanel.css({ left: x }); 50 }, 51 // all events bound using this._on will be unbind automatically 52 _destroy: function () { 53 54 } 55 }); 56 57})(jQuery, Syncfusion); 58 59 60 61var theme = window.theme; 62 63 64//updateThemess(QueryString["theme"]); 65 66function loadTheme(sender) { 67 68 var theme = window.theme; 69 if (theme) { 70 switch (theme) { 71 case "flatdark": 72 case "azuredark": 73 case "limedark": 74 case "saffrondark": 75 theme = "flatdark"; 76 break; 77 case "gradient": 78 case "gradientazure": 79 case "gradientlime": 80 case "gradientsaffron": 81 theme = "gradientlight"; 82 break; 83 case "gradientdark": 84 case "gradientazuredark": 85 case "gradientlimedark": 86 case "gradientsaffrondark": 87 theme = "gradientdark"; 88 break; 89 default: 90 theme = "flatlight"; 91 break; 92 } 93 if (sender) 94 sender.model.theme = theme; 95 else { 96 if ($('.e-datavisualization-chart').length != 0) { 97 $('.e-datavisualization-chart').ejChart("option", { "theme": theme }); 98 } 99 var length = $('.e-datavisualization-rangenavigator').length; 100 if (length != 0) { 101 if (length <= 1) { 102 if ($('.e-datavisualization-rangenavigator')[0].id == "rangecustomtheme") { 103 var rangeObj = $('.e-datavisualization-rangenavigator').data("ejRangeNavigator"); 104 rangeObj.renderNavigator(); 105 } else { 106 $('.e-datavisualization-rangenavigator').ejRangeNavigator("option", { "theme": theme }); 107 108 } 109 } 110 else { 111 var rangeObj = $('#rangecustomtheme').data("ejRangeNavigator"); 112 var rangeObj1 = $('#rangecustomtheme2').data("ejRangeNavigator"); 113 rangeObj.renderNavigator(); 114 rangeObj1.renderNavigator(); 115 } 116 } 117 } 118 } 119 120} 121//Load Bullet theme 122function loadBulletTheme() { 123 var bulletTheme = window.theme; 124 if (bulletTheme) { 125 switch (bulletTheme) { 126 case "flatdark": 127 case "azuredark": 128 case "limedark": 129 case "saffrondark": 130 case "gradientdark": 131 case "gradientazuredark": 132 case "gradientlimedark": 133 case "gradientsaffrondark": 134 bulletTheme = "flatdark"; 135 break; 136 default: 137 bulletTheme = "flatlight"; 138 break; 139 } 140 if ($('.e-datavisualization-bulletgraph ').length != 0) { 141 if (ej.isNullOrUndefined($('.e-datavisualization-bulletgraph ').data('ejBulletGraph'))) return false; 142 var bulletGraphTheme = $('.e-datavisualization-bulletgraph ').ejBulletGraph('instance'); 143 $('.e-datavisualization-bulletgraph ').ejBulletGraph({ theme: bulletTheme });
144 bulletGraphTheme.model.theme = bulletTheme; 145 } 146 } 147} 148 149function loadOLAPGaugeTheme(args) { 150 var theme1 = window.theme; 151 if (theme1) { 152 switch (theme1) { 153 case "flatdark": 154 case "azuredark": 155 case "limedark": 156 case "saffrondark": 157 case "gradientdark": 158 case "gradientazuredark": 159 case "gradientlimedark": 160 case "gradientsaffrondark": 161 themeab = "flatdark"; 162 break; 163 default: 164 themeab = "flatlight"; 165 break; 166 } 167 if ($(".e-olapgauge").length > 0 && $(".e-circulargauge").length > 0) { 168 var gaugeElem = $(".e-circulargauge"); 169 for (var j = 0; j < gaugeElem.length; j++) { 170 var gaugeObj = $(gaugeElem[j]).data("ejCircularGauge"); 171 !ej.isNullOrUndefined(gaugeObj) && $('.e-circulargauge').ejCircularGauge({ theme: themeab }); 172 gaugeObj.model.theme = themeab; 173 updateGuageTheme(theme1, gaugeObj._id); 174 } 175 } 176 args._wireEvents(); 177 } 178} 179 180//Load Gauge Theme 181function loadGaugeTheme() { 182 var gaugeTheme = "", theme1 = window.theme; 183 if (theme1) { 184 switch (theme1) { 185 case "flatdark": 186 case "azuredark": 187 case "limedark": 188 case "saffrondark": 189 case "gradientdark": 190 case "gradientazuredark": 191 case "gradientlimedark": 192 case "gradientsaffrondark": 193 gaugeTheme = "flatdark"; 194 break; 195 default: 196 gaugeTheme = "flatlight"; 197 break; 198 } 199 if ($(".e-olapgauge").length > 0 && $(".e-circulargauge").length > 0) { 200 var gaugeElem = $(".e-circulargauge"); 201 for (var j = 0; j < gaugeElem.length; j++) { 202 var gaugeObj = $(gaugeElem[j]).data("ejCircularGauge"); 203 !ej.isNullOrUndefined(gaugeObj) && $('.e-circulargauge').ejCircularGauge({ theme: gaugeTheme }); 204 gaugeObj.model.theme = gaugeTheme; 205 updateGuageTheme(theme1, gaugeObj._id); 206 } 207 } 208 else if ($('.e-circulargauge').length != 0) { 209 if (ej.isNullOrUndefined($('.e-circulargauge').data('ejCircularGauge'))) return false; 210 var cGauge = $('.e-circulargauge').ejCircularGauge('instance'); 211 !ej.isNullOrUndefined(cGauge) && $('.e-circulargauge').ejCircularGauge({ theme: gaugeTheme }); 212 cGauge.model.theme = gaugeTheme; 213 updateGuageTheme(theme1, cGauge._id); 214 } 215 else if (($('.e-lineargauge').length != 0)) { 216 if (ej.isNullOrUndefined($('.e-lineargauge').data('ejLinearGauge'))) return false; 217 var lGauge = $('.e-lineargauge').ejLinearGauge('instance'); 218 !ej.isNullOrUndefined(lGauge) && $('.e-lineargauge').ejLinearGauge({ theme: gaugeTheme }); 219 lGauge.model.theme = gaugeTheme; 220 updateGuageTheme(theme1, lGauge._id); 221 } 222 else if (($('.e-digitalgauge').length != 0)) { 223 if (ej.isNullOrUndefined($('.e-digitalgauge').data('ejDigitalGauge'))) return false; 224 var dGauge = $('.e-digitalgauge').ejDigitalGauge('instance'); 225 !ej.isNullOrUndefined(dGauge) && $('.e-digitalgauge').ejDigitalGauge({ theme: gaugeTheme }); 226 dGauge.model.theme = gaugeTheme; 227 updateGuageTheme(theme1, dGauge._id); 228 } 229 var OGauge = $(".e-olapgauge").data("ejOlapGauge"); 230 if (OGauge) 231 OGauge._wireEvents(); 232 233 } 234} 235 236function updateGuageTheme(themestyle,id) { 237 var clsname = ""; 238 if ($(".e-circulargauge").length > 0) { 239 clsname = "e-circulargauge"; 240 } 241 else if ($(".e-lineargauge").length > 0) { 242 clsname = "e-lineargauge"; 243 } 244 else if ($(".e-digitalgauge").length > 0) { 245 clsname = "e-digitalgauge"; 246 } 247 248 clsname && updateThemeforGauge(clsname, themestyle,id); 249} 250function updateThemeforGauge(clsname, themestyle, gaugeid) { 251 var themecolor = themestyle.indexOf("dark") == -1 ? "light" : "dark"; 252 var skin = "metro" + themecolor; 253 switch (clsname) { 254 case "e-circulargauge": 255 replaceframesforGauge(gaugeid, themecolor, themestyle, "circular"); 256 break; 257 case "e-lineargauge": 258 replaceframesforGauge(gaugeid, themecolor, themestyle, "linear"); 259 break; 260 case "e-digitalgauge": 261 replaceframesforGauge(gaugeid, themecolor, themestyle, "digital"); 262 break; 263 } 264} 265 266function replaceframesforGauge(gaugeid, themecolor, themestyle, frameclass) { 267 var lGauge, 268 oirentation, 269 framestyle; 270 if (themestyle.indexOf("gradient") != -1) { 271 if (($(".e-lineargauge").length > 0)){ 272 lGauge = $(".e-lineargauge").ejLinearGauge('instance'); 273 oirentation = lGauge.model.orientation.toLowerCase(); 274 framestyle = themecolor == "light" ? (oirentation == "vertical") ? "lightgradient" : "lightgradient1" : (oirentation == "vertical" ) ? "darkgradient" : "darkgradient1"; 275 } 276 else 277 framestyle = themecolor == "light" ? "lightgradient" : "darkgradient"; 278 279 if ($("#" + gaugeid).parent().hasClass(frameclass + "lightgradient")) 280 $("#" + gaugeid).parent().removeClass(frameclass + "lightgradient"); 281 else if ($("#" + gaugeid).parent().hasClass(frameclass + "lightgradient1")) 282 $("#" + gaugeid).parent().removeClass(frameclass + "lightgradient1"); 283 else if ($("#" + gaugeid).parent().hasClass(frameclass + "darkgradient")) 284 $("#" + gaugeid).parent().removeClass(frameclass + "darkgradient"); 285 else if ($("#" + gaugeid).parent().hasClass(frameclass + "darkgradient1")) 286 $("#" + gaugeid).parent().removeClass(frameclass + "darkgradient1"); 287 frameclass = gaugeid == "thermoLinear" ? "thermo" : frameclass; 288 $("#" + gaugeid).parent().addClass(frameclass + framestyle); 289 } 290 else 291 $("#" + gaugeid).parent()[0].className = ""; 292} 293 294// Event Trace popup 295 296function adjustpopupposition(args) { 297 var offset = $("#LayoutSection_EventSection_selectControls_dropdown").offset(); 298 var height = $("#LayoutSection_EventSection_selectControls_wrapper").height(); 299 $("#LayoutSection_EventSection_selectControls_popup").css("top", (offset.top + height + 14) + "px"); 300 var left = $("#LayoutSection_EventSection_selectControls_popup").width() + offset.left; 301 if (left > $(".content-container-fluid").width()) 302 left = (offset.left + $("#LayoutSection_EventSection_selectControls_dropdown").width())
302- $("#LayoutSection_EventSection_selectControls_popup").width() - 12; 303 // $("#selectControls_popup").css("left", left + "px"); 304} 305 306// For event tracer 307jQuery.addEventLog = function (eventLog) { 308 309 var divEvtTrace = null; 310 if (!$(".sf-event-panel").length > 0) { 311 divEvtTrace = ej.buildTag("div.divEventTrace sf-event-panel"); 312 } 313 else { 314 divEvtTrace = $(".sf-event-panel"); 315 } 316 $("#EventLog").append(divEvtTrace); 317 var eventHtml = "<span class='eventLog'>" + eventLog + "</span><hr>"; 318 $(eventHtml).prependTo($("div.divEventTrace")).slideDown(300, "easeOutQuad"); 319 if ($('input[name=themevarient]:checked').length>0 && $('input[name=themevarient]:checked')[0].id == "darktext") 320 $(".eventtracesection hr").addClass("dark-hr"); 321 else 322 $(".eventtracesection hr").removeClass("dark-hr"); 323}; 324 325jQuery.clearEventLog = function () { 326 $("div.divEventTrace").html(""); 327}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.