diff --git a/.gitignore b/.gitignore index e186a4b6a7..56eaf34435 100644 --- a/.gitignore +++ b/.gitignore @@ -61,4 +61,6 @@ local.properties seroUtils.jar *deploy_rsa *deploy_rsa.pub -*.exe \ No newline at end of file +*.exe +*client*.png +*client*.css \ No newline at end of file diff --git a/WebContent/WEB-INF/classes/env.properties b/WebContent/WEB-INF/classes/env.properties index 47f24a1e0d..9b79b90a0b 100644 --- a/WebContent/WEB-INF/classes/env.properties +++ b/WebContent/WEB-INF/classes/env.properties @@ -61,5 +61,14 @@ abilit.MILLIS_SECONDS_PERIOD_UPDATE_EVENT_DETECTORS=1000 abilit.MILLIS_SECONDS_PERIOD_UPDATE_PENDING_EVENTS=1000 abilit.CRONE_UPDATE_CACHE_POINT_HIERARCHY=0 0/10 * * * ? +scadalts.custom_logo=builder/assets/images/logos/SCADA-LTS.png +#scadalts.custom_logo=builder/assets/images/logos/client_*.png +scadalts.custom_css=resources/common.css +#scadalts.custom_css=resources/client_*.css +scadalts.custom_css_for_new_views= +#scadalts.custom_css_for_new_views=resources/client_*_for_new_views.css + + + #security.hashAlgorithm=NONE #grove.url=http://mango.serotoninsoftware.com/servlet diff --git a/WebContent/WEB-INF/jsp/pointHierarchySLTS.jsp b/WebContent/WEB-INF/jsp/pointHierarchySLTS.jsp index 624d476be7..84153b4058 100644 --- a/WebContent/WEB-INF/jsp/pointHierarchySLTS.jsp +++ b/WebContent/WEB-INF/jsp/pointHierarchySLTS.jsp @@ -78,7 +78,7 @@
- +
@@ -284,6 +284,24 @@ var messages = { var nodeActivate; var nodeDragAndDrop; var newNode; + + function loadjscssfile(filename, filetype){ + if (filetype=="js"){ //if filename is a external JavaScript file + var fileref=document.createElement('script') + fileref.setAttribute("type","text/javascript") + fileref.setAttribute("src", filename) + } else if (filetype=="css"){ //if filename is an external CSS file + var fileref=document.createElement("link") + fileref.setAttribute("rel", "stylesheet") + fileref.setAttribute("type", "text/css") + fileref.setAttribute("href", filename) + } + if (typeof fileref!="undefined") + document.getElementsByTagName("head")[0].appendChild(fileref) + }; + + + $(function () { $('[data-toggle="tooltip"]').tooltip(); @@ -297,6 +315,30 @@ var messages = { if (!myLocation) { myLocation = location.protocol + "//" + location.host + "" + appScada + "/"; } + + $.ajax({ + type: "GET", + url:myLocation+'/viewutil/pathToLogo', + success: function(msg){ + $("#logo").attr("src", msg); + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + $("#logo").attr("src", 'builder/assets/images/logos/SCADA-LTS.png'); + } + }); + $.ajax({ + type: "GET", + url:myLocation+'/viewutil/pathToCommonsCSSForNewViews', + success: function(msg){ + if (msg.length>0) { + loadjscssfile(msg,"css"); + } + }, + error: function(XMLHttpRequest, textStatus, errorThrown) { + //not loaded additional css + } + }); + var getParentId = function(node) { if (node != undefined) { var parentId=0; diff --git a/WebContent/WEB-INF/jsp/scripting.jsp b/WebContent/WEB-INF/jsp/scripting.jsp index 334cc3bd43..1e91ed0f0c 100644 --- a/WebContent/WEB-INF/jsp/scripting.jsp +++ b/WebContent/WEB-INF/jsp/scripting.jsp @@ -38,7 +38,6 @@ if (!myLocation) { myLocation = location.protocol + "//" + location.host + "/" + appScada + "/"; } - console.log(myLocation); function executeScript(){ var xid = jQuery("#xid"); // saveScript() nie zdarzy zapisac !!! diff --git a/WebContent/WEB-INF/tags/page.tag b/WebContent/WEB-INF/tags/page.tag index 12e4177957..29c75ca50a 100644 --- a/WebContent/WEB-INF/tags/page.tag +++ b/WebContent/WEB-INF/tags/page.tag @@ -79,6 +79,59 @@