Changeset 515 for Dev/trunk/src/client/qed-client/app/Router.js
- Timestamp:
- 03/13/14 22:42:39 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/app/Router.js
r491 r515 5 5 "dojo/_base/event", 6 6 "dojo/_base/lang", 7 "dojo/_base/window",8 7 "dojo/hash", 9 8 "dojo/on", 10 9 "dojo/topic", 11 10 "require" 12 ], function(Content, Path, declare, event, lang, window,hash, on, topic, require) {11 ], function(Content, Path, declare, event, lang, hash, on, topic, require) { 13 12 14 13 var Router = declare(null,{ … … 29 28 } 30 29 this._handleHashChange(hash()); 31 window.onbeforeunload = function() { 32 return Content.isDirty() && "Unsaved changes, leave anyway?"; 30 window.onbeforeunload = function(evt) { 31 var msg = Content.isDirty() ? 32 "Unsaved changes, leave anyway?" : 33 null; 34 evt.returnValue = msg; 35 return msg; 33 36 }; 34 37 topic.subscribe("/dojo/hashchange",
Note: See TracChangeset
for help on using the changeset viewer.