Module: nagvis Branch: master Commit: 52e878fb742d53d265890dac2cf2f064b0bcea0c URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=52e878fb742d53d265890dac2cf2f064b0bcea0c
Author: LaMi <[email protected]> Date: Wed Nov 11 14:07:41 2009 +0100 Changed some dialog styling settings; Width of the dialog is by default automatic but can have static configured widths now --- share/frontend/nagvis-js/js/popupWindow.js | 14 ++++++++++++-- share/userfiles/templates/pages/default.css | 1 - 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/share/frontend/nagvis-js/js/popupWindow.js b/share/frontend/nagvis-js/js/popupWindow.js index b56726e..3d7c7c2 100644 --- a/share/frontend/nagvis-js/js/popupWindow.js +++ b/share/frontend/nagvis-js/js/popupWindow.js @@ -97,7 +97,7 @@ function popupWindowClose() { * @return Boolean * @author Lars Michelsen <[email protected]> */ -function popupWindow(title, oContent, openOnMousePosition) { +function popupWindow(title, oContent, openOnMousePosition, sWidth) { if(oContent === null || oContent.code === null) { return false; } @@ -106,6 +106,10 @@ function popupWindow(title, oContent, openOnMousePosition) { openOnMousePosition = true; } + if(typeof sWidth === 'undefined' || sWidth === null) { + sWidth = ''; + } + // Default window position var posX = 100; var posY = 20; @@ -118,12 +122,18 @@ function popupWindow(title, oContent, openOnMousePosition) { var oContainerDiv = document.createElement('div'); oContainerDiv.setAttribute('id', 'popupWindow'); oContainerDiv.style.position = 'absolute'; - oContainerDiv.style.width = '400px'; + oContainerDiv.style.width = sWidth+'px'; oContainerDiv.style.left = posX+'px'; oContainerDiv.style.top = posY+'px'; var oTable = document.createElement('table'); oTable.setAttribute('id', 'popupWindowMaster'); + + // When width is not set the window should be auto adjusted + if(sWidth !== '') { + oTable.style.width = sWidth+'px'; + } + var oTbody = document.createElement('tbody'); var oRow = document.createElement('tr'); var oCell = document.createElement('th'); diff --git a/share/userfiles/templates/pages/default.css b/share/userfiles/templates/pages/default.css index 5d5f993..a52d19b 100644 --- a/share/userfiles/templates/pages/default.css +++ b/share/userfiles/templates/pages/default.css @@ -433,7 +433,6 @@ table#popupWindowMaster tr td { table#popupWindowMaster tbody tr th#dragbar { text-align: left; font-size: 14px; - padding-left: 10px; cursor: pointer; } ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
