diff --git a/frontend-js/src/main/css/global.css b/frontend-js/src/main/css/global.css index 32512ff5ae680ceb2ae6423693728d8b7f771183..ec96abdecc0f75b3837f87e961dc9ab06c5bf08a 100644 --- a/frontend-js/src/main/css/global.css +++ b/frontend-js/src/main/css/global.css @@ -492,6 +492,10 @@ h1 { margin: 5px; } +.minerva-no-close .ui-dialog-titlebar-close { + display: none +} + .ui-icon { display: inline-block; } diff --git a/frontend-js/src/main/js/GuiConnector.js b/frontend-js/src/main/js/GuiConnector.js index 58f766c25d6de55f79b2739ec56671b53b511d0a..a53e8e1b1d6da163761aa367db6bd8773daa9083 100644 --- a/frontend-js/src/main/js/GuiConnector.js +++ b/frontend-js/src/main/js/GuiConnector.js @@ -27,11 +27,11 @@ GuiConnector.yPos = 0; * List of GET params passed via url. */ -GuiConnector.init = function () { +GuiConnector.init = function() { var self = this; if (!String.prototype.endsWith) { - String.prototype.endsWith = function (pattern) { + String.prototype.endsWith = function(pattern) { var d = this.length - pattern.length; return d >= 0 && this.lastIndexOf(pattern) === d; }; @@ -42,7 +42,7 @@ GuiConnector.init = function () { alert("This webpage works well with Chrome, Firefox and Safari."); } // bootstrap tab initialization - $("ul.nav-tabs a").click(function (e) { + $("ul.nav-tabs a").click(function(e) { e.preventDefault(); $(this).tab('show'); }); @@ -50,7 +50,7 @@ GuiConnector.init = function () { self.getParams = []; // find GuiConnector.getParams - window.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () { + window.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function() { function decode(s) { return decodeURIComponent(s.split("+").join(" ")); } @@ -59,8 +59,8 @@ GuiConnector.init = function () { }); // forser browser to update mouse coordinates whenever mouse move - jQuery(document).ready(function () { - $(document).mousemove(function (e) { + jQuery(document).ready(function() { + $(document).mousemove(function(e) { GuiConnector.updateMouseCoordinates(e.pageX, e.pageY); }); }); @@ -72,7 +72,7 @@ GuiConnector.init = function () { self.addWindowResizeEvent(window.onresize); } - window.onresize = function () { + window.onresize = function() { for (var i = 0; i < self._windowResizeEvents.length; i++) { self._windowResizeEvents[i](); } @@ -80,18 +80,18 @@ GuiConnector.init = function () { } }; -GuiConnector.addWindowResizeEvent = function (handler) { +GuiConnector.addWindowResizeEvent = function(handler) { this._windowResizeEvents.push(handler); }; /** * Returns name of the file with LCSB logo. - * + * * @param bigLogo * {@link Boolean} value determining if we want to have big logo or * small one */ -GuiConnector.getLcsbLogoImg = function (bigLogo) { +GuiConnector.getLcsbLogoImg = function(bigLogo) { if (bigLogo) { return 'lcsb_logo_mid.png'; } else { @@ -103,26 +103,26 @@ GuiConnector.getLcsbLogoImg = function (bigLogo) { * Returns name of the file with image that should be presented when we are * wainting for data to be loaded. */ -GuiConnector.getLoadingImg = function () { +GuiConnector.getLoadingImg = function() { return "icons/ajax-loader.gif"; }; /** * Returns home directory for images in the application. */ -GuiConnector.getImgPrefix = function () { +GuiConnector.getImgPrefix = function() { return "resources/images/"; }; /** * Updates coordinates of the mouse in the browser. */ -GuiConnector.updateMouseCoordinates = function (x, y) { +GuiConnector.updateMouseCoordinates = function(x, y) { this.xPos = x; this.yPos = y; }; -GuiConnector.showProcessing = function (messageText) { +GuiConnector.showProcessing = function(messageText) { var self = GuiConnector; if (self._processingDialog === undefined) { self._processingDialog = document.createElement("div"); @@ -130,21 +130,19 @@ GuiConnector.showProcessing = function (messageText) { self._processingDialog.appendChild(self._errorDialogContent); document.body.appendChild(self._processingDialog); $(self._processingDialog).dialog({ - modal: true, - title: "PROCESSING", - width: "150px", - closeOnEscape: false, - open: function (event, ui) { - $(".ui-dialog-titlebar-close", ui).hide(); - }, + modal : true, + title : "PROCESSING", + width : "150px", + closeOnEscape : false, + dialogClass: 'minerva-no-close', }); } if (messageText === undefined) { messageText = "PROCESSING"; } var messageImg = Functions.createElement({ - type: "img", - src: 'resources/images/icons/ajax-loader.gif', + type : "img", + src : 'resources/images/icons/ajax-loader.gif', }); self._errorDialogContent.innerHTML = ""; self._errorDialogContent.style.textAlign = "center"; @@ -155,12 +153,12 @@ GuiConnector.showProcessing = function (messageText) { $(self._processingDialog).dialog("open"); }; -GuiConnector.hideProcessing = function () { +GuiConnector.hideProcessing = function() { var self = GuiConnector; $(self._processingDialog).dialog("close"); }; -GuiConnector.alert = function (error) { +GuiConnector.alert = function(error) { var self = GuiConnector; logger.error(error); if (self._errorDialog === undefined) { @@ -169,11 +167,11 @@ GuiConnector.alert = function (error) { self._errorDialog.appendChild(self._errorDialogContent); document.body.appendChild(self._errorDialog); $(self._errorDialog).dialog({ - classes: { - "ui-dialog": "ui-state-error" + classes : { + "ui-dialog" : "ui-state-error" }, - modal: true, - title: "ERROR" + modal : true, + title : "ERROR" }).siblings('.ui-dialog-titlebar').css("background", "red"); } var message = error;