Moved code to init

This commit is contained in:
Tobias Reich 2014-03-25 15:25:28 +01:00
parent 1e54092994
commit 00156aa01a
3 changed files with 10 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -101,6 +101,14 @@ $(document).ready(function(){
else if (visible.albums()&&$("#search").val().length!==0) search.reset();
});
/* Fullscreen on mobile */
if (mobileBrowser()) {
$(document).on("touchend", "#image", function(e) {
if (visible.controls()) view.header.hide(e, 0);
else e.preventDefault();
});
}
/* Document */
$(document)

View File

@ -377,19 +377,6 @@ view = {
.bind("mouseenter", view.header.show)
.bind("mouseleave", view.header.hide);
// Fullscreen on mobile
if (mobileBrowser()) {
$(document).on("touchend", "#image", function(e) {
if (visible.controls()) {
view.header.hide(e, 0);
e.preventDefault();
} else {
view.header.show();
e.preventDefault();
}
});
}
lychee.animate(lychee.imageview, "fadeIn");
},