Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created December 23, 2010 20:22
Show Gist options
  • Save ashaw/753493 to your computer and use it in GitHub Desktop.
Save ashaw/753493 to your computer and use it in GitHub Desktop.
updateSearchStatus : function(e, status) {
console.log(arguments);
var args = Array.prototype.slice.call(arguments)
var first = parseInt(args.slice(2,3),10) + 1;
var last = (function() {
var humanStatus = args.slice(1,2);
console.log(humanStatus.toString());
return (humanStatus.toString() === "atEnd" || humanStatus.toString() === "disableBoth")
? CompareFacilities.facilities.length : first + 3;
})();
$("#search_status_inner").html(JST.search_status({
first : first,
last : last,
total : CompareFacilities.facilities.length
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment