Photo Gallery by Supsystic - Version 1.14.10

Version Description

Download this release

Release Info

Developer supsystic.com
Plugin Icon 128x128 Photo Gallery by Supsystic
Version 1.14.10
Comparing to
See all releases

Code changes from version 1.14.9 to 1.14.10

app/assets/js/grid-gallery.js CHANGED
@@ -73,7 +73,7 @@
73
  if(typeof(ggActiveTab) != 'undefined') {
74
  var subMenus = jQuery('#toplevel_page_supsystic-gallery').find('.wp-submenu li');
75
  subMenus.removeClass('current').each(function(){
76
- if(jQuery(this).find('a[href="'+ ggActiveTab + '"]').size()) {
77
  jQuery(this).addClass('current');
78
  }
79
  });
@@ -185,7 +185,7 @@
185
  */
186
  function ggResetCopyTextCodeFields(selector) {
187
  var area = selector ? jQuery(selector) : jQuery(document);
188
- if(area.find('.ggCopyTextCode').size()) {
189
  var cloneWidthElement = jQuery('<span class="sup-shortcode" />').appendTo('.supsystic-plugin');
190
  area.find('.ggCopyTextCode').attr('readonly', 'readonly').click(function(){
191
  this.setSelectionRange(0, this.value.length);
@@ -210,4 +210,4 @@
210
  });
211
  }
212
 
213
- })(jQuery);
73
  if(typeof(ggActiveTab) != 'undefined') {
74
  var subMenus = jQuery('#toplevel_page_supsystic-gallery').find('.wp-submenu li');
75
  subMenus.removeClass('current').each(function(){
76
+ if(jQuery(this).find('a[href="'+ ggActiveTab + '"]').length) {
77
  jQuery(this).addClass('current');
78
  }
79
  });
185
  */
186
  function ggResetCopyTextCodeFields(selector) {
187
  var area = selector ? jQuery(selector) : jQuery(document);
188
+ if(area.find('.ggCopyTextCode').length) {
189
  var cloneWidthElement = jQuery('<span class="sup-shortcode" />').appendTo('.supsystic-plugin');
190
  area.find('.ggCopyTextCode').attr('readonly', 'readonly').click(function(){
191
  this.setSelectionRange(0, this.value.length);
210
  });
211
  }
212
 
213
+ })(jQuery);
index.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Plugin Name: Photo Gallery by Supsystic
5
  * Description: Easy to use Gallery by Supsystic with professional gallery templates. Show off your best design, photography and creative work
6
- * Version: 1.14.9
7
  * Author: supsystic.com
8
  * Author URI: https://supsystic.com
9
  * Text Domain: grid-gallery
@@ -11,5 +11,5 @@
11
 
12
  require_once dirname(__FILE__) . '/app/SupsysticGallery.php';
13
 
14
- $supsysticGallery = new SupsysticGallery('1.14.9');
15
  $supsysticGallery->run();
3
  /**
4
  * Plugin Name: Photo Gallery by Supsystic
5
  * Description: Easy to use Gallery by Supsystic with professional gallery templates. Show off your best design, photography and creative work
6
+ * Version: 1.14.10
7
  * Author: supsystic.com
8
  * Author URI: https://supsystic.com
9
  * Text Domain: grid-gallery
11
 
12
  require_once dirname(__FILE__) . '/app/SupsysticGallery.php';
13
 
14
+ $supsysticGallery = new SupsysticGallery('1.14.10');
15
  $supsysticGallery->run();
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: supsystic.com
3
  Donate link: https://supsystic.com/plugins/gallery
4
  Tags: gallery, wordpress gallery plugin, photo gallery, grid gallery, image gallery, video gallery, responsive gallery, polaroid gallery
5
- Tested up to: 5.4
6
- Stable tag: 1.14.9
7
 
8
  Photo Gallery with template editor to build amazing media gallery. Responsive mobile gallery with grid, masonry, carousel, polaroid and more gallery
9
 
@@ -176,6 +176,9 @@ Add watermark on each image in your gallery and you protect your photos from the
176
  14. Photo gallery plugin admin area. Captions and Icons tab. Create impressive gallery with icons and fantastic caption effect.
177
 
178
  == Changelog ==
 
 
 
179
  = Gallery 1.14.9 / 29.07.2020 =
180
  * Add fix for TWIG (Update only with latest PRO)
181
 
2
  Contributors: supsystic.com
3
  Donate link: https://supsystic.com/plugins/gallery
4
  Tags: gallery, wordpress gallery plugin, photo gallery, grid gallery, image gallery, video gallery, responsive gallery, polaroid gallery
5
+ Tested up to: 5.5
6
+ Stable tag: 1.14.10
7
 
8
  Photo Gallery with template editor to build amazing media gallery. Responsive mobile gallery with grid, masonry, carousel, polaroid and more gallery
9
 
176
  14. Photo gallery plugin admin area. Captions and Icons tab. Create impressive gallery with icons and fantastic caption effect.
177
 
178
  == Changelog ==
179
+ = Gallery 1.14.10 / 15.09.2020 =
180
+ * Add support WP 5.5
181
+
182
  = Gallery 1.14.9 / 29.07.2020 =
183
  * Add fix for TWIG (Update only with latest PRO)
184
 
src/GridGallery/Galleries/Attachment.php CHANGED
@@ -8,7 +8,7 @@ class GridGallery_Galleries_Attachment
8
  protected $_wp_upload_dir;
9
  protected $_wp_upload_url;
10
  protected $_no_ssl_upload_url;
11
-
12
  static private $_NO_CACHE = -1;
13
 
14
  public function __construct()
@@ -131,11 +131,11 @@ class GridGallery_Galleries_Attachment
131
  if (!isset($attachment['sizes']) || !isset($attachment['sizes']['full'])) {
132
  return $this->getPlaceholderUrl($width, $height);
133
  }
134
-
135
  $this->_setCache('_sgg_attach', $cacheParams, $attachment['sizes']['full']['url']);
136
  return $attachment['sizes']['full']['url'];
137
  }
138
-
139
  private function _getCache($cacheKey, $cacheParams) {
140
  $cache = get_option($cacheKey, array());
141
  $cacheValueKey = is_array($cacheParams) ? implode('-', $cacheParams) : $cacheParams;
@@ -143,7 +143,7 @@ class GridGallery_Galleries_Attachment
143
  return $cache[ $cacheValueKey ];
144
  return self::$_NO_CACHE;
145
  }
146
-
147
  private function _setCache($cacheKey, $cacheParams, $cacheValue) {
148
  $cache = get_option($cacheKey, array());
149
  $cacheValueKey = is_array($cacheParams) ? implode('-', $cacheParams) : $cacheParams;
@@ -160,9 +160,9 @@ class GridGallery_Galleries_Attachment
160
  public function getMetadata($attachmentId)
161
  {
162
  $data = wp_prepare_attachment_for_js($attachmentId);
163
- if(substr($data['url'], 0, 1) == '/') {
164
  $data['url'] = get_site_url().$data['url'];
165
- }
166
  return $data;
167
  }
168
 
@@ -262,7 +262,7 @@ class GridGallery_Galleries_Attachment
262
  $crop = true;
263
 
264
  if (!$editor) return null;
265
-
266
  if($this->isAnimatedGif($filepath)){
267
  return null;
268
  }
@@ -365,7 +365,7 @@ class GridGallery_Galleries_Attachment
365
  if (!is_array($attachment)) {
366
  return null;
367
  }
368
-
369
  $cacheParams = array($attachment['id'], $width, $height);
370
  $res = $this->_getCache('_sgg_croped_size', $cacheParams);
371
  if($res != self::$_NO_CACHE) {
@@ -519,4 +519,4 @@ class GridGallery_Galleries_Attachment
519
  }
520
  return $url;
521
  }
522
- }
8
  protected $_wp_upload_dir;
9
  protected $_wp_upload_url;
10
  protected $_no_ssl_upload_url;
11
+
12
  static private $_NO_CACHE = -1;
13
 
14
  public function __construct()
131
  if (!isset($attachment['sizes']) || !isset($attachment['sizes']['full'])) {
132
  return $this->getPlaceholderUrl($width, $height);
133
  }
134
+
135
  $this->_setCache('_sgg_attach', $cacheParams, $attachment['sizes']['full']['url']);
136
  return $attachment['sizes']['full']['url'];
137
  }
138
+
139
  private function _getCache($cacheKey, $cacheParams) {
140
  $cache = get_option($cacheKey, array());
141
  $cacheValueKey = is_array($cacheParams) ? implode('-', $cacheParams) : $cacheParams;
143
  return $cache[ $cacheValueKey ];
144
  return self::$_NO_CACHE;
145
  }
146
+
147
  private function _setCache($cacheKey, $cacheParams, $cacheValue) {
148
  $cache = get_option($cacheKey, array());
149
  $cacheValueKey = is_array($cacheParams) ? implode('-', $cacheParams) : $cacheParams;
160
  public function getMetadata($attachmentId)
161
  {
162
  $data = wp_prepare_attachment_for_js($attachmentId);
163
+ if(!empty($data['url']) && substr($data['url'], 0, 1) == '/') {
164
  $data['url'] = get_site_url().$data['url'];
165
+ }
166
  return $data;
167
  }
168
 
262
  $crop = true;
263
 
264
  if (!$editor) return null;
265
+
266
  if($this->isAnimatedGif($filepath)){
267
  return null;
268
  }
365
  if (!is_array($attachment)) {
366
  return null;
367
  }
368
+
369
  $cacheParams = array($attachment['id'], $width, $height);
370
  $res = $this->_getCache('_sgg_croped_size', $cacheParams);
371
  if($res != self::$_NO_CACHE) {
519
  }
520
  return $url;
521
  }
522
+ }
src/GridGallery/Galleries/assets/js/frontend.js CHANGED
@@ -2091,7 +2091,7 @@
2091
 
2092
  Gallery.prototype.correctImageSocialButtons = function($imageSharing){
2093
 
2094
- if(!$imageSharing.size()){
2095
  return;
2096
  }
2097
  var $example = $imageSharing.eq(0),
@@ -2144,7 +2144,7 @@
2144
 
2145
  for(var sharingClass in self.socialSharingImageOperators){
2146
  var $button = $(this).find('.social-sharing-button.'+sharingClass);
2147
- if($button.size()){
2148
  var img_url = $(this).data('img-url'),
2149
  img_id = $(this).data('img-id'),
2150
  shareUrlObj = self.urlToObject($button.attr('href')),
2091
 
2092
  Gallery.prototype.correctImageSocialButtons = function($imageSharing){
2093
 
2094
+ if(!$imageSharing.length){
2095
  return;
2096
  }
2097
  var $example = $imageSharing.eq(0),
2144
 
2145
  for(var sharingClass in self.socialSharingImageOperators){
2146
  var $button = $(this).find('.social-sharing-button.'+sharingClass);
2147
+ if($button.length){
2148
  var img_url = $(this).data('img-url'),
2149
  img_id = $(this).data('img-id'),
2150
  shareUrlObj = self.urlToObject($button.attr('href')),
src/GridGallery/Galleries/assets/js/jquery.photobox.js CHANGED
@@ -467,7 +467,7 @@
467
  generate : function(){
468
  var thumbsList = $('<ul>'),
469
  elements = [],
470
- len = this.imageLinks.size(),
471
  title, thumbSrc, link, type, i;
472
 
473
  for( i = 0; i < len; i++ ){
467
  generate : function(){
468
  var thumbsList = $('<ul>'),
469
  elements = [],
470
+ len = this.imageLinks.length,
471
  title, thumbSrc, link, type, i;
472
 
473
  for( i = 0; i < len; i++ ){
src/GridGallery/Galleries/assets/js/lib/jquery.prettyphoto.js CHANGED
@@ -334,7 +334,7 @@ Version: 3.1.6
334
 
335
  if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); // Hide the flash
336
 
337
- _checkPosition($(pp_images).size()); // Hide the next/previous links if on first or last images.
338
 
339
  $('.pp_loaderIcon').show();
340
 
@@ -352,7 +352,7 @@ Version: 3.1.6
352
  $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);
353
 
354
  // Display the current position
355
- $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).size());
356
 
357
  // Set the description
358
  if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){
@@ -403,7 +403,7 @@ Version: 3.1.6
403
 
404
  // Preload the neighbour images
405
  nextImage = new Image();
406
- if(isSet && set_position < $(pp_images).size() -1) nextImage.src = pp_images[set_position + 1];
407
  prevImage = new Image();
408
  if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1];
409
 
@@ -570,10 +570,10 @@ Version: 3.1.6
570
 
571
  if(direction == 'previous') {
572
  set_position--;
573
- if (set_position < 0) set_position = $(pp_images).size()-1;
574
  }else if(direction == 'next'){
575
  set_position++;
576
- if(set_position > $(pp_images).size()-1) set_position = 0;
577
  }else{
578
  set_position=direction;
579
  };
334
 
335
  if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); // Hide the flash
336
 
337
+ _checkPosition($(pp_images).length); // Hide the next/previous links if on first or last images.
338
 
339
  $('.pp_loaderIcon').show();
340
 
352
  $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);
353
 
354
  // Display the current position
355
+ $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).length);
356
 
357
  // Set the description
358
  if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){
403
 
404
  // Preload the neighbour images
405
  nextImage = new Image();
406
+ if(isSet && set_position < $(pp_images).length -1) nextImage.src = pp_images[set_position + 1];
407
  prevImage = new Image();
408
  if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1];
409
 
570
 
571
  if(direction == 'previous') {
572
  set_position--;
573
+ if (set_position < 0) set_position = $(pp_images).length-1;
574
  }else if(direction == 'next'){
575
  set_position++;
576
+ if(set_position > $(pp_images).length-1) set_position = 0;
577
  }else{
578
  set_position=direction;
579
  };
src/GridGallery/Galleries/assets/js/settings.js CHANGED
@@ -698,7 +698,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
698
  if(app && app.ImagePreview && app.ImagePreview.initImageOnHoverEffectHandler) {
699
  app.ImagePreview.initImageOnHoverEffectHandler($this.data('grid-gallery-type'));
700
  }
701
-
702
  $dialog.dialog('close');
703
  });
704
  $preview.find('[data-grid-gallery-type="' + $effect.val() + '"]').addClass('selected');
@@ -796,7 +796,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
796
  $mosaicCountColumnsRow.hide();
797
  $alwaysShowObj.show();
798
  var $pagesRow = $('#usePages');
799
-
800
  switch(selectedTypeVal) {
801
  // Fixed
802
  case '0':
@@ -1444,7 +1444,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
1444
  }).always(function() {
1445
  $wrapper.find('.import-gallery-loading').hide();
1446
  });
1447
- }
1448
  if($wrapper.find('.import').is(':hidden')) {
1449
  $('#import-confirm-button').hide();
1450
  }
@@ -1579,7 +1579,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
1579
  $(this).dialog('close');
1580
  }
1581
  },
1582
- create: function (event) {
1583
  $(event.target).parent().css({
1584
  position: 'fixed'
1585
  });
@@ -1635,7 +1635,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
1635
  , $loadMoreLink = $('#gg-anl-load-more-link')
1636
  , isMosaicLayout2Used = ($('#sggMosaicLayout').find('option:selected').val() == 1)
1637
  , $mosaicLink = $('#gg-anl-mosaic-settings-link');
1638
-
1639
  _self.linksOyPositions = [];
1640
  _self.linksOyPositions.push({
1641
  'id': '#gg-anl-main',
@@ -1651,7 +1651,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
1651
  } else {
1652
  $mosaicLink.addClass('ggSettingsDisplNone');
1653
  }
1654
-
1655
  _self.linksOyPositions.push({
1656
  'id': '#gg-anl-soc-share',
1657
  'offset': Math.abs(Math.floor($("#gg-anl-soc-share").offset().top) - offsetTop2 - 40),
@@ -1899,8 +1899,8 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
1899
  } catch(exc1) {
1900
  ioServiceParams = null;
1901
  }
1902
- $(document).on('ggCloneImageOptimizeEndEvent', function(event, res2) {
1903
- //save to db
1904
  if(res2 == 1 && galleryInfo && urlLogList.length) {
1905
  galleryInfo.optimizePreview = 1;
1906
 
@@ -2085,7 +2085,7 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
2085
  } catch(e) {
2086
  cdnParams = null;
2087
  }
2088
-
2089
  $(document).on('ggCloneCdnEndEvent', function(event, res1) {
2090
  if(galleryInfo && res1 == 1) {
2091
  var request = SupsysticGallery.Ajax.Post({
@@ -2109,8 +2109,8 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
2109
  window.location = $('#ggCreateClone').attr('data-url') + '&gallery_id=' + galleryId;
2110
  }
2111
  });
2112
-
2113
- if(cdnParams
2114
  && cdnParams.current
2115
  && cdnParams.setting
2116
  && cdnParams.setting[cdnParams.current]
@@ -2669,8 +2669,8 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
2669
  element: '#preview figure.grid-gallery-caption',
2670
  $node: $('#preview figure.grid-gallery-caption'),
2671
  toggleEvents: function() {
2672
- this.$node.off('hover', showOver);
2673
- this.$node.off('hover', hideOver);
2674
  }
2675
  },
2676
  shadow = wrapper.$node.data('box-shadow'),
@@ -2700,12 +2700,12 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
2700
 
2701
  if (value == 1) {
2702
  wrapper.$node.css('box-shadow', 'none');
2703
- wrapper.$node.on('hover', showOver);
2704
  }
2705
 
2706
  if (value == 2) {
2707
  wrapper.$node.css('box-shadow', shadow);
2708
- wrapper.$node.on('hover', hideOver);
2709
  }
2710
 
2711
  if(!value) {
@@ -2732,10 +2732,10 @@ sggDataSelectorsCache.prototype.getFromArray = (function(key) {
2732
 
2733
  $toggle.on('change', function() {
2734
  var value = parseInt($('option:selected', $toggle).val(), 10);
2735
- wrapper.$node.off('hover', overlayShadow);
2736
  if (value) {
2737
  self.setProp(wrapper.element, {opacity: '0.2'});
2738
- wrapper.$node.on('hover', overlayShadow);
2739
  } else {
2740
  self.setProp(wrapper.element , {opacity: '1.0'});
2741
  }
@@ -3578,4 +3578,4 @@ var transparencyConvert = {
3578
  });
3579
  });
3580
  };
3581
- }(jQuery));
698
  if(app && app.ImagePreview && app.ImagePreview.initImageOnHoverEffectHandler) {
699
  app.ImagePreview.initImageOnHoverEffectHandler($this.data('grid-gallery-type'));
700
  }
701
+
702
  $dialog.dialog('close');
703
  });
704
  $preview.find('[data-grid-gallery-type="' + $effect.val() + '"]').addClass('selected');
796
  $mosaicCountColumnsRow.hide();
797
  $alwaysShowObj.show();
798
  var $pagesRow = $('#usePages');
799
+
800
  switch(selectedTypeVal) {
801
  // Fixed
802
  case '0':
1444
  }).always(function() {
1445
  $wrapper.find('.import-gallery-loading').hide();
1446
  });
1447
+ }
1448
  if($wrapper.find('.import').is(':hidden')) {
1449
  $('#import-confirm-button').hide();
1450
  }
1579
  $(this).dialog('close');
1580
  }
1581
  },
1582
+ create: function (event) {
1583
  $(event.target).parent().css({
1584
  position: 'fixed'
1585
  });
1635
  , $loadMoreLink = $('#gg-anl-load-more-link')
1636
  , isMosaicLayout2Used = ($('#sggMosaicLayout').find('option:selected').val() == 1)
1637
  , $mosaicLink = $('#gg-anl-mosaic-settings-link');
1638
+
1639
  _self.linksOyPositions = [];
1640
  _self.linksOyPositions.push({
1641
  'id': '#gg-anl-main',
1651
  } else {
1652
  $mosaicLink.addClass('ggSettingsDisplNone');
1653
  }
1654
+
1655
  _self.linksOyPositions.push({
1656
  'id': '#gg-anl-soc-share',
1657
  'offset': Math.abs(Math.floor($("#gg-anl-soc-share").offset().top) - offsetTop2 - 40),
1899
  } catch(exc1) {
1900
  ioServiceParams = null;
1901
  }
1902
+ $(document).on('ggCloneImageOptimizeEndEvent', function(event, res2) {
1903
+ //save to db
1904
  if(res2 == 1 && galleryInfo && urlLogList.length) {
1905
  galleryInfo.optimizePreview = 1;
1906
 
2085
  } catch(e) {
2086
  cdnParams = null;
2087
  }
2088
+
2089
  $(document).on('ggCloneCdnEndEvent', function(event, res1) {
2090
  if(galleryInfo && res1 == 1) {
2091
  var request = SupsysticGallery.Ajax.Post({
2109
  window.location = $('#ggCreateClone').attr('data-url') + '&gallery_id=' + galleryId;
2110
  }
2111
  });
2112
+
2113
+ if(cdnParams
2114
  && cdnParams.current
2115
  && cdnParams.setting
2116
  && cdnParams.setting[cdnParams.current]
2669
  element: '#preview figure.grid-gallery-caption',
2670
  $node: $('#preview figure.grid-gallery-caption'),
2671
  toggleEvents: function() {
2672
+ this.$node.off('mouseenter mouseleave', showOver);
2673
+ this.$node.off('mouseenter mouseleave', hideOver);
2674
  }
2675
  },
2676
  shadow = wrapper.$node.data('box-shadow'),
2700
 
2701
  if (value == 1) {
2702
  wrapper.$node.css('box-shadow', 'none');
2703
+ wrapper.$node.on('mouseenter mouseleave', showOver);
2704
  }
2705
 
2706
  if (value == 2) {
2707
  wrapper.$node.css('box-shadow', shadow);
2708
+ wrapper.$node.on('mouseenter mouseleave', hideOver);
2709
  }
2710
 
2711
  if(!value) {
2732
 
2733
  $toggle.on('change', function() {
2734
  var value = parseInt($('option:selected', $toggle).val(), 10);
2735
+ wrapper.$node.off('mouseenter mouseleave', overlayShadow);
2736
  if (value) {
2737
  self.setProp(wrapper.element, {opacity: '0.2'});
2738
+ wrapper.$node.on('mouseenter mouseleave', overlayShadow);
2739
  } else {
2740
  self.setProp(wrapper.element , {opacity: '1.0'});
2741
  }
3578
  });
3579
  });
3580
  };
3581
+ }(jQuery));
src/GridGallery/Promo/assets/js/admin.plugins.js CHANGED
@@ -2,7 +2,7 @@ jQuery(document).ready(function(){
2
  var app = window.SupsysticGallery;
3
  var g_sggAnimationSpeed = 300;
4
  var $deactivateLnk = jQuery('#the-list tr[data-plugin="'+ sggPluginsData.plugSlug+ '/index.php"] .row-actions .deactivate a');
5
- if($deactivateLnk && $deactivateLnk.size()) {
6
  var $deactivateForm = jQuery('#sggDeactivateForm');
7
  var $deactivateWnd = jQuery('#sggDeactivateWnd').dialog({
8
  modal: true
@@ -25,7 +25,7 @@ jQuery(document).ready(function(){
25
  $deactivateWnd.dialog('open');
26
  return false;
27
  });
28
-
29
  $deactivateForm.submit(function(){
30
  var request = app.Ajax.Post({
31
  module: 'promo'
@@ -45,10 +45,10 @@ jQuery(document).ready(function(){
45
  jQuery('.sggDeactivateDescShell').slideUp( g_sggAnimationSpeed );
46
  if(jQuery(this).prop('checked')) {
47
  var $descShell = jQuery(this).parents('.sggDeactivateReasonShell:first').find('.sggDeactivateDescShell');
48
- if($descShell && $descShell.size()) {
49
  $descShell.slideDown( g_sggAnimationSpeed );
50
  }
51
  }
52
  });
53
  }
54
- });
2
  var app = window.SupsysticGallery;
3
  var g_sggAnimationSpeed = 300;
4
  var $deactivateLnk = jQuery('#the-list tr[data-plugin="'+ sggPluginsData.plugSlug+ '/index.php"] .row-actions .deactivate a');
5
+ if($deactivateLnk && $deactivateLnk.length) {
6
  var $deactivateForm = jQuery('#sggDeactivateForm');
7
  var $deactivateWnd = jQuery('#sggDeactivateWnd').dialog({
8
  modal: true
25
  $deactivateWnd.dialog('open');
26
  return false;
27
  });
28
+
29
  $deactivateForm.submit(function(){
30
  var request = app.Ajax.Post({
31
  module: 'promo'
45
  jQuery('.sggDeactivateDescShell').slideUp( g_sggAnimationSpeed );
46
  if(jQuery(this).prop('checked')) {
47
  var $descShell = jQuery(this).parents('.sggDeactivateReasonShell:first').find('.sggDeactivateDescShell');
48
+ if($descShell && $descShell.length) {
49
  $descShell.slideDown( g_sggAnimationSpeed );
50
  }
51
  }
52
  });
53
  }
54
+ });
src/GridGallery/Ui/Module.php CHANGED
@@ -72,7 +72,7 @@ class GridGallery_Ui_Module extends Rsc_Mvc_Module
72
  }
73
 
74
  public function registerJSData() {
75
- wp_register_script('sg-ajax.js', $this->getLocationUrl() . '/js/ajax.js');
76
  wp_localize_script('sg-ajax.js', 'SupsysticGallery', array('nonce' => wp_create_nonce('supsystic-gallery')));
77
  // really assigned to /app/assets/js/grid-gallery.js Handle
78
  wp_localize_script('sg-ajax.js', 'sggParams', array('isRtl' => (int) is_rtl()));
@@ -115,7 +115,7 @@ class GridGallery_Ui_Module extends Rsc_Mvc_Module
115
  $this->getLocationUrl() . '/js/toolbar.js',
116
  $this->getLocationUrl() . '/js/ajaxQueue.js',
117
  );
118
-
119
  }
120
  public function getStandardFontsList() {
121
  return array("Georgia","Palatino Linotype","Times New Roman","Arial","Helvetica","Arial Black","Gadget","Comic Sans MS","Impact","Charcoal","Lucida Sans Unicode","Lucida Grande","Tahoma","Geneva","Trebuchet MS","Verdana","Geneva","Courier New","Courier","Lucida Console","Monaco");
72
  }
73
 
74
  public function registerJSData() {
75
+ wp_register_script('sg-ajax.js', $this->getLocationUrl() . '/js/ajax.js', array( 'jquery' ));
76
  wp_localize_script('sg-ajax.js', 'SupsysticGallery', array('nonce' => wp_create_nonce('supsystic-gallery')));
77
  // really assigned to /app/assets/js/grid-gallery.js Handle
78
  wp_localize_script('sg-ajax.js', 'sggParams', array('isRtl' => (int) is_rtl()));
115
  $this->getLocationUrl() . '/js/toolbar.js',
116
  $this->getLocationUrl() . '/js/ajaxQueue.js',
117
  );
118
+
119
  }
120
  public function getStandardFontsList() {
121
  return array("Georgia","Palatino Linotype","Times New Roman","Arial","Helvetica","Arial Black","Gadget","Comic Sans MS","Impact","Charcoal","Lucida Sans Unicode","Lucida Grande","Tahoma","Geneva","Trebuchet MS","Verdana","Geneva","Courier New","Courier","Lucida Console","Monaco");