mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-31 19:30:07 +00:00
some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2087d0768a
commit
bda241f7ad
@ -110,6 +110,13 @@ Roadmap
|
||||
|
||||
[_] 30% Gen 3 current todo
|
||||
[_] 60% High priority
|
||||
[_] BUG: editor also affects the image background and border...
|
||||
| to view just set invert to 1
|
||||
| - background turns white...
|
||||
| - red border turns blue...
|
||||
|
|
||||
| need to either compensate or figure out a way to work around
|
||||
| this without adding ne tags...
|
||||
[_] BUG: OSX: unable to load absolute paths...
|
||||
[_] OSX: add alternatives to function buttons...
|
||||
[_] Feature: basic editor...
|
||||
|
||||
@ -9,7 +9,9 @@
|
||||
|
||||
/*********************************************************************/
|
||||
|
||||
var toggleEditor = createCSSClassToggler('.viewer', '.editor-visible',
|
||||
var toggleEditor = createCSSClassToggler(
|
||||
'.viewer',
|
||||
'.editor-visible',
|
||||
function(action){
|
||||
var ed = $('.panel')
|
||||
|
||||
@ -25,7 +27,6 @@ var toggleEditor = createCSSClassToggler('.viewer', '.editor-visible',
|
||||
$('.panel :focus').blur()
|
||||
}
|
||||
}))
|
||||
|
||||
// setup the event to update the editor...
|
||||
.on('focusingImage', function(){
|
||||
if(toggleEditor('?') == 'on'){
|
||||
|
||||
@ -118,6 +118,8 @@ var KEYBOARD_CONFIG = {
|
||||
|
||||
// dialogs...
|
||||
//
|
||||
// NOTE: editor effects are not documented, but should be obvious...
|
||||
// XXX is this the case?
|
||||
'.viewer.overlay .overlay-block.dialog, .panel :focus': {
|
||||
title: 'Dialog',
|
||||
doc: 'NOTE: to <i>close</i> a dialog, in addition to the keyaboard '+
|
||||
@ -128,11 +130,12 @@ var KEYBOARD_CONFIG = {
|
||||
'insert-return': doc('Insert return'),
|
||||
|
||||
Enter: {
|
||||
default: doc('Accept dialog / input',
|
||||
default: doc('Accept dialog',
|
||||
function(){
|
||||
var f = $(':focus')
|
||||
|
||||
// trigger the default button action...
|
||||
// trigger the default button/summary action...
|
||||
// NOTE: for some reason checkboxes in dialogs do not work (not a biggie)...
|
||||
if(f.length > 0
|
||||
&& (/button|summary/i.test(f[0].tagName)
|
||||
|| /button|checkbox/i.test(f.attr('type')))){
|
||||
@ -140,7 +143,7 @@ var KEYBOARD_CONFIG = {
|
||||
// prevent the key from propagating to the viewer...
|
||||
return false
|
||||
|
||||
// accept the input...
|
||||
// accept the input -- e.g. remove focus from it...
|
||||
} else if(toggleEditor('?') == 'on'){
|
||||
f.blur()
|
||||
// prevent the key from propagating to the viewer...
|
||||
@ -157,18 +160,15 @@ var KEYBOARD_CONFIG = {
|
||||
},
|
||||
Esc: doc('Close dialog',
|
||||
function(){
|
||||
// hide the overlay...
|
||||
if(isOverlayVisible('.viewer')){
|
||||
//getOverlay($('.viewer')).trigger('close')
|
||||
hideOverlay($('.viewer'))
|
||||
return false
|
||||
|
||||
// blur focused element, if nothing focused close...
|
||||
} else if(toggleEditor('?') == 'on'){
|
||||
var f = $(':focus')
|
||||
if(f.length > 0){
|
||||
f.blur()
|
||||
} else {
|
||||
toggleEditor('off')
|
||||
}
|
||||
$(':focus').blur()
|
||||
}
|
||||
}),
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user