//XXX coreKit.coreMessager.subscribe(this, "BROWSE_start"); //XXX coreKit.coreMessager.subscribe(this, "BROWSE_stop"); coreKit.coreMessager.subscribe(this, "FOLDER_sort"); coreKit.coreMessager.subscribe(this, "FOLDER_selection");
switch (topic) {

case "FOLDER_selection": /* var selection = gContainer.selection; var itemCount = 0; for( item in selection ) itemCount++; if( itemCount == 0 ) { document.getElementById('selectbutton').setAttribute('disabled','false'); } else{ document.getElementById('selectbutton').setAttribute('disabled','true'); } */ break;

case "FOLDER_sort": var order = newData.order; var type = newData.type;

var el = document.getElementById('menu-sort-' + type.toLowerCase()); el.setAttribute('checked', 'true');

var invert = document.getElementById('menu-sort-invert'); invert.setAttribute('checked', (order == 'ascending') ? 'true' : 'false'); break;

}