mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
docs + cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
cb839de7ef
commit
ed9ed63e21
@ -2465,13 +2465,27 @@ var BrowserPrototype = {
|
|||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Update item shortcut key number hints...
|
||||||
|
//
|
||||||
|
// Update hints...
|
||||||
|
// .updateItemNumbers()
|
||||||
|
// -> this
|
||||||
|
//
|
||||||
|
// Clear hints...
|
||||||
|
// .updateItemNumbers(true)
|
||||||
|
// -> this
|
||||||
|
//
|
||||||
|
// This should be called every time the list is modified manually,
|
||||||
|
// the automatic side of things is taken care of by .update(..)...
|
||||||
|
//
|
||||||
// XXX hackish -- move this back to CSS as soon as :nth-match(..) gets
|
// XXX hackish -- move this back to CSS as soon as :nth-match(..) gets
|
||||||
// enough support...
|
// enough support...
|
||||||
updateItemNumbers: function(){
|
updateItemNumbers: function(clear){
|
||||||
this.dom
|
this.dom
|
||||||
.find('[shortcut-number]')
|
.find('[shortcut-number]')
|
||||||
.removeAttr('shortcut-number')
|
.removeAttr('shortcut-number')
|
||||||
this.filter('*')
|
!clear
|
||||||
|
&& this.filter('*')
|
||||||
.slice(0, 10)
|
.slice(0, 10)
|
||||||
.each(function(i){
|
.each(function(i){
|
||||||
$(this).attr('shortcut-number', (i+1)%10) })
|
$(this).attr('shortcut-number', (i+1)%10) })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user