Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
emgk committed Jun 20, 2024
1 parent e6ec32f commit a2d8060
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 19 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Change Log

## [1.12.14](https://github.com/wpmudev/forminator-ui/compare/v1.12.13...v1.12.14) (2024-03-22)
#### 🐛 Bug Fix
- `rating`
- fix(rating): rating field design improvements. [#73](https://github.com/wpmudev/forminator-ui/pull/73) ([FOR-4494](https://incsub.atlassian.net/browse/FOR-4494)) ([@creador-dev](https://github.com/creador-dev))

## [1.12.13](https://github.com/wpmudev/forminator-ui/compare/v1.12.12...v1.12.13) (2024-03-22)
#### 🐛 Bug Fix
- `rating`
- fix(rating): wrap rating field items. [#69](https://github.com/wpmudev/forminator-ui/pull/69) ([FOR-4494](https://incsub.atlassian.net/browse/FOR-4494)) ([@creador-dev](https://github.com/creador-dev))
- fix(rating): rating field init and onChange fix. [#70](https://github.com/wpmudev/forminator-ui/pull/70) ([FOR-4496](https://incsub.atlassian.net/browse/FOR-4496)) ([@creador-dev](https://github.com/creador-dev))
- fix(rating): rating field data-total-value added. [#72](https://github.com/wpmudev/forminator-ui/pull/72) ([@creador-dev](https://github.com/creador-dev))
- `multiselect`
- fix(multiselect): multiselect design fix. [#71](https://github.com/wpmudev/forminator-ui/pull/71) ([@creador-dev](https://github.com/creador-dev))

## [1.12.12](https://github.com/wpmudev/forminator-ui/compare/v1.12.11...v1.12.12) (2024-03-22)

#### ✨ New Features
Expand Down
2 changes: 1 addition & 1 deletion css/forminator-forms.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/forminator-ui.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/src/form/forminator-form-bold.base.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/src/form/forminator-form-default.base.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/src/form/forminator-form-flat.base.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/src/form/forminator-form-material.base.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/src/forminator-ui.min.css

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions js/forminator-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
// Check if data-suffix is true
if ('true' === $element.attr('data-suffix')) {
// Add the suffix span
$wrapper.append('<span class="forminator-rating-suffix">(' + selectedValue + '/' + numOptions + ')</span>');
$ratingItemsContainer.append('<span class="forminator-rating-suffix">(' + selectedValue + '/' + numOptions + ')</span>');
}

// Insert the wrapper after the select element
Expand All @@ -981,7 +981,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
$element.on('change', function () {
var value = $(this).val() || 0;
var $container = $('[data-id="' + id + '"]');
var $suffix = $container.next('.forminator-rating-suffix');
var $suffix = $container.find('.forminator-rating-suffix');
$container.attr('data-selected-value', value);
$(this).attr('data-selected-value', value);
$container.children().removeClass('forminator-rating-selected');
Expand All @@ -991,7 +991,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
}
});
if ($suffix.length) {
$suffix.text('(' + value + '/' + $container.children().length + ')');
$suffix.text('(' + value + '/' + $container.children().not('.forminator-rating-suffix').length + ')');
}
});
});
Expand Down Expand Up @@ -1033,14 +1033,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
$container = $item.closest('.forminator-rating-items'),
id = $container.data('id'),
$select = $('#' + id),
$suffix = $container.next('.forminator-rating-suffix');
$suffix = $container.find('.forminator-rating-suffix');
$select.val(value).trigger('change');
$container.attr('data-selected-value', value);
$select.attr('data-selected-value', value);
$item.siblings().removeClass('forminator-rating-selected');
$item.prevAll().addBack().addClass('forminator-rating-selected');
if ($suffix.length) {
$suffix.text('(' + value + '/' + $container.children().length + ')');
$suffix.text('(' + value + '/' + $container.children().not('.forminator-rating-suffix').length + ')');
}
});
$(document).on('focus', '.forminator-rating', function () {
Expand Down
2 changes: 1 addition & 1 deletion js/forminator-form.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions js/forminator-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
// Check if data-suffix is true
if ('true' === $element.attr('data-suffix')) {
// Add the suffix span
$wrapper.append('<span class="forminator-rating-suffix">(' + selectedValue + '/' + numOptions + ')</span>');
$ratingItemsContainer.append('<span class="forminator-rating-suffix">(' + selectedValue + '/' + numOptions + ')</span>');
}

// Insert the wrapper after the select element
Expand All @@ -1244,7 +1244,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
$element.on('change', function () {
var value = $(this).val() || 0;
var $container = $('[data-id="' + id + '"]');
var $suffix = $container.next('.forminator-rating-suffix');
var $suffix = $container.find('.forminator-rating-suffix');
$container.attr('data-selected-value', value);
$(this).attr('data-selected-value', value);
$container.children().removeClass('forminator-rating-selected');
Expand All @@ -1254,7 +1254,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
}
});
if ($suffix.length) {
$suffix.text('(' + value + '/' + $container.children().length + ')');
$suffix.text('(' + value + '/' + $container.children().not('.forminator-rating-suffix').length + ')');
}
});
});
Expand Down Expand Up @@ -1296,14 +1296,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
$container = $item.closest('.forminator-rating-items'),
id = $container.data('id'),
$select = $('#' + id),
$suffix = $container.next('.forminator-rating-suffix');
$suffix = $container.find('.forminator-rating-suffix');
$select.val(value).trigger('change');
$container.attr('data-selected-value', value);
$select.attr('data-selected-value', value);
$item.siblings().removeClass('forminator-rating-selected');
$item.prevAll().addBack().addClass('forminator-rating-selected');
if ($suffix.length) {
$suffix.text('(' + value + '/' + $container.children().length + ')');
$suffix.text('(' + value + '/' + $container.children().not('.forminator-rating-suffix').length + ')');
}
});
$(document).on('focus', '.forminator-rating', function () {
Expand Down
2 changes: 1 addition & 1 deletion js/forminator-ui.min.js

Large diffs are not rendered by default.

0 comments on commit a2d8060

Please sign in to comment.