| Server IP : 66.29.153.156 / Your IP : 216.73.216.151 Web Server : LiteSpeed System : Linux premium322.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64 User : lastyfjz ( 1521) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/lastyfjz/dermalaserclinic.co.uk/wp-content/plugins/boxzilla/assets/js/src/admin/ |
Upload File : |
var $ = window.jQuery
var Option = function (element) {
// find corresponding element
if (typeof (element) === 'string') {
element = document.getElementById('boxzilla-' + element)
}
if (!element) {
console.error('Unable to find option element.')
}
this.element = element
}
Option.prototype.getColorValue = function () {
if (this.element.value.length > 0) {
if ($(this.element).hasClass('wp-color-field')) {
return $(this.element).wpColorPicker('color')
} else {
return this.element.value
}
}
return ''
}
Option.prototype.getPxValue = function (fallbackValue) {
if (this.element.value.length > 0) {
return parseInt(this.element.value) + 'px'
}
return fallbackValue || ''
}
Option.prototype.getValue = function (fallbackValue) {
if (this.element.value.length > 0) {
return this.element.value
}
return fallbackValue || ''
}
Option.prototype.clear = function () {
this.element.value = ''
}
Option.prototype.setValue = function (value) {
this.element.value = value
}
module.exports = Option