aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/document-controller.js11
-rw-r--r--js/controllers/presets-controller.js9
-rwxr-xr-xjs/data/menu-data.js14
-rw-r--r--js/data/panels-data.js4
-rwxr-xr-xjs/document/text-document.js4
-rwxr-xr-xjs/io/system/coreioapi.js4
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.html10
-rwxr-xr-xjs/io/ui/file-picker/file-input-field.reel/file-input-field.js48
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.html9
-rwxr-xr-xjs/io/ui/new-file-dialog/new-file-location.reel/new-file-location.js39
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js60
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.html9
-rw-r--r--js/io/ui/save-as-dialog.reel/save-as-dialog.js96
-rwxr-xr-xjs/panels/Components/ComponentsPanel.js47
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.css (renamed from js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.css)0
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.html (renamed from js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.html)6
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js (renamed from js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js)18
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js29
18 files changed, 214 insertions, 203 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index a308f191..ddaeb061 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -32,9 +32,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
32 _iframeHolder: { value: null, enumerable: false }, 32 _iframeHolder: { value: null, enumerable: false },
33 _textHolder: { value: null, enumerable: false }, 33 _textHolder: { value: null, enumerable: false },
34 _codeMirrorCounter: {value: 1, enumerable: false}, 34 _codeMirrorCounter: {value: 1, enumerable: false},
35
36 canSave:{value: false},//for Save menu state update
37 canSaveAll:{value: false},//for Save All menu state update
38 35
39 activeDocument: { 36 activeDocument: {
40 get: function() { 37 get: function() {
@@ -50,12 +47,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
50 if(!!this._activeDocument.editor){ 47 if(!!this._activeDocument.editor){
51 this._activeDocument.editor.focus(); 48 this._activeDocument.editor.focus();
52 } 49 }
53
54 this.canSave = doc.needsSave;
55 this.canSaveAll = doc.needsSave;
56 }else{
57 this.canSave = false;
58 this.canSaveAll = false;
59 } 50 }
60 } 51 }
61 }, 52 },
@@ -80,7 +71,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
80 handleAddComponentFirstDraw: { 71 handleAddComponentFirstDraw: {
81 value: function (e) { 72 value: function (e) {
82 //TODO: Add logic to reparse the document for dynamically added styles 73 //TODO: Add logic to reparse the document for dynamically added styles
83 console.log(e); 74 //console.log(e);
84 } 75 }
85 }, 76 },
86 77
diff --git a/js/controllers/presets-controller.js b/js/controllers/presets-controller.js
index 975f9f7a..4c177189 100644
--- a/js/controllers/presets-controller.js
+++ b/js/controllers/presets-controller.js
@@ -72,20 +72,19 @@ exports.PresetsController = Montage.create(Component, {
72 selectorBase = stylesController.generateClassName(selectorBase); 72 selectorBase = stylesController.generateClassName(selectorBase);
73 73
74 selection.forEach(function(element) { 74 selection.forEach(function(element) {
75 var el = element._element, 75 var animationName;
76 animationName;
77 76
78 if(useTransition) { 77 if(useTransition) {
79 this.addTransition(el); 78 this.addTransition(element);
80 } 79 }
81 80
82 ///// TODO: remove when we find out what to do with competing animations 81 ///// TODO: remove when we find out what to do with competing animations
83 animationName = stylesController.getElementStyle(el, '-webkit-animation-name'); 82 animationName = stylesController.getElementStyle(element, '-webkit-animation-name');
84 if(animationName) { 83 if(animationName) {
85 animationNames.push(animationName); 84 animationNames.push(animationName);
86 } 85 }
87 86
88 el.classList.add(selectorBase); 87 element.classList.add(selectorBase);
89 88
90 }, this); 89 }, this);
91 90
diff --git a/js/data/menu-data.js b/js/data/menu-data.js
index 3333d209..a1fe2703 100755
--- a/js/data/menu-data.js
+++ b/js/data/menu-data.js
@@ -70,8 +70,12 @@ exports.MenuData = Montage.create( Montage, {
70 "enabled": { 70 "enabled": {
71 "value": false, 71 "value": false,
72 "boundObj": "documentController", 72 "boundObj": "documentController",
73 "boundProperty": "canSave", 73 "boundProperty": "activeDocument",
74 "oneway": true 74 "oneway": true,
75 "boundValueMutator": function(activeDocument){
76 if(activeDocument !== null){return true;}
77 else{return false;}
78 }
75 }, 79 },
76 "action": "executeSave" 80 "action": "executeSave"
77 }, 81 },
@@ -96,10 +100,10 @@ exports.MenuData = Montage.create( Montage, {
96 "enabled": { 100 "enabled": {
97 "value": false, 101 "value": false,
98 "boundObj": "documentController", 102 "boundObj": "documentController",
99 "boundProperty": "canSaveAll", 103 "boundProperty": "activeDocument",
100 "oneway": true, 104 "oneway": true,
101 "boundValueMutator": function(canSaveAll){ 105 "boundValueMutator": function(activeDocument){
102 if(canSaveAll === true){return true;} 106 if(activeDocument !== null){return true;}
103 else{return false;} 107 else{return false;}
104 } 108 }
105 }, 109 },
diff --git a/js/data/panels-data.js b/js/data/panels-data.js
index 2422f5e7..7a2d817a 100644
--- a/js/data/panels-data.js
+++ b/js/data/panels-data.js
@@ -55,8 +55,8 @@ exports.PanelsData = Montage.create(Montage, {
55 scrollable: true, 55 scrollable: true,
56 collapsed: true, 56 collapsed: true,
57 open: true, 57 open: true,
58 modulePath: "js/panels/Components/ComponentsPanelBase.reel", 58 modulePath: "js/panels/components-panel.reel",
59 moduleName: "ComponentsPanelBase" 59 moduleName: "ComponentsPanel"
60 }, 60 },
61// { 61// {
62// name: "Project/Assets", 62// name: "Project/Assets",
diff --git a/js/document/text-document.js b/js/document/text-document.js
index 54a53999..2574b67c 100755
--- a/js/document/text-document.js
+++ b/js/document/text-document.js
@@ -164,11 +164,7 @@ var TextDocument = exports.TextDocument = Montage.create(Component, {
164 needsSave: { 164 needsSave: {
165 get: function() { return this._needsSave; }, 165 get: function() { return this._needsSave; },
166 set: function(value) { 166 set: function(value) {
167 var i=0, canSaveAll=false;
168 this._needsSave = value; 167 this._needsSave = value;
169
170 this.application.ninja.documentController.canSave = value;//for save menu state update
171 this.application.ninja.documentController.canSaveAll = value;//for save menu state update..currently save all is tried to the current document only
172 } 168 }
173 }, 169 },
174 170
diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js
index b0ffe2d8..a06f45c6 100755
--- a/js/io/system/coreioapi.js
+++ b/js/io/system/coreioapi.js
@@ -1085,14 +1085,14 @@ exports.CoreIoApi = Montage.create(Component, {
1085 isValidUri:{ 1085 isValidUri:{
1086 value: function(uri){ 1086 value: function(uri){
1087 var isWindowsUri=false, isUnixUri=false,status=false; 1087 var isWindowsUri=false, isUnixUri=false,status=false;
1088 if(uri !== ""){ 1088 if((uri !== null) && (uri !== "")){
1089 uri = uri.replace(/^\s+|\s+$/g,""); // strip any leading or trailing spaces 1089 uri = uri.replace(/^\s+|\s+$/g,""); // strip any leading or trailing spaces
1090 1090
1091 //for local machine folder uri 1091 //for local machine folder uri
1092 isWindowsUri = /^([a-zA-Z]:)([\\/][^<>:"/\\|?*]+)*[\\/]?$/gi.test(uri); 1092 isWindowsUri = /^([a-zA-Z]:)([\\/][^<>:"/\\|?*]+)*[\\/]?$/gi.test(uri);
1093 isUnixUri = /^(\/)?(\/(?![.])[^/]*)*\/?$/gi.test(uri);//folders beginning with . are hidden on Mac / Unix 1093 isUnixUri = /^(\/)?(\/(?![.])[^/]*)*\/?$/gi.test(uri);//folders beginning with . are hidden on Mac / Unix
1094 status = isWindowsUri || isUnixUri; 1094 status = isWindowsUri || isUnixUri;
1095 if(isWindowsUri && isUnixUri){status = false;} 1095 if((uri === "") || (isWindowsUri && isUnixUri)){status = false;}
1096 } 1096 }
1097 return status; 1097 return status;
1098 } 1098 }
diff --git a/js/io/ui/file-picker/file-input-field.reel/file-input-field.html b/js/io/ui/file-picker/file-input-field.reel/file-input-field.html
index 2fcaa075..00df1c11 100755
--- a/js/io/ui/file-picker/file-input-field.reel/file-input-field.html
+++ b/js/io/ui/file-picker/file-input-field.reel/file-input-field.html
@@ -10,13 +10,21 @@
10 <link rel="stylesheet" type="text/css" href="file-input-field.css"> 10 <link rel="stylesheet" type="text/css" href="file-input-field.css">
11 <script type="text/montage-serialization"> 11 <script type="text/montage-serialization">
12 { 12 {
13
14 "newFileDirectory": {
15 "prototype": "montage/ui/textfield.reel",
16 "properties": {
17 "element": {"#": "newFileDirectory"}
18 }
19 },
20
13 "owner":{ 21 "owner":{
14 "module": "js/io/ui/file-picker/file-input-field.reel", 22 "module": "js/io/ui/file-picker/file-input-field.reel",
15 "name": "FileInputField", 23 "name": "FileInputField",
16 "properties": { 24 "properties": {
17 "element": {"#": "fileInputField"}, 25 "element": {"#": "fileInputField"},
18 "findDirectory": {"#": "findDirectory"}, 26 "findDirectory": {"#": "findDirectory"},
19 "newFileDirectory": {"#": "newFileDirectory"}