basic expand/collapse working

This commit is contained in:
Justin Palmer
2013-02-13 10:58:53 -08:00
parent 112e389306
commit cc3982a08f
2 changed files with 11 additions and 1 deletions

View File

@@ -22,6 +22,16 @@ class PreviewList extends ScrollView
@setSelectedOperationIndex(parseInt($(e.target).closest('li').data('index')))
@executeSelectedOperation()
@on 'click', 'li.path', @onPathSelected
onPathSelected: (event) =>
e = $(event.target)
e = e.parent() if e.parent().hasClass 'path'
return unless e.hasClass 'path'
e.children('ul.matches').toggle 100, (e) ->
$(this).closest('li.path').toggleClass 'is-collapsed'
destroy: ->
@destroyOperations() if @operations

View File

@@ -31,7 +31,7 @@
.command-panel .preview-list .path {
color: #999;
border-top: 1px solid rgba(255, 255, 255, 0.05);
border-top: 1px solid rgba(255, 255, 255, 0.02);
}
.command-panel .preview-list .path:first-child {