aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/components/colorwheel.reel/compass_app_log.txt3
-rw-r--r--js/components/popup.reel/compass_app_log.txt48
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.html3
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.js1
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.html2
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.js42
-rw-r--r--js/panels/Color/colorpanelbase.reel/colorpanelbase.js8
-rw-r--r--js/panels/Color/colorpanelpopup.reel/css/colorpanelpopup.css4
-rw-r--r--js/panels/Color/colorpanelpopup.reel/css/colorpanelpopup.scss4
9 files changed, 46 insertions, 69 deletions
diff --git a/js/components/colorwheel.reel/compass_app_log.txt b/js/components/colorwheel.reel/compass_app_log.txt
deleted file mode 100644
index 815feb02..00000000
--- a/js/components/colorwheel.reel/compass_app_log.txt
+++ /dev/null
@@ -1,3 +0,0 @@
12011-11-23 01:07:12 create css/colorwheel.css
22011-11-23 01:07:25 overwrite css/colorwheel.css
32011-12-20 17:04:05 overwrite css/colorwheel.css
diff --git a/js/components/popup.reel/compass_app_log.txt b/js/components/popup.reel/compass_app_log.txt
deleted file mode 100644
index 8a3fb984..00000000
--- a/js/components/popup.reel/compass_app_log.txt
+++ /dev/null
@@ -1,48 +0,0 @@
12011-06-28 18:13:06 create css/popup.css
22011-06-28 18:13:12 identical css/popup.css
32011-06-28 18:14:08 overwrite css/popup.css
42011-06-28 18:14:20 overwrite css/popup.css
52011-06-28 18:14:29 overwrite css/popup.css
62011-06-28 18:17:23 overwrite css/popup.css
72011-06-28 18:17:27 overwrite css/popup.css
82011-06-28 18:17:56 overwrite css/popup.css
92011-06-28 18:18:09 overwrite css/popup.css
102011-06-28 18:20:30 overwrite css/popup.css
112011-06-28 18:22:35 overwrite css/popup.css
122011-06-28 18:24:12 overwrite css/popup.css
132011-06-28 18:24:23 overwrite css/popup.css
142011-06-28 18:24:33 overwrite css/popup.css
152011-06-28 18:25:17 overwrite css/popup.css
162011-06-28 18:26:21 overwrite css/popup.css
172011-06-28 18:26:33 overwrite css/popup.css
182011-06-28 18:26:42 overwrite css/popup.css
192011-06-28 18:26:57 overwrite css/popup.css
202011-06-28 18:29:57 overwrite css/popup.css
212011-06-28 18:30:14 overwrite css/popup.css
222011-06-28 18:30:23 overwrite css/popup.css
232011-06-28 18:30:48 overwrite css/popup.css
242011-06-28 18:31:03 overwrite css/popup.css
252011-06-29 10:18:31 overwrite css/popup.css
262011-06-29 10:18:47 overwrite css/popup.css
272011-06-29 10:37:19 overwrite css/popup.css
282011-06-29 10:40:29 overwrite css/popup.css
292011-06-29 10:45:37 overwrite css/popup.css
302011-06-29 10:45:53 identical css/popup.css
312011-06-29 10:46:52 overwrite css/popup.css
322011-06-29 10:47:02 identical css/popup.css
332011-06-29 13:30:47 overwrite css/popup.css
342011-06-29 13:31:14 overwrite css/popup.css
352011-12-20 17:06:48 overwrite css/popup.css
362011-12-22 11:29:15 overwrite css/popup.css
372011-12-22 11:29:24 identical css/popup.css
382011-12-22 11:30:05 overwrite css/popup.css
392011-12-22 11:30:33 overwrite css/popup.css
402011-12-22 11:30:51 overwrite css/popup.css
412011-12-22 11:32:30 overwrite css/popup.css
422011-12-22 11:33:06 overwrite css/popup.css
432011-12-22 11:33:12 overwrite css/popup.css
442011-12-22 11:33:32 identical css/popup.css
452011-12-22 11:33:36 overwrite css/popup.css
462011-12-22 11:34:48 overwrite css/popup.css
472012-01-26 11:42:18 overwrite css/popup.css
482012-01-26 11:42:20 overwrite css/popup.css
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.html b/js/components/treeview/ninja-branch.reel/ninja-branch.html
index 4d557a94..13f1c575 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.html
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.html
@@ -110,7 +110,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
110 "name": "Repetition", 110 "name": "Repetition",
111 "properties": { 111 "properties": {
112 "element": { "#": "branchList" }, 112 "element": { "#": "branchList" },
113 "contentController": {"@": "arrayController" } 113 "contentController": {"@": "arrayController" },
114 "selectionEnabled": true
114 } 115 }
115 }, 116 },
116 117
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.js b/js/components/treeview/ninja-branch.reel/ninja-branch.js
index 6b9ebb10..0d1a1d0e 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.js
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.js
@@ -5,7 +5,6 @@
5 </copyright> */ 5 </copyright> */
6 6
7var Montage = require("montage").Montage, 7var Montage = require("montage").Montage,
8 Component = require("montage/ui/component").Component,
9 TreeNode = require("js/components/treeview/tree-node").TreeNode; 8 TreeNode = require("js/components/treeview/tree-node").TreeNode;
10 9
11var Branch = exports.Branch = Montage.create(TreeNode, { 10var Branch = exports.Branch = Montage.create(TreeNode, {
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.html b/js/components/treeview/ninja-leaf.reel/ninja-leaf.html
index bd8e8acd..310274bc 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.html
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.html
@@ -37,7 +37,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
37</head> 37</head>
38<body> 38<body>
39 <div id="leaf" class="leaf"> 39 <div id="leaf" class="leaf">
40 <div id="label" class="leaf-label"></div> 40 <div id="label" class="leaf-label" draggable="true"></div>
41 </div> 41 </div>
42</body> 42</body>
43</html> \ No newline at end of file 43</html> \ No newline at end of file
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js
index bd566b26..0b7a171e 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js
@@ -5,7 +5,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
5</copyright> */ 5</copyright> */
6 6
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component;
9 TreeNode = require("js/components/treeview/tree-node").TreeNode; 8 TreeNode = require("js/components/treeview/tree-node").TreeNode;
10 9
11exports.Leaf = Montage.create(TreeNode, { 10exports.Leaf = Montage.create(TreeNode, {
@@ -14,19 +13,38 @@ exports.Leaf = Montage.create(TreeNode, {
14 }, 13 },
15 templateDidLoad : { 14 templateDidLoad : {
16 value: function() { 15 value: function() {
17 this.needsDraw = true; 16 var event = this.treeView.activationEvent;
17
18 ///// Re-set the activation event
19 if(event && event !== this.activationEvent) {
20 this.delegateEventMap[event] = this.delegateEventMap[this.activationEvent];
21 delete this.delegateEventMap[this.activationEvent];
22 this.activationEvent = this.treeView.activationEvent;
23 }
18 } 24 }
19 }, 25 },
20 prepareForDraw: { 26 prepareForDraw: {
21 value : function() { 27 value : function() {
22 this.activationEvent = this.activationEvent || 'click'; 28 var el = this.label._element;
23 this.label._element.addEventListener(this.activationEvent, this.handleNodeActivation.bind(this), false); 29
30 Object.keys(this.delegateEventMap).forEach(function(event) {
31 el.addEventListener(event, this, false);
32 }, this);
33
24 } 34 }
25 }, 35 },
26 handleNodeActivation: { 36 handleEvent : {
27 value: function(e) { 37 value: function(e) {
28 console.log(this.sourceObject); 38 var delegateMethod = this.delegateEventMap[e._event.type];
29 this.treeView.contentController.delegate.applyPresetSelection(this.sourceObject); 39 this.callDelegateMethod(delegateMethod);
40 }
41 },
42 callDelegateMethod : {
43 value: function(methodName) {
44 var delegate = this.treeView.contentController.delegate;
45 if(delegate && typeof delegate[methodName] === 'function') {
46 delegate[methodName](this.sourceObject);
47 }
30 } 48 }
31 }, 49 },
32 draw : { 50 draw : {
@@ -35,6 +53,16 @@ exports.Leaf = Montage.create(TreeNode, {
35 this._labelText = this.sourceObject[this.labelKey]; 53 this._labelText = this.sourceObject[this.labelKey];
36 } 54 }
37 } 55 }
56 },
57 activationEvent : {
58 value : 'click'
59 },
60 delegateEventMap : {
61 value: {
62 'click' : 'handleNodeActivation',
63 'dragstart' : 'handleDragStart',
64 'dragend' : 'handleDragEnd'
65 }
38 } 66 }
39 67
40 68
diff --git a/js/panels/Color/colorpanelbase.reel/colorpanelbase.js b/js/panels/Color/colorpanelbase.reel/colorpanelbase.js
index 9a27689a..ff738bbe 100644
--- a/js/panels/Color/colorpanelbase.reel/colorpanelbase.js
+++ b/js/panels/Color/colorpanelbase.reel/colorpanelbase.js
@@ -1499,13 +1499,13 @@ exports.ColorPanelBase = Montage.create(Component, {
1499 // 1499 //
1500 if (type._event.clientX && type._event.clientY) { 1500 if (type._event.clientX && type._event.clientY) {
1501 // 1501 //
1502 if (type._event.clientX > (parseInt(document.width)/2)) { 1502 //if (type._event.clientX > (parseInt(document.width)/2)) {
1503 //TODO: Fix offset hack 1503 //TODO: Fix offset hack
1504 this.application.ninja.colorController.colorPopupManager.showColorPopup((type._event.clientX - type._event.offsetX) +'px', (type._event.target.clientHeight/2+type._event.clientY - type._event.offsetY)+'px', 'right', 'top'); 1504 this.application.ninja.colorController.colorPopupManager.showColorPopup((type._event.clientX - type._event.offsetX) +'px', (type._event.target.clientHeight/2+type._event.clientY - type._event.offsetY)+'px', 'right', 'top');
1505 } else { 1505 //} else {
1506 // 1506 //
1507 this.application.ninja.colorController.colorPopupManager.showColorPopup((type._event.clientX - type._event.offsetX)+parseInt(type._event.target.offsetWidth)+'px', (type._event.target.offsetHeight/2+type._event.clientY - type._event.offsetY)+'px', 'left', 'top'); 1507 // this.application.ninja.colorController.colorPopupManager.showColorPopup((type._event.clientX - type._event.offsetX)+parseInt(type._event.target.offsetWidth)+'px', (type._event.target.offsetHeight/2+type._event.clientY - type._event.offsetY)+'px', 'left', 'top');
1508 } 1508 //}
1509 } 1509 }
1510 }