Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 084b958

Browse files
author
Barry de Graaff
committed
1 parent 5b80f6d commit 084b958

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

tk_barrydegraaff_zimbra_openpgp/tk_barrydegraaff_zimbra_openpgp.js

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
This file is part of the Zimbra OpenPGP Zimlet project.
3-
Copyright (C) 2014-2016 Barry de Graaff
3+
Copyright (C) 2014-2017 Barry de Graaff
44
55
Bugs and feedback: https://github.com/Zimbra-Community/pgp-zimlet/issues
66
@@ -871,6 +871,37 @@ OpenPGPZimlet.prototype.status = function(text, type) {
871871
appCtxt.getAppController().setStatusMsg(text, type, null, transitions);
872872
};
873873

874+
/* Work-around 8.7.7 regression
875+
* Bug: https://bugzilla.zimbra.com/show_bug.cgi?id=107013
876+
* Fix: https://github.com/Zimbra/zm-ajax/pull/5
877+
*/
878+
DwtControl.prototype._position =
879+
function(loc) {
880+
this._checkState();
881+
var sizeShell = this.shell.getSize();
882+
var sizeThis = this.getSize();
883+
var x, y;
884+
if(sizeThis)
885+
{
886+
if (!loc) {
887+
// if no location, go for the middle
888+
x = Math.round((sizeShell.x - sizeThis.x) / 2);
889+
y = Math.round((sizeShell.y - sizeThis.y) / 2);
890+
} else {
891+
x = loc.x;
892+
y = loc.y;
893+
}
894+
// try to stay within shell boundaries
895+
if ((x + sizeThis.x) > sizeShell.x) {
896+
x = sizeShell.x - sizeThis.x;
897+
}
898+
if ((y + sizeThis.y) > sizeShell.y) {
899+
y = sizeShell.y - sizeThis.y;
900+
}
901+
this.setLocation(x, y);
902+
}
903+
};
904+
874905
/** This method displays dialogs to the end user.
875906
* @param {number} id - the dialog id to display
876907
* @param {string} title - initial title for the dialog

tk_barrydegraaff_zimbra_openpgp/tk_barrydegraaff_zimbra_openpgp.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<zimlet name="tk_barrydegraaff_zimbra_openpgp" version="2.7.0" label="OpenPGP" description="Encrypt/Decrypt messages with OpenPGP">
1+
<zimlet name="tk_barrydegraaff_zimbra_openpgp" version="2.7.1" label="OpenPGP" description="Encrypt/Decrypt messages with OpenPGP">
22
<summary>
33
Zimbra OpenPGP Zimlet
44

55
https://github.com/Zimbra-Community/pgp-zimlet
66
https://www.indiegogo.com/projects/zimbra-openpgp-zimlet
77

8-
Copyright (C) 2014-2016 Barry de Graaff
8+
Copyright (C) 2014-2017 Barry de Graaff
99

1010
Bugs and feedback: https://github.com/Zimbra-Community/pgp-zimlet/issues
1111

0 commit comments

Comments
 (0)