SB_Actionbutton_Control.php
1 month ago
SB_Checkbox_Control.php
1 month ago
SB_Checkboxlist_Control.php
1 month ago
SB_Checkboxsection_Control.php
1 month ago
SB_Coloroverride_Control.php
1 month ago
SB_Colorpicker_Control.php
1 month ago
SB_Controls_Base.php
1 month ago
SB_Customview_Control.php
1 month ago
SB_Datepicker_Control.php
1 month ago
SB_Heading_Control.php
1 month ago
SB_Hidden_Control.php
1 month ago
SB_Imagechooser_Control.php
1 month ago
SB_Notice_Control.php
1 month ago
SB_Number_Control.php
1 month ago
SB_Select_Control.php
1 month ago
SB_Separator_Control.php
1 month ago
SB_Switcher_Control.php
1 month ago
SB_Text_Control.php
1 month ago
SB_Textarea_Control.php
1 month ago
SB_Toggle_Control.php
1 month ago
SB_Togglebutton_Control.php
1 month ago
SB_Toggleset_Control.php
1 month ago
SB_Imagechooser_Control.php
55 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Customizer Builder |
| 4 | * Image Chooser Field Control |
| 5 | * |
| 6 | * @since 2.0 |
| 7 | */ |
| 8 | namespace TwitterFeed\Builder\Controls; |
| 9 | |
| 10 | if(!defined('ABSPATH')) exit; |
| 11 | |
| 12 | class SB_Imagechooser_Control extends SB_Controls_Base{ |
| 13 | |
| 14 | /** |
| 15 | * Get control type. |
| 16 | * |
| 17 | * Getting the Control Type |
| 18 | * |
| 19 | * @since 2.0 |
| 20 | * @access public |
| 21 | * |
| 22 | * @return string |
| 23 | */ |
| 24 | public function get_type(){ |
| 25 | return 'imagechooser'; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Output Control |
| 30 | * |
| 31 | * |
| 32 | * @since 2.0 |
| 33 | * @access public |
| 34 | * |
| 35 | * @return HTML |
| 36 | */ |
| 37 | public function get_control_output($controlEditingTypeModel){ |
| 38 | ?> |
| 39 | <div class="sb-control-imagechooser-ctn ctf-fb-fs"> |
| 40 | <div class="ctf-fb-fs"> |
| 41 | <input type="text" class="sb-control-imagechooser-input ctf-fb-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> |
| 42 | <div class="sb-control-imagechooser-clear ctf-fb-tltp-parent" v-if="checkNotEmpty(<?php echo $controlEditingTypeModel ?>[control.id])"> |
| 43 | <div class="sb-control-imagechooser-clear-icon" @click.prevent.default="changeSettingValue(control.id, '')"></div> |
| 44 | <div class="ctf-fb-tltp-elem"><span>{{genericText.clear.replace(/ /g," ")}}</span></div> |
| 45 | </div> |
| 46 | </div> |
| 47 | <div class="sb-control-imagechooser-btn" @click.prevent.default="imageChooser( control.id )"> |
| 48 | <div v-html="svgIcons['imageChooser']"></div> |
| 49 | {{genericText.addImage.replace(/ /g," ")}} |
| 50 | </div> |
| 51 | </div> |
| 52 | <?php |
| 53 | } |
| 54 | |
| 55 | } |