aboutsummaryrefslogtreecommitdiff
path: root/js/models
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-19 01:03:59 -0700
committerArmen Kesablyan2012-06-19 01:03:59 -0700
commit2e13a73e4ee980a6f73f6ff48b2a195eb209a7db (patch)
treed352f5e769eae0e1b7b76ccbeafa9b174b1a9918 /js/models
parent244e608645778746d1a3b5aa0d4c0868f7c5c272 (diff)
parentc59eb371559a3061ce53223e249ca97daace5968 (diff)
downloadninja-2e13a73e4ee980a6f73f6ff48b2a195eb209a7db.tar.gz
Merge branch 'refs/heads/master' into binding
Conflicts: js/components/layout/tools-list.reel/tools-list.html js/components/layout/tools-properties.reel/tools-properties.html js/document/document-html.js js/document/templates/app/main.js js/panels/Panel.reel/Panel.js node_modules/montage/ui/native-control.js Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/models')
-rwxr-xr-xjs/models/color-model.js14
-rwxr-xr-xjs/models/element-model.js4
2 files changed, 11 insertions, 7 deletions
diff --git a/js/models/color-model.js b/js/models/color-model.js
index 764feeb5..a2eab2e1 100755
--- a/js/models/color-model.js
+++ b/js/models/color-model.js
@@ -231,10 +231,10 @@ exports.ColorModel = Montage.create(Component, {
231 // 231 //
232 applyNoColor: { 232 applyNoColor: {
233 enumerable: true, 233 enumerable: true,
234 value: function () { 234 value: function (code) {
235 // 235 //
236 var nocolor = {}; 236 var nocolor = {};
237 nocolor.wasSetByCode = true; 237 nocolor.wasSetByCode = code;
238 nocolor.type = 'change'; 238 nocolor.type = 'change';
239 this.updateColorSelected('nocolor', nocolor); 239 this.updateColorSelected('nocolor', nocolor);
240 } 240 }
@@ -310,29 +310,29 @@ exports.ColorModel = Montage.create(Component, {
310 case 'hex': 310 case 'hex':
311 switch (color.length) { 311 switch (color.length) {
312 case 1: 312 case 1:
313 this.applyNoColor(); 313 this.applyNoColor(false);
314 return; 314 return;
315 break; 315 break;
316 case 2: 316 case 2:
317 this.applyNoColor(); 317 this.applyNoColor(false);
318 return; 318 return;
319 break; 319 break;
320 case 3: 320 case 3:
321 color = color[0]+color[0]+color[1]+color[1]+color[2]+color[2]; 321 color = color[0]+color[0]+color[1]+color[1]+color[2]+color[2];
322 break; 322 break;
323 case 4: 323 case 4:
324 this.applyNoColor(); 324 this.applyNoColor(false);
325 return; 325 return;
326 break; 326 break;
327 case 5: 327 case 5:
328 this.applyNoColor(); 328 this.applyNoColor(false);
329 return; 329 return;
330 break; 330 break;
331 case 6: 331 case 6:
332 //Nothing 332 //Nothing
333 break; 333 break;
334 default: 334 default:
335 this.applyNoColor(); 335 this.applyNoColor(false);
336 return; 336 return;
337 break; 337 break;
338 } 338 }
diff --git a/js/models/element-model.js b/js/models/element-model.js
index 76f15b21..e5a0f33a 100755
--- a/js/models/element-model.js
+++ b/js/models/element-model.js
@@ -91,6 +91,8 @@ var elementNameToController = function(name) {
91 return "block"; 91 return "block";
92 } else if(name === "img") { 92 } else if(name === "img") {
93 return "image"; 93 return "image";
94 } else if(name === "embed") {
95 return "image";
94 } else { 96 } else {
95 return name; 97 return name;
96 } 98 }
@@ -174,6 +176,8 @@ var elmo = exports.ElementModel = Montage.create(Montage, {
174 return "block"; 176 return "block";
175 } else if(name === "img") { 177 } else if(name === "img") {
176 return "image"; 178 return "image";
179 } else if(name === "embed") {
180 return "image";
177 } else { 181 } else {
178 return name; 182 return name;
179 } 183 }