Add keybind to cycle through index sort types.
This commit is contained in:
parent
fb1257b4c6
commit
ab739fd446
@ -1,4 +1,5 @@
|
|||||||
- Added `Image Size` setting for the catalog.
|
- Added `Image Size` setting for the catalog.
|
||||||
|
- Added a keybind to cycle through index sort types, `Ctrl+x` by default.
|
||||||
|
|
||||||
### 3.17.1 - *2014-02-10*
|
### 3.17.1 - *2014-02-10*
|
||||||
|
|
||||||
|
|||||||
@ -188,6 +188,7 @@ Config =
|
|||||||
'Next page': ['Right', 'Jump to the next page.']
|
'Next page': ['Right', 'Jump to the next page.']
|
||||||
'Previous page': ['Left', 'Jump to the previous page.']
|
'Previous page': ['Left', 'Jump to the previous page.']
|
||||||
'Search form': ['Ctrl+Alt+s', 'Focus the search field on the board index.']
|
'Search form': ['Ctrl+Alt+s', 'Focus the search field on the board index.']
|
||||||
|
'Cycle sort type': ['Ctrl+x', 'Cycle through index sort types.']
|
||||||
# Thread Navigation
|
# Thread Navigation
|
||||||
'Next thread': ['Down', 'See next thread.']
|
'Next thread': ['Down', 'See next thread.']
|
||||||
'Previous thread': ['Up', 'See previous thread.']
|
'Previous thread': ['Up', 'See previous thread.']
|
||||||
|
|||||||
@ -186,6 +186,12 @@ Index =
|
|||||||
val: isPinned: thread.isPinned
|
val: isPinned: thread.isPinned
|
||||||
Index.sort()
|
Index.sort()
|
||||||
Index.buildIndex()
|
Index.buildIndex()
|
||||||
|
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
|
||||||
addCatalogSwitch: ->
|
addCatalogSwitch: ->
|
||||||
a = $.el 'a',
|
a = $.el 'a',
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
|
|||||||
@ -88,6 +88,8 @@ Keybinds =
|
|||||||
$('.prev button', Index.pagelist).click()
|
$('.prev button', Index.pagelist).click()
|
||||||
when Conf['Search form']
|
when Conf['Search form']
|
||||||
Index.searchInput.focus()
|
Index.searchInput.focus()
|
||||||
|
when Conf['Cycle sort type']
|
||||||
|
Index.cycleSortType()
|
||||||
# Thread Navigation
|
# Thread Navigation
|
||||||
when Conf['Next thread']
|
when Conf['Next thread']
|
||||||
return if g.VIEW isnt 'index'
|
return if g.VIEW isnt 'index'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user