vcl-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jftho...@apache.org
Subject svn commit: r1779243 - /vcl/trunk/web/js/privileges.js
Date Tue, 17 Jan 2017 19:39:29 GMT
Author: jfthomps
Date: Tue Jan 17 19:39:29 2017
New Revision: 1779243

URL: http://svn.apache.org/viewvc?rev=1779243&view=rev
Log:
modified nodeCheck and changeCascadedRights to correctly handle cascaded checkboxes after
changing the styling from being inline to using privCascade class from changed in privileges.php
committed in r1744109

Modified:
    vcl/trunk/web/js/privileges.js

Modified: vcl/trunk/web/js/privileges.js
URL: http://svn.apache.org/viewvc/vcl/trunk/web/js/privileges.js?rev=1779243&r1=1779242&r2=1779243&view=diff
==============================================================================
--- vcl/trunk/web/js/privileges.js (original)
+++ vcl/trunk/web/js/privileges.js Tue Jan 17 19:39:29 2017
@@ -357,8 +357,7 @@ function privChange(checked, row, col, t
 
 function nodeCheck(checked, row, col, type) {
 	var objname = "cell" + row + ":" + col;
-	var color = dojo.byId(objname).bgColor;
-	if(color == '#008000') {
+	if(dojo.hasClass(objname, 'privCascade')) {
 		objname = "ck" + row + ":" + col;
 		var obj = dijit.byId(objname);
 		obj.setAttribute('checked', true);
@@ -371,11 +370,9 @@ function nodeCheck(checked, row, col, ty
 function changeCascadedRights(checked, row, count, fromclick, type) {
 	var i;
 	var objname;
-	var color;
 	var value;
 	var obj;
 	var obj2;
-	var namearr;
 	for(i = 1; i < count; i++) {
 		objname = "ck" + row + ":" + i;
 		obj = dijit.byId(objname);
@@ -388,7 +385,7 @@ function changeCascadedRights(checked, r
 				obj2 = dojo.byId(objname);
 				if(! obj2)
 					continue;
-				obj2.bgColor = '#FFFFFF';
+				dojo.removeClass(objname, 'privCascade');
 				if(value == 'cascade') {
 					objname = "ck" + row + ":" + i;
 					obj = dijit.byId(objname)
@@ -405,7 +402,7 @@ function changeCascadedRights(checked, r
 				obj2 = dojo.byId(objname);
 				if(! obj2)
 					continue;
-				obj2.bgColor = '#008000';
+				dojo.addClass(objname, 'privCascade');
 			}
 		}
 	}



Mime
View raw message