mirror of
https://github.com/atom/atom.git
synced 2026-02-06 20:55:33 -05:00
basic expand/collapse working
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user