portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r602355 - /portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm
Date Sat, 08 Dec 2007 09:30:23 GMT
Author: smilek
Date: Sat Dec  8 01:30:23 2007
New Revision: 602355

URL: http://svn.apache.org/viewvc?rev=602355&view=rev
Log:
The following revision comments are from branches/JETSPEED-2.1.3 revisions which were not
individually checked-in to trunk
=== ---------------------------------------------------------------- ===
[ from branches/JETSPEED-2.1.3 r595434 ] | smilek | 2007-11-15 13:24:02 -0700 (Thu, 15 Nov
2007) | 1 line

improve constraints and permissions
=== ---------------------------------------------------------------- ===

Modified:
    portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm

Modified: portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm?rev=602355&r1=602354&r2=602355&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm
(original)
+++ portals/jetspeed-2/trunk/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm
Sat Dec  8 01:30:23 2007
@@ -375,6 +375,13 @@
     updateEditorControls( tTableWidget );
 }
 
+function btnSetDisabled( btnWidget, /* Boolean */ disabled )
+{
+    if ( ! btnWidget ) return;
+    if ( btnWidget.disabled != disabled ) // bug in widget if called multiple times with
same value
+        btnWidget.setDisabled(disabled);
+}
+
 function clearAndDisableEditor( tTableWidget )
 {
     if ( ! tTableWidget )
@@ -404,23 +411,23 @@
 
     var buttonWidget = dojo.widget.byId( "newButton" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(false);
+        btnSetDisabled( buttonWidget, false );
 
     buttonWidget = dojo.widget.byId( "saveButton" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(true);
+        btnSetDisabled( buttonWidget, true );
 
     buttonWidget = dojo.widget.byId( "revertButton" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(true);
+        btnSetDisabled( buttonWidget, true );
 
     buttonWidget = dojo.widget.byId( "deleteButton" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(true);
+        btnSetDisabled( buttonWidget, true );
 
     buttonWidget = dojo.widget.byId( "openConstraints" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(true);
+        btnSetDisabled( buttonWidget, true );
 }
 
 function updateConstraintsEditor( rowData )
@@ -521,11 +528,11 @@
 {
     var buttonWidget = dojo.widget.byId( "newConstraintButton" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(false);
+        btnSetDisabled( buttonWidget, false );
 
     buttonWidget = dojo.widget.byId( "deleteConstraintButton" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(false);
+        btnSetDisabled( buttonWidget, false );
 }
 
 function clearAndDisableConstraintsEditor()
@@ -571,11 +578,11 @@
 
     var buttonWidget = dojo.widget.byId( "newConstraintButton" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(false);
+        btnSetDisabled( buttonWidget, false );
 
     buttonWidget = dojo.widget.byId( "deleteConstraintButton" );
     if ( buttonWidget )
-        buttonWidget.setDisabled(true);
+        btnSetDisabled( buttonWidget, true );
 }
 
 
@@ -778,7 +785,7 @@
         if ( tTableWidget.js_type == "defs" )
         {
             buttonWidget.show();
-            buttonWidget.setDisabled(false);
+            btnSetDisabled( buttonWidget, false );
         }
         else
         {
@@ -790,35 +797,35 @@
     {
         buttonWidget = dojo.widget.byId( "saveButton" );
         if ( buttonWidget )
-            buttonWidget.setDisabled(false);
+            btnSetDisabled( buttonWidget, false );
 
         buttonWidget = dojo.widget.byId( "revertButton" );
         if ( buttonWidget )
         {
             if ( hasChanged == "modified" )
             {
-                buttonWidget.setDisabled(false);
+                btnSetDisabled( buttonWidget, false );
             }
             else
             {
-                buttonWidget.setDisabled(true);
+                btnSetDisabled( buttonWidget, true );
             }
         }
 
         buttonWidget = dojo.widget.byId( "newButton" );
         if ( buttonWidget )
-            buttonWidget.setDisabled(true);
+            btnSetDisabled( buttonWidget, true );
 
         buttonWidget = dojo.widget.byId( "deleteButton" );
         if ( buttonWidget )
         {
             if ( hasChanged == "modified" )
             {
-                buttonWidget.setDisabled(true);
+                btnSetDisabled( buttonWidget, true );
             }
             else
             {
-                buttonWidget.setDisabled(false);
+                btnSetDisabled( buttonWidget, false );
             }
         }
     }
@@ -826,19 +833,19 @@
     {
         buttonWidget = dojo.widget.byId( "saveButton" );
         if ( buttonWidget )
-            buttonWidget.setDisabled(true);
+            btnSetDisabled( buttonWidget, true );
 
         buttonWidget = dojo.widget.byId( "revertButton" );
         if ( buttonWidget )
-            buttonWidget.setDisabled(true);
+            btnSetDisabled( buttonWidget, true );
 
         buttonWidget = dojo.widget.byId( "newButton" );
         if ( buttonWidget )
-            buttonWidget.setDisabled(false);
+            btnSetDisabled( buttonWidget, false );
 
         buttonWidget = dojo.widget.byId( "deleteButton" );
         if ( buttonWidget )
-            buttonWidget.setDisabled(false);
+            btnSetDisabled( buttonWidget, false );
     }
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message