From 3669eea4bde3518ce080048e9f53d2dd111fd8be Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Wed, 21 Mar 2012 11:37:48 -0700 Subject: Timeline: Bug fix: style collapsers not staying in synch. Also, removed console.log calls in hintable component. --- js/components/editable.reel/editable.js | 8 ++++---- js/components/hintable.reel/hintable.js | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'js/components') diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js index 9c8946c4..7a31e7fd 100644 --- a/js/components/editable.reel/editable.js +++ b/js/components/editable.reel/editable.js @@ -120,7 +120,7 @@ exports.Editable = Montage.create(Component, { } if(this.stopOnBlur) { - console.log('adding mousedown event listener'); + //console.log('adding mousedown event listener'); ///// Simulate blur on editable node by listening to the doc document.addEventListener('mouseup', this, false); } @@ -189,7 +189,7 @@ exports.Editable = Montage.create(Component, { handleKeydown : { value : function(e) { var k = e.keyCode; - console.log('keyCode: ' + k); + //console.log('keyCode: ' + k); } }, ///// Text input has changed values @@ -204,7 +204,7 @@ exports.Editable = Montage.create(Component, { }, handleMouseup : { value : function(e) { - console.log('handle mouse down'); + //console.log('handle mouse down'); ///// Listen for simulated blur event if(this.stopOnBlur && e._event.target !== this._element) { this.blur(); @@ -213,7 +213,7 @@ exports.Editable = Montage.create(Component, { }, handleEvent : { value : function(e) { - console.log("event type : " + e._event.type); + //console.log("event type : " + e._event.type); ///// If configured, start on specified event if(e._event.type === this.startOnEvent) { this.start(); diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js index 5ed46b3c..cbfe2d9b 100644 --- a/js/components/hintable.reel/hintable.js +++ b/js/components/hintable.reel/hintable.js @@ -90,10 +90,10 @@ exports.Hintable = Montage.create(Editable, { hintNext : { value : function(e) { if(e) { e.preventDefault(); } - console.log('next1'); + //console.log('next1'); if(this._matchIndex < this.matches.length - 1) { - console.log('next'); + //console.log('next'); ++this._matchIndex; this.hint = this._getHintDifference(); } @@ -102,9 +102,9 @@ exports.Hintable = Montage.create(Editable, { hintPrev : { value : function(e) { if(e) { e.preventDefault(); } - console.log('prev1'); + //console.log('prev1'); if(this._matchIndex !== 0) { - console.log('prev'); + //console.log('prev'); --this._matchIndex; this.hint = this._getHintDifference(); } @@ -135,7 +135,7 @@ exports.Hintable = Montage.create(Editable, { /// revert to old value this.value = (this._preEditValue); this._sendEvent('revert'); - console.log('reverting'); + //console.log('reverting'); } } @@ -180,7 +180,7 @@ exports.Hintable = Montage.create(Editable, { var val = this.value, matches, hint; - console.log('val = "' + val + '"'); + //console.log('val = "' + val + '"'); //// Handle auto-suggest if configured if(this.hints instanceof Array) { -- cgit v1.2.3 From e93827d6c157c7648eb52e6c10b7f458b215b580 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Fri, 23 Mar 2012 07:34:11 -0700 Subject: Timeline : Bug Fix : IKNINJA 1374 Signed-off-by: Kruti Shah Signed-off-by: Jonathan Duran --- js/components/layout/bread-crumb.reel/bread-crumb.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js/components') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index f35972b6..4776265a 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -23,6 +23,7 @@ exports.Breadcrumb = Montage.create(Component, { value: function(){ if(!this.application.ninja.documentController.activeDocument) { this.disabled = true; + this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; } } }, @@ -79,6 +80,7 @@ exports.Breadcrumb = Montage.create(Component, { handleAction: { value: function(evt) { + this.application.ninja.breadCrumbClick=true; if(evt.target.value === this.container.uuid) { return; } -- cgit v1.2.3 From 969137ba4520103348a496ac9b99063dc4ec8f96 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 5 Apr 2012 10:38:57 -0700 Subject: Timeline: Bug fix for IKNINJA-1086, "CSS Style Suggestion stops working" --- js/components/hintable.reel/hintable.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'js/components') diff --git a/js/components/hintable.reel/hintable.js b/js/components/hintable.reel/hintable.js index cbfe2d9b..6e3b2aaf 100644 --- a/js/components/hintable.reel/hintable.js +++ b/js/components/hintable.reel/hintable.js @@ -157,6 +157,14 @@ exports.Hintable = Montage.create(Editable, { this._super(arguments); + /// Remove the phantom "
" element that is generated when + /// content editable element is empty + this._children(this._element, function(item) { + return item.nodeName === 'BR'; + }).forEach(function(item) { + this._element.removeChild(item); + }, this); + if(k === 39) { selection = window.getSelection(); text = selection.baseNode.textContent; -- cgit v1.2.3 From d343c7b3f482c17176cca3ddb6e7f8753169ad48 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Mon, 9 Apr 2012 15:15:59 -0700 Subject: Timeline: Bug fix, IKNINJA 1467, "Timeline: Changing layer names should not require hitting "Return" key to commit the change" --- js/components/editable.reel/editable.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/components') diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js index 7a31e7fd..ca65bc2a 100644 --- a/js/components/editable.reel/editable.js +++ b/js/components/editable.reel/editable.js @@ -115,6 +115,9 @@ exports.Editable = Montage.create(Component, { ///// Save the preEditValue this._preEditValue = this.value; + // Initialize enteredValue with current value + this.enteredValue = this.value; + if(this.selectOnStart) { this.selectAll(); } @@ -189,6 +192,10 @@ exports.Editable = Montage.create(Component, { handleKeydown : { value : function(e) { var k = e.keyCode; + + // Record change + this.enteredValue = this._element.firstChild.data; + //console.log('keyCode: ' + k); } }, -- cgit v1.2.3 From 96f78dec0e8ddd9ad975ec8150733f4945ff9095 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Fri, 13 Apr 2012 12:03:12 -0700 Subject: Timeline: Bug fix: problem with editing layers missing last letter in new value. --- js/components/editable.reel/editable.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'js/components') diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js index ca65bc2a..dad93b31 100644 --- a/js/components/editable.reel/editable.js +++ b/js/components/editable.reel/editable.js @@ -38,6 +38,7 @@ exports.Editable = Montage.create(Component, { set : function(el) { this._element = el; this._element.addEventListener('keydown', this, false); + this._element.addEventListener('keyup', this, false); this._element.addEventListener('input', this, false); if(this.startOnEvent) { @@ -192,11 +193,13 @@ exports.Editable = Montage.create(Component, { handleKeydown : { value : function(e) { var k = e.keyCode; - - // Record change + } + }, + + handleKeyup : { + value : function(e) { + // Record change in value this.enteredValue = this._element.firstChild.data; - - //console.log('keyCode: ' + k); } }, ///// Text input has changed values -- cgit v1.2.3 From b7d5b9e9b69644cdafdcc9b7ef2fe2674f35db18 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Thu, 19 Apr 2012 13:48:28 -0700 Subject: BreadCrumb Bug Fix Signed-off-by: Kruti Shah --- js/components/layout/bread-crumb.reel/bread-crumb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index 4776265a..faf5e2f8 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -71,7 +71,7 @@ exports.Breadcrumb = Montage.create(Component, { // This is always the top container which is now hardcoded to body this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); - + NJevent("breadCrumbBinding",this) } @@ -80,7 +80,7 @@ exports.Breadcrumb = Montage.create(Component, { handleAction: { value: function(evt) { - this.application.ninja.breadCrumbClick=true; + this.application.ninja.currentDocument.breadCrumbClick=true; if(evt.target.value === this.container.uuid) { return; } -- cgit v1.2.3 From 933338e13e73243965d105170a269a41f7efd77f Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Fri, 20 Apr 2012 16:25:36 -0700 Subject: Breadcrumb Fix Signed-off-by: Kruti Shah --- js/components/layout/bread-crumb.reel/bread-crumb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/components') diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index faf5e2f8..f3eedfd0 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js @@ -71,7 +71,7 @@ exports.Breadcrumb = Montage.create(Component, { // This is always the top container which is now hardcoded to body this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); - NJevent("breadCrumbBinding",this) +// NJevent("breadCrumbBinding",this) } @@ -80,7 +80,7 @@ exports.Breadcrumb = Montage.create(Component, { handleAction: { value: function(evt) { - this.application.ninja.currentDocument.breadCrumbClick=true; +// this.application.ninja.currentDocument.breadCrumbClick=true; if(evt.target.value === this.container.uuid) { return; } -- cgit v1.2.3 From bcfb200482c26b2bfc0d6577b1eb0de7a19a6762 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Thu, 26 Apr 2012 16:23:59 -0700 Subject: Removing all "module" declarations and replaced with "prototype" in preparation for montage converting to the new "prototype" format fully --- js/components/about-box.reel/about-box.html | 5 +- js/components/checkbox.reel/checkbox.html | 3 +- js/components/colorbar.reel/colorbar.html | 5 +- js/components/colorwheel.reel/colorwheel.html | 5 +- js/components/combobox.reel/combobox.html | 3 +- .../gradientpicker.reel/gradientpicker.html | 5 +- js/components/hottext.reel/hottext.html | 5 +- js/components/hottextunit.reel/hottextunit.html | 5 +- .../layout/bread-crumb.reel/bread-crumb.html | 11 ++-- .../layout/document-bar.reel/document-bar.html | 8 +-- .../layout/document-entry.reel/document-entry.html | 5 +- .../layout/documents-tab.reel/documents-tab.html | 11 ++-- .../layout/stage-mode.reel/stage-mode.html | 5 +- .../layout/subtool-button.reel/subtool-button.html | 5 +- .../layout/tool-button.reel/tool-button.html | 5 +- .../layout/tools-list.reel/tools-list.html | 77 ++++++++-------------- .../tools-properties.reel/tools-properties.html | 56 ++++++---------- js/components/menu/menu-entry.reel/menu-entry.html | 14 ++-- js/components/menu/menu-item.reel/menu-item.html | 14 ++-- js/components/menu/menu.reel/menu.html | 17 ++--- .../popup-manager.reel/popup-manager.html | 5 +- js/components/popup-manager.reel/popup-manager.js | 4 +- js/components/popup.reel/popup.html | 5 +- js/components/radio.reel/radio.html | 3 +- js/components/slider.reel/slider.html | 5 +- js/components/textfield.reel/textfield.html | 3 +- .../brush-properties.reel/brush-properties.html | 17 ++--- .../eraser-properties.reel/eraser-properties.html | 5 +- .../eyedropper-properties.html | 5 +- .../fill-properties.reel/fill-properties.html | 8 +-- .../ink-bottle-properties.html | 14 ++-- .../line-properties.reel/line-properties.html | 5 +- .../object3d-properties.html | 5 +- .../oval-properties.reel/oval-properties.html | 8 +-- .../pan-properties.reel/pan-properties.html | 5 +- .../pen-properties.reel/pen-properties.html | 8 +-- .../pencil-properties.reel/pencil-properties.html | 5 +- .../rect-properties.reel/rect-properties.html | 17 ++--- .../rotate-stage-properties.html | 5 +- .../selection-properties.html | 3 +- .../shape-properties.reel/shape-properties.html | 27 +++----- .../subselection-properties.html | 5 +- .../tag-properties.reel/tag-properties.html | 3 +- .../text-properties.reel/text-properties.html | 56 ++++++---------- .../zoom-properties.reel/zoom-properties.html | 5 +- js/components/treeview/branch.reel/branch.html | 23 +++---- js/components/treeview/leaf.reel/leaf.html | 8 +-- .../treeview/ninja-branch.reel/ninja-branch.html | 23 +++---- .../treeview/ninja-leaf.reel/ninja-leaf.html | 8 +-- js/components/treeview/treeview.reel/treeview.html | 17 ++--- js/components/ui/color-chip.reel/color-chip.html | 5 +- js/components/ui/file-input.reel/file-input.html | 5 +- .../ui/icon-list-basic/icon.reel/icon.html | 5 +- .../icon-list-basic/iconsList.reel/iconsList.html | 11 ++-- js/components/ui/input-group.reel/input-group.html | 14 ++-- .../ui/property-control.reel/property-control.html | 8 +-- js/components/ui/tree-basic/tree.reel/tree.html | 11 ++-- .../ui/tree-basic/treeItem.reel/treeItem.html | 5 +- 58 files changed, 230 insertions(+), 408 deletions(-) (limited to 'js/components') diff --git a/js/components/about-box.reel/about-box.html b/js/components/about-box.reel/about-box.html index 7142d605..1f41699e 100644 --- a/js/components/about-box.reel/about-box.html +++ b/js/components/about-box.reel/about-box.html @@ -1,4 +1,4 @@ - +