first commit
This commit is contained in:
1
plugins/pagebuilderck/image/assets/images/image.svg
Normal file
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
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
1
plugins/pagebuilderck/image/assets/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
85
plugins/pagebuilderck/image/image.php
Normal file
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
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
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
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
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
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
1
plugins/pagebuilderck/image/layouts/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
Reference in New Issue
Block a user