diff --git a/src/org/opensolaris/opengrok/web/Scripts.java b/src/org/opensolaris/opengrok/web/Scripts.java index 8f2d76cc34c..7d8ceed350b 100644 --- a/src/org/opensolaris/opengrok/web/Scripts.java +++ b/src/org/opensolaris/opengrok/web/Scripts.java @@ -125,7 +125,7 @@ public String toHtml() { SCRIPTS.put("jquery-tablesorter", new FileScript("js/jquery-tablesorter-2.26.6.min.js", 12)); SCRIPTS.put("tablesorter-parsers", new FileScript("js/tablesorter-parsers-0.0.1.js", 13)); SCRIPTS.put("searchable-option-list", new FileScript("js/searchable-option-list-2.0.3.min.js", 14)); - SCRIPTS.put("utils", new FileScript("js/utils-0.0.9.js", 15)); + SCRIPTS.put("utils", new FileScript("js/utils-0.0.10.js", 15)); SCRIPTS.put("repos", new FileScript("js/repos-0.0.1.js", 20)); SCRIPTS.put("diff", new FileScript("js/diff-0.0.1.js", 20)); } diff --git a/web/default/style.css b/web/default/style.css index 909d56aec7f..e7fc600a14f 100644 --- a/web/default/style.css +++ b/web/default/style.css @@ -833,11 +833,24 @@ a.scope { /* scope */ color: steelblue; font-weight: bol max-height: 400px; } -.symbol-highlighted { +.symbol-highlighted.hightlight-color-1 { + /* yellow */ background-color: #ffd700; background-color: rgb(255, 215, 0); } +.symbol-highlighted.hightlight-color-2 { + /* green */ + background-color: #00ff00; + background-color: rgb(0, 255, 0); +} + +.symbol-highlighted.hightlight-color-3 { + /* blue */ + background-color: #00ccff; + background-color: rgb(0, 204, 255); +} + .messages-window { width: 40%; max-height: 400px; diff --git a/web/help.jsp b/web/help.jsp index d10ba5583d1..db986027418 100644 --- a/web/help.jsp +++ b/web/help.jsp @@ -202,10 +202,10 @@ Key "1" toggles Intelligence Window. It gives the user many helper a
Symbol Highlighting

-Key "2" toggles highlighting of the last symbol pointed by the mouse cursor. This functionality is also accessible via the Intelligence Window. +Keys "2", "3", "4" toggles highlighting of the last symbol pointed by the mouse cursor. This functionality is also accessible via the Intelligence Window.

-Key "3" toggles unhighlighting all symbols. This functionality is also accessible via the Intelligence Window. +Key "5" toggles unhighlighting all symbols. This functionality is also accessible via the Intelligence Window.

@@ -216,7 +216,7 @@ Key "3" toggles unhighlighting all symbols. This functionality is also accessibl
Symbol jumping

By 'n' for next and 'b' for back you can jump between the symbols easily only with keyboard. When there is no symbol highlighted then the jump -is made to the next symbol in the file from the current one. If you have highlighted a specific symbol then the jump is done only among the highlighted symbols. +is made to the next symbol in the file from the current one. If you have highlighted a specific symbol then the jump is done only among the highlighted symbols regardless the color of the symbol.

Diff jumper

diff --git a/web/js/utils-0.0.9.js b/web/js/utils-0.0.10.js similarity index 98% rename from web/js/utils-0.0.9.js rename to web/js/utils-0.0.10.js index 33d81c5aa67..4b0cbdf4354 100644 --- a/web/js/utils-0.0.9.js +++ b/web/js/utils-0.0.10.js @@ -807,10 +807,20 @@ break; case 50: // 2 if (that.symbol) { - that.unhighlight(that.symbol).length === 0 && that.highlight(that.symbol); + that.unhighlight(that.symbol).length === 0 && that.highlight(that.symbol, 1); } break; case 51: // 3 + if (that.symbol) { + that.unhighlight(that.symbol).length === 0 && that.highlight(that.symbol, 2); + } + break; + case 52: // 4 + if (that.symbol) { + that.unhighlight(that.symbol).length === 0 && that.highlight(that.symbol, 3); + } + break; + case 53: // 5 that.unhighlightAll(); break; case 110: // n @@ -882,13 +892,13 @@ getSymbols: function () { return (this.$symbols = this.$symbols || $(this.options.selector)); }, - highlight: function (symbol) { + highlight: function (symbol, color) { if (this.$current.text() === symbol) { this.$last_highlighted_current = this.$current; } return this.getSymbols().filter(function () { return $(this).text() === symbol; - }).addClass('symbol-highlighted') + }).addClass('symbol-highlighted').addClass('hightlight-color-' + (color || 1)) }, unhighlight: function (symbol) { if (this.$last_highlighted_current && @@ -900,11 +910,13 @@ return this.getSymbols().filter(".symbol-highlighted").filter(function () { return $(this).text() === symbol; }).removeClass('symbol-highlighted') - + .removeClass("hightlight-color-1 hightlight-color-2 hightlight-color-3"); }, unhighlightAll: function () { this.$last_highlighted_current = undefined - return this.getSymbols().filter(".symbol-highlighted").removeClass("symbol-highlighted") + return this.getSymbols().filter(".symbol-highlighted") + .removeClass("symbol-highlighted") + .removeClass("hightlight-color-1 hightlight-color-2 hightlight-color-3"); }, scrollTop: function ($el) { if (this.options.scrollTop) { diff --git a/web/offwhite/style.css b/web/offwhite/style.css index 60b45b07476..ae81c812677 100644 --- a/web/offwhite/style.css +++ b/web/offwhite/style.css @@ -878,11 +878,24 @@ a.scope { /* scope */ color: steelblue; font-weight: bol max-height: 400px; } -.symbol-highlighted { +.symbol-highlighted.hightlight-color-1 { + /* yellow */ background-color: #ffd700; background-color: rgb(255, 215, 0); } +.symbol-highlighted.hightlight-color-2 { + /* green */ + background-color: #00ff00; + background-color: rgb(0, 255, 0); +} + +.symbol-highlighted.hightlight-color-3 { + /* blue */ + background-color: #00ccff; + background-color: rgb(0, 204, 255); +} + .messages-window { width: 40%; max-height: 400px; diff --git a/web/polished/style.css b/web/polished/style.css index 511d0aa1344..0768e456e1a 100644 --- a/web/polished/style.css +++ b/web/polished/style.css @@ -933,11 +933,24 @@ a.scope { /* scope */ color: steelblue; font-weight: bol max-height: 400px; } -.symbol-highlighted { +.symbol-highlighted.hightlight-color-1 { + /* yellow */ background-color: #ffd700; background-color: rgb(255, 215, 0); } +.symbol-highlighted.hightlight-color-2 { + /* green */ + background-color: #00ff00; + background-color: rgb(0, 255, 0); +} + +.symbol-highlighted.hightlight-color-3 { + /* blue */ + background-color: #00ccff; + background-color: rgb(0, 204, 255); +} + .messages-window { width: 40%; max-height: 400px;