mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
some tweaking + docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
10435aa078
commit
65eaddb321
@ -487,6 +487,11 @@ var IntrospectionActions = actions.Actions({
|
||||
return !!action.__event__ }),
|
||||
|
||||
// XXX revise...
|
||||
// XXX this is a bit restrictive, need to be able to setup mode
|
||||
// aliases/handlers, i.e. setting {mode: 'advanced'} and either
|
||||
// getting the actual value from .config or calling a mode handler...
|
||||
// ...might also be nice to use a toggler as handler:
|
||||
// {mode: 'toggleBrowseAdvanced'}
|
||||
getActionMode: ['- Interface/',
|
||||
doc`Get action browse mode...
|
||||
|
||||
|
||||
@ -352,6 +352,7 @@ var LocationActions = actions.Actions({
|
||||
core.doc`Toggle index synchronization method
|
||||
|
||||
NOTE: this will not show disabled methods.`,
|
||||
{mode: 'toggleBrowseActionKeys'},
|
||||
toggler.Toggler(null,
|
||||
function(_, state){
|
||||
var dict = this.location_sync_methods
|
||||
|
||||
@ -2932,7 +2932,7 @@ var BrowseActionsActions = actions.Actions({
|
||||
actions.config['browse-actions-keys']
|
||||
&& this.dom.addClass('show-keys')
|
||||
|
||||
// handle '?' button to browse path...
|
||||
// handle '?' -- show doc...
|
||||
var showDoc = this.showDoc = function(){
|
||||
var action = this.select('!').attr('action')
|
||||
action
|
||||
@ -2940,9 +2940,28 @@ var BrowseActionsActions = actions.Actions({
|
||||
}
|
||||
this.keyboard.handler('General', '?', 'showDoc')
|
||||
this.menu(showDoc.bind(this))
|
||||
|
||||
// handle ctrl-a -- toggle advanced mode...
|
||||
var toggleAdvanced = this.toggleAdvanced = function(){
|
||||
actions.toggleBrowseAdvanced()
|
||||
this.update()
|
||||
}
|
||||
this.keyboard.handler('General', 'ctrl-a', 'toggleAdvanced')
|
||||
}) })],
|
||||
|
||||
toggleBrowseAdvanced: ['System|Interface/-99: Advanced menu items',
|
||||
core.doc`Toggle advanced menu items...
|
||||
|
||||
An item can:
|
||||
- define a .mode() mothod
|
||||
- check .config['browse-advanced-mode'] to be 'on' / 'off'
|
||||
- return 'hidden' when needed
|
||||
or:
|
||||
- link to an action that behaves in a desired way:
|
||||
{mode: 'toggleBrowseActionKeys',}
|
||||
|
||||
See .toggleBrowseActionKeys(..) for an example.
|
||||
`,
|
||||
core.makeConfigToggler(
|
||||
'browse-advanced-mode',
|
||||
['off', 'on'])],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user