You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jb...@apache.org on 2007/09/07 23:38:17 UTC
svn commit: r573719 -
/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
Author: jbohn
Date: Fri Sep 7 14:38:16 2007
New Revision: 573719
URL: http://svn.apache.org/viewvc?rev=573719&view=rev
Log:
GERONIMO-3401 make the expert mode work on IE and fix error in expert config check
Modified:
geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp?rev=573719&r1=573718&r2=573719&view=diff
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp (original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/configmanager/normal.jsp Fri Sep 7 14:38:16 2007
@@ -27,7 +27,7 @@
// the user really intends to stop the component prior to any action.
function promptIfUnsafeToStop(configId,expertConfig, type) {
// if the component is a Geronimo "expert" service then provide a stern warning
- if ((type == 'SERVICE') && expertConfig) {
+ if ((type == 'SERVICE') && (expertConfig == 'true')) {
return confirm( configId + " is an Apache Geronimo service.\r\n \r\n" +
"Stopping this component may prevent the server or the "+
"administration console from functioning properly. " +
@@ -43,7 +43,7 @@
"Proceed with this action?");
}
// if the component is any other Geronimo "expert" component provide an appropriate warning
- if (expertConfig) {
+ if (expertConfig == 'true') {
return confirm( configId + " is provided by Apache Geronimo and may be required by other " +
"modules (reference the 'Child Components' listed in the view).\r\n \r\n " +
"All dependent components and subsequent dependencies will also be stopped. \r\n \r\n" +
@@ -62,7 +62,7 @@
// the user really intends to stop the component prior to any action.
function promptIfUnsafeToRestart(configId,expertConfig, type) {
// if the component is a Geronimo "expert" service then provide a stern warning
- if ((type == 'SERVICE') && expertConfig) {
+ if ((type == 'SERVICE') && (expertConfig == 'true')) {
return confirm( configId + " is an Apache Geronimo service.\r\n \r\n " +
"Restarting this component may prevent the server or the "+
"administration console from functioning properly. " +
@@ -79,7 +79,7 @@
"Proceed with this action?");
}
// if the component is a Geronimo "expert" component then provide an appropriate warning
- if (expertConfig) {
+ if (expertConfig == 'true') {
return confirm( configId + " is provided by Apache Geronimo and may be required by other " +
"modules (reference the 'Child Components' listed in the view).\r\n \r\n " +
"As part of the stop action, all dependent components and subsequent dependencies will also be stopped. \r\n \r\n" +
@@ -98,7 +98,7 @@
// cannot be restarted. These situations require more stringent warnings.
function uninstallPrompt(configId,expertConfig, type) {
// if the component is a geronimo "expert" service always provide the most stern warning
- if ((type == 'SERVICE') && expertConfig) {
+ if ((type == 'SERVICE') && (expertConfig == 'true')) {
return confirm( configId + " is an Apache Geronimo service.\r\n \r\n" +
"Uninstalling this component may have unexpected results "+
"such as rendering the administration web console or even the "+
@@ -114,7 +114,7 @@
"Are you certain you wish to proceed with this uninstall?");
}
// if the component is any other Apache Geronimo "expert" component then provide an appropriate warning
- if (expertConfig) {
+ if (expertConfig == 'true') {
return confirm( configId + " is provided by Apache Geronimo and may be required by other " +
"modules (reference the 'Child Components' listed in the view). \r\n \r\n" +
"Are you certain you wish to proceed with this uninstall?");
@@ -123,30 +123,43 @@
return confirm("Are you certain you wish to uninstall " + configId + " ?");
}
-
-
// Toggle expert mode on and off with onClick
function toggleExpertMode() {
if (document.checkExpert.expertUser.checked) {
- var expertActions = document.getElementsByName('expert');
+ var expertActions = getSpanElementsByName('expert');
for( var i = 0; i < expertActions.length; ++i ) {
expertActions[i].style.display='block' ;
}
- var nonexpertActions = document.getElementsByName('nonexpert');
+ var nonexpertActions = getSpanElementsByName('nonexpert');
for( var i = 0; i < nonexpertActions.length; ++i ) {
nonexpertActions[i].style.display='none' ;
}
}
else {
- var expertActions = document.getElementsByName('expert');
+ var expertActions = getSpanElementsByName('expert');
for( var i = 0; i < expertActions.length; ++i ) {
expertActions[i].style.display='none' ;
}
- var nonexpertActions = document.getElementsByName('nonexpert');
+ var nonexpertActions = getSpanElementsByName('nonexpert');
for( var i = 0; i < nonexpertActions.length; ++i ) {
nonexpertActions[i].style.display='block' ;
}
}
+}
+
+
+// work around since IE doesn't support document.getElementsByName
+function getSpanElementsByName(name) {
+ var results = new Array();
+ var spans = document.getElementsByTagName("span");
+ for(i = 0,j = 0; i < spans.length; i++) {
+ nameValue = spans[i].getAttribute("name");
+ if(nameValue == name) {
+ results[j] = spans[i];
+ j++;
+ }
+ }
+ return results;
}
</script>