re-setup repolist after longpoll refresh
This commit is contained in:
parent
7289f92522
commit
f3c999062d
2 changed files with 28 additions and 20 deletions
|
@ -3,12 +3,15 @@
|
||||||
|
|
||||||
connfails=0;
|
connfails=0;
|
||||||
|
|
||||||
|
longpollcallbacks = $.Callbacks();
|
||||||
|
|
||||||
function longpoll(url, divid, cont, fail) {
|
function longpoll(url, divid, cont, fail) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
'url': url,
|
'url': url,
|
||||||
'dataType': 'html',
|
'dataType': 'html',
|
||||||
'success': function(data, status, jqxhr) {
|
'success': function(data, status, jqxhr) {
|
||||||
$('#' + divid).replaceWith(data);
|
$('#' + divid).replaceWith(data);
|
||||||
|
longpollcallbacks.fire();
|
||||||
connfails=0;
|
connfails=0;
|
||||||
cont();
|
cont();
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
|
var setup = function() {
|
||||||
$("#costsortable").sortable({
|
$("#costsortable").sortable({
|
||||||
handle: ".handle",
|
handle: ".handle",
|
||||||
cursor: "move",
|
cursor: "move",
|
||||||
|
@ -19,4 +20,8 @@ $(function() {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
longpollcallbacks.add(setup);
|
||||||
|
setup();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue