Files
notifications-admin/app/assets/javascripts/radioSlider.js
T

29 lines
621 B
JavaScript
Raw Normal View History

2025-10-06 09:38:54 -04:00
(function(window) {
"use strict";
2025-10-06 09:38:54 -04:00
window.NotifyModules['radio-slider'] = function() {
this.start = function(component) {
$(component)
.on('click', function() {
2019-12-12 14:16:38 +00:00
valuesInLabel = $(this).find(':checked').next('label').text().split('/');
2019-12-12 14:16:38 +00:00
if (valuesInLabel.length === 2) {
leftValue = valuesInLabel[0];
rightValue = valuesInLabel[1];
2025-09-18 16:42:39 -04:00
$(this).find('.radio-slider-left-value').text(leftValue);
$(this).find('.radio-slider-right-value').text(rightValue);
}
})
.trigger('click');
};
};
})(window);