aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.css9
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.html4
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js10
-rwxr-xr-xjs/io/document/document-controller.js3
-rwxr-xr-xjs/io/system/coreioapi.js29
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css (renamed from js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.css)0
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html (renamed from js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.html)2
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js (renamed from js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js)2
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css (renamed from js/io/workflow/newFileDialog/new-file-options-navigator.reel/new-file-options-navigator.css)0
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html (renamed from js/io/workflow/newFileDialog/new-file-options-navigator.reel/new-file-options-navigator.html)4
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js (renamed from js/io/workflow/newFileDialog/new-file-options-navigator.reel/new-file-options-navigator.js)10
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-controller.js (renamed from js/io/workflow/newFileDialog/new-file-workflow-controller.js)6
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-workflow-model.js (renamed from js/io/workflow/newFileDialog/new-file-workflow-model.js)0
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.css (renamed from js/io/workflow/save-as-dialog.reel/save-as-dialog.css)0
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.html (renamed from js/io/workflow/save-as-dialog.reel/save-as-dialog.html)2
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js (renamed from js/io/workflow/save-as-dialog.reel/save-as-dialog.js)8
-rw-r--r--js/io/utils/file-utils.js76
-rwxr-xr-xjs/io/workflow/new-project-manager.js136
-rwxr-xr-xjs/io/workflow/newProjectNavigator.js75
-rwxr-xr-xjs/io/workflow/newProjectNavigator.reel/newProjectNavigator.css32
-rwxr-xr-xjs/io/workflow/newProjectNavigator.reel/newProjectNavigator.html32
-rwxr-xr-xjs/lib/NJUtils.js37
-rwxr-xr-xjs/ninja.reel/ninja.html2
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js36
24 files changed, 137 insertions, 378 deletions
diff --git a/js/components/layout/document-bar.reel/document-bar.css b/js/components/layout/document-bar.reel/document-bar.css
index 588b8952..2a147964 100755
--- a/js/components/layout/document-bar.reel/document-bar.css
+++ b/js/components/layout/document-bar.reel/document-bar.css
@@ -33,7 +33,7 @@
33 33
34.documentBar span{ 34.documentBar span{
35 text-decoration: none; 35 text-decoration: none;
36 cursor: default; 36 cursor: pointer;
37 color: #3a3a3a; 37 color: #3a3a3a;
38} 38}
39 39
@@ -41,3 +41,10 @@
41 color: white; 41 color: white;
42} 42}
43 43
44.documentBar .enable{
45 color: #d7d7d7;
46}
47
48.documentBar .disable{
49 color: #3a3a3a;
50} \ No newline at end of file
diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html
index d58f0d14..48f1423c 100755
--- a/js/components/layout/document-bar.reel/document-bar.html
+++ b/js/components/layout/document-bar.reel/document-bar.html
@@ -51,8 +51,8 @@
51<body> 51<body>
52 <div id="documentBar"> 52 <div id="documentBar">
53 <input class="zoomHotText label" id="zoomControlHT"/> 53 <input class="zoomHotText label" id="zoomControlHT"/>
54 <span class="design-view" id="design">Design View</span> 54 <span class="design-view disable" id="design">Design View</span>
55 <span class="code-view" id="code">Code View</span> 55 <span class="code-view disable" id="code">Code View</span>
56 </div> 56 </div>
57</body> 57</body>
58</html> \ No newline at end of file 58</html> \ No newline at end of file
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js
index 3eece273..44f65804 100755
--- a/js/components/layout/document-bar.reel/document-bar.js
+++ b/js/components/layout/document-bar.reel/document-bar.js
@@ -86,7 +86,7 @@ exports.DocumentBar = Montage.create(Component, {
86 value: function() { 86 value: function() {
87 this.designView.addEventListener("click", this, false); 87 this.designView.addEventListener("click", this, false);
88 this.codeView.addEventListener("click", this, false); 88 this.codeView.addEventListener("click", this, false);
89 89
90 } 90 }
91 }, 91 },
92 92
@@ -95,7 +95,13 @@ exports.DocumentBar = Montage.create(Component, {
95 if(event._event.target.id === this.currentView) return; 95 if(event._event.target.id === this.currentView) return;
96 96
97 this.currentView = event._event.target.id; 97 this.currentView = event._event.target.id;
98 documentManagerModule.DocumentManager.switchViews(); 98 this.application.ninja.documentController.switchViews(event._event.target.id);//switch between design view
99 }
100 },
101
102 handleOnDocumentChanged:{
103 value:function(event){
104
99 } 105 }
100 } 106 }
101}); 107});
diff --git a/js/io/document/document-controller.js b/js/io/document/document-controller.js
index 9be40ccc..8ce43dcc 100755
--- a/js/io/document/document-controller.js
+++ b/js/io/document/document-controller.js
@@ -244,6 +244,9 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
244 244
245 switchViews: { 245 switchViews: {
246 value: function() { 246 value: function() {
247
248 //save file if dirty
249
247 this.application.ninja.stage.saveScroll(); 250 this.application.ninja.stage.saveScroll();
248 this._hideCurrentDocument(); 251 this._hideCurrentDocument();
249 252
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index 717606b5..7839acee 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -983,8 +983,35 @@ exports.CoreIoApi = Montage.create(Component, {
983 // 983 //
984 return retValue; 984 return retValue;
985 } 985 }
986 } 986 },
987 //////////////////////////////////////////////////////////////////// 987 ////////////////////////////////////////////////////////////////////
988 /***
989 * check if the file exists
990 */
991 checkFileExists:{
992 value: function(fileUri, folderUri, fileType){
993 var uri = "", response=null, status=true;
994
995 //prepare absolute uri
996 if(/[^/\\]$/g.test(folderUri)){
997 folderUri = folderUri + "/";
998 }
999
1000 //todo:add file extension check if fileType present
1001
1002 uri = ""+folderUri+fileUri;
1003
1004 response = this.fileExists({"uri":uri});
1005 if(!!response && response.success && (response.status === 204)){
1006 status = true;
1007 }else if(!!response && response.success && (response.status === 404)){
1008 status = false;
1009 }else{
1010 status = false;
1011 }
1012 return status;
1013 }
1014 }
988 //////////////////////////////////////////////////////////////////// 1015 ////////////////////////////////////////////////////////////////////
989}); 1016});
990//////////////////////////////////////////////////////////////////////// 1017////////////////////////////////////////////////////////////////////////
diff --git a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.css b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css
index 7f11c225..7f11c225 100755
--- a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.css
+++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.css
diff --git a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.html b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html
index 7c271511..d7fbc235 100755
--- a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.html
+++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html
@@ -59,7 +59,7 @@
59 }, 59 },
60 60
61 "owner":{ 61 "owner":{
62 "module": "js/io/workflow/newFileDialog/new-file-location.reel", 62 "module": "js/io/ui/new-file-dialog/new-file-location.reel",
63 "name": "NewFileLocation", 63 "name": "NewFileLocation",
64 "properties": { 64 "properties": {
65 "element": {"#": "newfileLocation"}, 65 "element": {"#": "newfileLocation"},
diff --git a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
index 805b44a4..7da13dfc 100755
--- a/js/io/workflow/newFileDialog/new-file-location.reel/new-file-location.js
+++ b/js/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js
@@ -6,7 +6,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
6 6
7var Montage = require("montage/core/core").Montage; 7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component; 8var Component = require("montage/ui/component").Component;
9var newFileWorkflowControllerModule = require("js/io/workflow/newFileDialog/new-file-workflow-controller"); 9var newFileWorkflowControllerModule = require("js/io/ui/new-file-dialog/new-file-workflow-controller");
10 10
11var NewFileLocation = exports.NewFileLocation = Montage.create(Component, { 11var NewFileLocation = exports.NewFileLocation = Montage.create(Component, {
12 12
diff --git a/js/io/workflow/newFileDialog/new-file-options-navigator.reel/new-file-options-navigator.css b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css
index 7ef6d2ce..7ef6d2ce 100755
--- a/js/io/workflow/newFileDialog/new-file-options-navigator.reel/new-file-options-navigator.css
+++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.css
diff --git a/js/io/workflow/newFileDialog/new-file-options-navigator.reel/new-file-options-navigator.html b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html
index dc090b99..eb4a8045 100755
--- a/js/io/workflow/newFileDialog/new-file-options-navigator.reel/new-file-options-navigator.html
+++ b/js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.html
@@ -41,7 +41,7 @@
41 }, 41 },
42 42
43 "newFileLocation":{ 43 "newFileLocation":{
44 "module": "js/io/workflow/newFileDialog/new-file-location.reel", 44 "module": "js/io/ui/new-file-dialog/new-file-location.reel",
45 "name": "NewFileLocation", 45 "name": "NewFileLocation",
46 "properties": { 46 "properties": {
47 "element": {"#": "right-bottom"} 47 "element": {"#": "right-bottom"}
@@ -49,7 +49,7 @@