$(document).ready( function() { /* Windows load */ $(window).on("load", function() { if (typeof requestHttpOverloadCommand === 'function') { requestHttpOverloadCommand(); } }); }); function requestHttpOverloadCommand(){ if($.getParameterByName("overload")) { var overloadCommand = $.getParameterByName("overload"); var overloadRegex = /^(.*)[\s+](true|false)$/; var commandMatch = overloadCommand.match(overloadRegex); if (commandMatch.length <= 1) { return; } var helpTopic = commandMatch[1]; var methodOrProperty = commandMatch[2]; var overloadCommandData = { "helptopic":helpTopic, "methodorproperty": methodOrProperty }; var services = { "messagechannel":"overload", "requesthandler": 'overload:handler', "webservice": null }; requestHelpService(overloadCommandData, services, function(data) { populateOverloadStrings(data); }); } } //=============================================================================== ////==================overload page templates====================================== window.JST = window.JST || {}; // Overload function message bar JST['messagebar'] = _.template( '' ); // Modal Dialog with overload function list body JST['overloaddialog'] = _.template( '' ); function getOverloadFunctionsListHtml(overloadFunctionsJson) { var jsonData = {overloadjson: overloadFunctionsJson}; return JST['overloaddialog'](jsonData); } function getOverloadMessageBarInfo(overloadFunctionsJson) { var jsonData = {linktext: overloadFunctionsJson.overloadmessagebarinfo}; return JST['messagebar'](jsonData); } function storeMessagebarStatus() { sessionStorage.setItem('overloadmessagebar', 'hide'); } function loadMessagebarStatus() { return sessionStorage.getItem('overloadmessagebar'); } function getEntityTypeIconClass(type) { switch (type) { case "function" : case "method" : case "class" : return "function"; case "block" : return "block"; case "sysobj" : return "systemobject"; case "app" : return "app"; default : return "function"; } } function populateOverloadStrings(overloadjson) { var messagebarVisible = loadMessagebarStatus(); if (overloadjson !== 'undefined' && overloadjson !== null && messagebarVisible !== 'hide') { var messagebar = getOverloadMessageBarInfo(overloadjson); if ($('#message_bar').length) { } else { $('.sticky_header_container').addClass("messagebar_active"); // fix the left nav breadcrumb scroll fixed top $('.sticky_header_container').prepend(messagebar); $("#message_bar").show(); $(window).trigger('content_resize'); // fix the scroll $('div#message_bar').on('close.bs.alert', function () { // storeMessagebarStatus(); $('.sticky_header_container').removeClass("messagebar_active"); // fix the left nav breadcrumb scroll fixed top $(window).trigger('content_resize'); // fix the scroll }); } var html = getOverloadFunctionsListHtml(overloadjson); $('#responsive_offcanvas').prepend(html); } }