acf
This commit is contained in:
31
plugins/system/nrframework/layouts/addresslookup.php
Normal file
31
plugins/system/nrframework/layouts/addresslookup.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/addresslookup.css', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/addresslookup.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$coordinates = isset($value['coordinates']) ? $value['coordinates'] : '';
|
||||
$address = isset($value['address']) ? $value['address'] : '';
|
||||
?>
|
||||
<div class="tf-address-lookup-container <?php echo $group_class; ?> is-<?php echo $visible ? 'visible' : 'hidden'; ?>">
|
||||
<input type="hidden" name="<?php echo $name; ?>[coordinates]" class="tf-address-lookup-field-coordinates-value" value="<?php echo $coordinates; ?>" />
|
||||
<input type="text" name="<?php echo $name; ?>[address]" id="<?php echo $id; ?>-field-address-field-address" class="form-control span12 full-width w-100 tf-address-lookup-field-address" placeholder="<?php echo Text::_('NR_ADDRESS_ADDRESS_HINT'); ?>" value="<?php echo $address; ?>" autocomplete="off" data-autocomplete="<?php echo $autocomplete ? 'true' : 'false'; ?>">
|
||||
<div class="tf-address-lookup-field-autocomplete-results"></div>
|
||||
<svg width="22" height="22" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="14" cy="14" r="8.48528" transform="rotate(-45 14 14)" stroke-width="2"></circle>
|
||||
<path d="M19.9995 20L24.4995 24.5" stroke-width="2" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
</div>
|
||||
76
plugins/system/nrframework/layouts/chainedfields.php
Normal file
76
plugins/system/nrframework/layouts/chainedfields.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/chainedfields.css', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/chainedfields.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$data)
|
||||
{
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div
|
||||
class="nr-chained-fields"
|
||||
data-data-source="<?php echo $data_source; ?>"
|
||||
data-csv="<?php echo htmlspecialchars(json_encode($csv)); ?>"
|
||||
data-base-url="<?php echo Uri::base(); ?>"
|
||||
data-loading="<?php echo Text::_('NR_LOADING'); ?>">
|
||||
<?php
|
||||
if (!$value)
|
||||
{
|
||||
foreach ($data['inputs'] as $key => $input)
|
||||
{
|
||||
$selectedOrDisabled = isset($data['choices'][$key]) && !$data['choices'][$key]['isSelected'] && $key !== 0 ? 'disabled' : 'selected';
|
||||
?>
|
||||
<select <?php echo $selectedOrDisabled; ?> name="<?php echo $input['name']; ?>" id="<?php echo $input['id']; ?>" class="nr-chained-fields-select form-select">
|
||||
<option class="placeholder" data-original="<?php echo $input['label']; ?>" value=""><?php echo $input['label']; ?></option>
|
||||
<?php
|
||||
if ($key == 0)
|
||||
{
|
||||
foreach ($data['choices'] as $key => $choice)
|
||||
{
|
||||
?><option value="<?php echo $choice['value']; ?>"><?php echo $choice['text']; ?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($value as $key => $value)
|
||||
{
|
||||
$selectedOrDisabled = empty($value['choices']) ? ' disabled' : '';
|
||||
?>
|
||||
<select<?php echo $selectedOrDisabled; ?> name="<?php echo $value['name']; ?>" id="<?php echo $value['id']; ?>" class="nr-chained-fields-select form-select">
|
||||
<option class="placeholder" data-original="<?php echo $value['label']; ?>" value=""><?php echo $value['label']; ?></option>
|
||||
<?php
|
||||
if ($value['choices'])
|
||||
{
|
||||
foreach ($value['choices'] as $key => $choice)
|
||||
{
|
||||
?><option<?php echo $choice['isSelected'] ? ' selected' : ''; ?> value="<?php echo $choice['value']; ?>"><?php echo $choice['text']; ?></option><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
60
plugins/system/nrframework/layouts/conditionbuilder.php
Normal file
60
plugins/system/nrframework/layouts/conditionbuilder.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/conditionbuilder.css', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/helper.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/conditionbuilder.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="cb"
|
||||
data-token="<?php echo Session::getFormToken(); ?>"
|
||||
data-root="<?php echo Uri::base(); ?>"
|
||||
data-option="<?php echo Factory::getApplication()->input->get('option'); ?>"
|
||||
data-layout="<?php echo Factory::getApplication()->input->get('layout'); ?>"
|
||||
data-include-rules="<?php echo $include_rules; ?>"
|
||||
data-exclude-rules="<?php echo $exclude_rules; ?>"
|
||||
data-exclude-rules-pro="<?php echo $exclude_rules_pro; ?>">
|
||||
<div class="tf-conditionbuilder-initial-message">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14px" height="14px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
||||
<circle cx="50" cy="50" fill="none" stroke="#333" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">
|
||||
<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>
|
||||
</circle>
|
||||
</svg>
|
||||
<?php echo Text::_('NR_DISPLAY_CONDITIONS_LOADING'); ?>
|
||||
</div>
|
||||
<div class="cb-groups"></div>
|
||||
<div class="actions">
|
||||
<a class="icon tf-cb-add-new-group" href="#" title="<?php echo Text::_('NR_CB_ADD_CONDITION_GROUP'); ?>">
|
||||
<span class="icon icon-plus-2"></span>
|
||||
<span class="text"><?php echo Text::_('NR_CB_ADD_CONDITION_GROUP'); ?></span>
|
||||
<svg class="loading" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14px" height="14px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
||||
<circle cx="50" cy="50" fill="none" stroke="#333" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">
|
||||
<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>
|
||||
</circle>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo $geo_modal;
|
||||
if (!empty($available_condititions))
|
||||
{
|
||||
\NRFramework\HTML::renderProOnlyModal();
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="cb-group" data-key="<?php echo $groupKey ?>">
|
||||
<div class="cb-item-toolbar group">
|
||||
<div class="show">
|
||||
<?php echo Text::_('NR_CB_SHOW_WHEN'); ?>
|
||||
<select name="<?php echo $name; ?>[<?php echo $groupKey; ?>][matching_method]" class="form-select width-auto form-select-small">
|
||||
<option <?php echo (isset($groupConditions['matching_method']) && $groupConditions['matching_method'] == 'all') ? 'selected ' : ''; ?>value="all"><?php echo strtolower(Text::_('NR_ALL')); ?></option>
|
||||
<option <?php echo (isset($groupConditions['matching_method']) && $groupConditions['matching_method'] == 'any') ? 'selected ' : ''; ?>value="any"><?php echo strtolower(Text::_('NR_ANY')); ?></option>
|
||||
</select>
|
||||
<?php echo Text::_('NR_CB_OF_THE_CONDITIONS_MATCH'); ?>
|
||||
</div>
|
||||
<div class="cb-item-buttons">
|
||||
<div class="links">
|
||||
<a class="cb-button only-icon remove removeGroupCondition" href="#" title="<?php echo Text::_('NR_CB_TRASH_CONDITION_GROUP'); ?>"><span class="icon icon-trash"></span></a>
|
||||
</div>
|
||||
<div class="toggle-status" title="<?php echo Text::_('NR_CB_TOGGLE_RULE_GROUP_STATUS') ?>">
|
||||
<?php
|
||||
$checked = isset($groupConditions['enabled']) && (string) $groupConditions['enabled'] == '1';
|
||||
require_once JPATH_PLUGINS . '/system/nrframework/fields/nrtoggle.php';
|
||||
$field = new \JFormFieldNRToggle();
|
||||
$element = new \SimpleXMLElement('<field name="' . $name . '[' . $groupKey . '][enabled]" type="NRToggle" class="small" checked="' . $checked . '" />');
|
||||
$field->setup($element, null);
|
||||
echo $field->__get('input');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cb-items">
|
||||
<?php
|
||||
// Array of conditions items in HTML format
|
||||
if (isset($condition_items_parsed) && is_array($condition_items_parsed))
|
||||
{
|
||||
foreach ($condition_items_parsed as $html)
|
||||
{
|
||||
echo $html;
|
||||
}
|
||||
}
|
||||
// Render conditions items in raw format
|
||||
else if (isset($groupConditions['rules']))
|
||||
{
|
||||
foreach ($groupConditions['rules'] as $conditionKey => $condition)
|
||||
{
|
||||
echo \NRFramework\Conditions\ConditionBuilder::add($name, $groupKey, $conditionKey, (array) $condition, $include_rules, $exclude_rules, $exclude_rules_pro);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="item-group-footer text-right text-end">
|
||||
<a class="cb-button icon btn outline tf-cb-add-new-group" href="#" title="<?php echo Text::_('NR_CB_ADD_CONDITION'); ?>">
|
||||
<span class="icon icon-plus-2"></span>
|
||||
<span class="text"><?php echo Text::_('NR_CB_ADD_CONDITION'); ?></span>
|
||||
<svg class="loading" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14px" height="14px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
||||
<circle cx="50" cy="50" fill="none" stroke="#333" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">
|
||||
<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>
|
||||
</circle>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
48
plugins/system/nrframework/layouts/conditionbuilder_row.php
Normal file
48
plugins/system/nrframework/layouts/conditionbuilder_row.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="cb-item" data-key="<?php echo $conditionKey ?>">
|
||||
<div class="cb-item-toolbar">
|
||||
<div class="cb-dropdown">
|
||||
<?php echo $toolbar->renderFieldset('base'); ?>
|
||||
</div>
|
||||
<div class="cb-item-buttons">
|
||||
<svg class="loading" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25px" height="25px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
||||
<circle cx="50" cy="50" fill="none" stroke="#dddddd" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">
|
||||
<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>
|
||||
</circle>
|
||||
</svg>
|
||||
<div class="links">
|
||||
<a class="cb-button only-icon remove tf-cb-remove-condition" href="#" title="<?php echo Text::_('NR_CB_TRASH_CONDITION'); ?>"><span class="icon icon-trash"></span></a>
|
||||
<a class="cb-button only-icon tf-cb-add-new-group" href="#" title="<?php echo Text::_('NR_CB_ADD_CONDITION'); ?>"><span class="icon icon-plus-2"></span></a>
|
||||
</div>
|
||||
<div class="toggle-status" title="<?php echo Text::_('NR_CB_TOGGLE_RULE_STATUS') ?>">
|
||||
<?php
|
||||
require_once JPATH_PLUGINS . '/system/nrframework/fields/nrtoggle.php';
|
||||
$field = new \JFormFieldNRToggle();
|
||||
$element = new \SimpleXMLElement('<field name="' . $name . '[enabled]" type="NRToggle" class="small" checked="' . $enabled . '" />');
|
||||
$field->setup($element, null);
|
||||
echo $field->__get('input');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cb-item-content">
|
||||
<?php echo $options ? $options : '<div class="select-condition-message">' . Text::_('NR_CB_SELECT_CONDITION_GET_STARTED') . '</div>'; ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!isset($choices) || !is_array($choices) || !count($choices))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$mode = isset($mode) ? $mode : 'svg';
|
||||
$gap = isset($gap) && !empty($gap) ? $gap : 'inherit';
|
||||
$class = isset($class) ? ' ' . $class : '';
|
||||
$columns = isset($columns) ? $columns : null;
|
||||
$id = isset($id) ? $id : null;
|
||||
|
||||
$class .= ' ' . $id;
|
||||
|
||||
if ($columns)
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration('
|
||||
.tf-choiceselector-control.' . $id . ' {
|
||||
--columns: ' . $columns . ';
|
||||
--gap: ' . $gap . ';
|
||||
}'
|
||||
);
|
||||
}
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/controls/choiceselector.css', ['relative' => true, 'version' => 'auto']);
|
||||
?>
|
||||
<div class="tf-choiceselector-control mode-<?php echo $mode; ?><?php echo $class; ?>">
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($choices as $key => $_value)
|
||||
{
|
||||
$_value = !is_string($_value) ? (array) $_value : $_value;
|
||||
|
||||
$id = $name . '_' . (empty($item_id) ? $key : $item_id);
|
||||
|
||||
$image = isset($_value['image']) ? $_value['image'] : false;
|
||||
$icon = isset($_value['icon']) ? $_value['icon'] : false;
|
||||
$label = isset($_value['label']) ? $_value['label'] : $_value;
|
||||
$pro = isset($_value['pro']) ? (bool) $_value['pro'] : false;
|
||||
?>
|
||||
<div class="tf-choiceselector-control--item<?php echo $pro ? ' pro' : ''; ?>"<?php echo $pro ? ' data-pro-only="' . Text::_($label) . '"' : ''; ?>>
|
||||
<?php echo $pro ? '<span class="pro">' . Text::_('NR_PRO') . '</span>' : ''; ?>
|
||||
|
||||
<input type="radio" id="fpf-control-input-item_<?php echo $id; ?>" name="<?php echo $name; ?>" value="<?php echo $key; ?>"<?php echo $value == $key ? ' checked="checked"' : ''; ?> />
|
||||
<label for="fpf-control-input-item_<?php echo $id; ?>">
|
||||
<?php echo $mode == 'svg' && !empty($icon) ? $icon : ''; ?>
|
||||
<span class="text"><?php echo Text::_($label); ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
65
plugins/system/nrframework/layouts/controls/dimension.php
Normal file
65
plugins/system/nrframework/layouts/controls/dimension.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Layout\FileLayout;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$unit = isset($value['unit']) ? $value['unit'] : 'px';
|
||||
?>
|
||||
<div class="tf-dimension-control<?php echo $units ? ' has-units' : ''; ?>">
|
||||
<div class="tf-dimension-controls">
|
||||
<?php
|
||||
foreach ($dimensions as $key => $label)
|
||||
{
|
||||
$item_name = $name . '[' . $key . ']';
|
||||
$item_value = isset($value[$key]) ? $value[$key] : '';
|
||||
$is_linked = isset($value['linked']) ? $value['linked'] : $linked;
|
||||
$item_id = rtrim(str_replace(['][', '[', ']'], '_', $item_name), '_');
|
||||
?>
|
||||
<div class="tf-dimension-controls--item form-control<?php echo $item_value !== '' ? ' has-value' : ''; ?>">
|
||||
<input type="number" value="<?php echo $item_value; ?>" min="0" max="999" class="tf-dimension-controls--item--value" placeholder="<?php echo Text::_($label); ?>" id="<?php echo $item_id; ?>" name="<?php echo $item_name; ?>" />
|
||||
<?php
|
||||
if ($units)
|
||||
{
|
||||
$layout = new FileLayout('selector', JPATH_PLUGINS . '/system/nrframework/layouts/controls/unit');
|
||||
echo $layout->render([
|
||||
'name' => $name,
|
||||
'units' => $units,
|
||||
'unit' => $unit,
|
||||
'hide_input' => true
|
||||
]);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$layout = new FileLayout('input_value', JPATH_PLUGINS . '/system/nrframework/layouts/controls/unit');
|
||||
echo $layout->render([
|
||||
'name' => $name,
|
||||
'unit' => $unit
|
||||
]);
|
||||
|
||||
$layout = new FileLayout('linked', JPATH_PLUGINS . '/system/nrframework/layouts/controls/dimension');
|
||||
echo $layout->render([
|
||||
'dimension_control_locks' => $dimension_control_locks,
|
||||
'name' => $name,
|
||||
'is_linked' => $is_linked
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$dimension_control_locks)
|
||||
{
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="tf-dimension-control--locks" title="<?php echo Text::_('NR_LINK_UNLINK_VALUES_TOGETHER'); ?>">
|
||||
<svg class="tf-dimension-control--locks--item<?php echo $is_linked ? ' active' : ''; ?>" data-type="lock" width="12" height="16" viewBox="0 0 12 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.5 15.875C1.0875 15.875 0.734375 15.7281 0.440625 15.4344C0.146875 15.1406 0 14.7875 0 14.375V6.875C0 6.4625 0.146875 6.10938 0.440625 5.81563C0.734375 5.52187 1.0875 5.375 1.5 5.375H2.25V3.875C2.25 2.8375 2.61563 1.95312 3.34688 1.22187C4.07812 0.490625 4.9625 0.125 6 0.125C7.0375 0.125 7.92188 0.490625 8.65313 1.22187C9.38438 1.95312 9.75 2.8375 9.75 3.875V5.375H10.5C10.9125 5.375 11.2656 5.52187 11.5594 5.81563C11.8531 6.10938 12 6.4625 12 6.875V14.375C12 14.7875 11.8531 15.1406 11.5594 15.4344C11.2656 15.7281 10.9125 15.875 10.5 15.875H1.5ZM1.5 14.375H10.5V6.875H1.5V14.375ZM6 12.125C6.4125 12.125 6.76563 11.9781 7.05938 11.6844C7.35313 11.3906 7.5 11.0375 7.5 10.625C7.5 10.2125 7.35313 9.85938 7.05938 9.56563C6.76563 9.27188 6.4125 9.125 6 9.125C5.5875 9.125 5.23438 9.27188 4.94063 9.56563C4.64687 9.85938 4.5 10.2125 4.5 10.625C4.5 11.0375 4.64687 11.3906 4.94063 11.6844C5.23438 11.9781 5.5875 12.125 6 12.125ZM3.75 5.375H8.25V3.875C8.25 3.25 8.03125 2.71875 7.59375 2.28125C7.15625 1.84375 6.625 1.625 6 1.625C5.375 1.625 4.84375 1.84375 4.40625 2.28125C3.96875 2.71875 3.75 3.25 3.75 3.875V5.375Z" fill="currentColor" />
|
||||
</svg>
|
||||
<svg class="tf-dimension-control--locks--item<?php echo !$is_linked ? ' active' : ''; ?>" data-type="unlock" width="12" height="16" viewBox="0 0 12 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.5 5.375H8.25V3.875C8.25 3.25 8.03125 2.71875 7.59375 2.28125C7.15625 1.84375 6.625 1.625 6 1.625C5.375 1.625 4.84375 1.84375 4.40625 2.28125C3.96875 2.71875 3.75 3.25 3.75 3.875H2.25C2.25 2.8375 2.61563 1.95312 3.34688 1.22187C4.07812 0.490625 4.9625 0.125 6 0.125C7.0375 0.125 7.92188 0.490625 8.65313 1.22187C9.38438 1.95312 9.75 2.8375 9.75 3.875V5.375H10.5C10.9125 5.375 11.2656 5.52187 11.5594 5.81563C11.8531 6.10938 12 6.4625 12 6.875V14.375C12 14.7875 11.8531 15.1406 11.5594 15.4344C11.2656 15.7281 10.9125 15.875 10.5 15.875H1.5C1.0875 15.875 0.734375 15.7281 0.440625 15.4344C0.146875 15.1406 0 14.7875 0 14.375V6.875C0 6.4625 0.146875 6.10938 0.440625 5.81563C0.734375 5.52187 1.0875 5.375 1.5 5.375ZM1.5 14.375H10.5V6.875H1.5V14.375ZM6 12.125C6.4125 12.125 6.76563 11.9781 7.05938 11.6844C7.35313 11.3906 7.5 11.0375 7.5 10.625C7.5 10.2125 7.35313 9.85938 7.05938 9.56563C6.76563 9.27188 6.4125 9.125 6 9.125C5.5875 9.125 5.23438 9.27188 4.94063 9.56563C4.64687 9.85938 4.5 10.2125 4.5 10.625C4.5 11.0375 4.64687 11.3906 4.94063 11.6844C5.23438 11.9781 5.5875 12.125 6 12.125Z" fill="currentColor" />
|
||||
</svg>
|
||||
</div>
|
||||
<input type="hidden" class="tf-dimension-control-link-value" value="<?php echo $is_linked ? '1' : '0'; ?>" name="<?php echo $name; ?>[linked]" />
|
||||
78
plugins/system/nrframework/layouts/controls/phonecontrol.php
Normal file
78
plugins/system/nrframework/layouts/controls/phonecontrol.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
// Get all countries data
|
||||
$countries = \NRFramework\Countries::getCountriesData();
|
||||
|
||||
// Find the default country
|
||||
$default_country_code = isset($value['code']) && !empty($value['code']) && isset($countries[$value['code']]) ? $value['code'] : 'AF';
|
||||
|
||||
// Find the default calling code
|
||||
$default_calling_code = '+' . $countries[$default_country_code]['calling_code'];
|
||||
|
||||
$flag_base_url = implode('/', [rtrim(Uri::root(), '/'), 'media', 'plg_system_nrframework', 'img', 'flags']);
|
||||
|
||||
$placeholder = !empty($placeholder) ? $placeholder : '_ _ _ _ _ _';
|
||||
|
||||
if ($inputmask)
|
||||
{
|
||||
$placeholder = '';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="tf-phone-control<?php echo $class ? ' ' . $class : ''; ?>"<?php echo $readonly ? ' readonly' : ''; ?> data-flags-base-url="<?php echo $flag_base_url; ?>" data-id="<?php echo $id; ?>" data-required="<?php echo $required ? 'true' : 'false'; ?>">
|
||||
<?php if ($required && (empty($value['code']) || empty($value['value']))) { ?>
|
||||
<input type="hidden" required class="required tf-phone-control--validator" id="<?php echo $id; ?>"/>
|
||||
<?php } ?>
|
||||
|
||||
<div class="tf-phone-control--skeleton tf-phone-control--flag">
|
||||
<img width="27" height="13.5" src="<?php echo implode('/', [$flag_base_url, strtolower($default_country_code) . '.png']); ?>" alt="<?php echo $countries[$default_country_code]['name']; ?>" />
|
||||
<svg class="tf-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" width="19"><path fill="currentColor" d="M480-333 240-573l51-51 189 189 189-189 51 51-240 240Z"/></svg>
|
||||
<span class="tf-flag-calling-code"><?php echo $default_calling_code; ?></span>
|
||||
</div>
|
||||
|
||||
<select
|
||||
class="tf-phone-control--flag--selector noChosen"
|
||||
name="<?php echo $name ?>[code]"
|
||||
<?php if ($aria_label): ?>
|
||||
aria-label="<?php echo htmlspecialchars($aria_label, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php endif; ?>
|
||||
>
|
||||
<?php
|
||||
foreach ($countries as $key => $country)
|
||||
{
|
||||
$selected = isset($value['code']) && $value['code'] === $key;
|
||||
?><option value="<?php echo $key; ?>" <?php echo $selected ? ' selected' : ''; ?>><?php echo $country['name']; ?></option><?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<input
|
||||
type="tel"
|
||||
class="tf-phone-control--number<?php echo !empty($input_class) ? ' ' . $input_class : ''; ?>"
|
||||
id="<?php echo $id; ?>"
|
||||
<?php echo $inputmask ? ' data-imask="' . $inputmask . '"' : ''; ?>
|
||||
<?php echo $required ? ' required' : ''; ?>
|
||||
<?php echo $readonly ? ' readonly' : ''; ?>
|
||||
<?php echo $browserautocomplete ? ' autocomplete="off"' : ''; ?>
|
||||
placeholder="<?php echo $placeholder ?>"
|
||||
value="<?php echo isset($value['value']) ? $value['value'] : ''; ?>"
|
||||
name="<?php echo $name; ?>[value]"
|
||||
/>
|
||||
</div>
|
||||
28
plugins/system/nrframework/layouts/controls/unit.php
Normal file
28
plugins/system/nrframework/layouts/controls/unit.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Layout\FileLayout;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="tf-unit-control form-control<?php echo isset($wrapper_class) && !empty($wrapper_class) ? ' ' . $wrapper_class : ''; ?>" data-hint="<?php echo $hint; ?>">
|
||||
<?php
|
||||
echo $input;
|
||||
if (count($units) > 0)
|
||||
{
|
||||
$layout = new FileLayout('selector', JPATH_PLUGINS . '/system/nrframework/layouts/controls/unit');
|
||||
echo $layout->render($displayData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<input type="hidden" name="<?php echo $name; ?>[unit]" class="tf-unit-control-unit-value" value="<?php echo $unit; ?>" />
|
||||
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2018 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Layout\FileLayout;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/controls/unit_selector.css', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
$multipleUnits = count($units) > 1;
|
||||
|
||||
if ($multipleUnits)
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/controls/unit_selector.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
?>
|
||||
<div class="tf-unit-control-dropdown<?php echo $multipleUnits ? ' has-multiple-units' : ''; ?><?php echo isset($dropdown_class) && !empty($dropdown_class) ? ' ' . $dropdown_class : ''; ?>">
|
||||
<div class="tf-unit-control-dropdown--opener"<?php echo count($units) > 1 ? ' title="' . Text::_('NR_SELECT_UNIT') . '"' : ''; ?>>
|
||||
<span class="tf-unit-control-dropdown--opener--selected--unit"><?php echo $unit; ?></span>
|
||||
<?php if ($multipleUnits): ?>
|
||||
<svg width="8" height="6" viewBox="0 0 8 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 5.46666L0 1.46666L0.933333 0.533325L4 3.59999L7.06667 0.533325L8 1.46666L4 5.46666Z" fill="currentColor" /></svg>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($multipleUnits): ?>
|
||||
<ul class="tf-unit-control-dropdown--drop">
|
||||
<?php foreach ($units as $unit_key): ?>
|
||||
<li class="tf-unit-control-dropdown--drop--item<?php echo $unit_key === $unit ? ' selected' : ''; ?>"><?php echo $unit_key; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if (!isset($hide_input))
|
||||
{
|
||||
$layout = new FileLayout('input_value', JPATH_PLUGINS . '/system/nrframework/layouts/controls/unit');
|
||||
echo $layout->render($displayData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="tf-global-devices-selector">
|
||||
<div class="tf-global-devices-selector--items">
|
||||
<?php
|
||||
foreach ($devices as $breakpoint => $device)
|
||||
{
|
||||
?>
|
||||
<div
|
||||
class="tf-global-devices-selector--items--item<?php echo $breakpoint === 'desktop' ? ' is-active' : ''; ?>"
|
||||
data-breakpoint="<?php echo $breakpoint; ?>"
|
||||
title="<?php echo sprintf(Text::_('NR_SETUP_X_DEVICE_SETTINGS'), strtolower($device['label']), $device['desc']); ?>"
|
||||
>
|
||||
<?php echo $device['icon']; ?>
|
||||
<span class="tf-global-devices-selector--items--item--label"><?php echo $device['label']; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
119
plugins/system/nrframework/layouts/imagesselector.php
Normal file
119
plugins/system/nrframework/layouts/imagesselector.php
Normal file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (empty($images))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
use NRFramework\Functions;
|
||||
|
||||
if ($pro_items)
|
||||
{
|
||||
\NRFramework\HTML::renderProOnlyModal();
|
||||
}
|
||||
|
||||
$value = !empty($value) ? $value : $images[0];
|
||||
|
||||
// Apply style via an array and use array_filter()
|
||||
$styles = array_filter([
|
||||
'--columns' => $columns,
|
||||
'--max-width' => $width,
|
||||
'--item-height' => isset($height) && !empty($height) ? $height : 'auto',
|
||||
'--item-width' => $item_width,
|
||||
'--image-width' => $image_width,
|
||||
'--gap' => $gap,
|
||||
'--item-gap' => $item_gap,
|
||||
]);
|
||||
$style_value = implode('', array_map(function($v, $k) {
|
||||
return $k . ':' . $v . ';';
|
||||
}, $styles, array_keys($styles)));
|
||||
?>
|
||||
<div class="nr-images-selector<?php echo !empty($class) ? ' ' . $class : ''; ?>" style="<?php echo $style_value; ?>">
|
||||
<?php
|
||||
if ($required)
|
||||
{
|
||||
?><input type="hidden" required class="required" id="<?php echo $id; ?>"/><?php
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count($images); $i++)
|
||||
{
|
||||
$img = $mode === null ? $images[$i] : $images[$i]['url'];
|
||||
|
||||
$label = isset($images[$i]['label']) ? ($mode === 'links' ? $images[$i]['label'] : null) : null;
|
||||
|
||||
$id = "nr-images-selector-" . md5(uniqid() . $img);
|
||||
|
||||
$atts = '';
|
||||
|
||||
$isPro = false;
|
||||
$class = '';
|
||||
|
||||
if ($pro_items)
|
||||
{
|
||||
foreach ($pro_items as $item)
|
||||
{
|
||||
if (!Functions::endsWith($img, $item))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$isPro = true;
|
||||
$class = 'is-pro';
|
||||
$atts = 'data-pro-only="' . ($label ? $label : Text::_('NR_THIS_STYLE')) . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$item_value = '';
|
||||
|
||||
if ($mode === null)
|
||||
{
|
||||
$item_value = $key_type === 'filename' ? pathinfo($img, PATHINFO_FILENAME) : $img;
|
||||
}
|
||||
else if ($mode === 'links')
|
||||
{
|
||||
$item_value = $images[$i]['key'];
|
||||
}
|
||||
|
||||
$isChecked = $value == $item_value ? ' checked="checked"' : '';
|
||||
?>
|
||||
<div class="nr-images-selector-item image<?php echo $class ? ' ' . $class : ''; ?>"<?php echo $atts; ?>>
|
||||
<?php if ($isPro): ?>
|
||||
<div class="is-pro-overlay">
|
||||
<span>
|
||||
<svg class="lock-icon" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M252.309-100.001q-29.827 0-51.067-21.241-21.241-21.24-21.241-51.067v-375.382q0-29.827 21.241-51.067 21.24-21.241 51.067-21.241h47.692v-80q0-74.922 52.538-127.46Q405.078-879.997 480-879.997t127.461 52.538q52.538 52.538 52.538 127.46v80h47.692q29.827 0 51.067 21.241 21.241 21.24 21.241 51.067v375.382q0 29.827-21.241 51.067-21.24 21.241-51.067 21.241H252.309Zm227.691-190q29.154 0 49.576-20.423 20.423-20.422 20.423-49.576t-20.423-49.576Q509.154-429.999 480-429.999t-49.576 20.423Q410.001-389.154 410.001-360t20.423 49.576q20.422 20.423 49.576 20.423ZM360-619.999h240v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80Z" fill="currentColor" /></svg>
|
||||
<svg class="unlock-icon" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M252.309-619.999H600v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85h-59.999q0-74.922 52.538-127.46Q405.078-879.997 480-879.997t127.461 52.538q52.538 52.538 52.538 127.46v80h47.692q29.827 0 51.067 21.241 21.241 21.24 21.241 51.067v375.382q0 29.827-21.241 51.067-21.24 21.241-51.067 21.241H252.309q-29.827 0-51.067-21.241-21.241-21.24-21.241-51.067v-375.382q0-29.827 21.241-51.067 21.24-21.241 51.067-21.241ZM480-290.001q29.154 0 49.576-20.423 20.423-20.422 20.423-49.576t-20.423-49.576Q509.154-429.999 480-429.999t-49.576 20.423Q410.001-389.154 410.001-360t20.423 49.576q20.422 20.423 49.576 20.423Z" fill="currentColor" /></svg>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="radio" id="<?php echo $id; ?>" value="<?php echo !$isPro ? $item_value : ''; ?>" name="<?php echo !$isPro ? $name : ''; ?>"<?php echo $isChecked; ?> />
|
||||
<label for="<?php echo $id; ?>">
|
||||
<svg class="checkmark" width="20" height="20" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.6 14.6L15.65 7.55L14.25 6.15L8.6 11.8L5.75 8.95L4.35 10.35L8.6 14.6ZM10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20Z" fill="currentColor" />
|
||||
</svg>
|
||||
<img src="<?php echo $mode === null ? Uri::root() . $img : $img; ?>" alt="<?php echo $img; ?>" />
|
||||
<?php if (!empty($label)): ?>
|
||||
<div class="item-label"><?php echo Text::_($label); ?></div>
|
||||
<?php endif; ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
80
plugins/system/nrframework/layouts/inlinefileupload.php
Normal file
80
plugins/system/nrframework/layouts/inlinefileupload.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/inlinefileupload.css', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/inlinefileupload.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="nr-inline-file-upload" data-name="<?php echo $name; ?>" data-upload-folder="<?php echo $upload_folder; ?>" data-base-url="<?php echo Uri::base(); ?>">
|
||||
<div class="loader"><?php echo Text::_('NR_LOADING'); ?></div>
|
||||
<div class="upload-area<?php echo $value ? ' hidden' : ''; ?>">
|
||||
<button class="file-selector-opener btn"><?php echo Text::_('NR_SELECT_A_FILE'); ?></button>
|
||||
<input
|
||||
type="file"
|
||||
class="file-selector"
|
||||
<?php
|
||||
if (!empty($accept))
|
||||
{
|
||||
?>
|
||||
accept="<?php echo $accept; ?>"
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
/>
|
||||
</div>
|
||||
<div class="uploaded-files">
|
||||
<?php
|
||||
if ($value)
|
||||
{
|
||||
if (file_exists($value))
|
||||
{
|
||||
$filePathInfo = NRFramework\File::pathinfo($value);
|
||||
$file_name = $filePathInfo['basename'];
|
||||
$file_size = file_exists($value) ? filesize($value) : 0;
|
||||
$file_size = $file_size ? number_format($file_size / 1024, 2) . ' KB' : $file_size;
|
||||
?>
|
||||
<div class="nr-inline-file-upload-item">
|
||||
<span class="icon icon-file-2"></span>
|
||||
<span class="file-name"><?php echo $file_name; ?></span>
|
||||
<span class="size"><?php echo $file_size; ?></span>
|
||||
<a href="#" class="remove icon-cancel-circle nr-inline-file-upload-item-remove" data-confirm="<?php echo Text::_('NR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM') ?>"></a>
|
||||
<input type="hidden" value="<?php echo $value; ?>" name="<?php echo $name; ?>">
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div class="error visible">
|
||||
<?php echo Text::_('NR_UPLOADED_FILE_NO_LONGER_EXISTS'); ?>
|
||||
<div class="actions">
|
||||
<button class="nr-inline-file-upload-item-clear btn"><?php echo Text::_('NR_CLEAR'); ?></button>
|
||||
</div>
|
||||
<input type="hidden" value="" name="<?php echo $name; ?>">
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="error"></div>
|
||||
</div>
|
||||
<template class="nr-inline-file-upload-item">
|
||||
<span class="icon icon-file-2"></span>
|
||||
<span class="file-name"></span>
|
||||
<span class="size"></span>
|
||||
<a href="#" class="remove icon-cancel-circle nr-inline-file-upload-item-remove" data-confirm="<?php echo Text::_('NR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ITEM') ?>"></a>
|
||||
</template>
|
||||
52
plugins/system/nrframework/layouts/library/filters.php
Normal file
52
plugins/system/nrframework/layouts/library/filters.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$filters)
|
||||
{
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="tf-library-filters">
|
||||
<?php
|
||||
foreach ($filters as $key => $filter)
|
||||
{
|
||||
?>
|
||||
<div class="tf-library-filter-item open" data-type="<?php echo $key; ?>">
|
||||
<div class="tf-library-filter-item-label">
|
||||
<span><?php echo $filter['label']; ?></span>
|
||||
<svg class="tf-library-filter-item-toggle" width="10" height="7" viewBox="0 0 10 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path opacity="0.5" d="M9 1.5L5.70711 4.79289C5.31658 5.18342 4.68342 5.18342 4.29289 4.79289L1 1.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="tf-library-filter-choices">
|
||||
<?php
|
||||
foreach ($filter['items'] as $_key => $label)
|
||||
{
|
||||
$choice_item_key = 'tf_library_filters' . $key . '_filter_' . $_key;
|
||||
?>
|
||||
<div class="tf-library-filter-choice-item">
|
||||
<input type="checkbox" class="tf-library-filter-choice-item-checkbox" id="<?php echo $choice_item_key; ?>" value="<?php echo $label; ?>" />
|
||||
<label for="<?php echo $choice_item_key; ?>"><?php echo $label ?></label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
34
plugins/system/nrframework/layouts/library/footer.php
Normal file
34
plugins/system/nrframework/layouts/library/footer.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="tf-library-footer">
|
||||
<a href="<?php echo $create_new_template_link; ?>" target="_blank">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="8" cy="8" r="6" stroke="currentColor" />
|
||||
<line x1="8" y1="5" x2="8" y2="11" stroke="currentColor" stroke-linecap="round" />
|
||||
<line x1="11" y1="8" x2="5" y2="8" stroke="currentColor" stroke-linecap="round" />
|
||||
</svg>
|
||||
<?php echo Text::_('NR_START_FROM_SCRATCH'); ?>
|
||||
</a>
|
||||
<a href="https://www.tassos.gr/contact?topic=Custom Development&extension=<?php echo $project_name; ?>" target="_blank">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.6 11H6.1C6.1 10.7239 5.87614 10.5 5.6 10.5V11ZM5.6 14H5.1C5.1 14.1905 5.20823 14.3644 5.37912 14.4486C5.55002 14.5327 5.75387 14.5125 5.90486 14.3963L5.6 14ZM3 2.5H13V1.5H3V2.5ZM13.5 3V10H14.5V3H13.5ZM2.5 10V3H1.5V10H2.5ZM5.6 10.5H3V11.5H5.6V10.5ZM6.1 14V11H5.1V14H6.1ZM13 10.5H9.84012V11.5H13V10.5ZM8.92556 10.8111L5.29514 13.6037L5.90486 14.3963L9.53527 11.6037L8.92556 10.8111ZM1.5 10C1.5 10.8284 2.17157 11.5 3 11.5V10.5C2.72386 10.5 2.5 10.2761 2.5 10H1.5ZM13.5 10C13.5 10.2761 13.2761 10.5 13 10.5V11.5C13.8284 11.5 14.5 10.8284 14.5 10H13.5ZM9.84012 10.5C9.50931 10.5 9.18777 10.6094 8.92556 10.8111L9.53527 11.6037C9.62267 11.5365 9.72985 11.5 9.84012 11.5V10.5ZM13 2.5C13.2761 2.5 13.5 2.72386 13.5 3H14.5C14.5 2.17157 13.8284 1.5 13 1.5V2.5ZM3 1.5C2.17157 1.5 1.5 2.17157 1.5 3H2.5C2.5 2.72386 2.72386 2.5 3 2.5V1.5Z" fill="currentColor"/>
|
||||
</svg>
|
||||
<?php echo Text::_('NR_REQUEST_TEMPLATE'); ?>
|
||||
</a>
|
||||
</div>
|
||||
54
plugins/system/nrframework/layouts/library/info_popup.php
Normal file
54
plugins/system/nrframework/layouts/library/info_popup.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
?>
|
||||
<div class="tf-template-library-item-info">
|
||||
<div class="item-description"></div>
|
||||
<div class="template-details">
|
||||
<div class="items tf-library-info-grid cols-3">
|
||||
<div class="tf-cell category">
|
||||
<div class="title is-grey"><?php echo $category_label; ?>:</div>
|
||||
<div class="content"></div>
|
||||
</div>
|
||||
<div class="tf-cell solution">
|
||||
<div class="title is-grey"><?php echo Text::_('NR_SOLUTION'); ?>:</div>
|
||||
<div class="content"></div>
|
||||
</div>
|
||||
<div class="tf-cell goal">
|
||||
<div class="title is-grey"><?php echo Text::_('NR_GOAL'); ?>:</div>
|
||||
<div class="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="template-details compatibility-details">
|
||||
<div class="details-header-items">
|
||||
<div class="tf-library-info-grid cols-3">
|
||||
<div class="tf-cell"><?php echo Text::_('NR_REQUIREMENTS'); ?></div>
|
||||
<div class="tf-cell"><?php echo Text::_('NR_DETECTED'); ?></div>
|
||||
<div class="tf-cell"><?php echo Text::_('NR_CHECK'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dependency-items"></div>
|
||||
<div class="template dependency-item tf-library-info-grid cols-3">
|
||||
<div class="tf-cell requirement"></div>
|
||||
<div class="tf-cell detected"></div>
|
||||
<div class="tf-cell value">
|
||||
<svg class="checkmark is-hidden" width="20" height="16" viewBox="0 0 20 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 8.65556L6.89552 14.5L19 1.5" stroke="#82DE78" stroke-width="2" stroke-linecap="round"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
50
plugins/system/nrframework/layouts/library/items.php
Normal file
50
plugins/system/nrframework/layouts/library/items.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="tf-library-list">
|
||||
<div class="tf-library-item blank_popup">
|
||||
<span class="tf-library-item-wrap">
|
||||
<a class="parent" href="<?php echo $create_new_template_link; ?>">
|
||||
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="10" stroke="currentColor"/>
|
||||
<line x1="12" y1="7.5" x2="12" y2="16.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
<line x1="16.5" y1="12" x2="7.5" y2="12" stroke="currentColor" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span class="title"><?php echo $blank_template_label; ?></span>
|
||||
<span class="description"><?php echo Text::_('NR_START_FROM_SCRATCH'); ?></span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<?php
|
||||
// Skeleton
|
||||
for ($i = 0; $i < 15; $i++)
|
||||
{
|
||||
?>
|
||||
<div class="tf-library-item skeleton">
|
||||
<div class="tf-library-item-wrap">
|
||||
<div></div>
|
||||
<div class="actions">
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
485
plugins/system/nrframework/layouts/library/items_list.php
Normal file
485
plugins/system/nrframework/layouts/library/items_list.php
Normal file
@ -0,0 +1,485 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$templates)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$main_category_label)
|
||||
{
|
||||
$main_category_label = Text::_('NR_CATEGORY');
|
||||
}
|
||||
|
||||
$parsed_project_version = strstr($project_version, '-', true);
|
||||
$project_version = $parsed_project_version ? $parsed_project_version : $project_version;
|
||||
|
||||
$j_version = JVERSION;
|
||||
|
||||
$capabilities_solution_label = Text::_('NR_SOLUTION');
|
||||
$capabilities_content_label = Text::_('NR_GOAL');
|
||||
$capabilities_joomla_label = Text::_('NR_UPDATE_JOOMLA');
|
||||
$capabilities_joomla_url = Uri::base() . 'index.php?option=com_joomlaupdate';
|
||||
$capabilities_project_label = sprintf(Text::_('NR_UPDATE_EXTENSION_X'), $project_name);
|
||||
$capabilities_project_url = $update_url = Uri::base() . 'index.php?option=com_installer&view=update';
|
||||
$install_url = Uri::base() . 'index.php?option=com_installer&view=install';
|
||||
|
||||
$install_svg_icon = '<svg class="icon" width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 10L2 13L14 13L14 10" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.5 1C8.5 0.723858 8.27614 0.5 8 0.5C7.72386 0.5 7.5 0.723858 7.5 1L8.5 1ZM7.64645 10.3536C7.84171 10.5488 8.15829 10.5488 8.35355 10.3536L11.5355 7.17157C11.7308 6.97631 11.7308 6.65973 11.5355 6.46447C11.3403 6.2692 11.0237 6.2692 10.8284 6.46447L8 9.29289L5.17157 6.46447C4.97631 6.2692 4.65973 6.2692 4.46447 6.46447C4.2692 6.65973 4.2692 6.97631 4.46447 7.17157L7.64645 10.3536ZM7.5 1L7.5 10L8.5 10L8.5 1L7.5 1Z" fill="currentColor"/></svg>';
|
||||
$activate_svg_icon = '<svg class="icon" width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 10L2 13L14 13L14 10" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.5 1C8.5 0.723858 8.27614 0.5 8 0.5C7.72386 0.5 7.5 0.723858 7.5 1L8.5 1ZM7.64645 10.3536C7.84171 10.5488 8.15829 10.5488 8.35355 10.3536L11.5355 7.17157C11.7308 6.97631 11.7308 6.65973 11.5355 6.46447C11.3403 6.2692 11.0237 6.2692 10.8284 6.46447L8 9.29289L5.17157 6.46447C4.97631 6.2692 4.65973 6.2692 4.46447 6.46447C4.2692 6.65973 4.2692 6.97631 4.46447 7.17157L7.64645 10.3536ZM7.5 1L7.5 10L8.5 10L8.5 1L7.5 1Z" fill="currentColor"/></svg>';
|
||||
$update_svg_icon = '<svg class="icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.50006 4.6001L7.70013 2.80017L9.50006 1.00024" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.60022 2.80029C11.5824 2.80029 14 5.21786 14 8.20008C14 9.79931 13.3048 11.2362 12.2001 12.2249" stroke="currentColor" stroke-linecap="round"/><path d="M6.5 11.7993L8.29993 13.5992L6.5 15.3992" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.39979 13.5989C4.41757 13.5989 2 11.1814 2 8.19915C2 6.59991 2.69522 5.16305 3.79993 4.17432" stroke="currentColor" stroke-linecap="round"/></svg>';
|
||||
$pro_svg_icon = '<svg class="icon" width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 10C7.5 10.2761 7.72386 10.5 8 10.5C8.27614 10.5 8.5 10.2761 8.5 10L7.5 10ZM8.35355 3.64645C8.15829 3.45118 7.84171 3.45118 7.64645 3.64645L4.46447 6.82843C4.2692 7.02369 4.2692 7.34027 4.46447 7.53553C4.65973 7.7308 4.97631 7.7308 5.17157 7.53553L8 4.70711L10.8284 7.53553C11.0237 7.7308 11.3403 7.7308 11.5355 7.53553C11.7308 7.34027 11.7308 7.02369 11.5355 6.82843L8.35355 3.64645ZM8.5 10L8.5 4L7.5 4L7.5 10L8.5 10Z" fill="currentColor"/><path d="M14 7C14 10.3137 11.3137 13 8 13C4.68629 13 2 10.3137 2 7C2 3.68629 4.68629 1 8 1C11.3137 1 14 3.68629 14 7Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
||||
$key_svg_icon = '<svg class="icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="4.81803" cy="11.3135" r="3" transform="rotate(-45 4.81803 11.3135)" stroke="currentColor"/><line x1="6.93933" y1="9.19231" x2="13.3033" y2="2.82835" stroke="currentColor" stroke-linecap="round"/><path d="M12.5962 4.24219L14.0104 5.6564" stroke="currentColor" stroke-linecap="round"/><path d="M10.4749 6.36377L11.182 7.07088" stroke="currentColor" stroke-linecap="round"/></svg>';
|
||||
$insert_svg_icon = '<svg class="icon" width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 4L3 1L14 1L14 13L3 13L3 10" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><path d="M2 6.5C1.72386 6.5 1.5 6.72386 1.5 7C1.5 7.27614 1.72386 7.5 2 7.5V6.5ZM11.3536 7.35355C11.5488 7.15829 11.5488 6.84171 11.3536 6.64645L8.17157 3.46447C7.97631 3.2692 7.65973 3.2692 7.46447 3.46447C7.2692 3.65973 7.2692 3.97631 7.46447 4.17157L10.2929 7L7.46447 9.82843C7.2692 10.0237 7.2692 10.3403 7.46447 10.5355C7.65973 10.7308 7.97631 10.7308 8.17157 10.5355L11.3536 7.35355ZM2 7.5L11 7.5V6.5L2 6.5V7.5Z" fill="currentColor"/></svg>';
|
||||
$error_svg_icon = '<svg class="icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.3351 6.19586L14.8335 6.1558C14.8198 5.98487 14.7194 5.8329 14.5676 5.75318C14.4157 5.67346 14.2336 5.67711 14.0851 5.76285L14.3351 6.19586ZM9.26069 9.12581L9.54456 8.7142C9.38565 8.60461 9.17786 8.59628 9.01069 8.6928L9.26069 9.12581ZM7.8715 6.71947L8.1215 7.15248C8.28866 7.05597 8.38534 6.87187 8.3699 6.67947L7.8715 6.71947ZM12.9456 3.78971L13.1956 4.22272C13.3441 4.13697 13.4383 3.98108 13.4452 3.80971C13.4521 3.63834 13.3706 3.47541 13.2294 3.37807L12.9456 3.78971ZM10.8097 5.02286L10.5597 4.58984C10.415 4.67343 10.3215 4.82385 10.3108 4.99068L10.8097 5.02286ZM10.7023 6.68909L10.2033 6.65691C10.1903 6.85835 10.2997 7.04783 10.4807 7.1373L10.7023 6.68909ZM12.199 7.42915L11.9774 7.87735C12.1273 7.95145 12.3042 7.94575 12.449 7.86216L12.199 7.42915ZM12.9741 9.69824C14.2675 8.9515 14.9456 7.54965 14.8335 6.1558L13.8367 6.23593C13.919 7.25948 13.4207 8.2857 12.4741 8.83221L12.9741 9.69824ZM8.97683 9.53742C10.1279 10.3313 11.6808 10.4449 12.9741 9.69824L12.4741 8.83221C11.5276 9.37869 10.3898 9.29714 9.54456 8.7142L8.97683 9.53742ZM4.02698 12.7248L9.51069 9.55882L9.01069 8.6928L3.52698 11.8588L4.02698 12.7248ZM1.44618 12.0333C1.96789 12.937 3.12335 13.2466 4.02698 12.7248L3.52698 11.8588C3.10164 12.1044 2.55777 11.9587 2.3122 11.5333L1.44618 12.0333ZM2.1377 9.45253C1.23407 9.97424 0.924469 11.1297 1.44618 12.0333L2.3122 11.5333C2.06664 11.108 2.21237 10.5641 2.6377 10.3186L2.1377 9.45253ZM7.6215 6.28646L2.1377 9.45253L2.6377 10.3186L8.1215 7.15248L7.6215 6.28646ZM9.23251 3.21753C7.93928 3.96418 7.26126 5.36578 7.3731 6.75946L8.3699 6.67947C8.28777 5.65605 8.78604 4.63 9.73251 4.08356L9.23251 3.21753ZM13.2294 3.37807C12.0784 2.58449 10.5257 2.47093 9.23251 3.21753L9.73251 4.08356C10.6789 3.53714 11.8166 3.61861 12.6618 4.20136L13.2294 3.37807ZM11.0597 5.45587L13.1956 4.22272L12.6956 3.3567L10.5597 4.58984L11.0597 5.45587ZM11.2012 6.72127L11.3087 5.05504L10.3108 4.99068L10.2033 6.65691L11.2012 6.72127ZM12.4206 6.98094L10.9239 6.24089L10.4807 7.1373L11.9774 7.87735L12.4206 6.98094ZM14.0851 5.76285L11.949 6.99614L12.449 7.86216L14.5851 6.62888L14.0851 5.76285Z" fill="currentColor"/></svg>';
|
||||
$loading_svg_icon = '<svg class="icon loading" width="16" height="16" xmlns="http://www.w3.org/2000/svg" style="shape-rendering: auto;" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="50" cy="50" fill="none" stroke="currentColor" stroke-width="10" r="40" stroke-dasharray="160.22122533307947 55.40707511102649"><animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform></circle></svg>';
|
||||
|
||||
$info_item_atts = defined('nrJ4') ? '' : ' data-bs-toggle="modal" data-toggle="modal" data-bs-target="#tf-library-item-info-popup" href="#tf-library-item-info-popup"';
|
||||
$info_item_class = defined('nrJ4') ? ' tf-library-template-item-info-popup-trigger' : '';
|
||||
|
||||
foreach ($templates as $template_key => $template)
|
||||
{
|
||||
$is_favorite = array_key_exists($template->id, $favorites);
|
||||
$image = isset($template->image) ? $template->image : '';
|
||||
|
||||
$external_extensions = $template->fields->{'templates-external-extensions'};
|
||||
|
||||
$item_class = '';
|
||||
|
||||
$valid_j_version = $valid_item_version = $valid_third_party_extension_version = false;
|
||||
|
||||
$required_j_version = isset($template->fields->{'templates-minimum-joomla-version'}) && !empty($template->fields->{'templates-minimum-joomla-version'}) ? $template->fields->{'templates-minimum-joomla-version'} : '';
|
||||
$required_item_version = isset($template->fields->{'templates-minimum-extension-version'}) && !empty($template->fields->{'templates-minimum-extension-version'}) ? $template->fields->{'templates-minimum-extension-version'} : '';
|
||||
|
||||
$errors = [];
|
||||
|
||||
$capabilities = [
|
||||
'pro' => [
|
||||
'requirement' => $template->is_pro ? 'pro' : 'lite',
|
||||
'detected' => $project_license_type === 'lite' ? 'lite' : 'pro'
|
||||
],
|
||||
'category' => [
|
||||
'value' => $template->category,
|
||||
'label' => $main_category_label
|
||||
],
|
||||
'solution' => [
|
||||
'value' => $template->filters->solution,
|
||||
'label' => $capabilities_solution_label
|
||||
],
|
||||
'goal' => [
|
||||
'value' => $template->filters->goal,
|
||||
'label' => $capabilities_content_label
|
||||
],
|
||||
'joomla' => [
|
||||
'value' => $required_j_version,
|
||||
'label' => $capabilities_joomla_label,
|
||||
'icon' => '',
|
||||
'url' => $capabilities_joomla_url,
|
||||
'detected' => $j_version
|
||||
],
|
||||
'project' => [
|
||||
'value' => $required_item_version,
|
||||
'label' => $capabilities_project_label,
|
||||
'icon' => '',
|
||||
'url' => $capabilities_project_url,
|
||||
'detected' => $project_version
|
||||
],
|
||||
'third_party_dependencies' => [
|
||||
'value' => $external_extensions,
|
||||
'errors' => []
|
||||
],
|
||||
'license_error' => [
|
||||
'value' => ''
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* A template may not be available for the following reasons:
|
||||
* - User has an older version than the one specified in the template
|
||||
* - Extension version may be outdated
|
||||
* - 3rd-party extensions are required and missing (not installed and/or not activated)
|
||||
*/
|
||||
|
||||
// Joomla Version Check
|
||||
if ($required_j_version)
|
||||
{
|
||||
$valid_j_version = !empty(trim($required_j_version)) ? version_compare($j_version, $required_j_version, '>=') : false;
|
||||
if (!$valid_j_version)
|
||||
{
|
||||
$capabilities['joomla']['icon'] = 'update';
|
||||
$errors['joomla'] = $capabilities['joomla'];
|
||||
$errors['joomla']['full_label'] = Text::_('NR_UPDATE_JOOMLA_TO_INSERT_TEMPLATE');
|
||||
}
|
||||
}
|
||||
|
||||
// Item Version Check
|
||||
if ($required_item_version)
|
||||
{
|
||||
$valid_item_version = !empty(trim($required_item_version)) ? version_compare($project_version, $required_item_version, '>=') : false;
|
||||
if (!$valid_item_version)
|
||||
{
|
||||
$capabilities['project']['icon'] = 'update';
|
||||
$errors['project'] = $capabilities['project'];
|
||||
$errors['project']['full_label'] = sprintf(Text::_('NR_UPDATE_EXTENSION_X_TO_INSERT_TEMPLATE'), $project_name);
|
||||
}
|
||||
}
|
||||
|
||||
// 3rd party extensions Check
|
||||
if (is_array($external_extensions) && count($external_extensions))
|
||||
{
|
||||
foreach ($external_extensions as $key => $external_extension)
|
||||
{
|
||||
$valid_third_party_extension_version = false;
|
||||
|
||||
$icon = $label = $full_label = $detected = 'none';
|
||||
|
||||
if (!$external_extension->slug || !$external_extension->name || !$external_extension->version)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// 3rd-party extension is not installed
|
||||
if (!\NRFramework\Extension::isInstalled($external_extension->slug))
|
||||
{
|
||||
$icon = 'install';
|
||||
$label = sprintf(Text::_('NR_INSTALL_EXTENSION_X'), $external_extension->name);
|
||||
$full_label = sprintf(Text::_('NR_INSTALL_EXTENSION_X_TO_INSERT_TEMPLATE'), $external_extension->name);
|
||||
}
|
||||
// 3rd-party extension is installed but not active
|
||||
else if (!\NRFramework\Extension::isEnabled($external_extension->slug))
|
||||
{
|
||||
$icon = 'activate';
|
||||
$label = sprintf(Text::_('NR_ACTIVATE_EXTENSION_X'), $external_extension->name);
|
||||
$full_label = sprintf(Text::_('NR_ACTIVATE_EXTENSION_X_TO_INSERT_TEMPLATE'), $external_extension->name);
|
||||
}
|
||||
// 3rd-party extension is installed, active but we need to check whether its version is valid
|
||||
else
|
||||
{
|
||||
$third_party_extension_installed_version = \NRFramework\Extension::getVersion($external_extension->slug);
|
||||
$parsed_third_party_extension_installed_version = strstr($third_party_extension_installed_version, '-', true);
|
||||
$third_party_extension_installed_version = $parsed_third_party_extension_installed_version ? $parsed_third_party_extension_installed_version : $third_party_extension_installed_version;
|
||||
$valid_third_party_extension_version = !empty(trim($external_extension->version)) ? version_compare($third_party_extension_installed_version, $external_extension->version, '>=') : false;
|
||||
|
||||
$icon = 'update';
|
||||
$label = sprintf(Text::_('NR_UPDATE_EXTENSION_X'), $external_extension->name);
|
||||
$full_label = sprintf(Text::_('NR_UPDATE_EXTENSION_X_TO_INSERT_TEMPLATE'), $external_extension->name);
|
||||
$detected = $third_party_extension_installed_version;
|
||||
}
|
||||
|
||||
// Set third party item information
|
||||
$capabilities['third_party_dependencies']['value'][$key]->icon = $icon;
|
||||
$capabilities['third_party_dependencies']['value'][$key]->label = $label;
|
||||
$capabilities['third_party_dependencies']['value'][$key]->full_label = $full_label;
|
||||
$capabilities['third_party_dependencies']['value'][$key]->detected = $detected;
|
||||
$capabilities['third_party_dependencies']['value'][$key]->url = $icon === 'update' ? $update_url : $install_url;
|
||||
$capabilities['third_party_dependencies']['value'][$key]->valid = $valid_third_party_extension_version;
|
||||
|
||||
if (!$valid_third_party_extension_version)
|
||||
{
|
||||
// Add the external extensions we are having issues with
|
||||
$capabilities['third_party_dependencies']['errors'][] = $external_extension->name;
|
||||
|
||||
// Set error index used to retrieve this error message action
|
||||
$capabilities['third_party_dependencies']['error_index'] = $key;
|
||||
|
||||
// Add the error
|
||||
$errors['third_party_dependencies_' . $key] = $capabilities['third_party_dependencies'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check other cases where a template may not be available:
|
||||
* - Is Pro but we have the Free version
|
||||
* - Is Pro and template is Pro
|
||||
* - We have not entered a license key OR We have entered a license key but it's not valid
|
||||
*/
|
||||
|
||||
// Is Pro but we have the Free version
|
||||
if ($project_license_type === 'lite' && $template->is_pro)
|
||||
{
|
||||
$errors = [
|
||||
'pro' => [
|
||||
'icon' => 'pro',
|
||||
'class' => 'red',
|
||||
'data_attributes' => 'data-pro-only="' . $template->title . '"',
|
||||
'label' => Text::_('NR_UPGRADE_TO_UC_PRO'),
|
||||
'full_label' => Text::_('NR_UPGRADE_TO_PRO_TO_UNLOCK_TEMPLATE')
|
||||
]
|
||||
] + $errors;
|
||||
}
|
||||
// Is Pro and template is Pro
|
||||
else if ($project_license_type === 'pro' && $template->is_pro && (empty($license_key) || $license_key_status !== 'valid'))
|
||||
{
|
||||
// We have not entered a license key
|
||||
if (empty($license_key))
|
||||
{
|
||||
$errors['license'] = [
|
||||
'icon' => 'key',
|
||||
'url' => $product_license_settings_url,
|
||||
'label' => Text::_('NR_SET_LICENSE_KEY'),
|
||||
'full_label' => Text::_('NR_NO_LICENSE_KEY_DETECTED')
|
||||
];
|
||||
|
||||
$capabilities['license_error']['value'] = 'missing';
|
||||
}
|
||||
// We have entered a license key but it's invalid/expired
|
||||
else if ($license_key_status !== 'valid')
|
||||
{
|
||||
$errors['license'] = [
|
||||
'icon' => 'key',
|
||||
'url' => 'https://www.tassos.gr/subscriptions',
|
||||
'label' => Text::_('NR_INVALID_EXPIRED_LICENSE_KEY'),
|
||||
'full_label' => Text::_('NR_INVALID_LICENSE_KEY_ENTERED')
|
||||
];
|
||||
|
||||
$capabilities['license_error']['value'] = 'invalid_expired';
|
||||
}
|
||||
}
|
||||
|
||||
if ($errors)
|
||||
{
|
||||
$item_class .= ' has-errors';
|
||||
|
||||
// If its a PRO template and we are not a PRO user, add a "is-pro" CSS class
|
||||
if ($template->is_pro && $project_license_type === 'lite')
|
||||
{
|
||||
$item_class .= ' is-pro';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div
|
||||
class="tf-library-item<?php echo $item_class; ?>"
|
||||
data-id="<?php echo $template->id; ?>"
|
||||
data-note="<?php echo $template->fields->{'templates-note'}; ?>"
|
||||
|
||||
<?php
|
||||
foreach ($template->sort as $sort_key => $sort_value)
|
||||
{
|
||||
?>data-sort-<?php echo $sort_key; ?>="<?php echo $sort_value; ?>"<?php
|
||||
}
|
||||
?>
|
||||
|
||||
data-filter-category="<?php echo $template->category; ?>"
|
||||
<?php foreach ($template->filters as $filter_key => $filter_value): ?>
|
||||
data-filter-<?php echo $filter_key; ?>="<?php echo $filter_value; ?>"
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ($project_license_type === 'lite'): ?>
|
||||
data-filter-compatibility="<?php echo $template->is_pro ? 'Pro' : 'Free'; ?>"
|
||||
<?php endif; ?>
|
||||
|
||||
data-title="<?php echo $template->title; ?>"
|
||||
data-capabilities="<?php echo htmlspecialchars(json_encode($capabilities), ENT_QUOTES, 'UTF-8'); ?>">
|
||||
<div class="tf-library-item-wrap">
|
||||
<div class="tf-template-item-message is-hidden">
|
||||
<span class="tf-template-item-message-text">This is a message</span>
|
||||
<svg class="fpf-library-messages-hide-btn" height="14" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="14" y="12.5933" width="2.47487" height="17.3241" transform="rotate(135 14 12.5933)" fill="currentColor"></rect>
|
||||
<rect width="2.47487" height="17.3241" transform="matrix(-0.707109 -0.707105 0.707109 -0.707105 1.75 14.3433)" fill="currentColor"></rect>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="tf-library-item-image-wrapper">
|
||||
<div class="tf-library-item-image-inner">
|
||||
<img loading="lazy" src="<?php echo $image; ?>" alt="<?php echo $template->title; ?>" />
|
||||
|
||||
<div class="tf-library-item-hover">
|
||||
<a href="#templates-library-previewer" class="tf-button outline tf-library-preview-item" title="<?php echo Text::_('NR_PREVIEW_TEMPLATE'); ?>">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11.5" cy="11.5" r="6" stroke="currentColor"/>
|
||||
<line x1="15.7071" y1="16" x2="19" y2="19.2929" stroke="currentColor" stroke-linecap="round"/>
|
||||
<line x1="11.5" y1="9" x2="11.5" y2="14" stroke="currentColor"/>
|
||||
<line x1="14" y1="11.5" x2="9" y2="11.5" stroke="currentColor"/>
|
||||
</svg>
|
||||
<span><?php echo Text::_('NR_PREVIEW'); ?></span>
|
||||
</a>
|
||||
<?php if (isset($errors['joomla']) || isset($errors['project']) || isset($errors['third_party_dependencies_0'])): ?>
|
||||
<div class="dependencies-wrapper">
|
||||
<div class="title"><?php echo Text::_('NR_REQUIREMENTS'); ?></div>
|
||||
<div class="dependencies">
|
||||
<?php
|
||||
if (array_key_exists('joomla', $errors))
|
||||
{
|
||||
?><span class="error<?php echo $info_item_class; ?>"<?php echo $info_item_atts; ?>><?php echo Text::_('NR_JOOMLA') . ' ' . ($required_j_version ? $required_j_version : $j_version); ?></span><?php
|
||||
}
|
||||
if (array_key_exists('project', $errors))
|
||||
{
|
||||
?><span class="error<?php echo $info_item_class; ?>"<?php echo $info_item_atts; ?>><?php echo $project_name . ' ' . ($required_item_version ? $required_item_version : $project_version); ?></span><?php
|
||||
}
|
||||
if (is_array($external_extensions) && count($external_extensions))
|
||||
{
|
||||
foreach ($external_extensions as $external_extension_key => $external_extension)
|
||||
{
|
||||
if (!array_key_exists('third_party_dependencies_' . $external_extension_key, $errors) || !array_key_exists('errors', $errors['third_party_dependencies_' . $external_extension_key]) || !in_array($external_extension->name, $errors['third_party_dependencies_' . $external_extension_key]['errors']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
?><span class="error<?php echo $info_item_class; ?>"<?php echo $info_item_atts; ?>><?php echo $external_extension->name . ' ' . $external_extension->version; ?></span><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($template->is_pro && $project_license_type === 'lite')
|
||||
{
|
||||
?>
|
||||
<span class="ribbon"><?php echo Text::_('NR_PRO'); ?></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="tf-library-item-bottom">
|
||||
<div class="template-label"><?php echo $template->title; ?></div>
|
||||
<div class="tf-library-item-bottom-buttons">
|
||||
<a data-template-id="<?php echo $template->id; ?>" class="info tf-library-template-item-info<?php echo $info_item_class; ?>" title="<?php echo Text::_('NR_TEMPLATE_INFORMATION'); ?>"<?php echo $info_item_atts; ?> href="#tf-library-item-info-popup">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="8" cy="8" r="7" stroke="currentColor"/>
|
||||
<rect x="7" y="7" width="2" height="5" fill="currentColor"/>
|
||||
<rect x="7" y="4" width="2" height="2" fill="currentColor"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="#" class="tf-library-favorite-icon tf-library-favorite-item<?php echo $is_favorite ? ' active' : ''; ?>" title="<?php echo Text::_('NR_LIBRARY_SAVE_TEMPLATE_FAVORITES'); ?>">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.902 6.62124C14.3943 9.04222 11.0187 11.1197 7.99845 14C4.97819 11.1197 1.60265 9.04223 1.09492 6.62125C0.231957 2.50649 5.47086 -0.0322558 7.99845 4.12617C10.7204 -0.0322523 15.7649 2.50648 14.902 6.62124Z" stroke="currentColor" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<div class="tf-library-item-actions">
|
||||
<?php
|
||||
// We have errors with this template
|
||||
if (!empty($errors))
|
||||
{
|
||||
// Multiple errors, but do not show this message when we still need to Upgrade to Pro.
|
||||
if (count($errors) > 1 && !isset($errors['pro']))
|
||||
{
|
||||
?>
|
||||
<a class="<?php echo $info_item_class; ?>"<?php echo $info_item_atts; ?> href="#tf-library-item-info-popup" data-template-id="<?php echo $template->id; ?>">
|
||||
<?php
|
||||
echo $error_svg_icon;
|
||||
echo Text::_('NR_MULTIPLE_ISSUES_DETECTED');
|
||||
?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
// One error
|
||||
else
|
||||
{
|
||||
$error_keys = array_keys($errors);
|
||||
$error_values = array_values($errors);
|
||||
$error_items = [$error_values[0]];
|
||||
|
||||
foreach ($error_items as $error_item)
|
||||
{
|
||||
// 3rd-party dependency has an array of extensions
|
||||
if (isset($error_item['value']) && is_array($error_item['value']) && isset($error_item['error_index']))
|
||||
{
|
||||
$error_item = (array) $error_item['value'][$error_item['error_index']];
|
||||
}
|
||||
|
||||
$class = isset($error_item['class']) ? $error_item['class'] : '';
|
||||
$data_atts = isset($error_item['data_attributes']) ? ' ' . $error_item['data_attributes'] : '';
|
||||
$url = isset($error_item['url']) ? $error_item['url'] : '#';
|
||||
if ($url !== '#')
|
||||
{
|
||||
$data_atts .= ' target="_blank"';
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo $url; ?>" class="<?php echo $class; ?>"<?php echo $data_atts; ?>>
|
||||
<?php echo ${$error_item['icon'] . '_svg_icon'}; ?>
|
||||
<?php if (isset($error_item['full_label'])): ?>
|
||||
<span class="full-label"><?php echo $error_item['full_label']; ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="short-label"><?php echo $error_item['label']; ?></span>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
// No errors, we can use the template
|
||||
else
|
||||
{
|
||||
?>
|
||||
<a href="#" class="tf-library-item-insert-btn" data-template-id="<?php echo $template->id; ?>">
|
||||
<?php
|
||||
echo $insert_svg_icon;
|
||||
echo $loading_svg_icon;
|
||||
?>
|
||||
<span class="full-label"><?php echo Text::_('NR_INSERT_TEMPLATE'); ?></span>
|
||||
<span class="short-label"><?php echo Text::_('NR_INSERT'); ?></span>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-popup-actions">
|
||||
<?php
|
||||
// Show errors
|
||||
if ($errors)
|
||||
{
|
||||
foreach ($errors as $error_key => $error)
|
||||
{
|
||||
// 3rd-party dependency has an array of extensions
|
||||
if (isset($error['value']) && is_array($error['value']) && isset($error['error_index']))
|
||||
{
|
||||
$error = (array) $error['value'][$error['error_index']];
|
||||
}
|
||||
|
||||
$url = isset($error['url']) ? $error['url'] : '#';
|
||||
$class = isset($error['class']) ? $error['class'] : '';
|
||||
$data_atts = isset($error['data_attributes']) ? ' ' . $error['data_attributes'] : '';
|
||||
if ($error['icon'] !== 'pro')
|
||||
{
|
||||
$class .= ' orange';
|
||||
}
|
||||
|
||||
// Add error key (which capability this error corresponds to, i.e. joomla, pro, etc...)
|
||||
$class .= ' ' . $error_key;
|
||||
?>
|
||||
<a href="<?php echo $url; ?>" target="_blank" class="tf-button outline <?php echo $class; ?>"<?php echo $data_atts; ?>>
|
||||
<?php echo ${$error['icon'] . '_svg_icon'}; ?>
|
||||
<span class="short-label"><?php echo $error['label']; ?></span>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
// Show insert button
|
||||
else
|
||||
{
|
||||
?>
|
||||
<a href="#" class="tf-button outline blue tf-library-item-insert-btn" data-template-id="<?php echo $template->id; ?>">
|
||||
<?php
|
||||
echo $insert_svg_icon;
|
||||
echo $loading_svg_icon;
|
||||
echo Text::_('NR_INSERT_TEMPLATE_NOW');
|
||||
?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
29
plugins/system/nrframework/layouts/library/noresults.php
Normal file
29
plugins/system/nrframework/layouts/library/noresults.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
?>
|
||||
<div class="tf-library-no-results">
|
||||
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="41" cy="40" r="36" fill="#D7DBFB"/>
|
||||
<path opacity="0.2" fill-rule="evenodd" clip-rule="evenodd" d="M26.5432 7.02026C39.6252 7.54949 50.0683 18.3222 50.0683 31.534C50.0683 37.5897 47.8743 43.133 44.2379 47.4123L46.3613 49.5357C47.4768 49.0018 48.854 49.1969 49.7782 50.1211L65.7755 66.1184C63.8226 67.9715 61.6621 69.6079 59.3324 70.989L44.1213 55.7779C43.1983 54.8549 43.0025 53.4799 43.5339 52.3652L41.4092 50.2405C37.1304 53.8753 31.5884 56.0682 25.5342 56.0682C17.2197 56.0682 9.87116 51.9322 5.43383 45.6055C5.14824 43.7788 5 41.9067 5 39.9999C5 38.3624 5.10933 36.7505 5.32108 35.1709C7.03793 44.7769 15.4346 52.0682 25.5342 52.0682C36.8749 52.0682 46.0683 42.8748 46.0683 31.534C46.0683 20.1933 36.8749 10.9999 25.5342 10.9999C22.7676 10.9999 20.1289 11.547 17.7202 12.5389C20.3611 10.2979 23.3294 8.43109 26.5432 7.02026Z" fill="#41495B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.4373 43.4401C41.2184 42.659 42.4847 42.659 43.2658 43.4401L57.4079 57.5822C58.189 58.3633 58.189 59.6296 57.4079 60.4106C56.6269 61.1917 55.3605 61.1917 54.5795 60.4106L40.4373 46.2685C39.6563 45.4874 39.6563 44.2211 40.4373 43.4401Z" fill="#41495B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M61.1675 69.8248L44.1209 52.7782C42.9493 51.6066 42.9493 49.7071 44.1209 48.5356L45.5351 47.1214C46.7067 45.9498 48.6061 45.9498 49.7777 47.1214L67.2705 64.6141C65.439 66.5681 63.392 68.3176 61.1675 69.8248Z" fill="#F5CE81"/>
|
||||
<path d="M48.0683 28.5342C48.0683 40.9794 37.9794 51.0683 25.5342 51.0683C13.0889 51.0683 3 40.9794 3 28.5342C3 16.0889 13.0889 6 25.5342 6C37.9794 6 48.0683 16.0889 48.0683 28.5342Z" fill="#F4F5FE"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.5342 8C14.1935 8 5 17.1935 5 28.5342C5 39.8749 14.1935 49.0683 25.5342 49.0683C36.8749 49.0683 46.0683 39.8749 46.0683 28.5342C46.0683 17.1935 36.8749 8 25.5342 8ZM1 28.5342C1 14.9843 11.9843 4 25.5342 4C39.084 4 50.0683 14.9843 50.0683 28.5342C50.0683 42.084 39.084 53.0683 25.5342 53.0683C11.9843 53.0683 1 42.084 1 28.5342Z" fill="#41495B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.5 14C17.4919 14 11 20.4919 11 28.5C11 29.6046 10.1046 30.5 9 30.5C7.89543 30.5 7 29.6046 7 28.5C7 18.2827 15.2827 10 25.5 10C26.6046 10 27.5 10.8954 27.5 12C27.5 13.1046 26.6046 14 25.5 14Z" fill="white"/>
|
||||
</svg>
|
||||
|
||||
<div class="noresults-title"><?php echo Text::_('NR_OOPS_NO_MATCHES_FOUND'); ?></div>
|
||||
</div>
|
||||
17
plugins/system/nrframework/layouts/library/preview.php
Normal file
17
plugins/system/nrframework/layouts/library/preview.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
?>
|
||||
<div class="tf-library-preview">
|
||||
<div class="tf-library-preview-inner"></div>
|
||||
</div>
|
||||
48
plugins/system/nrframework/layouts/library/sidebar.php
Normal file
48
plugins/system/nrframework/layouts/library/sidebar.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
?>
|
||||
<div class="tf-library-sidebar">
|
||||
<!-- Top -->
|
||||
<div class="top">
|
||||
<div class="flex-container align-center align-middle">
|
||||
<div class="tf-library-sidebar-toggle opener" title="<?php echo Text::_('NR_OPEN_SIDEBAR'); ?>">
|
||||
<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<line x1="6.5" y1="2.5" x2="15.5" y2="2.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
<line x1="0.5" y1="2.5" x2="2.5" y2="2.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
<line x1="13.5" y1="7.5" x2="15.5" y2="7.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
<line x1="0.5" y1="7.5" x2="9.5" y2="7.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
<line x1="7.5" y1="12.5" x2="15.5" y2="12.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
<line x1="0.5" y1="12.5" x2="3.5" y2="12.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
<circle cx="4.5" cy="2.5" r="2" stroke="currentColor"/>
|
||||
<circle cx="11.5" cy="7.5" r="2" stroke="currentColor"/>
|
||||
<circle cx="5.5" cy="12.5" r="2" stroke="currentColor"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="on-sidebar-open flex-container align-center align-middle tf-library-sidebar-toggle" title="<?php echo Text::_('NR_CLOSE_SIDEBAR'); ?>">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.14645 7.64645C1.95118 7.84171 1.95118 8.15829 2.14645 8.35355L5.32843 11.5355C5.52369 11.7308 5.84027 11.7308 6.03553 11.5355C6.2308 11.3403 6.2308 11.0237 6.03553 10.8284L3.20711 8L6.03553 5.17157C6.2308 4.97631 6.2308 4.65973 6.03553 4.46447C5.84027 4.2692 5.52369 4.2692 5.32843 4.46447L2.14645 7.64645ZM14.5 8.5C14.7761 8.5 15 8.27614 15 8C15 7.72386 14.7761 7.5 14.5 7.5V8.5ZM2.5 8.5H14.5V7.5H2.5V8.5Z" fill="currentColor"/>
|
||||
<line x1="14.5" y1="3.5" x2="14.5" y2="12.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span class="top-title"><?php echo Text::_('NR_FILTERS'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tf-library-filters-clear-all"><?php echo Text::_('NR_CLEAR_ALL'); ?></a>
|
||||
</div>
|
||||
<!-- /Top -->
|
||||
<!-- Filters -->
|
||||
<div class="tf-library-sidebar-filters"><?php echo Text::_('NR_LOADING_FILTERS'); ?></div>
|
||||
<!-- /Filters -->
|
||||
</div>
|
||||
43
plugins/system/nrframework/layouts/library/tmpl.php
Normal file
43
plugins/system/nrframework/layouts/library/tmpl.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$items_payload = [
|
||||
'create_new_template_link' => $create_new_template_link,
|
||||
'blank_template_label' => $blank_template_label
|
||||
];
|
||||
$footer_payload = [
|
||||
'create_new_template_link' => $create_new_template_link,
|
||||
'project_name' => $project_name
|
||||
];
|
||||
|
||||
$layouts_path = JPATH_PLUGINS . '/system/nrframework/layouts';
|
||||
|
||||
HTMLHelper::_('jquery.framework');
|
||||
?>
|
||||
<div class="tf-library-page<?php echo isset($class) && !empty($class) ? ' ' . $class : ''; ?>" data-preview-url="<?php echo $preview_url; ?>" data-options="<?php echo htmlspecialchars(json_encode($displayData)); ?>">
|
||||
<?php echo LayoutHelper::render('library/sidebar', [], $layouts_path); ?>
|
||||
<div class="tf-library-body">
|
||||
<?php
|
||||
echo LayoutHelper::render('library/toolbar', [], $layouts_path);
|
||||
echo LayoutHelper::render('library/noresults', [], $layouts_path);
|
||||
echo LayoutHelper::render('library/items', $items_payload, $layouts_path);
|
||||
echo LayoutHelper::render('library/footer', $footer_payload, $layouts_path);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
80
plugins/system/nrframework/layouts/library/toolbar.php
Normal file
80
plugins/system/nrframework/layouts/library/toolbar.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
?>
|
||||
<!-- Library Toolbar -->
|
||||
<div class="tf-library-toolbar">
|
||||
<!-- Left -->
|
||||
<div class="toolbar-left">
|
||||
<div class="tf-library-search">
|
||||
<input type="search" id="tf_search_template" data-search="true" placeholder="<?php echo Text::_('NR_SEARCH'); ?>..." name="tf-library-search">
|
||||
<svg class="tf-library-search-icon" width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
|
||||
<path d="M12.207 12.2075L15.9994 15.9999" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Left -->
|
||||
<!-- Right -->
|
||||
<div class="toolbar-right">
|
||||
<a href="#" class="item tf-library-favorite-icon tf-library-view-favorites">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.902 6.62124C14.3943 9.04222 11.0187 11.1197 7.99845 14C4.97819 11.1197 1.60265 9.04223 1.09492 6.62125C0.231957 2.50649 5.47086 -0.0322559 7.99845 4.12617C10.7204 -0.0322523 15.7649 2.50648 14.902 6.62124Z" fill="currentColor" stroke="currentColor" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<?php echo Text::_('NR_MY_FAVORITES'); ?>
|
||||
</a>
|
||||
<div class="item sorting-selector-item">
|
||||
<div class="sort-wrapper">
|
||||
<div class="sorting-selected-label">
|
||||
<span class="selected-label"><?php echo Text::_('NR_TRENDING'); ?></span>
|
||||
<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 1L5.70711 4.29289C5.31658 4.68342 4.68342 4.68342 4.29289 4.29289L1 0.999999" stroke="currentColor" stroke-linecap="round"/></svg>
|
||||
</div>
|
||||
<ul class="sorting-selector-items">
|
||||
<li data-value="featured"><?php echo Text::_('NR_FEATURED'); ?></li>
|
||||
<li data-value="popularity"><?php echo Text::_('NR_POPULAR'); ?></li>
|
||||
<li data-value="trending" class="selected"><?php echo Text::_('NR_TRENDING'); ?></li>
|
||||
<li data-value="date"><?php echo Text::_('NR_NEWEST'); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Right -->
|
||||
</div>
|
||||
<!-- /Library Toolbar -->
|
||||
<!-- Library Selected Filters -->
|
||||
<div class="tf-library-selected-filters-pills-wrapper">
|
||||
<div><?php echo Text::_('NR_SHOWING_RESULTS_FOR'); ?></div>
|
||||
<div class="tf-library-selected-filters-pills"></div>
|
||||
<div class="tf-library-filter-template">
|
||||
<div class="filter" data-filter="">
|
||||
<span class="filter-label"></span>
|
||||
<svg class="tf-library-filter-pill-item-remove" width="14" height="14" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="5" cy="5" r="4.5" stroke="currentColor"/>
|
||||
<rect x="7" y="6.5" width="0.707105" height="4.94973" transform="rotate(135 7 6.5)" fill="currentColor"/>
|
||||
<rect width="0.707105" height="4.94973" transform="matrix(-0.707109 -0.707105 0.707109 -0.707105 3.5 7)" fill="currentColor"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tf-library-filters-clear-all"><?php echo Text::_('NR_CLEAR_ALL'); ?></a>
|
||||
</div>
|
||||
<!-- /Library Selected Filters -->
|
||||
<!-- Library Messages -->
|
||||
<div class="tf-library-messages alert alert-warning is-hidden">
|
||||
<span class="tf-library-messages-text"></span>
|
||||
<button type="button" class="close btn-close tf-library-messages-hide-btn" data-<?php echo defined('nrJ4') ? 'bs-' : ''; ?>>
|
||||
<?php echo !defined('nrJ4') ? '<span aria-hidden="true">×</span>' : ''; ?>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /Library Messages -->
|
||||
35
plugins/system/nrframework/layouts/modals/missing_value.php
Normal file
35
plugins/system/nrframework/layouts/modals/missing_value.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/modals/missing_value.css', ['relative' => true, 'version' => 'auto']);
|
||||
?>
|
||||
<div class="tf-missing-setting-value-modal">
|
||||
<svg width="70" height="70" viewBox="0 0 70 70" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="70" height="70" rx="35" fill="#FFEEEE"/>
|
||||
<mask id="mask0_445_958" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="10" y="10" width="50" height="50">
|
||||
<rect x="10" y="10" width="50" height="50" fill="#D9D9D9"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_445_958)">
|
||||
<path d="M12.0831 53.7495L34.9997 14.1661L57.9164 53.7495H12.0831ZM19.2706 49.5828H50.7289L34.9997 22.4995L19.2706 49.5828ZM34.9997 47.4995C35.59 47.4995 36.0848 47.2998 36.4841 46.9005C36.8834 46.5012 37.0831 46.0064 37.0831 45.4161C37.0831 44.8259 36.8834 44.3311 36.4841 43.9318C36.0848 43.5324 35.59 43.3328 34.9997 43.3328C34.4095 43.3328 33.9147 43.5324 33.5154 43.9318C33.1161 44.3311 32.9164 44.8259 32.9164 45.4161C32.9164 46.0064 33.1161 46.5012 33.5154 46.9005C33.9147 47.2998 34.4095 47.4995 34.9997 47.4995ZM32.9164 41.2495H37.0831V30.8328H32.9164V41.2495Z" fill="#DE1C1C"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<p><?php echo $description; ?></p>
|
||||
|
||||
<a href="<?php echo $link; ?>" target="_blank"><?php echo $link_text; ?></a>
|
||||
</div>
|
||||
50
plugins/system/nrframework/layouts/notices/notice.php
Normal file
50
plugins/system/nrframework/layouts/notices/notice.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="tf-notice<?php echo !empty($class) ? ' ' . $class : ''; ?>" role="alert">
|
||||
<?php if (isset($icon) && !empty($icon)): ?>
|
||||
<svg class="color" xmlns="http://www.w3.org/2000/svg" height="40" width="40" viewBox="0 0 40 40"><?php echo $icon; ?></svg>
|
||||
<?php endif; ?>
|
||||
<div class="content">
|
||||
<div class="title"><?php echo isset($title) ? $title : ''; ?></div>
|
||||
<?php if (isset($description)): ?>
|
||||
<div class="description"><?php echo $description; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($actions): ?>
|
||||
<div class="actions"><?php echo $actions; ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($tooltip): ?>
|
||||
<div class="notice-tooltip-wrapper">
|
||||
<svg class="notice-tooltip-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0_113_8" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
|
||||
<rect width="24" height="24" fill="#D9D9D9"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_113_8)">
|
||||
<path d="M11.95 18C12.3 18 12.596 17.879 12.838 17.637C13.0793 17.3957 13.2 17.1 13.2 16.75C13.2 16.4 13.0793 16.1043 12.838 15.863C12.596 15.621 12.3 15.5 11.95 15.5C11.6 15.5 11.304 15.621 11.062 15.863C10.8207 16.1043 10.7 16.4 10.7 16.75C10.7 17.1 10.8207 17.3957 11.062 17.637C11.304 17.879 11.6 18 11.95 18ZM11.05 14.15H12.9C12.9 13.6 12.9627 13.1667 13.088 12.85C13.2127 12.5333 13.5667 12.1 14.15 11.55C14.5833 11.1167 14.925 10.704 15.175 10.312C15.425 9.92067 15.55 9.45 15.55 8.9C15.55 7.96667 15.2083 7.25 14.525 6.75C13.8417 6.25 13.0333 6 12.1 6C11.15 6 10.3793 6.25 9.788 6.75C9.196 7.25 8.78333 7.85 8.55 8.55L10.2 9.2C10.2833 8.9 10.471 8.575 10.763 8.225C11.0543 7.875 11.5 7.7 12.1 7.7C12.6333 7.7 13.0333 7.84567 13.3 8.137C13.5667 8.429 13.7 8.75 13.7 9.1C13.7 9.43333 13.6 9.74567 13.4 10.037C13.2 10.329 12.95 10.6 12.65 10.85C11.9167 11.5 11.4667 11.9917 11.3 12.325C11.1333 12.6583 11.05 13.2667 11.05 14.15ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" />
|
||||
</g>
|
||||
</svg>
|
||||
<div class="notice-tooltip">
|
||||
<div class="notice-tooltip-arrow"></div>
|
||||
<div class="notice-tooltip-inner"><?php echo $tooltip; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($dismissible): ?>
|
||||
<button type="button" class="close btn-close" data-dismiss="alert" aria-label="Close">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_105_53" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24"><rect width="24" height="24" fill="#D9D9D9"/></mask><g mask="url(#mask0_105_53)"><path d="M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z" /></g></svg>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
29
plugins/system/nrframework/layouts/notices/tmpl.php
Normal file
29
plugins/system/nrframework/layouts/notices/tmpl.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div
|
||||
class="tf-notices"
|
||||
data-ext-element="<?php echo $ext_element; ?>"
|
||||
data-ext-xml="<?php echo $ext_xml; ?>"
|
||||
data-ext-type="<?php echo $ext_type; ?>"
|
||||
data-exclude="<?php echo htmlspecialchars(json_encode($exclude)); ?>"
|
||||
data-root="<?php echo Uri::base(); ?>"
|
||||
data-token="<?php echo Session::getFormToken(); ?>"
|
||||
data-current-url="<?php echo Uri::getInstance()->toString(); ?>"
|
||||
>
|
||||
</div>
|
||||
124
plugins/system/nrframework/layouts/proonlymodal.php
Normal file
124
plugins/system/nrframework/layouts/proonlymodal.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (defined('nrJ4'))
|
||||
{
|
||||
Factory::getDocument()->addScriptDeclaration('
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
let proOnlyEl = document.getElementById("proOnlyModal");
|
||||
proOnlyEl.classList.add("tf-pro-only-modal");
|
||||
|
||||
document.body.appendChild(proOnlyEl);
|
||||
|
||||
const opts = {
|
||||
backdrop: "static",
|
||||
keyboard: false
|
||||
};
|
||||
let proOnlyModal = new bootstrap.Modal(proOnlyEl, opts);
|
||||
|
||||
document.addEventListener("click", function(e) {
|
||||
let elem = e.target.closest("[data-pro-only]");
|
||||
if (!elem) {
|
||||
return;
|
||||
}
|
||||
|
||||
let proFeature = elem.dataset.proOnly;
|
||||
|
||||
if (proFeature === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
if (proFeature) {
|
||||
proOnlyEl.querySelectorAll("em").forEach(function(el) {
|
||||
el.innerHTML = proFeature;
|
||||
});
|
||||
proOnlyEl.querySelector(".po-upgrade").style.display = "none";
|
||||
proOnlyEl.querySelector(".po-feature").style.display = "block";
|
||||
} else {
|
||||
proOnlyEl.querySelector(".po-upgrade").style.display = "block";
|
||||
proOnlyEl.querySelector(".po-feature").style.display = "none";
|
||||
}
|
||||
|
||||
proOnlyModal.show();
|
||||
});
|
||||
});
|
||||
');
|
||||
} else
|
||||
{
|
||||
Factory::getDocument()->addScriptDeclaration('
|
||||
jQuery(function($) {
|
||||
var $proOnlyModal = $("#proOnlyModal");
|
||||
|
||||
// Move to body so it can be accessible by all buttons
|
||||
$proOnlyModal.addClass("tf-pro-only-modal");
|
||||
$proOnlyModal.appendTo("body");
|
||||
|
||||
$(document).on("click", "*[data-pro-only]", function() {
|
||||
event.preventDefault();
|
||||
|
||||
var $el = $(this)
|
||||
feature_name = $el.data("pro-only");
|
||||
|
||||
if (feature_name) {
|
||||
$proOnlyModal.find("em").html(feature_name);
|
||||
$proOnlyModal.find(".po-upgrade").hide().end().find(".po-feature").show();
|
||||
} else {
|
||||
$proOnlyModal.find(".po-feature").hide().end().find(".po-upgrade").show();
|
||||
}
|
||||
|
||||
$proOnlyModal.modal("show");
|
||||
});
|
||||
});
|
||||
');
|
||||
}
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/proonlymodal.css', ['relative' => true, 'version' => 'auto']);
|
||||
?>
|
||||
<div class="pro-only-body text-center">
|
||||
<span class="icon-lock"></span>
|
||||
|
||||
<!-- This is shown when we click on a Pro only feature button -->
|
||||
<div class="po-feature">
|
||||
<h2><?php echo Text::sprintf('NR_PROFEATURE_HEADER', '') ?></h2>
|
||||
<p><?php echo Text::sprintf('NR_PROFEATURE_DESC', '') ?></p>
|
||||
</div>
|
||||
|
||||
<!-- This is shown when click on Upgrade to Pro button -->
|
||||
<div class="po-upgrade">
|
||||
<h2><?php echo Text::_($extension_name) ?> Pro</h2>
|
||||
<p><?php echo Text::sprintf('NR_UPGRADE_TO_PRO_VERSION', Text::_($extension_name)); ?></p>
|
||||
</div>
|
||||
|
||||
<p><a class="btn btn-danger btn-large" href="<?php echo $upgrade_url ?>" target="_blank">
|
||||
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_143_146" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="17" height="17"><rect width="17" height="17" fill="#D9D9D9"></rect></mask><g mask="url(#mask0_143_146)"><path d="M4.25006 5.66655H10.6251V4.24989C10.6251 3.65961 10.4185 3.15787 10.0053 2.74468C9.59207 2.33149 9.09033 2.12489 8.50005 2.12489C7.90978 2.12489 7.40804 2.33149 6.99485 2.74468C6.58165 3.15787 6.37506 3.65961 6.37506 4.24989H4.95839C4.95839 3.27003 5.3037 2.43478 5.99433 1.74416C6.68495 1.05353 7.52019 0.708221 8.50005 0.708221C9.47992 0.708221 10.3152 1.05353 11.0058 1.74416C11.6964 2.43478 12.0417 3.27003 12.0417 4.24989V5.66655H12.7501C13.1396 5.66655 13.4731 5.80527 13.7506 6.0827C14.028 6.36013 14.1667 6.69364 14.1667 7.08322V14.1666C14.1667 14.5561 14.028 14.8896 13.7506 15.1671C13.4731 15.4445 13.1396 15.5832 12.7501 15.5832H4.25006C3.86047 15.5832 3.52697 15.4445 3.24954 15.1671C2.9721 14.8896 2.83339 14.5561 2.83339 14.1666V7.08322C2.83339 6.69364 2.9721 6.36013 3.24954 6.0827C3.52697 5.80527 3.86047 5.66655 4.25006 5.66655ZM4.25006 14.1666H12.7501V7.08322H4.25006V14.1666ZM8.50005 12.0416C8.88964 12.0416 9.22315 11.9028 9.50058 11.6254C9.77801 11.348 9.91672 11.0145 9.91672 10.6249C9.91672 10.2353 9.77801 9.9018 9.50058 9.62437C9.22315 9.34694 8.88964 9.20822 8.50005 9.20822C8.11047 9.20822 7.77696 9.34694 7.49953 9.62437C7.2221 9.9018 7.08339 10.2353 7.08339 10.6249C7.08339 11.0145 7.2221 11.348 7.49953 11.6254C7.77696 11.9028 8.11047 12.0416 8.50005 12.0416Z" fill="white"></path></g></svg>
|
||||
<?php echo Text::_('NR_UPGRADE_TO_PRO') ?>
|
||||
</a></p>
|
||||
<div class="pro-only-bonus">
|
||||
<div class="po-checkmark-icon"></div>
|
||||
<?php echo Text::sprintf('NR_PROFEATURE_DISCOUNT', $extension_name) ?>
|
||||
</div>
|
||||
|
||||
<div class="pro-only-footer">
|
||||
<div><?php echo Text::_('NR_UPDATE_PRE_SALES_QUESTIONS'); ?> <a target="_blank" href="http://www.tassos.gr/contact?topic=Pre-sale Question&extension=<?php echo $extension_name ?>"><?php echo Text::_('NR_ASK_HERE'); ?></a></div>
|
||||
<div><?php echo Text::_('NR_ALREADY_PURCHASED_PRO_LEARN_HOW_TO'); ?> <a target="_blank" href="https://www.tassos.gr/kb/general/how-to-upgrade-an-extension-from-free-to-pro"><?php echo Text::_('NR_UNLOCK_PRO_FEATURES'); ?></a></div>
|
||||
</div>
|
||||
</div>
|
||||
35
plugins/system/nrframework/layouts/responsive_control.php
Normal file
35
plugins/system/nrframework/layouts/responsive_control.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
use Joomla\CMS\Form\FormHelper;
|
||||
|
||||
if (empty($html))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$styles = array_filter([
|
||||
'max-width' => $width
|
||||
]);
|
||||
$styles = array_map(function($k, $v) {
|
||||
return $k . ':' . $v . ';';
|
||||
}, array_keys($styles), $styles);
|
||||
?>
|
||||
<div class="nr-responsive-control<?php echo $class; ?>"<?php echo $styles ? ' style="' . implode('', $styles) . '"' : ''; ?>>
|
||||
<div class="nr-responsive-control--item <?php echo $breakpoint; ?>">
|
||||
<?php echo $html; ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<?php if (!$hide_device_selector): ?>
|
||||
<div class="nr-responsive-control--item--top">
|
||||
<div class="nr-responsive-control--item--top--breakpoint--switcher">
|
||||
<div class="nr-responsive-control--item--top--breakpoint--switcher--toggle" title="<?php echo Text::_('NR_SELECT_DEVICE_TO_SET_VALUES'); ?>">
|
||||
<?php echo $breakpoint['icon']; ?>
|
||||
<svg width="8" height="6" viewBox="0 0 8 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 5.46666L0 1.46666L0.933333 0.533325L4 3.59999L7.06667 0.533325L8 1.46666L4 5.46666Z" fill="currentColor"></path></svg>
|
||||
</div>
|
||||
<div class="nr-responsive-control--item--top--breakpoint--switcher--dropdown">
|
||||
<?php
|
||||
foreach ($breakpoints as $key => $value)
|
||||
{
|
||||
?>
|
||||
<div class="nr-responsive-control--item--top--breakpoint--switcher--dropdown--item<?php echo $key === $device ? ' is-active' : ''; ?>" data-type="<?php echo $key; ?>">
|
||||
<div class="nr-responsive-control--item--top--breakpoint--switcher--dropdown--item--text">
|
||||
<?php echo $value['label']; ?>
|
||||
<div class="nr-responsive-control--item--top--breakpoint--switcher--dropdown--item--text--desc"><?php echo $value['desc']; ?></div>
|
||||
</div>
|
||||
<?php echo $value['icon']; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php echo $html; ?>
|
||||
29
plugins/system/nrframework/layouts/smarttagsbox.php
Normal file
29
plugins/system/nrframework/layouts/smarttagsbox.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="st" id="smarttags">
|
||||
<div class="st_overlay"></div>
|
||||
<div class="st_box">
|
||||
<div class="st_toolbar">
|
||||
<input placeholder="<?php echo Text::_('NR_SMARTTAGS_SEARCH_PLACEHOLDER') ?>" class="st_input_search" type="text"/>
|
||||
</div>
|
||||
<div class="st_container">
|
||||
<div class="st_nav"></div>
|
||||
<div class="st_tabs"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
39
plugins/system/nrframework/layouts/well.php
Normal file
39
plugins/system/nrframework/layouts/well.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
/**
|
||||
* Layout variables
|
||||
* ---------------------
|
||||
* $options : (array) Optional parameters
|
||||
* $label : (string) The html code for the label (not required if $options['hiddenLabel'] is true)
|
||||
* $input : (string) The input field html code
|
||||
*/
|
||||
|
||||
if (!empty($options['showonEnabled']))
|
||||
{
|
||||
HTMLHelper::_('jquery.framework');
|
||||
HTMLHelper::_('script', 'jui/cms.js', ['version' => 'auto', 'relative' => true]);
|
||||
}
|
||||
|
||||
$class = empty($options['class']) ? '' : ' ' . $options['class'];
|
||||
$rel = empty($options['rel']) ? '' : ' ' . $options['rel'];
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($input != '</div>') { ?>
|
||||
<div class="well nr-well <?php echo $class; ?>"<?php echo $rel; ?>>
|
||||
<?php } ?>
|
||||
|
||||
<?php echo $input; ?>
|
||||
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$value || !is_array($value) || !count($value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
foreach (\NRFramework\Widgets\Accordion::getJS() as $path)
|
||||
{
|
||||
HTMLHelper::script($path, ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
foreach (\NRFramework\Widgets\Accordion::getCSS() as $path)
|
||||
{
|
||||
HTMLHelper::stylesheet($path, ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($load_css_vars && !empty($custom_css))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($custom_css);
|
||||
}
|
||||
|
||||
$open_icon = $close_icon = '';
|
||||
if ($show_icon !== 'none')
|
||||
{
|
||||
switch ($icon)
|
||||
{
|
||||
case 'arrow':
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 11.4421L0 1.44217L1.44217 0L10 8.58507L18.5578 0.0271949L20 1.46936L10 11.4421Z" fill="currentColor" /></svg>';
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 9" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 9L2.5 1.13436L3.58162 0L10 6.75274L16.4184 0.0213906L17.5 1.15575L10 9Z" fill="currentColor"/></svg>';
|
||||
break;
|
||||
case 'circle_arrow':
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 13.1012L14.2287 8.87247L13.3705 8.04049L10 11.411L6.62954 8.04049L5.77128 8.87247L10 13.1012ZM10.0018 20C8.62946 20 7.3365 19.7375 6.12288 19.2126C4.90927 18.6877 3.84796 17.971 2.93895 17.0624C2.02994 16.1537 1.31285 15.0929 0.787713 13.8798C0.262571 12.6667 0 11.374 0 10.0018C0 8.61867 0.262457 7.31863 0.787371 6.10165C1.31228 4.88464 2.02904 3.82603 2.93764 2.9258C3.84626 2.02555 4.9071 1.31285 6.12017 0.787713C7.33326 0.262571 8.62595 0 9.99824 0C11.3813 0 12.6814 0.262457 13.8984 0.78737C15.1154 1.31228 16.174 2.02465 17.0742 2.92448C17.9744 3.82433 18.6871 4.88248 19.2123 6.09894C19.7374 7.31538 20 8.61514 20 9.99824C20 11.3705 19.7375 12.6635 19.2126 13.8771C18.6877 15.0907 17.9753 16.152 17.0755 17.061C16.1757 17.9701 15.1175 18.6871 13.9011 19.2123C12.6846 19.7374 11.3849 20 10.0018 20ZM10 18.8057C12.4507 18.8057 14.531 17.9481 16.2409 16.2328C17.9508 14.5176 18.8057 12.44 18.8057 10C18.8057 7.54926 17.9508 5.46895 16.2409 3.75909C14.531 2.04924 12.4507 1.19432 10 1.19432C7.56005 1.19432 5.48244 2.04924 3.76719 3.75909C2.05194 5.46895 1.19432 7.54926 1.19432 10C1.19432 12.44 2.05194 14.5176 3.76719 16.2328C5.48244 17.9481 7.56005 18.8057 10 18.8057Z" fill="currentColor" /></svg>';
|
||||
break;
|
||||
case 'plus_minus':
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.36966 15V8.13034H2.5V6.86966H9.36966V0H10.6303V6.86966H17.5V8.13034H10.6303V15H9.36966Z" fill="currentColor"/></svg>';
|
||||
$close_icon = '<svg width="20" height="20" viewBox="0 0 20 3" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 2.13033V0.869659H18V2.13033H3Z" fill="currentColor"/></svg>';
|
||||
break;
|
||||
case 'circle_plus_minus':
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.46155 15H10.6558V10.6721H15V9.47773H10.6558V5.00001H9.46155V9.47773H5.00001V10.6721H9.46155V15ZM10.0088 20C8.62358 20 7.32624 19.7375 6.11673 19.2126C4.90721 18.6877 3.84796 17.971 2.93895 17.0624C2.02994 16.1537 1.31285 15.0943 0.787713 13.884C0.262571 12.6737 0 11.3753 0 9.9886C0 8.60869 0.262457 7.31163 0.787371 6.09744C1.31228 4.88324 2.02904 3.82603 2.93764 2.9258C3.84626 2.02555 4.90571 1.31285 6.11599 0.787713C7.32627 0.262571 8.62474 0 10.0114 0C11.3913 0 12.6884 0.262457 13.9026 0.78737C15.1168 1.31228 16.174 2.02465 17.0742 2.92448C17.9744 3.82433 18.6871 4.88248 19.2123 6.09894C19.7374 7.31538 20 8.61281 20 9.99124C20 11.3764 19.7375 12.6738 19.2126 13.8833C18.6877 15.0928 17.9753 16.1504 17.0755 17.0562C16.1757 17.962 15.1175 18.679 13.9011 19.2074C12.6846 19.7358 11.3872 20 10.0088 20ZM10.0132 18.8057C12.4551 18.8057 14.531 17.9481 16.2409 16.2328C17.9508 14.5176 18.8057 12.4356 18.8057 9.98684C18.8057 7.54487 17.9524 5.46895 16.2458 3.75909C14.5393 2.04924 12.4573 1.19432 10 1.19432C7.56005 1.19432 5.48244 2.0476 3.76719 3.75417C2.05194 5.46073 1.19432 7.54268 1.19432 10C1.19432 12.44 2.05194 14.5176 3.76719 16.2328C5.48244 17.9481 7.56443 18.8057 10.0132 18.8057Z" fill="currentColor" /></svg>';
|
||||
$close_icon = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.00001 10.5384H15V9.34416H5.00001V10.5384ZM10.0018 20C8.62946 20 7.3365 19.7375 6.12288 19.2126C4.90927 18.6877 3.84796 17.971 2.93895 17.0624C2.02994 16.1537 1.31285 15.0929 0.787713 13.8798C0.262571 12.6667 0 11.374 0 10.0018C0 8.61867 0.262457 7.31863 0.787371 6.10165C1.31228 4.88464 2.02904 3.82603 2.93764 2.9258C3.84626 2.02555 4.9071 1.31285 6.12017 0.787713C7.33326 0.262571 8.62595 0 9.99824 0C11.3813 0 12.6814 0.262457 13.8984 0.78737C15.1154 1.31228 16.174 2.02465 17.0742 2.92448C17.9744 3.82433 18.6871 4.88248 19.2123 6.09894C19.7374 7.31538 20 8.61514 20 9.99824C20 11.3705 19.7375 12.6635 19.2126 13.8771C18.6877 15.0907 17.9753 16.152 17.0755 17.061C16.1757 17.9701 15.1175 18.6871 13.9011 19.2123C12.6846 19.7374 11.3849 20 10.0018 20ZM10 18.8057C12.4507 18.8057 14.531 17.9481 16.2409 16.2328C17.9508 14.5176 18.8057 12.44 18.8057 10C18.8057 7.54926 17.9508 5.46895 16.2409 3.75909C14.531 2.04924 12.4507 1.19432 10 1.19432C7.56005 1.19432 5.48244 2.04924 3.76719 3.75909C2.05194 5.46895 1.19432 7.54926 1.19432 10C1.19432 12.44 2.05194 14.5176 3.76719 16.2328C5.48244 17.9481 7.56005 18.8057 10 18.8057Z" fill="currentColor" /></svg>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget tf-accordion-widget<?php echo $css_class; ?>">
|
||||
<?php
|
||||
foreach ($value as $index => $accordion_item)
|
||||
{
|
||||
$item_atts = '';
|
||||
|
||||
$content_atts = 'style="height: 0px;"';
|
||||
|
||||
if (($initial_state === 'expanded-first' && $index === 0) || $initial_state === 'expanded')
|
||||
{
|
||||
$item_atts = 'data-expanded="true"';
|
||||
$content_atts = '';
|
||||
}
|
||||
?>
|
||||
<div class="tf-accordion-widget--item<?php echo $panel_css_class ? ' ' . $panel_css_class : ''; ?>"<?php echo $item_atts; ?>>
|
||||
<?php if (isset($accordion_item['title'])): ?>
|
||||
<div class="tf-accordion-widget--item--title">
|
||||
<?php echo $show_icon === 'left' ? '<div class="tf-accordion-widget--item--title--actions">' . $open_icon . $close_icon . '</div>' : ''; ?>
|
||||
<div class="tf-accordion-widget--item--title--content"><?php echo $accordion_item['title']; ?></div>
|
||||
<?php echo $show_icon === 'right' ? '<div class="tf-accordion-widget--item--title--actions">' . $open_icon . $close_icon . '</div>' : ''; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($accordion_item['content'])): ?>
|
||||
<div class="tf-accordion-widget--item--content"<?php echo $content_atts; ?>><?php echo $accordion_item['content']; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$options = isset($options) ? $options : $displayData;
|
||||
|
||||
if ($options['load_css_vars'] && !empty($options['custom_css']))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($options['custom_css']);
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget bingmap map-widget<?php echo $options['css_class']; ?>" id="<?php echo $id; ?>" data-options="<?php echo htmlspecialchars(json_encode($options)); ?>">
|
||||
<div class="map-item"></div>
|
||||
</div>
|
||||
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/colorpicker.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/widgets/colorpicker.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration('
|
||||
.nrf-colorpicker-wrapper.' . $id . ' {
|
||||
--input-background-color: ' . $input_bg_color . ';
|
||||
--input-border-color: ' . $input_border_color . ';
|
||||
--input-border-color-focus: ' . $input_border_color_focus . ';
|
||||
--input-text-color: ' . $input_text_color . ';
|
||||
}
|
||||
');
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget nrf-colorpicker-wrapper<?php echo $css_class; ?>">
|
||||
<input type="color"
|
||||
value="<?php echo $value; ?>"
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
disabled
|
||||
<?php endif; ?>
|
||||
<?php if ($aria_label): ?>
|
||||
aria-label="<?php echo htmlspecialchars($aria_label, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<input type="text"
|
||||
id="<?php echo $id; ?>"
|
||||
name="<?php echo $name; ?>"
|
||||
class="<?php echo $input_class; ?>"
|
||||
value="<?php echo $value; ?>"
|
||||
placeholder="<?php echo $placeholder; ?>"
|
||||
<?php if ($required) { ?>
|
||||
required
|
||||
<?php } ?>
|
||||
<?php if ($readonly): ?>
|
||||
readonly
|
||||
<?php endif; ?>
|
||||
/>
|
||||
</div>
|
||||
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if ($countdown_type === 'static' && (empty($value) || $value === '0000-00-00 00:00:00'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
foreach (\NRFramework\Widgets\Countdown::getCSS($theme) as $path)
|
||||
{
|
||||
HTMLHelper::stylesheet($path, ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($load_css_vars && !empty($custom_css))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($custom_css);
|
||||
}
|
||||
|
||||
foreach (\NRFramework\Widgets\Countdown::getJS() as $path)
|
||||
{
|
||||
HTMLHelper::script($path, ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget nrf-countdown<?php echo $css_class; ?>" id="<?php echo $id; ?>" <?php echo $atts; ?>></div>
|
||||
129
plugins/system/nrframework/layouts/widgets/faq/default.php
Normal file
129
plugins/system/nrframework/layouts/widgets/faq/default.php
Normal file
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$value || !is_array($value) || !count($value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
foreach (\NRFramework\Widgets\FAQ::getJS() as $path)
|
||||
{
|
||||
HTMLHelper::script($path, ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
foreach (\NRFramework\Widgets\FAQ::getCSS() as $path)
|
||||
{
|
||||
HTMLHelper::stylesheet($path, ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($load_css_vars && !empty($custom_css))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($custom_css);
|
||||
}
|
||||
|
||||
$open_icon = $close_icon = '';
|
||||
if ($show_toggle_icon)
|
||||
{
|
||||
switch ($icon)
|
||||
{
|
||||
case 'arrow':
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 11.4421L0 1.44217L1.44217 0L10 8.58507L18.5578 0.0271949L20 1.46936L10 11.4421Z" fill="currentColor" /></svg>';
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 9" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 9L2.5 1.13436L3.58162 0L10 6.75274L16.4184 0.0213906L17.5 1.15575L10 9Z" fill="currentColor"/></svg>';
|
||||
break;
|
||||
case 'circle_arrow':
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 13.1012L14.2287 8.87247L13.3705 8.04049L10 11.411L6.62954 8.04049L5.77128 8.87247L10 13.1012ZM10.0018 20C8.62946 20 7.3365 19.7375 6.12288 19.2126C4.90927 18.6877 3.84796 17.971 2.93895 17.0624C2.02994 16.1537 1.31285 15.0929 0.787713 13.8798C0.262571 12.6667 0 11.374 0 10.0018C0 8.61867 0.262457 7.31863 0.787371 6.10165C1.31228 4.88464 2.02904 3.82603 2.93764 2.9258C3.84626 2.02555 4.9071 1.31285 6.12017 0.787713C7.33326 0.262571 8.62595 0 9.99824 0C11.3813 0 12.6814 0.262457 13.8984 0.78737C15.1154 1.31228 16.174 2.02465 17.0742 2.92448C17.9744 3.82433 18.6871 4.88248 19.2123 6.09894C19.7374 7.31538 20 8.61514 20 9.99824C20 11.3705 19.7375 12.6635 19.2126 13.8771C18.6877 15.0907 17.9753 16.152 17.0755 17.061C16.1757 17.9701 15.1175 18.6871 13.9011 19.2123C12.6846 19.7374 11.3849 20 10.0018 20ZM10 18.8057C12.4507 18.8057 14.531 17.9481 16.2409 16.2328C17.9508 14.5176 18.8057 12.44 18.8057 10C18.8057 7.54926 17.9508 5.46895 16.2409 3.75909C14.531 2.04924 12.4507 1.19432 10 1.19432C7.56005 1.19432 5.48244 2.04924 3.76719 3.75909C2.05194 5.46895 1.19432 7.54926 1.19432 10C1.19432 12.44 2.05194 14.5176 3.76719 16.2328C5.48244 17.9481 7.56005 18.8057 10 18.8057Z" fill="currentColor" /></svg>';
|
||||
break;
|
||||
case 'plus_minus':
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.36966 15V8.13034H2.5V6.86966H9.36966V0H10.6303V6.86966H17.5V8.13034H10.6303V15H9.36966Z" fill="currentColor"/></svg>';
|
||||
$close_icon = '<svg width="20" height="20" viewBox="0 0 20 3" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3 2.13033V0.869659H18V2.13033H3Z" fill="currentColor"/></svg>';
|
||||
break;
|
||||
case 'circle_plus_minus':
|
||||
$open_icon = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.46155 15H10.6558V10.6721H15V9.47773H10.6558V5.00001H9.46155V9.47773H5.00001V10.6721H9.46155V15ZM10.0088 20C8.62358 20 7.32624 19.7375 6.11673 19.2126C4.90721 18.6877 3.84796 17.971 2.93895 17.0624C2.02994 16.1537 1.31285 15.0943 0.787713 13.884C0.262571 12.6737 0 11.3753 0 9.9886C0 8.60869 0.262457 7.31163 0.787371 6.09744C1.31228 4.88324 2.02904 3.82603 2.93764 2.9258C3.84626 2.02555 4.90571 1.31285 6.11599 0.787713C7.32627 0.262571 8.62474 0 10.0114 0C11.3913 0 12.6884 0.262457 13.9026 0.78737C15.1168 1.31228 16.174 2.02465 17.0742 2.92448C17.9744 3.82433 18.6871 4.88248 19.2123 6.09894C19.7374 7.31538 20 8.61281 20 9.99124C20 11.3764 19.7375 12.6738 19.2126 13.8833C18.6877 15.0928 17.9753 16.1504 17.0755 17.0562C16.1757 17.962 15.1175 18.679 13.9011 19.2074C12.6846 19.7358 11.3872 20 10.0088 20ZM10.0132 18.8057C12.4551 18.8057 14.531 17.9481 16.2409 16.2328C17.9508 14.5176 18.8057 12.4356 18.8057 9.98684C18.8057 7.54487 17.9524 5.46895 16.2458 3.75909C14.5393 2.04924 12.4573 1.19432 10 1.19432C7.56005 1.19432 5.48244 2.0476 3.76719 3.75417C2.05194 5.46073 1.19432 7.54268 1.19432 10C1.19432 12.44 2.05194 14.5176 3.76719 16.2328C5.48244 17.9481 7.56443 18.8057 10.0132 18.8057Z" fill="currentColor" /></svg>';
|
||||
$close_icon = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.00001 10.5384H15V9.34416H5.00001V10.5384ZM10.0018 20C8.62946 20 7.3365 19.7375 6.12288 19.2126C4.90927 18.6877 3.84796 17.971 2.93895 17.0624C2.02994 16.1537 1.31285 15.0929 0.787713 13.8798C0.262571 12.6667 0 11.374 0 10.0018C0 8.61867 0.262457 7.31863 0.787371 6.10165C1.31228 4.88464 2.02904 3.82603 2.93764 2.9258C3.84626 2.02555 4.9071 1.31285 6.12017 0.787713C7.33326 0.262571 8.62595 0 9.99824 0C11.3813 0 12.6814 0.262457 13.8984 0.78737C15.1154 1.31228 16.174 2.02465 17.0742 2.92448C17.9744 3.82433 18.6871 4.88248 19.2123 6.09894C19.7374 7.31538 20 8.61514 20 9.99824C20 11.3705 19.7375 12.6635 19.2126 13.8771C18.6877 15.0907 17.9753 16.152 17.0755 17.061C16.1757 17.9701 15.1175 18.6871 13.9011 19.2123C12.6846 19.7374 11.3849 20 10.0018 20ZM10 18.8057C12.4507 18.8057 14.531 17.9481 16.2409 16.2328C17.9508 14.5176 18.8057 12.44 18.8057 10C18.8057 7.54926 17.9508 5.46895 16.2409 3.75909C14.531 2.04924 12.4507 1.19432 10 1.19432C7.56005 1.19432 5.48244 2.04924 3.76719 3.75909C2.05194 5.46895 1.19432 7.54926 1.19432 10C1.19432 12.44 2.05194 14.5176 3.76719 16.2328C5.48244 17.9481 7.56005 18.8057 10 18.8057Z" fill="currentColor" /></svg>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$total_items = count($value);
|
||||
$items_per_column = $columns ? ceil($total_items / $columns) : $total_items;
|
||||
$item_index = 0;
|
||||
?>
|
||||
<div class="nrf-widget tf-faq-widget<?php echo $css_class; ?>">
|
||||
<?php
|
||||
for ($i = 0; $i < $columns; $i++)
|
||||
{
|
||||
if ($columns > 1)
|
||||
{
|
||||
?><div class="tf-faq--row"><?php
|
||||
}
|
||||
|
||||
for ($j = 0; $j < $items_per_column; $j++)
|
||||
{
|
||||
if ($item_index >= $total_items)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$faq_item = $value[$item_index];
|
||||
|
||||
$item_atts = '';
|
||||
|
||||
$answer_atts = 'style="height: 0px;"';
|
||||
|
||||
if (($initial_state === 'first-open' && $item_index === 0) || $initial_state === 'all-open')
|
||||
{
|
||||
$item_atts = 'data-open="true"';
|
||||
$answer_atts = '';
|
||||
}
|
||||
?>
|
||||
<div class="tf-faq-widget--item<?php echo $item_css_class ? ' ' . $item_css_class : ''; ?>"<?php echo $item_atts; ?>>
|
||||
<?php if (isset($faq_item['question'])): ?>
|
||||
<div class="tf-faq-widget--item--question">
|
||||
<?php echo $show_toggle_icon && $icon_position === 'left' ? '<div class="tf-faq-widget--item--question--actions">' . $open_icon . $close_icon . '</div>' : ''; ?>
|
||||
<div class="tf-faq-widget--item--question--content"><?php echo $faq_item['question']; ?></div>
|
||||
<?php echo $show_toggle_icon && $icon_position === 'right' ? '<div class="tf-faq-widget--item--question--actions">' . $open_icon . $close_icon . '</div>' : ''; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($faq_item['answer'])): ?>
|
||||
<div class="tf-faq-widget--item--answer"<?php echo $answer_atts; ?>><?php echo $faq_item['answer']; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$item_index++;
|
||||
|
||||
if ($separator && $item_index !== $total_items)
|
||||
{
|
||||
?><hr class="tf-faq-separator" /><?php
|
||||
}
|
||||
}
|
||||
|
||||
if ($columns > 1)
|
||||
{
|
||||
?></div><?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$items || !is_array($items) || !count($items))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/gallery/gallery.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/widgets/gallery.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($style === 'justified')
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/vendor/justified.layout.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/gallery/justified.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars && !empty($custom_css))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($custom_css);
|
||||
}
|
||||
|
||||
// Add global CSS vars
|
||||
$global_css = '.nrf-widget.tf-gallery-wrapper.' . $id . ' {
|
||||
--mobile-tags-default-style: ' . ($tags_mobile === 'show' ? 'flex' : 'none') . ';
|
||||
--mobile-tags-dropdown-style: ' . ($tags_mobile === 'dropdown' ? 'flex' : 'none') . ';
|
||||
}';
|
||||
Factory::getDocument()->addStyleDeclaration($global_css);
|
||||
?>
|
||||
<div class="nrf-widget tf-gallery-wrapper<?php echo $css_class; ?>" <?php echo $atts; ?>>
|
||||
<?php if ($tags_position === 'above'): ?>
|
||||
<?php echo $this->sublayout('tags', $displayData); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="gallery-items<?php echo $gallery_items_css; ?>">
|
||||
<?php
|
||||
foreach ($items as $index => $item)
|
||||
{
|
||||
// If its an invalid image path, show a warning and continue
|
||||
if (isset($item['invalid']) && $show_warnings)
|
||||
{
|
||||
echo '<div><strong>Warning:</strong> ' . sprintf(Text::_('NR_INVALID_IMAGE_PATH'), $item['path']) . '</div>';
|
||||
continue;
|
||||
}
|
||||
|
||||
$item['index'] = $index;
|
||||
$displayData['item'] = $item;
|
||||
echo $this->sublayout('item', $displayData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($tags_position === 'below'): ?>
|
||||
<?php echo $this->sublayout('tags', $displayData); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ($lightbox)
|
||||
{
|
||||
echo $this->sublayout('glightbox', $displayData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/vendor/glightbox.min.css', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/vendor/glightbox.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
use NRFramework\Helpers\Widgets\Gallery as GalleryHelper;
|
||||
?>
|
||||
<figure
|
||||
class="item"
|
||||
<?php echo $tags_position !== 'disabled' && isset($item['tags']) && is_array($item['tags']) && count($item['tags']) ? ' data-tags="' . htmlentities(json_encode($item['tags']), ENT_COMPAT, 'UTF-8') . '"' : ''; ?>
|
||||
>
|
||||
<?php if ($lightbox) { ?>
|
||||
<a href="<?php echo $item['url']; ?>" class="tf-gallery-lightbox-item <?php echo $id; ?>" data-type="image" data-description=".glightbox-desc.<?php echo $id; ?>.desc-<?php echo $item['index']; ?>">
|
||||
<?php } ?>
|
||||
<img<?php echo $style === 'justified' ? '' : ' loading="lazy"'; ?> class="<?php echo $thumb_class ?>" src="<?php echo $item['thumbnail_url']; ?>"<?php echo $item['img_atts']; ?> alt="<?php echo strip_tags($item['alt']); ?>" />
|
||||
<?php if ($lightbox) { ?>
|
||||
</a>
|
||||
<div class="glightbox-desc <?php echo $id . ' desc-' . $item['index']; ?>">
|
||||
<div class="caption"><?php echo nl2br($item['caption']); ?></div>
|
||||
<div class="module"><?php echo !empty($module) ? GalleryHelper::loadModule($module) : ''; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</figure>
|
||||
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$tags)
|
||||
{
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="tf-gallery-tags position-<?php echo $tags_position; ?>">
|
||||
<?php if ($all_tags_item_label): ?>
|
||||
<a href="#" class="tf-gallery-tags--item active" data-tag="*">
|
||||
<?php echo $all_tags_item_label; ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($tags as $tag): ?>
|
||||
<a href="#" class="tf-gallery-tags--item" data-tag="<?php echo $tag; ?>">
|
||||
<?php echo $tag; ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($tags_mobile === 'dropdown'): ?>
|
||||
<select class="tf-gallery-tags tf-gallery-tags-dropdown position-<?php echo $tags_position; ?>">
|
||||
<option value="" disabled><?php echo Text::_('NR_FILTER_BY_TAG'); ?></option>
|
||||
<?php if ($all_tags_item_label): ?>
|
||||
<option class="tf-gallery-tags--item active" value="*">
|
||||
<?php echo $all_tags_item_label; ?>
|
||||
</option>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($tags as $tag): ?>
|
||||
<option class="tf-gallery-tags--item" value="<?php echo $tag; ?>">
|
||||
<?php echo $tag; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
@ -0,0 +1,326 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
if (!$item_id && $context === 'module')
|
||||
{
|
||||
echo Text::_('NR_GALLERY_MANAGER_PLEASE_SAVE_ITEM_FIRST');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$disabled)
|
||||
{
|
||||
HTMLHelper::_('bootstrap.modal');
|
||||
|
||||
if (strpos($css_class, 'ordering-default') !== false)
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/vendor/sortable.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
// Required in the front-end for the media manager to work
|
||||
if (!defined('nrJ4'))
|
||||
{
|
||||
HTMLHelper::_('behavior.modal');
|
||||
// Front-end editing: The below script is required for front-end media library selection to work as its missing from parent window when called
|
||||
if (Factory::getApplication()->isClient('site'))
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
function jInsertFieldValue(value, id) {
|
||||
var old_id = document.id(id).value;
|
||||
if (old_id != id) {
|
||||
var elem = document.id(id)
|
||||
elem.value = value;
|
||||
elem.fireEvent("change");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle');
|
||||
|
||||
$doc = Factory::getApplication()->getDocument();
|
||||
$doc->addScriptOptions('media-picker', [
|
||||
'images' => array_map(
|
||||
'trim',
|
||||
explode(
|
||||
',',
|
||||
ComponentHelper::getParams('com_media')->get(
|
||||
'image_extensions',
|
||||
'bmp,gif,jpg,jpeg,png'
|
||||
)
|
||||
)
|
||||
)
|
||||
]);
|
||||
|
||||
$wam = $doc->getWebAssetManager();
|
||||
$wam->useScript('webcomponent.media-select');
|
||||
|
||||
Text::script('JFIELD_MEDIA_LAZY_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_CHECK_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_CHECK_DESC_LABEL');
|
||||
Text::script('JFIELD_MEDIA_CLASS_LABEL');
|
||||
Text::script('JFIELD_MEDIA_FIGURE_CLASS_LABEL');
|
||||
Text::script('JFIELD_MEDIA_FIGURE_CAPTION_LABEL');
|
||||
Text::script('JFIELD_MEDIA_LAZY_LABEL');
|
||||
Text::script('JFIELD_MEDIA_SUMMARY_LABEL');
|
||||
}
|
||||
}
|
||||
|
||||
// Use admin gallery manager path if browsing via backend
|
||||
$gallery_manager_path = Factory::getApplication()->isClient('administrator') ? 'administrator/' : '';
|
||||
|
||||
// Javascript files should always load as they are used to populate the Gallery Manager via Dropzone
|
||||
HTMLHelper::script('plg_system_nrframework/dropzone.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/gallery/manager_init.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/gallery/manager.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/widgets/gallerymanager.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
$tags = isset($tags) ? $tags : [];
|
||||
|
||||
$ai_icon = '<svg width="24" height="22" viewBox="0 0 24 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.7471 8.7502C20.687 8.11795 18.3098 5.71543 17.6775 2.65536C17.6523 2.50362 17.5258 2.40247 17.3488 2.40247C17.197 2.40247 17.0706 2.50362 17.02 2.65536C16.3878 5.71543 13.9852 8.11795 10.9505 8.7502C10.7987 8.77549 10.6976 8.90194 10.6976 9.07897C10.6976 9.2307 10.7987 9.35715 10.9505 9.40773C14.0105 10.04 16.3878 12.4425 17.02 15.4773C17.0453 15.629 17.1718 15.7302 17.3488 15.7302C17.5005 15.7302 17.627 15.629 17.6775 15.4773C18.3098 12.4172 20.7123 10.04 23.7471 9.40773C23.8988 9.38244 24 9.25599 24 9.07897C24 8.90194 23.8988 8.77549 23.7471 8.7502Z" fill="currentColor"/><path d="M13.5554 15.882C11.1022 15.3762 9.18022 13.4542 8.67443 10.9758C8.64914 10.8493 8.54798 10.7734 8.42153 10.7734C8.29508 10.7734 8.19392 10.8493 8.16863 10.9758C7.66284 13.4542 5.74081 15.3762 3.28771 15.882C3.16126 15.9073 3.08539 16.0084 3.08539 16.1349C3.08539 16.2613 3.16126 16.3625 3.28771 16.3878C5.74081 16.8936 7.66284 18.8156 8.16863 21.2687C8.19392 21.3951 8.29508 21.471 8.42153 21.471C8.54798 21.471 8.64914 21.3951 8.67443 21.2687C9.18022 18.8156 11.1022 16.8936 13.5554 16.3878C13.6818 16.3625 13.7577 16.2613 13.7577 16.1349C13.7577 16.0084 13.6818 15.9073 13.5554 15.882Z" fill="currentColor"/><path d="M4.83035 10.0906C4.88093 10.2424 5.00737 10.3435 5.15911 10.3435C5.31085 10.3435 5.46259 10.2424 5.48788 10.0906C6.01897 7.83983 7.83983 6.04426 10.0653 5.51317C10.2171 5.46259 10.3182 5.33614 10.3182 5.1844C10.3182 5.03266 10.2171 4.88093 10.0653 4.85564C7.78925 4.29926 6.01897 2.52898 5.48788 0.252898C5.46259 0.101159 5.31085 0 5.15911 0C5.00737 0 4.85564 0.101159 4.83035 0.252898C4.27397 2.52898 2.52898 4.29926 0.252898 4.85564C0.101159 4.90622 0 5.03266 0 5.1844C0 5.33614 0.101159 5.48788 0.252898 5.51317C2.4784 6.04426 4.27397 7.83983 4.83035 10.0906Z" fill="currentColor"/></svg>';
|
||||
?>
|
||||
<!-- Gallery Manager -->
|
||||
<div
|
||||
class="nrf-widget tf-gallery-manager<?php echo $css_class; ?>"
|
||||
data-context="<?php echo $context; ?>"
|
||||
data-field-id="<?php echo $field_id; ?>"
|
||||
data-item-id="<?php echo $item_id; ?>"
|
||||
data-widget="<?php echo $widget; ?>"
|
||||
>
|
||||
<?php if ($required) { ?>
|
||||
<!-- Make Joomla client-side form validator happy by adding a fake hidden input field when the Gallery is required. -->
|
||||
<input type="hidden" required class="required" id="<?php echo $id; ?>"/>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="tf-gallery-actions">
|
||||
<div class="btn-group tf-gallery-actions-dropdown<?php echo !defined('nrJ4') ? ' dropdown' : ''; ?> " title="<?php echo Text::_('NR_GALLERY_MANAGER_SELECT_UNSELECT_IMAGES'); ?>">
|
||||
<button class="btn btn-secondary add tf-gallery-actions-dropdown-current tf-gallery-actions-dropdown-action select" onclick="return false;"><i class="me-2 icon-checkbox-unchecked"></i></button>
|
||||
<button class="btn btn-secondary add dropdown-toggle dropdown-toggle-split" data-<?php echo defined('nrJ4') ? 'bs-' : ''; ?>toggle="dropdown" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_DROPDOWN'); ?>">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" class="dropdown-item tf-gallery-actions-dropdown-action select"><?php echo Text::_('NR_GALLERY_MANAGER_SELECT_ALL_ITEMS'); ?></a></li>
|
||||
<li><a href="#" class="dropdown-item tf-gallery-actions-dropdown-action unselect is-hidden"><?php echo Text::_('NR_GALLERY_MANAGER_UNSELECT_ALL_ITEMS'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="tf-gallery-regenerate-images-button icon-button" title="<?php echo Text::_('NR_GALLERY_MANAGER_REGENERATE_IMAGES_TITLE'); ?>">
|
||||
<i class="icon-refresh"></i>
|
||||
<div class="message"></div>
|
||||
</a>
|
||||
<a class="tf-gallery-remove-selected-items-button icon-button" title="<?php echo Text::_('NR_GALLERY_MANAGER_REMOVE_SELECTED_IMAGES'); ?>">
|
||||
<i class="icon-trash"></i>
|
||||
</a>
|
||||
<?php if (!$openai_api_key): ?>
|
||||
<a title="<?php echo Text::_('NR_GENERATE_IMAGE_DESCRIPTION_USING_AI') ?>" class="btn-visible-on-editing button-icon" data-toggle="modal" data-target="#tf-GalleryMissingValue-<?php echo $id; ?>" data-bs-toggle="modal" data-bs-target="#tf-GalleryMissingValue-<?php echo $id; ?>">
|
||||
<?php echo $ai_icon; ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="#" class="btn-visible-on-editing button-icon tf-gallery-ai-apply-all-button" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESC_TO_ALL_IMAGES'); ?>">
|
||||
<?php echo $ai_icon; ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="btn-group add-button<?php echo !defined('nrJ4') ? ' dropdown' : ''; ?>">
|
||||
<button class="btn btn-success add tf-gallery-add-item-button" onclick="return false;" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_IMAGES'); ?>"><i class="me-2 icon-pictures"></i><?php echo Text::_('NR_GALLERY_MANAGER_ADD_IMAGES'); ?></button>
|
||||
<button class="btn btn-success add dropdown-toggle dropdown-toggle-split" data-<?php echo defined('nrJ4') ? 'bs-' : ''; ?>toggle="dropdown" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_DROPDOWN'); ?>">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a <?php echo !defined('nrJ4') ? 'rel="{handler: \'iframe\', size: {x: 1000, y: 750}}" href="' . Uri::root() . $gallery_manager_path . '?option=com_media&view=images&tmpl=component&fieldid=' . $id . '_uploaded_file"' : 'href="#" data-bs-toggle="modal" data-bs-target="#tf-GalleryMediaManager-' . $id . '"'; ?> class="dropdown-item tf-gallery-browse-item-button<?php echo !defined('nrJ4') ? ' modal' : ''; ?> popup" title="<?php echo Text::_('NR_GALLERY_MANAGER_BROWSE_MEDIA_LIBRARY'); ?>"><i class="me-2 icon-folder-open"></i><?php echo Text::_('NR_GALLERY_MANAGER_BROWSE_MEDIA_LIBRARY'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="tf-gallery-ai-status"><?php echo Text::_('NR_GENERATED_IMAGE_DESCRIPTIONS'); ?></span>
|
||||
<input type="hidden" class="media_uploader_file" id="<?php echo $id; ?>_uploaded_file" />
|
||||
</div>
|
||||
<!-- /Actions -->
|
||||
|
||||
<!-- Dropzone -->
|
||||
<div
|
||||
data-inputname="<?php echo $name; ?>"
|
||||
data-maxfilesize="<?php echo $max_file_size; ?>"
|
||||
data-maxfiles="<?php echo $limit_files; ?>"
|
||||
data-acceptedfiles="<?php echo $allowed_file_types; ?>"
|
||||
data-value='<?php echo $gallery_items ? json_encode($gallery_items, JSON_HEX_APOS) : ''; ?>'
|
||||
data-baseurl="<?php echo Uri::base(); ?>"
|
||||
data-rooturl="<?php echo Uri::root(); ?>"
|
||||
class="tf-gallery-dz">
|
||||
<!-- DZ Message Wrapper -->
|
||||
<div class="dz-message">
|
||||
<!-- Message -->
|
||||
<div class="dz-message-center">
|
||||
<span class="text"><?php echo Text::_('NR_GALLERY_MANAGER_DRAG_AND_DROP_TEXT'); ?></span>
|
||||
<span class="browse"><?php echo Text::_('NR_GALLERY_MANAGER_BROWSE'); ?></span>
|
||||
</div>
|
||||
<!-- /Message -->
|
||||
</div>
|
||||
<!-- /DZ Message Wrapper -->
|
||||
</div>
|
||||
<!-- /Dropzone -->
|
||||
|
||||
<!-- Dropzone Preview Template -->
|
||||
<template class="previewTemplate">
|
||||
<div class="tf-gallery-preview-item template" data-item-id="">
|
||||
<div class="checkmark-edited-icon"><?php echo Text::_('NR_UPDATED'); ?></div>
|
||||
<div class="select-item-checkbox" title="<?php echo Text::_('NR_GALLERY_MANAGER_CHECK_TO_DELETE_ITEMS'); ?>">
|
||||
<input type="checkbox" id="<?php echo $name; ?>[select-item]" />
|
||||
<label for="<?php echo $name; ?>[select-item]">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_279_439" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="#D9D9D9"/></mask><g mask="url(#mask0_279_439)"><path d="M8.83342 13.8333L14.7084 7.95829L13.5417 6.79163L8.83342 11.5L6.45841 9.12496L5.29175 10.2916L8.83342 13.8333ZM10.0001 18.3333C8.8473 18.3333 7.76397 18.1145 6.75008 17.677C5.73619 17.2395 4.85425 16.6458 4.10425 15.8958C3.35425 15.1458 2.7605 14.2638 2.323 13.25C1.8855 12.2361 1.66675 11.1527 1.66675 9.99996C1.66675 8.84718 1.8855 7.76385 2.323 6.74996C2.7605 5.73607 3.35425 4.85413 4.10425 4.10413C4.85425 3.35413 5.73619 2.76038 6.75008 2.32288C7.76397 1.88538 8.8473 1.66663 10.0001 1.66663C11.1529 1.66663 12.2362 1.88538 13.2501 2.32288C14.264 2.76038 15.1459 3.35413 15.8959 4.10413C16.6459 4.85413 17.2397 5.73607 17.6772 6.74996C18.1147 7.76385 18.3334 8.84718 18.3334 9.99996C18.3334 11.1527 18.1147 12.2361 17.6772 13.25C17.2397 14.2638 16.6459 15.1458 15.8959 15.8958C15.1459 16.6458 14.264 17.2395 13.2501 17.677C12.2362 18.1145 11.1529 18.3333 10.0001 18.3333ZM10.0001 16.6666C11.8612 16.6666 13.4376 16.0208 14.7292 14.7291C16.0209 13.4375 16.6667 11.8611 16.6667 9.99996C16.6667 8.13885 16.0209 6.56246 14.7292 5.27079C13.4376 3.97913 11.8612 3.33329 10.0001 3.33329C8.13897 3.33329 6.56258 3.97913 5.27091 5.27079C3.97925 6.56246 3.33341 8.13885 3.33341 9.99996C3.33341 11.8611 3.97925 13.4375 5.27091 14.7291C6.56258 16.0208 8.13897 16.6666 10.0001 16.6666Z" fill="currentColor"/></g></svg>
|
||||
</label>
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--actions">
|
||||
<a href="#" class="tf-gallery-preview-edit-item" title="<?php echo Text::_('NR_GALLERY_MANAGER_CLICK_TO_EDIT_ITEM'); ?>" data-toggle="modal" data-target="#tf-GalleryEditItem-<?php echo $id; ?>" data-bs-toggle="modal" data-bs-target="#tf-GalleryEditItem-<?php echo $id; ?>"><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_279_182" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="#D9D9D9"/></mask><g mask="url(#mask0_279_182)"><path d="M4.16667 15.8333H5.35417L13.5 7.6875L12.3125 6.5L4.16667 14.6458V15.8333ZM2.5 17.5V13.9583L13.5 2.97917C13.6667 2.82639 13.8507 2.70833 14.0521 2.625C14.2535 2.54167 14.4653 2.5 14.6875 2.5C14.9097 2.5 15.125 2.54167 15.3333 2.625C15.5417 2.70833 15.7222 2.83333 15.875 3L17.0208 4.16667C17.1875 4.31944 17.309 4.5 17.3854 4.70833C17.4618 4.91667 17.5 5.125 17.5 5.33333C17.5 5.55556 17.4618 5.76736 17.3854 5.96875C17.309 6.17014 17.1875 6.35417 17.0208 6.52083L6.04167 17.5H2.5ZM12.8958 7.10417L12.3125 6.5L13.5 7.6875L12.8958 7.10417Z" fill="currentColor"/></g></svg></a>
|
||||
<a href="#" class="tf-gallery-preview-remove-item" title="<?php echo Text::_('NR_GALLERY_MANAGER_CLICK_TO_DELETE_ITEM'); ?>" data-dz-remove><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_279_185" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="#D9D9D9"/></mask><g mask="url(#mask0_279_185)"><path d="M5.83301 17.5C5.37467 17.5 4.98231 17.3368 4.65592 17.0104C4.32954 16.684 4.16634 16.2917 4.16634 15.8333V5H3.33301V3.33333H7.49967V2.5H12.4997V3.33333H16.6663V5H15.833V15.8333C15.833 16.2917 15.6698 16.684 15.3434 17.0104C15.017 17.3368 14.6247 17.5 14.1663 17.5H5.83301ZM14.1663 5H5.83301V15.8333H14.1663V5ZM7.49967 14.1667H9.16634V6.66667H7.49967V14.1667ZM10.833 14.1667H12.4997V6.66667H10.833V14.1667Z" fill="currentColor"/></g></svg></a>
|
||||
</div>
|
||||
<div class="dz-status"></div>
|
||||
<div class="dz-thumb">
|
||||
<div class="tf-gallery-preview-item--temp-label" title="<?php echo Text::_('NR_GALLERY_TEMPORARY_IMAGE_TITLE'); ?>"><?php echo Text::_('NR_TEMPORARY'); ?></div>
|
||||
<div class="dz-progress"><span class="text"><?php echo Text::_('NR_GALLERY_MANAGER_UPLOADING'); ?></span><span class="dz-upload" data-dz-uploadprogress></span></div>
|
||||
<div class="tf-gallery-preview-in-queue"><?php echo Text::_('NR_GALLERY_MANAGER_IN_QUEUE'); ?></div>
|
||||
<img data-dz-thumbnail />
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--alt">
|
||||
<?php if ($pro): ?>
|
||||
<div class="tf-gallery-preview-item--alt--existing"></div>
|
||||
<?php endif; ?>
|
||||
<div class="tf-gallery-preview-item--alt--fields">
|
||||
<textarea name="<?php echo $name; ?>[alt]" class="item-alt" placeholder="<?php echo Text::_('NR_GALLERY_MANAGER_IMAGE_DESCRIPTION_HINT'); ?>" title="<?php echo Text::_('NR_GALLERY_MANAGER_ALT_HINT'); ?>" rows="2"></textarea>
|
||||
<?php if (!$pro): ?>
|
||||
<div class="tf-gallery-ai-button" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESCRIPTION_USING_AI') ?>">
|
||||
<span data-pro-only="<?php echo Text::_('NR_AI_IMAGE_DESCRIPTION_GENERATION') ?>"><?php echo $ai_icon; ?></span>
|
||||
</div>
|
||||
<?php elseif (!$openai_api_key): ?>
|
||||
<div class="tf-gallery-ai-button" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESCRIPTION_USING_AI') ?>" data-toggle="modal" data-target="#tf-GalleryMissingValue-<?php echo $id; ?>" data-bs-toggle="modal" data-bs-target="#tf-GalleryMissingValue-<?php echo $id; ?>">
|
||||
<?php echo $ai_icon; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="tf-gallery-ai-button tf-gallery-preview-generate-caption-item" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESCRIPTION_USING_AI') ?>">
|
||||
<svg class="loading-state" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#e8eaed"><path d="M480-96q-78.72 0-148.8-30.24-70.08-30.24-122.4-82.56-52.32-52.32-82.56-122.4Q96-401.28 96-480q0-79.68 30.22-149.28 30.21-69.6 82.49-121.92 52.28-52.32 122.3-82.56Q401.04-864 479.69-864 496-864 506-854t10 25.51q0 15.51-10 26T480-792q-129.67 0-220.84 90.5Q168-611 168-480.5T259.16-259q91.17 91 220.84 91 131 0 221.5-91.16Q792-350.33 792-480q0-16 10.49-26t26-10Q844-516 854-506q10 10 10 26.31 0 78.65-30.24 148.68-30.24 70.02-82.56 122.3-52.32 52.28-121.92 82.49Q559.68-96 480-96Z" fill="currentColor" /></svg>
|
||||
<?php echo $ai_icon; ?>
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--alt--choices">
|
||||
<div class="tf-gallery-preview-item--alt--choices--item tf-gallery-preview-generate-caption-item-accept">
|
||||
<svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.95837 11L0.208374 6.24996L1.39587 5.06246L4.95837 8.62496L12.6042 0.979126L13.7917 2.16663L4.95837 11Z" fill="currentColor"/></svg>
|
||||
Accept
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--alt--choices--item tf-gallery-preview-generate-caption-item-discard">
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.33335 11.8333L0.166687 10.6666L4.83335 5.99996L0.166687 1.33329L1.33335 0.166626L6.00002 4.83329L10.6667 0.166626L11.8334 1.33329L7.16669 5.99996L11.8334 10.6666L10.6667 11.8333L6.00002 7.16663L1.33335 11.8333Z" fill="currentColor"/></svg>
|
||||
Discard
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--alt--choices--item tf-gallery-preview-generate-caption-item">
|
||||
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.8333 11.8333V8.49996C13.8333 7.80552 13.5903 7.21524 13.1042 6.72913C12.6181 6.24302 12.0278 5.99996 11.3333 5.99996H3.6875L6.6875 8.99996L5.5 10.1666L0.5 5.16663L5.5 0.166626L6.6875 1.33329L3.6875 4.33329H11.3333C12.4861 4.33329 13.4688 4.73954 14.2812 5.55204C15.0938 6.36454 15.5 7.34718 15.5 8.49996V11.8333H13.8333Z" fill="currentColor"/></svg>
|
||||
Try again
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tf-gallery-preview-error"><div data-dz-errormessage></div></div>
|
||||
<input type="hidden" value="" class="item-source" name="<?php echo $name; ?>[source]" />
|
||||
<input type="hidden" value="" class="item-original" name="<?php echo $name; ?>[image]" />
|
||||
<input type="hidden" value="" class="item-thumbnail" name="<?php echo $name; ?>[thumbnail]" />
|
||||
<input type="hidden" value="" class="item-caption" name="<?php echo $name; ?>[caption]" />
|
||||
<input type="hidden" value="" class="item-tags" name="<?php echo $name; ?>[tags]" />
|
||||
</div>
|
||||
</template>
|
||||
<!-- /Dropzone Preview Template -->
|
||||
|
||||
<?php
|
||||
if (!$disabled)
|
||||
{
|
||||
// Add the modal that appears when the user hasn't added an OpenAI API key
|
||||
if (!$openai_api_key)
|
||||
{
|
||||
$opts = [
|
||||
'title' => 'Missing OpenAI API Key',
|
||||
'height' => '100%',
|
||||
'width' => '100%',
|
||||
'backdrop' => 'static'
|
||||
];
|
||||
|
||||
$content = LayoutHelper::render('missing_value', [
|
||||
'description' => Text::_('NR_AI_MISSING_KEY_MODAL_DESC'),
|
||||
'link' => 'https://www.tassos.gr/kb/general/ai-features-joomla',
|
||||
'link_text' => Text::_('NR_WHERE_CAN_I_FIND_MY_OPENAI_API_KEY')
|
||||
], implode(DIRECTORY_SEPARATOR, [JPATH_PLUGINS, 'system', 'nrframework', 'layouts', 'modals']));
|
||||
|
||||
echo HTMLHelper::_('bootstrap.renderModal', 'tf-GalleryMissingValue-' . $id, $opts, $content);
|
||||
}
|
||||
|
||||
// Print Joomla 4 Media Manager modal only if Gallery is not disabled
|
||||
if (defined('nrJ4'))
|
||||
{
|
||||
$opts = [
|
||||
'title' => Text::_('NR_GALLERY_MANAGER_SELECT_ITEM'),
|
||||
'url' => Route::_(Uri::root() . $gallery_manager_path . '?option=com_media&view=media&tmpl=component'),
|
||||
'height' => '400px',
|
||||
'width' => '800px',
|
||||
'bodyHeight' => 80,
|
||||
'modalWidth' => 80,
|
||||
'backdrop' => 'static',
|
||||
'footer' => '<button type="button" class="btn btn-primary tf-gallery-button-save-selected" data-bs-dismiss="modal">' . Text::_('JSELECT') . '</button>' . '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('JCANCEL') . '</button>',
|
||||
'isJoomla' => true
|
||||
];
|
||||
HTMLHelper::_('bootstrap.modal', '#tf-GalleryMediaManager-' . $id, $opts);
|
||||
|
||||
$layoutData = [
|
||||
'selector' => 'tf-GalleryMediaManager-' . $id,
|
||||
'params' => $opts,
|
||||
'body' => ''
|
||||
];
|
||||
|
||||
echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $layoutData);
|
||||
}
|
||||
|
||||
if (!$readonly)
|
||||
{
|
||||
// Print Edit Modal
|
||||
$opts = [
|
||||
'title' => Text::_('NR_GALLERY_MANAGER_EDIT_ITEM'),
|
||||
'height' => '100%',
|
||||
'width' => '100%',
|
||||
'backdrop' => 'static',
|
||||
'footer' => '<button type="button" class="btn btn-primary tf-gallery-button-save-edited-item" data-bs-dismiss="modal" data-dismiss="modal">' . Text::_('NR_SAVE') . '</button>' .
|
||||
'<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" data-dismiss="modal">' . Text::_('JCANCEL') . '</button>'
|
||||
];
|
||||
|
||||
$content = LayoutHelper::render('edit', [
|
||||
'tags' => $tags
|
||||
], __DIR__);
|
||||
|
||||
echo HTMLHelper::_('bootstrap.renderModal', 'tf-GalleryEditItem-' . $id, $opts, $content);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<!-- /Gallery Manager -->
|
||||
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="tf-gallery-manager-edit-modal-content">
|
||||
<div class="tf-gallery-manager-edit-modal-content--preview"></div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form">
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item">
|
||||
<label class="tf-gallery-manager-edit-modal-content--form--item--label"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_ALT_FIELD_LABEL'); ?></label>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--content">
|
||||
<input type="text" name="alt" class="tf-gallery-manager-edit-modal-content--form--item--content--input form-control" value="" />
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--help"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_ALT_FIELD_DESC'); ?></div>
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item">
|
||||
<label class="tf-gallery-manager-edit-modal-content--form--item--label"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_POPUP_DESC_FIELD_LABEL'); ?></label>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--content">
|
||||
<textarea name="caption" class="tf-gallery-manager-edit-modal-content--form--item--content--input form-control" rows="3"></textarea>
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--help"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_POPUP_DESC_FIELD_DESC'); ?></div>
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--help divider"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_SMART_TAGS_DESC'); ?></div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item">
|
||||
<label class="tf-gallery-manager-edit-modal-content--form--item--label"><?php echo Text::_('NR_TAGS'); ?></label>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--content">
|
||||
<?php
|
||||
include_once JPATH_PLUGINS . '/system/nrframework/fields/tftagscontrol.php';
|
||||
|
||||
$_field = new \JFormFieldTFTagsControl;
|
||||
|
||||
$element = new \SimpleXMLElement('
|
||||
<field
|
||||
name="tags"
|
||||
type="TFTagsControl"
|
||||
allowCustom="false"
|
||||
multiple="true"
|
||||
/>
|
||||
');
|
||||
|
||||
$_field->setup($element, $tags);
|
||||
|
||||
echo $_field->__get('input');
|
||||
?>
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--help"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_TAGS_FIELD_DESC'); ?></div>
|
||||
</div>
|
||||
<input type="hidden" class="item_id" />
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,320 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
if (!$disabled)
|
||||
{
|
||||
HTMLHelper::_('bootstrap.modal');
|
||||
|
||||
if (strpos($css_class, 'ordering-default') !== false)
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/vendor/sortable.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
// Required in the front-end for the media manager to work
|
||||
if (!defined('nrJ4'))
|
||||
{
|
||||
HTMLHelper::_('behavior.modal');
|
||||
// Front-end editing: The below script is required for front-end media library selection to work as its missing from parent window when called
|
||||
if (Factory::getApplication()->isClient('site'))
|
||||
{
|
||||
?>
|
||||
<script>
|
||||
function jInsertFieldValue(value, id) {
|
||||
var old_id = document.id(id).value;
|
||||
if (old_id != id) {
|
||||
var elem = document.id(id)
|
||||
elem.value = value;
|
||||
elem.fireEvent("change");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle');
|
||||
|
||||
$doc = Factory::getApplication()->getDocument();
|
||||
$doc->addScriptOptions('media-picker', [
|
||||
'images' => array_map(
|
||||
'trim',
|
||||
explode(
|
||||
',',
|
||||
ComponentHelper::getParams('com_media')->get(
|
||||
'image_extensions',
|
||||
'bmp,gif,jpg,jpeg,png'
|
||||
)
|
||||
)
|
||||
)
|
||||
]);
|
||||
|
||||
$wam = $doc->getWebAssetManager();
|
||||
$wam->useScript('webcomponent.media-select');
|
||||
|
||||
Text::script('JFIELD_MEDIA_LAZY_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_CHECK_LABEL');
|
||||
Text::script('JFIELD_MEDIA_ALT_CHECK_DESC_LABEL');
|
||||
Text::script('JFIELD_MEDIA_CLASS_LABEL');
|
||||
Text::script('JFIELD_MEDIA_FIGURE_CLASS_LABEL');
|
||||
Text::script('JFIELD_MEDIA_FIGURE_CAPTION_LABEL');
|
||||
Text::script('JFIELD_MEDIA_LAZY_LABEL');
|
||||
Text::script('JFIELD_MEDIA_SUMMARY_LABEL');
|
||||
}
|
||||
}
|
||||
|
||||
// Use admin gallery manager path if browsing via backend
|
||||
$gallery_manager_path = Factory::getApplication()->isClient('administrator') ? 'administrator/' : '';
|
||||
|
||||
// Javascript files should always load as they are used to populate the Gallery Manager via Dropzone
|
||||
HTMLHelper::script('plg_system_nrframework/dropzone.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/gallery/manager_init.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/gallery/manager.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/widgets/gallerymanager.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
$tags = isset($tags) ? $tags : [];
|
||||
|
||||
$ai_icon = '<svg width="24" height="22" viewBox="0 0 24 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.7471 8.7502C20.687 8.11795 18.3098 5.71543 17.6775 2.65536C17.6523 2.50362 17.5258 2.40247 17.3488 2.40247C17.197 2.40247 17.0706 2.50362 17.02 2.65536C16.3878 5.71543 13.9852 8.11795 10.9505 8.7502C10.7987 8.77549 10.6976 8.90194 10.6976 9.07897C10.6976 9.2307 10.7987 9.35715 10.9505 9.40773C14.0105 10.04 16.3878 12.4425 17.02 15.4773C17.0453 15.629 17.1718 15.7302 17.3488 15.7302C17.5005 15.7302 17.627 15.629 17.6775 15.4773C18.3098 12.4172 20.7123 10.04 23.7471 9.40773C23.8988 9.38244 24 9.25599 24 9.07897C24 8.90194 23.8988 8.77549 23.7471 8.7502Z" fill="currentColor"/><path d="M13.5554 15.882C11.1022 15.3762 9.18022 13.4542 8.67443 10.9758C8.64914 10.8493 8.54798 10.7734 8.42153 10.7734C8.29508 10.7734 8.19392 10.8493 8.16863 10.9758C7.66284 13.4542 5.74081 15.3762 3.28771 15.882C3.16126 15.9073 3.08539 16.0084 3.08539 16.1349C3.08539 16.2613 3.16126 16.3625 3.28771 16.3878C5.74081 16.8936 7.66284 18.8156 8.16863 21.2687C8.19392 21.3951 8.29508 21.471 8.42153 21.471C8.54798 21.471 8.64914 21.3951 8.67443 21.2687C9.18022 18.8156 11.1022 16.8936 13.5554 16.3878C13.6818 16.3625 13.7577 16.2613 13.7577 16.1349C13.7577 16.0084 13.6818 15.9073 13.5554 15.882Z" fill="currentColor"/><path d="M4.83035 10.0906C4.88093 10.2424 5.00737 10.3435 5.15911 10.3435C5.31085 10.3435 5.46259 10.2424 5.48788 10.0906C6.01897 7.83983 7.83983 6.04426 10.0653 5.51317C10.2171 5.46259 10.3182 5.33614 10.3182 5.1844C10.3182 5.03266 10.2171 4.88093 10.0653 4.85564C7.78925 4.29926 6.01897 2.52898 5.48788 0.252898C5.46259 0.101159 5.31085 0 5.15911 0C5.00737 0 4.85564 0.101159 4.83035 0.252898C4.27397 2.52898 2.52898 4.29926 0.252898 4.85564C0.101159 4.90622 0 5.03266 0 5.1844C0 5.33614 0.101159 5.48788 0.252898 5.51317C2.4784 6.04426 4.27397 7.83983 4.83035 10.0906Z" fill="currentColor"/></svg>';
|
||||
?>
|
||||
<!-- Gallery Manager -->
|
||||
<div
|
||||
class="nrf-widget tf-gallery-manager<?php echo $css_class; ?>"
|
||||
data-context="<?php echo $context; ?>"
|
||||
data-field-id="<?php echo $field_id; ?>"
|
||||
data-item-id="<?php echo $item_id; ?>"
|
||||
data-widget="<?php echo $widget; ?>"
|
||||
>
|
||||
<?php if ($required) { ?>
|
||||
<!-- Make Joomla client-side form validator happy by adding a fake hidden input field when the Gallery is required. -->
|
||||
<input type="hidden" required class="required" id="<?php echo $id; ?>"/>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="tf-gallery-actions">
|
||||
<div class="btn-group tf-gallery-actions-dropdown<?php echo !defined('nrJ4') ? ' dropdown' : ''; ?> " title="<?php echo Text::_('NR_GALLERY_MANAGER_SELECT_UNSELECT_IMAGES'); ?>">
|
||||
<button class="btn btn-secondary add tf-gallery-actions-dropdown-current tf-gallery-actions-dropdown-action select" onclick="return false;"><i class="me-2 icon-checkbox-unchecked"></i></button>
|
||||
<button class="btn btn-secondary add dropdown-toggle dropdown-toggle-split" data-<?php echo defined('nrJ4') ? 'bs-' : ''; ?>toggle="dropdown" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_DROPDOWN'); ?>">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" class="dropdown-item tf-gallery-actions-dropdown-action select"><?php echo Text::_('NR_GALLERY_MANAGER_SELECT_ALL_ITEMS'); ?></a></li>
|
||||
<li><a href="#" class="dropdown-item tf-gallery-actions-dropdown-action unselect is-hidden"><?php echo Text::_('NR_GALLERY_MANAGER_UNSELECT_ALL_ITEMS'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="tf-gallery-remove-selected-items-button icon-button" title="<?php echo Text::_('NR_GALLERY_MANAGER_REMOVE_SELECTED_IMAGES'); ?>">
|
||||
<i class="icon-trash"></i>
|
||||
</a>
|
||||
<?php if (!$pro): ?>
|
||||
<a href="#" class="btn-visible-on-editing button-icon" data-pro-only="<?php echo Text::_('NR_AI_IMAGE_DESCRIPTION_GENERATION') ?>" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESC_TO_ALL_IMAGES'); ?>">
|
||||
<?php echo $ai_icon; ?>
|
||||
</a>
|
||||
<?php elseif (!$openai_api_key): ?>
|
||||
<a title="<?php echo Text::_('NR_GENERATE_IMAGE_DESCRIPTION_USING_AI') ?>" class="btn-visible-on-editing button-icon" data-toggle="modal" data-target="#tf-GalleryMissingValue-<?php echo $id; ?>" data-bs-toggle="modal" data-bs-target="#tf-GalleryMissingValue-<?php echo $id; ?>">
|
||||
<?php echo $ai_icon; ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="#" class="btn-visible-on-editing button-icon tf-gallery-ai-apply-all-button" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESC_TO_ALL_IMAGES'); ?>">
|
||||
<?php echo $ai_icon; ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="btn-group add-button<?php echo !defined('nrJ4') ? ' dropdown' : ''; ?>">
|
||||
<button class="btn btn-success add tf-gallery-add-item-button" onclick="return false;" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_IMAGES'); ?>"><i class="me-2 icon-pictures"></i><?php echo Text::_('NR_GALLERY_MANAGER_ADD_IMAGES'); ?></button>
|
||||
<button class="btn btn-success add dropdown-toggle dropdown-toggle-split" data-<?php echo defined('nrJ4') ? 'bs-' : ''; ?>toggle="dropdown" title="<?php echo Text::_('NR_GALLERY_MANAGER_ADD_DROPDOWN'); ?>">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a <?php echo !defined('nrJ4') ? 'rel="{handler: \'iframe\', size: {x: 1000, y: 750}}" href="' . Uri::root() . $gallery_manager_path . '?option=com_media&view=images&tmpl=component&fieldid=' . $id . '_uploaded_file"' : 'href="#" data-bs-toggle="modal" data-bs-target="#tf-GalleryMediaManager-' . $id . '"'; ?> class="dropdown-item tf-gallery-browse-item-button<?php echo !defined('nrJ4') ? ' modal' : ''; ?> popup" title="<?php echo Text::_('NR_GALLERY_MANAGER_BROWSE_MEDIA_LIBRARY'); ?>"><i class="me-2 icon-folder-open"></i><?php echo Text::_('NR_GALLERY_MANAGER_BROWSE_MEDIA_LIBRARY'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span class="tf-gallery-ai-status"><?php echo Text::_('NR_GENERATED_IMAGE_DESCRIPTIONS'); ?></span>
|
||||
<input type="hidden" class="media_uploader_file" id="<?php echo $id; ?>_uploaded_file" />
|
||||
</div>
|
||||
<!-- /Actions -->
|
||||
|
||||
<!-- Dropzone -->
|
||||
<div
|
||||
data-inputname="<?php echo $name; ?>"
|
||||
data-maxfilesize="<?php echo $max_file_size; ?>"
|
||||
data-maxfiles="<?php echo $limit_files; ?>"
|
||||
data-acceptedfiles="<?php echo $allowed_file_types; ?>"
|
||||
data-value='<?php echo $value ? json_encode($value, JSON_HEX_APOS) : ''; ?>'
|
||||
data-baseurl="<?php echo Uri::base(); ?>"
|
||||
data-rooturl="<?php echo Uri::root(); ?>"
|
||||
class="tf-gallery-dz">
|
||||
<!-- DZ Message Wrapper -->
|
||||
<div class="dz-message">
|
||||
<!-- Message -->
|
||||
<div class="dz-message-center">
|
||||
<span class="text"><?php echo Text::_('NR_GALLERY_MANAGER_DRAG_AND_DROP_TEXT'); ?></span>
|
||||
<span class="browse"><?php echo Text::_('NR_GALLERY_MANAGER_BROWSE'); ?></span>
|
||||
</div>
|
||||
<!-- /Message -->
|
||||
</div>
|
||||
<!-- /DZ Message Wrapper -->
|
||||
</div>
|
||||
<!-- /Dropzone -->
|
||||
|
||||
<!-- Dropzone Preview Template -->
|
||||
<template class="previewTemplate">
|
||||
<div class="tf-gallery-preview-item template" data-item-id="">
|
||||
<div class="checkmark-edited-icon"><?php echo Text::_('NR_UPDATED'); ?></div>
|
||||
<div class="select-item-checkbox" title="<?php echo Text::_('NR_GALLERY_MANAGER_CHECK_TO_DELETE_ITEMS'); ?>">
|
||||
<input type="checkbox" id="<?php echo $name; ?>[select-item]" />
|
||||
<label for="<?php echo $name; ?>[select-item]">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_279_439" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="#D9D9D9"/></mask><g mask="url(#mask0_279_439)"><path d="M8.83342 13.8333L14.7084 7.95829L13.5417 6.79163L8.83342 11.5L6.45841 9.12496L5.29175 10.2916L8.83342 13.8333ZM10.0001 18.3333C8.8473 18.3333 7.76397 18.1145 6.75008 17.677C5.73619 17.2395 4.85425 16.6458 4.10425 15.8958C3.35425 15.1458 2.7605 14.2638 2.323 13.25C1.8855 12.2361 1.66675 11.1527 1.66675 9.99996C1.66675 8.84718 1.8855 7.76385 2.323 6.74996C2.7605 5.73607 3.35425 4.85413 4.10425 4.10413C4.85425 3.35413 5.73619 2.76038 6.75008 2.32288C7.76397 1.88538 8.8473 1.66663 10.0001 1.66663C11.1529 1.66663 12.2362 1.88538 13.2501 2.32288C14.264 2.76038 15.1459 3.35413 15.8959 4.10413C16.6459 4.85413 17.2397 5.73607 17.6772 6.74996C18.1147 7.76385 18.3334 8.84718 18.3334 9.99996C18.3334 11.1527 18.1147 12.2361 17.6772 13.25C17.2397 14.2638 16.6459 15.1458 15.8959 15.8958C15.1459 16.6458 14.264 17.2395 13.2501 17.677C12.2362 18.1145 11.1529 18.3333 10.0001 18.3333ZM10.0001 16.6666C11.8612 16.6666 13.4376 16.0208 14.7292 14.7291C16.0209 13.4375 16.6667 11.8611 16.6667 9.99996C16.6667 8.13885 16.0209 6.56246 14.7292 5.27079C13.4376 3.97913 11.8612 3.33329 10.0001 3.33329C8.13897 3.33329 6.56258 3.97913 5.27091 5.27079C3.97925 6.56246 3.33341 8.13885 3.33341 9.99996C3.33341 11.8611 3.97925 13.4375 5.27091 14.7291C6.56258 16.0208 8.13897 16.6666 10.0001 16.6666Z" fill="currentColor"/></g></svg>
|
||||
</label>
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--actions">
|
||||
<a href="#" class="tf-gallery-preview-edit-item" title="<?php echo Text::_('NR_GALLERY_MANAGER_CLICK_TO_EDIT_ITEM'); ?>" data-toggle="modal" data-target="#tf-GalleryEditItem-<?php echo $id; ?>" data-bs-toggle="modal" data-bs-target="#tf-GalleryEditItem-<?php echo $id; ?>"><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_279_182" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="#D9D9D9"/></mask><g mask="url(#mask0_279_182)"><path d="M4.16667 15.8333H5.35417L13.5 7.6875L12.3125 6.5L4.16667 14.6458V15.8333ZM2.5 17.5V13.9583L13.5 2.97917C13.6667 2.82639 13.8507 2.70833 14.0521 2.625C14.2535 2.54167 14.4653 2.5 14.6875 2.5C14.9097 2.5 15.125 2.54167 15.3333 2.625C15.5417 2.70833 15.7222 2.83333 15.875 3L17.0208 4.16667C17.1875 4.31944 17.309 4.5 17.3854 4.70833C17.4618 4.91667 17.5 5.125 17.5 5.33333C17.5 5.55556 17.4618 5.76736 17.3854 5.96875C17.309 6.17014 17.1875 6.35417 17.0208 6.52083L6.04167 17.5H2.5ZM12.8958 7.10417L12.3125 6.5L13.5 7.6875L12.8958 7.10417Z" fill="currentColor"/></g></svg></a>
|
||||
<a href="#" class="tf-gallery-preview-remove-item" title="<?php echo Text::_('NR_GALLERY_MANAGER_CLICK_TO_DELETE_ITEM'); ?>" data-dz-remove><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask0_279_185" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"><rect width="20" height="20" fill="#D9D9D9"/></mask><g mask="url(#mask0_279_185)"><path d="M5.83301 17.5C5.37467 17.5 4.98231 17.3368 4.65592 17.0104C4.32954 16.684 4.16634 16.2917 4.16634 15.8333V5H3.33301V3.33333H7.49967V2.5H12.4997V3.33333H16.6663V5H15.833V15.8333C15.833 16.2917 15.6698 16.684 15.3434 17.0104C15.017 17.3368 14.6247 17.5 14.1663 17.5H5.83301ZM14.1663 5H5.83301V15.8333H14.1663V5ZM7.49967 14.1667H9.16634V6.66667H7.49967V14.1667ZM10.833 14.1667H12.4997V6.66667H10.833V14.1667Z" fill="currentColor"/></g></svg></a>
|
||||
</div>
|
||||
<div class="dz-status"></div>
|
||||
<div class="dz-thumb">
|
||||
<div class="tf-gallery-preview-item--temp-label" title="<?php echo Text::_('NR_GALLERY_TEMPORARY_IMAGE_TITLE'); ?>"><?php echo Text::_('NR_TEMPORARY'); ?></div>
|
||||
<div class="dz-progress"><span class="text"><?php echo Text::_('NR_GALLERY_MANAGER_UPLOADING'); ?></span><span class="dz-upload" data-dz-uploadprogress></span></div>
|
||||
<div class="tf-gallery-preview-in-queue"><?php echo Text::_('NR_GALLERY_MANAGER_IN_QUEUE'); ?></div>
|
||||
<img data-dz-thumbnail />
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--alt">
|
||||
<div class="tf-gallery-preview-item--alt--existing"></div>
|
||||
<div class="tf-gallery-preview-item--alt--fields">
|
||||
<textarea name="<?php echo $name; ?>[alt]" class="item-alt" placeholder="<?php echo Text::_('NR_GALLERY_MANAGER_IMAGE_DESCRIPTION_HINT'); ?>" title="<?php echo Text::_('NR_GALLERY_MANAGER_ALT_HINT'); ?>" rows="2"></textarea>
|
||||
<?php if (!$pro): ?>
|
||||
<div class="tf-gallery-ai-button" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESCRIPTION_USING_AI') ?>">
|
||||
<span data-pro-only="<?php echo Text::_('NR_AI_IMAGE_DESCRIPTION_GENERATION') ?>"><?php echo $ai_icon; ?></span>
|
||||
</div>
|
||||
<?php elseif (!$openai_api_key): ?>
|
||||
<div class="tf-gallery-ai-button" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESCRIPTION_USING_AI') ?>" data-toggle="modal" data-target="#tf-GalleryMissingValue-<?php echo $id; ?>" data-bs-toggle="modal" data-bs-target="#tf-GalleryMissingValue-<?php echo $id; ?>">
|
||||
<?php echo $ai_icon; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="tf-gallery-ai-button tf-gallery-preview-generate-caption-item" title="<?php echo Text::_('NR_GENERATE_IMAGE_DESCRIPTION_USING_AI') ?>">
|
||||
<?php if ($pro): ?>
|
||||
<svg class="loading-state" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="#e8eaed"><path d="M480-96q-78.72 0-148.8-30.24-70.08-30.24-122.4-82.56-52.32-52.32-82.56-122.4Q96-401.28 96-480q0-79.68 30.22-149.28 30.21-69.6 82.49-121.92 52.28-52.32 122.3-82.56Q401.04-864 479.69-864 496-864 506-854t10 25.51q0 15.51-10 26T480-792q-129.67 0-220.84 90.5Q168-611 168-480.5T259.16-259q91.17 91 220.84 91 131 0 221.5-91.16Q792-350.33 792-480q0-16 10.49-26t26-10Q844-516 854-506q10 10 10 26.31 0 78.65-30.24 148.68-30.24 70.02-82.56 122.3-52.32 52.28-121.92 82.49Q559.68-96 480-96Z" fill="currentColor" /></svg>
|
||||
<?php endif; ?>
|
||||
<?php echo $ai_icon; ?>
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--alt--choices">
|
||||
<div class="tf-gallery-preview-item--alt--choices--item tf-gallery-preview-generate-caption-item-accept">
|
||||
<svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.95837 11L0.208374 6.24996L1.39587 5.06246L4.95837 8.62496L12.6042 0.979126L13.7917 2.16663L4.95837 11Z" fill="currentColor"/></svg>
|
||||
Accept
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--alt--choices--item tf-gallery-preview-generate-caption-item-discard">
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.33335 11.8333L0.166687 10.6666L4.83335 5.99996L0.166687 1.33329L1.33335 0.166626L6.00002 4.83329L10.6667 0.166626L11.8334 1.33329L7.16669 5.99996L11.8334 10.6666L10.6667 11.8333L6.00002 7.16663L1.33335 11.8333Z" fill="currentColor"/></svg>
|
||||
Discard
|
||||
</div>
|
||||
<div class="tf-gallery-preview-item--alt--choices--item tf-gallery-preview-generate-caption-item">
|
||||
<svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.8333 11.8333V8.49996C13.8333 7.80552 13.5903 7.21524 13.1042 6.72913C12.6181 6.24302 12.0278 5.99996 11.3333 5.99996H3.6875L6.6875 8.99996L5.5 10.1666L0.5 5.16663L5.5 0.166626L6.6875 1.33329L3.6875 4.33329H11.3333C12.4861 4.33329 13.4688 4.73954 14.2812 5.55204C15.0938 6.36454 15.5 7.34718 15.5 8.49996V11.8333H13.8333Z" fill="currentColor"/></svg>
|
||||
Try again
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tf-gallery-preview-error"><div data-dz-errormessage></div></div>
|
||||
<input type="hidden" value="" class="item-source" name="<?php echo $name; ?>[source]" />
|
||||
<input type="hidden" value="" class="item-slideshow" name="<?php echo $name; ?>[slideshow]" />
|
||||
<input type="hidden" value="" class="item-original" name="<?php echo $name; ?>[image]" />
|
||||
<input type="hidden" value="" class="item-thumbnail" name="<?php echo $name; ?>[thumbnail]" />
|
||||
<input type="hidden" value="" class="item-caption" name="<?php echo $name; ?>[caption]" />
|
||||
<input type="hidden" value="" class="item-tags" name="<?php echo $name; ?>[tags]" />
|
||||
</div>
|
||||
</template>
|
||||
<!-- /Dropzone Preview Template -->
|
||||
|
||||
<?php
|
||||
if (!$disabled)
|
||||
{
|
||||
// Add the modal that appears when the user hasn't added an OpenAI API key
|
||||
if (!$openai_api_key)
|
||||
{
|
||||
$opts = [
|
||||
'title' => 'Missing OpenAI API Key',
|
||||
'height' => '100%',
|
||||
'width' => '100%',
|
||||
'backdrop' => 'static'
|
||||
];
|
||||
|
||||
$content = LayoutHelper::render('missing_value', [
|
||||
'description' => Text::_('NR_AI_MISSING_KEY_MODAL_DESC'),
|
||||
'link' => 'https://www.tassos.gr/kb/general/ai-features-joomla',
|
||||
'link_text' => Text::_('NR_WHERE_CAN_I_FIND_MY_OPENAI_API_KEY')
|
||||
], implode(DIRECTORY_SEPARATOR, [JPATH_PLUGINS, 'system', 'nrframework', 'layouts', 'modals']));
|
||||
|
||||
echo HTMLHelper::_('bootstrap.renderModal', 'tf-GalleryMissingValue-' . $id, $opts, $content);
|
||||
}
|
||||
|
||||
// Print Joomla 4 Media Manager modal only if Gallery is not disabled
|
||||
if (defined('nrJ4'))
|
||||
{
|
||||
$opts = [
|
||||
'title' => Text::_('NR_GALLERY_MANAGER_SELECT_ITEM'),
|
||||
'height' => '400px',
|
||||
'width' => '800px',
|
||||
'bodyHeight' => 80,
|
||||
'modalWidth' => 80,
|
||||
'backdrop' => 'static',
|
||||
'footer' => '<button type="button" class="btn btn-primary tf-gallery-button-save-selected" data-bs-dismiss="modal">' . Text::_('JSELECT') . '</button>' . '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('JCANCEL') . '</button>',
|
||||
'isJoomla' => true
|
||||
];
|
||||
HTMLHelper::_('bootstrap.modal', '#tf-GalleryMediaManager-' . $id, $opts);
|
||||
|
||||
$layoutData = [
|
||||
'selector' => 'tf-GalleryMediaManager-' . $id,
|
||||
'params' => $opts,
|
||||
'body' => LayoutHelper::render('media_library', ['gallery_manager_path' => $gallery_manager_path], __DIR__)
|
||||
];
|
||||
|
||||
echo LayoutHelper::render('libraries.html.bootstrap.modal.main', $layoutData);
|
||||
}
|
||||
|
||||
if (!$readonly)
|
||||
{
|
||||
// Print Edit Modal
|
||||
$opts = [
|
||||
'title' => Text::_('NR_GALLERY_MANAGER_EDIT_ITEM'),
|
||||
'height' => '100%',
|
||||
'width' => '100%',
|
||||
'backdrop' => 'static',
|
||||
'footer' => '<button type="button" class="btn btn-primary tf-gallery-button-save-edited-item" data-bs-dismiss="modal" data-dismiss="modal">' . Text::_('NR_SAVE') . '</button>' .
|
||||
'<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" data-dismiss="modal">' . Text::_('JCANCEL') . '</button>'
|
||||
];
|
||||
|
||||
$content = LayoutHelper::render('edit', [
|
||||
'tags' => $tags
|
||||
], __DIR__);
|
||||
|
||||
echo HTMLHelper::_('bootstrap.renderModal', 'tf-GalleryEditItem-' . $id, $opts, $content);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<!-- /Gallery Manager -->
|
||||
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="tf-gallery-manager-edit-modal-content">
|
||||
<div class="tf-gallery-manager-edit-modal-content--preview"></div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form">
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item">
|
||||
<label class="tf-gallery-manager-edit-modal-content--form--item--label"><?php echo Text::_('NR_IMAGE_DESCRIPTION'); ?></label>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--content">
|
||||
<input type="text" name="alt" class="tf-gallery-manager-edit-modal-content--form--item--content--input form-control" value="" />
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--help"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_ALT_FIELD_DESC'); ?></div>
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item">
|
||||
<label class="tf-gallery-manager-edit-modal-content--form--item--label"><?php echo Text::_('NR_LIGHTBOX_DESCRIPTION'); ?></label>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--content">
|
||||
<textarea name="caption" class="tf-gallery-manager-edit-modal-content--form--item--content--input form-control" rows="3"></textarea>
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--help"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_POPUP_DESC_FIELD_DESC'); ?></div>
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--help divider"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_SMART_TAGS_DESC'); ?></div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item">
|
||||
<label class="tf-gallery-manager-edit-modal-content--form--item--label"><?php echo Text::_('NR_TAGS'); ?></label>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--content">
|
||||
<?php
|
||||
include_once JPATH_PLUGINS . '/system/nrframework/fields/tftagscontrol.php';
|
||||
|
||||
$_field = new \JFormFieldTFTagsControl;
|
||||
|
||||
$element = new \SimpleXMLElement('
|
||||
<field
|
||||
name="tags"
|
||||
type="TFTagsControl"
|
||||
allowCustom="false"
|
||||
multiple="true"
|
||||
/>
|
||||
');
|
||||
|
||||
$_field->setup($element, $tags);
|
||||
|
||||
echo $_field->__get('input');
|
||||
?>
|
||||
</div>
|
||||
<div class="tf-gallery-manager-edit-modal-content--form--item--help"><?php echo Text::_('NR_GALLERY_MANAGER_EDIT_TAGS_FIELD_DESC'); ?></div>
|
||||
</div>
|
||||
<input type="hidden" class="item_id" />
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
extract($displayData);
|
||||
?>
|
||||
<div class="tf-gallery-media-library-top-note">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 -960 960 960" fill="currentColor"><path d="M454-298h52v-230h-52v230Zm25.79-290.46q11.94 0 20.23-8.08 8.29-8.08 8.29-20.02t-8.08-20.23q-8.08-8.28-20.02-8.28T459.98-637q-8.29 8.08-8.29 20.02t8.08 20.23q8.08 8.29 20.02 8.29Zm.55 472.46q-75.11 0-141.48-28.42-66.37-28.42-116.18-78.21-49.81-49.79-78.25-116.09Q116-405.01 116-480.39q0-75.38 28.42-141.25t78.21-115.68q49.79-49.81 116.09-78.25Q405.01-844 480.39-844q75.38 0 141.25 28.42t115.68 78.21q49.81 49.79 78.25 115.85Q844-555.45 844-480.34q0 75.11-28.42 141.48-28.42 66.37-78.21 116.18-49.79 49.81-115.85 78.25Q555.45-116 480.34-116Zm-.34-52q130 0 221-91t91-221q0-130-91-221t-221-91q-130 0-221 91t-91 221q0 130 91 221t221 91Zm0-312Z"/></svg>
|
||||
<?php echo Text::_('NR_GALLERY_MANAGER_MEDIA_TOP_NOTE'); ?>
|
||||
</div>
|
||||
<iframe class="iframe" src="<?php echo Uri::root() . $gallery_manager_path; ?>?option=com_media&view=media&tmpl=component" name="Select Gallery Item"></iframe>
|
||||
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$options = isset($options) ? $options : $displayData;
|
||||
|
||||
if ($options['load_css_vars'] && !empty($options['custom_css']))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($options['custom_css']);
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget googlemap map-widget<?php echo $options['css_class']; ?>" id="<?php echo $id; ?>" data-options="<?php echo htmlspecialchars(json_encode($options)); ?>">
|
||||
<div class="map-item"></div>
|
||||
</div>
|
||||
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
// Skip if all address details are empty
|
||||
if (empty(array_filter($address)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$address_details_html = null;
|
||||
|
||||
switch ($layout_type)
|
||||
{
|
||||
// Default Layout
|
||||
case 'default':
|
||||
$address_details_html = \NRFramework\Helpers\Widgets\MapAddress::getDefaultAddressDetailsLayout($address, $showAddressDetails);
|
||||
break;
|
||||
|
||||
// Custom Layout
|
||||
case 'custom':
|
||||
if (!empty(trim($custom_layout)))
|
||||
{
|
||||
$st = new \NRFramework\SmartTags();
|
||||
$st->add($address, 'address.');
|
||||
|
||||
// Add labels
|
||||
foreach ($address as $key => $value)
|
||||
{
|
||||
$st->add([$key . '.label' => Text::_('NR_' . strtoupper($key))], 'address.');
|
||||
}
|
||||
|
||||
// Add map
|
||||
if ($map)
|
||||
{
|
||||
$st->add(['address.map' => $map]);
|
||||
}
|
||||
|
||||
$address_details_html = nl2br(\Joomla\CMS\HTML\HTMLHelper::_('content.prepare', $st->replace($custom_layout)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!$address_details_html)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
echo $map_location === 'above' ? $map_html . $address_details_html : $address_details_html . $map_html;
|
||||
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$mapWrapperClass = '';
|
||||
if (!$map)
|
||||
{
|
||||
$mapWrapperClass .= ' no-map';
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget tf-mapaddress-editor<?php echo $css_class; ?>">
|
||||
<?php if ($required) { ?>
|
||||
<!-- Make Joomla client-side form validator happy by adding a fake hidden input field when the Gallery is required. -->
|
||||
<input type="hidden" required class="required" id="<?php echo $id; ?>"/>
|
||||
<?php } ?>
|
||||
|
||||
<div class="tf-mapaddress-map-wrapper<?php echo $mapWrapperClass; ?>">
|
||||
<?php echo $map; ?>
|
||||
</div>
|
||||
<div class="tf-mapaddress-field-location-details">
|
||||
<?php
|
||||
foreach ($showAddressDetails as $key => $show)
|
||||
{
|
||||
if ($key === 'address')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$lang_key = 'NR_' . strtoupper($key);
|
||||
$placeholder = $lang_key;
|
||||
|
||||
if ($key === 'address')
|
||||
{
|
||||
$placeholder .= '_ADDRESS_HINT';
|
||||
}
|
||||
|
||||
$input_type = $show ? 'text' : 'hidden';
|
||||
$visibility_class = $show ? 'visible' : 'hidden';
|
||||
?>
|
||||
<div class="control-group stack <?php echo $key; ?> is-<?php echo $visibility_class; ?>">
|
||||
<div class="control-label"><label for="<?php echo $id ?>-field-address-field-<?php echo $key ?>"><?php echo Text::_($lang_key); ?></label></div>
|
||||
<div class="controls">
|
||||
<input
|
||||
type="<?php echo $input_type; ?>"
|
||||
id="<?php echo $id; ?>-field-address-field-<?php echo $key ?>"
|
||||
class="form-control w-100 tf-mapaddress-field-<?php echo $key ?>"
|
||||
name="<?php echo $name; ?>[address][<?php echo $key; ?>]"
|
||||
placeholder="<?php echo Text::_($placeholder); ?>"
|
||||
value="<?php echo isset($address[$key]) ? $address[$key] : ''; ?>"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Form\Form;
|
||||
|
||||
$form_source = new SimpleXMLElement('
|
||||
<form>
|
||||
<fieldset name="add_marker_modal">
|
||||
<field name="address" type="TFAddressLookup"
|
||||
label="NR_LOCATION_ADDRESS"
|
||||
group_class="mb-0"
|
||||
class="tf-marker-repeater-address span12 full-width w-100"
|
||||
/>
|
||||
<field name="latitude" type="hidden"
|
||||
class="tf-marker-repeater-latitude"
|
||||
/>
|
||||
<field name="longitude" type="hidden"
|
||||
class="tf-marker-repeater-longitude"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
||||
');
|
||||
|
||||
$form = Form::getInstance($options['name'] . '[add_marker]', $form_source->asXML(), ['control' => $options['name'] . '[add_marker]']);
|
||||
|
||||
echo HTMLHelper::_('bootstrap.renderModal', 'tfMapEditorMarkerAddModal', [
|
||||
'title' => Text::_('NR_ADD_MARKER'),
|
||||
'modalWidth' => '40',
|
||||
'footer' => '<button type="button" class="btn btn-primary tf-mapeditor-save-new-marker tf-modal-btn-primary" data-bs-dismiss="modal" data-dismiss="modal" aria-hidden="true">' . Text::_('NR_ADD_MARKER') . '</button>'
|
||||
], $form->renderFieldset('add_marker_modal'));
|
||||
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$options = isset($options) ? $options : $displayData;
|
||||
|
||||
if ($options['load_css_vars'] && !empty($options['custom_css']))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($options['custom_css']);
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget openstreetmap map-widget map-address-editor-view nr-address-component<?php echo $options['css_class']; ?>" id="<?php echo $options['id']; ?>" data-options="<?php echo htmlspecialchars(json_encode($options)); ?>">
|
||||
<?php if ($options['required']) { ?>
|
||||
<!-- Make Joomla client-side form validator happy by adding a fake hidden input field when the field is required. -->
|
||||
<input type="hidden" required class="required" id="<?php echo $options['id']; ?>" />
|
||||
<?php } ?>
|
||||
<?php if (!$options['required']): ?>
|
||||
<div class="tf-map-editor-clear-wrapper"><a href="#" class="tf-map-editor-clear"><?php echo Text::_('NR_CLEAR'); ?></a></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($options['show_address'] === 'before_map')
|
||||
{
|
||||
require 'settings.php';
|
||||
}
|
||||
?>
|
||||
<?php if ($options['show_map']): ?><div class="map-item"></div><?php endif; ?>
|
||||
<input type="hidden" class="map-markers" name="<?php echo $options['name']; ?>[markers]" value="<?php echo $options['markers'] ? htmlspecialchars(json_encode($options['markers'])) : ''; ?>" />
|
||||
<?php
|
||||
if ($options['show_address'] || $options['show_address'] === 'after_map')
|
||||
{
|
||||
echo '<div class="tf-mapeditor-settings">';
|
||||
require 'settings.php';
|
||||
echo '</div>';
|
||||
}
|
||||
if ($options['show_markers_list'])
|
||||
{
|
||||
?>
|
||||
<div class="tf-map-markers" data-no-markers="<?php echo Text::_('NR_CREATE_YOUR_FIRST_MARKER'); ?>">
|
||||
<strong class="tf-map-markers--title"><?php echo Text::_('NR_MARKERS'); ?></strong>
|
||||
<div class="tf-map-markers--list">
|
||||
<?php
|
||||
if (count($options['markers']))
|
||||
{
|
||||
foreach ($options['markers'] as $index => $marker)
|
||||
{
|
||||
?>
|
||||
<div class="tf-map-markers--list--item" data-id="<?php echo $marker['id']; ?>">
|
||||
<div class="tf-map-markers--list--item--label--wrapper">
|
||||
<span class="tf-map-markers--list--item--label--wrapper--counter"><?php echo $index + 1; ?>.</span>
|
||||
<div class="tf-map-markers--list--item--label--wrapper--label"><?php echo !empty($marker['label']) ? $marker['label'] : $marker['address']; ?></div>
|
||||
</div>
|
||||
<div class="tf-map-markers--list--item--actions">
|
||||
<a href="#" class="tf-map-markers--list--item--actions--edit" data-bs-toggle="modal" data-bs-target="#tfMapEditorMarkerEditModal" data-toggle="modal" data-target="#tfMapEditorMarkerEditModal" title="<?php echo Text::_('NR_MAP_EDITOR_MARKER_EDIT'); ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20"><path d="M9 39h2.2l22.15-22.15-2.2-2.2L9 36.8Zm30.7-24.3-6.4-6.4 2.1-2.1q.85-.85 2.1-.85t2.1.85l2.2 2.2q.85.85.85 2.1t-.85 2.1Zm-2.1 2.1L12.4 42H6v-6.4l25.2-25.2Zm-5.35-1.05-1.1-1.1 2.2 2.2Z"/></svg>
|
||||
</a>
|
||||
<a href="#" class="tf-map-markers--list--item--actions--delete" title="<?php echo Text::_('NR_MAP_EDITOR_MARKER_DELETE'); ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20"><path d="M13.05 42q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.5H8v-3h9.4V6h13.2v1.5H40v3h-2.05V39q0 1.2-.9 2.1-.9.9-2.1.9Zm21.9-31.5h-21.9V39h21.9Zm-16.6 24.2h3V14.75h-3Zm8.3 0h3V14.75h-3Zm-13.6-24.2V39Z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo Text::_('NR_CREATE_YOUR_FIRST_MARKER');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="tf-map-markers--list--item is-template is-hidden">
|
||||
<div class="tf-map-markers--list--item--label--wrapper">
|
||||
<span class="tf-map-markers--list--item--label--wrapper--counter"></span>
|
||||
<div class="tf-map-markers--list--item--label--wrapper--label">
|
||||
<svg height="12" viewBox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="#dedede">
|
||||
<circle cx="15" cy="15" r="15">
|
||||
<animate attributeName="r" from="15" to="15" begin="0s" dur="0.8s" values="12;9;12" calcMode="linear" repeatCount="indefinite"></animate>
|
||||
<animate attributeName="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcMode="linear" repeatCount="indefinite"></animate>
|
||||
</circle>
|
||||
<circle cx="60" cy="15" r="9" fill-opacity="0.3">
|
||||
<animate attributeName="r" from="9" to="9" begin="0s" dur="0.8s" values="9;12;9" calcMode="linear" repeatCount="indefinite"></animate>
|
||||
<animate attributeName="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcMode="linear" repeatCount="indefinite"></animate>
|
||||
</circle>
|
||||
<circle cx="105" cy="15" r="15">
|
||||
<animate attributeName="r" from="15" to="15" begin="0s" dur="0.8s" values="12;9;12" calcMode="linear" repeatCount="indefinite"></animate>
|
||||
<animate attributeName="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcMode="linear" repeatCount="indefinite"></animate>
|
||||
</circle>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tf-map-markers--list--item--actions">
|
||||
<a href="#" class="tf-map-markers--list--item--actions--edit" data-bs-toggle="modal" data-bs-target="#tfMapEditorMarkerEditModal" data-toggle="modal" data-target="#tfMapEditorMarkerEditModal" title="<?php echo Text::_('NR_MAP_EDITOR_MARKER_EDIT'); ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20"><path d="M9 39h2.2l22.15-22.15-2.2-2.2L9 36.8Zm30.7-24.3-6.4-6.4 2.1-2.1q.85-.85 2.1-.85t2.1.85l2.2 2.2q.85.85.85 2.1t-.85 2.1Zm-2.1 2.1L12.4 42H6v-6.4l25.2-25.2Zm-5.35-1.05-1.1-1.1 2.2 2.2Z"/></svg>
|
||||
</a>
|
||||
<a href="#" class="tf-map-markers--list--item--actions--delete" title="<?php echo Text::_('NR_MAP_EDITOR_MARKER_DELETE'); ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="20"><path d="M13.05 42q-1.2 0-2.1-.9-.9-.9-.9-2.1V10.5H8v-3h9.4V6h13.2v1.5H40v3h-2.05V39q0 1.2-.9 2.1-.9.9-2.1.9Zm21.9-31.5h-21.9V39h21.9Zm-16.6 24.2h3V14.75h-3Zm8.3 0h3V14.75h-3Zm-13.6-24.2V39Z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="btn btn-primary tf-mapeditor-add-new-marker" data-bs-toggle="modal" data-toggle="modal" data-bs-target="#tfMapEditorMarkerAddModal" data-target="#tfMapEditorMarkerAddModal"><?php echo Text::_('NR_ADD_MARKER'); ?></a>
|
||||
<?php
|
||||
if (!$options['pro'])
|
||||
{
|
||||
\NRFramework\HTML::renderProOnlyModal($options['extension']);
|
||||
?>
|
||||
<div class="tf-mapeditor-add-unlimited-markers is-hidden">
|
||||
<a href="#" class="btn btn-danger" data-pro-only="<?php echo Text::_('NR_UNLIMITED_MARKERS'); ?>">
|
||||
<?php echo Text::_('NR_ADD_MARKER'); ?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" class="lock-icon" viewBox="0 96 960 960" fill="#fff"><path d="M222.152 981.5q-28.104 0-48.117-20.013-20.013-20.014-20.013-48.117V483.674q0-28.203 20.013-48.286 20.013-20.084 48.117-20.084h65.218v-90.739q0-80.366 56.265-136.857 56.266-56.491 136.414-56.491 80.147 0 136.364 56.491t56.217 136.857v90.739h65.218q28.202 0 48.286 20.084 20.084 20.083 20.084 48.286V913.37q0 28.103-20.084 48.117Q766.05 981.5 737.848 981.5H222.152Zm0-68.13h515.696V483.674H222.152V913.37Zm258.016-137.848q31.832 0 54.332-22.032 22.5-22.031 22.5-52.968 0-30-22.668-54.5t-54.5-24.5q-31.832 0-54.332 24.5t-22.5 55q0 30.5 22.668 52.5t54.5 22ZM355.5 415.304h249V324.62q0-52.388-36.152-88.711-36.152-36.322-88.174-36.322-52.022 0-88.348 36.322Q355.5 272.232 355.5 324.62v90.684ZM222.152 913.37V483.674 913.37Z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" class="unlock-icon" viewBox="0 96 960 960" fill="#fff"><path d="M222.152 415.304H604.5V324.62q0-52.388-36.152-88.711-36.152-36.322-88.174-36.322-52.022 0-88.348 36.322-36.326 36.323-36.326 88.656h-68.13q0-80.516 56.265-136.932 56.266-56.416 136.414-56.416 80.147 0 136.364 56.491t56.217 136.857v90.739h65.218q28.202 0 48.286 20.084 20.084 20.083 20.084 48.286V913.37q0 28.103-20.084 48.117Q766.05 981.5 737.848 981.5H222.152q-28.104 0-48.117-20.013-20.013-20.014-20.013-48.117V483.674q0-28.203 20.013-48.286 20.013-20.084 48.117-20.084Zm0 498.066h515.696V483.674H222.152V913.37Zm258.016-137.848q31.832 0 54.332-22.032 22.5-22.031 22.5-52.968 0-30-22.668-54.5t-54.5-24.5q-31.832 0-54.332 24.5t-22.5 55q0 30.5 22.668 52.5t54.5 22ZM222.152 913.37V483.674 913.37Z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
// Load edit marker modal
|
||||
require 'edit_marker_modal.php';
|
||||
// Load add marker modal
|
||||
require 'add_marker_modal.php';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Form\Form;
|
||||
|
||||
$form_source = new SimpleXMLElement('
|
||||
<form>
|
||||
<fieldset name="edit_marker_modal">
|
||||
<field name="" type="hidden" class="tf-marker-repeater-id" />
|
||||
<field name="" type="TFAddressLookup"
|
||||
label="NR_LOCATION_ADDRESS"
|
||||
group_class="mb-0"
|
||||
class="tf-marker-repeater-address span12 full-width w-100"
|
||||
/>
|
||||
<field name="" type="text"
|
||||
label="NR_COORDINATES"
|
||||
hint="NR_LATITUDE"
|
||||
class="tf-marker-repeater-latitude span12 full-width w-100"
|
||||
/>
|
||||
<field name="" type="text"
|
||||
hiddenLabel="true"
|
||||
hint="NR_LONGITUDE"
|
||||
class="tf-marker-repeater-longitude span12 full-width w-100"
|
||||
/>
|
||||
<field name="" type="spacer" label="NR_INFO_WINDOW" class="tf-bold" />
|
||||
<field name="" type="text"
|
||||
label="NR_LABEL"
|
||||
class="tf-marker-repeater-label span12 full-width w-100"
|
||||
filter="safehtml"
|
||||
/>
|
||||
<field name="" type="textarea"
|
||||
label="NR_DESCRIPTION"
|
||||
class="tf-marker-repeater-description span12 full-width w-100"
|
||||
rows="4"
|
||||
filter="safehtml"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
||||
');
|
||||
|
||||
$form = Form::getInstance($options['name'], $form_source->asXML(), ['control' => $options['name']]);
|
||||
|
||||
echo HTMLHelper::_('bootstrap.renderModal', 'tfMapEditorMarkerEditModal', [
|
||||
'title' => Text::_('NR_EDIT_MARKER'),
|
||||
'modalWidth' => '50',
|
||||
'footer' => '<button type="button" class="btn btn-primary tf-mapeditor-save-marker tf-modal-btn-primary" data-bs-dismiss="modal" data-dismiss="modal" aria-hidden="true">' . Text::_('JAPPLY') . '</button>'
|
||||
], $form->renderFieldset('edit_marker_modal'));
|
||||
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Form\Form;
|
||||
|
||||
require_once JPATH_SITE . '/plugins/system/nrframework/fields/tfaddresslookup.php';
|
||||
|
||||
$form_source = new SimpleXMLElement('
|
||||
<form>
|
||||
<fieldset name="mapeditor_field_settings">
|
||||
<field name="address" type="TFAddressLookup"
|
||||
label="NR_LOCATION_ADDRESS"
|
||||
visible="' . $options['show_address'] . '"
|
||||
id="' . $options['id'] . '"
|
||||
autocomplete="' . ($options['autocomplete'] ? 'true' : 'false') . '"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
||||
');
|
||||
|
||||
$form = Form::getInstance($options['name'], $form_source->asXML(), ['control' => $options['name']]);
|
||||
$form->bind([
|
||||
'address' => [
|
||||
'coordinates' => $options['value'],
|
||||
'address' => !empty($options['address']) ? $options['address'] : $options['value']
|
||||
]
|
||||
]);
|
||||
|
||||
echo $form->renderFieldset('mapeditor_field_settings');
|
||||
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$options = isset($options) ? $options : $displayData;
|
||||
|
||||
if ($options['load_css_vars'] && !empty($options['custom_css']))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($options['custom_css']);
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget tf-map-editor<?php echo $options['css_class']; ?>" id="<?php echo $options['id']; ?>" data-options="<?php echo htmlspecialchars(json_encode($options)); ?>">
|
||||
<div class="tf-map-editor--app"><?php echo Text::_('NR_LOADING_MAP'); ?></div>
|
||||
<?php if (!$hide_input): ?>
|
||||
<input type="hidden" name="<?php echo $options['name']; ?>" id="<?php echo $options['id']; ?>" value="<?php echo htmlspecialchars(json_encode($options['value'])); ?>" class="tf-map-editor--value<?php echo $options['required'] ? ' required' : ''; ?>"<?php echo $options['required'] ? ' required' : ''; ?> />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$options = isset($options) ? $options : $displayData;
|
||||
|
||||
if ($options['load_css_vars'] && !empty($options['custom_css']))
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration($options['custom_css']);
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget openstreetmap map-widget nr-address-component<?php echo $options['css_class'] ? ' ' . $options['css_class'] : ''; ?>" id="<?php echo $id; ?>" data-options="<?php echo htmlspecialchars(json_encode($options)); ?>">
|
||||
<div class="map-item"></div>
|
||||
</div>
|
||||
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/slider.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/widgets/slider.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration('
|
||||
.nrf-slider-wrapper.' . $id . ' {
|
||||
--base-color: ' . $base_color . ';
|
||||
--progress-color: ' . $color . ';
|
||||
--input-bg-color: ' . $input_bg_color . ';
|
||||
--input-border-color: ' . $input_border_color . ';
|
||||
--thumb-shadow-color: ' . $color . '26' . ';
|
||||
}
|
||||
');
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget nrf-slider-wrapper <?php echo $css_class; ?>">
|
||||
<input
|
||||
type="range"
|
||||
class="nrf-slider-range PrivateSwitchBase-input"
|
||||
min="<?php echo $min; ?>"
|
||||
max="<?php echo $max; ?>"
|
||||
step="<?php echo $step; ?>"
|
||||
value="<?php echo $value; ?>"
|
||||
<?php if ($load_css_vars): ?>
|
||||
data-base-color="<?php echo $base_color; ?>"
|
||||
data-progress-color="<?php echo $color; ?>"
|
||||
style="background: linear-gradient(to right, <?php echo $color; ?> 0%, <?php echo $color . ' ' . $bar_percentage; ?>%, <?php echo $base_color . ' ' . $bar_percentage; ?>%, <?php echo $base_color; ?> 100%)"
|
||||
<?php endif; ?>
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
disabled
|
||||
<?php endif; ?>
|
||||
<?php if ($aria_label): ?>
|
||||
aria-label="<?php echo htmlspecialchars($aria_label, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<input
|
||||
type="number"
|
||||
value="<?php echo $value; ?>"
|
||||
id="<?php echo $id; ?>"
|
||||
name="<?php echo $name; ?>"
|
||||
min="<?php echo $min; ?>"
|
||||
max="<?php echo $max; ?>"
|
||||
step="<?php echo $step; ?>"
|
||||
class="nrf-slider-value form-control<?php echo !empty($input_class) ? ' ' . $input_class : ''; ?>"
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
readonly
|
||||
<?php endif; ?>
|
||||
/>
|
||||
</div>
|
||||
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/rating.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/widgets/rating.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration('
|
||||
.nrf-rating-wrapper.' . $id . ' {
|
||||
--rating-selected-color: ' . $selected_color . ';
|
||||
--rating-unselected-color: ' . $unselected_color . ';
|
||||
--rating-size: ' . $size . 'px;
|
||||
}
|
||||
');
|
||||
}
|
||||
|
||||
echo $this->sublayout($half_ratings ? 'half' : 'full', $displayData);
|
||||
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
?>
|
||||
<div class="nrf-widget nrf-rating-wrapper <?php echo $css_class; ?>">
|
||||
<?php
|
||||
for ($i = 1; $i <= $max_rating; $i++)
|
||||
{
|
||||
$label_class = '';
|
||||
$rating_id = $id . '_' . $i;
|
||||
$label_title = $i . ' ' . sprintf(Text::_('NR_STAR'), ($i > 1 ? 's' : ''));
|
||||
|
||||
if ($value && $i <= $value)
|
||||
{
|
||||
$label_class = 'iconFilled';
|
||||
}
|
||||
?>
|
||||
<input type="radio" aria-hidden="true" class="<?php echo $input_class; ?>" id="<?php echo $rating_id; ?>" name="<?php echo $name; ?>"
|
||||
value="<?php echo $i; ?>"
|
||||
<?php if ($value && $i == $value): ?>
|
||||
checked
|
||||
<?php endif; ?>
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
disabled
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<label aria-label="<?php echo $label_title; ?>" for="<?php echo $rating_id; ?>" class="<?php echo $label_class; ?>" title="<?php echo $label_title; ?>">
|
||||
<svg class="svg-item">
|
||||
<use xlink:href="<?php echo $icon_url; ?>#nrf-ratings-<?php echo $icon; ?>" />
|
||||
</svg>
|
||||
</label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$css_class .= ' ' . $size;
|
||||
?>
|
||||
<div class="nrf-widget nrf-rating-wrapper half <?php echo $css_class; ?>">
|
||||
<?php
|
||||
$counter = 0;
|
||||
$prev_counter = 0;
|
||||
|
||||
// initial value value
|
||||
$rating_value = 0.5;
|
||||
|
||||
for ($i = 0; $i < $max_rating; $i++)
|
||||
{
|
||||
$label_class = '';
|
||||
|
||||
// wrapper start - for half rating item (half and full star)
|
||||
if ($counter % 2 == 0)
|
||||
{
|
||||
$prev_counter = $counter;
|
||||
?><span class="rating_item_group"><?php
|
||||
}
|
||||
|
||||
$rating_item_type = fmod($rating_value, 1) == 0.5 ? 'half' : 'full';
|
||||
$rating_id = $id . '_' . $i . '_' . $rating_item_type;
|
||||
|
||||
if ($value && $rating_value <= $value)
|
||||
{
|
||||
$label_class = ' iconFilled';
|
||||
}
|
||||
|
||||
$label_title = $rating_value . ' ' . sprintf(Text::_('NR_STAR'), ($rating_value > 1 ? 's' : ''));
|
||||
?>
|
||||
<input type="radio"
|
||||
aria-hidden="true"
|
||||
class="<?php echo $input_class; ?>"
|
||||
id="<?php echo $rating_id; ?>"
|
||||
name="<?php echo $name; ?>"
|
||||
value="<?php echo $rating_value; ?>"
|
||||
<?php if ($value && $rating_value == $value): ?>
|
||||
checked
|
||||
<?php endif; ?>
|
||||
<?php if ($readonly || $disabled): ?>
|
||||
disabled
|
||||
<?php endif; ?>
|
||||
/>
|
||||
<label aria-label="<?php echo $label_title; ?>" class="<?php echo $rating_item_type . $label_class; ?>" for="<?php echo $rating_id; ?>" title="<?php echo $label_title; ?>">
|
||||
<svg class="svg-item">
|
||||
<use xlink:href="<?php echo $icon_url; ?>#nrf-ratings-<?php echo $icon; ?>" />
|
||||
</svg>
|
||||
</label>
|
||||
<?php
|
||||
|
||||
// wrapper end - for half rating item
|
||||
if ($counter == $prev_counter + 1)
|
||||
{
|
||||
?></span><?php
|
||||
}
|
||||
$counter++;
|
||||
|
||||
// increase value
|
||||
$rating_value += 0.5;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$options = isset($options) ? $options : $displayData;
|
||||
|
||||
if (!$options['video'] || !is_array($options['video']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$attributes = array_filter(array(
|
||||
isset($options['controls']) && $options['controls'] ? 'controls' : '',
|
||||
isset($options['loop']) && $options['loop'] ? 'loop' : '',
|
||||
isset($options['mute']) && $options['mute'] ? 'muted' : '',
|
||||
isset($options['autoplay']) && $options['autoplay'] ? 'autoplay playsinline' : ''
|
||||
));
|
||||
|
||||
$type_ext = $options['video']['ext'] === 'mov' ? 'mp4' : $options['video']['ext'];
|
||||
?>
|
||||
<div class="nrf-widget tf-video selfhostedvideo<?php echo $css_class ? ' ' . $css_class : ''; ?>" id="<?php echo $options['id']; ?>">
|
||||
<div class="tf-video-embed" <?php echo $options['atts']; ?>>
|
||||
<video
|
||||
preload="<?php echo $options['preload']; ?>"
|
||||
controlsList="nodownload"
|
||||
<?php echo implode(' ', $attributes); ?>
|
||||
style="max-width:100%;">
|
||||
<source data-src="<?php echo $options['video']['file']; ?>" type="video/<?php echo $type_ext; ?>" />
|
||||
<?php echo Text::sprintf('NR_UNSUPPORTED_TAG', 'video'); ?>
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
HTMLHelper::script('plg_system_nrframework/vendor/signature.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/signature.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/widgets/signature.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration('
|
||||
.nrf-widget.signature.' . $id . ' {
|
||||
--width: ' . $width . ';
|
||||
--height: ' . $height . ';
|
||||
--input-border-width: ' . $border_width . ';
|
||||
--input-border-color: ' . $border_color . ';
|
||||
--input-border-radius: ' . $border_radius . ';
|
||||
--input-background-color: ' . $background_color . ';
|
||||
--line-color: ' . (is_null($line_color) ? $border_color : $line_color) . ';
|
||||
}
|
||||
');
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget signature<?php echo $css_class; ?>">
|
||||
<div class="nrf-signature-body">
|
||||
<div class="actions">
|
||||
<svg class="nrf-signature-clear" width="22" height="22" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z"></path></svg>
|
||||
<svg class="nrf-signature-reset" width="22" height="22" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z"></path></svg>
|
||||
</div>
|
||||
<canvas data-pen-color="<?php echo $pen_color; ?>"></canvas>
|
||||
<input type="hidden" value="<?php echo htmlspecialchars((string) $value); ?>" name="<?php echo $name; ?>" />
|
||||
<input type="hidden" value="<?php echo htmlspecialchars((string) $value); ?>" class="initial-value" />
|
||||
</div>
|
||||
</div>
|
||||
112
plugins/system/nrframework/layouts/widgets/slideshow/default.php
Normal file
112
plugins/system/nrframework/layouts/widgets/slideshow/default.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Layout\FileLayout;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$items || !is_array($items) || !count($items))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
HTMLHelper::script('plg_system_nrframework/vendor/swiper.min.js', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::script('plg_system_nrframework/widgets/slideshow.js', ['relative' => true, 'version' => 'auto']);
|
||||
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/vendor/swiper.min.css', ['relative' => true, 'version' => 'auto']);
|
||||
HTMLHelper::stylesheet('plg_system_nrframework/widgets/slideshow.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_css_vars)
|
||||
{
|
||||
Factory::getDocument()->addStyleDeclaration('
|
||||
.nrf-widget.tf-slideshow-wrapper.' . $id . ',
|
||||
.nrf-widget.tf-slideshow-thumbs-wrapper.' . $id . ' {
|
||||
--swiper-theme-color: ' . $theme_color . ';
|
||||
}
|
||||
');
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget tf-gallery-wrapper tf-slideshow-wrapper swiper<?php echo $css_class; ?>" role="region" aria-roledescription="carousel" aria-label="<?php echo Text::_('NR_HIGHLIGHTED_CAROUSEL'); ?>" data-options="<?php echo htmlspecialchars(json_encode($options), ENT_COMPAT, 'UTF-8'); ?>" id="tf-slideshow-<?php echo $id; ?>">
|
||||
<div class="swiper-wrapper" aria-live="off">
|
||||
<?php
|
||||
foreach ($items as $index => $item)
|
||||
{
|
||||
?>
|
||||
<div class="swiper-slide" role="group" aria-roledescription="slide" aria-label="<?php Text::sprintf('NR_X_OF_X', ($index + 1), count($items)); ?>">
|
||||
<?php if ($lightbox): ?>
|
||||
<a href="<?php echo $item['url']; ?>" class="tf-gallery-lightbox-item tf-slideshow-<?php echo $id; ?>" data-type="image" data-description=".glightbox-desc.<?php echo $id; ?>.desc-<?php echo $index; ?>">
|
||||
<?php endif; ?>
|
||||
<img loading="lazy" src="<?php echo isset($item['slideshow']) && !empty($item['slideshow']) ? $item['slideshow'] : $item['url']; ?>"<?php echo $item['img_atts']; ?> alt="<?php echo strip_tags($item['alt']); ?>" />
|
||||
<?php if ($lightbox): ?>
|
||||
</a>
|
||||
<div class="glightbox-desc <?php echo $id . ' desc-' . $index; ?>">
|
||||
<div class="caption"><?php echo nl2br($item['caption']); ?></div>
|
||||
<div class="module"><?php echo !empty($module) ? \NRFramework\Helpers\Widgets\Gallery::loadModule($module) : ''; ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($options['autoplay_progress']): ?>
|
||||
<div class="autoplay-progress-circle">
|
||||
<svg viewBox="0 0 48 48">
|
||||
<circle cx="24" cy="24" r="20"></circle>
|
||||
</svg>
|
||||
<span></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (in_array($nav_controls, ['arrows', 'arrows_dots'])): ?>
|
||||
<div class="swiper-button-prev" aria-label="<?php echo Text::_('NR_PREVIOUS_SLIDE'); ?>"></div>
|
||||
<div class="swiper-button-next" aria-label="<?php echo Text::_('NR_NEXT_SLIDE'); ?>"></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (in_array($nav_controls, ['dots', 'arrows_dots'])): ?>
|
||||
<div class="swiper-pagination"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($show_thumbnails): ?>
|
||||
<div thumbsSlider="" class="nrf-widget tf-slideshow-thumbs-wrapper swiper<?php echo $css_class; ?>" id="thumbs_tf-slideshow-<?php echo $id; ?>">
|
||||
<div class="swiper-wrapper">
|
||||
<?php
|
||||
foreach ($items as $index => $item)
|
||||
{
|
||||
?><div class="swiper-slide"><img loading="lazy" src="<?php echo $item['thumbnail_url']; ?>" alt="<?php echo strip_tags($item['alt']); ?>" /></div><?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if ($show_thumbnails_arrows): ?>
|
||||
<div class="swiper-button-next"></div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if ($lightbox)
|
||||
{
|
||||
$layout = new FileLayout('glightbox', JPATH_PLUGINS . '/system/nrframework/layouts/widgets/gallery/default');
|
||||
echo $layout->render($displayData);
|
||||
}
|
||||
?>
|
||||
51
plugins/system/nrframework/layouts/widgets/video/default.php
Normal file
51
plugins/system/nrframework/layouts/widgets/video/default.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Advanced Custom Fields
|
||||
* @version 2.8.8 Pro
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link https://www.tassos.gr
|
||||
* @copyright Copyright © 2024 Tassos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
$options = isset($options) ? $options : $displayData;
|
||||
|
||||
if (!$options['value'])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($options['load_css_vars'])
|
||||
{
|
||||
$atts = [];
|
||||
|
||||
// Add cover image
|
||||
if (isset($options['coverImageType']) && isset($options['coverImage']) && in_array($options['coverImageType'], ['auto', 'custom']) && !empty($options['coverImage']))
|
||||
{
|
||||
$atts['video-cover-image'] = $options['coverImage'];
|
||||
}
|
||||
|
||||
$css = \NRFramework\Helpers\CSS::cssVarsToString($atts, '.nrf-widget.tf-video.' . $options['id']);
|
||||
|
||||
Factory::getDocument()->addStyleDeclaration($css);
|
||||
}
|
||||
?>
|
||||
<div class="nrf-widget tf-video<?php echo $css_class ? ' ' . $css_class : ''; ?>" id="<?php echo $options['id']; ?>" data-readonly="<?php echo var_export($options['readonly']); ?>" data-disabled="<?php echo var_export($options['disabled']); ?>">
|
||||
<div class="tf-video-embed-wrapper">
|
||||
<div class="tf-video-embed" <?php echo $options['atts']; ?>>
|
||||
<div id="tf_video_embed_<?php echo $options['id']; ?>"></div>
|
||||
</div>
|
||||
|
||||
<?php if (isset($options['coverImageType']) && isset($options['coverImage']) && $options['coverImageType'] !== 'none' && !empty($options['coverImage'])): ?>
|
||||
<div class="tf-video-embed-overlay"><div class="play-button"></div></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user