Version Description
- Fixed #1164, #1080, #1006, #1139, #1152, #1157
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.4.15 |
Comparing to | |
See all releases |
Code changes from version 2.4.14 to 2.4.15
- framework/core/components/backend.php +4 -0
- framework/core/components/extensions/manager/static/extensions-page.js +1 -1
- framework/core/extends/class-fw-extension.php +28 -2
- framework/helpers/database.php +15 -11
- framework/includes/option-types/radio-text/class-fw-option-type-radio-text.php +16 -0
- framework/includes/option-types/range-slider/static/css/styles.css +25 -51
- framework/includes/option-types/range-slider/static/js/scripts.js +0 -13
- framework/includes/option-types/range-slider/view.php +6 -7
- framework/includes/option-types/slider/static/css/styles.css +17 -51
- framework/includes/option-types/slider/static/js/scripts.js +0 -10
- framework/includes/option-types/slider/view.php +6 -7
- framework/includes/option-types/switch/class-fw-option-type-switch.php +10 -1
- framework/manifest.php +1 -1
- framework/static/js/fw.js +9 -2
- readme.txt +4 -1
- unyson.php +1 -1
framework/core/components/backend.php
CHANGED
@@ -1119,6 +1119,10 @@ final class _FW_Component_Backend {
|
|
1119 |
{
|
1120 |
if ( isset( $_POST['values'] ) ) {
|
1121 |
$values = FW_Request::POST( 'values' );
|
|
|
|
|
|
|
|
|
1122 |
} else {
|
1123 |
$values = array();
|
1124 |
}
|
1119 |
{
|
1120 |
if ( isset( $_POST['values'] ) ) {
|
1121 |
$values = FW_Request::POST( 'values' );
|
1122 |
+
|
1123 |
+
if (is_string($values)) {
|
1124 |
+
$values = json_decode($values, true);
|
1125 |
+
}
|
1126 |
} else {
|
1127 |
$values = array();
|
1128 |
}
|
framework/core/components/extensions/manager/static/extensions-page.js
CHANGED
@@ -69,7 +69,7 @@ jQuery(function($){
|
|
69 |
}).fail(function(jqXHR, textStatus, errorThrown){
|
70 |
fw.soleModal.show(
|
71 |
'fw-extension-install-error',
|
72 |
-
'<p class="fw-text-danger">
|
73 |
);
|
74 |
inst.isBusy = false;
|
75 |
inst.loading($form, false);
|
69 |
}).fail(function(jqXHR, textStatus, errorThrown){
|
70 |
fw.soleModal.show(
|
71 |
'fw-extension-install-error',
|
72 |
+
'<p class="fw-text-danger">'+ String(errorThrown) +'</p>'
|
73 |
);
|
74 |
inst.isBusy = false;
|
75 |
inst.loading($form, false);
|
framework/core/extends/class-fw-extension.php
CHANGED
@@ -319,9 +319,10 @@ abstract class FW_Extension
|
|
319 |
/**
|
320 |
* Return array with options from specified name/path
|
321 |
* @param string $name Examples: 'framework', 'posts/portfolio'
|
|
|
322 |
* @return array
|
323 |
*/
|
324 |
-
final public function get_options($name)
|
325 |
{
|
326 |
$path = $this->locate_path('/options/'. $name .'.php');
|
327 |
|
@@ -329,7 +330,7 @@ abstract class FW_Extension
|
|
329 |
return array();
|
330 |
}
|
331 |
|
332 |
-
$variables = fw_get_variables_from_file($path, array('options' => array()));
|
333 |
|
334 |
return $variables['options'];
|
335 |
}
|
@@ -402,6 +403,31 @@ abstract class FW_Extension
|
|
402 |
fw_set_db_extension_data( $this->get_name(), $multi_key, $value );
|
403 |
}
|
404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
final public function get_post_options($post_type)
|
406 |
{
|
407 |
return $this->get_options('posts/'. $post_type);
|
319 |
/**
|
320 |
* Return array with options from specified name/path
|
321 |
* @param string $name Examples: 'framework', 'posts/portfolio'
|
322 |
+
* @param array $variables These will be available in options file (like variables for view)
|
323 |
* @return array
|
324 |
*/
|
325 |
+
final public function get_options($name, array $variables = array())
|
326 |
{
|
327 |
$path = $this->locate_path('/options/'. $name .'.php');
|
328 |
|
330 |
return array();
|
331 |
}
|
332 |
|
333 |
+
$variables = fw_get_variables_from_file($path, array('options' => array()), $variables);
|
334 |
|
335 |
return $variables['options'];
|
336 |
}
|
403 |
fw_set_db_extension_data( $this->get_name(), $multi_key, $value );
|
404 |
}
|
405 |
|
406 |
+
/**
|
407 |
+
* Get extension's data from user meta
|
408 |
+
*
|
409 |
+
* @param int $user_id
|
410 |
+
* @param string|null $keys
|
411 |
+
*
|
412 |
+
* @return mixed|null
|
413 |
+
*/
|
414 |
+
final public function get_user_data( $user_id, $keys = null ) {
|
415 |
+
return fw_get_db_extension_user_data($user_id, $this->get_name(), $keys);
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* et some extension's data in user meta
|
420 |
+
*
|
421 |
+
* @param int $user_id
|
422 |
+
* @param mixed $value
|
423 |
+
* @param string|null $keys
|
424 |
+
*
|
425 |
+
* @return bool|int
|
426 |
+
*/
|
427 |
+
final public function set_user_data( $user_id, $value, $keys = null ) {
|
428 |
+
return fw_set_db_extension_user_data($user_id, $this->get_name(), $value, $keys);
|
429 |
+
}
|
430 |
+
|
431 |
final public function get_post_options($post_type)
|
432 |
{
|
433 |
return $this->get_options('posts/'. $post_type);
|
framework/helpers/database.php
CHANGED
@@ -359,43 +359,51 @@
|
|
359 |
*
|
360 |
* @param int $user_id
|
361 |
* @param string $extension_name
|
|
|
362 |
*
|
363 |
* If the extension doesn't exist or is disabled, or meta key doesn't exist, returns null,
|
364 |
* else returns the meta key value
|
365 |
*
|
366 |
* @return mixed|null
|
367 |
*/
|
368 |
-
function fw_get_db_extension_user_data( $user_id, $extension_name ) {
|
369 |
if ( ! fw()->extensions->get( $extension_name ) ) {
|
370 |
trigger_error( 'Invalid extension: ' . $extension_name, E_USER_WARNING );
|
371 |
|
372 |
return null;
|
373 |
}
|
374 |
$data = get_user_meta( $user_id, 'fw_data', true );
|
375 |
-
|
376 |
-
|
|
|
377 |
}
|
378 |
|
379 |
-
return
|
380 |
}
|
381 |
|
382 |
/**
|
383 |
* @param int $user_id
|
384 |
* @param string $extension_name
|
385 |
* @param mixed $value
|
|
|
386 |
*
|
387 |
* In case the extension doesn't exist or is disabled, or the value is equal to previous, returns false
|
388 |
*
|
389 |
* @return bool|int
|
390 |
*/
|
391 |
-
function fw_set_db_extension_user_data( $user_id, $extension_name, $value ) {
|
392 |
if ( ! fw()->extensions->get( $extension_name ) ) {
|
393 |
trigger_error( 'Invalid extension: ' . $extension_name, E_USER_WARNING );
|
394 |
|
395 |
return false;
|
396 |
}
|
397 |
$data = get_user_meta( $user_id, 'fw_data', true );
|
398 |
-
|
|
|
|
|
|
|
|
|
|
|
399 |
|
400 |
return fw_update_user_meta( $user_id, 'fw_data', $data );
|
401 |
}
|
@@ -419,11 +427,7 @@
|
|
419 |
if (
|
420 |
!is_null($default_value)
|
421 |
&&
|
422 |
-
(
|
423 |
-
is_null($all_db_values)
|
424 |
-
||
|
425 |
-
is_null(fw_akg($option_id, $all_db_values))
|
426 |
-
)
|
427 |
) {
|
428 |
/**
|
429 |
* Default value was provided in case db value is empty.
|
359 |
*
|
360 |
* @param int $user_id
|
361 |
* @param string $extension_name
|
362 |
+
* @param string $keys
|
363 |
*
|
364 |
* If the extension doesn't exist or is disabled, or meta key doesn't exist, returns null,
|
365 |
* else returns the meta key value
|
366 |
*
|
367 |
* @return mixed|null
|
368 |
*/
|
369 |
+
function fw_get_db_extension_user_data( $user_id, $extension_name, $keys = null ) {
|
370 |
if ( ! fw()->extensions->get( $extension_name ) ) {
|
371 |
trigger_error( 'Invalid extension: ' . $extension_name, E_USER_WARNING );
|
372 |
|
373 |
return null;
|
374 |
}
|
375 |
$data = get_user_meta( $user_id, 'fw_data', true );
|
376 |
+
|
377 |
+
if ( is_null( $keys ) ) {
|
378 |
+
return fw_akg( $extension_name, $data );
|
379 |
}
|
380 |
|
381 |
+
return fw_akg( $extension_name . '/' . $keys, $data );
|
382 |
}
|
383 |
|
384 |
/**
|
385 |
* @param int $user_id
|
386 |
* @param string $extension_name
|
387 |
* @param mixed $value
|
388 |
+
* @param string $keys
|
389 |
*
|
390 |
* In case the extension doesn't exist or is disabled, or the value is equal to previous, returns false
|
391 |
*
|
392 |
* @return bool|int
|
393 |
*/
|
394 |
+
function fw_set_db_extension_user_data( $user_id, $extension_name, $value, $keys = null ) {
|
395 |
if ( ! fw()->extensions->get( $extension_name ) ) {
|
396 |
trigger_error( 'Invalid extension: ' . $extension_name, E_USER_WARNING );
|
397 |
|
398 |
return false;
|
399 |
}
|
400 |
$data = get_user_meta( $user_id, 'fw_data', true );
|
401 |
+
|
402 |
+
if ( $keys == null ) {
|
403 |
+
fw_aks( $extension_name, $value, $data );
|
404 |
+
} else {
|
405 |
+
fw_aks( $extension_name . '/' . $keys, $value, $data );
|
406 |
+
}
|
407 |
|
408 |
return fw_update_user_meta( $user_id, 'fw_data', $data );
|
409 |
}
|
427 |
if (
|
428 |
!is_null($default_value)
|
429 |
&&
|
430 |
+
is_null($option_id ? fw_akg($option_id, $all_db_values) : $all_db_values)
|
|
|
|
|
|
|
|
|
431 |
) {
|
432 |
/**
|
433 |
* Default value was provided in case db value is empty.
|
framework/includes/option-types/radio-text/class-fw-option-type-radio-text.php
CHANGED
@@ -91,6 +91,22 @@ class FW_Option_Type_Radio_Text extends FW_Option_Type
|
|
91 |
|
92 |
$option['choices'][ $this->custom_choice_key ] = '';
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
$selected = fw()->backend->option_type( 'radio' )->get_value_from_input( array(
|
95 |
'value' => $option['value'],
|
96 |
'choices' => $option['choices']
|
91 |
|
92 |
$option['choices'][ $this->custom_choice_key ] = '';
|
93 |
|
94 |
+
|
95 |
+
/*
|
96 |
+
* Sometimes $input_value comes as a string because when you serialize
|
97 |
+
* the form with js, it gives you the value as a string
|
98 |
+
* and we need to treat this case accordingly.
|
99 |
+
*/
|
100 |
+
if (is_string($input_value)) {
|
101 |
+
$tmp_array = array(
|
102 |
+
'predefined' => $input_value,
|
103 |
+
'custom' => $input_value
|
104 |
+
);
|
105 |
+
|
106 |
+
$input_value = $tmp_array;
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
$selected = fw()->backend->option_type( 'radio' )->get_value_from_input( array(
|
111 |
'value' => $option['value'],
|
112 |
'choices' => $option['choices']
|
framework/includes/option-types/range-slider/static/css/styles.css
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
.fw-option-type-range-slider .irs {
|
2 |
height: 30px;
|
3 |
}
|
@@ -11,8 +15,8 @@
|
|
11 |
top: 5px;
|
12 |
background: #ffffff;
|
13 |
border: 1px solid #ddd;
|
14 |
-
-webkit-box-shadow: inset 0 1px 2px rgba(
|
15 |
-
box-shadow: inset 0 1px 2px rgba(
|
16 |
border-radius: 16px;
|
17 |
-moz-border-radius: 16px;
|
18 |
-webkit-border-radius: 16px;
|
@@ -37,21 +41,13 @@
|
|
37 |
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
38 |
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
39 |
box-shadow: inner 0 0 1px 2px #c4d5dc;
|
40 |
-
}
|
41 |
-
|
42 |
-
.fw-option-type-range-slider .irs-bar-edge {
|
43 |
-
height: 7px;
|
44 |
-
top: 33px;
|
45 |
-
width: 16px;
|
46 |
-
border-right: 0;
|
47 |
-
background: #cbcbcb;
|
48 |
border-radius: 16px 0 0 16px;
|
49 |
-moz-border-radius: 16px 0 0 16px;
|
50 |
-webkit-border-radius: 16px 0 0 16px;
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
}
|
56 |
|
57 |
.fw-option-type-range-slider .irs-shadow {
|
@@ -68,7 +64,19 @@
|
|
68 |
filter: alpha(opacity=30);
|
69 |
}
|
70 |
|
71 |
-
.fw-option-type-range-slider .irs-slider {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
top: 0;
|
73 |
border: none;
|
74 |
border-radius: 10px;
|
@@ -83,41 +91,7 @@
|
|
83 |
min-width: 16px;
|
84 |
height: 8px;
|
85 |
line-height: 8px;
|
86 |
-
|
87 |
-
|
88 |
-
.fw-option-type-range-slider #irs-active-slider, .fw-option-type-range-slider .irs-slider:hover {
|
89 |
-
background: #00709f;
|
90 |
-
}
|
91 |
-
|
92 |
-
.fw-option-type-range-slider .irs-min, .fw-option-type-range-slider .irs-max {
|
93 |
-
display: none;
|
94 |
-
color: #333;
|
95 |
-
font-size: 12px;
|
96 |
-
line-height: 1.333;
|
97 |
-
text-shadow: none;
|
98 |
-
top: 0;
|
99 |
-
padding: 1px 5px;
|
100 |
-
background: rgba(0, 0, 0, 0.1);
|
101 |
-
border-radius: 3px;
|
102 |
-
-moz-border-radius: 3px;
|
103 |
-
-webkit-border-radius: 3px;
|
104 |
-
}
|
105 |
-
|
106 |
-
.fw-option-type-range-slider .lt-ie9 .irs-min, .fw-option-type-range-slider .lt-ie9 .irs-max {
|
107 |
-
background: #ccc;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fw-option-type-range-slider .irs-from, .fw-option-type-range-slider .irs-to, .fw-option-type-range-slider .irs-single {
|
111 |
-
display: none;
|
112 |
-
color: #f1f1f1;
|
113 |
-
font-size: 14px;
|
114 |
-
line-height: 1.333;
|
115 |
-
text-shadow: none;
|
116 |
-
padding: 1px 5px;
|
117 |
-
background: #787878;
|
118 |
-
border-radius: 3px;
|
119 |
-
-moz-border-radius: 3px;
|
120 |
-
-webkit-border-radius: 3px;
|
121 |
}
|
122 |
|
123 |
.fw-option-type-range-slider .lt-ie9 .irs-from, .fw-option-type-range-slider .lt-ie9 .irs-to, .fw-option-type-range-slider .lt-ie9 .irs-single {
|
@@ -142,4 +116,4 @@
|
|
142 |
}
|
143 |
|
144 |
.fw-option-type-range-slider .irs-disabled {
|
145 |
-
}
|
1 |
+
.fw-option-type-range-slider.short-slider {
|
2 |
+
max-width: 280px;
|
3 |
+
}
|
4 |
+
|
5 |
.fw-option-type-range-slider .irs {
|
6 |
height: 30px;
|
7 |
}
|
15 |
top: 5px;
|
16 |
background: #ffffff;
|
17 |
border: 1px solid #ddd;
|
18 |
+
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
19 |
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
20 |
border-radius: 16px;
|
21 |
-moz-border-radius: 16px;
|
22 |
-webkit-border-radius: 16px;
|
41 |
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
42 |
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
43 |
box-shadow: inner 0 0 1px 2px #c4d5dc;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
border-radius: 16px 0 0 16px;
|
45 |
-moz-border-radius: 16px 0 0 16px;
|
46 |
-webkit-border-radius: 16px 0 0 16px;
|
47 |
+
}
|
48 |
+
|
49 |
+
.fw-option-type-range-slider .irs-bar-edge {
|
50 |
+
visibility: hidden;
|
51 |
}
|
52 |
|
53 |
.fw-option-type-range-slider .irs-shadow {
|
64 |
filter: alpha(opacity=30);
|
65 |
}
|
66 |
|
67 |
+
.fw-option-type-range-slider #irs-active-slider, .fw-option-type-range-slider .irs-slider:hover {
|
68 |
+
background: #00709f;
|
69 |
+
}
|
70 |
+
|
71 |
+
.fw-option-type-range-slider .irs-min, .fw-option-type-range-slider .irs-max {
|
72 |
+
display: none;
|
73 |
+
}
|
74 |
+
|
75 |
+
.fw-option-type-range-slider .lt-ie9 .irs-min, .fw-option-type-range-slider .lt-ie9 .irs-max {
|
76 |
+
background: #ccc;
|
77 |
+
}
|
78 |
+
|
79 |
+
.fw-option-type-range-slider .irs-from, .fw-option-type-range-slider .irs-to, .fw-option-type-range-slider .irs-single {
|
80 |
top: 0;
|
81 |
border: none;
|
82 |
border-radius: 10px;
|
91 |
min-width: 16px;
|
92 |
height: 8px;
|
93 |
line-height: 8px;
|
94 |
+
z-index: 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
|
97 |
.fw-option-type-range-slider .lt-ie9 .irs-from, .fw-option-type-range-slider .lt-ie9 .irs-to, .fw-option-type-range-slider .lt-ie9 .irs-single {
|
116 |
}
|
117 |
|
118 |
.fw-option-type-range-slider .irs-disabled {
|
119 |
+
}
|
framework/includes/option-types/range-slider/static/js/scripts.js
CHANGED
@@ -1,18 +1,5 @@
|
|
1 |
(function ($, fwEvents) {
|
2 |
var defaults = {
|
3 |
-
onChange: function (data) {
|
4 |
-
var from = (data.from_value) ? data.from_value : data.from;
|
5 |
-
var to = (data.to_value) ? data.to_value : data.to;
|
6 |
-
data.input.next('.fw-irs-range-slider-hidden-input').val(from + ';' + to);
|
7 |
-
data.input.closest('.fw-option-type-range-slider').find('span.irs-slider.from').html(from);
|
8 |
-
data.input.closest('.fw-option-type-range-slider').find('span.irs-slider.to').html(to);
|
9 |
-
},
|
10 |
-
onStart: function (data) {
|
11 |
-
var from = (data.from_value) ? data.from_value : data.from;
|
12 |
-
var to = (data.to_value) ? data.to_value : data.to;
|
13 |
-
data.input.closest('.fw-option-type-range-slider').find('span.irs-slider.from').html(from);
|
14 |
-
data.input.closest('.fw-option-type-range-slider').find('span.irs-slider.to').html(to);
|
15 |
-
},
|
16 |
grid: true
|
17 |
};
|
18 |
|
1 |
(function ($, fwEvents) {
|
2 |
var defaults = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
grid: true
|
4 |
};
|
5 |
|
framework/includes/option-types/range-slider/view.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
<?php if (!defined('FW')) {
|
2 |
-
die('Forbidden');
|
3 |
}
|
4 |
/**
|
5 |
* @var string $id
|
@@ -12,8 +12,8 @@
|
|
12 |
$wrapper_attr = $option['attr'];
|
13 |
|
14 |
unset(
|
15 |
-
|
16 |
-
|
17 |
);
|
18 |
}
|
19 |
|
@@ -23,7 +23,6 @@
|
|
23 |
}
|
24 |
|
25 |
?>
|
26 |
-
<div <?php echo fw_attr_to_html($wrapper_attr); ?>>
|
27 |
-
<
|
28 |
-
<input class="fw-irs-range-slider-hidden-input" type="hidden" <?php echo fw_attr_to_html($input_attr); ?>/>
|
29 |
</div>
|
1 |
+
<?php if ( ! defined( 'FW' ) ) {
|
2 |
+
die( 'Forbidden' );
|
3 |
}
|
4 |
/**
|
5 |
* @var string $id
|
12 |
$wrapper_attr = $option['attr'];
|
13 |
|
14 |
unset(
|
15 |
+
$wrapper_attr['value'],
|
16 |
+
$wrapper_attr['name']
|
17 |
);
|
18 |
}
|
19 |
|
23 |
}
|
24 |
|
25 |
?>
|
26 |
+
<div <?php echo fw_attr_to_html( $wrapper_attr ); ?>>
|
27 |
+
<input class="fw-irs-range-slider" type="text" <?php echo fw_attr_to_html( $input_attr ); ?>/>
|
|
|
28 |
</div>
|
framework/includes/option-types/slider/static/css/styles.css
CHANGED
@@ -15,8 +15,8 @@
|
|
15 |
top: 5px;
|
16 |
background: #ffffff;
|
17 |
border: 1px solid #ddd;
|
18 |
-
-webkit-box-shadow: inset 0 1px 2px rgba(
|
19 |
-
box-shadow: inset 0 1px 2px rgba(
|
20 |
border-radius: 16px;
|
21 |
-moz-border-radius: 16px;
|
22 |
-webkit-border-radius: 16px;
|
@@ -41,25 +41,13 @@
|
|
41 |
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
42 |
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
43 |
box-shadow: inner 0 0 1px 2px #c4d5dc;
|
44 |
-
|
45 |
-
left: 0 !important;
|
46 |
border-radius: 16px 0 0 16px;
|
47 |
-moz-border-radius: 16px 0 0 16px;
|
48 |
-webkit-border-radius: 16px 0 0 16px;
|
49 |
}
|
50 |
|
51 |
.fw-option-type-slider .irs-bar-edge {
|
52 |
-
|
53 |
-
top: 33px;
|
54 |
-
width: 16px;
|
55 |
-
background: #d9ecf4;
|
56 |
-
border-radius: 16px 0 0 16px;
|
57 |
-
-moz-border-radius: 16px 0 0 16px;
|
58 |
-
-webkit-border-radius: 16px 0 0 16px;
|
59 |
-
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
60 |
-
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
61 |
-
box-shadow: inner 0 0 2px 1px #c4d5dc;
|
62 |
-
border-right: none;
|
63 |
}
|
64 |
|
65 |
.fw-option-type-slider .irs-shadow {
|
@@ -76,7 +64,19 @@
|
|
76 |
filter: alpha(opacity=30);
|
77 |
}
|
78 |
|
79 |
-
.fw-option-type-slider .irs-slider {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
top: 0;
|
81 |
border: none;
|
82 |
border-radius: 10px;
|
@@ -91,41 +91,7 @@
|
|
91 |
min-width: 16px;
|
92 |
height: 8px;
|
93 |
line-height: 8px;
|
94 |
-
|
95 |
-
|
96 |
-
.fw-option-type-slider #irs-active-slider, .fw-option-type-slider .irs-slider:hover {
|
97 |
-
background: #00709f;
|
98 |
-
}
|
99 |
-
|
100 |
-
.fw-option-type-slider .irs-min, .fw-option-type-slider .irs-max {
|
101 |
-
display: none;
|
102 |
-
color: #333;
|
103 |
-
font-size: 12px;
|
104 |
-
line-height: 1.333;
|
105 |
-
text-shadow: none;
|
106 |
-
top: 0;
|
107 |
-
padding: 1px 5px;
|
108 |
-
background: rgba(0, 0, 0, 0.1);
|
109 |
-
border-radius: 3px;
|
110 |
-
-moz-border-radius: 3px;
|
111 |
-
-webkit-border-radius: 3px;
|
112 |
-
}
|
113 |
-
|
114 |
-
.fw-option-type-slider .lt-ie9 .irs-min, .fw-option-type-slider .lt-ie9 .irs-max {
|
115 |
-
background: #ccc;
|
116 |
-
}
|
117 |
-
|
118 |
-
.fw-option-type-slider .irs-from, .fw-option-type-slider .irs-to, .fw-option-type-slider .irs-single {
|
119 |
-
display: none;
|
120 |
-
color: #f1f1f1;
|
121 |
-
font-size: 14px;
|
122 |
-
line-height: 1.333;
|
123 |
-
text-shadow: none;
|
124 |
-
padding: 1px 5px;
|
125 |
-
background: #787878;
|
126 |
-
border-radius: 3px;
|
127 |
-
-moz-border-radius: 3px;
|
128 |
-
-webkit-border-radius: 3px;
|
129 |
}
|
130 |
|
131 |
.fw-option-type-slider .lt-ie9 .irs-from, .fw-option-type-slider .lt-ie9 .irs-to, .fw-option-type-slider .lt-ie9 .irs-single {
|
15 |
top: 5px;
|
16 |
background: #ffffff;
|
17 |
border: 1px solid #ddd;
|
18 |
+
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
19 |
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
20 |
border-radius: 16px;
|
21 |
-moz-border-radius: 16px;
|
22 |
-webkit-border-radius: 16px;
|
41 |
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
42 |
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
43 |
box-shadow: inner 0 0 1px 2px #c4d5dc;
|
|
|
|
|
44 |
border-radius: 16px 0 0 16px;
|
45 |
-moz-border-radius: 16px 0 0 16px;
|
46 |
-webkit-border-radius: 16px 0 0 16px;
|
47 |
}
|
48 |
|
49 |
.fw-option-type-slider .irs-bar-edge {
|
50 |
+
visibility: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
.fw-option-type-slider .irs-shadow {
|
64 |
filter: alpha(opacity=30);
|
65 |
}
|
66 |
|
67 |
+
.fw-option-type-slider #irs-active-slider, .fw-option-type-slider .irs-slider:hover {
|
68 |
+
background: #00709f;
|
69 |
+
}
|
70 |
+
|
71 |
+
.fw-option-type-slider .irs-min, .fw-option-type-slider .irs-max {
|
72 |
+
display: none;
|
73 |
+
}
|
74 |
+
|
75 |
+
.fw-option-type-slider .lt-ie9 .irs-min, .fw-option-type-slider .lt-ie9 .irs-max {
|
76 |
+
background: #ccc;
|
77 |
+
}
|
78 |
+
|
79 |
+
.fw-option-type-slider .irs-from, .fw-option-type-slider .irs-to, .fw-option-type-slider .irs-single {
|
80 |
top: 0;
|
81 |
border: none;
|
82 |
border-radius: 10px;
|
91 |
min-width: 16px;
|
92 |
height: 8px;
|
93 |
line-height: 8px;
|
94 |
+
z-index: 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
|
97 |
.fw-option-type-slider .lt-ie9 .irs-from, .fw-option-type-slider .lt-ie9 .irs-to, .fw-option-type-slider .lt-ie9 .irs-single {
|
framework/includes/option-types/slider/static/js/scripts.js
CHANGED
@@ -1,15 +1,5 @@
|
|
1 |
(function ($, fwEvents) {
|
2 |
var defaults = {
|
3 |
-
onChange: function (data) {
|
4 |
-
var from = (data.from_value) ? data.from_value : data.from;
|
5 |
-
data.input.next('.fw-irs-range-slider-hidden-input').val(from);
|
6 |
-
data.input.closest('.fw-option-type-slider').find('span span.irs-slider.single').html(from);
|
7 |
-
},
|
8 |
-
onStart: function (data) {
|
9 |
-
var from = (data.from_value) ? data.from_value : data.from;
|
10 |
-
data.input.closest('.fw-option-type-slider').find('span span.irs-slider.single').html(from);
|
11 |
-
data.input.closest('.fw-option-type-slider').find('.irs-bar-edge').remove();
|
12 |
-
},
|
13 |
grid: true
|
14 |
};
|
15 |
|
1 |
(function ($, fwEvents) {
|
2 |
var defaults = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
grid: true
|
4 |
};
|
5 |
|
framework/includes/option-types/slider/view.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
<?php if (!defined('FW')) {
|
2 |
-
die('Forbidden');
|
3 |
}
|
4 |
/**
|
5 |
* @var string $id
|
@@ -12,8 +12,8 @@
|
|
12 |
$wrapper_attr = $option['attr'];
|
13 |
|
14 |
unset(
|
15 |
-
|
16 |
-
|
17 |
);
|
18 |
}
|
19 |
|
@@ -23,7 +23,6 @@
|
|
23 |
}
|
24 |
|
25 |
?>
|
26 |
-
<div <?php echo fw_attr_to_html($wrapper_attr); ?>>
|
27 |
-
<
|
28 |
-
<input class="fw-irs-range-slider-hidden-input" type="hidden" <?php echo fw_attr_to_html($input_attr); ?>/>
|
29 |
</div>
|
1 |
+
<?php if ( ! defined( 'FW' ) ) {
|
2 |
+
die( 'Forbidden' );
|
3 |
}
|
4 |
/**
|
5 |
* @var string $id
|
12 |
$wrapper_attr = $option['attr'];
|
13 |
|
14 |
unset(
|
15 |
+
$wrapper_attr['value'],
|
16 |
+
$wrapper_attr['name']
|
17 |
);
|
18 |
}
|
19 |
|
23 |
}
|
24 |
|
25 |
?>
|
26 |
+
<div <?php echo fw_attr_to_html( $wrapper_attr ); ?>>
|
27 |
+
<input class="fw-irs-range-slider" type="text" <?php echo fw_attr_to_html( $input_attr ); ?>/>
|
|
|
28 |
</div>
|
framework/includes/option-types/switch/class-fw-option-type-switch.php
CHANGED
@@ -108,7 +108,16 @@ class FW_Option_Type_Switch extends FW_Option_Type
|
|
108 |
return $option['left-choice']['value'];
|
109 |
}
|
110 |
} else {
|
111 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
if (in_array($input_value, array($option['left-choice']['value'], $option['right-choice']['value']), true)) {
|
114 |
return $input_value;
|
108 |
return $option['left-choice']['value'];
|
109 |
}
|
110 |
} else {
|
111 |
+
$tmp_json = json_decode($input_value);
|
112 |
+
|
113 |
+
/*
|
114 |
+
* Check if parsing is successfuly.
|
115 |
+
* If it's not - leave $input_value as it is.
|
116 |
+
*/
|
117 |
+
if (json_last_error() === JSON_ERROR_NONE) {
|
118 |
+
$input_value = $tmp_json;
|
119 |
+
}
|
120 |
+
|
121 |
|
122 |
if (in_array($input_value, array($option['left-choice']['value'], $option['right-choice']['value']), true)) {
|
123 |
return $input_value;
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.4.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.4.15';
|
framework/static/js/fw.js
CHANGED
@@ -1163,7 +1163,7 @@ fw.getQueryString = function(name) {
|
|
1163 |
data: {
|
1164 |
action: 'fw_backend_options_render',
|
1165 |
options: JSON.stringify(this.get('options')),
|
1166 |
-
values: typeof values == 'undefined' ? this.get('values') : values,
|
1167 |
data: {
|
1168 |
name_prefix: 'fw_edit_options_modal',
|
1169 |
id_prefix: 'fw-edit-options-modal-'
|
@@ -1547,7 +1547,9 @@ fw.soleModal = (function(){
|
|
1547 |
hidePrevious: false // just replace the modal content or hide the previous modal and open it again with new content
|
1548 |
updateIfCurrent: false // if current open modal has the same id as modal requested to show, update it without reopening
|
1549 |
backdrop: null // true - light, false - dark
|
|
|
1550 |
afterOpen: function(){}
|
|
|
1551 |
afterClose: function(){}
|
1552 |
}
|
1553 |
*/
|
@@ -1715,7 +1717,9 @@ fw.soleModal = (function(){
|
|
1715 |
backdrop: null,
|
1716 |
customClass: null,
|
1717 |
afterOpen: function(){},
|
1718 |
-
|
|
|
|
|
1719 |
}, opts || {});
|
1720 |
|
1721 |
// hide close button if close is not allowed
|
@@ -1813,6 +1817,7 @@ fw.soleModal = (function(){
|
|
1813 |
|
1814 |
this.setSize(this.current.width, this.current.height);
|
1815 |
|
|
|
1816 |
this.currentMethodTimeoutId = setTimeout(_.bind(function() {
|
1817 |
this.current.afterOpen();
|
1818 |
|
@@ -1872,6 +1877,7 @@ fw.soleModal = (function(){
|
|
1872 |
|
1873 |
if (this.queue.length && !this.queue[0].hidePrevious) {
|
1874 |
// replace content
|
|
|
1875 |
this.$getContent().fadeOut('fast', _.bind(function(){
|
1876 |
this.current.afterClose();
|
1877 |
|
@@ -1894,6 +1900,7 @@ fw.soleModal = (function(){
|
|
1894 |
|
1895 |
this.$modal.addClass('fw-modal-closing');
|
1896 |
|
|
|
1897 |
this.currentMethodTimeoutId = setTimeout(_.bind(function(){
|
1898 |
this.current.afterClose();
|
1899 |
|
1163 |
data: {
|
1164 |
action: 'fw_backend_options_render',
|
1165 |
options: JSON.stringify(this.get('options')),
|
1166 |
+
values: JSON.stringify(typeof values == 'undefined' ? this.get('values') : values),
|
1167 |
data: {
|
1168 |
name_prefix: 'fw_edit_options_modal',
|
1169 |
id_prefix: 'fw-edit-options-modal-'
|
1547 |
hidePrevious: false // just replace the modal content or hide the previous modal and open it again with new content
|
1548 |
updateIfCurrent: false // if current open modal has the same id as modal requested to show, update it without reopening
|
1549 |
backdrop: null // true - light, false - dark
|
1550 |
+
afterOpenStart: function(){} // before open animation starts
|
1551 |
afterOpen: function(){}
|
1552 |
+
afterCloseStart: function(){} // before close animation starts
|
1553 |
afterClose: function(){}
|
1554 |
}
|
1555 |
*/
|
1717 |
backdrop: null,
|
1718 |
customClass: null,
|
1719 |
afterOpen: function(){},
|
1720 |
+
afterOpenStart: function(){},
|
1721 |
+
afterClose: function(){},
|
1722 |
+
afterCloseStart: function(){}
|
1723 |
}, opts || {});
|
1724 |
|
1725 |
// hide close button if close is not allowed
|
1817 |
|
1818 |
this.setSize(this.current.width, this.current.height);
|
1819 |
|
1820 |
+
this.current.afterOpenStart();
|
1821 |
this.currentMethodTimeoutId = setTimeout(_.bind(function() {
|
1822 |
this.current.afterOpen();
|
1823 |
|
1877 |
|
1878 |
if (this.queue.length && !this.queue[0].hidePrevious) {
|
1879 |
// replace content
|
1880 |
+
this.current.afterCloseStart();
|
1881 |
this.$getContent().fadeOut('fast', _.bind(function(){
|
1882 |
this.current.afterClose();
|
1883 |
|
1900 |
|
1901 |
this.$modal.addClass('fw-modal-closing');
|
1902 |
|
1903 |
+
this.current.afterCloseStart();
|
1904 |
this.currentMethodTimeoutId = setTimeout(_.bind(function(){
|
1905 |
this.current.afterClose();
|
1906 |
|
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.4
|
6 |
-
Stable tag: 2.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -83,6 +83,9 @@ Yes; Unyson will work with any theme.
|
|
83 |
|
84 |
== Changelog ==
|
85 |
|
|
|
|
|
|
|
86 |
= 2.4.14 =
|
87 |
* Customizer options: Added `wp-customizer-args` parameter. [#1097](https://github.com/ThemeFuse/Unyson/issues/1097), [#1082](https://github.com/ThemeFuse/Unyson/issues/1082)
|
88 |
|
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.4
|
6 |
+
Stable tag: 2.4.15
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
83 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
= 2.4.15 =
|
87 |
+
* Fixed [#1164](https://github.com/ThemeFuse/Unyson/issues/1164), [#1080](https://github.com/ThemeFuse/Unyson/issues/1080), [#1006](https://github.com/ThemeFuse/Unyson/issues/1006), [#1139](https://github.com/ThemeFuse/Unyson/pull/1139), [#1152](https://github.com/ThemeFuse/Unyson/pull/1152), [#1157](https://github.com/ThemeFuse/Unyson/pull/1157)
|
88 |
+
|
89 |
= 2.4.14 =
|
90 |
* Customizer options: Added `wp-customizer-args` parameter. [#1097](https://github.com/ThemeFuse/Unyson/issues/1097), [#1082](https://github.com/ThemeFuse/Unyson/issues/1082)
|
91 |
|
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.
|
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.15
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|