From 78118e3f60d87637ec20cd0199ef029bd1e192b0 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 12 Mar 2015 12:35:21 +0100 Subject: Make ACL popups scale to the actual content and avoid scrolling if possible --- plugins/acl/acl.js | 7 ++++--- plugins/acl/skins/larry/templates/table.html | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/acl/acl.js b/plugins/acl/acl.js index e6a84ff73..af52b5b6f 100644 --- a/plugins/acl/acl.js +++ b/plugins/acl/acl.js @@ -347,9 +347,12 @@ rcube_webmail.prototype.acl_init_form = function(id) buttons[this.gettext('save')] = function(e) { me.command('acl-save'); }; buttons[this.gettext('cancel')] = function(e) { me.command('acl-cancel'); }; + var popup_wrapper = $('
'); + this.acl_form.appendTo(popup_wrapper).show(); + // display it as popup this.acl_popup = this.show_popup_dialog( - '
 
', + popup_wrapper, id ? this.gettext('acl.editperms') : this.gettext('acl.newuser'), buttons, { @@ -365,8 +368,6 @@ rcube_webmail.prototype.acl_init_form = function(id) } ); - this.acl_form.appendTo(this.acl_popup).show(); - if (type == 'user') name_input.focus(); else diff --git a/plugins/acl/skins/larry/templates/table.html b/plugins/acl/skins/larry/templates/table.html index 16a97dfcb..2854524df 100644 --- a/plugins/acl/skins/larry/templates/table.html +++ b/plugins/acl/skins/larry/templates/table.html @@ -19,7 +19,7 @@ -