diff options
55 files changed, 1053 insertions, 1093 deletions
diff --git a/js/components/controllers/tree-controller.js b/js/components/controllers/tree-controller.js index 03ef7b9e..1e9222fd 100644 --- a/js/components/controllers/tree-controller.js +++ b/js/components/controllers/tree-controller.js | |||
@@ -28,7 +28,7 @@ var TreeController = exports.TreeController = Montage.create(ObjectController, / | |||
28 | }, | 28 | }, |
29 | 29 | ||
30 | branchKey : { | 30 | branchKey : { |
31 | value: 'children' | 31 | value: null |
32 | }, | 32 | }, |
33 | 33 | ||
34 | _root : { | 34 | _root : { |
@@ -98,7 +98,8 @@ var TreeController = exports.TreeController = Montage.create(ObjectController, / | |||
98 | }, | 98 | }, |
99 | 99 | ||
100 | branchControllers: { | 100 | branchControllers: { |
101 | value: [] | 101 | value: [], |
102 | distinct: true | ||
102 | }, | 103 | }, |
103 | 104 | ||
104 | addBranchController : { | 105 | addBranchController : { |
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.css b/js/components/treeview/ninja-branch.reel/ninja-branch.css index d8c212e8..a3a9350e 100644 --- a/js/components/treeview/ninja-branch.reel/ninja-branch.css +++ b/js/components/treeview/ninja-branch.reel/ninja-branch.css | |||
@@ -26,7 +26,7 @@ | |||
26 | cursor: pointer; | 26 | cursor: pointer; |
27 | font-weight: bold; | 27 | font-weight: bold; |
28 | padding: 3px 0 4px; | 28 | padding: 3px 0 4px; |
29 | text-shadow: 1px 1px 0 #000; | 29 | text-shadow: 1px 1px 1px #000; |
30 | } | 30 | } |
31 | 31 | ||
32 | /* First Level */ | 32 | /* First Level */ |
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css index 085b11e0..fedc1d9d 100644 --- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css +++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css | |||
@@ -19,7 +19,6 @@ | |||
19 | /* Second level */ | 19 | /* Second level */ |
20 | .branch .branch .leaf-label { | 20 | .branch .branch .leaf-label { |
21 | background-position: 25px center; | 21 | background-position: 25px center; |
22 | box-shadow: 0 3px 4px -4px rgba(0,0,0,0.2); | ||
23 | color: #FFF; | 22 | color: #FFF; |
24 | padding-left: 45px; | 23 | padding-left: 45px; |
25 | } | 24 | } |
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js index c6416693..1bfe66a4 100644 --- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js +++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js | |||
@@ -63,7 +63,8 @@ exports.Leaf = Montage.create(TreeNode, { | |||
63 | 'dblclick' : 'handleDblclick', | 63 | 'dblclick' : 'handleDblclick', |
64 | 'dragstart' : 'handleDragStart', | 64 | 'dragstart' : 'handleDragStart', |
65 | 'dragend' : 'handleDragEnd' | 65 | 'dragend' : 'handleDragEnd' |
66 | } | 66 | }, |
67 | distinct: true | ||
67 | } | 68 | } |
68 | 69 | ||
69 | 70 | ||
diff --git a/js/components/treeview/tree-node.js b/js/components/treeview/tree-node.js index 689fc233..d7b864b5 100644 --- a/js/components/treeview/tree-node.js +++ b/js/components/treeview/tree-node.js | |||
@@ -44,7 +44,9 @@ exports.TreeNode = Montage.create(Component, { | |||
44 | if(!object) { | 44 | if(!object) { |
45 | return; | 45 | return; |
46 | } | 46 | } |
47 | |||
47 | if(object[this.branchKey]) { | 48 | if(object[this.branchKey]) { |
49 | this.childNodes.length = 0; | ||
48 | object[this.branchKey].forEach(function(node) { | 50 | object[this.branchKey].forEach(function(node) { |
49 | this.childNodes.push(node); | 51 | this.childNodes.push(node); |
50 | }, this); | 52 | }, this); |
diff --git a/node_modules/montage/core/converter/converter.js b/node_modules/montage/core/converter/converter.js index abce44e2..a23d2702 100755 --- a/node_modules/montage/core/converter/converter.js +++ b/node_modules/montage/core/converter/converter.js | |||
@@ -20,16 +20,6 @@ var FUNCTION_CLASS = '[object Function]', | |||
20 | 20 | ||
21 | var _toString = Object.prototype.toString; | 21 | var _toString = Object.prototype.toString; |
22 | 22 | ||
23 | // TODO should maybe move these into String.isString and Number.isNumber to parallel Array.isArray | ||
24 | |||
25 | /** | ||
26 | @exports module:montage/core/converter#isString | ||
27 | @function | ||
28 | */ | ||
29 | var isString = function(object) { | ||
30 | return _toString.call(object) === STRING_CLASS; | ||
31 | }; | ||
32 | exports.isString = isString; | ||
33 | 23 | ||
34 | /** | 24 | /** |
35 | @exports module:montage/core/converter#isNumber | 25 | @exports module:montage/core/converter#isNumber |
diff --git a/node_modules/montage/core/converter/date-converter.js b/node_modules/montage/core/converter/date-converter.js index f0d3e540..f484f7aa 100755 --- a/node_modules/montage/core/converter/date-converter.js +++ b/node_modules/montage/core/converter/date-converter.js | |||
@@ -2502,16 +2502,13 @@ var _toString = Object.prototype.toString; | |||
2502 | var isDate = function(object) { | 2502 | var isDate = function(object) { |
2503 | return _toString.call(object) === DATE_CLASS; | 2503 | return _toString.call(object) === DATE_CLASS; |
2504 | }; | 2504 | }; |
2505 | var isString = function(object) { | ||
2506 | return _toString.call(object) === STRING_CLASS; | ||
2507 | }; | ||
2508 | var isNumber = function(object) { | 2505 | var isNumber = function(object) { |
2509 | return _toString.call(object) === NUMBER_CLASS; | 2506 | return _toString.call(object) === NUMBER_CLASS; |
2510 | }; | 2507 | }; |
2511 | 2508 | ||
2512 | var formatDate = function(v, format) { | 2509 | var formatDate = function(v, format) { |
2513 | var date; | 2510 | var date; |
2514 | if (isString(v)) { | 2511 | if (String.isString(v)) { |
2515 | // try to create a Date instance from the string |