mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
added context menu help to .browseActions(..)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a2cd1c3557
commit
e07e627351
@ -1781,12 +1781,14 @@ var BrowseActionsActions = actions.Actions({
|
||||
&& this.dom.addClass('show-keys')
|
||||
|
||||
// handle '?' button to browse path...
|
||||
this.showDoc = function(){
|
||||
var showDoc = this.showDoc = function(){
|
||||
var action = this.select('!').attr('action')
|
||||
action
|
||||
&& actions.showDoc(action)
|
||||
}
|
||||
this.keyboard.handler('General', '?', 'showDoc')
|
||||
|
||||
this.menu(showDoc.bind(this))
|
||||
})
|
||||
|
||||
return dialog
|
||||
|
||||
@ -1717,7 +1717,7 @@ var BrowserPrototype = {
|
||||
return this
|
||||
},
|
||||
blur: widget.proxyToDom('blur'),
|
||||
|
||||
menu: widget.proxyToDom('menu'),
|
||||
|
||||
// base api...
|
||||
|
||||
@ -2033,6 +2033,8 @@ var BrowserPrototype = {
|
||||
// // the list update.
|
||||
// update: <handler>,
|
||||
//
|
||||
// menu: <handler>,
|
||||
//
|
||||
// <event>: <handler>,
|
||||
// ...
|
||||
// },
|
||||
@ -2394,6 +2396,10 @@ var BrowserPrototype = {
|
||||
.click(function(){
|
||||
!$(this).hasClass('disabled')
|
||||
&& that.push($(this)) })
|
||||
.on('contextmenu', function(){
|
||||
that.select($(this))
|
||||
res.trigger('menu', txt)
|
||||
})
|
||||
// append text elements...
|
||||
.append(p)
|
||||
|
||||
|
||||
@ -19,7 +19,16 @@ var proxyToDom =
|
||||
module.proxyToDom =
|
||||
function(name){
|
||||
return function(){
|
||||
this.dom[name].apply(this.dom, arguments)
|
||||
// easy handler...
|
||||
if(name in this.dom){
|
||||
this.dom[name].apply(this.dom, arguments)
|
||||
|
||||
// trigger...
|
||||
} else {
|
||||
arguments[0] instanceof Function ?
|
||||
this.dom.on(name, arguments[0])
|
||||
: this.dom.trigger(name, [].slice.call(arguments))
|
||||
}
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user