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

Quick Edit tweak #5230

Merged
merged 6 commits into from
Sep 24, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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