@@ -3,13 +3,8 @@ $(document).ready(function() {
|
|||||||
$('#delete-link').click( function(e) {
|
$('#delete-link').click( function(e) {
|
||||||
var ok = confirm($(this).data('confirm'));
|
var ok = confirm($(this).data('confirm'));
|
||||||
if ( ok ) {
|
if ( ok ) {
|
||||||
var href = window.location.href;
|
var loc = window.location;
|
||||||
var index = href.lastIndexOf('/');
|
loc = loc.protocol + '//' + loc.host + '/delete' + loc.pathname
|
||||||
// /home
|
|
||||||
var page = href.substr(index);
|
|
||||||
// http://localhost:4567/
|
|
||||||
var host = href.substr(0, index+1);
|
|
||||||
var loc = host + 'delete' + page;
|
|
||||||
window.location = loc;
|
window.location = loc;
|
||||||
}
|
}
|
||||||
// Don't navigate on cancel.
|
// Don't navigate on cancel.
|
||||||
|
|||||||
Reference in New Issue
Block a user