--- trunk/public_html/koha.js 2009/03/29 01:29:13 81 +++ trunk/public_html/koha.js 2009/03/29 10:52:20 83 @@ -2,8 +2,10 @@ function update_selected( by ) { var e = $('#clear_selection'); - e.attr( 'value', parseInt( e.attr('value') ) + by ); - console.debug('selected', e.attr('value')); + var v = parseInt( e.attr('value') ); + e.attr( 'value', v + by ); + console.debug('selected', v); + return v; } function read_tag( id ) { @@ -15,7 +17,9 @@ console.error('element', id, 'allready exists', item); item.addClass('in_range'); } else { - $('#koha').append( '
Loading item '+id+' from Koha
' ) + var tabindex = update_selected(+1) + 1; + + $('#koha').append( '
Loading item '+id+' from Koha
' ) var item = $('#item'+id); @@ -27,8 +31,6 @@ item.removeClass('loading'); - update_selected(+1); - item.click( function() { // remove selected item this.fadeOut('slow', function() {