Rename .fold-icon to .icon-right in gutter to make it multi-purpose

This commit is contained in:
Nathan Sobo 2014-01-17 16:59:50 -07:00
parent d879923cdb
commit 99f025d5d6
4 changed files with 7 additions and 7 deletions

View File

@ -718,9 +718,9 @@ describe "EditorView", ->
describe "mousedown on the fold icon of a foldable line number", ->
it "toggles folding on the clicked buffer row", ->
expect(editor.isFoldedAtScreenRow(1)).toBe false
editorView.gutter.find('.line-number:eq(1) .fold-icon').mousedown()
editorView.gutter.find('.line-number:eq(1) .icon-right').mousedown()
expect(editor.isFoldedAtScreenRow(1)).toBe true
editorView.gutter.find('.line-number:eq(1) .fold-icon').mousedown()
editorView.gutter.find('.line-number:eq(1) .icon-right').mousedown()
expect(editor.isFoldedAtScreenRow(1)).toBe false
describe "when text input events are triggered on the hidden input element", ->

View File

@ -348,7 +348,7 @@ class EditorView extends View
@editor.destroyFoldWithId(id)
false
@gutter.on 'mousedown', '.foldable .fold-icon', (e) =>
@gutter.on 'mousedown', '.foldable .icon-right', (e) =>
bufferRow = $(e.target).parent().data('bufferRow')
@editor.toggleFoldAtBufferRow(bufferRow)
false

View File

@ -213,7 +213,7 @@ class Gutter extends View
rowValuePadding = _.multiplyString(' ', maxDigits - rowValue.length)
html += """<div class="#{classes}" data-buffer-row=#{row}>#{rowValuePadding}#{rowValue}<div class="fold-icon"></div></div>"""
html += """<div class="#{classes}" data-buffer-row=#{row}>#{rowValuePadding}#{rowValue}<div class="icon-right"></div></div>"""
lastRow = row

View File

@ -39,7 +39,7 @@
opacity: 1;
}
.editor .gutter .line-number .fold-icon {
.editor .gutter .line-number .icon-right {
.octicon(chevron-down, 0.8em);
display: inline-block;
visibility: hidden;
@ -48,7 +48,7 @@
opacity: .7;
}
.editor .gutter:hover .line-number.foldable .fold-icon {
.editor .gutter:hover .line-number.foldable .icon-right {
visibility: visible;
&:hover {
@ -56,7 +56,7 @@
}
}
.editor .gutter .line-number.fold .fold-icon {
.editor .gutter .line-number.fold .icon-right {
.octicon(chevron-right, 0.8em);
visibility: visible;