Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion src/extensions/default/DarkTheme/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
/* Non-editor styling */

.image-view,
.not-editor {
.not-editor.not-editor {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This selector is for an element that has the not-editor class applied twice -- that's not right is it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be here. I was testing another bug and forgot to remove it, and didn't noticed it before committing.

BTW, is not for an element which has the class applied twice it works for any element that has that class, but by adding the class twice or more in a selector you increase the specificity of the selector, making the properties overwrite the ones applied in other selectors without using !important.

background-color: @background;
}

Expand Down
4 changes: 2 additions & 2 deletions src/htmlContent/search-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<tr class="file-section" data-file-index="{{fileIndex}}">
{{#replace}}<td class="checkbox-column"><input type="checkbox" class="check-one-file" {{#isChecked}}checked="true"{{/isChecked}} /></td>{{/replace}}
<td colspan="2">
<span class="disclosure-triangle expanded" title="{{Strings.FIND_IN_FILES_EXPAND_COLLAPSE}}"></span>
<span class="disclosure-triangle {{^isCollapsed}}expanded{{/isCollapsed}}" title="{{Strings.FIND_IN_FILES_EXPAND_COLLAPSE}}"></span>
{{{filename}}}
</td>
</tr>
{{#items}}
<tr data-file-index="{{fileIndex}}" data-item-index="{{itemIndex}}" data-match-index="{{matchIndex}}">
<tr data-file-index="{{fileIndex}}" data-item-index="{{itemIndex}}" data-match-index="{{matchIndex}}" {{#isCollapsed}}style="display:none;"{{/isCollapsed}}>
{{#replace}}<td class="checkbox-column"><input type="checkbox" class="check-one" {{#isChecked}}checked="true"{{/isChecked}} /></td>{{/replace}}
<td class="line-number">{{line}}</td>
<td class="line-text">{{pre}}<span class="highlight">{{highlight}}</span>{{post}}</td>
Expand Down
2 changes: 1 addition & 1 deletion src/language/CodeInspection.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ define(function (require, exports, module) {
$selectedRow.nextUntil(".inspector-section").toggle();

var $triangle = $(".disclosure-triangle", $selectedRow);
$triangle.toggleClass("expanded").toggleClass("collapsed");
$triangle.toggleClass("expanded");
} else {
// This is a problem marker row, show the result on click
// Grab the required position data
Expand Down
47 changes: 20 additions & 27 deletions src/search/SearchResultsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ define(function (require, exports, module) {
if (searchItem.collapsed !== collapsed) {
searchItem.collapsed = collapsed;
$(this).nextUntil(".file-section").toggle();
$(this).find(".disclosure-triangle").toggleClass("expanded").toggleClass("collapsed");
$(this).find(".disclosure-triangle").toggleClass("expanded");
}
});

Expand Down Expand Up @@ -385,7 +385,7 @@ define(function (require, exports, module) {
self = this;

this._showSummary();
this._searchList = [];
this._searchList = [];

// Iterates throuh the files to display the results sorted by filenamess. The loop ends as soon as
// we filled the results for one page
Expand Down Expand Up @@ -427,16 +427,17 @@ define(function (require, exports, module) {
multiLine = match.start.line !== match.end.line;

searchItems.push({
fileIndex: self._searchList.length,
itemIndex: searchItems.length,
matchIndex: i,
line: match.start.line + 1,
pre: match.line.substr(0, match.start.ch),
highlight: match.line.substring(match.start.ch, multiLine ? undefined : match.end.ch),
post: multiLine ? "\u2026" : match.line.substr(match.end.ch),
start: match.start,
end: match.end,
isChecked: match.isChecked
fileIndex: self._searchList.length,
itemIndex: searchItems.length,
matchIndex: i,
line: match.start.line + 1,
pre: match.line.substr(0, match.start.ch),
highlight: match.line.substring(match.start.ch, multiLine ? undefined : match.end.ch),
post: multiLine ? "\u2026" : match.line.substr(match.end.ch),
start: match.start,
end: match.end,
isChecked: match.isChecked,
isCollapsed: item.collapsed
});
if (!match.isChecked) {
allInFileChecked = false;
Expand All @@ -456,11 +457,12 @@ define(function (require, exports, module) {
);

self._searchList.push({
fileIndex: self._searchList.length,
filename: displayFileName,
fullPath: fullPath,
isChecked: allInFileChecked,
items: searchItems
fileIndex: self._searchList.length,
filename: displayFileName,
fullPath: fullPath,
isChecked: allInFileChecked,
items: searchItems,
isCollapsed: item.collapsed
});
}
});
Expand All @@ -473,16 +475,7 @@ define(function (require, exports, module) {
replace: this._model.isReplace,
searchList: this._searchList,
Strings: Strings
}))
// Restore the collapsed files
.find(".file-section").each(function () {
var fullPath = self._searchList[$(this).data("file-index")].fullPath;

if (self._model.results[fullPath].collapsed) {
self._model.results[fullPath].collapsed = false;
$(this).trigger("click");
}
});
}));

if (this._$selectedRow) {
this._$selectedRow.removeClass("selected");
Expand Down
5 changes: 1 addition & 4 deletions src/styles/brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -1327,15 +1327,12 @@ a, img {
#problems-panel .disclosure-triangle {
.jstree-sprite;
display: inline-block;
background-position: 7px 5px;
&.expanded {
// Unfortunately, the way jsTree sprites are aligned within their 18px boxes doesn't look good in
// other contexts, so we need some tweaks here instead of straight multiples of @jstree-sprite-size
background-position: 7px 5px;
-webkit-transform: translateZ(0) rotate(90deg);
}
&.collapsed {
background-position: 7px 5px;
}
}

/* Modal bar for Find/Quick Open */
Expand Down