mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8da34990b5
commit
cb839de7ef
@ -317,7 +317,13 @@
|
|||||||
margin-left: -15px;
|
margin-left: -15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX these are messed up with groups... */
|
/* XXX use :nth-match(..) ass soon as it gets enough support... */
|
||||||
|
.browse-widget:not(.no-item-numbers) .list .item:not(.heading):before {
|
||||||
|
content: attr(shortcut-number);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* XXX these are messed up with groups, use :nth-match(..) ass soon as it gets enough support... */
|
||||||
|
/*
|
||||||
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(1):before {
|
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(1):before {
|
||||||
content: "1";
|
content: "1";
|
||||||
}
|
}
|
||||||
@ -348,6 +354,7 @@
|
|||||||
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(10):before {
|
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(10):before {
|
||||||
content: "0";
|
content: "0";
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
.browse-widget .list hr.separator {
|
.browse-widget .list hr.separator {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
|
|||||||
@ -743,11 +743,15 @@ function(list, options){
|
|||||||
UP: [options.shift_up_button || '⏶',
|
UP: [options.shift_up_button || '⏶',
|
||||||
function(p, e){
|
function(p, e){
|
||||||
move(p, -1)
|
move(p, -1)
|
||||||
&& e.prev().before(e) }],
|
&& e.prev().before(e)
|
||||||
|
// XXX hackish...
|
||||||
|
&& dialog.updateItemNumbers() }],
|
||||||
DOWN: [options.shift_down_button || '⏷',
|
DOWN: [options.shift_down_button || '⏷',
|
||||||
function(p, e){
|
function(p, e){
|
||||||
move(p, 1)
|
move(p, 1)
|
||||||
&& e.next().after(e) }],
|
&& e.next().after(e)
|
||||||
|
// XXX hackish...
|
||||||
|
&& dialog.updateItemNumbers() }],
|
||||||
TO_TOP: [
|
TO_TOP: [
|
||||||
(options.to_top_button === true
|
(options.to_top_button === true
|
||||||
|| buttons.indexOf('TO_TOP') >= 0) ?
|
|| buttons.indexOf('TO_TOP') >= 0) ?
|
||||||
@ -755,7 +759,10 @@ function(list, options){
|
|||||||
: options.to_top_button,
|
: options.to_top_button,
|
||||||
function(p, e){
|
function(p, e){
|
||||||
var d = move(p, -dialog.__list[id].length)
|
var d = move(p, -dialog.__list[id].length)
|
||||||
d && e.prevAll().eq(Math.abs(d+1)).before(e)
|
d
|
||||||
|
&& e.prevAll().eq(Math.abs(d+1)).before(e)
|
||||||
|
// XXX hackish...
|
||||||
|
&& dialog.updateItemNumbers()
|
||||||
}],
|
}],
|
||||||
TO_BOTTOM: [
|
TO_BOTTOM: [
|
||||||
(options.to_bottom_button === true
|
(options.to_bottom_button === true
|
||||||
@ -764,7 +771,10 @@ function(list, options){
|
|||||||
: options.to_bottom_button,
|
: options.to_bottom_button,
|
||||||
function(p, e){
|
function(p, e){
|
||||||
var d = move(p, dialog.__list[id].length)
|
var d = move(p, dialog.__list[id].length)
|
||||||
d && e.nextAll().eq(Math.abs(d-1)).after(e)
|
d
|
||||||
|
&& e.nextAll().eq(Math.abs(d-1)).after(e)
|
||||||
|
// XXX hackish...
|
||||||
|
&& dialog.updateItemNumbers()
|
||||||
}],
|
}],
|
||||||
REMOVE: Buttons.markForRemoval(
|
REMOVE: Buttons.markForRemoval(
|
||||||
to_remove,
|
to_remove,
|
||||||
@ -839,6 +849,7 @@ function(list, options){
|
|||||||
.toArray()
|
.toArray()
|
||||||
var l = dialog.__list[id]
|
var l = dialog.__list[id]
|
||||||
l.splice.apply(l, [0, l.length].concat(order))
|
l.splice.apply(l, [0, l.length].concat(order))
|
||||||
|
dialog.updateItemNumbers()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -2447,10 +2458,26 @@ var BrowserPrototype = {
|
|||||||
if(focus && browser.find(':focus').length == 0){
|
if(focus && browser.find(':focus').length == 0){
|
||||||
that.focus()
|
that.focus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX hackish...
|
||||||
|
that.updateItemNumbers()
|
||||||
})
|
})
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// XXX hackish -- move this back to CSS as soon as :nth-match(..) gets
|
||||||
|
// enough support...
|
||||||
|
updateItemNumbers: function(){
|
||||||
|
this.dom
|
||||||
|
.find('[shortcut-number]')
|
||||||
|
.removeAttr('shortcut-number')
|
||||||
|
this.filter('*')
|
||||||
|
.slice(0, 10)
|
||||||
|
.each(function(i){
|
||||||
|
$(this).attr('shortcut-number', (i+1)%10) })
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
|
||||||
// Filter the item list...
|
// Filter the item list...
|
||||||
//
|
//
|
||||||
// General signature...
|
// General signature...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user