Page MenuHomePhorge

D25015.1734675458.diff
No OneTemporary

D25015.1734675458.diff

diff --git a/webroot/rsrc/externals/javelin/lib/Workflow.js b/webroot/rsrc/externals/javelin/lib/Workflow.js
--- a/webroot/rsrc/externals/javelin/lib/Workflow.js
+++ b/webroot/rsrc/externals/javelin/lib/Workflow.js
@@ -403,6 +403,16 @@
JX.$E('Response to workflow request went unhandled.');
}
}
+
+ var form = JX.DOM.scry(this._root, 'form', 'jx-dialog');
+ if (form.length) {
+ JX.DOM.listen(form[0], 'keydown', null, function(e) {
+ if (e.getSpecialKey()) {
+ return;
+ }
+ JX.Stratcom.addSigil(form[0], 'dialog-keydown');
+ });
+ }
},
_push : function() {
if (!this._pushed) {
@@ -536,6 +546,15 @@
return;
}
+ var form = JX.DOM.scry(active._root, 'form', 'jx-dialog');
+ if (
+ form.length &&
+ JX.Stratcom.hasSigil(form[0], 'dialog-keydown') &&
+ !confirm('Form data may have changed. Are you sure you want to close this dialog?')
+ ) {
+ return;
+ }
+
JX.Workflow._pop();
e.prevent();
}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 06:17 (19 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016641
Default Alt Text
D25015.1734675458.diff (1 KB)

Event Timeline