portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r595434 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp: WEB-INF/security/permissions/view.vm WEB-INF/view/security/constraints/constraints-view.vm css/security-constraints.css css/security-permissions.css
Date Thu, 15 Nov 2007 20:24:16 GMT
Author: smilek
Date: Thu Nov 15 12:24:02 2007
New Revision: 595434

URL: http://svn.apache.org/viewvc?rev=595434&view=rev
Log:
improve constraints and permissions

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-constraints.css
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-permissions.css

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm?rev=595434&r1=595433&r2=595434&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm
Thu Nov 15 12:24:02 2007
@@ -244,19 +244,19 @@
 
     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 );
 }
 
 function updateEditor( rowData )
@@ -384,6 +384,13 @@
     }
 }
 
+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 updateEditorControls()
 {
     var hasChanged = checkForChanges();
@@ -391,35 +398,35 @@
     {
         var 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 );
             }
         }
     }
@@ -427,19 +434,19 @@
     {
         var 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 );
     }
 }
 

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm?rev=595434&r1=595433&r2=595434&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/security/constraints/constraints-view.vm
Thu Nov 15 12:24:02 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 );
     }
 }
 

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-constraints.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-constraints.css?rev=595434&r1=595433&r2=595434&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-constraints.css
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-constraints.css
Thu Nov 15 12:24:02 2007
@@ -53,6 +53,7 @@
         #mainTabContainer {
             width: 100%;
             height: 304px;
+            top: 2px;  /* without this, the tabs are cut off at the top */
         }
 
 		* html div.tableContainer {	/* IE only hack */

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-permissions.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-permissions.css?rev=595434&r1=595433&r2=595434&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-permissions.css
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/css/security-permissions.css
Thu Nov 15 12:24:02 2007
@@ -17,19 +17,18 @@
 
 .permsRootLContainer { 
     width: 100%;
-    height: 100%;
+    height: 600px;
 }
 
 .permsTabLContainer { 
     width: 100%;
-    height: 49%;
+    height: 304px;
 }
 
 .editorLContainer {
     width: 100%;
-    height: 50%;
     border: 1px solid grey;
-    /* height: 200px; */
+    height: 200px;
 }
 
 .editorLTop {
@@ -42,7 +41,7 @@
 .editorLBottom  {
     padding: 4px;
     width: 100%;
-    height: 100%;
+    height: 140px;
 }
 
 .resourceNameLContainer {
@@ -109,9 +108,8 @@
 
 #permsTabContainer {
     width: 100%;
-    height: 90%;
     top: 2px;  /* without this, the tabs are cut off at the top */
-    /*height: 304px;*/
+    height: 304px;
 }
 
 * html div.tableContainer { /* IE only hack */



---------------------------------------------------------------------
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