From 78118e3f60d87637ec20cd0199ef029bd1e192b0 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <bruederli@kolabsys.com> Date: Thu, 12 Mar 2015 08:33:07 -0400 Subject: [PATCH] Make ACL popups scale to the actual content and avoid scrolling if possible --- plugins/acl/skins/larry/templates/table.html | 2 +- plugins/acl/acl.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/acl/acl.js b/plugins/acl/acl.js index e6a84ff..af52b5b 100644 --- a/plugins/acl/acl.js +++ b/plugins/acl/acl.js @@ -347,9 +347,12 @@ buttons[this.gettext('save')] = function(e) { me.command('acl-save'); }; buttons[this.gettext('cancel')] = function(e) { me.command('acl-cancel'); }; + var popup_wrapper = $('<div style="width:480px; min-height:280px"></div>'); + this.acl_form.appendTo(popup_wrapper).show(); + // display it as popup this.acl_popup = this.show_popup_dialog( - '<div style="width:480px;height:280px"> </div>', + popup_wrapper, id ? this.gettext('acl.editperms') : this.gettext('acl.newuser'), buttons, { @@ -364,8 +367,6 @@ } } ); - - this.acl_form.appendTo(this.acl_popup).show(); if (type == 'user') name_input.focus(); diff --git a/plugins/acl/skins/larry/templates/table.html b/plugins/acl/skins/larry/templates/table.html index 16a97df..2854524 100644 --- a/plugins/acl/skins/larry/templates/table.html +++ b/plugins/acl/skins/larry/templates/table.html @@ -19,7 +19,7 @@ </ul> </div> -<div id="aclform" class="propform" style="position:absolute; width:480px; top:0; left:0; padding:8px" aria-labelledby="aria-label-aclform" aria-hidden="true" role="dialog"> +<div id="aclform" class="propform" aria-labelledby="aria-label-aclform" aria-hidden="true" role="dialog"> <h3 id="aria-label-aclform" class="voice"><roundcube:label name="acl.arialabelaclform" /></h3> <fieldset class="thinbordered"><legend><roundcube:label name="acl.identifier" /></legend> <roundcube:object name="acluser" id="acluser" size="35" class="proplist" /> -- Gitblit v1.9.1