Plugin Directory

Changeset 1780568


Ignore:
Timestamp:
12/04/2017 08:37:28 AM (8 years ago)
Author:
agriboed
Message:

Small fixes

Location:
wp-fancybox-3
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • wp-fancybox-3/tags/1.0.6/templates/admin.php

    r1779309 r1780568  
    163163            <td>
    164164                <input type="text"
    165                        placeholder="Small Buttons"
     165                       placeholder="<?php _e('Small Buttons', $key); ?>"
    166166                       name="<?php echo $key; ?>[smallBtn]"
    167167                       value="<?php echo !empty($options['smallBtn']) ? $options['smallBtn'] : ''; ?>">
     
    383383                    <?php _e('Speed', $key); ?>
    384384                    <input type="number" min="0" step="1"
    385                            placeholder="Speed"
     385                           placeholder="<?php _e('Speed'); ?>"
    386386                           name="<?php echo $key; ?>[slideShow][speed]" <?php echo !empty($options['slideShow']['speed']) ? $options['slideShow']['speed'] : '400'; ?>>
    387387                </label>
     
    415415                    <?php _e('Close', $key); ?>
    416416                    <input type="text"
    417                            placeholder="Close"
     417                           placeholder="<?php _e('Close', $key); ?>"
    418418                           name="<?php echo $key; ?>[translation][close]"
    419419                           value="<?php echo !empty($options['translation']['close']) ? $options['translation']['close'] : ''; ?>">
     
    423423                    <?php _e('Next', $key); ?>
    424424                    <input type="text"
    425                            placeholder="Next"
     425                           placeholder="<?php _e('Next', $key); ?>"
    426426                           name="<?php echo $key; ?>[translation][next]"
    427427                           value="<?php echo !empty($options['translation']['next']) ? $options['translation']['next'] : ''; ?>">
     
    431431                    <?php _e('Previous', $key); ?>
    432432                    <input
    433                             placeholder="Previous"
     433                            placeholder="<?php _e('Previous'); ?>"
    434434                            name="<?php echo $key; ?>[translation][prev]"
    435435                            value="<?php echo !empty($options['translation']['prev']) ? $options['translation']['prev'] : ''; ?>">
     
    438438                <label>
    439439                    <?php _e('Error', $key); ?>
    440                     <input placeholder="Error"
     440                    <input placeholder="<?php _e('Error', $key); ?>"
    441441                           name="<?php echo $key; ?>[translation][error]"
    442442                           value="<?php echo !empty($options['translation']['error']) ? $options['translation']['error'] : ''; ?>">
     
    446446                    <?php _e('Start slideshow', $key); ?>
    447447                    <input type="text"
    448                            placeholder="Start slideshow"
     448                           placeholder="<?php _e('Start slideshow', $key); ?>"
    449449                           name="<?php echo $key; ?>[translation][start]"
    450450                           value="<?php echo !empty($options['translation']['start']) ? $options['translation']['start'] : ''; ?>">
  • wp-fancybox-3/tags/1.0.6/templates/front.php

    r1779309 r1780568  
    11<script type="text/javascript">
    2     jQuery(document).ready(function () {
    3         var e = jQuery('<?php echo $selector;?>');<?php
    4         $s = '{';
    5         $s .= 'loop: ' . (!empty($options['loop']) ? 'true' : 'false') . ',';
    6         $s .= 'margin: [' . (!empty($options['margin']['v']) ? (float)$options['margin']['v'] : '44') . ',' . (!empty($options['margin']['h']) ? (float)$options['margin']['h'] : '0') . '],';
    7         $s .= !empty($options['gutter']) ? 'gutter : ' . (float)$options['gutter'] . ',' : '';
    8         $s .= 'keyboard: ' . (!empty($options['keyboard']) ? 'true' : 'false') . ',';
    9         $s .= 'arrows: ' . (!empty($options['arrows']) ? 'true' : 'false') . ',';
    10         $s .= 'infobar: ' . (!empty($options['infobar']) ? 'true' : 'false') . ',';
    11         $s .= 'toolbar: ' . (!empty($options['toolbar']) ? 'true' : 'false') . ',';
     2    try {
     3        jQuery(document).ready(function () {
     4            var e = jQuery('<?php echo $selector;?>');<?php
     5            $s = '{';
     6            $s .= 'loop: ' . (!empty($options['loop']) ? 'true' : 'false') . ',';
     7            $s .= 'margin: [' . (!empty($options['margin']['v']) ? (float)$options['margin']['v'] : '44') . ',' . (!empty($options['margin']['h']) ? (float)$options['margin']['h'] : '0') . '],';
     8            $s .= !empty($options['gutter']) ? 'gutter : ' . (float)$options['gutter'] . ',' : '';
     9            $s .= 'keyboard: ' . (!empty($options['keyboard']) ? 'true' : 'false') . ',';
     10            $s .= 'arrows: ' . (!empty($options['arrows']) ? 'true' : 'false') . ',';
     11            $s .= 'infobar: ' . (!empty($options['infobar']) ? 'true' : 'false') . ',';
     12            $s .= 'toolbar: ' . (!empty($options['toolbar']) ? 'true' : 'false') . ',';
    1213
    13         $s .= 'buttons: [';
    14         $s .= !empty($options['buttons']['slideShow']) ? "'slideShow'," : '';
    15         $s .= !empty($options['buttons']['fullScreen']) ? "'fullScreen'," : '';
    16         $s .= !empty($options['buttons']['thumbs']) ? "'thumbs'," : '';
    17         $s .= !empty($options['buttons']['close']) ? "'close'" : '';
    18         $s .= '],';
     14            $s .= 'buttons: [';
     15            $s .= !empty($options['buttons']['slideShow']) ? "'slideShow'," : '';
     16            $s .= !empty($options['buttons']['fullScreen']) ? "'fullScreen'," : '';
     17            $s .= !empty($options['buttons']['thumbs']) ? "'thumbs'," : '';
     18            $s .= !empty($options['buttons']['close']) ? "'close'" : '';
     19            $s .= '],';
    1920
    20         $s .= !empty($options['idleTime']) ? 'idleTime: ' . (int)$options['idleTime'] . ',' : '';
    21         $s .= !empty($options['smallBtn']) ? "smallBtn: '" . $options['smallBtn'] . "'," : '';
     21            $s .= !empty($options['idleTime']) ? 'idleTime: ' . (int)$options['idleTime'] . ',' : '';
     22            $s .= !empty($options['smallBtn']) ? "smallBtn: '" . $options['smallBtn'] . "'," : '';
    2223
    23         $s .= 'protect:' . (!empty($options['protect']) ? 'true' : 'false') . ',';
    24         $s .= 'modal:' . (!empty($options['modal']) ? 'true' : 'false') . ',';
     24            $s .= 'protect:' . (!empty($options['protect']) ? 'true' : 'false') . ',';
     25            $s .= 'modal:' . (!empty($options['modal']) ? 'true' : 'false') . ',';
    2526
    26         if (!empty($options['animationEffect'])) {
    27             $s .= "animationEffect: '" . $options['animationEffect'] . "',";
    28         }
     27            if (!empty($options['animationEffect'])) {
     28                $s .= "animationEffect: '" . $options['animationEffect'] . "',";
     29            }
    2930
    30         $s .= !empty($options['animationDuration']) ? 'animationDuration: ' . (int)$options['animationDuration'] . ',' : '';
     31            $s .= !empty($options['animationDuration']) ? 'animationDuration: ' . (int)$options['animationDuration'] . ',' : '';
    3132
    32         if (!empty($options['zoomOpacity'])) {
    33             $s .= "zoomOpacity: '" . $options['zoomOpacity'] . "',";
    34         }
     33            if (!empty($options['zoomOpacity'])) {
     34                $s .= "zoomOpacity: '" . $options['zoomOpacity'] . "',";
     35            }
    3536
    36         if (!empty($options['transitionEffect'])) {
    37             $s .= "transitionEffect: '" . $options['transitionEffect'] . "',";
    38         }
     37            if (!empty($options['transitionEffect'])) {
     38                $s .= "transitionEffect: '" . $options['transitionEffect'] . "',";
     39            }
    3940
    40         $s .= !empty($options['transitionDuration']) ? 'transitionDuration: ' . (int)$options['animationDuration'] . ',' : '';
     41            $s .= !empty($options['transitionDuration']) ? 'transitionDuration: ' . (int)$options['animationDuration'] . ',' : '';
    4142
    42         if (!empty($options['slideClass'])) {
    43             $s .= "slideClass: '" . $options['slideClass'] . "',";
    44         }
     43            if (!empty($options['slideClass'])) {
     44                $s .= "slideClass: '" . $options['slideClass'] . "',";
     45            }
    4546
    46         if (!empty($options['baseClass'])) {
    47             $s .= "baseClass: '" . $options['baseClass'] . "',";
    48         }
     47            if (!empty($options['baseClass'])) {
     48                $s .= "baseClass: '" . $options['baseClass'] . "',";
     49            }
    4950
    50         $s .= 'autoFocus: ' . (!empty($options['autoFocus']) ? 'true' : 'false') . ',';
    51         $s .= 'backFocus: ' . (!empty($options['backFocus']) ? 'true' : 'false') . ',';
    52         $s .= 'trapFocus: ' . (!empty($options['trapFocus']) ? 'true' : 'false') . ',';
    53         $s .= 'fullScreen: { autoStart: ' . (!empty($options['fullScreen']['autoStart']) ? 'true' : 'false') . ' },';
    54         $s .= 'touch: { vertical: ' . (!empty($options['touch']['vertical']) ? 'true' : 'false') . ', momentum: ' . (!empty($options['touch']['momentum']) ? 'true' : 'false') . '},';
    55         $s .= 'slideShow: { autoStart: ' . (!empty($options['slideShow']['autoStart']) ? 'true' : 'false') . ', speed: ' . (!empty($options['slideShow']['speed']) ? (int)$options['slideShow']['speed'] : '400') . '},';
    56         $s .= 'thumbs: { autoStart: ' . (!empty($options['thumbs']['autoStart']) ? 'true' : 'false') . ', momentum: ' . (!empty($options['thumbs']['hideOnClose']) ? 'true' : 'false') . '},';
     51            $s .= 'autoFocus: ' . (!empty($options['autoFocus']) ? 'true' : 'false') . ',';
     52            $s .= 'backFocus: ' . (!empty($options['backFocus']) ? 'true' : 'false') . ',';
     53            $s .= 'trapFocus: ' . (!empty($options['trapFocus']) ? 'true' : 'false') . ',';
     54            $s .= 'fullScreen: { autoStart: ' . (!empty($options['fullScreen']['autoStart']) ? 'true' : 'false') . ' },';
     55            $s .= 'touch: { vertical: ' . (!empty($options['touch']['vertical']) ? 'true' : 'false') . ', momentum: ' . (!empty($options['touch']['momentum']) ? 'true' : 'false') . '},';
     56            $s .= 'slideShow: { autoStart: ' . (!empty($options['slideShow']['autoStart']) ? 'true' : 'false') . ', speed: ' . (!empty($options['slideShow']['speed']) ? (int)$options['slideShow']['speed'] : '400') . '},';
     57            $s .= 'thumbs: { autoStart: ' . (!empty($options['thumbs']['autoStart']) ? 'true' : 'false') . ', momentum: ' . (!empty($options['thumbs']['hideOnClose']) ? 'true' : 'false') . '},';
    5758
    58         $s .= "lang : 'default',
     59            $s .= "lang : 'default',
    5960    i18n : {
    6061        'default' : {
    61             CLOSE       : '" . (!empty($options['translation']['close']) ? $options['translation']['close'] : 'Close') . "',
    62             NEXT        : '" . (!empty($options['translation']['next']) ? $options['translation']['next'] : 'Next') . "',
    63             PREV        : '" . (!empty($options['translation']['prev']) ? $options['translation']['prev'] : 'Previous') . "',
    64             ERROR       : '" . (!empty($options['translation']['error']) ? $options['translation']['error'] : 'The requested content cannot be loaded. <br/> Please try again later.') . "',
    65             PLAY_START  : '" . (!empty($options['translation']['start']) ? $options['translation']['start'] : 'Start slideshow') . "',
    66             PLAY_STOP   : '" . (!empty($options['translation']['pause']) ? $options['translation']['stop'] : 'Pause slideshow') . "',
    67             FULL_SCREEN : '" . (!empty($options['translation']['full']) ? $options['translation']['full'] : 'Full screen') . "',
    68             THUMBS      : '" . (!empty($options['translation']['thumbs']) ? $options['translation']['thumbs'] : 'Thumbnails') . "',
     62            CLOSE       : '" . (!empty($options['translation']['close']) ? $options['translation']['close'] : __('Close')) . "',
     63            NEXT        : '" . (!empty($options['translation']['next']) ? $options['translation']['next'] : __('Next')) . "',
     64            PREV        : '" . (!empty($options['translation']['prev']) ? $options['translation']['prev'] : __('Previous')) . "',
     65            ERROR       : '" . (!empty($options['translation']['error']) ? $options['translation']['error'] : __('The requested content cannot be loaded. <br/> Please try again later.')) . "',
     66            PLAY_START  : '" . (!empty($options['translation']['start']) ? $options['translation']['start'] : __('Start slideshow')) . "',
     67            PLAY_STOP   : '" . (!empty($options['translation']['pause']) ? $options['translation']['stop'] : __('Pause slideshow')) . "',
     68            FULL_SCREEN : '" . (!empty($options['translation']['full']) ? $options['translation']['full'] : __('Full screen')) . "',
     69            THUMBS      : '" . (!empty($options['translation']['thumbs']) ? $options['translation']['thumbs'] : __('Thumbnails')) . "',
    6970        },
    7071    }";
    7172
    72         if (!empty($options['customOptions'])) {
    73             $s .= ',' . $options['customOptions'];
    74         }
     73            if (!empty($options['customOptions'])) {
     74                $s .= ',' . $options['customOptions'];
     75            }
    7576
    76         $s .= '}';
    77         $s = trim($s);
     77            $s .= '}';
     78            $s = trim($s);
    7879
    79         echo !empty($options['gallery']) ? "e.on('click', function() {jQuery.fancybox.open( e, {$s}, e.index( this ));
     80            echo !empty($options['gallery']) ? "e.on('click', function() {jQuery.fancybox.open( e, {$s}, e.index( this ));
    8081    return false;})" : "e.fancybox($s);";?>});
     82    } catch (e) {
     83        console.log('Error:' + e);
     84    }
    8185</script>
  • wp-fancybox-3/trunk/templates/admin.php

    r1779307 r1780568  
    163163            <td>
    164164                <input type="text"
    165                        placeholder="Small Buttons"
     165                       placeholder="<?php _e('Small Buttons', $key); ?>"
    166166                       name="<?php echo $key; ?>[smallBtn]"
    167167                       value="<?php echo !empty($options['smallBtn']) ? $options['smallBtn'] : ''; ?>">
     
    383383                    <?php _e('Speed', $key); ?>
    384384                    <input type="number" min="0" step="1"
    385                            placeholder="Speed"
     385                           placeholder="<?php _e('Speed'); ?>"
    386386                           name="<?php echo $key; ?>[slideShow][speed]" <?php echo !empty($options['slideShow']['speed']) ? $options['slideShow']['speed'] : '400'; ?>>
    387387                </label>
     
    415415                    <?php _e('Close', $key); ?>
    416416                    <input type="text"
    417                            placeholder="Close"
     417                           placeholder="<?php _e('Close', $key); ?>"
    418418                           name="<?php echo $key; ?>[translation][close]"
    419419                           value="<?php echo !empty($options['translation']['close']) ? $options['translation']['close'] : ''; ?>">
     
    423423                    <?php _e('Next', $key); ?>
    424424                    <input type="text"
    425                            placeholder="Next"
     425                           placeholder="<?php _e('Next', $key); ?>"
    426426                           name="<?php echo $key; ?>[translation][next]"
    427427                           value="<?php echo !empty($options['translation']['next']) ? $options['translation']['next'] : ''; ?>">
     
    431431                    <?php _e('Previous', $key); ?>
    432432                    <input
    433                             placeholder="Previous"
     433                            placeholder="<?php _e('Previous'); ?>"
    434434                            name="<?php echo $key; ?>[translation][prev]"
    435435                            value="<?php echo !empty($options['translation']['prev']) ? $options['translation']['prev'] : ''; ?>">
     
    438438                <label>
    439439                    <?php _e('Error', $key); ?>
    440                     <input placeholder="Error"
     440                    <input placeholder="<?php _e('Error', $key); ?>"
    441441                           name="<?php echo $key; ?>[translation][error]"
    442442                           value="<?php echo !empty($options['translation']['error']) ? $options['translation']['error'] : ''; ?>">
     
    446446                    <?php _e('Start slideshow', $key); ?>
    447447                    <input type="text"
    448                            placeholder="Start slideshow"
     448                           placeholder="<?php _e('Start slideshow', $key); ?>"
    449449                           name="<?php echo $key; ?>[translation][start]"
    450450                           value="<?php echo !empty($options['translation']['start']) ? $options['translation']['start'] : ''; ?>">
  • wp-fancybox-3/trunk/templates/front.php

    r1779307 r1780568  
    11<script type="text/javascript">
    2     jQuery(document).ready(function () {
    3         var e = jQuery('<?php echo $selector;?>');<?php
    4         $s = '{';
    5         $s .= 'loop: ' . (!empty($options['loop']) ? 'true' : 'false') . ',';
    6         $s .= 'margin: [' . (!empty($options['margin']['v']) ? (float)$options['margin']['v'] : '44') . ',' . (!empty($options['margin']['h']) ? (float)$options['margin']['h'] : '0') . '],';
    7         $s .= !empty($options['gutter']) ? 'gutter : ' . (float)$options['gutter'] . ',' : '';
    8         $s .= 'keyboard: ' . (!empty($options['keyboard']) ? 'true' : 'false') . ',';
    9         $s .= 'arrows: ' . (!empty($options['arrows']) ? 'true' : 'false') . ',';
    10         $s .= 'infobar: ' . (!empty($options['infobar']) ? 'true' : 'false') . ',';
    11         $s .= 'toolbar: ' . (!empty($options['toolbar']) ? 'true' : 'false') . ',';
     2    try {
     3        jQuery(document).ready(function () {
     4            var e = jQuery('<?php echo $selector;?>');<?php
     5            $s = '{';
     6            $s .= 'loop: ' . (!empty($options['loop']) ? 'true' : 'false') . ',';
     7            $s .= 'margin: [' . (!empty($options['margin']['v']) ? (float)$options['margin']['v'] : '44') . ',' . (!empty($options['margin']['h']) ? (float)$options['margin']['h'] : '0') . '],';
     8            $s .= !empty($options['gutter']) ? 'gutter : ' . (float)$options['gutter'] . ',' : '';
     9            $s .= 'keyboard: ' . (!empty($options['keyboard']) ? 'true' : 'false') . ',';
     10            $s .= 'arrows: ' . (!empty($options['arrows']) ? 'true' : 'false') . ',';
     11            $s .= 'infobar: ' . (!empty($options['infobar']) ? 'true' : 'false') . ',';
     12            $s .= 'toolbar: ' . (!empty($options['toolbar']) ? 'true' : 'false') . ',';
    1213
    13         $s .= 'buttons: [';
    14         $s .= !empty($options['buttons']['slideShow']) ? "'slideShow'," : '';
    15         $s .= !empty($options['buttons']['fullScreen']) ? "'fullScreen'," : '';
    16         $s .= !empty($options['buttons']['thumbs']) ? "'thumbs'," : '';
    17         $s .= !empty($options['buttons']['close']) ? "'close'" : '';
    18         $s .= '],';
     14            $s .= 'buttons: [';
     15            $s .= !empty($options['buttons']['slideShow']) ? "'slideShow'," : '';
     16            $s .= !empty($options['buttons']['fullScreen']) ? "'fullScreen'," : '';
     17            $s .= !empty($options['buttons']['thumbs']) ? "'thumbs'," : '';
     18            $s .= !empty($options['buttons']['close']) ? "'close'" : '';
     19            $s .= '],';
    1920
    20         $s .= !empty($options['idleTime']) ? 'idleTime: ' . (int)$options['idleTime'] . ',' : '';
    21         $s .= !empty($options['smallBtn']) ? "smallBtn: '" . $options['smallBtn'] . "'," : '';
     21            $s .= !empty($options['idleTime']) ? 'idleTime: ' . (int)$options['idleTime'] . ',' : '';
     22            $s .= !empty($options['smallBtn']) ? "smallBtn: '" . $options['smallBtn'] . "'," : '';
    2223
    23         $s .= 'protect:' . (!empty($options['protect']) ? 'true' : 'false') . ',';
    24         $s .= 'modal:' . (!empty($options['modal']) ? 'true' : 'false') . ',';
     24            $s .= 'protect:' . (!empty($options['protect']) ? 'true' : 'false') . ',';
     25            $s .= 'modal:' . (!empty($options['modal']) ? 'true' : 'false') . ',';
    2526
    26         if (!empty($options['animationEffect'])) {
    27             $s .= "animationEffect: '" . $options['animationEffect'] . "',";
    28         }
     27            if (!empty($options['animationEffect'])) {
     28                $s .= "animationEffect: '" . $options['animationEffect'] . "',";
     29            }
    2930
    30         $s .= !empty($options['animationDuration']) ? 'animationDuration: ' . (int)$options['animationDuration'] . ',' : '';
     31            $s .= !empty($options['animationDuration']) ? 'animationDuration: ' . (int)$options['animationDuration'] . ',' : '';
    3132
    32         if (!empty($options['zoomOpacity'])) {
    33             $s .= "zoomOpacity: '" . $options['zoomOpacity'] . "',";
    34         }
     33            if (!empty($options['zoomOpacity'])) {
     34                $s .= "zoomOpacity: '" . $options['zoomOpacity'] . "',";
     35            }
    3536
    36         if (!empty($options['transitionEffect'])) {
    37             $s .= "transitionEffect: '" . $options['transitionEffect'] . "',";
    38         }
     37            if (!empty($options['transitionEffect'])) {
     38                $s .= "transitionEffect: '" . $options['transitionEffect'] . "',";
     39            }
    3940
    40         $s .= !empty($options['transitionDuration']) ? 'transitionDuration: ' . (int)$options['animationDuration'] . ',' : '';
     41            $s .= !empty($options['transitionDuration']) ? 'transitionDuration: ' . (int)$options['animationDuration'] . ',' : '';
    4142
    42         if (!empty($options['slideClass'])) {
    43             $s .= "slideClass: '" . $options['slideClass'] . "',";
    44         }
     43            if (!empty($options['slideClass'])) {
     44                $s .= "slideClass: '" . $options['slideClass'] . "',";
     45            }
    4546
    46         if (!empty($options['baseClass'])) {
    47             $s .= "baseClass: '" . $options['baseClass'] . "',";
    48         }
     47            if (!empty($options['baseClass'])) {
     48                $s .= "baseClass: '" . $options['baseClass'] . "',";
     49            }
    4950
    50         $s .= 'autoFocus: ' . (!empty($options['autoFocus']) ? 'true' : 'false') . ',';
    51         $s .= 'backFocus: ' . (!empty($options['backFocus']) ? 'true' : 'false') . ',';
    52         $s .= 'trapFocus: ' . (!empty($options['trapFocus']) ? 'true' : 'false') . ',';
    53         $s .= 'fullScreen: { autoStart: ' . (!empty($options['fullScreen']['autoStart']) ? 'true' : 'false') . ' },';
    54         $s .= 'touch: { vertical: ' . (!empty($options['touch']['vertical']) ? 'true' : 'false') . ', momentum: ' . (!empty($options['touch']['momentum']) ? 'true' : 'false') . '},';
    55         $s .= 'slideShow: { autoStart: ' . (!empty($options['slideShow']['autoStart']) ? 'true' : 'false') . ', speed: ' . (!empty($options['slideShow']['speed']) ? (int)$options['slideShow']['speed'] : '400') . '},';
    56         $s .= 'thumbs: { autoStart: ' . (!empty($options['thumbs']['autoStart']) ? 'true' : 'false') . ', momentum: ' . (!empty($options['thumbs']['hideOnClose']) ? 'true' : 'false') . '},';
     51            $s .= 'autoFocus: ' . (!empty($options['autoFocus']) ? 'true' : 'false') . ',';
     52            $s .= 'backFocus: ' . (!empty($options['backFocus']) ? 'true' : 'false') . ',';
     53            $s .= 'trapFocus: ' . (!empty($options['trapFocus']) ? 'true' : 'false') . ',';
     54            $s .= 'fullScreen: { autoStart: ' . (!empty($options['fullScreen']['autoStart']) ? 'true' : 'false') . ' },';
     55            $s .= 'touch: { vertical: ' . (!empty($options['touch']['vertical']) ? 'true' : 'false') . ', momentum: ' . (!empty($options['touch']['momentum']) ? 'true' : 'false') . '},';
     56            $s .= 'slideShow: { autoStart: ' . (!empty($options['slideShow']['autoStart']) ? 'true' : 'false') . ', speed: ' . (!empty($options['slideShow']['speed']) ? (int)$options['slideShow']['speed'] : '400') . '},';
     57            $s .= 'thumbs: { autoStart: ' . (!empty($options['thumbs']['autoStart']) ? 'true' : 'false') . ', momentum: ' . (!empty($options['thumbs']['hideOnClose']) ? 'true' : 'false') . '},';
    5758
    58         $s .= "lang : 'default',
     59            $s .= "lang : 'default',
    5960    i18n : {
    6061        'default' : {
    61             CLOSE       : '" . (!empty($options['translation']['close']) ? $options['translation']['close'] : 'Close') . "',
    62             NEXT        : '" . (!empty($options['translation']['next']) ? $options['translation']['next'] : 'Next') . "',
    63             PREV        : '" . (!empty($options['translation']['prev']) ? $options['translation']['prev'] : 'Previous') . "',
    64             ERROR       : '" . (!empty($options['translation']['error']) ? $options['translation']['error'] : 'The requested content cannot be loaded. <br/> Please try again later.') . "',
    65             PLAY_START  : '" . (!empty($options['translation']['start']) ? $options['translation']['start'] : 'Start slideshow') . "',
    66             PLAY_STOP   : '" . (!empty($options['translation']['pause']) ? $options['translation']['stop'] : 'Pause slideshow') . "',
    67             FULL_SCREEN : '" . (!empty($options['translation']['full']) ? $options['translation']['full'] : 'Full screen') . "',
    68             THUMBS      : '" . (!empty($options['translation']['thumbs']) ? $options['translation']['thumbs'] : 'Thumbnails') . "',
     62            CLOSE       : '" . (!empty($options['translation']['close']) ? $options['translation']['close'] : __('Close')) . "',
     63            NEXT        : '" . (!empty($options['translation']['next']) ? $options['translation']['next'] : __('Next')) . "',
     64            PREV        : '" . (!empty($options['translation']['prev']) ? $options['translation']['prev'] : __('Previous')) . "',
     65            ERROR       : '" . (!empty($options['translation']['error']) ? $options['translation']['error'] : __('The requested content cannot be loaded. <br/> Please try again later.')) . "',
     66            PLAY_START  : '" . (!empty($options['translation']['start']) ? $options['translation']['start'] : __('Start slideshow')) . "',
     67            PLAY_STOP   : '" . (!empty($options['translation']['pause']) ? $options['translation']['stop'] : __('Pause slideshow')) . "',
     68            FULL_SCREEN : '" . (!empty($options['translation']['full']) ? $options['translation']['full'] : __('Full screen')) . "',
     69            THUMBS      : '" . (!empty($options['translation']['thumbs']) ? $options['translation']['thumbs'] : __('Thumbnails')) . "',
    6970        },
    7071    }";
    7172
    72         if (!empty($options['customOptions'])) {
    73             $s .= ',' . $options['customOptions'];
    74         }
     73            if (!empty($options['customOptions'])) {
     74                $s .= ',' . $options['customOptions'];
     75            }
    7576
    76         $s .= '}';
    77         $s = trim($s);
     77            $s .= '}';
     78            $s = trim($s);
    7879
    79         echo !empty($options['gallery']) ? "e.on('click', function() {jQuery.fancybox.open( e, {$s}, e.index( this ));
     80            echo !empty($options['gallery']) ? "e.on('click', function() {jQuery.fancybox.open( e, {$s}, e.index( this ));
    8081    return false;})" : "e.fancybox($s);";?>});
     82    } catch (e) {
     83        console.log('Error:' + e);
     84    }
    8185</script>
Note: See TracChangeset for help on using the changeset viewer.