1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00
danbarberphoto/public/admin/javascripts/jquery.application.js
Dan Barber 8621da4d3b Removed localised paperclip plugin and added the gem. Added :preview
image size to photo attachment for admin interface.
2010-12-20 12:11:07 -05:00

17 lines
517 B
JavaScript

$(document).ready(function() {
$("#quicksearch").searchField();
$('.resource :input', document.myForm).bind("change", function() { setConfirmUnload(true); });
$("a.fancybox").fancybox({
'titlePosition': 'over',
'type': 'image'
});
});
function setConfirmUnload(on) {
window.onbeforeunload = (on) ? unloadMessage : null;
}
function unloadMessage() {
return "You have entered new data on this page. If you navigate away from this page without first saving your data, the changes will be lost.";
}