first commit

This commit is contained in:
Ryan Ariana
2024-05-06 11:04:37 +07:00
commit aee061ddba
7322 changed files with 2918816 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
<?php
/**
* @package Unlimited Elements
* @author unlimited-elements.com
* @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
* */
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
if($this->showHeader)
$this->putHeaderHtml();
else
require HelperUC::getPathTemplate("header_missing");
$slot1AddHtml = "";
if($this->isDataExists == false)
$slot1AddHtml = "style='display:none'";
$styleShow = "";
$styleHide = "style='display:none'";
$strOptions = UniteFunctionsUC::jsonEncodeForHtmlData($arrOptions);
$urlBack = HelperUC::getViewUrl_Addons($addonType);
if(!empty($objAddonType->addonView_urlBack))
$urlBack = $objAddonType->addonView_urlBack;
?>
<div id="uc_addondefaults_wrapper" class="uc-addondefaults-wrapper" data-options="<?php echo esc_attr($strOptions)?>">
<?php if($this->showToolbar):?>
<div class="uc-addondefaults-panel">
<div class="uc-panel-save-wrapper">
<a id="uc_addondefaults_button_save" href="javascript:void(0)" class="unite-button-primary"><?php esc_html_e("Save Defaults", "unlimited-elements-for-elementor")?></a>
<span id="uc_addondefaults_loader_save" class="loader-text" style="display:none"><?php esc_html_e("saving...")?></span>
</div>
<a id="uc_button_preview" href="javascript:void(0)" class="unite-button-secondary" <?php echo UniteProviderFunctionsUC::escAddParam($isPreviewMode?$styleHide:$styleShow)?>><?php esc_html_e("To Preview", "unlimited-elements-for-elementor")?></a>
<a id="uc_button_close_preview" href="javascript:void(0)" class="unite-button-secondary" <?php echo UniteProviderFunctionsUC::escAddParam($isPreviewMode?$styleShow:$styleHide)?>><?php esc_html_e("Hide Preview", "unlimited-elements-for-elementor")?></a>
<span class="hor_sap10"></span>
<a id="uc_button_preview_tab" href="javascript:void(0)" class="unite-button-secondary uc-button-cat-sap"><?php esc_html_e("Preview New Tab", "unlimited-elements-for-elementor")?></a>
<span class="hor_sap30"></span>
<a href="<?php echo esc_url($urlEditAddon)?>" class="unite-button-secondary" ><?php esc_html_e("Edit This Widget", "unlimited-elements-for-elementor")?></a>
<span class="hor_sap15"></span>
<a class="unite-button-secondary uc-button-cat-sap" href="<?php echo esc_attr($urlBack)?>"><?php esc_html_e("Back to Widgets List", "unlimited-elements-for-elementor");?></a>
</div>
<?php endif; ?>
<form name="form_addon_defaults">
<?php
//put helper editor if needed
if($isNeedHelperEditor)
UniteProviderFunctionsUC::putInitHelperHtmlEditor();
$addonConfig->putHtmlFrame();
?>
</form>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
var objAddonDefaultsView = new UniteCreatorAddonDefaultsAdmin();
objAddonDefaultsView.init();
<?php if($isPreviewMode == true):?>
jQuery("#uc_button_preview").trigger("click");
<?php endif?>
});
</script>

View File

@@ -0,0 +1,52 @@
<?php
/**
* @package Unlimited Elements
* @author unlimited-elements.com
* @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
$addonTitle = $addon->getTitle();
$addonEditUrl = HelperUC::getViewUrl_EditAddon($addon->getId());
$addonsListUrl = HelperUC::getViewUrl(GlobalsUnlimitedElements::VIEW_ADDONS_ELEMENTOR);
?>
<div id="uc_addondefaults_wrapper" class="uc-addondefaults-wrapper">
<h1><?php esc_html_e("Widget Defaults", "unlimited-elements-for-elementor"); ?> - <?php esc_html_e($addonTitle); ?></h1>
<div class="uc-preview-addon-actions">
<div class="uc-preview-addon-actions-primary">
<button
id="uc_addondefaults_button_save"
class="unite-button-primary"
data-text-default="<?php esc_attr_e("Save Defaults", "unlimited-elements-for-elementor"); ?>"
data-text-loading="<?php esc_attr_e("Saving...", "unlimited-elements-for-elementor"); ?>"
>
<?php esc_html_e("Save Defaults", "unlimited-elements-for-elementor"); ?>
</button>
</div>
<div class="uc-preview-addon-actions-secondary">
<a class="unite-button-secondary" href="<?php echo esc_url($addonEditUrl); ?>">
<?php esc_html_e("Edit Widget", "unlimited-elements-for-elementor"); ?>
</a>
<a class="unite-button-secondary" href="<?php echo esc_url($addonsListUrl); ?>">
<?php esc_html_e("Back to Widgets", "unlimited-elements-for-elementor"); ?>
</a>
</div>
</div>
<?php require HelperUC::getPathTemplate("addon_preview"); ?>
</div>
<script>
jQuery(document).ready(function () {
var objView = new UniteCreatorAddonDefaultsAdmin();
objView.init();
});
</script>

View File

@@ -0,0 +1,32 @@
<?php
/**
* @package Unlimited Elements
* @author unlimited-elements.com
* @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
?>
<div id="uc_preview_addon_wrapper" class="uc-preview-addon-wrapper" data-addonid="<?php esc_attr_e($addonID); ?>">
<?php UniteProviderFunctionsUC::putInitHelperHtmlEditor(); ?>
<div class="uc-preview-addon-left">
<div id="uc_settings_loader" class="uc-settings-loader">
<?php esc_html_e("Loading settings...", "unlimited-elements-for-elementor"); ?>
</div>
<div id="uc_settings_wrapper" class="uc-settings-wrapper"></div>
</div>
<div class="uc-preview-addon-right">
<div id="uc_preview_loader" class="uc-preview-loader">
<?php esc_html_e("Loading preview...", "unlimited-elements-for-elementor"); ?>
</div>
<div id="uc_preview_wrapper" class="uc-preview-wrapper"></div>
</div>
</div>

View File

@@ -0,0 +1,81 @@
<?php
/**
* @package Unlimited Elements
* @author unlimited-elements.com
* @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
$isProVersion = GlobalsUC::$isProVersion;
$showFreeVersion = UniteFunctionsUC::getGetVar("showfreeversion", "", UniteFunctionsUC::SANITIZE_TEXT_FIELD);
$showFreeVersion = UniteFunctionsUC::strToBool($showFreeVersion);
if($showFreeVersion === true)
$isProVersion = false;
$logoImage = ($isProVersion === true)
? GlobalsUC::$urlPluginImages . "logo_unlimited-pro.svg"
: GlobalsUC::$urlPluginImages . "logo_unlimited.svg";
$logoUrl = GlobalsUC::URL_SITE;
$logoTitle = GlobalsUC::URL_SITE;
$isBFMode = false;
if($isProVersion == true)
$isBFMode = false;
$headAddClass = "";
$buyButtonText = __("Go Pro", "unlimited-elements-for-elementor");
if($isBFMode == true){
$headAddClass = "ue-header__bf";
$logoImage = GlobalsUC::$urlPluginImages."logo_unlimited-white.svg";
$buyButtonText = __("Get My Discount", "unlimited-elements-for-elementor");
}
?>
<div class="ue-root ue-header <?php echo $headAddClass ?>">
<?php if($isBFMode == true):?>
<div class="ue-header__inner">
<?php endif?>
<a href="<?php echo $logoUrl; ?>" title="<?php echo $logoTitle; ?>" class="ue-header__logo">
<img class="ue-header-logo" src="<?php echo $logoImage; ?>" alt="" />
</a>
<div class="ue-header-buttons">
<a class="ue-btn ue-flex-center ue-view-demo-btn"
href="<?php echo GlobalsUC::URL_WIDGETS; ?>"
target="_blank">
<?php echo esc_html__("View Demos", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path d="M8.333 2.5v1.667H4.167v11.666h11.666v-4.166H17.5v5c0 .46-.373.833-.833.833H3.333a.833.833 0 0 1-.833-.833V3.333c0-.46.373-.833.833-.833h5Zm6.322 1.667h-3.822V2.5H17.5v6.667h-1.667V5.345L10 11.178 8.822 10l5.833-5.833Z" />
</svg>
</a>
<?php if($isProVersion === false): ?>
<a class="ue-btn ue-flex-center ue-go-pro-btn" href="<?php echo GlobalsUC::URL_BUY; ?>" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path d="M19.048 5.952a.944.944 0 0 0-1.042-.133l-3.923 1.953-3.275-5.44a.946.946 0 0 0-1.62 0L5.913 7.775 1.992 5.822a.946.946 0 0 0-1.32 1.14l2.89 8.856a.624.624 0 0 0 .913.344C4.495 16.151 6.492 15 9.998 15s5.504 1.15 5.522 1.161a.625.625 0 0 0 .915-.343l2.89-8.853a.942.942 0 0 0-.277-1.013Zm-5.312 6.298a.625.625 0 0 1-.725.507 17.828 17.828 0 0 0-6.032 0 .624.624 0 0 1-.621-.974.625.625 0 0 1 .403-.258 19.09 19.09 0 0 1 6.468 0 .623.623 0 0 1 .51.725h-.003Z" />
</svg>
<?php echo $buyButtonText?>
</a>
<?php endif; ?>
</div>
<?php if($isBFMode == true):?>
</div> <!-- inner -->
<?php endif?>
</div>

View File

@@ -0,0 +1,38 @@
<?php
/**
* @package Unlimited Elements
* @author unlimited-elements.com
* @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
if(!isset($headerTitle))
UniteFunctionsUC::throwError("header template error: \$headerTitle variable not defined");
$headerPrefix = HelperUC::getText("addon_library");
if(!empty(GlobalsUC::$alterViewHeaderPrefix))
$headerPrefix = GlobalsUC::$alterViewHeaderPrefix;
$adminPageTitle = $headerTitle . " - " . $headerPrefix;
UniteProviderFunctionsUC::setAdminPageTitle($adminPageTitle);
?>
<div class="unite_header_wrapper">
<div class="title_line">
<div class="title_line_text">
<?php echo $headerTitle ?>
</div>
<?php if(isset($headerAddHtml)): ?>
<div class="title_line_add_html"><?php echo esc_html($headerAddHtml); ?></div>
<?php endif ?>
</div>
<div class="unite-clear"></div>
</div>
<?php HelperHtmlUC::putHtmlAdminNotices() ?>

View File

@@ -0,0 +1,3 @@
<?php
HelperHtmlUC::putHtmlAdminNotices();

View File

@@ -0,0 +1,81 @@
<div class="ue-root ue-menu">
<?php if(GlobalsUnlimitedElements::$enableDashboard === true): ?>
<a
class="ue-menu-item <?php echo $view === GlobalsUnlimitedElements::VIEW_DASHBOARD ? "ue-active" : ""; ?>"
href="<?php echo HelperUC::getViewUrl(GlobalsUnlimitedElements::VIEW_DASHBOARD); ?>"
>
<?php echo esc_html__("Home", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
<path d="M15.167 22.168h7V11.642L14 5.29l-8.167 6.352v10.526h7v-7h2.334v7Zm9.333 1.166c0 .645-.522 1.167-1.167 1.167H4.667A1.167 1.167 0 0 1 3.5 23.334V11.071c0-.36.166-.7.45-.92l9.334-7.26a1.166 1.166 0 0 1 1.432 0l9.333 7.26c.285.22.451.56.451.92v12.263Z" />
</svg>
</a>
<?php endif ?>
<a
class="ue-menu-item <?php echo $view === GlobalsUnlimitedElements::VIEW_ADDONS_ELEMENTOR ? "ue-active" : ""; ?>"
href="<?php echo HelperUC::getViewUrl(GlobalsUnlimitedElements::VIEW_ADDONS_ELEMENTOR); ?>"
>
<?php echo esc_html__("Widgets", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
<path d="M12.833 5.833h-7v7h7v-7Zm2.334 0v7h7v-7h-7Zm7 9.334h-7v7h7v-7Zm-9.334 7v-7h-7v7h7ZM3.5 3.5h21v21h-21v-21Z" />
</svg>
</a>
<?php if(HelperProviderUC::isBackgroundsEnabled() === true): ?>
<a
class="ue-menu-item <?php echo $view === GlobalsUnlimitedElements::VIEW_BACKGROUNDS ? "ue-active" : ""; ?>"
href="<?php echo HelperUC::getViewUrl(GlobalsUnlimitedElements::VIEW_BACKGROUNDS); ?>"
>
<?php echo esc_html__("Backgrounds", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
<path d="M3.49 24.5c-.638 0-1.157-.52-1.157-1.159V4.659c0-.64.532-1.159 1.158-1.159H24.51c.639 0 1.157.52 1.157 1.159v18.682c0 .64-.531 1.159-1.157 1.159H3.49Zm19.843-7V5.833H4.668v16.334L16.334 10.5l7 7Zm0 3.3-7-7-8.366 8.367h15.367V20.8Zm-14-7.967a2.333 2.333 0 1 1 0-4.666 2.333 2.333 0 0 1 0 4.666Z" />
</svg>
</a>
<?php endif; ?>
<a
class="ue-menu-item <?php echo $view === GlobalsUnlimitedElements::VIEW_TEMPLATES_ELEMENTOR ? "ue-active" : ""; ?>"
href="<?php echo HelperUC::getViewUrl(GlobalsUnlimitedElements::VIEW_TEMPLATES_ELEMENTOR); ?>"
>
<?php echo esc_html__("Templates", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
<path d="m6.724 9.333-.345-.852a1.167 1.167 0 0 1 .645-1.519l10.817-4.37a1.167 1.167 0 0 1 1.519.645l6.556 16.225a1.166 1.166 0 0 1-.645 1.519l-10.817 4.37a1.167 1.167 0 0 1-1.519-.644l-.103-.255v.048H8.165A1.167 1.167 0 0 1 7 23.333v-.314l-3.908-1.58a1.167 1.167 0 0 1-.645-1.518L6.724 9.333Zm2.608 12.834h2.577l-2.577-6.378v6.378Zm-2.333-7.285-1.952 4.832 1.952.83v-5.662ZM8.98 8.689 14.66 22.75l8.654-3.496-5.681-14.063L8.98 8.69Zm3.474 2.37a1.167 1.167 0 1 1-.874-2.163 1.167 1.167 0 0 1 .874 2.164Z" />
</svg>
</a>
<?php if(HelperProviderUC::isFormEntriesEnabled() === true): ?>
<a
class="ue-menu-item <?php echo $view === GlobalsUnlimitedElements::VIEW_FORM_ENTRIES ? "ue-active" : ""; ?>"
href="<?php echo HelperUC::getViewUrl(GlobalsUnlimitedElements::VIEW_FORM_ENTRIES); ?>"
>
<?php echo esc_html__("Form Entries", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
<path d="m23.43 17.733 1.403.842a.584.584 0 0 1 0 1L14.6 25.715c-.37.221-.83.221-1.2 0l-10.233-6.14a.583.583 0 0 1 0-1l1.403-.842L14 23.391l9.43-5.658Zm0-5.483 1.403.841a.583.583 0 0 1 0 1L14 20.592l-10.833-6.5a.583.583 0 0 1 0-1l1.403-.841L14 17.908l9.43-5.658ZM14.6 1.527l10.233 6.14a.583.583 0 0 1 0 1L14 15.167l-10.833-6.5a.583.583 0 0 1 0-1L13.4 1.526c.37-.222.83-.222 1.2 0Zm-.6 2.36-7.131 4.28L14 12.444l7.131-4.279L14 3.888Z" />
</svg>
</a>
<?php endif; ?>
<a
class="ue-menu-item <?php echo $view === GlobalsUnlimitedElements::VIEW_SETTINGS_ELEMENTOR ? "ue-active" : ""; ?>"
href="<?php echo HelperUC::getViewUrl(GlobalsUnlimitedElements::VIEW_SETTINGS_ELEMENTOR); ?>"
>
<?php echo esc_html__("Settings", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
<path d="m10.135 4.666 3.041-3.041a1.167 1.167 0 0 1 1.65 0l3.041 3.04h4.3c.645 0 1.168.523 1.168 1.167v4.301l3.04 3.041a1.167 1.167 0 0 1 0 1.65l-3.04 3.041v4.3c0 .645-.523 1.167-1.167 1.167h-4.3l-3.042 3.041a1.167 1.167 0 0 1-1.65 0l-3.04-3.04H5.834a1.167 1.167 0 0 1-1.167-1.167v-4.301l-3.041-3.041a1.167 1.167 0 0 1 0-1.65l3.04-3.041v-4.3c0-.645.523-1.167 1.168-1.167h4.3ZM7.001 6.999v4.1l-2.9 2.9 2.9 2.9v4.1h4.1l2.9 2.9 2.9-2.9H21v-4.1l2.9-2.9-2.9-2.9V7h-4.1l-2.9-2.9-2.9 2.9h-4.1Zm7 11.667a4.667 4.667 0 1 1 0-9.334 4.667 4.667 0 0 1 0 9.334Zm0-2.334a2.333 2.333 0 1 0 0-4.666 2.333 2.333 0 0 0 0 4.666Z" />
</svg>
</a>
<a
class="ue-menu-item"
href="<?php echo GlobalsUnlimitedElements::$urlAccount; ?>"
>
<?php echo esc_html__("Account", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
<path d="M4.667 25.667a9.333 9.333 0 0 1 18.666 0H21a7 7 0 0 0-14 0H4.667ZM14 15.167c-3.868 0-7-3.133-7-7 0-3.868 3.132-7 7-7 3.867 0 7 3.132 7 7 0 3.867-3.133 7-7 7Zm0-2.334a4.665 4.665 0 0 0 4.666-4.666A4.665 4.665 0 0 0 14 3.5a4.665 4.665 0 0 0-4.667 4.667A4.665 4.665 0 0 0 14 12.833Z" />
</svg>
</a>
<a
class="ue-menu-item"
href="<?php echo GlobalsUC::URL_SUPPORT; ?>"
target="_blank"
>
<?php echo esc_html__("Support", "unlimited-elements-for-elementor"); ?>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
<path d="M23.261 9.333H24.5a2.333 2.333 0 0 1 2.333 2.334v4.666a2.333 2.333 0 0 1-2.333 2.334H23.26c-.574 4.604-4.502 8.166-9.261 8.166V24.5a7 7 0 0 0 7-7v-7a7 7 0 1 0-14 0v8.167H3.5a2.333 2.333 0 0 1-2.333-2.334v-4.666A2.333 2.333 0 0 1 3.5 9.333h1.239c.574-4.604 4.501-8.166 9.26-8.166 4.76 0 8.688 3.562 9.262 8.166ZM3.5 11.667v4.666h1.167v-4.666H3.5Zm19.833 0v4.666H24.5v-4.666h-1.167Zm-14.28 6.749 1.236-1.98A6.968 6.968 0 0 0 14 17.5c1.364 0 2.636-.39 3.711-1.063l1.237 1.979A9.29 9.29 0 0 1 14 19.833a9.29 9.29 0 0 1-4.947-1.417Z" />
</svg>
</a>
</div>

View File

@@ -0,0 +1,107 @@
<?php
/**
* @package Unlimited Elements
* @author unlimited-elements.com
* @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
* */
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
$sapIDPrefix = "uc_tab_";
?>
<div class="content_wrapper unite-content-wrapper">
<div id="uc_tabs" class="uc-tabs">
<?php
$isFirstTab = true;
foreach($arrSaps as $sap):
$isHidden = UniteFunctionsUC::getVal($sap, "hidden");
$isHidden = UniteFunctionsUC::strToBool($isHidden);
$sapName = $sap["name"];
$sapID = $sapIDPrefix.$sapName;
$class = "";
if($isFirstTab == true)
$class = "uc-tab-selected";
$text = $sap["text"];
$isFirstTab = false;
$style = "";
if($isHidden == true)
$style = "style='display:none'";
?>
<a id="<?php echo esc_attr($sapID)?>_tablink" data-name="<?php echo esc_attr($sapName)?>" data-contentid="<?php echo esc_attr($sapID)?>" class="<?php echo esc_attr($class)?>" href="javascript:void(0)" onfocus="this.blur()" <?php echo $style?>> <?php echo esc_html($text)?></a>
<?php endforeach?>
<?php $this->drawAdditionalTabs(); ?>
<div class="unite-clear"></div>
</div>
<div id="uc_tab_contents" class="uc-tabs-content-wrapper">
<?php $objOutput->drawWrapperStart()?>
<form name="<?php echo esc_attr($formID)?>" id="<?php echo esc_attr($formID)?>">
<?php
$isFirstTab = true;
foreach($arrSaps as $sapKey=>$sap):
$sapName = $sap["name"];
$sapID = $sapIDPrefix.$sapName;
$style = "style='display:none'";
if($isFirstTab == true)
$style = "";
$isFirstTab = false;
?>
<div id="<?php echo esc_attr($sapID)?>" class="uc-tab-content" <?php echo UniteProviderFunctionsUC::escAddParam($style)?> >
<?php
$objOutput->drawSettings($sapKey);
$this->drawSaveSettingsButton($sapID)?>
</div>
<?php endforeach?>
</form>
<?php $objOutput->drawWrapperEnd()?>
<?php $this->drawAdditionalTabsContent() ?>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
var objAdmin = new UniteCreatorAdmin_GeneralSettings();
objAdmin.initView("<?php echo UniteProviderFunctionsUC::escAddParam($this->saveAction)?>");
});
</script>

View File

@@ -0,0 +1,98 @@
<?php
/**
* @package Unlimited Elements
* @author unlimited-elements.com
* @copyright (C) 2021 Unlimited Elements, All Rights Reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
* */
defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
if($this->showHeader)
$this->putHeaderHtml();
else
require HelperUC::getPathTemplate("header_missing");
$slot1AddHtml = "";
if($this->isTestData1 == false)
$slot1AddHtml = "style='display:none'";
$styleShow = "";
$styleHide = "style='display:none'";
$urlBack = HelperUC::getViewUrl_Addons($addonType);
if(!empty($objAddonType->addonView_urlBack))
$urlBack = $objAddonType->addonView_urlBack;
$textEditThis = esc_html__("Edit This ", "unlimited-elements-for-elementor"). $this->textSingle;
$textBackTo = esc_html__("Back To ", "unlimited-elements-for-elementor"). $this->textPlural .esc_html__(" List", "unlimited-elements-for-elementor");
$urlTestAddonNew = HelperUC::getViewUrl("testaddonnew", "id={$addonID}");
?>
<div id="uc_testaddon_wrapper" class="uc-testaddon-wrapper">
<?php if($this->showToolbar):?>
<div class="uc-testaddon-panel">
<a href="<?php echo esc_url($urlEditAddon)?>" class="unite-button-secondary" ><?php echo $textEditThis?></a>
<a class="unite-button-secondary uc-button-cat-sap" href="<?php echo esc_url($urlBack)?>"><?php esc_html_e($textBackTo, "unlimited-elements-for-elementor");?></a>
<a id="uc_button_preview" href="javascript:void(0)" class="unite-button-secondary" <?php echo UniteProviderFunctionsUC::escAddParam($isPreviewMode?$styleHide:$styleShow)?>><?php esc_html_e("To Preview", "unlimited-elements-for-elementor")?></a>
<a id="uc_button_close_preview" href="javascript:void(0)" class="unite-button-secondary" <?php echo UniteProviderFunctionsUC::escAddParam($isPreviewMode?$styleShow:$styleHide)?>><?php esc_html_e("Hide Preview", "unlimited-elements-for-elementor")?></a>
<a id="uc_button_preview_tab" href="javascript:void(0)" class="unite-button-secondary uc-button-cat-sap"><?php esc_html_e("Preview New Tab", "unlimited-elements-for-elementor")?></a>
<a id="uc_button_testaddon_new" href="<?php echo esc_url($urlTestAddonNew); ?>" class="unite-button-secondary uc-button-cat-sap"><?php esc_html_e("Test Widget New", "unlimited-elements-for-elementor")?></a>
<span id="uc_testaddon_slot1" class="uc-testaddon-slot" <?php echo UniteProviderFunctionsUC::escAddParam($slot1AddHtml)?>>
<a id="uc_testaddon_button_restore" href="javascript:void(0)" class="unite-button-secondary"><?php esc_html_e("Restore Data", "unlimited-elements-for-elementor")?></a>
<span id="uc_testaddon_loader_restore" class="loader-text" style="display:none"><?php esc_html_e("loading...")?></span>
<a id="uc_testaddon_button_delete" href="javascript:void(0)" class="unite-button-secondary"><?php esc_html_e("Delete Data", "unlimited-elements-for-elementor")?></a>
<span id="uc_testaddon_loader_delete" class="loader-text" style="display:none"><?php esc_html_e("deleting...")?></span>
</span>
<a id="uc_testaddon_button_save" href="javascript:void(0)" class="unite-button-secondary"><?php esc_html_e("Save Data", "unlimited-elements-for-elementor")?></a>
<span id="uc_testaddon_loader_save" class="loader-text" style="display:none"><?php esc_html_e("saving...")?></span>
<a id="uc_testaddon_button_clear" href="javascript:void(0)" class="unite-button-secondary"><?php esc_html_e("Clear", "unlimited-elements-for-elementor")?></a>
</div>
<?php endif; ?>
<form name="form_test_addon">
<?php
//put helper editor if needed
if($isNeedHelperEditor)
UniteProviderFunctionsUC::putInitHelperHtmlEditor();
$addonConfig->putHtmlFrame();
?>
</form>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
var objTestAddonView = new UniteCreatorTestAddon();
objTestAddonView.init();
<?php if($isPreviewMode == true):?>
jQuery("#uc_button_preview").trigger("click");
<?php endif?>
});
</script>