mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +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__ }),
|
return !!action.__event__ }),
|
||||||
|
|
||||||
// XXX revise...
|
// 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/',
|
getActionMode: ['- Interface/',
|
||||||
doc`Get action browse mode...
|
doc`Get action browse mode...
|
||||||
|
|
||||||
|
|||||||
@ -352,6 +352,7 @@ var LocationActions = actions.Actions({
|
|||||||
core.doc`Toggle index synchronization method
|
core.doc`Toggle index synchronization method
|
||||||
|
|
||||||
NOTE: this will not show disabled methods.`,
|
NOTE: this will not show disabled methods.`,
|
||||||
|
{mode: 'toggleBrowseActionKeys'},
|
||||||
toggler.Toggler(null,
|
toggler.Toggler(null,
|
||||||
function(_, state){
|
function(_, state){
|
||||||
var dict = this.location_sync_methods
|
var dict = this.location_sync_methods
|
||||||
|
|||||||
@ -2932,7 +2932,7 @@ var BrowseActionsActions = actions.Actions({
|
|||||||
actions.config['browse-actions-keys']
|
actions.config['browse-actions-keys']
|
||||||
&& this.dom.addClass('show-keys')
|
&& this.dom.addClass('show-keys')
|
||||||
|
|
||||||
// handle '?' button to browse path...
|
// handle '?' -- show doc...
|
||||||
var showDoc = this.showDoc = function(){
|
var showDoc = this.showDoc = function(){
|
||||||
var action = this.select('!').attr('action')
|
var action = this.select('!').attr('action')
|
||||||
action
|
action
|
||||||
@ -2940,9 +2940,28 @@ var BrowseActionsActions = actions.Actions({
|
|||||||
}
|
}
|
||||||
this.keyboard.handler('General', '?', 'showDoc')
|
this.keyboard.handler('General', '?', 'showDoc')
|
||||||
this.menu(showDoc.bind(this))
|
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',
|
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(
|
core.makeConfigToggler(
|
||||||
'browse-advanced-mode',
|
'browse-advanced-mode',
|
||||||
['off', 'on'])],
|
['off', 'on'])],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user