You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by zh...@apache.org on 2017/09/28 09:09:25 UTC
ranger git commit: RANGER-1790 Select/Deselect All should along with
the chosed permission
Repository: ranger
Updated Branches:
refs/heads/master e47181f40 -> 238374e2a
RANGER-1790 Select/Deselect All should along with the chosed permission
Signed-off-by: peng.jianhua <pe...@zte.com.cn>
Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/238374e2
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/238374e2
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/238374e2
Branch: refs/heads/master
Commit: 238374e2a9b8335cd94fa8824c87b465b089c933
Parents: e47181f
Author: zhangqiang2 <zh...@zte.com.cn>
Authored: Tue Sep 19 10:11:04 2017 +0800
Committer: peng.jianhua <pe...@zte.com.cn>
Committed: Thu Sep 28 17:07:44 2017 +0800
----------------------------------------------------------------------
.../main/webapp/scripts/views/policies/PermissionList.js | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ranger/blob/238374e2/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
index 92b8334..73ea8fe 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
@@ -508,6 +508,17 @@ define(function(require) {
$(this).is(':checked') ? checkboxlist.prop('checked',true) : checkboxlist.prop('checked',false);
});
+ that.$('.editable-checklist input[type="checkbox"]').click(function(e){
+ if(this.value!="-1"){
+ var selectAll = true;
+ that.$('.editable-checklist input[type="checkbox"]').each(function(index,item){
+ if(item.value!="-1" && !item.checked){
+ selectAll = false;
+ }
+ });
+ that.$('input[type="checkbox"][value="-1"]').prop('checked',selectAll);
+ }
+ });
},
renderPolicyCondtion : function() {
var that = this;