item deletion: use js to delete items. so we don't have to reload the page
This commit is contained in:
parent
1f994aa17a
commit
b13eb01d3c
7 changed files with 74 additions and 8 deletions
|
@ -178,3 +178,18 @@ function qCommentInsert(obj,id) {
|
|||
}
|
||||
|
||||
function confirmDelete() { return confirm(aStr.delitem); }
|
||||
|
||||
function dropItem(url, object) {
|
||||
var confirm = confirmDelete();
|
||||
if(confirm) {
|
||||
$('body').css('cursor', 'wait');
|
||||
$(object).fadeTo('fast', 0.33, function () {
|
||||
$.get(url).done(function() {
|
||||
$(object).remove();
|
||||
$('body').css('cursor', 'auto');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
15
js/theme.js
15
js/theme.js
|
@ -68,6 +68,21 @@ $(document).ready(function(){
|
|||
if( $("#jot-popup").is(":hidden")) $("#topbar-second > .container > #navbar-button #jotOpen").hide();
|
||||
}
|
||||
|
||||
// show bulk deletion button at network page if checkbox is checked
|
||||
$('input.item-select').change(function(){
|
||||
|
||||
if($(this).is(':checked')) {
|
||||
$("a#item-delete-selected").fadeTo('slow', 1);
|
||||
$("a#item-delete-selected").show();
|
||||
} else {
|
||||
$("a#item-delete-selected").fadeTo('slow', 0, function(){
|
||||
$("a#item-delete-selected").hide();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// add search-headding to the scecond navbar
|
||||
if( $(".search-headding")) {
|
||||
$(".search-headding").appendTo("#topbar-second > .container > #tabmenu");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue