Unyson - Version 2.4.11

Version Description

  • Fixed a bug in popup option-type: Options were not saved
Download this release

Release Info

Developer Unyson
Plugin Icon 128x128 Unyson
Version 2.4.11
Comparing to
See all releases

Code changes from version 2.4.10 to 2.4.11

framework/includes/option-types/popup/static/js/popup.js CHANGED
@@ -1,6 +1,5 @@
1
  (function ($, _, fwEvents, window) {
2
-
3
- popup = function () {
4
  var $this = $(this),
5
  $defaultItem = $this.find('.item.default'),
6
  nodes = {
@@ -26,8 +25,9 @@
26
  nodes.$itemsWrapper.on('click', '.item > .button', function (e) {
27
  e.preventDefault();
28
 
29
- var values = {};
30
- var $input = $(this).find('input');
 
31
 
32
  if ($input.length && $input.val().length ) {
33
  values = JSON.parse($input.val());
@@ -35,14 +35,13 @@
35
 
36
  utils.modal.set('edit', true);
37
  utils.modal.set('values', values, {silent: true});
38
- utils.modal.set('itemRef', $(this));
39
  utils.modal.open();
40
  });
41
 
42
  utils.modal.on('change:values', function (modal, values) {
43
  utils.editItem(utils.modal.get('itemRef'), values);
44
 
45
-
46
  fwEvents.trigger('fw:option-type:popup:change', {
47
  element: $this,
48
  values: values
@@ -55,5 +54,4 @@
55
  .find('.fw-option-type-popup:not(.fw-option-initialized)').each(popup)
56
  .addClass('fw-option-initialized');
57
  });
58
-
59
  })(jQuery, _, fwEvents, window);
1
  (function ($, _, fwEvents, window) {
2
+ var popup = function () {
 
3
  var $this = $(this),
4
  $defaultItem = $this.find('.item.default'),
5
  nodes = {
25
  nodes.$itemsWrapper.on('click', '.item > .button', function (e) {
26
  e.preventDefault();
27
 
28
+ var values = {},
29
+ $item = $(this).closest('.item'),
30
+ $input = $item.find('input');
31
 
32
  if ($input.length && $input.val().length ) {
33
  values = JSON.parse($input.val());
35
 
36
  utils.modal.set('edit', true);
37
  utils.modal.set('values', values, {silent: true});
38
+ utils.modal.set('itemRef', $item);
39
  utils.modal.open();
40
  });
41
 
42
  utils.modal.on('change:values', function (modal, values) {
43
  utils.editItem(utils.modal.get('itemRef'), values);
44
 
 
45
  fwEvents.trigger('fw:option-type:popup:change', {
46
  element: $this,
47
  values: values
54
  .find('.fw-option-type-popup:not(.fw-option-initialized)').each(popup)
55
  .addClass('fw-option-initialized');
56
  });
 
57
  })(jQuery, _, fwEvents, window);
framework/manifest.php CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
- $manifest['version'] = '2.4.10';
4
 
5
  $manifest['name'] = __('Unyson', 'fw');
6
 
7
+ $manifest['version'] = '2.4.11';
framework/views/backend-settings-form.php CHANGED
@@ -262,10 +262,18 @@ jQuery(function($){
262
  fw.soleModal.hide('fw-options-ajax-save-loading');
263
  },
264
  onAjaxError: function(elements, data) {
 
 
 
 
 
 
 
 
265
  fw.soleModal.hide('fw-options-ajax-save-loading');
266
  fw.soleModal.show(
267
  'fw-options-ajax-save-error',
268
- '<p class="fw-text-danger">'+ String(data.errorThrown) +'</p>'
269
  );
270
  },
271
  onSuccess: function(elements, ajaxData) {
262
  fw.soleModal.hide('fw-options-ajax-save-loading');
263
  },
264
  onAjaxError: function(elements, data) {
265
+ {
266
+ var message = String(data.errorThrown);
267
+
268
+ if (data.jqXHR.responseText && data.jqXHR.responseText.indexOf('Fatal error') > -1) {
269
+ message = $(data.jqXHR.responseText).text().split(' in ').shift();
270
+ }
271
+ }
272
+
273
  fw.soleModal.hide('fw-options-ajax-save-loading');
274
  fw.soleModal.show(
275
  'fw-options-ajax-save-error',
276
+ '<p class="fw-text-danger">'+ message +'</p>'
277
  );
278
  },
279
  onSuccess: function(elements, ajaxData) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson, themefusecom
3
  Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio, framework
4
  Requires at least: 4.0.0
5
  Tested up to: 4.3
6
- Stable tag: 2.4.10
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -82,6 +82,9 @@ Yes; Unyson will work with any theme.
82
 
83
  == Changelog ==
84
 
 
 
 
85
  = 2.4.10 =
86
  * New extension: [Backup & Demo Content](http://manual.unyson.io/en/latest/extension/backups/#content) *(Note: It will not be visible in extensions list if old Backup extension is set as supported in [theme manifest](http://manual.unyson.io/en/latest/manifest/theme.html#content))*
87
  * Soft removed 3 extensions: Styling, Translation, Learning [#874](https://github.com/ThemeFuse/Unyson/issues/874)
3
  Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio, framework
4
  Requires at least: 4.0.0
5
  Tested up to: 4.3
6
+ Stable tag: 2.4.11
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
82
 
83
  == Changelog ==
84
 
85
+ = 2.4.11 =
86
+ * Fixed a bug in `popup` option-type: Options were not saved
87
+
88
  = 2.4.10 =
89
  * New extension: [Backup & Demo Content](http://manual.unyson.io/en/latest/extension/backups/#content) *(Note: It will not be visible in extensions list if old Backup extension is set as supported in [theme manifest](http://manual.unyson.io/en/latest/manifest/theme.html#content))*
90
  * Soft removed 3 extensions: Styling, Translation, Learning [#874](https://github.com/ThemeFuse/Unyson/issues/874)
unyson.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Unyson
4
  * Plugin URI: http://unyson.io/
5
  * Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
6
- * Version: 2.4.10
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+
3
  * Plugin Name: Unyson
4
  * Plugin URI: http://unyson.io/
5
  * Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
6
+ * Version: 2.4.11
7
  * Author: ThemeFuse
8
  * Author URI: http://themefuse.com
9
  * License: GPL2+