forked from leftypol/leftypol
quick-post-controls.js: fix javascript interactions
This commit is contained in:
parent
a2b432cfb0
commit
fb3b9ea868
1 changed files with 7 additions and 1 deletions
|
@ -71,10 +71,16 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$('div.post input[type=checkbox].delete').each(function() {
|
var init_qpc = function() {
|
||||||
$(this).change(open_form);
|
$(this).change(open_form);
|
||||||
if(this.checked)
|
if(this.checked)
|
||||||
$(this).trigger('change');
|
$(this).trigger('change');
|
||||||
|
};
|
||||||
|
|
||||||
|
$('div.post input[type=checkbox].delete').each(init_qpc);
|
||||||
|
|
||||||
|
$(document).bind('new_post', function(e, post) {
|
||||||
|
$(post).find('input[type=checkbox].delete').each(init_qpc);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue