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

Commit

Permalink
Work-around 8.7.7 regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry de Graaff committed Apr 14, 2017
1 parent 5b80f6d commit 084b958
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
This file is part of the Zimbra OpenPGP Zimlet project.
Copyright (C) 2014-2016 Barry de Graaff
Copyright (C) 2014-2017 Barry de Graaff
Bugs and feedback: https://github.com/Zimbra-Community/pgp-zimlet/issues
Expand Down Expand Up @@ -871,6 +871,37 @@ OpenPGPZimlet.prototype.status = function(text, type) {
appCtxt.getAppController().setStatusMsg(text, type, null, transitions);
};

/* Work-around 8.7.7 regression
* Bug: https://bugzilla.zimbra.com/show_bug.cgi?id=107013
* Fix: https://github.com/Zimbra/zm-ajax/pull/5
*/
DwtControl.prototype._position =
function(loc) {
this._checkState();
var sizeShell = this.shell.getSize();
var sizeThis = this.getSize();
var x, y;
if(sizeThis)
{
if (!loc) {
// if no location, go for the middle
x = Math.round((sizeShell.x - sizeThis.x) / 2);
y = Math.round((sizeShell.y - sizeThis.y) / 2);
} else {
x = loc.x;
y = loc.y;
}
// try to stay within shell boundaries
if ((x + sizeThis.x) > sizeShell.x) {
x = sizeShell.x - sizeThis.x;
}
if ((y + sizeThis.y) > sizeShell.y) {
y = sizeShell.y - sizeThis.y;
}
this.setLocation(x, y);
}
};

/** This method displays dialogs to the end user.
* @param {number} id - the dialog id to display
* @param {string} title - initial title for the dialog
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<zimlet name="tk_barrydegraaff_zimbra_openpgp" version="2.7.0" label="OpenPGP" description="Encrypt/Decrypt messages with OpenPGP">
<zimlet name="tk_barrydegraaff_zimbra_openpgp" version="2.7.1" label="OpenPGP" description="Encrypt/Decrypt messages with OpenPGP">
<summary>
Zimbra OpenPGP Zimlet

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

Copyright (C) 2014-2016 Barry de Graaff
Copyright (C) 2014-2017 Barry de Graaff

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

Expand Down

0 comments on commit 084b958

Please sign in to comment.