Ignore:
Timestamp:
May 21, 2011, 3:19:26 PM (13 years ago)
Author:
nikrou
Message:

Update to make plugin compatible with piwigo 2.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/akBookStyle/trunk/js/ak_jquery-load.js

    r10863 r10975  
    1818
    1919          $a = $(this);
    20           next_thumbnail = $('table.thumbnails a[href='+$(this).attr('href')+']');         
     20          next_thumbnail = $('table.thumbnails a[href="'+$(this).attr('href')+'"]');
    2121          if (next_thumbnail.length==0) {
    2222            if ($a.attr('id')=='akNextPicture') {
     
    3131          } else {
    3232            next_thumbnail.parent().parent().parent().addClass('selected');
    33             try {
    34               $.get($a.attr('href'),{},
    35                     function success(data) {               
    36                       $('#akPicture')
    37                         .attr('src', data.AK_PIC_SRC)
    38                         .attr('alt', data.AK_PIC_ALT)
    39                         .attr('title', data.AK_PIC_TITLE);
    40 
    41                       if (data.AK_PREVIOUS) {
    42                         $('#akPreviousPicture')
    43                           .removeClass('hide')
    44                           .attr('href', data.AK_PREVIOUS);
    45                       } else {
    46                         $('#akPreviousPicture').addClass('hide');
    47                       }
    48                       if (data.AK_NEXT) {
    49                         $('#akNextPicture')
    50                           .removeClass('hide')
    51                           .attr('href', data.AK_NEXT);
    52                       } else {
    53                         $('#akNextPicture').addClass('hide');
    54                       }
    55                       $a.click(function(e) { e.preventDefault();});
    56                     },
    57                     'json');       
    58             } catch (e) {}
     33            $.get($a.attr('href'),{},
     34                  function success(data) {
     35                    $('#akPicture')
     36                      .attr('src', data.AK_PIC_SRC)
     37                      .attr('alt', data.AK_PIC_ALT)
     38                      .attr('title', data.AK_PIC_TITLE);
     39                   
     40                    if (data.AK_PREVIOUS) {
     41                      $('#akPreviousPicture')
     42                        .removeClass('hide')
     43                        .attr('href', data.AK_PREVIOUS);
     44                    } else {
     45                      $('#akPreviousPicture').addClass('hide');
     46                    }
     47                    if (data.AK_NEXT) {
     48                      $('#akNextPicture')
     49                        .removeClass('hide')
     50                        .attr('href', data.AK_NEXT);
     51                    } else {
     52                      $('#akNextPicture').addClass('hide');
     53                    }
     54                    $a.click(function(e) { e.preventDefault();});
     55                  },
     56                  'json');         
    5957          }
    6058          return false;
Note: See TracChangeset for help on using the changeset viewer.