re-setup repolist after longpoll refresh

This commit is contained in:
Joey Hess 2013-03-14 14:50:44 -04:00
parent 7289f92522
commit f3c999062d
2 changed files with 28 additions and 20 deletions

View file

@ -3,12 +3,15 @@
connfails=0;
longpollcallbacks = $.Callbacks();
function longpoll(url, divid, cont, fail) {
$.ajax({
'url': url,
'dataType': 'html',
'success': function(data, status, jqxhr) {
$('#' + divid).replaceWith(data);
longpollcallbacks.fire();
connfails=0;
cont();
},

View file

@ -1,4 +1,5 @@
$(function() {
var setup = function() {
$("#costsortable").sortable({
handle: ".handle",
cursor: "move",
@ -19,4 +20,8 @@ $(function() {
});
},
});
};
longpollcallbacks.add(setup);
setup();
});