update
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Action Button Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Actionbutton_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'actionbutton';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<button class="sb-control-action-button sb-btn sby-yt-fs sb-btn-grey">
|
||||
<div v-if="control.buttonIcon" v-html="svgIcons[control.buttonIcon]"></div>
|
||||
<span class="sb-small-p sb-bold sb-dark-text">{{control.label}}</span>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* CheckBox Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Checkbox_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'checkbox';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-checkbox-ctn sby-yt-fs" @click.prevent.default="(control.custom != undefined && control.custom == 'feedtype') ? changeCheckboxSectionValue('type', control.value, 'feedFlyPreview') : changeSwitcherSettingValue(control.id, control.options.enabled, control.options.disabled, control.ajaxAction != undefined ? control.ajaxAction : false)">
|
||||
<div class="sb-control-checkbox" :data-active="(control.custom != undefined && control.custom == 'feedtype') ? <?php echo $controlEditingTypeModel; ?>['type'].includes(control.value) : <?php echo $controlEditingTypeModel; ?>[control.id] == control.options.enabled"></div>
|
||||
<div class="sb-control-label">{{control.label}}</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* CheckBox List Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Checkboxlist_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'checkboxlist';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-checkbox-ctn sby-yt-fs" v-for="option in control.options" @click.prevent.default="changeCheckboxListValue(control.id, option.value)">
|
||||
<div class="sb-control-checkbox" :data-active="<?php echo $controlEditingTypeModel; ?>[control.id].includes(option.value)"></div>
|
||||
<div class="sb-control-label sb-small-p sb-dark-text" v-html="option.label"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* CheckBox Section Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Checkboxsection_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'checkboxsection';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return HTML
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-checkboxsection-header" v-if="control.header">
|
||||
<div class="sb-control-checkboxsection-name">
|
||||
<div v-html="svgIcons['preview']"></div>
|
||||
<strong class="">{{genericText.name}}</strong>
|
||||
</div>
|
||||
<strong>{{genericText.edit}}</strong>
|
||||
</div>
|
||||
<div class="sb-control-checkbox-ctn sby-yt-fs" @click.prevent.default="switchNestedSection(control.section.id, control.section)">
|
||||
<div class="sb-control-checkbox-hover sb-tr-2"></div>
|
||||
<div class="sb-control-checkbox" @click.stop.prevent.default="changeCheckboxSectionValue(control.id, control.value)" :data-active="checkboxSectionValueExists(control.id, control.value)"></div>
|
||||
<div class="sby-yt-fs" :data-active="checkboxSectionValueExists(control.id, control.value)">
|
||||
<strong class="sb-control-label">{{control.label}}</strong>
|
||||
</div>
|
||||
<div class="sb-control-checkboxsection-btn"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Color Override Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Coloroverride_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'coloroverride';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-input-ctn sby-yt-fs sb-control-coloroverride-ctn">
|
||||
<div class="sb-control-coloroverride-content">
|
||||
<div class="sb-control-coloroverride-txt" v-html="<?php echo $controlEditingTypeModel; ?>[control.id]"></div>
|
||||
<div class="sb-control-coloroverride-swatch" :style="'background:'+<?php echo $controlEditingTypeModel; ?>[control.id]"></div>
|
||||
</div>
|
||||
<div class="sb-control-colorpicker-btn" @click.prevent.default="resetColorOverride(control.id)">{{genericText.reset}}</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Color Picker Field Control
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Colorpicker_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 4.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'colorpicker';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 4.0
|
||||
* @access public
|
||||
*
|
||||
* @return HTML
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-input-ctn sby-yt-fs sb-control-colorpicker-ctn" :data-picker-style="control.pickerType ? control.pickerType : 'default'" @click.stop="showColorPickerPospup(control.id)" v-on-clickaway="hideColorPickerPopup()">
|
||||
<!--<sbi-colorpicker :color="<?php echo $controlEditingTypeModel; ?>[control.id]" v-on:change="changeSettingValue(control.id,...arguments)" :control-id="control.id"></sbi-colorpicker>-->
|
||||
<input class="sb-control-input" placeholder="Select" type="text" v-model="<?php echo $controlEditingTypeModel; ?>[control.id]">
|
||||
<div class="sb-control-colorpicker-swatch" :style="'background:'+<?php echo $controlEditingTypeModel; ?>[control.id]+';'"></div>
|
||||
<div class="sb-control-colorpicker-popup" v-show="customizerScreens.activeColorPicker == control.id">
|
||||
<sketch-picker
|
||||
@input="updateColorValue(control.id)"
|
||||
v-model="<?php echo $controlEditingTypeModel; ?>[control.id]"
|
||||
:value="<?php echo $controlEditingTypeModel; ?>[control.id]"
|
||||
:preset-colors="['#fff','#000','#e92b2b','#ffc104','#31e92b','#2b4ee9','#a72be9','#e92b82']"
|
||||
></sketch-picker>
|
||||
<button class="sb-control-action-button sb-colorpicker-reset-btn sb-btn sby-yt-fs sb-btn-grey" @click.prevent.default="resetColor(control.id)">
|
||||
<div v-html="svgIcons['update']"></div>
|
||||
<span>{{genericText.reset}}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="sb-control-colorpicker-btn" v-if="control.pickerType == 'reset'">{{genericText.reset}}</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder Control Base
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
abstract class SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get control info.
|
||||
*
|
||||
* Getting the Control information []
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_info() {
|
||||
return array(
|
||||
'id' => '',
|
||||
'type' => '',
|
||||
'modelname' => '',
|
||||
'layout' => 'full',
|
||||
'reverse' => 'false',
|
||||
'default' => '',
|
||||
'seperator' => 'none',
|
||||
'heading' => '',
|
||||
'description' => '',
|
||||
'tooltip' => '',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Control Output
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {}
|
||||
|
||||
/**
|
||||
* Getting Editing Control Type
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @access public
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public function get_control_edit_type( $editingType ) {
|
||||
switch ( $editingType ) {
|
||||
case 'settings':
|
||||
return 'customizerFeedData.settings';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Control HTML.
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return HTML
|
||||
*/
|
||||
public function print_control_wrapper( $editingType ) {
|
||||
$control_type = $this->get_type();
|
||||
$controlEditingTypeModel = $this->get_control_edit_type( $editingType );
|
||||
?>
|
||||
|
||||
<div class="sb-control-elem-ctn sby-yt-fs" v-if="control.type == '<?php echo $control_type; ?>'"
|
||||
v-show="isControlShown(control)"
|
||||
:data-child="control.child ? 'true' : false"
|
||||
:data-separator="control.separator != undefined ? control.separator : 'none'"
|
||||
:data-type="control.type" :data-layout="control.layout == undefined ? 'block' : 'half'"
|
||||
:data-reverse="control.reverse != undefined ? 'true' : 'false'" :data-stacked="control.stacked ? 'true' : 'false'"
|
||||
:data-heading="control.strongHeading != undefined && control.strongHeading != 'true' ? '' : 'strong'"
|
||||
:data-disabled="control.disabledInput != undefined ? isControlShown(control) : false"
|
||||
:data-switcher-top="control.switcherTop != undefined ? 'true' : false"
|
||||
>
|
||||
|
||||
<div class="sb-control-elem-overlay"
|
||||
v-show="control.condition != undefined || control.checkExtension != undefined || control.checkExtensionDimmed != undefined ? !checkControlCondition(control.condition, control.checkExtension, control.checkExtensionDimmed) : false"
|
||||
@click.prevent.default="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? viewsActive.extensionsPopupElement = control.checkExtensionPopup : false"
|
||||
:class="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? 'sb-cursor-pointer' : ''"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="sb-control-elem-label" v-if="(control.heading == undefined && control.description == undefined) ? false : true && control.type != 'customview'">
|
||||
<div class="sb-control-elem-label-title sby-yt-fs">
|
||||
<div v-if="control.icon != undefined" class="sb-control-elem-icon" v-html="svgIcons[control.icon]"></div>
|
||||
<div class="sb-control-elem-heading sb-small-p sb-dark-text" :data-underline="control.underline" :class="control.enableViewAction != undefined && control.enableViewAction != false ? 'sb-cursor-pointer' : ''" v-html="control.heading" @click.prevent.default="control.enableViewAction != undefined && control.enableViewAction != false ? switchNestedSection(control.enableViewAction, null ) : false"></div>
|
||||
<div class="sb-control-elem-tltp" v-if="control.tooltip != undefined" @mouseover.prevent.default="toggleElementTooltip(control.tooltip, 'show', control.tooltipAlign ? control.tooltipAlign : 'center' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
|
||||
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sb-control-elem-description" v-if="control.descriptionPosition != 'bottom'" v-html="control.description"></div>
|
||||
</div>
|
||||
<div class="sb-control-elem-output">
|
||||
<?php $this->get_control_output( $controlEditingTypeModel ); ?>
|
||||
<div class="sb-control-elem-description" v-if="control.descriptionPosition != undefined && control.descriptionPosition == 'bottom'" v-html="control.description"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Custom View
|
||||
* This control will used for custom HTMlL controls like (source, feed type...)
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Customview_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'customview';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
$this->get_control_sources_output( $controlEditingTypeModel );
|
||||
$this->get_control_shoppable_disabled_output( $controlEditingTypeModel );
|
||||
$this->get_control_shoppable_enabled_output( $controlEditingTypeModel );
|
||||
$this->get_control_shoppable_selected_post_output( $controlEditingTypeModel );
|
||||
$this->get_control_moderation_mode_output( $controlEditingTypeModel );
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Shoppable Feed Disabled Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_shoppable_disabled_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-shoppbale-disabled-ctn sb-control-imginfo-ctn" v-if="control.viewId == 'shoppabledisabled'">
|
||||
<div class="sb-control-imginfo-elem sby-yt-fs">
|
||||
<div class="sb-control-imginfo-icon sby-yt-fs" v-html="svgIcons['shoppableDisabled']"></div>
|
||||
<div class="sb-control-imginfo-text sby-yt-fs" data-textalign="left">
|
||||
<strong class="sb-bold sb-dark-text " v-html="customizeScreensText.shoppableFeedScreen.heading1"></strong>
|
||||
<span v-html="customizeScreensText.shoppableFeedScreen.description1"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Shoppable Feed Enabled Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_shoppable_enabled_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-shoppbale-enbaled-ctn sb-control-imginfo-ctn" v-if="control.viewId == 'shoppableenabled'">
|
||||
<div class="sb-control-imginfo-elem sby-yt-fs">
|
||||
<div class="sb-control-imginfo-icon sby-yt-fs" v-html="svgIcons['shoppableEnabled']"></div>
|
||||
<div class="sb-control-imginfo-text sby-yt-fs" data-textalign="center">
|
||||
<strong class="sb-bold sb-dark-text " v-html="customizeScreensText.shoppableFeedScreen.heading2"></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Shoppable Feed Selected Post
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_shoppable_selected_post_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-shoppbale-selectedpost-ctn" v-if="control.viewId == 'shoppableselectedpost' && shoppableFeed.postId != null">
|
||||
<strong v-html="genericText.selectedPost"></strong>
|
||||
<div class="sb-control-selectedpost-info sby-yt-fs">
|
||||
<img :src="shoppableFeed.postMedia" alt="Selected Shoppable">
|
||||
<span v-html="shoppableFeed.postCaption"></span>
|
||||
</div>
|
||||
<div class="sb-control-selectedpost-input sby-yt-fs">
|
||||
<span class="sby-yt-fs" v-html="genericText.productLink"></span>
|
||||
<input type="text" class="sb-control-input sby-yt-fs" v-model="shoppableFeed.postShoppableUrl" :placeholder="genericText.enterProductLink">
|
||||
</div>
|
||||
<div class="sb-control-selectedpost-btns sby-yt-fs">
|
||||
<button class="sb-shoppable-selectedpost-btn sbi-btn-grey" @click.prevent.default="addPostShoppableFeed()">
|
||||
<div v-html="svgIcons['checkmark']"></div>
|
||||
<span v-html="genericText.add"></span>
|
||||
</button>
|
||||
<button class="sb-shoppable-selectedpost-btn sbi-btn-grey" @click.prevent.default="cancelPostShoppableFeed()">
|
||||
<span v-html="genericText.cancel"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sources Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return HTML
|
||||
*/
|
||||
public function get_control_sources_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-feedtype-ctn" v-if="control.viewId == 'sources'">
|
||||
|
||||
<div class="sb-control-feedtype-item sby-yt-fs" v-for="(feedType, feedTypeID) in selectSourceScreen.multipleTypes" v-if="checkMultipleFeedTypeActiveCustomizer(feedTypeID)">
|
||||
|
||||
<div class="sb-control-elem-label-title sby-yt-fs">
|
||||
<div class="sb-control-elem-heading sb-small-p sb-dark-text" v-html="feedType.heading"></div>
|
||||
<div class="sb-control-elem-tltp" @mouseover.prevent.default="toggleElementTooltip(feedType.description, 'show', 'center' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
|
||||
<div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sb-control-feedtype-list sby-yt-fs">
|
||||
<div class="sb-control-feedtype-list-item" v-for="selectedSource in returnSelectedSourcesByTypeCustomizer(feedTypeID)">
|
||||
<div class="sb-control-feedtype-list-item-icon" v-html="feedTypeID == 'hashtag' ? svgIcons['hashtag'] : svgIcons['user']"></div>
|
||||
<span v-html="feedTypeID == 'hashtag' ? selectedSource : selectedSource.username"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="sb-control-action-button sb-btn sb-btn-grey sby-yt-fs" @click.prevent.default="openFeedTypesPopupCustomizer()">
|
||||
<div v-html="svgIcons['edit']"></div>
|
||||
<span>{{genericText.editSources}}</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Moderation Mode Ouptut
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_moderation_mode_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-moderationmode-ctn" v-if="control.viewId == 'moderationmode'">
|
||||
<button class="sb-control-moderationmode-btn sb-btn sb-btn-right-icon sb-btn-grey sby-yt-fs" v-if="!viewsActive.moderationMode" @click.prevent.default="openModerationMode()">
|
||||
<div class="sb-btn-right-txt">
|
||||
<div v-html="svgIcons['eye1']"></div>
|
||||
<span>{{genericText.moderateFeed}}</span>
|
||||
</div>
|
||||
<div class="sb-btn-right-chevron"></div>
|
||||
</button>
|
||||
|
||||
<div class="sb-control-moderationmode-elements sby-yt-fs" v-if="viewsActive.moderationMode">
|
||||
|
||||
<div class="sb-control-switcher-ctn" :data-active="<?php echo $controlEditingTypeModel; ?>[control.switcher.id] === control.switcher.options.enabled" @click.prevent.default="changeSwitcherSettingValue(control.switcher.id, control.switcher.options.enabled, control.switcher.options.disabled, control.switcher.ajaxAction ? control.switcher.ajaxAction : false)">
|
||||
<div class="sb-control-switcher sb-tr-2"></div>
|
||||
<div class="sb-control-label" v-if="control.switcher.label" :data-title="control.switcher.labelStrong ? 'true' : false">{{control.switcher.label}}</div>
|
||||
</div>
|
||||
|
||||
<div v-if="<?php echo $controlEditingTypeModel; ?>[control.switcher.id] == control.switcher.options.enabled">
|
||||
<div class="sb-control-moderatiomode-selement sby-yt-fs sb-control-before-brd">
|
||||
<div class="sb-control-elem-label-title sby-yt-fs">
|
||||
<div class="sb-control-elem-heading sb-small-p sb-dark-text">{{genericText.moderationMode}}</div>
|
||||
</div>
|
||||
<div class="sb-control-toggle-set-ctn sb-control-toggle-set-desc-ctn sby-yt-fs">
|
||||
<div class="sb-control-toggle-elm sby-yt-fs sb-tr-2" v-for="(moderationItem, moderationId) in control.moderationTypes " @click.prevent.default="switchModerationListType(moderationId)" :data-active="moderationSettings.list_type_selected == moderationId">
|
||||
<div class="sb-control-toggle-deco sb-tr-1"></div>
|
||||
<div class="sb-control-content">
|
||||
<div class="sb-control-label">{{moderationItem.label}}</div>
|
||||
<div class="sb-control-toggle-description">{{moderationItem.description}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sb-control-moderatiomode-selement sby-yt-fs sb-control-before-brd">
|
||||
<div class="sb-control-elem-label-title sby-yt-fs">
|
||||
<div class="sb-control-elem-heading sb-small-p sb-dark-text">{{genericText.moderationModeEnterPostId}}</div>
|
||||
</div>
|
||||
<div class="sby-yt-fs">
|
||||
<textarea class="sb-control-input-textrea sby-yt-fs" v-model="customBlockModerationlistTemp" :placeholder="genericText.moderationModeTextareaPlaceholder"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sb-control-moderationmode-action-btns sb-control-before-brd sby-yt-fs">
|
||||
<button class="sb-btn sb-btn-blue sby-yt-fs" @click.prevent.default="saveModerationSettings()">
|
||||
<div class="sbi-fb-icon-success"></div>
|
||||
{{genericText.moderateFeedSaveExit}}
|
||||
</button>
|
||||
<button class="sb-btn sb-btn-grey sby-yt-fs" @click.prevent.default="activateView('moderationMode'); moderationShoppableMode = false;">
|
||||
<div class="sbi-fb-icon-cancel"></div>
|
||||
{{genericText.cancel}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Date Picker Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Datepicker_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'datepicker';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-input-ctn sby-yt-fs">
|
||||
<input type="date" class="sb-control-input sby-yt-fs" v-model="<?php echo $controlEditingTypeModel; ?>[control.id]" @change.prevent.default="changeSettingValue(control.id, false,false, control.ajaxAction ? control.ajaxAction : false)" :placeholder="control.placeholder ? control.placeholder : ''">
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Heading Text Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Heading_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'heading';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Hidden Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Hidden_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'hidden';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-input-ctn sby-yt-fs">
|
||||
<input type="hidden" v-model="<?php echo $controlEditingTypeModel; ?>[control.id]">
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Image Chooser Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Imagechooser_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'imagechooser';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-imagechooser-ctn sby-yt-fs">
|
||||
<div class="sby-yt-fs">
|
||||
<input type="text" class="sb-control-imagechooser-input sby-yt-fs" :class="checkNotEmpty(<?php echo $controlEditingTypeModel; ?>[control.id]) ? 'sb-control-imagechooser-padding' : ''" v-model="<?php echo $controlEditingTypeModel; ?>[control.id]" :placeholder="control.placeholder ? control.placeholder : <?php echo $controlEditingTypeModel; ?>[control.id]" disabled>
|
||||
<div class="sb-control-imagechooser-clear sbi-fb-tltp-parent" v-if="checkNotEmpty(<?php echo $controlEditingTypeModel; ?>[control.id])">
|
||||
<div class="sb-control-imagechooser-clear-icon" @click.prevent.default="changeSettingValue(control.id, '')"></div>
|
||||
<div class="sbi-fb-tltp-elem"><span>{{genericText.clear.replace(/ /g," ")}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sb-control-imagechooser-btn" @click.prevent.default="imageChooser( control.id )">
|
||||
<div v-html="svgIcons['imageChooser']"></div>
|
||||
<span v-html="checkNotEmpty(<?php echo $controlEditingTypeModel ?>[control.id]) ? genericText.change : genericText.addImage.replace(/ /g,' ')"></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Number Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Number_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'number';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-input-ctn sby-yt-fs" :data-contains-suffix="control.fieldSuffix !== undefined ? 'true' : 'false'">
|
||||
<div class="sb-control-input-info" :class="control.fieldPrefixAction != undefined ? 'sb-cursor-pointer' : ''" v-if="control.fieldPrefix" @click.prevent.default="control.fieldPrefixAction != undefined ? fieldCustomClickAction(control.fieldPrefixAction) : false">{{control.fieldPrefix.replace(/ /g," ")}}</div>
|
||||
<input type="number" class="sb-control-input sby-yt-fs" :placeholder="control.placeholder ? control.placeholder : ''" :step="control.step ? control.step : 1" :max="control.max ? control.max : 1000" :min="control.min ? control.min : 0" v-model="<?php echo $controlEditingTypeModel; ?>[control.id]" @change.prevent.default="changeSettingValue(control.id,false,false, control.ajaxAction ? control.ajaxAction : false)">
|
||||
<div class="sb-control-input-info" :class="control.fieldSuffixAction != undefined ? 'sb-cursor-pointer' : ''" v-if="control.fieldSuffix" @click.prevent.default="control.fieldSuffixAction != undefined ? fieldCustomClickAction(control.fieldSuffixAction) : false">{{control.fieldSuffix.replace(/ /g," ")}}</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Select Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Select_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'select';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-input-ctn sby-yt-fs">
|
||||
<select class="sb-control-input sby-yt-fs" v-model="<?php echo $controlEditingTypeModel; ?>[control.id]" @change.prevent.default="changeSettingValue(control.id,false,false, control.ajaxAction ? control.ajaxAction : false)">
|
||||
<option v-for="(opName, opValue) in control.options" :value="opValue">{{opName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Separator Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Separator_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'separator';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-elem-separator sby-yt-fs" :style="'margin-top:'+ (control.top ? control.top : 0) +'px;margin-bottom:'+ (control.bottom ? control.bottom : 0) +'px;'"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Switcher Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Switcher_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'switcher';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-switcher-ctn" :data-active="<?php echo $controlEditingTypeModel; ?>[control.id] == control.options.enabled" @click.prevent.default="changeSwitcherSettingValue(control.id, control.options.enabled, control.options.disabled, control.ajaxAction ? control.ajaxAction : false)">
|
||||
<div class="sb-control-switcher sb-tr-2"></div>
|
||||
<div class="sb-control-label" v-if="control.label" :data-title="control.labelStrong ? 'true' : false">{{control.label}}</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Text Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Text_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'text';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-input-ctn sby-yt-fs">
|
||||
<div class="sb-control-input-info" v-if="control.fieldPrefix">{{control.fieldPrefix.replace(/ /g," ")}}</div>
|
||||
<input type="text" class="sb-control-input sby-yt-fs" v-model="<?php echo $controlEditingTypeModel; ?>[control.id]" @change.prevent.default="changeSettingValue(control.id, false,false, control.ajaxAction ? control.ajaxAction : false)" :placeholder="control.placeholder ? control.placeholder : ''">
|
||||
<div class="sb-control-input-info" v-if="control.fieldSuffix">{{control.fieldSuffix.replace(/ /g," ")}}</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* TextArea Field Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Textarea_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'textarea';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-textarea-ctn sby-yt-fs">
|
||||
<textarea class="sb-control-input-textrea sby-yt-fs" v-model="<?php echo $controlEditingTypeModel; ?>[control.id]" :placeholder="control.placeholder ? control.placeholder : ''" @focusout.prevent.default="changeSettingValue(false,false,false, control.ajaxAction ? control.ajaxAction : false)"></textarea>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Toggle Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Toggle_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'toggle';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-toggle-ctn sby-yt-fs">
|
||||
<div class="sb-control-toggle-elm sby-yt-fs sb-tr-2" data-active="true">
|
||||
<div class="sb-control-toggle-deco sb-tr-1"></div>
|
||||
<div class="sb-control-toggle-icon" v-if="control.toggle.icon" v-html="svgIcons[control.toggle.icon]"></div>
|
||||
<div class="sb-control-label">{{control.toggle.label}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Toggle Buttons
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Togglebutton_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'togglebutton';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-togglebutton-ctn sby-yt-fs">
|
||||
<div class="sb-control-togglebutton-elm sby-yt-fs sb-tr-1" v-for="toggle in control.options" :data-active="<?php echo $controlEditingTypeModel; ?>[control.id] == toggle.value" v-show="toggle.condition != undefined ? checkControlCondition(toggle.condition) : true" @click.prevent.default="changeSettingValue(control.id,toggle.value, true)" >
|
||||
{{toggle.label}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Customizer Builder
|
||||
* Toggle Set Control
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
namespace SmashBalloon\YouTubeFeed\Builder\Controls;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class SB_Toggleset_Control extends SB_Controls_Base {
|
||||
|
||||
/**
|
||||
* Get control type.
|
||||
*
|
||||
* Getting the Control Type
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_type() {
|
||||
return 'toggleset';
|
||||
}
|
||||
|
||||
/**
|
||||
* Output Control
|
||||
*
|
||||
*
|
||||
* @since 2.0
|
||||
* @access public
|
||||
*/
|
||||
public function get_control_output( $controlEditingTypeModel ) {
|
||||
?>
|
||||
<div class="sb-control-toggle-set-ctn sby-yt-fs">
|
||||
<div class="sb-control-toggle-elm sby-yt-fs sb-tr-2" v-for="toggle in control.options" :data-active="<?php echo $controlEditingTypeModel; ?>[control.id] == toggle.value" @click.prevent.default="changeSettingValue(control.id,toggle.value, toggle.checkExtension != undefined ? checkExtensionActive(toggle.checkExtension) : true, control.ajaxAction != undefined ? control.ajaxAction : false)" v-show="toggle.condition != undefined ? checkControlCondition(toggle.condition) : true" :data-disabled="toggle.checkExtension != undefined ? !checkExtensionActive(toggle.checkExtension) : false">
|
||||
<div class="sb-control-toggle-extension-cover" v-show="toggle.checkExtension != undefined && !checkExtensionActive(toggle.checkExtension)"></div>
|
||||
<div class="sb-control-toggle-deco sb-tr-1"></div>
|
||||
<div class="sb-control-toggle-icon" v-if="toggle.icon" v-html="svgIcons[toggle.icon]"></div>
|
||||
<div class="sb-control-label">{{toggle.label}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user