Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5230 from adobe/larz/quick-edit-tweak
Browse files Browse the repository at this point in the history
Quick Edit tweak
  • Loading branch information
Narciso Jaramillo committed Sep 24, 2013
2 parents c109696 + 5a582b9 commit 844931f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/editor/MultiRangeInlineEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ define(function (require, exports, module) {
Commands = require("command/Commands"),
Strings = require("strings"),
CommandManager = require("command/CommandManager"),
PerfUtils = require("utils/PerfUtils");
PerfUtils = require("utils/PerfUtils"),
StringUtils = require("utils/StringUtils");

/**
* Remove trailing "px" from a style size value.
Expand Down Expand Up @@ -74,9 +75,9 @@ define(function (require, exports, module) {
SearchResultItem.prototype.$listItem = null;

function _updateRangeLabel(listItem, range) {
var text = range.name + " " + range.textRange.document.file.name + " : " + (range.textRange.startLine + 1);
listItem.text(text);
listItem.attr("title", text);
var text = StringUtils.htmlEscape(range.name) + " <span class='related-file'>— " + StringUtils.htmlEscape(range.textRange.document.file.name) + " : " + (range.textRange.startLine + 1) + "</span>";
listItem.html(text);
listItem.attr("title", listItem.text());
}

/**
Expand Down
8 changes: 6 additions & 2 deletions src/styles/brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -732,16 +732,20 @@ a, img {
}

li {
color: @inline-color-2;
color: @tc-emphasized-text;
margin: 0;
overflow: hidden;
padding: 2px 0px 2px 15px;
text-overflow: ellipsis;
white-space: nowrap;

.related-file {
color: @tc-input-placeholder-text;
}
}

.selected {
color: @inline-color-3;
color: @tc-light-weight-text;
transition: color 0.1s ease-out .15s;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/styles/brackets_colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
@tc-selected-row: #d0d5d5;
@tc-hover-highlight: rgba(255, 255, 255, 0.6);
@tc-text: #454545;
@tc-emphasized-text: #333;
@tc-text-shadow: 0 1px 0 #fff;
@tc-call-to-action: #288edf;
@tc-call-to-action-border: #0055ad;
Expand Down
4 changes: 2 additions & 2 deletions test/spec/MultiRangeInlineEditor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ define(function (require, exports, module) {
inlineEditor.load(hostEditor);

var $ruleListItems = $(inlineEditor.htmlContent).find("li");
expect($($ruleListItems.get(0)).text()).toBe("div " + inlineDocName + " : 1");
expect($($ruleListItems.get(1)).text()).toBe(".foo " + inlineDocName + " : 2");
expect($($ruleListItems.get(0)).text()).toBe("div " + inlineDocName + " : 1");
expect($($ruleListItems.get(1)).text()).toBe(".foo " + inlineDocName + " : 2");
});

it("should change selection to the next rule", function () {
Expand Down

0 comments on commit 844931f

Please sign in to comment.