1
0
Fork 0

add a confirm dialog and a busy rotator for delete selected

This commit is contained in:
Zach Prezkuta 2012-11-01 17:42:40 -06:00
commit 6effdd570c
11 changed files with 91 additions and 65 deletions

View file

@ -194,21 +194,26 @@ function initEditor(cb) {
});
function deleteCheckedItems() {
var checkedstr = '';
if(confirm('$delitems')) {
var checkedstr = '';
$('.item-select').each( function() {
if($(this).is(':checked')) {
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $(this).val();
}
else {
checkedstr = $(this).val();
}
}
});
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
$("#item-delete-selected").hide();
$('#item-delete-selected-rotator').show();
$('.item-select').each( function() {
if($(this).is(':checked')) {
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $(this).val();
}
else {
checkedstr = $(this).val();
}
}
});
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
}
}
function jotGetLink() {
@ -356,4 +361,4 @@ function initEditor(cb) {
$geotag
</script>
</script>