diff --git a/src/htmlContent/search-results.html b/src/htmlContent/search-results.html index a335cabbcbb..8783581a730 100644 --- a/src/htmlContent/search-results.html +++ b/src/htmlContent/search-results.html @@ -4,12 +4,12 @@ {{#replace}}{{/replace}} - + {{{filename}}} {{#items}} - + {{#replace}}{{/replace}} {{line}} {{pre}}{{highlight}}{{post}} diff --git a/src/language/CodeInspection.js b/src/language/CodeInspection.js index cb6f98473c8..7ac53507cac 100644 --- a/src/language/CodeInspection.js +++ b/src/language/CodeInspection.js @@ -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 diff --git a/src/search/SearchResultsView.js b/src/search/SearchResultsView.js index c938a5be67e..c0bf29bb045 100644 --- a/src/search/SearchResultsView.js +++ b/src/search/SearchResultsView.js @@ -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"); } }); @@ -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 @@ -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; @@ -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 }); } }); @@ -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"); diff --git a/src/styles/brackets.less b/src/styles/brackets.less index 5e2a1f962a7..8bb786c9431 100644 --- a/src/styles/brackets.less +++ b/src/styles/brackets.less @@ -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 */