aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-11 15:43:31 -0700
committerJose Antonio Marquez2012-06-11 15:43:31 -0700
commitc629361d7182d5f4727caeab7c2b0822f33187c7 (patch)
treecf7d6b2b59afdac17f473c15e5f347e9e29351e6 /js/ninja.reel
parent756cbfad2b98b300af8db3793aa21718b88dd950 (diff)
downloadninja-c629361d7182d5f4727caeab7c2b0822f33187c7.tar.gz
Adding close Ninja prompt
Adding a prompt to the user to ensure all data is saved prior to closing the application. This will not let me check for documents to need saving, so it must be general and will appear at all times.
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-xjs/ninja.reel/ninja.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 38f5efcf..f0f8b46d 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -184,6 +184,10 @@ exports.Ninja = Montage.create(Component, {
184 this.setupGlobalHelpers(); 184 this.setupGlobalHelpers();
185 185
186 window.addEventListener("resize", this, false); 186 window.addEventListener("resize", this, false);
187 //Prompting the user to make sure data was saved before closing Ninja
188 window.onbeforeunload = function () {
189 return 'Are you sure you want to close Ninja? Any unsaved data will be lost.';
190 };
187 191
188 this.eventManager.addEventListener("selectTool", this, false); 192 this.eventManager.addEventListener("selectTool", this, false);
189 this.eventManager.addEventListener("selectSubTool", this, false); 193 this.eventManager.addEventListener("selectSubTool", this, false);