// if current row is selected, send another select event to re-sync data that the client code fetches on selects
if ( obj.node.view.selection.isSelected( idx ) ) {
dump('dispatching select event for on_retrieve for idx = ' + idx + '\n');
- util.widgets.dispatch('select',params.row_node);
+ util.widgets.dispatch('select',obj.node);
}
} catch(E) {
alert('fixme2: ' + E);
// if current row is selected, send another select event to re-sync data that the client code fetches on selects
if ( obj.node.view.selection.isSelected( idx ) ) {
dump('dispatching select event for on_retrieve for idx = ' + idx + '\n');
- util.widgets.dispatch('select',params.row_node);
+ util.widgets.dispatch('select',obj.node);
}
} catch(E) {
alert('fixme2: ' + E);
setTimeout( function() { obj.auto_retrieve(); }, 0 );
+ JSAN.use('util.widgets'); util.widgets.dispatch('select',obj.node);
+
return params;
},
params.row = row;
obj._map_row_to_listcell(params,listitem);
obj.node.appendChild( listitem );
- util.widgets.dispatch('select',params.row_node);
+ util.widgets.dispatch('select',obj.node);
}
if (typeof params.retrieve_row == 'function') {
circ.copy_status.prototype = {
'selection_list' : [],
- 'list_barcode_map' : {},
+ 'list_copyid_map' : {},
'init' : function( params ) {
if (!refresh) {
var nparams = obj.list.append(params);
if (!document.getElementById('trim_list').checked) {
- if (typeof obj.list_barcode_map[barcode] == 'undefined') obj.list_barcode_map[barcode] =[];
- obj.list_barcode_map[barcode].push(nparams);
+ if (typeof obj.list_copyid_map[details.copy.id()] == 'undefined') obj.list_copyid_map[details.copy.id()] =[];
+ obj.list_copyid_map[details.copy.id()].push(nparams);
}
} else {
if (!document.getElementById('trim_list').checked) {
- for (var i = 0; i < obj.list_barcode_map[barcode].length; i++) {
- params.my_node = obj.list_barcode_map[barcode][i].my_node;
- obj.list.refresh_row(params);
- }
+ if (typeof obj.list_copyid_map[details.copy.id()] != 'undefined') {
+ for (var i = 0; i < obj.list_copyid_map[details.copy.id()].length; i++) {
+ if (typeof obj.list_copyid_map[details.copy.id()][i] == 'undefined') {
+ obj.list.append(params);
+ } else {
+ params.my_node = obj.list_copyid_map[details.copy.id()][i].my_node;
+ obj.list.refresh_row(params);
+ }
+ }
+ } else {
+ obj.list.append(params);
+ }
} else {
obj.list.append(params);
}