partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 16c0ffc695ca80639bb6598146f2d705bfcc5ebe
parent 7ecb1eba82a86f8f6c03bac70ab87ebd31a47a55
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri,  4 Sep 2015 16:46:55 +0200

Allow getUrl() to return false to indicate a failure. If getUrl() returns false, no window is being opened.

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/UrlTextField.js | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/UrlTextField.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/UrlTextField.js @@ -12,7 +12,9 @@ Ext.define("PartKeepr.form.field.Text", { url: { cls: 'x-form-trigger-link', handler: function () { - window.open(this.getUrl(), '_blank'); + if (this.getUrl() !== false) { + window.open(this.getUrl(), '_blank'); + } }, scope: 'this' }