mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 03:40:09 +00:00
disabled clipboard events in browser, added nw.js triggering, still not sure if we actually need them...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
56626a3480
commit
219726e71b
@ -148,6 +148,9 @@ var BrowserPrototype = {
|
||||
'/',
|
||||
'A',
|
||||
|
||||
'C',
|
||||
'V',
|
||||
'X',
|
||||
],
|
||||
|
||||
Enter: 'stopFullPathEdit!',
|
||||
@ -168,6 +171,10 @@ var BrowserPrototype = {
|
||||
'Esc',
|
||||
'/',
|
||||
'A',
|
||||
|
||||
'C',
|
||||
'V',
|
||||
'X',
|
||||
],
|
||||
|
||||
Enter: 'action!',
|
||||
@ -1239,23 +1246,33 @@ var BrowserPrototype = {
|
||||
})
|
||||
.keyup(function(){
|
||||
var e = $(this)
|
||||
// clear the list on edit...
|
||||
if(e.attr('contenteditable') && e.text() != dom.attr('orig-path')){
|
||||
dom.find('.list').empty()
|
||||
}
|
||||
})
|
||||
// handle paste...
|
||||
/* XXX
|
||||
// Handle copy/paste...
|
||||
//
|
||||
// Make the whole widget support copy/paste of current path.
|
||||
//
|
||||
// NOTE: on nw.js mode this will handle this via keyboard
|
||||
// directly, skipping the events and their quirks...
|
||||
//
|
||||
// XXX does not work on IE yet...
|
||||
// XXX do we handle other types???
|
||||
// ...try an get the path of anything...
|
||||
// ...try and get the path of anything, including files, dirs, etc...
|
||||
// XXX seems not to work until we cycle any of the editable
|
||||
// controls (filter/path), and then it still is on and
|
||||
// off...
|
||||
.on('paste', function(){
|
||||
// XXX does not work with ':not([contenteditable])' and kills
|
||||
// copy/paste on editable fields without...
|
||||
// XXX do we bother with these??
|
||||
.on('paste', ':not([contenteditable])', function(){
|
||||
event.preventDefault()
|
||||
that.paste()
|
||||
})
|
||||
// XXX handle copy...
|
||||
/* XXX
|
||||
// XXX does not work...
|
||||
.on('cut copy', function(){
|
||||
event.preventDefault()
|
||||
that.copy()
|
||||
@ -1281,6 +1298,25 @@ var BrowserPrototype = {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// nw.js copy/paste handling...
|
||||
//
|
||||
// XXX not sure if we actually need these...
|
||||
if(NW){
|
||||
// override copy...
|
||||
BrowserPrototype.keyboard.General.C = {
|
||||
ctrl: 'copy!',
|
||||
}
|
||||
BrowserPrototype.keyboard.General.X = 'C'
|
||||
|
||||
// override paste...
|
||||
BrowserPrototype.keyboard.General.V = {
|
||||
ctrl: 'paste!',
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
var Browser =
|
||||
module.Browser =
|
||||
object.makeConstructor('Browser',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user