From c629361d7182d5f4727caeab7c2b0822f33187c7 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 11 Jun 2012 15:43:31 -0700 Subject: 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. --- js/ninja.reel/ninja.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/ninja.reel') 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, { this.setupGlobalHelpers(); window.addEventListener("resize", this, false); + //Prompting the user to make sure data was saved before closing Ninja + window.onbeforeunload = function () { + return 'Are you sure you want to close Ninja? Any unsaved data will be lost.'; + }; this.eventManager.addEventListener("selectTool", this, false); this.eventManager.addEventListener("selectSubTool", this, false); -- cgit v1.2.3