first commit
This commit is contained in:
@@ -0,0 +1,190 @@
|
||||
/* Custom CSS */
|
||||
body .butterbean-manager .butterbean-content .butterbean-control:after { content: ''; display: block; height: 0; clear: both; visibility: hidden; zoom: 1; }
|
||||
|
||||
body .butterbean-manager .butterbean-nav li[aria-selected=true] a { font-weight: 400; background-color: #fff; margin-right: -1px; }
|
||||
body .butterbean-manager .butterbean-nav li a { color: #555; }
|
||||
body .butterbean-manager .butterbean-nav .dashicons { margin-right: 8px; }
|
||||
|
||||
body .butterbean-manager .butterbean-content .butterbean-control { border-top: 1px solid #f1f1f1; padding: 15px 0; margin: 0; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-control:first-child { border-top: 0; padding-top: 0; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-control:last-child { padding-bottom: 0; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-section { padding: 20px 30px; }
|
||||
body .butterbean-manager .butterbean-content .oceanwp-mb-desc { float: left; width: 45%; }
|
||||
body .butterbean-manager .butterbean-content .oceanwp-mb-field { position: relative; float: right; width: 50%; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-label { font-size: 13px; font-weight: 400; color: #222222; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-description { font-size: 12px; font-weight: normal; font-style: normal; margin: 8px 0 0; padding: 0; color: #939393; }
|
||||
|
||||
/* Form */
|
||||
body .butterbean-manager .butterbean-content input[type="text"],
|
||||
body .butterbean-manager .butterbean-content input[type="number"],
|
||||
body .butterbean-manager .butterbean-content select,
|
||||
body .butterbean-manager .butterbean-content textarea,
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--single,
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--multiple { background-color: #f5f5f5; color: #333333; border: 1px solid rgba(0,0,0,0.05); font-size: 13px; padding: 5px 12px; height: 34px; line-height: 34px; width: 100%; border-radius: 0; margin: 0; outline: none; box-shadow: none !important; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
|
||||
body .butterbean-manager .butterbean-content input[type="text"]:focus,
|
||||
body .butterbean-manager .butterbean-content input[type="number"]:focus,
|
||||
body .butterbean-manager .butterbean-content textarea:focus,
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--single:focus,
|
||||
body .butterbean-manager .butterbean-content .select2-container--default.select2-container--focus .select2-selection--multiple { border-color: rgba(0,0,0,0.08); }
|
||||
body .butterbean-manager .butterbean-content textarea { height: 80px; line-height: 20px; }
|
||||
|
||||
/* Select */
|
||||
body .butterbean-manager .butterbean-content .select2-container { width: 100%; }
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--single { padding: 2px 4px; }
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--single .select2-selection__arrow { padding: 2px 4px; }
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--single .select2-selection__arrow b,
|
||||
body .butterbean-manager .butterbean-content .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { border-width: 0; margin: 0; right: 0; left: auto; }
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--single .select2-selection__arrow b:before { content: '\f347'; font-family: 'dashicons'; position: absolute; top: 50%; right: 0; margin-top: -6px; width: 32px; font-size: 12px; line-height: 1; color: #777; text-align: center; transition: all .3s ease; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; }
|
||||
body .butterbean-manager .butterbean-content .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b:before { -ms-transform:rotate(180deg); -webkit-transform:rotate(180deg); transform:rotate(180deg) }
|
||||
.select2-dropdown.oceanwp-select2 { background-color: #f5f5f5 !important; }
|
||||
.oceanwp-select2 .select2-results .select2-results__option--highlighted,
|
||||
.select2-drop.oceanwp-select2 .select2-result.select2-highlighted { background-color: #3498DB !important; color: #fff !important; box-shadow: none !important; -webkit-box-shadow: none !important; border-radius: 0px !important; -webkit-border-radius: none !important; }
|
||||
.select2-dropdown.oceanwp-select2 .select2-results { margin: 0 !important; padding: 0 !important; max-height: 300px !important; }
|
||||
.oceanwp-select2 .select2-results li:last-child { margin-bottom: 0; }
|
||||
.oceanwp-select2 .select2-search { padding: 6px; margin-bottom: 6px; }
|
||||
.oceanwp-select2 .select2-search input { padding: 5px 15px; margin: 0; box-shadow: none!important; -webkit-box-shadow: none!important; border: 1px solid rgba(0,0,0,0.12)!important; background-color: #fff; }
|
||||
.select2-container--open .select2-dropdown.oceanwp-select2 { margin-top: -1px; border: 1px solid rgba(0, 0, 0, 0.05) !important; box-shadow: none !important; -webkit-box-shadow: none !important; border-radius: 0px !important; -webkit-border-radius: none !important; }
|
||||
.select2-dropdown.oceanwp-select2 .select2-results .select2-results__option,
|
||||
.select2-drop.oceanwp-select2 .select2-result { padding: 0 0.75em !important; height: 32px!important; line-height: 29px !important; overflow: hidden !important; }
|
||||
.oceanwp-select2 .select2-results__option[aria-selected="true"] { background-color: transparent; }
|
||||
|
||||
/* Multiple Select */
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--multiple { height: auto; min-height: 34px; line-height: 1; padding: 0 2px 5px; }
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--multiple .select2-selection__rendered { padding: 0; }
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--multiple .select2-selection__choice { background-color: #e0e0e0; color: #666; border: none; line-height: 1.5; padding: 0 6px; border-radius: 0; margin: 7px 0 0 6px; }
|
||||
body .butterbean-manager .butterbean-content .select2-container--default .select2-selection--multiple .select2-search { line-height: 1.5; margin: 0 0 0 6px; }
|
||||
|
||||
/* Buttonset */
|
||||
body .butterbean-manager .butterbean-content .butterbean-buttonset { display: inline-block; margin: 0; border: 1px solid rgba(0, 0, 0, 0.1); }
|
||||
body .butterbean-manager .butterbean-content .butterbean-buttonset:after { content: ''; display: block; height: 0; clear: both; visibility: hidden; zoom: 1; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-buttonset li { float: left; margin: 0; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-buttonset li label { display: block; background-color: #f5f5f5; color: #555; border-right: 1px solid rgba(0, 0, 0, 0.1); min-width: 60px; padding: 12px 18px; margin: 0; font-size: 13px; line-height: 1; letter-spacing: 0.6px; text-align: center; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -box-sizing: border-box; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-buttonset li:last-child label { border-right: 0; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-buttonset li input { display: none; }
|
||||
body .butterbean-manager .butterbean-content .butterbean-buttonset li .buttonset-input:checked + .buttonset-label { background-color: #3498DB; color: #fff; }
|
||||
|
||||
/* Color */
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container { width: 317px; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-active { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-active .wp-picker-input-wrap { display: -webkit-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between; width: 200px; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-active .wp-picker-input-wrap label { width: 100%; padding-right: 3px; margin-top: 0; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-active .wp-picker-input-wrap input[type="text"] { margin-right: 5px; width: 100% !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .wp-picker-holder { width: 100%; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-picker { width: 100% !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-picker .iris-picker-inner { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-picker .iris-picker-inner .iris-slider { width: 25px !important; margin-left: 15px !important; height: 100% !important; border-radius: 0; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-picker .iris-picker-inner .iris-slider .ui-slider-handle { margin-bottom: 0; right: -3px; left: -3px; border-radius: 0; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-picker .iris-picker-inner .iris-square { width: -webkit-calc(100% - 45px) !important; width: calc(100% - 45px) !important; margin-right: 0; border-radius: 0; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-picker.iris-border { padding-bottom: 30px !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-palette-container { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; width: -webkit-calc(100% - 45px) !important; width: calc(100% - 45px) !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-palette-container > .iris-palette { border: 1px solid #e7e7e7; margin-left: 2px !important; margin-right: 0 !important; width: 19px !important; height: 19px !important; border-radius: 0; box-shadow: none; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-palette-container > .iris-palette:first-child { margin-left: 0 !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-alpha-container { width: 365px; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-alpha-container .iris-picker .iris-square { width: -webkit-calc(100% - 85px) !important; width: calc(100% - 85px) !important; margin-right: 15px; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-alpha-container .iris-palette-container > .iris-palette { width: 20px !important; height: 20px !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-alpha-container .iris-palette-container > .iris-palette:first-child { margin-left: 0 !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-alpha-container .wp-picker-input-wrap { width: -webkit-calc(100% - 120px); width: calc(100% - 120px); }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-alpha-container .wp-picker-input-wrap label input[type="text"] { width: 100% !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-color-result { border-radius: 0; box-shadow: none; }
|
||||
body .butterbean-manager .butterbean-content .button.wp-color-result { height: 31px; border-radius: 0; box-shadow: none; }
|
||||
body .butterbean-manager .butterbean-content .wp-color-result-text { height: 100%; line-height: 30px; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container input[type="text"] { height: 31px; min-height: 31px; line-height: 1; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container input[type="button"] { height: 31px; border-radius: 0; box-shadow: none; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container { max-width: -webkit-calc(100% - 2px); max-width: calc(100% - 2px); }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container .iris-palette-container > .iris-palette { max-width: -webkit-calc((100% - 60px) / 11) !important; max-width: calc((100% - 60px) / 11) !important; }
|
||||
body .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-alpha-container .iris-palette-container > .iris-palette { max-width: -webkit-calc((100% - 100px) / 11) !important; max-width: calc((100% - 100px) / 11) !important; }
|
||||
|
||||
/* Range */
|
||||
body .butterbean-manager .butterbean-content .range-wrapper { display: -webkit-box; display: -ms-flexbox; display: flex; flex-wrap: wrap; -webkit-align-items: center; align-items: center; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
||||
body .butterbean-manager .butterbean-content .range-wrapper:after { content: ''; display: block; height: 0; clear: both; visibility: hidden; zoom: 1; }
|
||||
body .butterbean-manager .butterbean-content input[type=range] { display: block; background-color: rgba(0, 0, 0, 0.1); height: 5px; width: 76%; padding: 0; cursor: pointer; -webkit-transition: background .5s; -moz-transition: background .5s; transition: background .5s; -webkit-appearance: none; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]:focus { box-shadow: none !important; outline: none !important; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]:hover { background-color: rgba(0, 0, 0, 0.15); }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; background-color: #2e86b9; width: 15px; height: 15px; border-radius: 15px; -webkit-border-radius: 15px; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-moz-range-track { border: inherit; background-color: transparent; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-ms-track { border: inherit; color: transparent; background-color: transparent; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-ms-fill-lower,
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-ms-fill-upper { background-color: transparent; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-ms-tooltip { display: none; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border: none; border-radius: 15px; background-color: #2e86b9; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border: none; border-radius: 15px; background-color: #2e86b9; }
|
||||
body .butterbean-manager .butterbean-content input[type="range"]::-ms-thumb { width: 15px; height: 15px; border-radius: 15px; border: 0; background-color: #2e86b9; }
|
||||
body .butterbean-manager .butterbean-content input.oceanwp-range-input { width: 15%; height: 32px; text-align: center; border-radius: 4px; padding: 3px; font-size: 13px; margin-left: 3%; color: #555; -moz-appearance: textfield; }
|
||||
body .butterbean-manager .butterbean-content input.oceanwp-range-input::-webkit-outer-spin-button,
|
||||
body .butterbean-manager .butterbean-content input.oceanwp-range-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
||||
body .butterbean-manager .butterbean-content span.oceanwp-reset-slider { position: relative; width: 3%; margin-left: 2%; line-height: 1; color: rgba(0, 0, 0, 0.2); text-align: center; cursor: pointer; transition: all .3s ease; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -o-transition: all .3s ease; -ms-transition: all .3s ease; }
|
||||
body .butterbean-manager .butterbean-content span.oceanwp-reset-slider:hover { color: #fe5252; }
|
||||
body .butterbean-manager .butterbean-content span.oceanwp-reset-slider span { width: 16px; height: 16px; font-size: 16px; line-height: 1; }
|
||||
|
||||
/* Media */
|
||||
body .butterbean-manager .butterbean-content .uploader input[type="text"] { width: 78%; }
|
||||
body .butterbean-manager .butterbean-content .uploader .oceanwp-add-media { float: right; width: 20%; height: 34px; margin: 0; border-radius: 0; outline: 0; -webkit-box-shadow: none !important; box-shadow: none !important; vertical-align: middle; }
|
||||
body .butterbean-manager .butterbean-content .uploader .oceanwp-add-media:hover,
|
||||
body .butterbean-manager .butterbean-content .uploader .oceanwp-add-media:focus { border-color: #bbb; }
|
||||
|
||||
/* Typography */
|
||||
body .butterbean-manager .butterbean-control-typography ul { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -10px; }
|
||||
body .butterbean-manager .butterbean-control-typography ul li { width: 50%; padding: 0 10px; margin: 0 0 15px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
||||
body .butterbean-manager .butterbean-control-typography ul li.typography-font-family { width: 100%; }
|
||||
body .butterbean-manager .butterbean-control-typography ul li span.label { display: block; margin: 0 0 6px; }
|
||||
|
||||
/* Responsive */
|
||||
@media only screen and (max-width: 1280px) {
|
||||
body .butterbean-manager .butterbean-content input[type=range] { width: 70%; }
|
||||
body .butterbean-manager .butterbean-content input.oceanwp-range-input { width: 20%; }
|
||||
}
|
||||
@media only screen and (min-width: 959px) and (max-width: 1280px) {
|
||||
body .butterbean-manager .butterbean-content .oceanwp-mb-desc,
|
||||
body .butterbean-manager .butterbean-content .oceanwp-mb-field { float: none; width: 100%; }
|
||||
body .butterbean-manager .butterbean-content .oceanwp-mb-desc { margin-bottom: 15px; }
|
||||
}
|
||||
@media only screen and (max-width: 959px) {
|
||||
body .butterbean-manager .butterbean-content .uploader .oceanwp-add-media { padding: 6px 4px; }
|
||||
}
|
||||
@media only screen and (max-width: 480px) {
|
||||
body .butterbean-manager .butterbean-content .oceanwp-mb-desc,
|
||||
body .butterbean-manager .butterbean-content .oceanwp-mb-field { float: none; width: 100%; }
|
||||
body .butterbean-manager .butterbean-content .oceanwp-mb-desc { margin-bottom: 15px; }
|
||||
body .butterbean-manager .butterbean-control-typography ul { margin: 0; }
|
||||
body .butterbean-manager .butterbean-control-typography ul li { width: 100%; padding: 0; }
|
||||
}
|
||||
|
||||
/* RTL */
|
||||
body.rtl .butterbean-manager-default { background: linear-gradient( -90deg, #fafafa 0%, #fafafa 180px, #fff 180px, #fff 100% ); }
|
||||
body.rtl #side-sortables .butterbean-manager-default { background: linear-gradient( -90deg, #fafafa 0%, #fafafa 48px, #fff 48px, #fff 100% ); }
|
||||
body.rtl .butterbean-manager-default .butterbean-nav { float: right; border-left: 1px solid #eee; border-right: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-nav .dashicons { margin-left: 8px; margin-right: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-nav li[aria-selected=true] a { margin-left: -1px; margin-right: 0; }
|
||||
body.rtl .butterbean-manager-default .butterbean-content { float: right; margin-right: -1px; margin-left: 0; border-right: 1px solid #eee; border-left: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .oceanwp-mb-desc { float: right; }
|
||||
body.rtl .butterbean-manager .butterbean-content .oceanwp-mb-field { float: left; }
|
||||
body.rtl .butterbean-manager .butterbean-content .select2-container--default .select2-selection--single .select2-selection__arrow b { right: 50%; left: auto; margin-right: -6px; margin-left: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .select2-container--default .select2-selection--single .select2-selection__arrow { border-right: 1px solid rgba(0, 0, 0, 0.05); border-left: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .select2-container--default .select2-selection--multiple .select2-selection__choice { margin: 5px 6px 0 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .select2-container--default .select2-selection--multiple .select2-search { margin: 0 6px 0 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .butterbean-buttonset li { float: right; }
|
||||
body.rtl .butterbean-manager .butterbean-content .butterbean-buttonset li label { border-left: 1px solid rgba(0, 0, 0, 0.1); border-right: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .butterbean-buttonset li:last-child label { border-left: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .wp-color-result { padding-right: 34px; padding-left: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .wp-picker-container input[type=text].wp-color-picker { float: right; }
|
||||
body.rtl .butterbean-manager .butterbean-content .wp-picker-container.wp-picker-active .wp-picker-input-wrap { margin-right: 7px; margin-left: 0; float: left; }
|
||||
body.rtl .butterbean-manager .butterbean-content .wp-picker-clear { float: left; }
|
||||
body.rtl .butterbean-manager .butterbean-content input.wp-picker-clear { float: left; }
|
||||
body.rtl .butterbean-manager .butterbean-content input[type=range] { float: right; }
|
||||
body.rtl .butterbean-manager .butterbean-content input.oceanwp-range-input { float: right; margin-right: 15px; margin-left: 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content span.oceanwp-reset-slider { float: left; margin: 8px 5px 0 0; }
|
||||
body.rtl .butterbean-manager .butterbean-content .uploader .oceanwp-add-media { float: left; }
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
body.rtl .butterbean-manager .butterbean-content .oceanwp-mb-desc,
|
||||
body.rtl .butterbean-manager .butterbean-content .oceanwp-mb-field { float: none; width: 100%; }
|
||||
}
|
||||
@media only screen and ( max-width: 782px ), ( max-width: 980px ) and ( min-width: 851px ) {
|
||||
body.rtl .butterbean-manager-default { background: linear-gradient( -90deg, #fafafa 0%, #fafafa 48px, #fff 48px, #fff 100% ); }
|
||||
body.rtl .butterbean-manager-default .butterbean-nav .label { right: -1000em; left: auto; }
|
||||
}
|
||||
@media only screen and ( min-width: 850px ) {
|
||||
body.rtl #side-sortables .butterbean-manager-default .butterbean-nav li { border-left: 1px solid #eee; border-right: 0; }
|
||||
body.rtl #side-sortables .butterbean-manager-default .butterbean-nav li:last-of-type { border-left: none; }
|
||||
body.rtl #side-sortables .butterbean-manager-default .butterbean-nav .label { right: -1000em; left: auto; }
|
||||
}
|
||||
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,484 @@
|
||||
.select2-container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
vertical-align: middle; }
|
||||
.select2-container .select2-selection--single {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 28px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
display: block;
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-selection--single .select2-selection__clear {
|
||||
position: relative; }
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 8px;
|
||||
padding-left: 20px; }
|
||||
.select2-container .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 32px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-search--inline {
|
||||
float: left; }
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
font-size: 100%;
|
||||
margin-top: 5px;
|
||||
padding: 0; }
|
||||
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
|
||||
.select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051; }
|
||||
|
||||
.select2-results {
|
||||
display: block; }
|
||||
|
||||
.select2-results__options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-results__option[aria-selected] {
|
||||
cursor: pointer; }
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
left: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--below {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-search--dropdown {
|
||||
display: block;
|
||||
padding: 4px; }
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
.select2-search--dropdown.select2-search--hide {
|
||||
display: none; }
|
||||
|
||||
.select2-close-mask {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
filter: alpha(opacity=0); }
|
||||
|
||||
.select2-hidden-accessible {
|
||||
border: 0 !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
height: 1px !important;
|
||||
margin: -1px !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
width: 1px !important; }
|
||||
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
||||
color: #999;
|
||||
margin-top: 5px;
|
||||
float: left; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid black 1px;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa; }
|
||||
|
||||
.select2-container--default .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield; }
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--default .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd; }
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option {
|
||||
padding-left: 1em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em; }
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #5897fb;
|
||||
color: white; }
|
||||
|
||||
.select2-container--default .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic .select2-selection--single {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-right: 10px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-left: 1px solid #aaa;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
border-right: 1px solid #aaa;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
||||
background: transparent;
|
||||
border: none; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
||||
|
||||
.select2-container--classic .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
outline: 0; }
|
||||
.select2-container--classic .select2-selection--multiple:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
||||
display: none; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #555; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
float: right; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
||||
border: 1px solid #5897fb; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--inline .select2-search__field {
|
||||
outline: 0;
|
||||
box-shadow: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid transparent; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--above {
|
||||
border-bottom: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--below {
|
||||
border-top: none; }
|
||||
|
||||
.select2-container--classic .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--classic .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
||||
color: grey; }
|
||||
|
||||
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #3875d7;
|
||||
color: white; }
|
||||
|
||||
.select2-container--classic .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-dropdown {
|
||||
border-color: #5897fb; }
|
||||
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,210 @@
|
||||
( function() {
|
||||
|
||||
/**
|
||||
* Adds the select control view.
|
||||
*/
|
||||
butterbean.views.register_control( 'select', {
|
||||
|
||||
ready : function() {
|
||||
|
||||
jQuery( this.$el ).find( '.butterbean-select' ).owpSelect2( {
|
||||
minimumResultsForSearch: 10,
|
||||
dropdownCssClass: 'oceanwp-select2',
|
||||
width: '100%'
|
||||
} );
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
/**
|
||||
* Adds the multiple select control view.
|
||||
*/
|
||||
butterbean.views.register_control( 'multiple-select', {
|
||||
|
||||
ready : function() {
|
||||
|
||||
jQuery( this.$el ).find( '.butterbean-multiple-select' ).owpSelect2( {
|
||||
dropdownCssClass: 'oceanwp-select2',
|
||||
width: '100%'
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
/**
|
||||
* Adds the typo control view.
|
||||
*/
|
||||
butterbean.views.register_control( 'typography', {
|
||||
|
||||
ready : function() {
|
||||
|
||||
jQuery( this.$el ).find( '.butterbean-select' ).owpSelect2( {
|
||||
minimumResultsForSearch: 10,
|
||||
dropdownCssClass: 'oceanwp-select2',
|
||||
width: '100%'
|
||||
} );
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
/**
|
||||
* Adds the rgba color control view.
|
||||
*/
|
||||
butterbean.views.register_control( 'rgba-color', {
|
||||
|
||||
ready : function() {
|
||||
|
||||
var options = this.model.attributes.options;
|
||||
|
||||
jQuery( this.$el ).find( '.butterbean-color-picker' ).wpColorPicker( options );
|
||||
}
|
||||
} );
|
||||
|
||||
/**
|
||||
* Adds the range control view.
|
||||
*/
|
||||
butterbean.views.register_control( 'range', {
|
||||
|
||||
ready: function() {
|
||||
|
||||
// Update the text value
|
||||
jQuery( 'input[type=range]' ).on( 'mousedown', function() {
|
||||
|
||||
range = jQuery( this );
|
||||
range_input = range.parent().children( '.oceanwp-range-input' );
|
||||
value = range.attr( 'value' );
|
||||
|
||||
range_input.val( value );
|
||||
|
||||
range.mousemove( function() {
|
||||
value = range.attr( 'value' );
|
||||
range_input.val( value );
|
||||
} );
|
||||
|
||||
} );
|
||||
|
||||
var oceanwp_range_input_number_timeout;
|
||||
|
||||
function oceanwp_autocorrect_range_input_number( input_number, timeout ) {
|
||||
|
||||
var range_input = input_number,
|
||||
range = range_input.parent().find( 'input[type="range"]' ),
|
||||
value = parseFloat( range_input.val() ),
|
||||
reset = parseFloat( range.attr( 'data-reset_value' ) ),
|
||||
step = parseFloat( range_input.attr( 'step' ) ),
|
||||
min = parseFloat( range_input.attr( 'min') ),
|
||||
max = parseFloat( range_input.attr( 'max') );
|
||||
|
||||
clearTimeout( oceanwp_range_input_number_timeout );
|
||||
|
||||
oceanwp_range_input_number_timeout = setTimeout( function() {
|
||||
|
||||
if ( isNaN( value ) ) {
|
||||
range_input.val( reset );
|
||||
range.val( reset ).trigger( 'change' );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( step >= 1 && value % 1 !== 0 ) {
|
||||
value = Math.round( value );
|
||||
range_input.val( value );
|
||||
range.val( value );
|
||||
}
|
||||
|
||||
if ( value > max ) {
|
||||
range_input.val( max );
|
||||
range.val( max ).trigger( 'change' );
|
||||
}
|
||||
|
||||
if ( value < min ) {
|
||||
range_input.val( min );
|
||||
range.val( min ).trigger( 'change' );
|
||||
}
|
||||
|
||||
}, timeout );
|
||||
|
||||
range.val( value ).trigger( 'change' );
|
||||
|
||||
}
|
||||
|
||||
// Change the text value
|
||||
jQuery( 'input.oceanwp-range-input' ).on( 'change keyup', function() {
|
||||
|
||||
oceanwp_autocorrect_range_input_number( jQuery( this ), 1000);
|
||||
|
||||
} ).on( 'focusout', function() {
|
||||
|
||||
oceanwp_autocorrect_range_input_number( jQuery( this ), 0);
|
||||
|
||||
} );
|
||||
|
||||
// Handle the reset button
|
||||
jQuery( '.oceanwp-reset-slider' ).on('click', function() {
|
||||
|
||||
this_input = jQuery( this ).parent().find( 'input' );
|
||||
input_default = this_input.data( 'reset_value' );
|
||||
|
||||
this_input.val( input_default );
|
||||
this_input.change();
|
||||
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
/**
|
||||
* Adds the media control view.
|
||||
*/
|
||||
butterbean.views.register_control( 'media', {
|
||||
|
||||
// Adds custom events.
|
||||
events : {
|
||||
'click .oceanwp-add-media' : 'showmodal',
|
||||
},
|
||||
|
||||
// Executed when the show modal button is clicked.
|
||||
showmodal : function() {
|
||||
|
||||
// If we already have a media modal, open it.
|
||||
if ( ! _.isUndefined( this.media_modal ) ) {
|
||||
|
||||
this.media_modal.open();
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a new media modal.
|
||||
this.media_modal = wp.media( {
|
||||
frame : 'select',
|
||||
multiple : false,
|
||||
editing : true,
|
||||
} );
|
||||
|
||||
// Runs when an media is selected in the media modal.
|
||||
this.media_modal.on( 'select', function() {
|
||||
|
||||
// Gets the JSON data for the first selection.
|
||||
var media = this.media_modal.state().get( 'selection' ).first().toJSON();
|
||||
|
||||
// Updates the model for the view.
|
||||
this.model.set( {
|
||||
value : media.url
|
||||
} );
|
||||
}, this );
|
||||
|
||||
// Opens the media modal.
|
||||
this.media_modal.open();
|
||||
},
|
||||
} );
|
||||
|
||||
/**
|
||||
* Adds the editor control view.
|
||||
*/
|
||||
butterbean.views.register_control( 'editor', {
|
||||
|
||||
ready : function() {
|
||||
|
||||
if ( typeof tinyMCE !== "undefined" ) {
|
||||
tinyMCE.execCommand( 'mceAddEditor', true, this.model.get( 'field_name' ) );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
}() );
|
||||
+1
@@ -0,0 +1 @@
|
||||
butterbean.views.register_control("select",{ready:function(){jQuery(this.$el).find(".butterbean-select").owpSelect2({minimumResultsForSearch:10,dropdownCssClass:"oceanwp-select2",width:"100%"})}}),butterbean.views.register_control("multiple-select",{ready:function(){jQuery(this.$el).find(".butterbean-multiple-select").owpSelect2({dropdownCssClass:"oceanwp-select2",width:"100%"})}}),butterbean.views.register_control("typography",{ready:function(){jQuery(this.$el).find(".butterbean-select").owpSelect2({minimumResultsForSearch:10,dropdownCssClass:"oceanwp-select2",width:"100%"})}}),butterbean.views.register_control("rgba-color",{ready:function(){var e=this.model.attributes.options;jQuery(this.$el).find(".butterbean-color-picker").wpColorPicker(e)}}),butterbean.views.register_control("range",{ready:function(){var u;function e(e,t){var a=e,n=a.parent().find('input[type="range"]'),i=parseFloat(a.val()),r=parseFloat(n.attr("data-reset_value")),o=parseFloat(a.attr("step")),s=parseFloat(a.attr("min")),l=parseFloat(a.attr("max"));clearTimeout(u),u=setTimeout(function(){if(isNaN(i))return a.val(r),void n.val(r).trigger("change");1<=o&&i%1!=0&&(i=Math.round(i),a.val(i),n.val(i)),l<i&&(a.val(l),n.val(l).trigger("change")),i<s&&(a.val(s),n.val(s).trigger("change"))},t),n.val(i).trigger("change")}jQuery("input[type=range]").on("mousedown",function(){range=jQuery(this),range_input=range.parent().children(".oceanwp-range-input"),value=range.attr("value"),range_input.val(value),range.mousemove(function(){value=range.attr("value"),range_input.val(value)})}),jQuery("input.oceanwp-range-input").on("change keyup",function(){e(jQuery(this),1e3)}).on("focusout",function(){e(jQuery(this),0)}),jQuery(".oceanwp-reset-slider").on("click",function(){this_input=jQuery(this).parent().find("input"),input_default=this_input.data("reset_value"),this_input.val(input_default),this_input.change()})}}),butterbean.views.register_control("media",{events:{"click .oceanwp-add-media":"showmodal"},showmodal:function(){_.isUndefined(this.media_modal)&&(this.media_modal=wp.media({frame:"select",multiple:!1,editing:!0}),this.media_modal.on("select",function(){var e=this.media_modal.state().get("selection").first().toJSON();this.model.set({value:e.url})},this)),this.media_modal.open()}}),butterbean.views.register_control("editor",{ready:function(){"undefined"!=typeof tinyMCE&&tinyMCE.execCommand("mceAddEditor",!0,this.model.get("field_name"))}});
|
||||
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+3
File diff suppressed because one or more lines are too long
+234
@@ -0,0 +1,234 @@
|
||||
/* global Color */
|
||||
( function() {
|
||||
|
||||
// Variable for some backgrounds
|
||||
var alphaImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==';
|
||||
|
||||
/**
|
||||
* Overwrite Color to enable support for rbga colors.
|
||||
*/
|
||||
Color.fn.toString = function() {
|
||||
var hex,
|
||||
i;
|
||||
|
||||
if ( this._alpha < 1 ) {
|
||||
return this.toCSS( 'rgba', this._alpha ).replace( /\s+/g, '' );
|
||||
}
|
||||
|
||||
hex = parseInt( this._color, 10 ).toString( 16 );
|
||||
|
||||
if ( this.error ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( hex.length < 6 ) {
|
||||
for ( i = 6 - hex.length - 1; i >= 0; i-- ) {
|
||||
hex = '0' + hex;
|
||||
}
|
||||
}
|
||||
|
||||
return '#' + hex;
|
||||
};
|
||||
|
||||
/**
|
||||
* Overwrite iris
|
||||
*/
|
||||
jQuery.widget( 'a8c.iris', jQuery.a8c.iris, {
|
||||
_create: function() {
|
||||
this._super();
|
||||
|
||||
// Global option for check is mode rbga is enabled
|
||||
this.options.alpha = this.element.data( 'alpha' ) || false;
|
||||
|
||||
// Is not input disabled
|
||||
if ( ! this.element.is( ':input' ) ) {
|
||||
this.options.alpha = false;
|
||||
}
|
||||
|
||||
if ( typeof this.options.alpha !== 'undefined' && this.options.alpha ) {
|
||||
var self = this,
|
||||
_html = '<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>',
|
||||
aContainer = jQuery( _html ).appendTo( self.picker.find( '.iris-picker-inner' ) ),
|
||||
aSlider = aContainer.find( '.iris-slider-offset-alpha' ),
|
||||
controls = {
|
||||
aContainer: aContainer,
|
||||
aSlider: aSlider
|
||||
};
|
||||
|
||||
jQuery( self.picker ).parents( '.wp-picker-container' ).addClass( 'wp-picker-alpha-container' );
|
||||
|
||||
self.options.customWidth = 100;
|
||||
if ( 'undefined' !== typeof self.element.data( 'custom-width' ) ) {
|
||||
self.options.customWidth = parseInt( self.element.data( 'custom-width' ), 10 ) || 0;
|
||||
}
|
||||
|
||||
// Set default width for input reset
|
||||
self.options.defaultWidth = self.element.width();
|
||||
|
||||
// Update width for input
|
||||
if ( self._color._alpha < 1 || self._color.toString().indexOf( 'rgb' ) !== 1 ) {
|
||||
self.element.width( parseInt( self.options.defaultWidth + self.options.customWidth, 10 ) );
|
||||
}
|
||||
|
||||
// Push new controls
|
||||
jQuery.each( controls, function( k, v ) {
|
||||
self.controls[ k ] = v;
|
||||
});
|
||||
|
||||
// Change size strip and add margin for sliders
|
||||
self.controls.square.css({ 'margin-right': '0' });
|
||||
var emptyWidth = ( self.picker.width() - self.controls.square.width() - 20 ),
|
||||
stripsMargin = emptyWidth / 6,
|
||||
stripsWidth = ( emptyWidth / 2 ) - stripsMargin;
|
||||
|
||||
jQuery.each( [ 'aContainer', 'strip' ], function( k, v ) {
|
||||
self.controls[ v ].width( stripsWidth ).css({ 'margin-left': stripsMargin + 'px' });
|
||||
});
|
||||
|
||||
// Add new slider
|
||||
self._initControls();
|
||||
|
||||
// For updated widget
|
||||
self._change();
|
||||
}
|
||||
},
|
||||
|
||||
_initControls: function() {
|
||||
this._super();
|
||||
|
||||
if ( this.options.alpha ) {
|
||||
var self = this,
|
||||
controls = self.controls;
|
||||
|
||||
controls.aSlider.slider({
|
||||
orientation: 'vertical',
|
||||
min: 0,
|
||||
max: 100,
|
||||
step: 1,
|
||||
value: parseInt( self._color._alpha * 100, 10 ),
|
||||
slide: function( event, ui ) {
|
||||
|
||||
// Update alpha value
|
||||
self._color._alpha = parseFloat( ui.value / 100 );
|
||||
self._change.apply( self, arguments );
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_change: function() {
|
||||
this._super();
|
||||
var self = this,
|
||||
reset;
|
||||
|
||||
if ( this.options.alpha ) {
|
||||
var controls = self.controls,
|
||||
alpha = parseInt( self._color._alpha * 100, 10 ),
|
||||
color = self._color.toRgb(),
|
||||
defaultWidth = self.options.defaultWidth,
|
||||
customWidth = self.options.customWidth,
|
||||
target = self.picker.closest( '.wp-picker-container' ).find( '.wp-color-result' ),
|
||||
gradient = [
|
||||
'rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%',
|
||||
'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'
|
||||
];
|
||||
|
||||
// Generate background slider alpha, only for CSS3 old browser fuck!! :)
|
||||
controls.aContainer.css({ 'background': 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + alphaImage + ')' });
|
||||
|
||||
if ( target.hasClass( 'wp-picker-open' ) ) {
|
||||
// Update alpha value
|
||||
controls.aSlider.slider( 'value', alpha );
|
||||
|
||||
/**
|
||||
* Disabled change opacity in default slider Saturation ( only is alpha enabled )
|
||||
* and change input width for view all value
|
||||
*/
|
||||
if ( self._color._alpha < 1 ) {
|
||||
var style = controls.strip.attr( 'style' ).replace( /rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g, 'rgb($1$3$5)' );
|
||||
|
||||
controls.strip.attr( 'style', style );
|
||||
|
||||
self.element.width( parseInt( defaultWidth + customWidth, 10 ) );
|
||||
} else {
|
||||
self.element.width( defaultWidth );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reset = self.element.data( 'reset-alpha' ) || false;
|
||||
if ( reset ) {
|
||||
self.picker.find( '.iris-palette-container' ).on( 'click.palette', '.iris-palette', function() {
|
||||
self._color._alpha = 1;
|
||||
self.active = 'external';
|
||||
self._change();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_addInputListeners: function( input ) {
|
||||
var self = this,
|
||||
debounceTimeout = 100,
|
||||
callback;
|
||||
|
||||
callback = function( event ) {
|
||||
var color = new Color( input.val() ),
|
||||
val = input.val();
|
||||
|
||||
input.removeClass( 'iris-error' );
|
||||
|
||||
// We gave a bad color.
|
||||
if ( color.error ) {
|
||||
|
||||
// Don't error on an empty input.
|
||||
if ( '' !== val ) {
|
||||
input.addClass( 'iris-error' );
|
||||
}
|
||||
} else if ( color.toString() !== self._color.toString() ) {
|
||||
|
||||
// Let's not do this on keyup for hex shortcodes.
|
||||
if ( ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) {
|
||||
self._setOption( 'color', color.toString() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) );
|
||||
|
||||
// If we initialized hidden, show on first focus. The rest is up to you.
|
||||
if ( self.options.hide ) {
|
||||
input.one( 'focus', function() {
|
||||
self.show();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_addPalettes: function() {
|
||||
var container = jQuery( '<div class="iris-palette-container" />' ),
|
||||
palette = jQuery( '<a class="iris-palette" tabindex="0" />' ),
|
||||
colors = ['#000000', '#ffffff', '#f44336', '#E91E63', '#03A9F4', '#00BCD4', '#8BC34A', '#FFEB3B', '#FFC107', '#FF9800', '#607D8B'];
|
||||
|
||||
// Do we have an existing container? Empty and reuse it.
|
||||
if ( this.picker.find( '.iris-palette-container' ).length ) {
|
||||
container = this.picker.find( '.iris-palette-container' ).detach().html( '' );
|
||||
}
|
||||
|
||||
jQuery.each( colors, function( index, val ) {
|
||||
palette.clone().data( 'color', val )
|
||||
.css( 'backgroundColor', val ).appendTo( container )
|
||||
.height( 10 ).width( 10 );
|
||||
});
|
||||
|
||||
this.picker.append( container );
|
||||
}
|
||||
} );
|
||||
}( jQuery ) );
|
||||
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
|
||||
// Fix Safari issue on input click
|
||||
$( '.butterbean-color-picker, .wp-picker-clear, .iris-picker' ).on( 'click', function( e ) {
|
||||
e.preventDefault();
|
||||
} );
|
||||
|
||||
});
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* Buttonset control class.
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
* @subpackage Controls
|
||||
* @see https://github.com/justintadlock/butterbean
|
||||
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Buttonset control
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
class OceanWP_ButterBean_Control_Buttonset extends ButterBean_Control {
|
||||
|
||||
/**
|
||||
* The type of control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'buttonset';
|
||||
|
||||
/**
|
||||
* Get the value for the setting.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @param string $setting
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_value( $setting = 'default' ) {
|
||||
|
||||
$value = parent::get_value( $setting );
|
||||
$object = $this->get_setting( $setting );
|
||||
|
||||
return ! $value && $object ? $object->default : $value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<ul class="butterbean-buttonset">
|
||||
|
||||
<# for ( key in data.choices ) { #>
|
||||
|
||||
<li>
|
||||
<input type="radio" class="buttonset-input" value="{{ key }}" name="{{ data.field_name }}" id="{{ data.field_name }}_{{ key }}" <# if ( data.value === key ) { #> checked="checked" <# } #> />
|
||||
<label class="buttonset-label" for="{{ data.field_name }}_{{ key }}">{{ data.choices[ key ] }}</label>
|
||||
</li>
|
||||
|
||||
<# } #>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<label>
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<input class="widefat butterbean-color-picker" {{{ data.attr }}} value="<# if ( data.value ) { #>#{{ data.value }}<# } #>" />
|
||||
</div>
|
||||
</label>
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Editor control class.
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
* @subpackage Controls
|
||||
* @see https://github.com/justintadlock/butterbean
|
||||
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
/**
|
||||
* Editor control class.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
class OceanWP_ButterBean_Control_Editor extends ButterBean_Control {
|
||||
|
||||
/**
|
||||
* The type of control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'editor';
|
||||
|
||||
/**
|
||||
* Adds custom data to the json array. This data is passed to the Underscore template.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function to_json() {
|
||||
parent::to_json();
|
||||
|
||||
$this->json['value'] = $this->get_value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the attributes for the control.
|
||||
* Sets the new id attribute, as it's required for TinyMCE to function properly.
|
||||
* Sets new class .tinymce for easier js initialization.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_attr() {
|
||||
$this->attr = parent::get_attr();
|
||||
|
||||
$this->attr['class'] = 'tinymce';
|
||||
$this->attr['id'] = $this->get_field_name();
|
||||
|
||||
return $this->attr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<textarea {{{ data.attr }}}>{{{ data.value }}}</textarea>
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<input type="hidden" class="butterbean-attachment-id" name="{{ data.field_name }}" value="{{ data.value }}" />
|
||||
|
||||
<# if ( data.src ) { #>
|
||||
<img class="butterbean-img" src="{{ data.src }}" alt="{{ data.alt }}" />
|
||||
<# } else { #>
|
||||
<div class="butterbean-placeholder">{{ data.l10n.placeholder }}</div>
|
||||
<# } #>
|
||||
|
||||
<p>
|
||||
<# if ( data.src ) { #>
|
||||
<button type="button" class="button button-secondary butterbean-change-media">{{ data.l10n.change }}</button>
|
||||
<button type="button" class="button button-secondary butterbean-remove-media">{{ data.l10n.remove }}</button>
|
||||
<# } else { #>
|
||||
<button type="button" class="button button-secondary butterbean-add-media">{{ data.l10n.upload }}</button>
|
||||
<# } #>
|
||||
</p>
|
||||
</div>
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/**
|
||||
* Media control class.
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
* @subpackage Controls
|
||||
* @see https://github.com/justintadlock/butterbean
|
||||
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
/**
|
||||
* Media control class.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
class OceanWP_ButterBean_Control_Media extends ButterBean_Control {
|
||||
|
||||
/**
|
||||
* The type of control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'media';
|
||||
|
||||
/**
|
||||
* Array of text labels to use for the media upload frame.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $l10n = array();
|
||||
|
||||
/**
|
||||
* Creates a new control object.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @param object $manager
|
||||
* @param string $name
|
||||
* @param array $args
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( $manager, $name, $args = array() ) {
|
||||
parent::__construct( $manager, $name, $args );
|
||||
|
||||
$this->l10n = wp_parse_args(
|
||||
$this->l10n,
|
||||
array(
|
||||
'upload' => esc_html__( 'Browse', 'ocean-extra' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue scripts/styles for the control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function enqueue() {
|
||||
|
||||
wp_enqueue_media();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds custom data to the json array.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function to_json() {
|
||||
parent::to_json();
|
||||
|
||||
$this->json['l10n'] = $this->l10n;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<div class="uploader">
|
||||
<input type="text" {{{ data.attr }}} name="{{ data.field_name }}" value="{{ data.value }}" />
|
||||
<button type="button" class="button button-secondary oceanwp-add-media">{{ data.l10n.upload }}</button>
|
||||
</div>
|
||||
</div>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Multiple Select control class.
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
* @subpackage Controls
|
||||
* @see https://github.com/justintadlock/butterbean
|
||||
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
/**
|
||||
* Multiple Select control class.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
class OceanWP_ButterBean_Control_Multiple_Select extends ButterBean_Control {
|
||||
|
||||
/**
|
||||
* The type of control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'multiple-select';
|
||||
|
||||
/**
|
||||
* Adds custom data to the json array. This data is passed to the Underscore template.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function to_json() {
|
||||
parent::to_json();
|
||||
$this->json['value'] = (array) $this->get_value();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<select class="widefat butterbean-multiple-select" multiple="multiple" name="{{ data.field_name }}[]" {{{ data.attr }}}>
|
||||
|
||||
<# _.each( data.choices, function( label, choice ) { #>
|
||||
|
||||
<option value="{{ choice }}" <# if ( ( -1 !== _.indexOf( data.value, choice ) ) ) { #> selected="selected" <# } #>>{{ label }}</option>
|
||||
|
||||
<# } ) #>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<input type="number" value="{{ data.value }}" {{{ data.attr }}} />
|
||||
</div>
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Range control class.
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
* @subpackage Controls
|
||||
* @see https://github.com/justintadlock/butterbean
|
||||
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
/**
|
||||
* Range control class.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
class OceanWP_ButterBean_Control_Range extends ButterBean_Control {
|
||||
|
||||
/**
|
||||
* The type of control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'range';
|
||||
|
||||
/**
|
||||
* Gets the attributes for the control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function get_attr() {
|
||||
$attr = parent::get_attr();
|
||||
|
||||
$setting = $this->get_setting();
|
||||
|
||||
$attr['data-reset_value'] = $setting ? $setting->default : '';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value for the setting.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @param string $setting
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_value( $setting = 'default' ) {
|
||||
|
||||
$value = parent::get_value( $setting );
|
||||
$object = $this->get_setting( $setting );
|
||||
|
||||
return ! $value && $object ? $object->default : $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<div class="range-wrapper">
|
||||
<input type="range" {{{ data.attr }}} value="{{ data.value }}" />
|
||||
<input type="number" {{{ data.attr }}} class="oceanwp-range-input" value="{{ data.value }}" />
|
||||
<span class="oceanwp-reset-slider"><span class="dashicons dashicons-image-rotate"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* RGBA Color control class.
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
* @subpackage Controls
|
||||
* @see https://github.com/justintadlock/butterbean
|
||||
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* RGBA Color control
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
class OceanWP_ButterBean_Control_RGBA_Color extends ButterBean_Control {
|
||||
|
||||
/**
|
||||
* The type of control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'rgba-color';
|
||||
|
||||
/**
|
||||
* Custom options to pass to the color picker. Mostly, this is a wrapper for
|
||||
* `iris()`, which is bundled with core WP. However, if they change pickers
|
||||
* in the future, it may correspond to a different script.
|
||||
*
|
||||
* @link http://automattic.github.io/Iris/#options
|
||||
* @link https://make.wordpress.org/core/2012/11/30/new-color-picker-in-wp-3-5/
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $options = array();
|
||||
|
||||
/**
|
||||
* Gets the attributes for the control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function get_attr() {
|
||||
$attr = parent::get_attr();
|
||||
|
||||
$setting = $this->get_setting();
|
||||
|
||||
$attr['type'] = 'text';
|
||||
$attr['maxlength'] = 7;
|
||||
$attr['data-default'] = $setting ? $setting->default : '';
|
||||
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value for the setting.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @param string $setting
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_value( $setting = 'default' ) {
|
||||
|
||||
$value = parent::get_value( $setting );
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds custom data to the json array. This data is passed to the Underscore template.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function to_json() {
|
||||
parent::to_json();
|
||||
|
||||
$this->json['options'] = $this->options;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<label>
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field alpha-true">
|
||||
<input class="widefat butterbean-color-picker" {{{ data.attr }}} value="<# if ( data.value ) { #>{{ data.value }}<# } #>" data-alpha="true" />
|
||||
</div>
|
||||
</label>
|
||||
@@ -0,0 +1,21 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<select class="widefat butterbean-select" {{{ data.attr }}}>
|
||||
|
||||
<# _.each( data.choices, function( label, choice ) { #>
|
||||
|
||||
<option value="{{ choice }}" <# if ( data.value === choice ) { #> selected="selected" <# } #>>{{ label }}</option>
|
||||
|
||||
<# } ) #>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<input type="text" value="{{ data.value }}" {{{ data.attr }}} />
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<label>
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<textarea type="text" class="widefat" {{{ data.attr }}}>{{{ data.value }}}</textarea>
|
||||
</div>
|
||||
</label>
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
<?php
|
||||
/**
|
||||
* Typography control class.
|
||||
*
|
||||
* @package OceanWP WordPress theme
|
||||
* @subpackage Controls
|
||||
* @see https://github.com/justintadlock/butterbean
|
||||
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Typography control
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*/
|
||||
class OceanWP_ButterBean_Control_Typography extends ButterBean_Control {
|
||||
|
||||
/**
|
||||
* The type of control.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'typography';
|
||||
|
||||
/**
|
||||
* Array
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $l10n = array();
|
||||
|
||||
/**
|
||||
* Creates a new control object.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @param object $manager
|
||||
* @param string $name
|
||||
* @param array $args
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( $manager, $name, $args = array() ) {
|
||||
|
||||
// Let the parent class do its thing.
|
||||
parent::__construct( $manager, $name, $args );
|
||||
|
||||
// Make sure we have labels.
|
||||
$this->l10n = wp_parse_args(
|
||||
$this->l10n,
|
||||
array(
|
||||
'family' => esc_html__( 'Font Family', 'ocean-portfolio' ),
|
||||
'size' => esc_html__( 'Font Size', 'ocean-portfolio' ),
|
||||
'weight' => esc_html__( 'Font Weight', 'ocean-portfolio' ),
|
||||
'style' => esc_html__( 'Font Style', 'ocean-portfolio' ),
|
||||
'transform' => esc_html__( 'Text Transform', 'ocean-portfolio' ),
|
||||
'line_height' => esc_html__( 'Line Height', 'ocean-portfolio' ),
|
||||
'spacing' => esc_html__( 'Letter Spacing', 'ocean-portfolio' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds custom data to the json array. This data is passed to the Underscore template.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function to_json() {
|
||||
parent::to_json();
|
||||
|
||||
// Loop through each of the settings and set up the data for it.
|
||||
foreach ( $this->settings as $setting_key => $setting_id ) {
|
||||
|
||||
$this->json[ $setting_key ] = array(
|
||||
'name' => $this->get_field_name( $setting_key ),
|
||||
'value' => $this->get_value( $setting_key ),
|
||||
'label' => isset( $this->l10n[ $setting_key ] ) ? $this->l10n[ $setting_key ] : ''
|
||||
);
|
||||
|
||||
if ( 'family' === $setting_key )
|
||||
$this->json[ $setting_key ]['choices'] = $this->get_font_families();
|
||||
|
||||
elseif ( 'weight' === $setting_key )
|
||||
$this->json[ $setting_key ]['choices'] = $this->get_font_weight_choices();
|
||||
|
||||
elseif ( 'style' === $setting_key )
|
||||
$this->json[ $setting_key ]['choices'] = $this->get_font_style_choices();
|
||||
|
||||
elseif ( 'transform' === $setting_key )
|
||||
$this->json[ $setting_key ]['choices'] = $this->get_text_transform_choices();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the available font families.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function get_font_families() {
|
||||
|
||||
$fonts = array( esc_html__( 'Default', 'ocean-portfolio' ) );
|
||||
$id = '';
|
||||
|
||||
// Add custom fonts from child themes
|
||||
if ( function_exists( 'ocean_add_custom_fonts' ) ) {
|
||||
$get_fonts = ocean_add_custom_fonts();
|
||||
if ( $get_fonts && is_array( $get_fonts ) ) {
|
||||
foreach ( $get_fonts as $font ) {
|
||||
$fonts[$font] = $font;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get Standard font options
|
||||
if ( $std_fonts = oceanwp_standard_fonts() ) {
|
||||
foreach ( $std_fonts as $font ) {
|
||||
$fonts[$font] = $font;
|
||||
}
|
||||
}
|
||||
|
||||
// Google font options
|
||||
if ( $google_fonts = oceanwp_google_fonts_array() ) {
|
||||
foreach ( $google_fonts as $font ) {
|
||||
$fonts[$font] = $font;
|
||||
}
|
||||
}
|
||||
|
||||
return $fonts;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the available font weights.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function get_font_weight_choices() {
|
||||
|
||||
return array(
|
||||
'' => esc_html__( 'Default', 'ocean-portfolio' ),
|
||||
'100' => esc_html__( 'Thin: 100', 'ocean-portfolio' ),
|
||||
'200' => esc_html__( 'Light: 200', 'ocean-portfolio' ),
|
||||
'300' => esc_html__( 'Book: 300', 'ocean-portfolio' ),
|
||||
'400' => esc_html__( 'Normal: 400', 'ocean-portfolio' ),
|
||||
'500' => esc_html__( 'Medium: 500', 'ocean-portfolio' ),
|
||||
'600' => esc_html__( 'Semibold: 600', 'ocean-portfolio' ),
|
||||
'700' => esc_html__( 'Bold: 700', 'ocean-portfolio' ),
|
||||
'800' => esc_html__( 'Extra Bold: 800', 'ocean-portfolio' ),
|
||||
'900' => esc_html__( 'Black: 900', 'ocean-portfolio' ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the available font styles.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function get_font_style_choices() {
|
||||
|
||||
return array(
|
||||
'' => esc_html__( 'Default', 'ocean-portfolio' ),
|
||||
'normal' => esc_html__( 'Normal', 'ocean-portfolio' ),
|
||||
'italic' => esc_html__( 'Italic', 'ocean-portfolio' ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the available text transform.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function get_text_transform_choices() {
|
||||
|
||||
return array(
|
||||
'' => esc_html__( 'Default', 'ocean-portfolio' ),
|
||||
'capitalize' => esc_html__( 'Capitalize', 'ocean-portfolio' ),
|
||||
'lowercase' => esc_html__( 'Lowercase', 'ocean-portfolio' ),
|
||||
'uppercase' => esc_html__( 'Uppercase', 'ocean-portfolio' )
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
<label>
|
||||
<div class="oceanwp-mb-desc">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="butterbean-label">{{ data.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.description ) { #>
|
||||
<span class="butterbean-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
<div class="oceanwp-mb-field">
|
||||
<ul>
|
||||
|
||||
<# if ( data.family && data.family.choices ) { #>
|
||||
<li class="typography-font-family">
|
||||
|
||||
<# if ( data.family.label ) { #>
|
||||
<span class="label">{{ data.family.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<select class="widefat butterbean-select" name="{{ data.family.name }}">
|
||||
|
||||
<# _.each( data.family.choices, function( label, choice ) { #>
|
||||
<option value="{{ choice }}" <# if ( choice === data.family.value ) { #> selected="selected" <# } #>>{{ label }}</option>
|
||||
<# } ) #>
|
||||
|
||||
</select>
|
||||
</li>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.size ) { #>
|
||||
<li class="typography-font-size">
|
||||
|
||||
<# if ( data.size.label ) { #>
|
||||
<span class="label">{{ data.size.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<input type="text" name="{{ data.size.name }}" value="{{ data.size.value }}" placeholder="<?php esc_html_e( 'px - em - rem', 'ocean-portfolio' ); ?>" />
|
||||
|
||||
</li>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.weight && data.weight.choices ) { #>
|
||||
<li class="typography-font-weight">
|
||||
|
||||
<# if ( data.weight.label ) { #>
|
||||
<span class="label">{{ data.weight.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<select class="widefat butterbean-select" name="{{ data.weight.name }}">
|
||||
|
||||
<# _.each( data.weight.choices, function( label, choice ) { #>
|
||||
|
||||
<option value="{{ choice }}" <# if ( choice === data.weight.value ) { #> selected="selected" <# } #>>{{ label }}</option>
|
||||
|
||||
<# } ) #>
|
||||
|
||||
</select>
|
||||
</li>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.style && data.style.choices ) { #>
|
||||
<li class="typography-font-style">
|
||||
|
||||
<# if ( data.style.label ) { #>
|
||||
<span class="label">{{ data.style.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<select class="widefat butterbean-select" name="{{ data.style.name }}">
|
||||
|
||||
<# _.each( data.style.choices, function( label, choice ) { #>
|
||||
|
||||
<option value="{{ choice }}" <# if ( choice === data.style.value ) { #> selected="selected" <# } #>>{{ label }}</option>
|
||||
|
||||
<# } ) #>
|
||||
|
||||
</select>
|
||||
</li>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.transform && data.transform.choices ) { #>
|
||||
<li class="typography-text-transform">
|
||||
|
||||
<# if ( data.transform.label ) { #>
|
||||
<span class="label">{{ data.transform.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<select class="widefat butterbean-select" name="{{ data.transform.name }}">
|
||||
|
||||
<# _.each( data.transform.choices, function( label, choice ) { #>
|
||||
|
||||
<option value="{{ choice }}" <# if ( choice === data.transform.value ) { #> selected="selected" <# } #>>{{ label }}</option>
|
||||
|
||||
<# } ) #>
|
||||
|
||||
</select>
|
||||
</li>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.line_height ) { #>
|
||||
<li class="typography-line-height">
|
||||
|
||||
<# if ( data.line_height.label ) { #>
|
||||
<span class="label">{{ data.line_height.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<input type="text" name="{{ data.line_height.name }}" value="{{ data.line_height.value }}" placeholder="<?php esc_html_e( 'px - em - rem', 'ocean-portfolio' ); ?>" />
|
||||
|
||||
</li>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.spacing ) { #>
|
||||
<li class="typography-letter-spacing">
|
||||
|
||||
<# if ( data.spacing.label ) { #>
|
||||
<span class="label">{{ data.spacing.label }}</span>
|
||||
<# } #>
|
||||
|
||||
<input type="text" name="{{ data.spacing.name }}" value="{{ data.spacing.value }}" placeholder="<?php esc_html_e( 'px - em - rem', 'ocean-portfolio' ); ?>" />
|
||||
|
||||
</li>
|
||||
<# } #>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</label>
|
||||
Reference in New Issue
Block a user