Skip to content

Commit 6160a45

Browse files
author
Barry de Graaff
committed
fix ui resize issue
1 parent fb1df42 commit 6160a45

File tree

4 files changed

+51
-5
lines changed

4 files changed

+51
-5
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Zimbra User Alias
2-
With this extension you can allow a user, users in a cos or users in a domain to create Alias on their own account. For Zimbra 8.7.11 and above only. When adding/removing Alias, the Zimlet will also add/remove personas so the user is good to go!
2+
With this extension you can allow a user, users in a cos or users in a domain to create Alias on their own account. For Zimbra 8.8.11 and above only. When adding/removing Alias, the Zimlet will also add/remove personas so the user is good to go!
3+
4+
If you find Zimbra User Alias useful and want to support its continued development, you can make donations via:
5+
- PayPal: info@barrydegraaff.tk
6+
- Bank transfer: IBAN NL55ABNA0623226413 ; BIC ABNANL2A
7+
38

49
![Screenshot](https://raw.githubusercontent.com/Zimbra-Community/user-alias/master/documentation/screenshot.png)
510

@@ -29,3 +34,23 @@ So for the user admin@zimbradev.barrydegraaff.tk who is in the `defaul`t cos, th
2934
allowUser and allowUserDomains: allows admin@zimbradev.barrydegraaff.tk to create/remove alias in allowdomainX.com,allowdomainP.com. admin@zimbradev.barrydegraaff.tk can also create/remove alias in example.com,barrydegraaff.tk because of the domain (zimbradev.barrydegraaff.tk) and also create/remove alias in allowdomainX.com,allowdomainY.com,example.com,barrydegraaff.tk because the admin@zimbradev.barrydegraaff.tk is in default cos.
3035

3136
You can define a maximum number of Alias for each domain, aliasLimit applies to all users that do not have a per-domain Limit.
37+
38+
39+
========================================================================
40+
41+
### License
42+
43+
Copyright (C) 2018-2019 Barry de Graaff A [Zeta Alliance](https://zetalliance.org/) Zimlet
44+
45+
This program is free software: you can redistribute it and/or modify
46+
it under the terms of the GNU General Public License as published by
47+
the Free Software Foundation, either version 3 of the License, or
48+
(at your option) any later version.
49+
50+
This program is distributed in the hope that it will be useful,
51+
but WITHOUT ANY WARRANTY; without even the implied warranty of
52+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53+
GNU General Public License for more details.
54+
55+
You should have received a copy of the GNU General Public License
56+
along with this program. If not, see http://www.gnu.org/licenses/.

tk_barrydegraaff_useralias/tk_barrydegraaff_useralias.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (C) 2017-2018 Barry de Graaff
2+
Copyright (C) 2017-2019 Barry de Graaff
33
44
This program is free software: you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -77,7 +77,11 @@ UserAliasZimletPrefs = function(shell, section, controller, handler) {
7777
document.getElementById('zb__PREF__SAVE').style='display:block';
7878
return;
7979
};
80-
this.resetSize = function(){return;};
80+
this.resetSize = function()
81+
{
82+
var zimletInstance = appCtxt._zimletMgr.getZimletByName('tk_barrydegraaff_useralias').handlerObject;
83+
zimletInstance.resize();
84+
};
8185
this.setVisible = function(){return;};
8286

8387
this.showMe = function()
@@ -93,6 +97,23 @@ UserAliasZimletPrefs = function(shell, section, controller, handler) {
9397
ZmPreferencesPage.call(this, shell, section, controller);
9498
};
9599

100+
UserAliasZimlet.prototype.resize = function()
101+
{
102+
try {
103+
if(appCtxt.getCurrentView().getActiveView()._section.id == 'USERALIAS_PREFERENCES')
104+
{
105+
document.title = "Zimbra: " + ZmMsg.preferences +": Alias";
106+
var zimletInstance = appCtxt._zimletMgr.getZimletByName('tk_barrydegraaff_useralias').handlerObject;
107+
zimletInstance.appHeight = (Math.max( document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight )-110 );
108+
document.getElementById('tk_barrydegraaff_useralias_prefscreen').style='display:block; overflow-y: auto !important; max-height:'+zimletInstance.appHeight+'px !important';
109+
}
110+
}
111+
catch(err)
112+
{
113+
}
114+
return;
115+
};
116+
96117
UserAliasZimlet.prototype.showMeImpl = function()
97118
{
98119
document.getElementById('zb__PREF__SAVE').style='display:none';

tk_barrydegraaff_useralias/tk_barrydegraaff_useralias.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<zimlet name="tk_barrydegraaff_useralias"
2-
version="0.0.1"
2+
version="0.0.2"
33
target="main compose-window view-window"
44
label="User Alias"
55
description="Allows end-user to create email alias.">

user-alias-installer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ You must set-up your permissions in /opt/zimbra/lib/ext/userAlias/config.propert
5151
5252
Please deploy the Zimlet yourself:
5353
cd /tmp
54-
wget --no-cache https://github.com/Zimbra-Community/user-alias/releases/download/0.0.1/tk_barrydegraaff_useralias.zip -O /tmp/tk_barrydegraaff_useralias.zip
54+
wget --no-cache https://github.com/Zimbra-Community/user-alias/releases/download/0.0.2/tk_barrydegraaff_useralias.zip -O /tmp/tk_barrydegraaff_useralias.zip
5555
su zimbra
5656
5757
cd /tmp

0 commit comments

Comments
 (0)