Add keybind to cycle through index sort types.

Conflicts:
	CHANGELOG.md
	src/General/Config.coffee
	src/General/Index.coffee
	src/Miscellaneous/Keybinds.coffee
This commit is contained in:
Mayhem 2014-02-11 10:13:53 +01:00 committed by ccd0
parent 98a105e603
commit afa889d128
3 changed files with 13 additions and 0 deletions

View File

@ -727,6 +727,10 @@ vp-replace
'Ctrl+Alt+s'
'Focus the search field on the board index.'
]
'Cycle sort type': [
'Ctrl+x'
'Cycle through index sort types.'
]
# Thread Navigation
'Next thread': [
'Ctrl+Down'

View File

@ -181,6 +181,12 @@ Index =
else
ThreadHiding.hide thread
ThreadHiding.saveHiddenState thread
cycleSortType: ->
types = [Index.selectSort.options...].filter (option) -> !option.disabled
for type, i in types
break if type.selected
types[(i + 1) % types.length].selected = true
$.event 'change', null, Index.selectSort
cb:
toggleHiddenThreads: ->

View File

@ -131,6 +131,9 @@ Keybinds =
searchInput.focus()
when Conf['Open catalog']
window.location = CatalogLinks.catalog()
when Conf['Cycle sort type']
return unless Conf['JSON Navigation']
Index.cycleSortType()
# Thread Navigation
when Conf['Next thread']
return if g.VIEW isnt 'index' or !threadRoot