b8d03b5db91feda7e6e7f6c5e99af9d8903e8075
[friendica.git/.git] / view / theme / frio / js / mod_photos.js
1
2 $(document).ready(function() {
3
4         $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
5                 var selstr;
6                 $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
7                         selstr = $(this).text();
8                         $('#jot-perms-icon').removeClass('unlock').addClass('lock');
9                         $('#jot-public').hide();
10                 });
11                 if(selstr == null) { 
12                         $('#jot-perms-icon').removeClass('lock').addClass('unlock');
13                         $('#jot-public').show();
14                 }
15
16         }).trigger('change');
17
18
19 });
20
21 $(window).load(function() {
22         // Get picture dimensions
23         var pheight = $("#photo-photo img").height();
24         var pwidth = $("#photo-photo img").width();
25
26         // Append the diminsons of the picture to the css of the photo-photo div
27         // we do this to make it possible to have overlay navigation buttons for the photo
28         $("#photo-photo").css({
29                 "width": pwidth,
30                 "height": pheight
31         });
32 });