diff options
author | Armen Kesablyan | 2012-06-11 11:17:41 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-11 11:17:41 -0700 |
commit | 278769df00ced8620fd73371e38fe2e43f07ca3b (patch) | |
tree | deb505c8a66b660eee1f17a2c6c4c575c7939f6f /js/stage/stage-view.reel/stage-view.js | |
parent | 555fd6efa605b937800b3979a4c68fa7eb8666ae (diff) | |
parent | 0f040acabfb7a4bf3138debec5aff869487ceb11 (diff) | |
download | ninja-278769df00ced8620fd73371e38fe2e43f07ca3b.tar.gz |
Merge branch 'refs/heads/master' into binding
Conflicts:
js/document/models/html.js
js/document/views/design.js
js/ninja.reel/ninja.js
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/stage/stage-view.reel/stage-view.js')
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js deleted file mode 100755 index 2c129ee2..00000000 --- a/js/stage/stage-view.reel/stage-view.js +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
7 | /** | ||
8 | @requires montage/core/core | ||
9 | @requires montage/ui/component | ||
10 | */ | ||
11 | var Montage = require("montage/core/core").Montage, | ||
12 | Component = require("montage/ui/component").Component; | ||
13 | |||
14 | exports.StageView = Montage.create(Component, { | ||
15 | _documents: { | ||
16 | value : [] | ||
17 | }, | ||
18 | |||
19 | docs: { | ||
20 | get: function() { | ||
21 | return this._documents; | ||
22 | }, | ||
23 | set: function(value) { | ||
24 | //console.log(value); | ||
25 | } | ||
26 | }, | ||
27 | |||
28 | didDraw:{ | ||
29 | value: function() { | ||
30 | if(!this.application.ninja.documentController._textHolder) this.application.ninja.documentController._textHolder = this.element; | ||
31 | } | ||
32 | }, | ||
33 | |||
34 | /** | ||
35 | * Public method | ||
36 | * Switches between documents. Document state data is saved and restored whereever applicable | ||
37 | */ | ||
38 | switchDocument:{ | ||
39 | value: function(doc){ | ||
40 | |||
41 | |||
42 | //focus editor | ||
43 | if(!!this.application.ninja.documentController.activeDocument && !!this.application.ninja.documentController.activeDocument.editor){ | ||
44 | this.application.ninja.documentController.activeDocument.editor.focus(); | ||
45 | |||
46 | this.showCodeViewBar(true); | ||
47 | this.application.ninja.codeEditorController.applySettings(); | ||
48 | this.collapseAllPanels(); | ||
49 | } | ||
50 | |||
51 | if(this.application.ninja.documentController.activeDocument.currentView === "design") { | ||
52 | this.application.ninja.stage._scrollFlag = true; // TODO HACK to prevent type error on Hide/Show Iframe | ||
53 | this.application.ninja.stage.stageDeps.reinitializeForSwitchDocument();//reinitialize draw-util, snapmanager and view-util | ||
54 | |||
55 | this.showCodeViewBar(false); | ||
56 | this.restoreAllPanels(); | ||
57 | } | ||
58 | |||
59 | NJevent("switchDocument"); | ||
60 | } | ||
61 | } | ||
62 | }); \ No newline at end of file | ||