mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40:08 +00:00
refining the status bar index...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
64e62120c6
commit
100d9045dc
@ -113,13 +113,18 @@ var StatusBarActions = actions.Actions({
|
|||||||
|
|
||||||
var n = keyboard.toKeyName(event.keyCode)
|
var n = keyboard.toKeyName(event.keyCode)
|
||||||
|
|
||||||
|
var i = parseInt($(this).text())
|
||||||
|
i = i >= 1 ? i-1
|
||||||
|
: i == null ? 'current'
|
||||||
|
: i
|
||||||
|
|
||||||
// lose focus and exit...
|
// lose focus and exit...
|
||||||
if(n == 'Esc' || n == 'Enter'){
|
if(n == 'Esc' || n == 'Enter'){
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
// get image on enter...
|
// get image on enter...
|
||||||
if(n == 'Enter'){
|
if(n == 'Enter'){
|
||||||
that.focusImage(parseInt($(this).text())-1 || 'current',
|
that.focusImage(i,
|
||||||
item.hasClass('global') ? 'global' : undefined)
|
item.hasClass('global') ? 'global' : undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,10 +132,7 @@ var StatusBarActions = actions.Actions({
|
|||||||
window.getSelection().removeAllRanges()
|
window.getSelection().removeAllRanges()
|
||||||
$(this).blur()
|
$(this).blur()
|
||||||
|
|
||||||
// reset on esc...
|
|
||||||
if(n == 'Esc'){
|
|
||||||
that.updateStatusBar()
|
that.updateStatusBar()
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -140,7 +142,7 @@ var StatusBarActions = actions.Actions({
|
|||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
|
|
||||||
that.config['status-bar-index']['live-update-on-edit']
|
that.config['status-bar-index']['live-update-on-edit']
|
||||||
&& that.focusImage(parseInt($(this).text())-1,
|
&& that.focusImage(i,
|
||||||
item.hasClass('global') ? 'global' : undefined)
|
item.hasClass('global') ? 'global' : undefined)
|
||||||
})
|
})
|
||||||
.click(function(){
|
.click(function(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user