Blame view

sources/apps/gallery/js/public.js 568 Bytes
42e4f8d60   Kload   add all apps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  $(document).ready(function () {
  	if ($('#body-login').length > 0) {
  		return true; //deactivate on login page
  	}
  	if ($('#filesApp').val() && $('#isPublic').val()) {
  		images = $("#fileList").find("tr[data-mime^='image']").length;
  		if (images > 0) {
  			button = $('<div class="button" style="float:right; font-weight:normal;"></div>');
  			button.append(t('gallery', 'Picture view' ));
  			$('#controls').append(button);
  
  			button.click( function (event) {
  				window.location.href = window.location.href.replace('service=files', 'service=gallery');
  			});
  		}
  	}
  });