app/js/controllers.index.js in storys-0.0.2 vs app/js/controllers.index.js in storys-0.0.3
- old
+ new
@@ -1,5 +1,7 @@
+var lastControllerLocation = "#index!1";
+
controllers.index = function(search, sort, sortDirection) {
var _this = this;
function sortFor(type) {
if(!type) type = "publishedOn";
@@ -73,18 +75,18 @@
addStorys(storys);
$.twoup.layout();
}
this.render = function() {
+ lastControllerLocation = location.hash;
}
this.destroy = function() {
console.log("destroying index");
$("#search").unbind("keydown");
$("#clear-search").unbind("click");
$("a.sort").unbind("click");
$("a.sort-direction").unbind("click");
$("#stories").empty();
- $("#view-index").hammer().off("swiperight").off("swipeleft").off("drag");
$("#view-index").hide().removeClass("current-view");
}
}