Do not cache has-selection in diff view js

This commit is contained in:
Jesse van den Kieboom 2014-07-01 11:24:33 +02:00
parent 8f86a7bc6d
commit f3fa97864a

View file

@ -166,20 +166,13 @@ function has_class(e, cls)
return e.classList.contains(cls);
}
var has_selection = false;
function update_has_selection()
{
var selection = document.querySelectorAll('tr.added.selected, tr.removed.selected');
var hs = (selection.length != 0);
if (hs != has_selection)
{
has_selection = hs;
var v = has_selection ? "yes" : "no";
xhr_get('internal', {action: 'selection-changed', value: v});
}
var v = hs ? "yes" : "no";
xhr_get('internal', {action: 'selection-changed', value: v});
}
function prepare_patchset(filediv)