fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ea1a900
)
Asking for confirmation before deleting shelf.
author
Marek Stępniowski
<marek@stepniowski.com>
Fri, 5 Sep 2008 14:23:59 +0000
(16:23 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Fri, 5 Sep 2008 14:23:59 +0000
(16:23 +0200)
media/js/catalogue.js
patch
|
blob
|
history
diff --git
a/media/js/catalogue.js
b/media/js/catalogue.js
index
d403a70
..
ad5a7c2
100644
(file)
--- a/
media/js/catalogue.js
+++ b/
media/js/catalogue.js
@@
-101,6
+101,8
@@
hash.w.show();
},
onLoad: function(hash) {
hash.w.show();
},
onLoad: function(hash) {
+ var shelf_name = $('a.visit-shelf', this).html();
+
$('form', hash.w).ajaxForm({
target: $('#user-shelves-window div.target'),
success: function() { setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000) }
$('form', hash.w).ajaxForm({
target: $('#user-shelves-window div.target'),
success: function() { setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000) }
@@
-115,10
+117,12
@@
});
$('.delete-shelf').click(function() {
});
$('.delete-shelf').click(function() {
- $.post($(this).attr('href'), function(data, textStatus) {
- $('#user-shelves-window div.target').html(data);
- setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000);
- });
+ if (confirm('Czy na pewno usunąć półkę ' + shelf_name + '?')) {
+ $.post($(this).attr('href'), function(data, textStatus) {
+ $('#user-shelves-window div.target').html(data);
+ setTimeout(function() { $('#user-shelves-window').jqmHide() }, 1000);
+ });
+ }
return false;
});
}
return false;
});
}