Avoid the .label class because it conflicts with bootstrap

This commit is contained in:
Nathan Sobo
2013-04-16 17:14:11 -06:00
parent aa27b3d464
commit bbbdacab74
7 changed files with 16 additions and 23 deletions

View File

@@ -49,7 +49,7 @@ class CommandPaletteView extends SelectList
keyBindings = @keyBindings
$$ ->
@li class: 'event', 'data-event-name': eventName, =>
@span eventDescription, class: 'label', title: eventName
@span eventDescription, title: eventName
@div class: 'right', =>
for binding in keyBindings[eventName] ? []
@kbd binding, class: 'key-binding'

View File

@@ -24,8 +24,8 @@ describe "CommandPalette", ->
eventLi = palette.list.children("[data-event-name='#{eventName}']")
if description
expect(eventLi).toExist()
expect(eventLi.find('.label')).toHaveText(description)
expect(eventLi.find('.label').attr('title')).toBe(eventName)
expect(eventLi.find('span')).toHaveText(description)
expect(eventLi.find('span').attr('title')).toBe(eventName)
for binding in keyBindings[eventName] ? []
expect(eventLi.find(".key-binding:contains(#{binding})")).toExist()
else
@@ -40,8 +40,8 @@ describe "CommandPalette", ->
description = editorEvents[eventName] unless description
if description
expect(eventLi).toExist()
expect(eventLi.find('.label')).toHaveText(description)
expect(eventLi.find('.label').attr('title')).toBe(eventName)
expect(eventLi.find('span')).toHaveText(description)
expect(eventLi.find('span').attr('title')).toBe(eventName)
else
expect(eventLi).not.toExist()
@@ -92,8 +92,8 @@ describe "CommandPalette", ->
eventLi = palette.list.children("[data-event-name='#{eventName}']")
if description
expect(eventLi).toExist()
expect(eventLi.find('.label')).toHaveText(description)
expect(eventLi.find('.label').attr('title')).toBe(eventName)
expect(eventLi.find('span')).toHaveText(description)
expect(eventLi.find('span').attr('title')).toBe(eventName)
for binding in keyBindings[eventName] ? []
expect(eventLi.find(".key-binding:contains(#{binding})")).toExist()
else

View File

@@ -59,7 +59,7 @@ class FuzzyFinderView extends SelectList
else
typeClass = 'text-name'
@span fsUtils.base(path), class: "file label #{typeClass}"
@span fsUtils.base(path), class: "file #{typeClass}"
if folder = project.relativize(fsUtils.directory(path))
@span " - #{folder}/", class: 'directory'

View File

@@ -26,7 +26,7 @@ class SymbolsView extends SelectList
itemForElement: ({position, name, file}) ->
$$ ->
@li =>
@div name, class: 'label'
@span name
if position
text = "Line #{position.row + 1}"
else

View File

@@ -30,9 +30,9 @@ describe "SymbolsView", ->
expect(symbolsView.find('.loading')).toBeEmpty()
expect(rootView.find('.symbols-view')).toExist()
expect(symbolsView.list.children('li').length).toBe 2
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'quicksort'
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'quicksort'
expect(symbolsView.list.children('li:first').find('.function-details')).toHaveText 'Line 1'
expect(symbolsView.list.children('li:last').find('.label')).toHaveText 'quicksort.sort'
expect(symbolsView.list.children('li:last').find('span')).toHaveText 'quicksort.sort'
expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'Line 2'
expect(symbolsView).not.toHaveClass "error"
expect(symbolsView.error).not.toBeVisible()
@@ -175,7 +175,7 @@ describe "SymbolsView", ->
editor.trigger 'symbols-view:go-to-declaration'
symbolsView = rootView.find('.symbols-view').view()
expect(symbolsView.list.children('li').length).toBe 1
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'tagged.js'
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'tagged.js'
describe "project symbols", ->
it "displays all tags", ->
@@ -192,9 +192,9 @@ describe "SymbolsView", ->
expect(symbolsView.find('.loading')).toBeEmpty()
expect(rootView.find('.symbols-view')).toExist()
expect(symbolsView.list.children('li').length).toBe 4
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'callMeMaybe'
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'callMeMaybe'
expect(symbolsView.list.children('li:first').find('.function-details')).toHaveText 'tagged.js'
expect(symbolsView.list.children('li:last').find('.label')).toHaveText 'thisIsCrazy'
expect(symbolsView.list.children('li:last').find('span')).toHaveText 'thisIsCrazy'
expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'tagged.js'
expect(symbolsView).not.toHaveClass "error"
expect(symbolsView.error).not.toBeVisible()