Fixed view.php

This commit is contained in:
Tobias Reich 2015-02-01 21:21:58 +01:00
parent 65f4980bb8
commit 7a970a55ed
3 changed files with 23 additions and 11 deletions

BIN
dist/view.js vendored

Binary file not shown.

View File

@ -12,19 +12,19 @@ var header = $('header'),
$(document).ready(function(){ $(document).ready(function(){
/* Event Name */ /* Event Name */
if ('ontouchend' in document.documentElement) event_name = 'touchend'; if ('ontouchend' in document.documentElement) eventName = 'touchend';
else event_name = 'click'; else eventName = 'click';
/* Window */ /* Window */
$(window).keydown(key); $(window).keydown(key);
/* Infobox */ /* Infobox */
$(document) .on(event_name, '#infobox .header a', hideInfobox); infobox.find('.header .close').on(eventName, hideInfobox);
$(document) .on(event_name, '#infobox_overlay', hideInfobox); $(document) .on(eventName, '#infobox_overlay', hideInfobox);
$('#button_info') .on(event_name, showInfobox); $('#button_info') .on(eventName, showInfobox);
/* Direct Link */ /* Direct Link */
$('#button_direct').on(event_name, function() { $('#button_direct').on(eventName, function() {
var link = $('#imageview #image').css('background-image').replace(/"/g,'').replace(/url\(|\)$/ig, ''); var link = $('#imageview #image').css('background-image').replace(/"/g,'').replace(/url\(|\)$/ig, '');
window.open(link, '_newtab'); window.open(link, '_newtab');
@ -123,7 +123,7 @@ loadPhotoInfo = function(photoID) {
.addClass('fadeIn') .addClass('fadeIn')
.show(); .show();
infobox.html(build.infoboxPhoto(data, true)).show(); infobox.find('.wrapper').html(build.infoboxPhoto(data, true));
}, error: ajaxError }); }, error: ajaxError });

View File

@ -48,9 +48,12 @@
<!-- Header --> <!-- Header -->
<header class="view"> <header class="view">
<!-- Buttons --> <a class="button button--right" id="button_info" title="About Photo">
<div class="tools" id="button_direct" title="Direct Link"><a class="icon-link"></a></div> <svg viewBox="0 0 8 8" class="iconic"><use xlink:href="src/images/iconic.svg#info"></use></svg>
<div class="tools" id="button_info" title="Show Info"><a class="icon-info-sign"></a></div> </a>
<a class="button button--right" id="button_direct" title="Direct Link">
<svg viewBox="0 0 8 8" class="iconic"><use xlink:href="src/images/iconic.svg#link-intact"></use></svg>
</a>
<a id="title" class="view"></a> <a id="title" class="view"></a>
@ -60,7 +63,16 @@
<div id="imageview" class="view"></div> <div id="imageview" class="view"></div>
<!-- Infobox --> <!-- Infobox -->
<div id="infobox"></div> <div id="infobox">
<div class='header'>
<h1>About</h1>
<a class='close' title='Close About'>
<svg viewBox="0 0 8 8" class="iconic"><use xlink:href="src/images/iconic.svg#circle-x"></use></svg>
</a>
</div>
<div class='wrapper'>
</div>
</div>
<!-- JS --> <!-- JS -->
<script type="text/javascript" src="dist/view.js"></script> <script type="text/javascript" src="dist/view.js"></script>