first commit
146
plugins/pagebuilderck/accordion/accordion.php
Normal file
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870
|
||||
* https://www.template-creator.com
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.event.plugin');
|
||||
|
||||
class plgPagebuilderckAccordion extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_ACCORDION';
|
||||
|
||||
private $type = 'accordion';
|
||||
|
||||
function __construct(&$subject, $params) {
|
||||
|
||||
parent::__construct($subject, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the Menu Item to drag into the interface
|
||||
*
|
||||
* Return Object with item data
|
||||
*/
|
||||
public function onPagebuilderckAddItemToMenu() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// create the menu item
|
||||
$menuitem = new stdClass();
|
||||
$menuitem->type = $this->type;
|
||||
$menuitem->group = 'text';
|
||||
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
|
||||
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
|
||||
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/accordion/assets/images/accordion.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentAccordion() {
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('ckid', '', 'string');
|
||||
// ckstyle and inner classes are needed to get the styles from the interface
|
||||
?>
|
||||
<div id="<?php echo $id; ?>" class="cktype" data-type="accordion" onshow="jQuery(this).find('.accordionsck').accordionck(accordionckOptions);ckAddEditionForNestedAddons('#<?php echo $id; ?>');">
|
||||
<div class="ckstyle">
|
||||
</div>
|
||||
<div id="<?php echo $id; ?>_accordion" class="accordionsck">
|
||||
<h3><span class="itemtitleck">Section 1</span></h3>
|
||||
<div>
|
||||
<div class="innercontent"></div>
|
||||
<div class="accordionck itemcontentck">
|
||||
<p>
|
||||
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
|
||||
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
|
||||
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
|
||||
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
|
||||
</p>
|
||||
</div>
|
||||
<div class="innercontent"></div>
|
||||
</div>
|
||||
<h3><span class="itemtitleck">Section 2</span></h3>
|
||||
<div>
|
||||
<div class="innercontent"></div>
|
||||
<div class="accordionck itemcontentck">
|
||||
<p>
|
||||
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
|
||||
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
|
||||
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
|
||||
suscipit faucibus urna.
|
||||
</p>
|
||||
</div>
|
||||
<div class="innercontent"></div>
|
||||
</div>
|
||||
<h3><span class="itemtitleck">Section 3</span></h3>
|
||||
<div>
|
||||
<div class="innercontent"></div>
|
||||
<div class="accordionck itemcontentck">
|
||||
<p>
|
||||
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
|
||||
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
|
||||
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
|
||||
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
|
||||
</p>
|
||||
<ul>
|
||||
<li>List item one</li>
|
||||
<li>List item two</li>
|
||||
<li>List item three</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="innercontent"></div>
|
||||
</div>
|
||||
<h3><span class="itemtitleck">Section 4</span></h3>
|
||||
<div>
|
||||
<div class="innercontent"></div>
|
||||
<div class="accordionck itemcontentck">
|
||||
<p>
|
||||
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
|
||||
et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
|
||||
faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
|
||||
mauris vel est.
|
||||
</p>
|
||||
<p>
|
||||
Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
|
||||
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</div>
|
||||
<div class="innercontent"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsAccordion() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/accordion/layouts/edit_accordion.php';
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the frontend page
|
||||
* @param string the item object from simple_html_dom
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckRenderItemAccordion($item) {
|
||||
return $item->innertext;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/accordion/accordion.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3" type="plugin" group="pagebuilderck" method="upgrade">
|
||||
<name>plg_pagebuilderck_accordion_xml_name</name>
|
||||
<creationDate>December 2015</creationDate>
|
||||
<copyright>Copyright (C) 2015. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>Accordion item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="accordion">accordion.php</filename>
|
||||
<folder>language</folder>
|
||||
<folder>layouts</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_accordion.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_accordion.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_accordion.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_accordion.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="512px" height="512px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"><g transform="matrix(2.08267,0,0,2.08267,-425.202,2.84748)"><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><rect x="0" y="0" width="44" height="44" style="fill:none;"/></g><g transform="matrix(7.25534,0,0,4.33604,168.604,-23.5604)"><path d="M7.333,9.548C7.333,6.688 8.421,7.333 11,7.333L33,7.333C35.579,7.333 36.667,6.728 36.667,9.548L36.667,16.192C36.667,19.052 35.579,18.333 33,18.333L11,18.333C8.364,18.333 7.333,19.052 7.333,16.192L7.333,9.548Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.61px;"/></g><g transform="matrix(7.25534,0,0,4.33604,168.604,29.5271)"><path d="M7.333,9.548C7.333,6.688 8.421,7.333 11,7.333L33,7.333C35.579,7.333 36.667,6.728 36.667,9.548L36.667,16.192C36.667,19.052 35.579,18.333 33,18.333L11,18.333C8.364,18.333 7.333,19.052 7.333,16.192L7.333,9.548Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.61px;"/></g><g transform="matrix(7.25534,0,0,4.33604,168.604,150.36)"><path d="M7.333,9.548C7.333,6.688 8.421,7.333 11,7.333L33,7.333C35.579,7.333 36.667,6.728 36.667,9.548L36.667,16.192C36.667,19.052 35.579,18.333 33,18.333L11,18.333C8.364,18.333 7.333,19.052 7.333,16.192L7.333,9.548Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.61px;"/></g><g transform="matrix(0.623506,0,0,0.684822,181.074,-73.3238)"><path d="M120,270L120,372.665" style="fill:none;stroke:black;stroke-width:14.66px;stroke-miterlimit:1.5;"/></g><g transform="matrix(0.623506,0,0,0.684822,156.134,-73.3238)"><path d="M400,270L400,372.665" style="fill:none;stroke:black;stroke-width:14.66px;stroke-miterlimit:1.5;"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
1
plugins/pagebuilderck/accordion/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
1
plugins/pagebuilderck/accordion/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@@ -0,0 +1,10 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ACCORDION_XML_NAME="Page Builder CK - Accordion"
|
||||
PLG_PAGEBUILDERCK_ACCORDION_MENUITEM_TITLE="Accordion"
|
||||
PLG_PAGEBUILDERCK_ACCORDION_MENUITEM_DESC="Custom text into an accordion"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ACCORDION_XML_NAME="Page Builder CK - Accordion"
|
||||
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@@ -0,0 +1,9 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ACCORDION_XML_NAME="Page Builder CK - Accordéon"
|
||||
PLG_PAGEBUILDERCK_ACCORDION_MENUITEM_TITLE="Accordéon"
|
||||
PLG_PAGEBUILDERCK_ACCORDION_MENUITEM_DESC="Accordéon avec contenu personnalisé"
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ACCORDION_XML_NAME="Page Builder CK - Accordéon"
|
||||
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/accordion/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
209
plugins/pagebuilderck/accordion/layouts/edit_accordion.php
Normal file
@@ -0,0 +1,209 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
<div class="menustylescustom" data-prefix="accordionicon" data-rule=".ui-accordion-header .pbckicon"></div>
|
||||
<div id="elementscontainer">
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_ACCORDION_EDITION'); ?></div>
|
||||
<div class="tab menustyles ckproperty tab_fullscreen" id="tab_blocstyles">
|
||||
<?php // echo PagebuilderckHelper::renderEditionButtons(); ?>
|
||||
<div id="items_edition_list">
|
||||
</div>
|
||||
<div onclick="ckAddNewListItem()" class="item_add ckbutton ckbutton-primary"><?php echo JText::_('CK_ADD_ITEM'); ?></div>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_iconstyles"><?php echo JText::_('CK_ICON'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_iconstyles">
|
||||
<?php echo $this->menustyles->createIconLight('accordionicon') ?>
|
||||
<?php echo $this->menustyles->createIconSvgLight('icon') ?>
|
||||
<?php //echo $this->menustyles->createIconOptions('icon') ?>
|
||||
<?php echo $this->menustyles->createBackground('icon') ?>
|
||||
<?php echo $this->menustyles->createDimensions('icon', true, true) ?>
|
||||
<?php echo $this->menustyles->createDecoration('icon') ?>
|
||||
<?php echo $this->menustyles->createShadow('icon') ?>
|
||||
<?php echo $this->menustyles->createCustom('icon') ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_headingaccordionstyles"><?php echo JText::_('CK_ACCORDION_HEADING_STYLE'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_headingaccordionstyles">
|
||||
<?php echo $this->menustyles->createBlocStyles('headingaccordion', 'accordionsck', false, false) ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_activeheadingaccordionstyles"><?php echo JText::_('CK_ACCORDION_ACTIVE_HEADING_STYLE'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_activeheadingaccordionstyles">
|
||||
<?php echo $this->menustyles->createBlocStyles('activeheadingaccordion', 'accordionsck', false, false) ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_contentaccordionstyles"><?php echo JText::_('CK_ACCORDION_CONTENT_STYLE'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_contentaccordionstyles">
|
||||
<?php echo $this->menustyles->createBlocStyles('contentaccordion', 'accordionsck', false, false) ?>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
var focus = $ck('.editfocus');
|
||||
function ckLoadEditionPopup() {
|
||||
var noactivetabscss = focus.find('.accordionsck').attr('activetab') === 'false' ? ' ckbutton-warning active' : '';
|
||||
$ck('#items_edition_list').append('<div><div class="item_setdefault ckbutton'+noactivetabscss+'" onclick="ckSetDefaultEditItem($ck(this).parent())"><span class="icon icon-star"></span> <?php echo JText::_('CK_SET_DEFAULT_CLOSED', true) ?></div></div>');
|
||||
$ck('.accordionsck .itemtitleck', focus).each(function(i, el) {
|
||||
// B/C nested addons
|
||||
var content = $ck('.accordionsck > div').eq(i);
|
||||
if (content.hasClass('itemcontentck') && content.find('.itemcontentck').length) {
|
||||
content.removeClass('itemcontentck');
|
||||
}
|
||||
|
||||
var itemedition = ckCreateEditItem(i, $ck('#items_edition_list'), $ck(el).text(), ckContentToEditor($ck('.accordionsck .itemcontentck', focus).eq(i).html()), true, $ck('.accordionsck .itemtitleck .iconck', focus).eq(i).html());
|
||||
ckMakeEditItemAccordion(itemedition);
|
||||
ckLoadEditorOnTheFly('item_content_' + i);
|
||||
ckGetItemIcon(i, '.itemtitleck');
|
||||
});
|
||||
$ck('.item_setdefault').eq((parseInt(focus.find('.accordionsck').attr('activetab'))+1)).addClass('ckbutton-warning').addClass('active');
|
||||
ckMakeEditItemsSortable();
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
}
|
||||
|
||||
/* override the JS function for custom use */
|
||||
function ckSelectIcon(icon) {
|
||||
/*var item = $ck('#items_edition_list .ckfieldfocus');
|
||||
if (! item.length) return;
|
||||
item.find('.iconck').empty().append(icon);
|
||||
var focusIcon = item.find('.iconck');
|
||||
// if svg icon, empty the css class
|
||||
if (focusIcon.find('svg').length) {
|
||||
item.find('.item_icon_edition').val('');
|
||||
}
|
||||
return focusIcon;*/
|
||||
return ckSelectIconFromEdition(icon);
|
||||
}
|
||||
|
||||
function ckMakeEditItemAccordion(el) {
|
||||
$ck(el).accordionck({
|
||||
header: ".item_toggler",
|
||||
collapsible: true,
|
||||
active: false,
|
||||
heightStyle: "content"
|
||||
});
|
||||
}
|
||||
|
||||
function ckAddNewListItem() {
|
||||
// add the element in the accordion
|
||||
$ck('.accordionsck', focus).append(ckGetNewAccordionItem('Lorem Ipsum ...', '<p>Lorem Ipsum ...</p>'));
|
||||
$ck('.accordionsck', focus).accordionck( "refresh" );
|
||||
// add the element for edition
|
||||
var index = $ck('.accordionsck > .ui-accordion-header', focus).length;
|
||||
var itemedition = ckCreateEditItem(index, $ck('#items_edition_list'), 'Lorem Ipsum ...', '<p>Lorem Ipsum ...</p>', true);
|
||||
ckMakeEditItemAccordion(itemedition);
|
||||
ckLoadEditorOnTheFly('item_content_' + index);
|
||||
}
|
||||
|
||||
function ckGetNewAccordionItem(title, content) {
|
||||
var html = '<h3><span class="itemtitleck">'+title+'</span></h3>'
|
||||
+'<div>'
|
||||
+'<div class="innercontent"></div>'
|
||||
+'<div class="accordionck itemcontentck">'
|
||||
+content
|
||||
+'</div>'
|
||||
+'<div class="innercontent"></div>';
|
||||
+'</div>'
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
$ck('.item_content_edition').each(function() {
|
||||
var textID = $ck(this).attr('id');
|
||||
ckSaveEditorOnTheFly(textID);
|
||||
// ckRemoveEditorOnTheFly(textID);
|
||||
});
|
||||
$ck('#items_edition_list .item_edition:not(.ui-sortable-helper)').each(function(i, el) {
|
||||
var $el = $ck(el);
|
||||
$ck('.itemtitleck', focus).eq(i).text($el.find('.item_title_edition').val());
|
||||
$ck('.itemcontentck', focus).eq(i).html(ckEditorToContent($el.find('.item_content_edition').val()));
|
||||
if ($el.find('.iconck').html()) $ck('.itemtitleck', focus).eq(i).prepend('<span class="iconck">' + $el.find('.iconck').html() + '</span>');
|
||||
ckSetIconFromEdition(i, $el, focus, '.itemtitleck');
|
||||
});
|
||||
|
||||
var activetab = false;
|
||||
$ck('#popup_editionck .item_edition').each(function(i, el) {
|
||||
if ($ck(el).find('.item_setdefault.active').length) {
|
||||
activetab = i;
|
||||
}
|
||||
// since 2.19.0 add nested addons
|
||||
if (! $ck('.editfocus > .accordionsck > .ui-accordion-content').eq(i).find('> .innercontent').length) {
|
||||
var contentArea = $ck('.editfocus > .accordionsck > .ui-accordion-content').eq(i);
|
||||
contentArea.html('<div class="innercontent"></div><div class="itemcontentck">' + contentArea.html() + '</div><div class="innercontent"></div>');
|
||||
ckAddEditionForNestedAddons('#<?php echo $id; ?>');
|
||||
}
|
||||
});
|
||||
|
||||
focus.find('.accordionsck').attr('activetab', activetab).accordionck("refresh");
|
||||
var vPos = $ck('#iconicon-position button.active').attr('data-position');
|
||||
$ck('.editfocus .itemtitleck .pbckicon').css('vertical-align', vPos);
|
||||
}
|
||||
|
||||
function ckSaveInlineEditionPopup() {
|
||||
ckBeforeSaveEditionPopup();
|
||||
}
|
||||
|
||||
function ckSetDefaultEditItem(item) {
|
||||
$ck('.item_setdefault').removeClass('ckbutton-warning').removeClass('active');
|
||||
item.find('.item_setdefault').addClass('ckbutton-warning').addClass('active');
|
||||
}
|
||||
|
||||
function ckBeforeCloseEditionPopup() {
|
||||
$ck('.item_content_edition').each(function() {
|
||||
ckRemoveEditorOnTheFly($ck(this).attr('id'));
|
||||
});
|
||||
}
|
||||
|
||||
function ckBeforeDeleteEditItem(item) {
|
||||
var index_item = item.index('.item_edition');
|
||||
ckRemoveEditorOnTheFly(item.find('.item_content_edition').attr('id'));
|
||||
$ck('.accordionsck > .ui-accordion-header', focus).eq(index_item).find('+ .ui-accordion-content').remove();
|
||||
$ck('.accordionsck > .ui-accordion-header', focus).eq(index_item).remove();
|
||||
$ck('.accordionsck', focus).accordionck("refresh");
|
||||
}
|
||||
|
||||
function ckUpdatePreviewArea() {
|
||||
// var focus = $ck('.editfocus');
|
||||
// $ck('#items_edition_list .item_edition:not(.ui-sortable-helper)').each(function(i, el) {
|
||||
// $ck('.itemtitleck', focus).eq(i).text($ck(el).find('.item_title_edition').val());
|
||||
// $ck('.itemcontentck', focus).eq(i).html($ck(el).find('.item_content_edition').val());
|
||||
// });
|
||||
}
|
||||
|
||||
function ckMakeEditItemsSortable() {
|
||||
$ck( "#items_edition_list" ).sortable({
|
||||
items: ".item_edition",
|
||||
helper: "clone",
|
||||
// axis: "y",
|
||||
handle: "> .item_move",
|
||||
forcePlaceholderSize: true,
|
||||
tolerance: "pointer",
|
||||
placeholder: "placeholderck",
|
||||
// zIndex: 9999,
|
||||
start: function(e, ui){
|
||||
$ck(this).find('.item_content_edition').each(function(){
|
||||
if (tinymce.get($ck(this).attr('id'))) {
|
||||
ckRemoveEditorOnTheFly($ck(this).attr('id'));
|
||||
}
|
||||
});
|
||||
},
|
||||
update: function(e, ui) {
|
||||
$ck(this).find('.item_content_edition:not(.ui-sortable-helper)').each(function(){
|
||||
ckLoadEditorOnTheFly($ck(this).attr('id'));
|
||||
});
|
||||
ckUpdatePreviewArea();
|
||||
$ck( "#<?php echo $id; ?>_preview_accordion" ).accordionck("refresh");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ckInitIconPosition('.editfocus .itemtitleck .pbckicon', '#iconicon-position button');
|
||||
</script>
|
||||
1
plugins/pagebuilderck/accordion/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
18
plugins/pagebuilderck/audio/assets/images/audio.svg
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;">
|
||||
<g transform="matrix(2.08267,0,0,2.08267,-425.202,2.84748)">
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<rect x="0" y="0" width="44" height="44" style="fill:none;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M27.5,14.667C29.806,16.397 31.167,19.117 31.167,22C31.167,24.883 29.806,27.603 27.5,29.333" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:2.15px;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M32.45,9.167C36.324,12.297 38.579,17.019 38.579,22C38.579,26.981 36.324,31.703 32.45,34.833" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:2.15px;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M11,27.5L7.333,27.5C6.328,27.5 5.5,26.672 5.5,25.667L5.5,18.333C5.5,17.328 6.328,16.5 7.333,16.5L11,16.5L17.417,8.25C17.668,7.762 18.172,7.455 18.721,7.455C19.525,7.455 20.187,8.117 20.187,8.921C20.187,9.004 20.18,9.086 20.167,9.167L20.167,34.833C20.18,34.914 20.187,34.996 20.187,35.079C20.187,35.883 19.525,36.545 18.721,36.545C18.172,36.545 17.668,36.238 17.417,35.75L11,27.5" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:2.15px;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
BIN
plugins/pagebuilderck/audio/assets/images/audio_example.jpg
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
1
plugins/pagebuilderck/audio/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
1
plugins/pagebuilderck/audio/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
95
plugins/pagebuilderck/audio/audio.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870
|
||||
* https://www.template-creator.com
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.event.plugin');
|
||||
|
||||
class plgPagebuilderckAudio extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_AUDIO';
|
||||
|
||||
private $type = 'audio';
|
||||
|
||||
function __construct(&$subject, $params) {
|
||||
|
||||
parent::__construct($subject, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the Menu Item to drag into the interface
|
||||
*
|
||||
* Return Object with item data
|
||||
*/
|
||||
public function onPagebuilderckAddItemToMenu() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// create the menu item
|
||||
$menuitem = new stdClass();
|
||||
$menuitem->type = $this->type;
|
||||
$menuitem->group = 'multimedia';
|
||||
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
|
||||
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
|
||||
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/audio/assets/images/audio.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentAudio() {
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('ckid', '', 'string');
|
||||
// ckstyle and inner classes are needed to get the styles from the interface
|
||||
?>
|
||||
<div id="<?php echo $id; ?>" class="cktype" data-type="audio">
|
||||
<div class="ckstyle">
|
||||
</div>
|
||||
<div class="inner">
|
||||
<div class="audiock">
|
||||
<img src="<?php echo JUri::root(true); ?>/plugins/pagebuilderck/audio/assets/images/audio_example.jpg" width="300" height="auto" data-src="" />
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsAudio() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/audio/layouts/edit_audio.php';
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the frontend page
|
||||
* @param string the item object from simple_html_dom
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckRenderItemAudio($item) {
|
||||
$attrs = $item->find('.tab_audio');
|
||||
$params = PagebuilderckFrontHelper::createParamsFromElement($attrs);
|
||||
|
||||
$audiosrc = PagebuilderckFrontHelper::getSource($params->get('audiourl'));
|
||||
$html ='<audio style="width:100%;box-sizing:border-box;max-width:100%;" controls src="' . $audiosrc . '" ' . ($params->get('autoplayyes') == 'checked' ? 'autoplay' : '') . '>'
|
||||
. 'Your browser does not support the audio element.'
|
||||
. '</audio>';
|
||||
|
||||
$html = preg_replace('#<div class="audiock"[^>]*>(.*?)<\/div>#is', $html, $item->innertext);
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/audio/audio.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3" type="plugin" group="pagebuilderck" method="upgrade">
|
||||
<name>plg_pagebuilderck_audio_xml_name</name>
|
||||
<creationDate>December 2015</creationDate>
|
||||
<copyright>Copyright (C) 2015. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>Audio item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="audio">audio.php</filename>
|
||||
<folder>language</folder>
|
||||
<folder>layouts</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_audio.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_audio.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_audio.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_audio.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
@@ -0,0 +1,10 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_AUDIO_XML_NAME="Page Builder CK - Audio player"
|
||||
PLG_PAGEBUILDERCK_AUDIO_MENUITEM_TITLE="Audio player"
|
||||
PLG_PAGEBUILDERCK_AUDIO_MENUITEM_DESC="Play your audio files"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_AUDIO_XML_NAME="Page Builder CK - Audio player"
|
||||
1
plugins/pagebuilderck/audio/language/en-GB/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@@ -0,0 +1,9 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_AUDIO_XML_NAME="Page Builder CK - Lecteur audio"
|
||||
PLG_PAGEBUILDERCK_AUDIO_MENUITEM_TITLE="Lecteur audio"
|
||||
PLG_PAGEBUILDERCK_AUDIO_MENUITEM_DESC="Jouer vos fichiers audio"
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_AUDIO_XML_NAME="Page Builder CK - Lecteur audio"
|
||||
1
plugins/pagebuilderck/audio/language/fr-FR/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/audio/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
105
plugins/pagebuilderck/audio/layouts/edit_audio.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
<div id="elementscontainer">
|
||||
<div class="menulink" tab="tab_audio"><?php echo JText::_('CK_AUDIO_EDITION'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_audio">
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_AUDIO_FILE'); ?></div>
|
||||
<div class="menustyles-row">
|
||||
<div class="menustyles-field-large" >
|
||||
<input class="inputbox" type="text" value="" name="audiourl" id="audiourl" onchange="ckUpdateAudioPreview()" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a class="ckbuttonstyle" href="javascript:void(0)" onclick="ckCallMediaManagerPopup('audiourl', 'audio')" onchange="ckUpdateAudioPreview()()"><?php echo JText::_('CK_SELECT') ?></a>
|
||||
</div>
|
||||
<div id="previewareabloc">
|
||||
<div class="audiock">
|
||||
</div>
|
||||
</div>
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_OPTIONS'); ?></div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>control_play.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_AUTOPLAY'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field ckbutton-group">
|
||||
<input type="radio" class="inputbox" name="autoplay" id="autoplayyes" onclick="ckUpdateAudioPreview()" value="1" />
|
||||
<label for="autoplayyes" class="ckbutton"><?php echo JText::_('JYES') ?></label>
|
||||
<input type="radio" class="inputbox" name="autoplay" id="autoplayno" onclick="ckUpdateAudioPreview()" value="0" />
|
||||
<label for="autoplayno" class="ckbutton"><?php echo JText::_('JNO') ?></label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_CSS_CLASS'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox" type="text" name="audiocssclass" id="audiocssclass" value="" onchange="ckUpdateAudioAttribute('class', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_blocstyles">
|
||||
<?php echo $this->menustyles->createBlocStyles('bloc', 'audio', '') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function ckLoadEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
// var focus_audio = $ck('.editfocus iframe');
|
||||
$ck('#previewareabloc > .inner').html(focus.find('> .inner').html());
|
||||
$ck('#previewareabloc .ckstyle').html(focus.find('.ckstyle').html());
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
ckUpdateAudioPreview();
|
||||
// focus.find('> .inner').html($ck('#previewareabloc > .inner').html());
|
||||
focus.find('.ckstyle').html($ck('#previewareabloc .ckstyle').html());
|
||||
// ckSaveEditionPopup(focus.attr('id'));
|
||||
// ckCloseEditionPopup();
|
||||
}
|
||||
|
||||
function ckUpdateAudioPreview() {
|
||||
var audioSrc = $ck('#audiourl').val();
|
||||
if (audioSrc.substr(0,1) == '/') {
|
||||
audioSrc = audioSrc.slice(1,audioSrc.length);
|
||||
}
|
||||
audioSrc = (/^(f|ht)tps?:\/\//i.test(audioSrc)) ? audioSrc : PAGEBUILDERCK.URIROOT + '/' + audioSrc;
|
||||
|
||||
var audioPlayer = $ck('#previewareabloc .audiock audio');
|
||||
|
||||
if (audioSrc) {
|
||||
var controls = $ck('#elementscontainer [name="controls"]:checked').val() == '1' ? 'controls' : '';
|
||||
var autoplay = $ck('#elementscontainer [name="autoplay"]:checked').val() == '1' ? 'autoplay' : '';
|
||||
|
||||
$ck('#previewareabloc .audiock').empty()
|
||||
.append(
|
||||
'<audio controls src="'+audioSrc+'" '+controls+autoplay+'>'
|
||||
+'Your browser does not support the audio element.'
|
||||
+ '</audio>');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function selectaudiofile(file) {
|
||||
$ck('#audiourl').val(file);
|
||||
CKBox.close();
|
||||
ckUpdateAudioPreview();
|
||||
}
|
||||
|
||||
</script>
|
||||
1
plugins/pagebuilderck/audio/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
7
plugins/pagebuilderck/icon/assets/images/icon.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(64.3571,0,0,64.3571,-16050.5,-341.281)">
|
||||
<path d="M251.751,7.125L252.027,6.708C252.166,6.499 252.4,6.375 252.651,6.375L254.097,6.375C254.348,6.375 254.582,6.499 254.72,6.708L254.999,7.125L255.625,7.125C256.246,7.125 256.75,7.629 256.75,8.25L256.75,10.875C256.75,11.496 256.246,12 255.625,12L251.125,12C250.504,12 250,11.496 250,10.875L250,8.25C250,7.629 250.504,7.125 251.125,7.125L251.751,7.125ZM254.5,9.563C254.5,8.945 253.992,8.438 253.375,8.438C252.758,8.438 252.25,8.945 252.25,9.563C252.25,10.18 252.758,10.688 253.375,10.688C253.992,10.688 254.5,10.18 254.5,9.563Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:0.31px;"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
plugins/pagebuilderck/icon/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
1
plugins/pagebuilderck/icon/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
115
plugins/pagebuilderck/icon/icon.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870
|
||||
* https://www.template-creator.com
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.event.plugin');
|
||||
|
||||
class plgPagebuilderckIcon extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_ICON';
|
||||
|
||||
private $type = 'icon';
|
||||
|
||||
function __construct(&$subject, $params) {
|
||||
|
||||
parent::__construct($subject, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the Menu Item to drag into the interface
|
||||
*
|
||||
* Return Object with item data
|
||||
*/
|
||||
public function onPagebuilderckAddItemToMenu() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// create the menu item
|
||||
$menuitem = new stdClass();
|
||||
$menuitem->type = $this->type;
|
||||
$menuitem->group = 'text';
|
||||
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
|
||||
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
|
||||
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/icon/assets/images/icon.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentIcon() {
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('ckid', '', 'string');
|
||||
// ckstyle and inner classes are needed to get the styles from the interface
|
||||
?>
|
||||
<div id="<?php echo $id; ?>" class="cktype" data-type="icon" >
|
||||
<div class="tab_blocstyles ckprops" iconalignementcenter="checked" fieldslist="iconalignementleft,iconalignementcenter,iconalignementright,iconalignementjustify"></div>
|
||||
<div class="tab_iconstyles ckprops" iconicontype="svg" iconiconsvgsize="40" iconiconsvgstrokewidth="2" iconalignementcenter="checked" fieldslist="iconicontype,iconiconsvgsize,iconiconsvgstrokewidth,iconalignementleft,iconalignementcenter,iconalignementright"></div>
|
||||
<div class="ckstyle">
|
||||
<style>
|
||||
#<?php echo $id; ?> .iconck {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#<?php echo $id; ?> .iconck {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#<?php echo $id; ?> svg * {
|
||||
stroke-width: 1.6;
|
||||
}
|
||||
|
||||
#<?php echo $id; ?> svg.svgicon-ionicon *, #<?php echo $id; ?> svg.svgicon-fontawesome * {
|
||||
stroke-width: 25.6;
|
||||
}
|
||||
|
||||
#<?php echo $id; ?> svg {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
<div class="iconck">
|
||||
<span class="pbckicon" data-path="tabler_photo.svg" data-pos="undefined" style="display:inline-block;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-photo" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" style="display: inline-block;">
|
||||
<line x1="15" y1="8" x2="15.01" y2="8"></line>
|
||||
<rect x="4" y="4" width="16" height="16" rx="3"></rect>
|
||||
<path d="M4 15l4 -4a3 5 0 0 1 3 0l5 5"></path>
|
||||
<path d="M14 14l1 -1a3 5 0 0 1 3 0l2 2"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsIcon() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/icon/layouts/edit_icon.php';
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the frontend page
|
||||
* @param string the item object from simple_html_dom
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckRenderItemIcon($item) {
|
||||
return $item->innertext;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/icon/icon.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3" type="plugin" group="pagebuilderck" method="upgrade">
|
||||
<name>plg_pagebuilderck_icon_xml_name</name>
|
||||
<creationDate>December 2015</creationDate>
|
||||
<copyright>Copyright (C) 2015. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>Icon item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="icon">icon.php</filename>
|
||||
<folder>language</folder>
|
||||
<folder>layouts</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_icon.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_icon.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_icon.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_icon.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
@@ -0,0 +1,10 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ICON_XML_NAME="Page Builder CK - Icon"
|
||||
PLG_PAGEBUILDERCK_ICON_MENUITEM_TITLE="Icon"
|
||||
PLG_PAGEBUILDERCK_ICON_MENUITEM_DESC="Select an icon from a collection"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ICON_XML_NAME="Page Builder CK - Icon"
|
||||
1
plugins/pagebuilderck/icon/language/en-GB/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@@ -0,0 +1,9 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ICON_XML_NAME="Page Builder CK - Icône"
|
||||
PLG_PAGEBUILDERCK_ICON_MENUITEM_TITLE="Icône"
|
||||
PLG_PAGEBUILDERCK_ICON_MENUITEM_DESC="Selectionner une icône dans la liste"
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ICON_XML_NAME="Page Builder CK - Icône"
|
||||
1
plugins/pagebuilderck/icon/language/fr-FR/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/icon/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
133
plugins/pagebuilderck/icon/layouts/edit_icon.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<div id="elementscontainer">
|
||||
<div class="menulink" tab="tab_iconstyles"><?php echo JText::_('CK_ICON'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_iconstyles">
|
||||
<?php echo $this->menustyles->createIcon('icon', '.editfocus .iconck i.fa', false, false, true) ?>
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_LINK') ?></div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>link.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_LINK_URL'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field ckoption-field-with-button">
|
||||
<input id="linkurl" name="linkurl" class="inputbox" value="" type="text" />
|
||||
<span class="ckbuttonstyle" onclick="ckCallLinkManagerPopup('linkurl', 'all')">+</span>
|
||||
</span>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_REL_TAG'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input id="linkrel" name="linkrel" class="inputbox" value="" type="text" />
|
||||
</span>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_CSS_CLASS'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input id="linkcss" name="linkcss" class="inputbox" value="" type="text" />
|
||||
</span>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>hand-point-090.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_ONCLICK'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input id="linkonlick" name="linkonlick" class="inputbox" value="" type="text" />
|
||||
</span>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>link_add.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_TARGET'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input id="linktarget" name="linktarget" class="inputbox" value="" type="text" />
|
||||
</span>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_blocstyles">
|
||||
<?php echo $this->menustyles->createBackground('icon') ?>
|
||||
<?php echo $this->menustyles->createDimensions('icon', true, true) ?>
|
||||
<?php echo $this->menustyles->createDecoration('icon') ?>
|
||||
<?php echo $this->menustyles->createShadow('icon') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
var focus = $ck('.editfocus');
|
||||
function ckLoadEditionPopup() {
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
ckGetIconPosition('.editfocus .iconck i.fa', '#iconicon-position button');
|
||||
ckGetIconMargin('.editfocus .iconck i.fa', '#iconicon_margin');
|
||||
$ck('#iconicon-class').val(focus.find('.iconck > i').attr('data-iconclass'));
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
if (ckCheckIconType()) {
|
||||
ckUpdatePreviewArea();
|
||||
}
|
||||
}
|
||||
|
||||
function ckCheckIconType() {
|
||||
var isSvg = focus.find('.iconck svg').length;
|
||||
var isFont = focus.find('.iconck > i').length;
|
||||
var type = $ck('#elementscontainer input[type="radio"][name="iconicontype"]:checked').val();
|
||||
if (isSvg && type == 'svg') return true;
|
||||
if (isFont && type == 'fa') return true;
|
||||
if (! isFont && ! isSvg) return true; // in case of ...
|
||||
alert('Please update the icon, it does not match the selected type');
|
||||
return false;
|
||||
}
|
||||
|
||||
function ckUpdatePreviewArea() {
|
||||
var focusIcon = focus.find('.iconck');
|
||||
var html = focus.find('i,.pbckicon')[0].outerHTML;
|
||||
var linkurl = $ck('#linkurl').val();
|
||||
// add link
|
||||
if (linkurl) {
|
||||
var linkrel = $ck('#linkrel').val();
|
||||
var linkcss = $ck('#linkcss').val();
|
||||
var linkonlick = $ck('#linkonlick').val();
|
||||
var linktarget = $ck('#linktarget').val();
|
||||
html = '<a href="' + linkurl + '"'
|
||||
+ (linkrel ? ' rel="' + linkrel + '"' : '')
|
||||
+ (linkcss ? ' class="' + linkcss + '"' : '')
|
||||
+ (linkonlick ? ' onclick="' + linkonlick + '"' : '')
|
||||
+ (linktarget ? ' target="' + linktarget + '"' : '')
|
||||
+ '>'
|
||||
+ html
|
||||
+ '</a>';
|
||||
}
|
||||
focusIcon.html(html);
|
||||
}
|
||||
|
||||
function ckSelectIcon(icon) {
|
||||
var focusIcon = $ck('.editfocus .iconck');
|
||||
focusIcon.empty().append(icon);
|
||||
return focusIcon;
|
||||
}
|
||||
|
||||
ckInitIconPosition('.editfocus .iconck i.fa', '#iconicon-position button');
|
||||
</script>
|
||||
1
plugins/pagebuilderck/icon/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="512px" height="512px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"><g transform="matrix(2.08267,0,0,2.08267,-425.202,2.84748)"><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><rect x="0" y="0" width="44" height="44" style="fill:none;fill-rule:nonzero;"/></g><g transform="matrix(6.22744,0,0,6.22744,190.077,-15.4517)"><path d="M5.5,9.167C5.5,7.155 7.155,5.5 9.167,5.5L34.833,5.5C36.845,5.5 38.5,7.155 38.5,9.167L38.5,34.833C38.5,36.845 36.845,38.5 34.833,38.5L9.167,38.5C7.155,38.5 5.5,36.845 5.5,34.833L5.5,9.167Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.54px;"/></g><g transform="matrix(6.22744,0,0,6.22744,237.666,-9.36977)"><path d="M16.5,27.5L12.833,27.5" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.54px;"/></g><g transform="matrix(13.0951,0,0,6.22744,136.941,19.4394)"><path d="M16.5,27.5L12.833,27.5" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:0.94px;"/></g><g transform="matrix(6.22744,0,0,6.22744,212.911,-3.92804)"><path d="M23.833,22L12.833,22" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.54px;"/></g><g transform="matrix(11.8939,0,0,11.8939,-2684.62,-38.7788)"><path d="M251.751,7.125L252.027,6.708C252.166,6.499 252.4,6.375 252.651,6.375L254.097,6.375C254.348,6.375 254.582,6.499 254.72,6.708L254.999,7.125L255.625,7.125C256.246,7.125 256.75,7.629 256.75,8.25L256.75,10.875C256.75,11.496 256.246,12 255.625,12L251.125,12C250.504,12 250,11.496 250,10.875L250,8.25C250,7.629 250.504,7.125 251.125,7.125L251.751,7.125ZM254.5,9.563C254.5,8.945 253.992,8.438 253.375,8.438C252.758,8.438 252.25,8.945 252.25,9.563C252.25,10.18 252.758,10.688 253.375,10.688C253.992,10.688 254.5,10.18 254.5,9.563Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:0.81px;stroke-linecap:butt;stroke-miterlimit:2;"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
1
plugins/pagebuilderck/icontext/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
1
plugins/pagebuilderck/icontext/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
132
plugins/pagebuilderck/icontext/icontext.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870
|
||||
* https://www.template-creator.com
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.event.plugin');
|
||||
|
||||
class plgPagebuilderckIcontext extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_ICONTEXT';
|
||||
|
||||
private $type = 'icontext';
|
||||
|
||||
function __construct(&$subject, $params) {
|
||||
|
||||
parent::__construct($subject, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the Menu Item to drag into the interface
|
||||
*
|
||||
* Return Object with item data
|
||||
*/
|
||||
public function onPagebuilderckAddItemToMenu() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// create the menu item
|
||||
$menuitem = new stdClass();
|
||||
$menuitem->type = $this->type;
|
||||
$menuitem->group = 'text';
|
||||
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
|
||||
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
|
||||
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/icontext/assets/images/icontext.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentIcontext() {
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('ckid', '', 'string');
|
||||
// ckstyle and inner classes are needed to get the styles from the interface
|
||||
?>
|
||||
<div id="<?php echo $id; ?>" class="cktype" data-type="icontext" data-layout="top">
|
||||
<div class="tab_textedition ckprops" textalignementcenter="checked" fieldslist="textalignementleft,textalignementcenter,textalignementright,textalignementjustify"></div>
|
||||
<div class="tab_titleedition ckprops" titlefontsize="25" titlealignementcenter="checked" titlepaddings="10" fieldslist="titlefontsize,titlealignementleft,titlealignementcenter,titlealignementright,titlealignementjustify,titlepaddings"></div>
|
||||
<div class="tab_iconstyles ckprops" iconicontype="svg" iconiconsvgsize="40" iconiconsvgstrokewidth="1.6" iconalignementcenter="checked" fieldslist="iconicontype,iconiconsvgsize,iconiconsvgstrokewidth,iconalignementleft,iconalignementcenter,iconalignementright"></div>
|
||||
<div class="tab_blocstyles ckprops" fieldslist="blocbackgroundcolorstart,blocbackgroundpositionend,blocbackgrounddirection,blocbackgroundimageattachment,blocbackgroundimagerepeat,blocbackgroundimagesize,blocalignementleft,blocalignementcenter,blocalignementright,blocalignementjustify,blocpaddings,blocbordertopstyle,blocborderrightstyle,blocborderbottomstyle,blocborderleftstyle,blocbordersstyle,blocshadowinset" iconalignementcenter="checked" blocbackgroundcolorstart="" blocbackgroundpositionend="100" blocbackgrounddirection="topbottom" blocbackgroundimageattachment="scroll" blocbackgroundimagerepeat="no-repeat" blocbackgroundimagesize="auto" blocpaddings="" blocbordertopstyle="solid" blocborderrightstyle="solid" blocborderbottomstyle="solid" blocborderleftstyle="solid" blocbordersstyle="solid" blocshadowinset="0"></div> <div class="ckstyle">
|
||||
<style>
|
||||
#<?php echo $id; ?> > div.inner {
|
||||
}
|
||||
|
||||
#<?php echo $id; ?> .iconck {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#<?php echo $id; ?> .titleck {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
font-size: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
#<?php echo $id; ?> .contentck {
|
||||
text-align: center;
|
||||
}
|
||||
#<?php echo $id; ?> svg * {
|
||||
stroke-width: 1.6;
|
||||
}
|
||||
|
||||
#<?php echo $id; ?> svg.svgicon-ionicon *, #<?php echo $id; ?> svg.svgicon-fontawesome * {
|
||||
stroke-width: 25.6;
|
||||
}
|
||||
|
||||
#<?php echo $id; ?> svg {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
<div class="inner">
|
||||
<div class="iconck">
|
||||
<span class="pbckicon" data-path="tabler_photo.svg" data-pos="undefined" style="display:inline-block;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-photo" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" style="display: inline-block;">
|
||||
<line x1="15" y1="8" x2="15.01" y2="8"></line>
|
||||
<rect x="4" y="4" width="16" height="16" rx="3"></rect>
|
||||
<path d="M4 15l4 -4a3 5 0 0 1 3 0l5 5"></path>
|
||||
<path d="M14 14l1 -1a3 5 0 0 1 3 0l2 2"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="contentck">
|
||||
<div class="titleck">Title</div>
|
||||
<div class="textck">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed molestie scelerisque ultrices. Nullam venenatis, felis ut accumsan vestibulum, diam leo congue nisl, eget luctus sapien libero eget urna. Duis ac pellentesque nisi.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsIcontext() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/icontext/layouts/edit_icontext.php';
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the frontend page
|
||||
* @param string the item object from simple_html_dom
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckRenderItemIcontext($item) {
|
||||
return $item->innertext;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/icontext/icontext.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3" type="plugin" group="pagebuilderck" method="upgrade">
|
||||
<name>plg_pagebuilderck_icontext_xml_name</name>
|
||||
<creationDate>December 2015</creationDate>
|
||||
<copyright>Copyright (C) 2015. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>Icon and Text item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="icontext">icontext.php</filename>
|
||||
<folder>language</folder>
|
||||
<folder>layouts</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_icontext.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_icontext.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_icontext.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_icontext.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
@@ -0,0 +1,10 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ICONTEXT_XML_NAME="Page Builder CK - Icon and Text"
|
||||
PLG_PAGEBUILDERCK_ICONTEXT_MENUITEM_TITLE="Icon and Text"
|
||||
PLG_PAGEBUILDERCK_ICONTEXT_MENUITEM_DESC="Icon and text in one single block"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ICONTEXT_XML_NAME="Page Builder CK - Icon and Text"
|
||||
1
plugins/pagebuilderck/icontext/language/en-GB/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@@ -0,0 +1,9 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ICONTEXT_XML_NAME="Page Builder CK - Icône et Texte"
|
||||
PLG_PAGEBUILDERCK_ICONTEXT_MENUITEM_TITLE="Icône et Texte"
|
||||
PLG_PAGEBUILDERCK_ICONTEXT_MENUITEM_DESC="Icône et texte dans un seul bloc"
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_ICONTEXT_XML_NAME="Page Builder CK - Icône et Texte"
|
||||
1
plugins/pagebuilderck/icontext/language/fr-FR/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/icontext/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
156
plugins/pagebuilderck/icontext/layouts/edit_icontext.php
Normal file
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<div id="elementscontainer">
|
||||
<div class="menulink" tab="tab_iconstyles"><?php echo JText::_('CK_ICON'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_iconstyles">
|
||||
<?php echo $this->menustyles->createIcon('icon', '.editfocus .iconck i.fa', false, false, true) ?>
|
||||
<div class="ckoption">
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_POSITION'); ?></div>
|
||||
<div class="ckbutton" onclick="ckUpdateLayout(this)" data-layout="top"><?php echo JText::_('CK_TOP'); ?></div>
|
||||
<div class="ckbutton" onclick="ckUpdateLayout(this)" data-layout="bottom"><?php echo JText::_('CK_BOTTOM'); ?></div>
|
||||
<div class="ckbutton" onclick="ckUpdateLayout(this)" data-layout="left"><?php echo JText::_('CK_LEFT'); ?></div>
|
||||
<div class="ckbutton" onclick="ckUpdateLayout(this)" data-layout="right"><?php echo JText::_('CK_RIGHT'); ?></div>
|
||||
</div>
|
||||
<?php echo $this->menustyles->createBackground('icon') ?>
|
||||
<?php echo $this->menustyles->createDimensions('icon', true, true) ?>
|
||||
<?php echo $this->menustyles->createDecoration('icon') ?>
|
||||
<?php echo $this->menustyles->createShadow('icon') ?>
|
||||
<?php echo $this->menustyles->createCustom('icon') ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_titleedition"><?php echo JText::_('CK_TITLE'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_titleedition">
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_TITLE_CONTENT'); ?></div>
|
||||
<div class="ckoption">
|
||||
<input type="text" id="<?php echo $id; ?>_title" onchange="ckUpdatePreviewArea()" style="width: 275px;" />
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<?php echo JText::_('CK_TAG'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field ckbutton-group">
|
||||
<select type="text" id="<?php echo $id; ?>_headingtag" onchange="ckUpdatePreviewArea()" >
|
||||
<option value="div">DIV</option>
|
||||
<option value="h1">H1</option>
|
||||
<option value="h2">H2</option>
|
||||
<option value="h3">H3</option>
|
||||
<option value="h4">H4</option>
|
||||
<option value="h5">H5</option>
|
||||
<option value="h6">H6</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_CSS_CLASS'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input id="titlecss" name="titlecss" class="inputbox" value="" type="text" />
|
||||
</span>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_TITLE_STYLES'); ?></div>
|
||||
<?php echo $this->menustyles->createTextStyles('title', 'titleck', false) ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_textedition"><?php echo JText::_('CK_TEXT'); ?></div>
|
||||
<div class="tab menustyles ckproperty tab_fullscreen" id="tab_textedition">
|
||||
<?php // echo PagebuilderckHelper::renderEditionButtons(); ?>
|
||||
<textarea id="<?php echo $id; ?>_text" data-id="<?php echo $id; ?>_text"></textarea>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_textstyles"><?php echo JText::_('CK_TEXT_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_textstyles">
|
||||
<?php echo $this->menustyles->createTextStyles('text', 'titleck', false) ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_BLOCK_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_blocstyles">
|
||||
<?php echo $this->menustyles->createBlocStyles('bloc') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function ckLoadEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
|
||||
content = focus.find('.textck').html();
|
||||
content = ckContentToEditor(content);
|
||||
$ck('#<?php echo $id; ?>_text').val(content);
|
||||
|
||||
$ck('#<?php echo $id; ?>_title').val(focus.find('.titleck').html());
|
||||
$ck('#<?php echo $id; ?>_headingtag').val(focus.find('.titleck')[0].tagName.toLowerCase());
|
||||
ckUpdatePreviewArea();
|
||||
|
||||
ckLoadEditorOnTheFly(textID);
|
||||
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
ckGetIconPosition('.editfocus .iconck i.fa', '#iconicon-position button');
|
||||
ckGetIconMargin('.editfocus .iconck i.fa', '#iconicon_margin');
|
||||
$ck('#iconicon-class').val(focus.find('.iconck > i').attr('data-iconclass'));
|
||||
}
|
||||
|
||||
function ckUpdateLayout(btn) {
|
||||
$ck(btn).parent().find('.active').removeClass('active');
|
||||
$ck(btn).addClass('active');
|
||||
var layout = $ck(btn).attr('data-layout');
|
||||
var focus = $ck('.editfocus');
|
||||
// for B/C
|
||||
if (! focus.find('.contentck').length) {
|
||||
focus.find('> .inner').append('<div class="contentck" />');
|
||||
var contentck = focus.find('.contentck');
|
||||
contentck.append(focus.find('.titleck'));
|
||||
contentck.append(focus.find('.textck'));
|
||||
}
|
||||
|
||||
focus.attr('data-layout', layout);
|
||||
}
|
||||
|
||||
/*
|
||||
* Method automatically called in ckCloseEditionPopup() if exists
|
||||
*/
|
||||
function ckBeforeCloseEditionPopup() {
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
ckRemoveEditorOnTheFly(textID);
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
ckSaveEditorOnTheFly(textID);
|
||||
var content = $ck('[data-id="' + textID + '"]').val();
|
||||
var focus = $ck('.editfocus');
|
||||
focus.find('.textck').html(content);
|
||||
}
|
||||
|
||||
function ckSaveInlineEditionPopup() {
|
||||
ckBeforeSaveEditionPopup();
|
||||
}
|
||||
|
||||
function ckUpdatePreviewArea() {
|
||||
var focus = $ck('.editfocus');
|
||||
$ck('.titleck', focus).html($ck('#<?php echo $id; ?>_title').val());
|
||||
// update the title
|
||||
var oldheading = focus.find('.titleck');
|
||||
var css = $ck('#titlecss').val() ? $ck('#titlecss').val() : '';
|
||||
var newheading = $ck('<' + $ck('#<?php echo $id; ?>_headingtag').val() + ' class="titleck' + (css ? ' ' + css : css) + '" contenteditable="true"></' + $ck('#<?php echo $id; ?>_headingtag').val() + '>');
|
||||
oldheading.after(newheading);
|
||||
newheading.append(oldheading.html());
|
||||
oldheading.remove();
|
||||
}
|
||||
|
||||
function ckSelectIcon(icon) {
|
||||
var focusIcon = $ck('.editfocus .iconck');
|
||||
focusIcon.empty().append(icon);
|
||||
return focusIcon;
|
||||
}
|
||||
|
||||
ckInitIconPosition('.editfocus .iconck i.fa', '#iconicon-position button');
|
||||
</script>
|
||||
1
plugins/pagebuilderck/icontext/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
1
plugins/pagebuilderck/image/assets/images/image.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="512px" height="512px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"><g transform="matrix(2.08267,0,0,2.08267,-425.202,2.84748)"><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><rect x="0" y="0" width="44" height="44" style="fill:none;"/></g><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><path d="M27.5,14.667L27.518,14.667" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/></g><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><path d="M5.5,11C5.5,7.983 7.983,5.5 11,5.5L33,5.5C36.017,5.5 38.5,7.983 38.5,11L38.5,33C38.5,36.017 36.017,38.5 33,38.5L11,38.5C7.983,38.5 5.5,36.017 5.5,33L5.5,11Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/></g><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><path d="M5.5,29.333L14.667,20.167C16.368,18.53 18.465,18.53 20.167,20.167L29.333,29.333" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/></g><g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)"><path d="M25.667,25.667L27.5,23.833C29.201,22.196 31.299,22.196 33,23.833L38.5,29.333" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="800px" height="300px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><g transform="matrix(2.57487,0,0,1.99517,-290.909,-139.33)"><rect x="112.98" y="69.834" width="310.696" height="150.363" style="fill:rgb(51,51,51);"/></g><g transform="matrix(1.42667,0,0,1.42667,-102.18,-25.2881)"><g transform="matrix(1,0,0,1,48.9989,0.68054)"><rect x="88.221" y="58.588" width="112.629" height="124.879" style="fill:white;stroke:white;stroke-width:2.92px;"/><g transform="matrix(0.953982,0,0,0.953982,6.6513,5.5695)"><rect x="88.221" y="58.588" width="112.629" height="124.879" style="fill:rgb(47,47,47);stroke:white;stroke-width:3.06px;"/></g></g><g transform="matrix(0.528511,0,0,0.528511,-12.3405,21.3382)"><g id="path828" transform="matrix(0.47865,0,0,0.47865,111.761,135.158)"><path d="M407.834,221.533L520.334,23.318L618.905,145.461L654.263,106.89L752.834,219.39L407.834,221.533Z" style="fill:white;fill-rule:nonzero;"/></g><g id="path830" transform="matrix(0.47865,0,0,0.47865,111.761,135.158)"><circle cx="647.679" cy="39.925" r="32.679" style="fill:white;"/></g></g></g><g transform="matrix(1,0,0,1,217.238,-86.4486)"><g transform="matrix(50,0,0,50,310.57,254.198)"><rect x="0.103" y="-0.71" width="0.07" height="0.71" style="fill:white;fill-rule:nonzero;"/></g><g transform="matrix(50,0,0,50,324.339,254.198)"><path d="M0.618,-0.71L0.691,-0.71L0.691,-0L0.621,-0L0.621,-0.61L0.628,-0.579L0.415,-0.099L0.365,-0.099L0.151,-0.569L0.158,-0.61L0.158,-0L0.088,-0L0.088,-0.71L0.162,-0.71L0.39,-0.197L0.618,-0.71Z" style="fill:white;fill-rule:nonzero;"/></g><g transform="matrix(50,0,0,50,362.816,254.198)"><path d="M0.281,-0.71L0.366,-0.71L0.628,-0L0.55,-0L0.324,-0.636L0.098,-0L0.02,-0L0.281,-0.71ZM0.14,-0.238L0.514,-0.238L0.514,-0.172L0.14,-0.172L0.14,-0.238Z" style="fill:white;fill-rule:nonzero;"/></g><g transform="matrix(50,0,0,50,393.236,254.198)"><path d="M0.573,-0.363L0.573,-0.258C0.573,-0.199 0.564,-0.15 0.546,-0.11C0.527,-0.071 0.5,-0.042 0.463,-0.022C0.426,-0.002 0.38,0.007 0.325,0.007C0.269,0.007 0.222,-0.002 0.185,-0.021C0.148,-0.039 0.12,-0.067 0.101,-0.104C0.083,-0.141 0.073,-0.187 0.073,-0.243L0.073,-0.452C0.073,-0.511 0.082,-0.561 0.101,-0.6C0.119,-0.639 0.147,-0.668 0.184,-0.688C0.22,-0.708 0.266,-0.717 0.322,-0.717C0.368,-0.717 0.407,-0.709 0.44,-0.694C0.474,-0.678 0.501,-0.655 0.522,-0.624C0.543,-0.593 0.558,-0.554 0.567,-0.506L0.491,-0.506C0.483,-0.539 0.471,-0.566 0.456,-0.587C0.441,-0.609 0.422,-0.625 0.4,-0.636C0.377,-0.646 0.351,-0.652 0.322,-0.652C0.282,-0.652 0.249,-0.644 0.223,-0.63C0.196,-0.615 0.177,-0.593 0.163,-0.563C0.15,-0.534 0.144,-0.497 0.144,-0.452L0.144,-0.243C0.144,-0.201 0.15,-0.167 0.164,-0.14C0.177,-0.113 0.197,-0.092 0.224,-0.079C0.251,-0.065 0.284,-0.058 0.325,-0.058C0.364,-0.058 0.397,-0.065 0.422,-0.079C0.448,-0.093 0.467,-0.115 0.48,-0.144C0.493,-0.173 0.499,-0.211 0.499,-0.257L0.499,-0.297L0.327,-0.297L0.327,-0.363L0.573,-0.363Z" style="fill:white;fill-rule:nonzero;"/></g><g transform="matrix(50,0,0,50,425.072,254.198)"><path d="M0.088,-0.71L0.158,-0.71L0.158,-0L0.088,-0L0.088,-0.71ZM0.136,-0.065L0.544,-0.065L0.544,-0L0.136,-0L0.136,-0.065ZM0.136,-0.385L0.49,-0.385L0.49,-0.32L0.136,-0.32L0.136,-0.385ZM0.136,-0.71L0.544,-0.71L0.544,-0.645L0.136,-0.645L0.136,-0.71Z" style="fill:white;fill-rule:nonzero;"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
1
plugins/pagebuilderck/image/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
1
plugins/pagebuilderck/image/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
85
plugins/pagebuilderck/image/image.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870
|
||||
* https://www.template-creator.com
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.event.plugin');
|
||||
|
||||
class plgPagebuilderckImage extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_IMAGE';
|
||||
|
||||
private $type = 'image';
|
||||
|
||||
function __construct(&$subject, $params) {
|
||||
|
||||
parent::__construct($subject, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the Menu Item to drag into the interface
|
||||
*
|
||||
* Return Object with item data
|
||||
*/
|
||||
public function onPagebuilderckAddItemToMenu() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// create the menu item
|
||||
$menuitem = new stdClass();
|
||||
$menuitem->type = $this->type;
|
||||
$menuitem->group = 'image';
|
||||
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
|
||||
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
|
||||
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/image/assets/images/image.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentImage() {
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('ckid', '', 'string');
|
||||
// ckstyle and inner classes are needed to get the styles from the interface
|
||||
?>
|
||||
<div id="<?php echo $id; ?>" class="cktype" data-type="image" onshow="ckAddDndForImageUpload(jQuery('#<?php echo $id; ?>')[0]);">
|
||||
<div class="tab_image ckprops" imagewidth="100%" imageheight="auto" fieldslist="imagewidth,imageheight"></div>
|
||||
<div class="ckstyle">
|
||||
</div>
|
||||
<div class="imageck">
|
||||
<img width="100%" height="auto" src="<?php echo JUri::root(true); ?>/plugins/pagebuilderck/image/assets/images/image_example.svg" data-src="/plugins/pagebuilderck/image/assets/images/image_example.svg" />
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsImage() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/image/layouts/edit_image.php';
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the frontend page
|
||||
* @param string the item object from simple_html_dom
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckRenderItemImage($item) {
|
||||
return $item->innertext;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/image/image.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3" type="plugin" group="pagebuilderck" method="upgrade">
|
||||
<name>plg_pagebuilderck_image_xml_name</name>
|
||||
<creationDate>December 2015</creationDate>
|
||||
<copyright>Copyright (C) 2015. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>Image item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="image">image.php</filename>
|
||||
<folder>language</folder>
|
||||
<folder>layouts</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_image.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_image.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_image.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_image.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
@@ -0,0 +1,10 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_IMAGE_XML_NAME="Page Builder CK - Image"
|
||||
PLG_PAGEBUILDERCK_IMAGE_MENUITEM_TITLE="Image"
|
||||
PLG_PAGEBUILDERCK_IMAGE_MENUITEM_DESC="Single Image"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_IMAGE_XML_NAME="Page Builder CK - Image"
|
||||
1
plugins/pagebuilderck/image/language/en-GB/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@@ -0,0 +1,9 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_IMAGE_XML_NAME="Page Builder CK - Image"
|
||||
PLG_PAGEBUILDERCK_IMAGE_MENUITEM_TITLE="Image"
|
||||
PLG_PAGEBUILDERCK_IMAGE_MENUITEM_DESC="Image"
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_IMAGE_XML_NAME="Page Builder CK - Image"
|
||||
1
plugins/pagebuilderck/image/language/fr-FR/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/image/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
361
plugins/pagebuilderck/image/layouts/edit_image.php
Normal file
@@ -0,0 +1,361 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<div class="menustylescustom" data-prefix="image" data-rule=".imageck img"></div>
|
||||
<div id="elementscontainer">
|
||||
<div class="menulink" tab="tab_image"><?php echo JText::_('CK_EDITION'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_image">
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_IMAGE') ?></div>
|
||||
<div class="ckoption">
|
||||
<input class="inputboxfake" type="text" value="" name="<?php echo $id; ?>imageurl" id="<?php echo $id; ?>imageurl" style="width:295px;margin:2px;" onchange="ckUpdateImagepreview()" />
|
||||
<a class="ckbuttonstyle" href="javascript:void(0)" onclick="ckCallLinkManagerPopup('<?php echo $id; ?>imageurl', 'image')"" ><?php echo JText::_('CK_SELECT'); ?></a>
|
||||
<a class="ckbuttonstyle" href="javascript:void(0)" onclick="$ck('#<?php echo $id; ?>imageurl').val('').trigger('change');"><?php echo JText::_('CK_CLEAR'); ?></a>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>width.png" width="15" height="15" />
|
||||
<?php echo JText::_('CK_WIDTH'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox" type="text" name="imagewidth" id="imagewidth" value="" style="" onchange="ckUpdateImagepreview()" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>height.png" width="15" height="15" />
|
||||
<?php echo JText::_('CK_HEIGHT'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox" type="text" name="imageheight" id="imageheight" value="" style="" onchange="ckUpdateImagepreview()" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<?php echo JText::_('CK_ALIGN'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field ckbutton-group">
|
||||
<input id="imagealignementleft" class="inputbox" name="imagealignement" value="left" type="radio" onclick="ckSetActiveAlignmentButton()">
|
||||
<label class="ckbutton" for="imagealignementleft">
|
||||
<img src="<?php echo $this->imagespath; ?>text_align_left.png" width="16" height="16" />
|
||||
</label>
|
||||
<input id="imagealignementcenter" class="inputbox" name="imagealignement" value="center" type="radio" onclick="ckSetActiveAlignmentButton()">
|
||||
<label class="ckbutton" for="imagealignementcenter">
|
||||
<img src="<?php echo $this->imagespath; ?>text_align_center.png" width="16" height="16" />
|
||||
</label>
|
||||
<input id="imagealignementright" class="inputbox" name="imagealignement" value="right" type="radio" onclick="ckSetActiveAlignmentButton()">
|
||||
<label class="ckbutton" for="imagealignementright">
|
||||
<img src="<?php echo $this->imagespath; ?>text_align_right.png" width="16" height="16" />
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_CSS_CLASS'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox" type="text" name="imagecssclass" id="imagecssclass" value="" style="" onchange="ckUpdateImageAttribute('class', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_ALT_TAG'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox" type="text" name="imagealt" id="imagealt" value="" style="" onchange="ckUpdateImageAttribute('alt', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_TITLE'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox" type="text" name="imagetitle" id="imagetitle" value="" onchange="ckUpdateImageAttribute('title', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<?php echo JText::_('CK_IMAGE_EFFECT'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<?php
|
||||
if (! JPluginHelper::isEnabled('system', 'imageeffectck') || ! JPluginHelper::isEnabled('editors-xtd', 'imageeffectckbutton')) { ?>
|
||||
<div class="alert alert-warning">
|
||||
<?php if (! JPluginHelper::isEnabled('system', 'imageeffectck')) { ?><b><?php echo JText::_('CK_IMAGEEFFECTCK_NOT_INSTALLED') ?></b>
|
||||
<br /><a href="https://www.joomlack.fr/en/joomla-extensions/image-effect-ck" target="_blank"><?php echo JText::_('CK_DOWNLOAD') ?> : Image Effect CK</a>
|
||||
<div class="clr"></div>
|
||||
<?php } ?>
|
||||
<?php if (! JPluginHelper::isEnabled('editors-xtd', 'imageeffectckbutton')) { ?><b><?php echo JText::_('CK_IMAGEEFFECTCK_BUTTON_NOT_INSTALLED') ?></b>
|
||||
<br /><a href="https://www.joomlack.fr/en/joomla-extensions/image-effect-ck" target="_blank"><?php echo JText::_('CK_DOWNLOAD') ?> : Image Effect CK Pro</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<script src="<?php echo JUri::root(true) ?>/plugins/editors-xtd/imageeffectckbutton/assets/imageeffectckbutton.js"></script>
|
||||
<a class="ckbuttonstyle" href="javascript:void(0)" onclick="CKApi.Imageeffect.showInterface('ckValidateImageEffect()');"><?php echo JText::_('CK_SELECT'); ?></a>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckclr"></div>
|
||||
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_LINK') ?></div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>link.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_LINK_URL'); ?></span>
|
||||
<span class="ckoption-field ckoption-field-with-button">
|
||||
<input class="inputbox link_attrib" type="text" name="linkurl" id="linkurl" value="" onchange="ckUpdateLinkAttribute('href', this.value)" />
|
||||
<span class="ckbuttonstyle" onclick="ckCallLinkManagerPopup('linkurl', 'all')">+</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_REL_TAG'); ?></span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox link_attrib" type="text" name="linkrel" id="linkrel" value="" onchange="ckUpdateLinkAttribute('rel', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>text_signature.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_CSS_CLASS'); ?></span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox link_attrib" type="text" name="linkcss" id="linkcss" value="" onchange="ckUpdateLinkAttribute('class', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>hand-point-090.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_ONCLICK'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field">
|
||||
<input id="linkonlick" name="linkonlick" class="inputbox" value="" type="text" onchange="ckUpdateLinkAttribute('onclick', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>link_add.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_TARGET'); ?></span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox link_attrib" type="text" name="linktarget" id="linktarget" value="" onchange="ckUpdateLinkAttribute('target', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>link_add.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_TITLE'); ?></span>
|
||||
<span class="ckoption-field">
|
||||
<input class="inputbox link_attrib" type="text" name="linktitle" id="linktitle" value="" onchange="ckUpdateLinkAttribute('title', this.value)" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_LIGHTBOX') ?></div>
|
||||
<?php
|
||||
if (! JPluginHelper::isEnabled('system', 'mediabox_ck')) { ?>
|
||||
<div class="alert alert-danger"><b><?php echo JText::_('CK_MEDIABOXCK_NOT_INSTALLED') ?></b><br /><a href="https://www.joomlack.fr/en/joomla-extensions/mediabox-ck" target="_blank"><?php echo JText::_('CK_DOWNLOAD') ?> : Mediabox CK</a></div>
|
||||
<?php }
|
||||
?>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>magnifier.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_USE_LIGHTBOX'); ?></span>
|
||||
<span class="ckoption-field">
|
||||
<select class="inputbox" type="list" value="" name="uselightbox" id="uselightbox" onchange="ckToggleLightboxState(this.value)">
|
||||
<option value="0"><?php echo JText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo JText::_('JYES'); ?></option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>photo_album.png" width="16" height="16" />
|
||||
<?php echo JText::_('CK_LIGHTBOX_ALBUM'); ?></span>
|
||||
<span class="ckoption-field">
|
||||
<select class="inputbox" type="list" value="" name="lightboxalbum" id="lightboxalbum" onchange="ckToggleLightboxAlbum(this.value)">
|
||||
<option value="0"><?php echo JText::_('JNO'); ?></option>
|
||||
<option value="1"><?php echo JText::_('JYES'); ?></option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_blocstyles">
|
||||
<?php echo $this->menustyles->createImageStyles('image', 'image', '') ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function ckLoadEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
var focus_img = $ck('.editfocus img');
|
||||
$ck('#<?php echo $id; ?>imageurl').val(focus_img.attr('data-src'));
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
ckUpdateLinkAttribute('href', $ck('#linkurl').val());
|
||||
ckUpdateLinkAttribute('rel', $ck('#linkrel').val());
|
||||
ckUpdateLinkAttribute('class', $ck('#linkcss').val());
|
||||
ckUpdateLinkAttribute('target', $ck('#linktarget').val());
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
// var focus_img = $ck('.editfocus img');
|
||||
// var image = $ck('#<?php echo $id; ?>_preview_image img');
|
||||
ckUpdateImagepreview();
|
||||
// ckSaveEditionPopup(focus.attr('id'));
|
||||
// ckCloseEditionPopup();
|
||||
}
|
||||
|
||||
function ckUpdateImagepreview() {
|
||||
var focus_img = $ck('.editfocus img');
|
||||
var img_src = $ck('#<?php echo $id; ?>imageurl').val();
|
||||
// $ck('#<?php echo $id; ?>_preview_image img').attr('src', '<?php echo JUri::root(true); ?>/'+img_src)
|
||||
focus_img.attr('src', getImgPathFromImgSrc(img_src, true))
|
||||
.attr('width', $ck('#imagewidth').val())
|
||||
.attr('height', $ck('#imageheight').val())
|
||||
.attr('data-src', img_src);
|
||||
ckUpdateImageAttribute('class', $ck('#imagecssclass').val());
|
||||
ckUpdateImageAttribute('alt', $ck('#imagealt').val());
|
||||
ckUpdateImageAttribute('title', $ck('#imagetitle').val());
|
||||
ckAddDataOnImage($ck('.editfocus .imageck'));
|
||||
}
|
||||
|
||||
// set active class for radio buttons
|
||||
function ckSetActiveAlignmentButton() {
|
||||
$ck('#elementscontainer .inputbox[name="imagealignement"]').each(function() {
|
||||
if ($ck(this).prop('checked')) {
|
||||
$ck(this).next('label').addClass('active');
|
||||
} else {
|
||||
$ck(this).next('label').removeClass('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ckUpdateImageAttribute(attribute, value) {
|
||||
var focus_img = $ck('.editfocus img');
|
||||
if (value) {
|
||||
focus_img.attr(attribute, value);
|
||||
} else {
|
||||
focus_img.removeAttr(attribute);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ckUpdateLinkAttribute(attribute, value) {
|
||||
var focus_img = $ck('.editfocus img');
|
||||
if (focus_img.parent()[0].tagName.toLowerCase() == 'a') {
|
||||
var imagelink = focus_img.parent();
|
||||
if (value) {
|
||||
imagelink.attr(attribute, value);
|
||||
} else {
|
||||
if (attribute == 'href') {
|
||||
$ck('.editfocus .imageck ').append(focus_img);
|
||||
$ck('.editfocus .imageck > a').remove();
|
||||
} else {
|
||||
imagelink.removeAttr(attribute);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (value)
|
||||
focus_img.wrap('<a href="' + (attribute == 'href' ? value : '') + '"></a>');
|
||||
// if (attribute != 'href') {
|
||||
// alert('Warning : you must have an url to create a link');
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
function ckToggleLightboxState(value) {
|
||||
// TODO : checker champ à changer avec $mediaboxParams->get
|
||||
if (value == 1) {
|
||||
// if link is empty, auto target the image
|
||||
if ($ck('#linkurl').val() == '') {
|
||||
$ck('#linkurl').val(getImgPathFromImgSrc($ck('#<?php echo $id; ?>imageurl').val(), true)).trigger('change');
|
||||
}
|
||||
if ($ck('#elementscontainer #linkrel').val().indexOf('lightbox') == -1) {
|
||||
var relvalue = $ck('#elementscontainer #linkrel').val() + ' lightbox';
|
||||
$ck('#elementscontainer #linkrel').val(relvalue.trim());
|
||||
}
|
||||
if ($ck('#lightboxalbum').val() == '1') {
|
||||
ckToggleLightboxAlbum(1);
|
||||
}
|
||||
} else {
|
||||
var relvalue = $ck('#elementscontainer #linkrel').val().replace('lightbox', '').trim();
|
||||
$ck('#elementscontainer #linkrel').val(relvalue);
|
||||
$ck('#lightboxalbum').val('0');
|
||||
}
|
||||
ckUpdateLinkAttribute('rel', $ck('#linkrel').val());
|
||||
}
|
||||
|
||||
function ckToggleLightboxAlbum(value) {
|
||||
if ($ck('#uselightbox').val() != 1) {
|
||||
alert('Warning : you can not enable the album feature, the Lightbox option must be enabled');
|
||||
$ck('#lightboxalbum').val('0');
|
||||
return;
|
||||
}
|
||||
var pageid = $ck('input[name="id"]').val();
|
||||
if (value == 1) {
|
||||
if ($ck('#elementscontainer #linkrel').val().indexOf('lightbox[') != -1) { // check if lightbox already exists without album
|
||||
var re = /lightbox(\[.*?\])/g;
|
||||
var relvalue = $ck('#elementscontainer #linkrel').val();
|
||||
$ck('#elementscontainer #linkrel').val(relvalue.replace(re, 'lightbox[pagebuilderck' + pageid + ']'));
|
||||
} else {
|
||||
var relvalue = $ck('#elementscontainer #linkrel').val().replace('lightbox', '') + ' lightbox[pagebuilderck' + pageid + ']';
|
||||
$ck('#elementscontainer #linkrel').val(relvalue.trim());
|
||||
}
|
||||
} else {
|
||||
var re = /lightbox(\[.*?\])/g;
|
||||
var relvalue = $ck('#elementscontainer #linkrel').val().replace(re, 'lightbox').trim();
|
||||
$ck('#elementscontainer #linkrel').val(relvalue);
|
||||
}
|
||||
ckUpdateLinkAttribute('rel', $ck('#linkrel').val());
|
||||
}
|
||||
|
||||
function ckValidateImageEffect() {
|
||||
var title = $ck('#imageeffectckbuttonimgdesc').val() ? $ck('#imageeffectckbuttonimgtitle').val() + '::' + $ck('#imageeffectckbuttonimgdesc').val() : $ck('#imageeffectckbuttonimgtitle').val();
|
||||
var imgCustomClasses = $ck('#imageeffectckbuttonimgclass').val() != '' ? ' ' + $ck('#imageeffectckbuttonimgclass').val() : '';
|
||||
var cssclass = $ck('#imageeffectckbuttoneffectslist').val() + imgCustomClasses;
|
||||
$ck('#imagetitle').val(title);
|
||||
$ck('#imagecssclass').val(cssclass).trigger('change');
|
||||
}
|
||||
|
||||
/*
|
||||
* Triggered from the Image Effect CK Params plugin, used to fill the data
|
||||
|
||||
* @returns {undefined} */
|
||||
function onImageeffectckmodalLoaded() {
|
||||
var focus_img = $ck('.editfocus img');
|
||||
var imgsrc = focus_img.attr('src');
|
||||
var imgtitletmp = $ck('#imagetitle').val();
|
||||
var imgclass = $ck('#imagecssclass').val();
|
||||
CKApi.Imageeffect.setFieldsValue(imgsrc, imgtitletmp, imgclass);
|
||||
}
|
||||
|
||||
ckSetActiveAlignmentButton();
|
||||
</script>
|
||||
<style type="text/css">
|
||||
#image_preview {
|
||||
padding: 5px;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #ddd;
|
||||
margin: 10px 10px 10px 0;
|
||||
max-width: 600px;
|
||||
/*height: 200px;*/
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#image_preview > img {
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
1
plugins/pagebuilderck/image/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
1
plugins/pagebuilderck/message/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
18
plugins/pagebuilderck/message/assets/images/message.svg
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;">
|
||||
<g transform="matrix(2.08267,0,0,2.08267,-425.202,2.84748)">
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<rect x="0" y="0" width="44" height="44" style="fill:none;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M14.667,16.5L29.333,16.5" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M14.667,23.833L25.667,23.833" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M16.5,33L11,33C7.983,33 5.5,30.517 5.5,27.5L5.5,12.833C5.5,9.816 7.983,7.333 11,7.333L33,7.333C36.017,7.333 38.5,9.816 38.5,12.833L38.5,27.5C38.5,30.517 36.017,33 33,33L27.5,33L22,38.5L16.5,33Z" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
plugins/pagebuilderck/message/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@@ -0,0 +1,11 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_MESSAGE_XML_NAME="Page Builder CK - Message box"
|
||||
PLG_PAGEBUILDERCK_MESSAGE_MENUITEM_TITLE="Message box"
|
||||
PLG_PAGEBUILDERCK_MESSAGE_MENUITEM_DESC="A styled box for your message"
|
||||
PLG_PAGEBUILDERCK_MESSAGE_CLOSEBUTTON_LABEL="Close button"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_MESSAGE_XML_NAME="Page Builder CK - Message box"
|
||||
1
plugins/pagebuilderck/message/language/en-GB/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@@ -0,0 +1,10 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_MESSAGE_XML_NAME="Page Builder CK - Boite à message"
|
||||
PLG_PAGEBUILDERCK_MESSAGE_MENUITEM_TITLE="Boite à message"
|
||||
PLG_PAGEBUILDERCK_MESSAGE_MENUITEM_DESC="Un message avec style prédéfini"
|
||||
PLG_PAGEBUILDERCK_MESSAGE_CLOSEBUTTON_LABEL="Bouton de fermeture"
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_MESSAGE_XML_NAME="Page Builder CK - Boite à message"
|
||||
1
plugins/pagebuilderck/message/language/fr-FR/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/message/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
197
plugins/pagebuilderck/message/layouts/edit_message.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<div id="elementscontainer">
|
||||
<div class="menulink" tab="tab_edition"><?php echo JText::_('CK_EDITION'); ?></div>
|
||||
<div class="tab menustyles ckproperty tab_fullscreen" id="tab_edition">
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_TITLE'); ?></div>
|
||||
<input type="text" id="<?php echo $id; ?>_title" onchange="ckUpdatePreviewArea()" style="width: 90%;" />
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_TEXT'); ?></div>
|
||||
<textarea id="<?php echo $id; ?>_text" data-id="<?php echo $id; ?>_text"onchange="ckUpdatePreviewArea()"></textarea>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_blocstyles">
|
||||
<div class="ckoption">
|
||||
<span class="ckoption-label">
|
||||
<img class="ckoption-icon" src="<?php echo $this->imagespath; ?>switch.png" width="16" height="16" />
|
||||
<?php echo JText::_('PLG_PAGEBUILDERCK_MESSAGE_CLOSEBUTTON_LABEL'); ?>
|
||||
</span>
|
||||
<span class="ckoption-field ckbutton-group">
|
||||
<input id="message_close_button_1" class="inputbox" name="message_close_button" value="1" type="radio" >
|
||||
<label class="ckbutton" for="message_close_button_1">
|
||||
<?php echo JText::_('JYES'); ?>
|
||||
</label>
|
||||
<input id="message_close_button_0" class="inputbox" name="message_close_button" value="0" type="radio" checked>
|
||||
<label class="ckbutton" for="message_close_button_0">
|
||||
<?php echo JText::_('JNO'); ?>
|
||||
</label>
|
||||
</span>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="menupanetitle"><?php echo JText::_('CK_VARIATIONS'); ?></div>
|
||||
<div class="messageckvariation" onclick="ckApplyMessageVariation('info');">
|
||||
<div class="messageck alertck alertck-info">
|
||||
<div>
|
||||
<div class="messageck_title">Title</div>
|
||||
<div class="messageck_text">Text Here</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="messageckvariation" onclick="ckApplyMessageVariation('success');">
|
||||
<div class="messageck alertck alertck-success">
|
||||
<div>
|
||||
<div class="messageck_title">Title</div>
|
||||
<div class="messageck_text">Text Here</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="messageckvariation" onclick="ckApplyMessageVariation('warning');">
|
||||
<div class="messageck alertck alertck-warning">
|
||||
<div>
|
||||
<div class="messageck_title">Title</div>
|
||||
<div class="messageck_text">Text Here</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="messageckvariation" onclick="ckApplyMessageVariation('danger');">
|
||||
<div class="messageck alertck alertck-danger">
|
||||
<div>
|
||||
<div class="messageck_title">Title</div>
|
||||
<div class="messageck_text">Text Here</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menustylescustom" data-prefix="message" data-rule=".messageck">
|
||||
<?php echo $this->menustyles->createBackgroundColor('message', $usegradient = false, $title = '', $expert = false) ?>
|
||||
<?php echo $this->menustyles->createSingleBorders('message', $usegradient = false, $title = '', $expert = false) ?>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_iconstyles"><?php echo JText::_('CK_ICON'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_iconstyles">
|
||||
<?php echo $this->menustyles->createIcon('icon', '.editfocus .iconck .pbckicon', false, false, true, false, true, false) ?>
|
||||
<?php echo $this->menustyles->createBackground('icon') ?>
|
||||
<?php echo $this->menustyles->createDimensions('icon', true, true) ?>
|
||||
<?php echo $this->menustyles->createDecoration('icon') ?>
|
||||
<?php echo $this->menustyles->createShadow('icon') ?>
|
||||
<?php echo $this->menustyles->createCustom('icon') ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_titlestyles"><?php echo JText::_('CK_TITLE_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_titlestyles">
|
||||
<?php echo $this->menustyles->createTextStyles('messagetitle', 'messageck', '') ?>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_contentstyles"><?php echo JText::_('CK_TEXT_STYLES'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_contentstyles">
|
||||
<?php echo $this->menustyles->createTextStyles('messagetext', 'messageck', '') ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
var focus = $ck('.editfocus');
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
function ckLoadEditionPopup() {
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
|
||||
// $ck('#previewarea .ckstyle').html(focus.find('.ckstyle').html());
|
||||
// $ck('#previewarea .messageck').html(focus.find('.messageck').html());
|
||||
// $ck('#previewarea .messageck').attr('class', focus.find('.messageck').attr('class'));
|
||||
$ck('#<?php echo $id; ?>_title').val(focus.find('.messageck_title').html());
|
||||
$ck('#<?php echo $id; ?>_text').val(focus.find('.messageck_text').html());
|
||||
ckLoadEditorOnTheFly(textID);
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
ckGetIconPosition('.editfocus .messageck i.fa', '#messageicon-position button');
|
||||
ckGetIconMargin('.editfocus .messageck i.fa', '#messageicon_margin');
|
||||
$ck('#iconicon-class').val(focus.find('.iconck > i').attr('data-iconclass'));
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
ckSaveEditorOnTheFly(textID);
|
||||
ckUpdatePreviewArea();
|
||||
// ckSaveEditionPopup(focus.attr('id'));
|
||||
// ckCloseEditionPopup();
|
||||
}
|
||||
|
||||
function ckSaveInlineEditionPopup() {
|
||||
ckBeforeSaveEditionPopup();
|
||||
}
|
||||
|
||||
function ckBeforeCloseEditionPopup() {
|
||||
var textID = '<?php echo $id; ?>_text';
|
||||
ckRemoveEditorOnTheFly(textID);
|
||||
}
|
||||
|
||||
function ckUpdatePreviewArea() {
|
||||
$ck('.editfocus .messageck_title').html($ck('#<?php echo $id; ?>_title').val());
|
||||
$ck('.editfocus .messageck_text').html($ck('[data-id="' + textID + '"]').val());
|
||||
var closeButton = $ck('#elementscontainer input[name="message_close_button"]:checked').val();
|
||||
if (closeButton == '1') {
|
||||
if (! focus.find('.messageck button.close').length) {
|
||||
focus.find('.messageck').prepend('<button type="button" class="close" data-dismiss="alert">×</button>');
|
||||
}
|
||||
ckMessageCloseButtonDisable();
|
||||
} else {
|
||||
focus.find('.messageck button.close').remove();
|
||||
}
|
||||
}
|
||||
|
||||
function ckSelectIcon(icon) {
|
||||
$ck('#messageicon-class').val(iconclass);
|
||||
$ck('.editfocus .messageck').find('i').remove();
|
||||
$ck('.editfocus .messageck > div').before('<i class="' + iconclass + '" data-iconclass="' + iconclass + '"></i>');
|
||||
$ck('.editfocus .messageck i.fa').css('vertical-align', $ck('#messageicon-position button.active').attr('data-position'))
|
||||
.addClass($ck('#messageicon-size button.active').attr('data-width'));
|
||||
ckSetIconMargin('.editfocus .messageck i.fa', '#messageicon_margin');
|
||||
}
|
||||
|
||||
function ckSelectIcon(icon) {
|
||||
$ck('.editfocus .messageck').find('.pbckicon, i').remove();
|
||||
$ck('.editfocus .messageck > div').prepend('<span class="iconck">' + icon + '</span>');
|
||||
$ck('.editfocus .messageck .pbckicon').css('vertical-align', $ck('#messageicon-position button.active').attr('data-position'))
|
||||
.addClass($ck('#messageicon-size button.active').attr('data-width'));
|
||||
ckSetIconMargin('.editfocus .messageck i.fa', '#messageicon_margin');
|
||||
return $ck('.editfocus .pbckicon');
|
||||
}
|
||||
|
||||
// function _ckSelectIcon(icon) {
|
||||
// $ck('.editfocus .messageck').find('i.fa').remove();
|
||||
// $ck('.editfocus .messageck_text').before('<i class="' + iconclass + '"></i>');
|
||||
// $ck('.editfocus .messageck i.fa').css('vertical-align', $ck('#messageicon-position button.active').attr('data-position'))
|
||||
// .addClass($ck('#separatoricon-size button.active').attr('data-width'));
|
||||
// ckSetIconMargin('.editfocus .messageck i.fa', '#messageicon_margin');
|
||||
// }
|
||||
|
||||
function ckApplyMessageVariation(variation) {
|
||||
$ck('.editfocus .messageck').attr('class', 'messageck alertck alertck-' + variation);
|
||||
}
|
||||
|
||||
ckInitIconPosition('.editfocus .messageck i.fa', '#messageicon-position button');
|
||||
|
||||
// do not use for now because we need to update the layout to add the contentck
|
||||
// the base code shall have the .inner in it, for not it does not
|
||||
/*function ckUpdateLayout(btn) {
|
||||
$ck(btn).parent().find('.active').removeClass('active');
|
||||
$ck(btn).addClass('active');
|
||||
var layout = $ck(btn).attr('data-layout');
|
||||
var focus = $ck('.editfocus');
|
||||
|
||||
// for B/C
|
||||
if (! focus.find('.contentck').length) {
|
||||
focus.find('> .inner').append('<div class="contentck" />');
|
||||
var contentck = focus.find('.contentck');
|
||||
contentck.append(focus.find('.titleck'));
|
||||
contentck.append(focus.find('.textck'));
|
||||
}
|
||||
|
||||
focus.attr('data-layout', layout);
|
||||
}*/
|
||||
</script>
|
||||
1
plugins/pagebuilderck/message/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
87
plugins/pagebuilderck/message/message.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870
|
||||
* https://www.template-creator.com
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.event.plugin');
|
||||
|
||||
class plgPagebuilderckMessage extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_MESSAGE';
|
||||
|
||||
private $type = 'message';
|
||||
|
||||
function __construct(&$subject, $params) {
|
||||
|
||||
parent::__construct($subject, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the Menu Item to drag into the interface
|
||||
*
|
||||
* Return Object with item data
|
||||
*/
|
||||
public function onPagebuilderckAddItemToMenu() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// create the menu item
|
||||
$menuitem = new stdClass();
|
||||
$menuitem->type = $this->type;
|
||||
$menuitem->group = 'text';
|
||||
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
|
||||
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
|
||||
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/message/assets/images/message.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentMessage() {
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('ckid', '', 'string');
|
||||
// ckstyle and inner classes are needed to get the styles from the interface
|
||||
?>
|
||||
<div id="<?php echo $id; ?>" class="cktype" data-type="message">
|
||||
<div class="ckstyle">
|
||||
</div>
|
||||
<div class="messageck alertck alertck-info">
|
||||
<div>
|
||||
<div class="messageck_title">Message title</div>
|
||||
<div class="messageck_text">Text Here</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsMessage() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/message/layouts/edit_message.php';
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the frontend page
|
||||
* @param string the item object from simple_html_dom
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckRenderItemMessage($item) {
|
||||
return $item->innertext;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/message/message.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3" type="plugin" group="pagebuilderck" method="upgrade">
|
||||
<name>plg_pagebuilderck_message_xml_name</name>
|
||||
<creationDate>December 2015</creationDate>
|
||||
<copyright>Copyright (C) 2015. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>Message item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="message">message.php</filename>
|
||||
<folder>language</folder>
|
||||
<folder>layouts</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_message.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_message.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_message.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_message.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
1
plugins/pagebuilderck/module/assets/images/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
21
plugins/pagebuilderck/module/assets/images/module.svg
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;">
|
||||
<g transform="matrix(2.08267,0,0,2.08267,-425.202,2.84748)">
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<rect x="0" y="0" width="44" height="44" style="fill:none;fill-rule:nonzero;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M22,5.5L36.667,13.75L36.667,30.25L22,38.5L7.333,30.25L7.333,13.75L22,5.5" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M22,22L36.667,13.75" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M22,22L22,38.5" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/>
|
||||
</g>
|
||||
<g transform="matrix(5.58723,0,0,5.58723,204.162,-1.36723)">
|
||||
<path d="M22,22L7.333,13.75" style="fill:none;fill-rule:nonzero;stroke:black;stroke-width:1.72px;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
1
plugins/pagebuilderck/module/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@@ -0,0 +1,10 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_MODULE_XML_NAME="Page Builder CK - Module"
|
||||
PLG_PAGEBUILDERCK_MODULE_MENUITEM_TITLE="Module"
|
||||
PLG_PAGEBUILDERCK_MODULE_MENUITEM_DESC="Any module on your website"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_MODULE_XML_NAME="Page Builder CK - Module"
|
||||
1
plugins/pagebuilderck/module/language/en-GB/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@@ -0,0 +1,9 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_MODULE_XML_NAME="Page Builder CK - Module"
|
||||
PLG_PAGEBUILDERCK_MODULE_MENUITEM_TITLE="Module"
|
||||
PLG_PAGEBUILDERCK_MODULE_MENUITEM_DESC="N'importe quel module de votre site"
|
||||
@@ -0,0 +1,7 @@
|
||||
; @copyright Copyright (C) 2010 Cédric KEIFLIN alias ced1870
|
||||
; https://www.joomlack.fr
|
||||
; @license GNU/GPL
|
||||
; Double quotes in the values have to be formatted as "_QQ_"
|
||||
|
||||
|
||||
PLG_PAGEBUILDERCK_MODULE_XML_NAME="Page Builder CK - Module"
|
||||
1
plugins/pagebuilderck/module/language/fr-FR/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
plugins/pagebuilderck/module/language/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
91
plugins/pagebuilderck/module/layouts/edit_module.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
$module_modaledition_url = JUri::root(true) . "/administrator/index.php?option=com_modules&client_id=0&task=module.edit&view=module&layout=modal&tmpl=component&id=";
|
||||
?>
|
||||
<div id="elementscontainer">
|
||||
<div class="menulink current" tab="tab_moduleselection"><?php echo JText::_('CK_MODULE_SELECTION'); ?></div>
|
||||
<div class="tab menustyles current ckproperty" id="tab_moduleselection">
|
||||
<div>
|
||||
<a class="ckbuttonstyle" href="javascript:void(0)" onclick="ckOpenModulesPopup()"><?php echo JText::_('CK_SELECT'); ?></a>
|
||||
<a class="ckbuttonstyle" href="javascript:void(0)" onclick="ckOpenModuleEditionPopup()"><?php echo JText::_('CK_EDIT') ?></a>
|
||||
<a class="ckbuttonstyle" href="javascript:void(0)" onclick="ckOpenModuleSelectPopup()"><?php echo JText::_('CK_NEW') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_MODULE_STYLE'); ?></div>
|
||||
<div class="tab menustyles ckproperty" id="tab_blocstyles">
|
||||
<?php echo $this->menustyles->createBlocStyles('bloc') ?>
|
||||
</div>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function ckLoadEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
|
||||
ckUpdatePreviewArea();
|
||||
$ck('#moduleckModal<?php echo $id ?>').attr('data-id', $ck('.editfocus .modulerow').attr('data-id'));
|
||||
ckFillEditionPopup(focus.attr('id'));
|
||||
}
|
||||
|
||||
function ckBeforeSaveEditionPopup() {
|
||||
var focus = $ck('.editfocus');
|
||||
|
||||
ckSaveEditionPopup(focus.attr('id'));
|
||||
$ck('.modal-backdrop').remove();
|
||||
}
|
||||
|
||||
function ckUpdatePreviewArea() {
|
||||
|
||||
}
|
||||
|
||||
function ckOpenModuleEditionPopup() {
|
||||
if (! $ck('.editfocus .modulerow').attr('data-id')) {
|
||||
alert('<?php echo JText::_('CK_SELECT_MODULE_FIRST', true) ?>');
|
||||
return;
|
||||
}
|
||||
ckLoadIframeEdition('<?php echo $module_modaledition_url ?>'+$ck('.editfocus .modulerow').attr('data-id'), 'ckeditionmodulepopup', 'module.save', 'module.cancel');
|
||||
}
|
||||
function ckSelectModule(id, title, module) {
|
||||
$ck('.editfocus .moduleck').empty()
|
||||
.append(
|
||||
'<div class="modulerow" style="background:#fff;padding:5px;" data-id="'+id+'" data-title="'+title+'" data-module="'+module+'">'
|
||||
+ '<svg class="moduleck_icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z"/></svg>'
|
||||
+ '<h4 class="modulerow_title" style=""><?php echo JText::_('CK_MODULE'); ?></h4>'
|
||||
+ '<span class="ckbadge ckbadge-info" style="">'+id+'</span>'
|
||||
+ '<span class="" style="text-align:left;color:#3071a9;display:inline-block;margin:0 7px;">'+title+'</span>'
|
||||
+ '<span class="cklabel" style="">'+module+'</span>'
|
||||
+ '</div>');
|
||||
$ck('#moduleckModal<?php echo $id ?>').attr('data-id', id);
|
||||
}
|
||||
|
||||
function ckOpenModuleSelectPopup() {
|
||||
CKBox.open({id: 'ckmoduleselectpopup',
|
||||
url: "<?php echo JUri::root(true) ?>/administrator/index.php?option=com_modules&client_id=0&view=select&tmpl=component",
|
||||
// url: 'index.php?option=com_content&layout=modal&tmpl=component&task=article.edit&id='+id,
|
||||
style: {padding: '10px'},
|
||||
onCKBoxLoaded : function(){ckLoadedIframeModuleSelect('ckmoduleselectpopup');}
|
||||
// footerHtml: '<a class="ckboxmodal-button" href="javascript:void(0)" onclick="ckSaveIframe(\''+htmlId+'\')">'+Joomla.JText._('CK_SAVE_CLOSE')+'</a>'
|
||||
});
|
||||
}
|
||||
|
||||
function ckLoadedIframeModuleSelect(boxid) {
|
||||
var frame = $ck('#'+boxid).find('iframe');
|
||||
frame.load(function() {
|
||||
var framehtml = frame.contents();
|
||||
var items = framehtml.find('#new-modules-list > li > a');
|
||||
items.each(function() {
|
||||
item = $ck(this);
|
||||
href = item.attr('href');
|
||||
item.attr('href', 'javascript:void(0)');
|
||||
// item.attr('onclick', 'window.location=\''+href+'&tmpl=component&layout=modal\';window.parent.ckLoadedIframeEdition(\''+boxid+'\', \'module.apply\', \'module.cancel\')');
|
||||
item.attr('onclick', 'window.parent.ckLoadIframeEdition(\''+href+'&tmpl=component&layout=modal\', \'ckeditionmodulepopup\', \'module.apply\', \'module.cancel\');window.parent.CKBox.close(\'#'+boxid+' .ckboxmodal-button\');');
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
1
plugins/pagebuilderck/module/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
88
plugins/pagebuilderck/module/module.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2015 Cédric KEIFLIN alias ced1870
|
||||
* https://www.template-creator.com
|
||||
* https://www.joomlack.fr
|
||||
* @license GNU/GPL
|
||||
* */
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.event.plugin');
|
||||
|
||||
class plgPagebuilderckModule extends JPlugin {
|
||||
|
||||
private $context = 'PLG_PAGEBUILDERCK_MODULE';
|
||||
|
||||
private $type = 'module';
|
||||
|
||||
function __construct(&$subject, $params) {
|
||||
|
||||
parent::__construct($subject, $params);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the Menu Item to drag into the interface
|
||||
*
|
||||
* Return Object with item data
|
||||
*/
|
||||
public function onPagebuilderckAddItemToMenu() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// create the menu item
|
||||
$menuitem = new stdClass();
|
||||
$menuitem->type = $this->type;
|
||||
$menuitem->group = 'other';
|
||||
$menuitem->title = JText::_($this->context . '_MENUITEM_TITLE');
|
||||
$menuitem->description = JText::_($this->context . '_MENUITEM_DESC');
|
||||
$menuitem->image = JUri::root(true) . '/plugins/pagebuilderck/module/assets/images/module.svg';
|
||||
|
||||
return $menuitem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the interface
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemContentModule() {
|
||||
$input = JFactory::getApplication()->input;
|
||||
$id = $input->get('ckid', '', 'string');
|
||||
// ckstyle and inner classes are needed to get the styles from the interface
|
||||
?>
|
||||
<div id="<?php echo $id; ?>" class="cktype" data-type="module" >
|
||||
<div class="ckstyle">
|
||||
</div>
|
||||
<div class="moduleck inner">
|
||||
<div class="moduleck_content">
|
||||
<svg class="moduleck_icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M488.6 250.2L392 214V105.5c0-15-9.3-28.4-23.4-33.7l-100-37.5c-8.1-3.1-17.1-3.1-25.3 0l-100 37.5c-14.1 5.3-23.4 18.7-23.4 33.7V214l-96.6 36.2C9.3 255.5 0 268.9 0 283.9V394c0 13.6 7.7 26.1 19.9 32.2l100 50c10.1 5.1 22.1 5.1 32.2 0l103.9-52 103.9 52c10.1 5.1 22.1 5.1 32.2 0l100-50c12.2-6.1 19.9-18.6 19.9-32.2V283.9c0-15-9.3-28.4-23.4-33.7zM358 214.8l-85 31.9v-68.2l85-37v73.3zM154 104.1l102-38.2 102 38.2v.6l-102 41.4-102-41.4v-.6zm84 291.1l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6zm240 112l-85 42.5v-79.1l85-38.8v75.4zm0-112l-102 41.4-102-41.4v-.6l102-38.2 102 38.2v.6z"/></svg>
|
||||
<h4 class="modulerow_title"><?php echo JText::_('CK_MODULE') ?></h4>
|
||||
<?php echo JText::_('CK_MODULE_NOT_SELECTED') ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the interface for the item edition
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckLoadItemOptionsModule() {
|
||||
// load the language files of the plugin
|
||||
$this->loadLanguage();
|
||||
// load the interface for the options
|
||||
$tpl = JPATH_SITE . '/plugins/pagebuilderck/module/layouts/edit_module.php';
|
||||
return $tpl;
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the html code for the item to be used into the frontend page
|
||||
* @param string the item object from simple_html_dom
|
||||
*
|
||||
* Return String the html code
|
||||
*/
|
||||
public function onPagebuilderckRenderItemModule($item) {
|
||||
return $item->innertext;
|
||||
}
|
||||
}
|
||||
24
plugins/pagebuilderck/module/module.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3" type="plugin" group="pagebuilderck" method="upgrade">
|
||||
<name>plg_pagebuilderck_module_xml_name</name>
|
||||
<creationDate>December 2015</creationDate>
|
||||
<copyright>Copyright (C) 2015. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<author>Cedric Keiflin</author>
|
||||
<authorEmail>ced1870@gmail.com</authorEmail>
|
||||
<authorUrl>https://www.joomlack.fr</authorUrl>
|
||||
<version>3.0.0</version>
|
||||
<description>Module item for Page Builder CK</description>
|
||||
<files>
|
||||
<filename plugin="module">module.php</filename>
|
||||
<folder>language</folder>
|
||||
<folder>layouts</folder>
|
||||
<folder>assets</folder>
|
||||
</files>
|
||||
<languages folder="language">
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_module.sys.ini</language>
|
||||
<language tag="en-GB">en-GB/en-GB.plg_pagebuilderck_module.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_module.sys.ini</language>
|
||||
<language tag="fr-FR">fr-FR/fr-FR.plg_pagebuilderck_module.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||