Skip to content

Commit 7df07ed

Browse files
committed
imporved customizer framework fields styles
1 parent 53b1db3 commit 7df07ed

File tree

7 files changed

+26
-43
lines changed

7 files changed

+26
-43
lines changed

assets/css/csf.css

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2790,11 +2790,6 @@ This file is generated by `grunt build`, do not edit it by hand.
27902790
.control-section .csf-field .csf-fieldset {
27912791
margin-left: 0;
27922792
}
2793-
.control-section .widget-content .csf-field {
2794-
margin-right: -10px;
2795-
margin-left: -10px;
2796-
padding: 10px 12px;
2797-
}
27982793
.control-section .csf-field-select select {
27992794
width: 100%;
28002795
}
@@ -2818,12 +2813,12 @@ This file is generated by `grunt build`, do not edit it by hand.
28182813
font-size: 12px;
28192814
}
28202815
.control-section .csf-field-content,
2821-
.control-section .csf-field-notice .csf-notice {
2816+
.control-section .csf-field-submessage .csf-submessage {
28222817
margin-right: -15px;
28232818
margin-left: -15px;
28242819
padding: 15px;
28252820
}
2826-
.control-section .csf-fieldset .csf-field-notice .csf-notice,
2821+
.control-section .csf-fieldset .csf-field-submessage .csf-submessage,
28272822
.control-section .csf-fieldset .csf-field-heading,
28282823
.control-section .csf-fieldset .csf-field-subheading {
28292824
margin-left: 0;
@@ -2836,37 +2831,25 @@ This file is generated by `grunt build`, do not edit it by hand.
28362831
float: none;
28372832
width: 100%;
28382833
}
2839-
.control-section .csf-field-sorter .csf-disabled {
2840-
margin-left: 0;
2841-
margin-top: 15px;
2842-
}
2843-
.control-section .csf-field-background .csf-field-upload {
2844-
width: 100%;
2845-
}
2846-
.control-section .csf-field-background .csf-field-upload input {
2847-
width: 100%;
2848-
margin: 0;
2834+
.control-section .csf-field-sorter .csf-modules:first-child {
2835+
padding-right: 0;
2836+
padding-bottom: 15px;
28492837
}
2850-
.control-section .csf-field-background .csf-field-upload a {
2838+
.control-section .csf-field-background .csf--select {
28512839
width: 100%;
2852-
text-align: center;
2853-
margin: 5px 1px;
28542840
}
2855-
.control-section .csf-field-background .csf-pseudo-field {
2856-
width: 100%;
2857-
padding: 0 0 5px 0 !important;
2841+
.control-section .csf-field-border select,
2842+
.control-section .csf-field-spacing select,
2843+
.control-section .csf-field-dimensions select {
2844+
width: auto;
28582845
}
2859-
.control-section .csf-field-background .csf-field-color {
2860-
top: 0;
2846+
.control-section .csf-field-spinner input {
2847+
width: 50px;
28612848
}
28622849
.control-section .csf-field-backup .csf-export-data {
28632850
display: none;
28642851
}
2865-
.control-section .csf-field-typography select {
2866-
width: 100% !important;
2867-
margin: 0 0 5px 0;
2868-
}
2869-
.control-section .csf-field-fieldset .csf-inner {
2852+
.control-section .csf-field-fieldset .csf-fieldset-content {
28702853
border-color: #e5e5e5;
28712854
}
28722855
.control-section .csf-field-fieldset .csf-field {
@@ -2880,18 +2863,21 @@ This file is generated by `grunt build`, do not edit it by hand.
28802863
}
28812864
.control-section .csf-field-group .csf-field,
28822865
.control-section .csf-field-tabbed .csf-field,
2866+
.control-section .csf-field-sortable .csf-field,
28832867
.control-section .csf-field-repeater .csf-field,
28842868
.control-section .csf-field-accordion .csf-field {
28852869
padding: 10px;
28862870
}
28872871
.control-section .csf-field-group .csf-field .csf-title,
28882872
.control-section .csf-field-tabbed .csf-field .csf-title,
2873+
.control-section .csf-field-sortable .csf-field .csf-title,
28892874
.control-section .csf-field-repeater .csf-field .csf-title,
28902875
.control-section .csf-field-accordion .csf-field .csf-title {
28912876
margin-bottom: 5px;
28922877
}
28932878
.control-section .csf-field-group .csf-field h4,
28942879
.control-section .csf-field-tabbed .csf-field h4,
2880+
.control-section .csf-field-sortable .csf-field h4,
28952881
.control-section .csf-field-repeater .csf-field h4,
28962882
.control-section .csf-field-accordion .csf-field h4 {
28972883
font-size: 12px;

assets/css/csf.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/csf.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,6 @@
426426

427427
$this.find('> [data-controller]').each( function() {
428428

429-
console.log( $this );
430-
431429
var $field = $(this),
432430
controllers = $field.data('controller').split('|'),
433431
conditions = $field.data('condition').split('|'),
@@ -1144,7 +1142,7 @@
11441142
CSF.helper.inputs_rename( $wrapper.find('.csf-cloneable-item') );
11451143

11461144
$wrapper.csf_customizer_refresh();
1147-
$wrapper.csf_customizer_listen(true);
1145+
$wrapper.csf_customizer_listen({closest: true});
11481146

11491147
});
11501148

@@ -1227,7 +1225,6 @@
12271225

12281226
$sortable.find('.csf--sortable-content').csf_reload_script();
12291227

1230-
12311228
});
12321229
};
12331230

assets/js/csf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fields/media/media.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public function render() {
5353
echo '</div>';
5454
}
5555

56-
echo '<div class="csf--placeholder'. $hidden_url .'">';
57-
echo '<input type="text" name="'. $this->field_name('[url]') .'" value="'. $this->value['url'] .'" class="csf--url" readonly="readonly"'. $this->field_attributes() . $placeholder .' />';
56+
echo '<div class="csf--placeholder">';
57+
echo '<input type="text" name="'. $this->field_name('[url]') .'" value="'. $this->value['url'] .'" class="csf--url'. $hidden_url .'" readonly="readonly"'. $this->field_attributes() . $placeholder .' />';
5858
echo '<a href="#" class="button button-primary csf--button" data-library="'. esc_attr( $library ) .'" data-preview-size="'. esc_attr( $args['preview_size'] ) .'">'. $args['button_title'] .'</a>';
5959
echo '</div>';
6060

functions/customize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected function render() {
6565

6666
public function render_content() {
6767

68-
$unallows = array();
68+
$unallows = array( 'sortable' );
6969
$complex = array( 'accordion', 'background', 'backup', 'border', 'button_set', 'checkbox', 'color_group', 'dimensions', 'fieldset', 'group', 'image_select', 'link_color', 'media', 'palette', 'repeater', 'sortable', 'sorter', 'switcher', 'tabbed' );
7070
$field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
7171
$custom = ( ! empty( $this->field['customizer'] ) ) ? true : false;

samples/options.samples.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,10 +1273,10 @@
12731273
),
12741274

12751275
array(
1276-
'id' => 'opt-media-3',
1277-
'type' => 'media',
1278-
'title' => 'Media without url',
1279-
'preview' => false,
1276+
'id' => 'opt-media-3',
1277+
'type' => 'media',
1278+
'title' => 'Media without url',
1279+
'url' => false,
12801280
),
12811281

12821282
array(

0 commit comments

Comments
 (0)