From 85df315cbded1ba151bc4fd3d088ce28e39aad99 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 23 Apr 2014 19:09:28 +0000 Subject: [PATCH] - Remove widgets used just to send sel_options - Change dialog account_type to both --- admin/js/app.js | 18 ++++++++++++++---- admin/templates/default/acl.edit.xet | 4 ++-- admin/templates/default/acl.xet | 8 -------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/admin/js/app.js b/admin/js/app.js index 10bdedc234..84bc34cd99 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -400,22 +400,32 @@ app.classes.admin = AppJS.extend( } if(content.acl_appname) { - content.apps = content.acl_appname; + // Load checkboxes & their values content.acl_rights = content.acl_rights ? parseInt(content.acl_rights) : null; jQuery.extend(content, {acl:[],right:[],label:[]}); for( var right in acl_rights[content.acl_appname]) { + // only user himself is allowed to grant private (16) rights if(right == '16' && content['acl_account'] != egw.user('account_id')) { - // only user himself is allowed to grant private (16) rights readonlys.acl[content.acl.length] = true; } content.acl.push(content.acl_rights & right); content.right.push(right); content.label.push(egw.lang(acl_rights[content.acl_appname][right])); } - - + } + + // Make sure selected values are there + if(content.acl_account) + { + sel_options.acl_account = jQuery.extend({},sel_options.acl_account); + this.egw.link_title('home-accounts', content.acl_account, function(title) {sel_options.acl_account[content.acl_account] = title;}); + } + if(content.acl_location) + { + sel_options.acl_location = jQuery.extend({},sel_options.acl_location); + this.egw.link_title('home-accounts', content.acl_location, function(title) {sel_options.acl_location[content.acl_location] = title;}); } // Create the dialog diff --git a/admin/templates/default/acl.edit.xet b/admin/templates/default/acl.edit.xet index 36347bbdc4..a24f0c8cb7 100644 --- a/admin/templates/default/acl.edit.xet +++ b/admin/templates/default/acl.edit.xet @@ -17,13 +17,13 @@ - + - + diff --git a/admin/templates/default/acl.xet b/admin/templates/default/acl.xet index fa6f52fea7..69a39b56c1 100644 --- a/admin/templates/default/acl.xet +++ b/admin/templates/default/acl.xet @@ -61,14 +61,6 @@