mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +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;
|
||||
}
|
||||
|
||||
/* 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 {
|
||||
content: "1";
|
||||
}
|
||||
@ -348,6 +354,7 @@
|
||||
.browse-widget:not(.no-item-numbers) .list .item:nth-of-type(10):before {
|
||||
content: "0";
|
||||
}
|
||||
*/
|
||||
|
||||
.browse-widget .list hr.separator {
|
||||
opacity: 0.3;
|
||||
|
||||
@ -743,11 +743,15 @@ function(list, options){
|
||||
UP: [options.shift_up_button || '⏶',
|
||||
function(p, e){
|
||||
move(p, -1)
|
||||
&& e.prev().before(e) }],
|
||||
&& e.prev().before(e)
|
||||
// XXX hackish...
|
||||
&& dialog.updateItemNumbers() }],
|
||||
DOWN: [options.shift_down_button || '⏷',
|
||||
function(p, e){
|
||||
move(p, 1)
|
||||
&& e.next().after(e) }],
|
||||
&& e.next().after(e)
|
||||
// XXX hackish...
|
||||
&& dialog.updateItemNumbers() }],
|
||||
TO_TOP: [
|
||||
(options.to_top_button === true
|
||||
|| buttons.indexOf('TO_TOP') >= 0) ?
|
||||
@ -755,7 +759,10 @@ function(list, options){
|
||||
: options.to_top_button,
|
||||
function(p, e){
|
||||
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: [
|
||||
(options.to_bottom_button === true
|
||||
@ -764,7 +771,10 @@ function(list, options){
|
||||
: options.to_bottom_button,
|
||||
function(p, e){
|
||||
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(
|
||||
to_remove,
|
||||
@ -839,6 +849,7 @@ function(list, options){
|
||||
.toArray()
|
||||
var l = dialog.__list[id]
|
||||
l.splice.apply(l, [0, l.length].concat(order))
|
||||
dialog.updateItemNumbers()
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -2447,10 +2458,26 @@ var BrowserPrototype = {
|
||||
if(focus && browser.find(':focus').length == 0){
|
||||
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...
|
||||
//
|
||||
// General signature...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user