first commit
This commit is contained in:
22
administrator/components/com_jce/layouts/edit/additional.php
Normal file
22
administrator/components/com_jce/layouts/edit/additional.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
$plugins = $displayData->get('additional');
|
||||
|
||||
?>
|
||||
<fieldset class="<?php echo !empty($displayData->formclass) ? $displayData->formclass : ''; ?>">
|
||||
<legend><?php echo JText::_('WF_PROFILES_FEATURES_ADDITIONAL'); ?></legend>
|
||||
<div class="control-group">
|
||||
<div class="control-label"></div>
|
||||
<div class="controls">
|
||||
<div class="editor-features">
|
||||
<?php foreach ($plugins as $plugin): ?>
|
||||
<div class="control-group">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" value="<?php echo $plugin->name; ?>" <?php echo $plugin->active ? ' checked="checked"' : ''; ?>> <?php echo JText::_($plugin->title); ?>
|
||||
</label>
|
||||
<span class="help-block form-text text-muted w-100"><?php echo JText::_($plugin->description); ?></span>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
118
administrator/components/com_jce/layouts/edit/layout.php
Normal file
118
administrator/components/com_jce/layouts/edit/layout.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
$item = $displayData->get('Item');
|
||||
$form = $displayData->getForm();
|
||||
|
||||
$data = new JRegistry($form->getValue('config'));
|
||||
|
||||
$rows = $displayData->get('Rows');
|
||||
$plugins = $displayData->get('Plugins');
|
||||
$available = $displayData->get('AvailableButtons');
|
||||
|
||||
// width and height
|
||||
$width = $data->get('width', '100%');
|
||||
$height = $data->get('height', 'auto');
|
||||
|
||||
if (is_numeric($width) && strpos('%', $width) === false) {
|
||||
$width .= 'px';
|
||||
}
|
||||
if (is_numeric($height) && strpos('%', $height) === false) {
|
||||
$height .= 'px';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="control-group mt-3 mb-0 <?php echo !empty($displayData->formclass) ? $displayData->formclass : ''; ?>">
|
||||
<div class="control-label">
|
||||
<label class="hasPopover" title="<?php echo JText::_('WF_PROFILES_FEATURES_LAYOUT_EDITOR_DESC'); ?>"><?php echo JText::_('WF_PROFILES_FEATURES_LAYOUT_EDITOR'); ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<div class="editor-layout">
|
||||
<!-- Editor Toggle -->
|
||||
<span id="editor_toggle"><?php echo $data->get('toggle_label', '[Toggle Editor]'); ?></span>
|
||||
<!-- Width Marker -->
|
||||
<div class="widthMarker" style="width:<?php echo $width; ?>;">
|
||||
<span><?php echo $width; ?></span>
|
||||
</div>
|
||||
<!-- Toolbar -->
|
||||
<div class="mce-tinymce mce-container mce-panel mceEditor mceLayout mceDefaultSkin" role="application">
|
||||
<div class="mce-container-body mce-stack-layout mceLayout" style="max-width:<?php echo $width; ?>" role="presentation">
|
||||
<div class="mceToolbar sortableList" role="group">
|
||||
<?php foreach ($rows as $key => $groups) : ?>
|
||||
<div class="mce-container mce-toolbar mce-stack-layout-item mceToolbarRow mceToolbarRow<?php echo $key;?> Enabled sortableListItem">
|
||||
<?php foreach ($groups as $buttons) : ?>
|
||||
<!--div class="mce-container mce-flow-layout-item mce-btn-group" role="group"-->
|
||||
<?php foreach ($buttons as $button) : ?>
|
||||
<?php if (!empty($button->icon)) : ?>
|
||||
<div tabindex="-1" class="mceToolbarItem <?php echo $button->type; ?> mce-widget mce-btn" data-name="<?php echo $button->name; ?>" role="button" aria-label="<?php echo $button->title; ?>" aria-description="<?php echo $button->description; ?>">
|
||||
<?php foreach ($button->icon as $icon): ?>
|
||||
<div tabindex="-1" class="mceButton <?php echo $button->class; ?>" role="presentation" title="<?php echo $button->title; ?>">
|
||||
<?php if ($button->image) : ?>
|
||||
<span class="mceIcon mceIconImage"><img src="<?php echo $button->image; ?>" alt="" /></span>
|
||||
<?php else : ?>
|
||||
<span class="mce-ico mce-i-<?php echo $icon; ?> mceIcon mce_<?php echo $icon; ?>"></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<!--/div-->
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="mce-edit-area mce-container mce-panel mce-stack-layout-item mceIframeContainer">
|
||||
<div>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mce-statusbar mce-container mce-panel mce-last mce-stack-layout-item mceStatusbar mceLast">
|
||||
<div class="mce-container-body mce-flow-layout mcePathRow" role="group" tabindex="-1">
|
||||
<div class="mcePathLabel">Path: </div>
|
||||
<div aria-level="0" tabindex="-1" data-index="0" class="mce-path-item mce-last mcePathPath" role="button">p</div>
|
||||
</div>
|
||||
<div class="mce-flow-layout-item mce-last mce-resizehandle mceResize" tabindex="-1"></div>
|
||||
<div class="mce-wordcount mce-widget mce-label mce-flow-layout-item mceWordCount">Words: 69</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group mt-3 mb-4 <?php echo !empty($displayData->formclass) ? $displayData->formclass : ''; ?>">
|
||||
<div class="control-label">
|
||||
<label class="hasPopover" title="<?php echo JText::_('WF_PROFILES_FEATURES_LAYOUT_AVAILABLE_DESC'); ?>"><?php echo JText::_('WF_PROFILES_FEATURES_LAYOUT_AVAILABLE'); ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<div class="editor-button-pool">
|
||||
<div class="mce-tinymce mce-container mce-panel mceEditor mceLayout defaultSkin" role="application">
|
||||
<div class="mce-container-body mce-stack-layout mceLayout">
|
||||
<div class="mce-toolbar-grp mce-container mce-panel mce-stack-layout-item mceToolbar sortableList" role="toolbar">
|
||||
<?php for ($i = 0; $i < max(count($rows), 5); ++$i) : ?>
|
||||
<div class="mce-container mce-toolbar mce-stack-layout-item mceToolbarRow mceToolbarRow<?php echo $i;?> Enabled sortableListItem">
|
||||
<!--div class="mce-container mce-flow-layout-item mce-btn-group"-->
|
||||
<?php foreach ($available as $plugin) : ?>
|
||||
<?php if ($plugin->row && $plugin->row === $i): ?>
|
||||
<div tabindex="-1" class="mceToolbarItem <?php echo $plugin->type; ?> mce-widget mce-btn" data-name="<?php echo $plugin->name; ?>" role="button" aria-label="<?php echo $plugin->title; ?>" aria-description="<?php echo $plugin->description; ?>">
|
||||
<?php foreach ($plugin->icon as $icon): ?>
|
||||
<div tabindex="-1" class="mceButton <?php echo $plugin->class; ?>" role="presentation" title="<?php echo $plugin->title; ?>">
|
||||
<?php if ($plugin->image) : ?>
|
||||
<span class="mceIcon mceIconImage"><img src="<?php echo $plugin->image; ?>" alt="" /></span>
|
||||
<?php else : ?>
|
||||
<span class="mce-ico mce-i-<?php echo $icon; ?> mceIcon mce_<?php echo $icon; ?>"></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<!--/div-->
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
69
administrator/components/com_jce/layouts/edit/plugins.php
Normal file
69
administrator/components/com_jce/layouts/edit/plugins.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
$plugins = $displayData->get('Plugins');
|
||||
|
||||
?>
|
||||
<div class="form-horizontal tabbable tabs-left flex-column">
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'plugins', array('active' => ''));
|
||||
foreach ($plugins as $plugin) {
|
||||
if (!$plugin->editable || empty($plugin->form)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$icons = '';
|
||||
$title = '';
|
||||
|
||||
$title .= '<p>' . $plugin->title . '</p>';
|
||||
|
||||
if (!empty($plugin->icon)) {
|
||||
|
||||
foreach ($plugin->icon as $icon) {
|
||||
$icons .= '<div class="mce-widget mce-btn mceButton ' . $plugin->class . '" title="' . $plugin->title . '"><span class="mce-ico mce-i-' . $icon . ' mceIcon mce_' . $icon . '"></span></div>';
|
||||
}
|
||||
|
||||
$title .= '<div class="mceEditor mceDefaultSkin"><div class="mce-container mce-toolbar mceToolBarItem">' . $icons . '</div></div>';
|
||||
}
|
||||
|
||||
echo JHtml::_('bootstrap.addTab', 'plugins', 'tabs-plugins-' . $plugin->name, $title); ?>
|
||||
<fieldset class="<?php echo !empty($displayData->formclass) ? $displayData->formclass : ''; ?>">
|
||||
<legend><?php echo $plugin->title; ?></legend>
|
||||
<div class="row-fluid">
|
||||
<hr />
|
||||
|
||||
<?php if ($plugin->form) :
|
||||
|
||||
echo $plugin->form->renderFieldset('config'); ?>
|
||||
|
||||
<hr />
|
||||
|
||||
<?php foreach ($plugin->extensions as $type => $extensions) : ?>
|
||||
<h3><?php echo JText::_('WF_EXTENSION_' . strtoupper($type), true); ?></h3>
|
||||
|
||||
<?php foreach ($extensions as $extension) : ?>
|
||||
|
||||
<div class="row-fluid">
|
||||
<h4><?php echo JText::_('PLG_JCE_' . strtoupper($type) . '_' . strtoupper($extension->name), true); ?></h4>
|
||||
<?php echo $extension->form->renderFieldset($type . '.' . $extension->name); ?>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<hr />
|
||||
|
||||
<?php endforeach;
|
||||
|
||||
endif; ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab');
|
||||
}
|
||||
echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
</div>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
/**
|
||||
* Layout variables
|
||||
* -----------------
|
||||
* @var string $autocomplete Autocomplete attribute for the field.
|
||||
* @var boolean $autofocus Is autofocus enabled?
|
||||
* @var string $class Classes for the input.
|
||||
* @var string $description Description of the field.
|
||||
* @var boolean $disabled Is this field disabled?
|
||||
* @var string $group Group the field belongs to. <fields> section in form XML.
|
||||
* @var boolean $hidden Is this field hidden in the form?
|
||||
* @var string $hint Placeholder for the field.
|
||||
* @var string $id DOM id of the field.
|
||||
* @var string $label Label of the field.
|
||||
* @var string $labelclass Classes to apply to the label.
|
||||
* @var boolean $multiple Does this field support multiple values?
|
||||
* @var string $name Name of the input field.
|
||||
* @var string $onchange Onchange attribute for the field.
|
||||
* @var string $onclick Onclick attribute for the field.
|
||||
* @var string $pattern Pattern (Reg Ex) of value of the form field.
|
||||
* @var boolean $readonly Is this field read only?
|
||||
* @var boolean $repeat Allows extensions to duplicate elements.
|
||||
* @var boolean $required Is this field required?
|
||||
* @var integer $size Size attribute of the input.
|
||||
* @var boolean $spellcheck Spellcheck state for the form field.
|
||||
* @var string $validate Validation rules to apply.
|
||||
* @var string $value Value attribute of the field.
|
||||
* @var array $checkedOptions Options that will be set as checked.
|
||||
* @var boolean $hasValue Has this field a value assigned?
|
||||
* @var array $options Options available for this field.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The format of the input tag to be filled in using sprintf.
|
||||
* %1 - id
|
||||
* %2 - name
|
||||
* %3 - value
|
||||
* %4 = any other attributes
|
||||
*/
|
||||
$format = '<input type="checkbox" id="%1$s" value="%3$s" name="%2$s" %5$s /><label for="%1$s" class="checkbox blockformat-%3$s">%4$s</label>';
|
||||
|
||||
// The alt option for JText::alt
|
||||
$alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name);
|
||||
?>
|
||||
|
||||
<fieldset id="<?php echo $id; ?>" class="<?php echo trim($class . ' checkboxes blockformats'); ?>">
|
||||
|
||||
<?php foreach ($options as $i => $option): ?>
|
||||
<?php
|
||||
// Initialize some option attributes.
|
||||
$checked = in_array((string) $option->value, $checkedOptions, true) ? 'checked' : '';
|
||||
|
||||
// In case there is no stored value, use the option's default state.
|
||||
$checked = (!$hasValue && $option->checked) ? 'checked' : $checked;
|
||||
$optionDisabled = !empty($option->disable) || $disabled ? 'disabled' : '';
|
||||
|
||||
$oid = $id . $i;
|
||||
$value = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8');
|
||||
$attributes = array_filter(array($checked, $optionDisabled));
|
||||
?>
|
||||
<div class="blockformat-item" title="<?php echo $option->text; ?>">
|
||||
<?php echo sprintf($format, $oid, $name, $value, $option->text, implode(' ', $attributes)); ?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
|
||||
</fieldset>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
/**
|
||||
* Layout variables
|
||||
* -----------------
|
||||
* @var string $autocomplete Autocomplete attribute for the field.
|
||||
* @var boolean $autofocus Is autofocus enabled?
|
||||
* @var string $class Classes for the input.
|
||||
* @var string $description Description of the field.
|
||||
* @var boolean $disabled Is this field disabled?
|
||||
* @var string $group Group the field belongs to. <fields> section in form XML.
|
||||
* @var boolean $hidden Is this field hidden in the form?
|
||||
* @var string $hint Placeholder for the field.
|
||||
* @var string $id DOM id of the field.
|
||||
* @var string $label Label of the field.
|
||||
* @var string $labelclass Classes to apply to the label.
|
||||
* @var boolean $multiple Does this field support multiple values?
|
||||
* @var string $name Name of the input field.
|
||||
* @var string $onchange Onchange attribute for the field.
|
||||
* @var string $onclick Onclick attribute for the field.
|
||||
* @var string $pattern Pattern (Reg Ex) of value of the form field.
|
||||
* @var boolean $readonly Is this field read only?
|
||||
* @var boolean $repeat Allows extensions to duplicate elements.
|
||||
* @var boolean $required Is this field required?
|
||||
* @var integer $size Size attribute of the input.
|
||||
* @var boolean $spellcheck Spellcheck state for the form field.
|
||||
* @var string $validate Validation rules to apply.
|
||||
* @var string $value Value attribute of the field.
|
||||
* @var array $checkedOptions Options that will be set as checked.
|
||||
* @var boolean $hasValue Has this field a value assigned?
|
||||
* @var array $options Options available for this field.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The format of the input tag to be filled in using sprintf.
|
||||
* %1 - id
|
||||
* %2 - name
|
||||
* %3 - value
|
||||
* %4 = any other attributes
|
||||
*/
|
||||
$format = '<input type="checkbox" id="%1$s" name="%2$s" value="%3$s" %4$s />';
|
||||
|
||||
// The alt option for JText::alt
|
||||
$alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name);
|
||||
?>
|
||||
|
||||
<fieldset id="<?php echo $id; ?>" class="<?php echo trim($class . ' checkboxes buttons'); ?>">
|
||||
|
||||
<?php foreach ($options as $i => $option) : ?>
|
||||
<?php
|
||||
// Initialize some option attributes.
|
||||
$checked = in_array((string) $option->value, $checkedOptions, true) ? 'checked' : '';
|
||||
|
||||
// In case there is no stored value, use the option's default state.
|
||||
$checked = (!$hasValue && $option->checked) ? 'checked' : $checked;
|
||||
$optionDisabled = !empty($option->disable) || $disabled ? 'disabled' : '';
|
||||
|
||||
$oid = $id . $i;
|
||||
$value = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8');
|
||||
$attributes = array_filter(array($checked, $optionDisabled));
|
||||
?>
|
||||
<div class="mce-widget mce-btn mceButton p-2" title="<?php echo $option->text;?>">
|
||||
<?php echo sprintf($format, $oid, $name, $value, implode(' ', $attributes)); ?>
|
||||
<span class="mce-ico mce-i-<?php echo $option->value;?> mceIcon mce_<?php echo $option->value;?>"></span>
|
||||
<label for="<?php echo $oid; ?>" class="checkbox"><?php echo $option->text; ?></label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<input type="hidden" name="<?php echo $name;?>" value="" />
|
||||
</fieldset>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
/**
|
||||
* Layout variables
|
||||
* -----------------
|
||||
* @var string $autocomplete Autocomplete attribute for the field.
|
||||
* @var boolean $autofocus Is autofocus enabled?
|
||||
* @var string $class Classes for the input.
|
||||
* @var string $description Description of the field.
|
||||
* @var boolean $disabled Is this field disabled?
|
||||
* @var string $group Group the field belongs to. <fields> section in form XML.
|
||||
* @var boolean $hidden Is this field hidden in the form?
|
||||
* @var string $hint Placeholder for the field.
|
||||
* @var string $id DOM id of the field.
|
||||
* @var string $label Label of the field.
|
||||
* @var string $labelclass Classes to apply to the label.
|
||||
* @var boolean $multiple Does this field support multiple values?
|
||||
* @var string $name Name of the input field.
|
||||
* @var string $onchange Onchange attribute for the field.
|
||||
* @var string $onclick Onclick attribute for the field.
|
||||
* @var string $pattern Pattern (Reg Ex) of value of the form field.
|
||||
* @var boolean $readonly Is this field read only?
|
||||
* @var boolean $repeat Allows extensions to duplicate elements.
|
||||
* @var boolean $required Is this field required?
|
||||
* @var integer $size Size attribute of the input.
|
||||
* @var boolean $spellcheck Spellcheck state for the form field.
|
||||
* @var string $validate Validation rules to apply.
|
||||
* @var string $value Value attribute of the field.
|
||||
* @var array $checkedOptions Options that will be set as checked.
|
||||
* @var boolean $hasValue Has this field a value assigned?
|
||||
* @var array $options Options available for this field.
|
||||
*/
|
||||
|
||||
// Including fallback code for HTML5 non supported browsers.
|
||||
JHtml::_('jquery.framework');
|
||||
JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
|
||||
|
||||
/**
|
||||
* The format of the input tag to be filled in using sprintf.
|
||||
* %1 - id
|
||||
* %2 - name
|
||||
* %3 - value
|
||||
* %4 = any other attributes
|
||||
*/
|
||||
$format = '<input type="checkbox" id="%1$s" name="%2$s" value="%3$s" %4$s />';
|
||||
|
||||
// The alt option for JText::alt
|
||||
$alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name);
|
||||
?>
|
||||
|
||||
<fieldset id="<?php echo $id; ?>" class="<?php echo trim($class . ' checkboxes'); ?>"
|
||||
<?php echo $required ? 'required aria-required="true"' : ''; ?>
|
||||
<?php echo $autofocus ? 'autofocus' : ''; ?>>
|
||||
|
||||
<?php foreach ($options as $i => $option) : ?>
|
||||
<?php
|
||||
// Initialize some option attributes.
|
||||
$checked = in_array((string) $option->value, $checkedOptions, true) ? 'checked' : '';
|
||||
|
||||
// In case there is no stored value, use the option's default state.
|
||||
$checked = (!$hasValue && $option->checked) ? 'checked' : $checked;
|
||||
$optionClass = !empty($option->class) ? 'class="' . $option->class . '"' : '';
|
||||
$optionDisabled = !empty($option->disable) || $disabled ? 'disabled' : '';
|
||||
|
||||
// Initialize some JavaScript option attributes.
|
||||
$onclick = !empty($option->onclick) ? 'onclick="' . $option->onclick . '"' : '';
|
||||
$onchange = !empty($option->onchange) ? 'onchange="' . $option->onchange . '"' : '';
|
||||
|
||||
$oid = $id . $i;
|
||||
$value = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8');
|
||||
$attributes = array_filter(array($checked, $optionClass, $optionDisabled, $onchange, $onclick));
|
||||
?>
|
||||
|
||||
<label for="<?php echo $oid; ?>" class="checkbox">
|
||||
<?php echo sprintf($format, $oid, $name, $value, implode(' ', $attributes)); ?>
|
||||
<?php echo $option->text; ?></label>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<input type="hidden" name="<?php echo $name;?>" value="" />
|
||||
</fieldset>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2018 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\Utilities\ArrayHelper;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
/**
|
||||
* Layout variables
|
||||
* -----------------
|
||||
* @var string $class Classes for the input.
|
||||
* @var string $id DOM id of the field.
|
||||
* @var string $name Name of the input field.
|
||||
* @var string $value Value attribute of the field.
|
||||
|
||||
*/
|
||||
|
||||
?>
|
||||
<div class="input-group input-append">
|
||||
<input type="text" class="colorpicker input-small" name="<?php echo $name; ?>" id="<?php echo $id; ?>" value="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?>" placeholder="#rrggbb" />
|
||||
<div class="input-group-append">
|
||||
<span class="add-on input-group-text colorpicker_widget"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
/**
|
||||
* Layout variables
|
||||
* -----------------
|
||||
* @var string $autocomplete Autocomplete attribute for the field.
|
||||
* @var boolean $autofocus Is autofocus enabled?
|
||||
* @var string $class Classes for the input.
|
||||
* @var string $description Description of the field.
|
||||
* @var boolean $disabled Is this field disabled?
|
||||
* @var string $group Group the field belongs to. <fields> section in form XML.
|
||||
* @var boolean $hidden Is this field hidden in the form?
|
||||
* @var string $hint Placeholder for the field.
|
||||
* @var string $id DOM id of the field.
|
||||
* @var string $label Label of the field.
|
||||
* @var string $labelclass Classes to apply to the label.
|
||||
* @var boolean $multiple Does this field support multiple values?
|
||||
* @var string $name Name of the input field.
|
||||
* @var string $onchange Onchange attribute for the field.
|
||||
* @var string $onclick Onclick attribute for the field.
|
||||
* @var string $pattern Pattern (Reg Ex) of value of the form field.
|
||||
* @var boolean $readonly Is this field read only?
|
||||
* @var boolean $repeat Allows extensions to duplicate elements.
|
||||
* @var boolean $required Is this field required?
|
||||
* @var integer $size Size attribute of the input.
|
||||
* @var boolean $spellcheck Spellcheck state for the form field.
|
||||
* @var string $validate Validation rules to apply.
|
||||
* @var string $value Value attribute of the field.
|
||||
* @var array $checkedOptions Options that will be set as checked.
|
||||
* @var boolean $hasValue Has this field a value assigned?
|
||||
* @var array $options Options available for this field.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The format of the input tag to be filled in using sprintf.
|
||||
* %1 - id
|
||||
* %2 - name
|
||||
* %3 - value
|
||||
* %4 = any other attributes
|
||||
*/
|
||||
$standard = '<input type="checkbox" id="%1$s" value="%3$s=%2$s" %4$s /><label for="%1$s" class="checkbox" style="font-family:%2$s">%3$s</label>';
|
||||
$custom = '<div class="span4 col-md-4"><input type="text" class="form-control span12" value="%3$s" placeholder="' . JText::_('WF_LABEL_NAME') . '" /></div><div class="span6 col-md-6"><input type="text" class="form-control span12" value="%2$s" placeholder="' . JText::_('WF_LABEL_FONTS') . ', eg: arial,helvetica,sans-serif" /></div><div class="span2 col-md-2"><a href="#" class="font-item-trash btn btn-link pull-right float-right"><i class="icon icon-trash"></i></a></div>';
|
||||
|
||||
// The alt option for JText::alt
|
||||
$alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name);
|
||||
?>
|
||||
|
||||
<fieldset id="<?php echo $id; ?>" class="<?php echo trim($class . ' checkboxes fontlist'); ?>">
|
||||
|
||||
<?php foreach ($options as $i => $option): ?>
|
||||
<?php
|
||||
// Initialize some option attributes.
|
||||
$checked = $option->checked ? 'checked' : '';
|
||||
|
||||
$optionDisabled = !empty($option->disable) || $disabled ? 'disabled' : '';
|
||||
|
||||
$oid = $id . $i;
|
||||
$value = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8');
|
||||
$attributes = array_filter(array($checked, $optionDisabled));
|
||||
|
||||
$format = $standard;
|
||||
|
||||
if ($option->custom) {
|
||||
$format = $custom;
|
||||
}
|
||||
?>
|
||||
<div class="font-item row form-row" title="<?php echo $option->text; ?>">
|
||||
<?php echo sprintf($format, $oid, $value, $option->text, implode(' ', $attributes)); ?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
|
||||
<div class="font-item row form-row controls controls-row">
|
||||
<?php echo sprintf($custom, '', '', '', ''); ?>
|
||||
</div>
|
||||
|
||||
<div class="font-item row form-row" hidden>
|
||||
<?php echo sprintf($custom, '', '', '', ''); ?>
|
||||
</div>
|
||||
|
||||
<a href="#" class="btn btn-link font-item-plus"><span class="span10 col-md-10 text-left"><?php echo JText::_('WF_PARAM_FONTS_NEW');?></span><i class="icon icon-plus pull-right float-right"></i></a>
|
||||
|
||||
<input type="hidden" name="<?php echo $name;?>" value="" />
|
||||
|
||||
</fieldset>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
?>
|
||||
|
||||
<fieldset class="<?php echo !empty($displayData->formclass) ? $displayData->formclass : 'form-horizontal'; ?>">
|
||||
<legend><?php echo $displayData->name; ?></legend>
|
||||
<?php if (!empty($displayData->description)) : ?>
|
||||
<p><?php echo $displayData->description; ?></p>
|
||||
<?php endif; ?>
|
||||
<?php $fieldsnames = explode(',', $displayData->fieldsname); ?>
|
||||
<?php foreach ($fieldsnames as $fieldname) : ?>
|
||||
<?php foreach ($displayData->form->getFieldset($fieldname) as $field) : ?>
|
||||
<?php $datashowon = ''; ?>
|
||||
<?php $groupClass = $field->type === 'Spacer' ? ' field-spacer' : ''; ?>
|
||||
<?php if ($field->showon) : ?>
|
||||
<?php JHtml::_('jquery.framework'); ?>
|
||||
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
|
||||
<?php $datashowon = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
|
||||
<?php endif; ?>
|
||||
<div class="control-group<?php echo $groupClass; ?>"<?php echo $datashowon; ?>>
|
||||
<?php if (!isset($displayData->showlabel) || $displayData->showlabel) : ?>
|
||||
<div class="control-label"><?php echo $field->label; ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="controls"><?php echo $field->input; ?></div>
|
||||
<?php if ($field->description) : ?>
|
||||
<small class="description"><?php echo JText::_($field->description); ?></small>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package JCE.System
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @copyright Copyright (C) 2022 Ryan Demmer All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Helper\MediaHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
/**
|
||||
* Layout variables
|
||||
* -----------------
|
||||
* @var string $asset The asset text
|
||||
* @var string $authorField The label text
|
||||
* @var integer $authorId The author id
|
||||
* @var string $class The class text
|
||||
* @var boolean $disabled True if field is disabled
|
||||
* @var string $folder The folder text
|
||||
* @var string $id The label text
|
||||
* @var string $link The link text
|
||||
* @var string $name The name text
|
||||
* @var string $preview The preview image relative path
|
||||
* @var integer $previewHeight The image preview height
|
||||
* @var integer $previewWidth The image preview width
|
||||
* @var string $onchange The onchange text
|
||||
* @var boolean $readonly True if field is readonly
|
||||
* @var integer $size The size text
|
||||
* @var string $value The value text
|
||||
* @var string $src The path and filename of the image
|
||||
* @var array $mediaTypes The supported media types for the Media Manager
|
||||
* @var array $imagesExt The supported extensions for images
|
||||
* @var array $audiosExt The supported extensions for audios
|
||||
* @var array $videosExt The supported extensions for videos
|
||||
* @var array $documentsExt The supported extensions for documents
|
||||
* @var string $dataAttribute Miscellaneous data attributes preprocessed for HTML output
|
||||
* @var array $dataAttributes Miscellaneous data attribute for eg, data-*
|
||||
*/
|
||||
|
||||
$attr = '';
|
||||
|
||||
// Initialize some field attributes.
|
||||
$attr .= !empty($class) ? ' class="form-control field-media-input ' . $class . '"' : ' class="form-control field-media-input"';
|
||||
$attr .= !empty($size) ? ' size="' . $size . '"' : '';
|
||||
$attr .= $dataAttribute;
|
||||
|
||||
// Initialize JavaScript field attributes.
|
||||
$attr .= !empty($onchange) ? ' onchange="' . $onchange . '"' : '';
|
||||
|
||||
switch ($preview) {
|
||||
case 'false':
|
||||
$showPreview = false;
|
||||
break;
|
||||
case 'true':
|
||||
default:
|
||||
$showPreview = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// clean up image src
|
||||
if (MediaHelper::isImage($value)) {
|
||||
$value = MediaHelper::getCleanMediaFieldValue($value);
|
||||
}
|
||||
|
||||
// Pre fill the contents of the popover
|
||||
if ($showPreview) {
|
||||
$cleanValue = MediaHelper::getCleanMediaFieldValue($value);
|
||||
|
||||
if ($cleanValue && file_exists(JPATH_ROOT . '/' . $cleanValue)) {
|
||||
$src = Uri::root() . $value;
|
||||
} else {
|
||||
$src = '';
|
||||
}
|
||||
|
||||
$width = $previewWidth;
|
||||
$height = $previewHeight;
|
||||
$style = '';
|
||||
$style .= ($width > 0) ? 'max-width:' . $width . 'px;' : '';
|
||||
$style .= ($height > 0) ? 'max-height:' . $height . 'px;' : '';
|
||||
|
||||
$imgattr = array(
|
||||
'id' => $id . '_preview',
|
||||
'class' => 'media-preview',
|
||||
'style' => $style,
|
||||
);
|
||||
|
||||
$img = HTMLHelper::_('image', $src, Text::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $imgattr);
|
||||
|
||||
$previewImg = '<div id="' . $id . '_preview_img">' . $img . '<span class="field-media-preview-icon"></span></div>';
|
||||
|
||||
$showPreview = 'static';
|
||||
}
|
||||
|
||||
// The url for the modal
|
||||
$url = $readonly ? '' : $link;
|
||||
|
||||
// Correctly route the url to ensure it's correctly using sef modes and subfolders
|
||||
$url = Route::_($url);
|
||||
$doc = Factory::getDocument();
|
||||
$wam = $doc->getWebAssetManager();
|
||||
|
||||
$modalHTML = HTMLHelper::_(
|
||||
'bootstrap.renderModal',
|
||||
'imageModal_' . $id,
|
||||
[
|
||||
'url' => $url,
|
||||
'title' => Text::_('JLIB_FORM_CHANGE_IMAGE'),
|
||||
'closeButton' => true,
|
||||
'height' => '100%',
|
||||
'width' => '100%',
|
||||
'modalWidth' => '80',
|
||||
'bodyHeight' => '60',
|
||||
'footer' => '<button type="button" class="btn btn-success button-save-selected">' . Text::_('JSELECT') . '</button>'
|
||||
. '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('JCANCEL') . '</button>',
|
||||
]
|
||||
);
|
||||
|
||||
// only load media field stylesheet
|
||||
$wam->useStyle('webcomponent.field-media');
|
||||
|
||||
?>
|
||||
<joomla-field-media class="field-media-wrapper wf-media-wrapper-custom"
|
||||
base-path="<?php echo Uri::root(); ?>"
|
||||
url="<?php echo $url; ?>"
|
||||
input=".field-media-input"
|
||||
button-select=".button-select"
|
||||
button-clear=".button-clear"
|
||||
button-save-selected=".button-save-selected" <?php /* button items remain in to prevent errors */ ?>
|
||||
>
|
||||
<?php echo $modalHTML; ?>
|
||||
<?php if ($showPreview) : ?>
|
||||
<div class="field-media-preview">
|
||||
<?php echo ' ' . $previewImg; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input-group">
|
||||
<input type="text" name="<?php echo $name; ?>" id="<?php echo $id; ?>" value="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?>" <?php echo $attr; ?>>
|
||||
<?php if ($disabled != true) : ?>
|
||||
<button type="button" class="btn btn-success button-select"><?php echo Text::_('JLIB_FORM_BUTTON_SELECT'); ?></button>
|
||||
<button type="button" class="btn btn-danger button-clear"><span class="icon-times" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('JLIB_FORM_BUTTON_CLEAR'); ?></span></button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</joomla-field-media>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
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']))
|
||||
{
|
||||
JHtml::_('jquery.framework');
|
||||
JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true));
|
||||
}
|
||||
|
||||
$class = empty($options['class']) ? '' : ' ' . $options['class'];
|
||||
$rel = empty($options['rel']) ? '' : ' ' . $options['rel'];
|
||||
?>
|
||||
<div class="control-group<?php echo $class; ?>"<?php echo $rel; ?>>
|
||||
<?php if (empty($options['hiddenLabel'])) : ?>
|
||||
<div class="control-label"><?php echo $label; ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="controls"><?php echo $input; ?></div>
|
||||
<?php if (!empty($options['description'])) : ?>
|
||||
<small class="description"><?php echo JText::_($options['description']);?></small>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Layout
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
extract($displayData);
|
||||
|
||||
/**
|
||||
* Layout variables
|
||||
* ---------------------
|
||||
* $text : (string) The label text
|
||||
* $description : (string) An optional description to use in a tooltip
|
||||
* $for : (string) The id of the input this label is for
|
||||
* $required : (boolean) True if a required field
|
||||
* $classes : (array) A list of classes
|
||||
* $position : (string) The tooltip position. Bottom for alias
|
||||
*/
|
||||
|
||||
$classes = array_filter((array) $classes);
|
||||
|
||||
$id = $for . '-lbl';
|
||||
$title = '';
|
||||
|
||||
if (!empty($description))
|
||||
{
|
||||
if ($text && $text !== $description)
|
||||
{
|
||||
$classes[] = 'hasPopover';
|
||||
$title = ' title="' . htmlspecialchars(trim($text, ':')) . '"' . ' data-content="'. htmlspecialchars($description) . '"';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<label id="<?php echo $id; ?>" for="<?php echo $for; ?>"<?php if (!empty($classes)) echo ' class="' . implode(' ', $classes) . '"'; ?><?php echo $title; ?>>
|
||||
<?php echo $text; ?><?php if ($required) : ?><span class="star"> *</span><?php endif; ?>
|
||||
</label>
|
||||
12
administrator/components/com_jce/layouts/message/upgrade.php
Normal file
12
administrator/components/com_jce/layouts/message/upgrade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="alert alert-info" role="alert">
|
||||
<h4><i class="icon-star"></i> Go Pro and get more from JCE <a href="https://www.joomlacontenteditor.net/subscribe" class="btn btn-primary" target="_blank" title="Get JCE Editor Pro"><strong>Get JCE Editor Pro</strong></a></h4>
|
||||
<ul>
|
||||
<li>Resize, Thumbnail and Edit images</li>
|
||||
<li>Manage Audio and Video</li>
|
||||
<li>Create styled image captions</li>
|
||||
<li>Manage and create links to files</li>
|
||||
<li>Edit HTML in the Source Code Editor</li>
|
||||
<li>Write faster with <a href="https://en.wikipedia.org/wiki/Markdown" title="Markdown" target="_blank"><strong>Markdown</strong></a> support</li>
|
||||
<li>And much more...</li>
|
||||
</ul>
|
||||
</div>
|
||||
10
administrator/components/com_jce/layouts/message/welcome.php
Normal file
10
administrator/components/com_jce/layouts/message/welcome.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="alert alert-info" role="alert">
|
||||
<h2>Welcome to JCE Pro!</h2>
|
||||
<p>You will now need to add the Pro buttons you require to the editor toolbar of each profile in use.</p>
|
||||
<ol>
|
||||
<li>Go to <a href="index.php?option=com_jce&view=profiles"><u>Editor Profiles</u></a> and click on the name a profile to edit it.</li>
|
||||
<li>Click on the Features & Layout tab, and scroll down to <strong>Current Editor Layout</strong></li>
|
||||
<li>Drag the buttons you require from the <strong>Available Buttons & Toolbars</strong> area into the <strong>Current Editor Layout</strong></li>
|
||||
<li>Click the <strong>Save</strong> button</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
$title = JText::_('WF_PROFILES_IMPORT_IMPORT');
|
||||
?>
|
||||
<joomla-toolbar-button>
|
||||
<div class="upload-profile-container">
|
||||
<input name="profile_file" accept="application/xml" type="file" />
|
||||
<button class="button-import btn btn-small btn-sm btn-outline-primary"><span class="icon-upload text-body" title="<?php echo $title; ?>"></span> <?php echo $title; ?></button>
|
||||
</div>
|
||||
</joomla-toolbar-button>
|
||||
Reference in New Issue
Block a user