Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
treecol.addEventListener(
'click',
function(ev) {
- dump('click\n');
if (ev.button == 2 /* context menu click */ || ev.target.getAttribute('no_sort')) {
return;
}
- if (document.popupNode
- && document.popupNode.nodeName == 'treecol'
- && document.popupNode.hasAttribute('locked')
- ) {
- return;
- }
- dump('click2\n');
if (ev.ctrlKey) { // sub sort
- dump('click3\n');
var sortDir = 'asc';
if (ev.shiftKey) {
sortDir = 'desc';
'sortDir' : sortDir
});
} else { // first sort
- dump('click4\n');
var sortDir = ev.target.getAttribute('sortDir') || 'desc';
if (sortDir == 'desc') sortDir = 'asc'; else sortDir = 'desc';
if (ev.shiftKey) {
treecol.addEventListener(
'sort',
function(ev) {
- dump('sort\n');
if (!obj.first_sort) {
return;
}
- dump('sort2\n');
function do_it() {
- dump('sort3\n');
obj._sort_tree();
}