rescue method for js path mapping;

This commit is contained in:
Tobias Klika
2011-06-13 23:21:39 +02:00
parent 9cb4d5f2be
commit fde1665a42
2 changed files with 8 additions and 0 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

+8
View File
@@ -13,8 +13,16 @@ var login_path = "/login";
var logout_path = "/logout";
$(document).ready(function(){
// home path
Path.root(hashbang+home_path);
// redirect non existent links
// to the 404 page
Path.rescue(function(){
// TODO: link to 404 page
alert("404: Route Not Found");
});
// Setup default AJAX values
// for future requests
$.ajaxSetup({