Skip to content

Commit fe206b3

Browse files
committed
Shave off several hundred ms from each tree operation on my i7 quad core whatever computer
1 parent 064a75a commit fe206b3

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

feincms/static/feincms/tree_editor.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,6 @@ feincms.jQuery.ajaxSetup({
1313
});
1414

1515
feincms.jQuery(function($){
16-
// recolor tree after expand/collapse
17-
$.extend($.fn.recolorRows = function() {
18-
$('tr:visible:even', this).removeClass('row1').addClass('row2');
19-
$('tr:visible:odd', this).removeClass('row2').addClass('row1');
20-
21-
/* Mark inactive rows */
22-
$('tr.item_inactive').removeClass('item_inactive');
23-
var in_wrap_active = $('div[id^=wrap_active_]');
24-
var in_wrap_input = $('input', in_wrap_active);
25-
$(':checkbox:not(:checked)', in_wrap_input).parents('tr').addClass('item_inactive');
26-
$('img', in_wrap_active).parents('tr').addClass('item_inactive');
27-
});
28-
2916
$(document.body).on('click', '[data-inplace]', function() {
3017
var elem = $(this),
3118
id = elem.data('inplace-id'),
@@ -45,7 +32,6 @@ feincms.jQuery(function($){
4532
var r_id = $(html).attr('id');
4633
$('#' + r_id).replaceWith(html);
4734
});
48-
$('#result_list tbody').recolorRows();
4935
},
5036

5137
error: function(xhr, status, err) {
@@ -312,7 +298,6 @@ feincms.jQuery(function($){
312298
});
313299
storeCollapsedNodes(feincms.collapsed_nodes);
314300
rlist.show();
315-
$('tbody', rlist).recolorRows();
316301
});
317302
return this;
318303
});
@@ -333,7 +318,6 @@ feincms.jQuery(function($){
333318
});
334319
storeCollapsedNodes([]);
335320
rlist.show();
336-
$('tbody', rlist).recolorRows();
337321
});
338322
return this;
339323
});
@@ -361,7 +345,6 @@ feincms.jQuery(function($){
361345
case 37: // left
362346
case 39: // right
363347
expandOrCollapseNode($(this).find('.page_marker'));
364-
$('#result_list tbody').recolorRows();
365348
break;
366349
case 13: // return
367350
where_to = extractItemId($('span', this).attr('id'));
@@ -385,8 +368,6 @@ feincms.jQuery(function($){
385368
event.stopPropagation();
386369

387370
expandOrCollapseNode($(this));
388-
389-
rlist_tbody.recolorRows();
390371
});
391372

392373
$('#collapse_entire_tree').bindCollapseTreeEvent();
@@ -416,5 +397,4 @@ feincms.jQuery(function($){
416397
}
417398

418399
rlist.show();
419-
$('tbody', rlist).recolorRows();
420400
});

0 commit comments

Comments
 (0)