diff options
author | Jose Antonio Marquez | 2012-06-04 15:34:57 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-04 15:34:57 -0700 |
commit | 1b8586c07951accbc3c0f3951966e4e258b0c5d9 (patch) | |
tree | 9a3e9d76bf03f0cf62532c80a4713a8a242955ca /js/ninja.reel/ninja.js | |
parent | 1fa1faf9119e4dd048bd52fd44ab754b6942c319 (diff) | |
download | ninja-1b8586c07951accbc3c0f3951966e4e258b0c5d9.tar.gz |
Adding saving blocking screen
This is for chrome preview, also fixed other preview bug with plain files not opening in preview.
Diffstat (limited to 'js/ninja.reel/ninja.js')
-rwxr-xr-x | js/ninja.reel/ninja.js | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index a12270a0..38f5efcf 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -4,10 +4,11 @@ | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | Component = require("montage/ui/component").Component, | 8 | Component = require("montage/ui/component").Component, |
9 | UndoManager = require("montage/core/undo-manager").UndoManager, | 9 | UndoManager = require("montage/core/undo-manager").UndoManager, |
10 | AppData = require("js/data/appdata").AppData; | 10 | AppData = require("js/data/appdata").AppData, |
11 | Popup = require("js/components/popup.reel").Popup; | ||
11 | 12 | ||
12 | var matrix = require("js/lib/math/matrix"); | 13 | var matrix = require("js/lib/math/matrix"); |
13 | var NjUtils = require("js/lib/NJUtils").NJUtils; | 14 | var NjUtils = require("js/lib/NJUtils").NJUtils; |
@@ -195,14 +196,44 @@ exports.Ninja = Montage.create(Component, { | |||
195 | 196 | ||
196 | 197 | ||
197 | //////////////////////////////////////////////////////////////////// | 198 | //////////////////////////////////////////////////////////////////// |
199 | //////////////////////////////////////////////////////////////////// | ||
198 | //TODO: Expand method to allow other browsers for preview | 200 | //TODO: Expand method to allow other browsers for preview |
199 | executeChromePreview: { | 201 | executeChromePreview: { |
200 | value: function () { | 202 | value: function () { |
201 | this.currentDocument.model.browserPreview('chrome'); | 203 | //TODO: Make into proper component |
204 | this.saveOperationScreen = {}; | ||
205 | this._saveOperationPopup = {}; | ||
206 | //Show | ||
207 | this.saveOperationScreen.show = function (ctxt) { | ||
208 | // | ||
209 | ctxt._saveOperationPopup.blackout = document.createElement('div'); | ||
210 | ctxt._saveOperationPopup.blackout.style.width = '100%'; | ||
211 | ctxt._saveOperationPopup.blackout.style.height = '100%'; | ||
212 | ctxt._saveOperationPopup.blackout.style.background = 'rgba(0,0,0,0.8)'; //'-webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,.65) 0%, rgba(0,0,0,0.8) 80%)'; | ||
213 | ctxt.application.ninja.popupManager.addPopup(ctxt._saveOperationPopup.blackout); | ||
214 | }; | ||
215 | //Hide | ||
216 | this.saveOperationScreen.hide = function (ctxt) { | ||
217 | ctxt.application.ninja.popupManager.removePopup(ctxt._saveOperationPopup.blackout); | ||
218 | }; | ||
219 | // | ||
220 | this.currentDocument.model.browserPreview('chrome', this.saveOperationScreen, this); | ||
202 | } | 221 | } |
203 | }, | 222 | }, |
204 | //////////////////////////////////////////////////////////////////// | 223 | //////////////////////////////////////////////////////////////////// |
205 | 224 | ||
225 | //TODO: Make into proper component | ||
226 | _saveOperationPopup: { | ||
227 | value: null | ||
228 | }, | ||
229 | //TODO: Make into proper component | ||
230 | saveOperationScreen: { | ||
231 | value: null | ||
232 | }, | ||
233 | |||
234 | //////////////////////////////////////////////////////////////////// | ||
235 | //////////////////////////////////////////////////////////////////// | ||
236 | |||
206 | 237 | ||
207 | handleResize: { | 238 | handleResize: { |
208 | value: function() { | 239 | value: function() { |