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 c5e66f69b108e359b00c8fd897a4278812484c55 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 20 Apr 2012 12:09:54 -0700 Subject: Fixing translate handles to draw without zoom value. Also fixed some typos in zoom code. Signed-off-by: Nivesh Rajbhandari --- js/components/layout/document-bar.reel/document-bar.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/components') diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index 4dc39fd6..66a02725 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -57,7 +57,6 @@ exports.DocumentBar = Montage.create(Component, { this._zoomFactor = value; if (!this._firstDraw) { - var viewUtils = this.application.ninja.stage.viewUtils; this.application.ninja.stage.setZoom(value); } } -- 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 a0daa3668883c8c35ce277b60509a3a3dcf303b2 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 24 Apr 2012 11:42:42 -0700 Subject: Allow users to toggle application of stroke and border settings when using the ink bottle tool. Signed-off-by: Nivesh Rajbhandari --- .../ink-bottle-properties.css | 24 ++++ .../ink-bottle-properties.html | 137 ++++++++++++++++++--- .../ink-bottle-properties.js | 49 +++++--- 3 files changed, 179 insertions(+), 31 deletions(-) (limited to 'js/components') diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css index 7f1b0f7f..a926a0b4 100755 --- a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css +++ b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css @@ -4,3 +4,27 @@ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ +.inkBottleProperties input[type="checkbox"].nj-skinned { + float:left; + margin-top:5px; +} + +.inkBottleProperties select.nj-skinned { + float:left; + margin:2px 5px 0 0; +} + +.inkBottleProperties label.disabled { + color:#999999; +} + +.inkBottleProperties label.disabled:hover { + color:#999999; + background-color: transparent; + cursor:default; +} + +.inkBottleProperties div.disabled:hover { + background-color: transparent; + cursor:default; +} \ No newline at end of file diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html index 1602e793..81facc49 100755 --- a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html +++ b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html @@ -11,6 +11,30 @@