Created
October 18, 2013 08:06
-
-
Save IliaIdakiev/7038082 to your computer and use it in GitHub Desktop.
Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).bind("keydown", disableF5); | |
function disableF5(e) { | |
if ((e.which || e.keyCode) == 116) { | |
if(confirm("Are you sure you want to continue? You will loose some of the filled information!")){ | |
return true; | |
} | |
else{ | |
e.preventDefault(); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function changeUrl(newId){ | |
var newLocation = window.location.pathname.replace('Details/0', 'Details/' + newId); | |
history.pushState('', 'New Page Title', newLocation); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function selectAll(sender) { | |
if ($(sender).is(':checked')) { | |
$("#routes").find('input[type=checkbox]').prop('checked', true); | |
} | |
else { | |
$("#routes").find('input[type=checkbox]').prop('checked', false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment