mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added 'loaded' mode to image index status indicator...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
98bff54606
commit
f41d77a022
@ -1482,12 +1482,16 @@ stretching in width... */
|
|||||||
.overlay-info .index .position.editable {
|
.overlay-info .index .position.editable {
|
||||||
cursor: text;
|
cursor: text;
|
||||||
}
|
}
|
||||||
|
.overlay-info .index.loaded:after,
|
||||||
.overlay-info .index.global:after {
|
.overlay-info .index.global:after {
|
||||||
content: "G";
|
content: "G";
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
|
||||||
font-size: small;
|
font-size: small;
|
||||||
}
|
}
|
||||||
|
.overlay-info .index.loaded:after {
|
||||||
|
content: "L";
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
.overlay-info .index.global:hover:after {
|
.overlay-info .index.global:hover:after {
|
||||||
content: "Global";
|
content: "Global";
|
||||||
|
|||||||
@ -142,6 +142,16 @@ var StatusBarActions = actions.Actions({
|
|||||||
// make an element...
|
// make an element...
|
||||||
if(typeof(item) == typeof('str')){
|
if(typeof(item) == typeof('str')){
|
||||||
var type = item
|
var type = item
|
||||||
|
var go = function(i){
|
||||||
|
i = i >= 1 ? i-1
|
||||||
|
: i == null ? 'current'
|
||||||
|
: i
|
||||||
|
that.focusImage(i,
|
||||||
|
item.hasClass('global') ?
|
||||||
|
'global'
|
||||||
|
: item.hasClass('loaded') ?
|
||||||
|
'loaded'
|
||||||
|
: undefined) }
|
||||||
item = $('<span>')
|
item = $('<span>')
|
||||||
.addClass(type)
|
.addClass(type)
|
||||||
.append(!(this.config['status-bar-index'] || {})['editable'] ?
|
.append(!(this.config['status-bar-index'] || {})['editable'] ?
|
||||||
@ -164,27 +174,15 @@ var StatusBarActions = actions.Actions({
|
|||||||
})
|
})
|
||||||
// select image when done...
|
// select image when done...
|
||||||
.on('edit-commit', function(_, text){
|
.on('edit-commit', function(_, text){
|
||||||
var i = parseInt(text)
|
go(parseInt(text)) })
|
||||||
i = i >= 1 ? i-1
|
|
||||||
: i == null ? 'current'
|
|
||||||
: i
|
|
||||||
that.focusImage(i,
|
|
||||||
item.hasClass('global') ? 'global' : undefined)
|
|
||||||
})
|
|
||||||
// update image position...
|
// update image position...
|
||||||
// XXX this appears to be run in the node context...
|
// XXX this appears to be run in the node context...
|
||||||
.keyup(function(){
|
.keyup(function(){
|
||||||
// XXX KeyboardEvent does not appear to have this...
|
// XXX KeyboardEvent does not appear to have this...
|
||||||
//event.stopPropagation()
|
//event.stopPropagation()
|
||||||
|
|
||||||
if((that.config['status-bar-index'] || {})['live-update-on-edit']){
|
(that.config['status-bar-index'] || {})['live-update-on-edit']
|
||||||
var i = parseInt($(this).text())
|
&& go(parseInt($(this).text()))
|
||||||
i = i >= 1 ? i-1
|
|
||||||
: i == null ? 'current'
|
|
||||||
: i
|
|
||||||
that.focusImage(i,
|
|
||||||
item.hasClass('global') ? 'global' : undefined)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.focus(function(){
|
.focus(function(){
|
||||||
$(this).selectText()
|
$(this).selectText()
|
||||||
@ -214,6 +212,11 @@ var StatusBarActions = actions.Actions({
|
|||||||
var i = this.data ? this.data.getImageOrder(gid) : -1
|
var i = this.data ? this.data.getImageOrder(gid) : -1
|
||||||
var l = this.data ? this.data.length : 0
|
var l = this.data ? this.data.length : 0
|
||||||
|
|
||||||
|
// loaded/crop index...
|
||||||
|
} else if(cls == 'loaded'){
|
||||||
|
var i = this.data ? this.data.getImageOrder('loaded', gid) : -1
|
||||||
|
var l = this.data ? this.data.getImages('loaded').len : 0
|
||||||
|
|
||||||
// ribbon index...
|
// ribbon index...
|
||||||
} else {
|
} else {
|
||||||
var i = this.data ? this.data.getImageOrder('ribbon', gid) : -1
|
var i = this.data ? this.data.getImageOrder('ribbon', gid) : -1
|
||||||
@ -698,8 +701,9 @@ var StatusBarActions = actions.Actions({
|
|||||||
}],
|
}],
|
||||||
toggleStatusBarIndexMode: ['Interface/Status bar index mode',
|
toggleStatusBarIndexMode: ['Interface/Status bar index mode',
|
||||||
toggler.CSSClassToggler(
|
toggler.CSSClassToggler(
|
||||||
function(){ return this.dom.find('.global-info .index') },
|
function(){
|
||||||
['normal', 'global'],
|
return this.dom.find('.global-info .index') },
|
||||||
|
['normal', 'loaded', 'global'],
|
||||||
function(state){
|
function(state){
|
||||||
this.toggleStatusBar('?') == 'none' && this.toggleStatusBar()
|
this.toggleStatusBar('?') == 'none' && this.toggleStatusBar()
|
||||||
|
|
||||||
|
|||||||
@ -898,7 +898,7 @@ var DataPrototype = {
|
|||||||
: offset > 0 ? 'after'
|
: offset > 0 ? 'after'
|
||||||
: mode
|
: mode
|
||||||
offset = Math.abs(offset)
|
offset = Math.abs(offset)
|
||||||
} else if(mode == 'global'){
|
} else if(mode == 'global' || mode == 'loaded'){
|
||||||
list = mode
|
list = mode
|
||||||
mode = 'before'
|
mode = 'before'
|
||||||
} else if(mode == 'next'){
|
} else if(mode == 'next'){
|
||||||
@ -926,6 +926,8 @@ var DataPrototype = {
|
|||||||
|| this.getRibbon(this.getImage(target, 'after', this.getImages()))]
|
|| this.getRibbon(this.getImage(target, 'after', this.getImages()))]
|
||||||
: list == 'global' ?
|
: list == 'global' ?
|
||||||
this.order
|
this.order
|
||||||
|
: list == 'loaded' ?
|
||||||
|
this.getImages('loaded')
|
||||||
: list instanceof Array ?
|
: list instanceof Array ?
|
||||||
this.makeSparseImages(list)
|
this.makeSparseImages(list)
|
||||||
: this.ribbons[this.getRibbon(list)]
|
: this.ribbons[this.getRibbon(list)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user