Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2682945
D25015.1734675458.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25015.1734675458.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D25015: Show confirmation dialog when closing a modal if form contents have been changed
Attached
Detach File
Event Timeline
Log In to Comment