Module: nagvis Branch: master Commit: 4d692eda641746b95dc09f219198656f48ccda97 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=4d692eda641746b95dc09f219198656f48ccda97
Author: LaMi <[email protected]> Date: Tue Jan 5 11:06:24 2010 +0100 Fixed new user/role management dialogs js code in IE --- share/frontend/nagvis-js/js/frontend.js | 9 ++++++++- share/frontend/nagvis-js/js/popupWindow.js | 4 ++-- .../templates/pages/default.manageRoles.html | 6 +++--- .../templates/pages/default.userMgmt.html | 9 +++++---- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/share/frontend/nagvis-js/js/frontend.js b/share/frontend/nagvis-js/js/frontend.js index bbcfa0a..e087f89 100644 --- a/share/frontend/nagvis-js/js/frontend.js +++ b/share/frontend/nagvis-js/js/frontend.js @@ -842,7 +842,14 @@ function setMapBackgroundImage(sImage) { function setPageBasics(oProperties) { setPageFavicon(oProperties.favicon_image); setPageTitle(oProperties.page_title); - setPageBackgroundColor(oProperties.background_color); + + // Set background color. When eventhandling enabled use the state for + // background color detection + if(oPageProperties.event_background && oPageProperties.event_background == '1') { + setPageBackgroundColor(getBackgroundColor(oMapSummaryObj.conf)); + } else { + setPageBackgroundColor(oProperties.background_color); + } } /** diff --git a/share/frontend/nagvis-js/js/popupWindow.js b/share/frontend/nagvis-js/js/popupWindow.js index 3d7c7c2..5c8a8f9 100644 --- a/share/frontend/nagvis-js/js/popupWindow.js +++ b/share/frontend/nagvis-js/js/popupWindow.js @@ -122,15 +122,15 @@ function popupWindow(title, oContent, openOnMousePosition, sWidth) { var oContainerDiv = document.createElement('div'); oContainerDiv.setAttribute('id', 'popupWindow'); oContainerDiv.style.position = 'absolute'; - 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 !== '') { + oContainerDiv.style.width = sWidth+'px'; oTable.style.width = sWidth+'px'; } diff --git a/share/userfiles/templates/pages/default.manageRoles.html b/share/userfiles/templates/pages/default.manageRoles.html index 94f9b52..0125fdf 100644 --- a/share/userfiles/templates/pages/default.manageRoles.html +++ b/share/userfiles/templates/pages/default.manageRoles.html @@ -1,5 +1,5 @@ -<script type="text/javascript"> -function selectRolePerms(id) \{ +<br><script type="text/javascript"> +selectRolePerms = function (id) \{ // Exit when id empty if(id == '') { return false; @@ -56,7 +56,7 @@ function selectRolePerms(id) \{ <form name="roleEdit" id="roleEditForm" action="#" onsubmit="submitFrontendForm('{$formTargetEdit}', 'roleEditForm');return false" method="post"> <p> <label>{$langSelectRole}<br /> - <select type="text" name="roleId" id="roleId" class="select" tabindex="10" onchange="selectRolePerms(this.value);" /> + <select type="text" name="roleId" id="roleId" class="select" tabindex="10" onchange="selectRolePerms(this.options[this.selectedIndex].value);" /> <option value="" selected="selected"></option> {foreach $roles role}<option value="{$role.roleId}">{$role.name}</option>{/foreach} </select> diff --git a/share/userfiles/templates/pages/default.userMgmt.html b/share/userfiles/templates/pages/default.userMgmt.html index 8088269..b8b3567 100644 --- a/share/userfiles/templates/pages/default.userMgmt.html +++ b/share/userfiles/templates/pages/default.userMgmt.html @@ -1,5 +1,6 @@ +<br> <script type="text/javascript"> -function selectAllOpts(field) \{ +selectAllOpts = function (field) \{ var oTarget = document.getElementById(field); for(var i = 0; i < oTarget.options.length; i++) \{ @@ -9,7 +10,7 @@ function selectAllOpts(field) \{ var oTarget = null; } -function roleModify(bAdd) \{ +roleModify = function (bAdd) \{ var oTarget = null; var oSource = null; @@ -40,7 +41,7 @@ function roleModify(bAdd) \{ oRolesAvailable = null; } -function getUserRoles(id) \{ +getUserRoles = function (id) \{ // Exit when id empty if(id == '') { return false; @@ -121,7 +122,7 @@ function getUserRoles(id) \{ <form name="userEdit" id="userEditForm" action="#" onsubmit="selectAllOpts('rolesSelected');submitFrontendForm('{$formTargetEdit}', 'userEditForm');return false" method="post"> <p> <label>{$langSelectUser}<br /> - <select type="text" name="userId" id="userId" class="select" tabindex="40" onchange="getUserRoles(this.value);" /> + <select type="text" name="userId" id="userId" class="select" tabindex="40" onchange="getUserRoles(this.options[this.selectedIndex].value);" /> <option value="" selected="selected"></option> {foreach $users user}<option value="{$user.userId}">{$user.name}</option>{/foreach} </select> ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
