File manager - Edit - /home/jardides/www/Jardi-design/administrator/components/com_templateck/widgets/topfixedwrapper/topfixedwrapper.php
Back
<?php /** * @name Template Creator CK 3 * @package com_templateck * @copyright Copyright (C) 2013. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr */ defined('_JEXEC') or die; class TCK_WidgetTopfixedwrapper { private $name = 'topfiwedwrapper'; public function loadWidget() { ?> <script src="<?php echo JUri::root(true) ?>/administrator/components/com_templateck/widgets/topfixedwrapper/interface.js" type="text/javascript"></script> <?php } public function renderFrontendWidget($templatepath, $templatename) { JFolder::create(JPATH_SITE . '/components/com_templateck/projects/' . $templatename . '/js'); JFile::copy(JPATH_SITE . '/administrator/components/com_templateck/widgets/topfixedwrapper/topfixedwrapper.js', JPATH_SITE . '/components/com_templateck/projects/' . $templatename . '/js/topfixedwrapper.js'); $widget = array(); $widget['php'] = 'JHtml::_(\'jquery.framework\');'; $widget['script'] = '<script src="' . $templatepath . '/js/topfixedwrapper.js" type="text/javascript" ></script>'; $widget['scriptDeclaration'] = 'jQuery(document).ready(function(){ jQuery(\'.topfixedwrapper\').TCK_TopFixedWrapper(); });'; $widget['stylesheet'] = ''; $widget['styleDeclaration'] = ''; return $widget; } public function onAfterInstall() { } public function listWrapperOptions() { $input = JFactory::getApplication()->input; $blocsList = $input->get('blocsList', '', 'string'); $blocsList = json_decode($blocsList); $this->showInfos(); $this->renderTopBar(); foreach ($blocsList as $bloc) { $this->renderOptions($bloc); } $this->renderCss(); // echo $html; exit(); } private function showInfos() { ?> <p><?php echo JText::_('CK_WIDGET_TOP_FIXED_WRAPPER_INFOS') ?></p> <?php } private function renderTopBar() { ?> <div class="widgettopbar"> <div> <span style="display:inline-block;width: 165px;font-weight: bold;"><?php echo JText::_('CK_BLOCK') ?></span> <span style="display:inline-block;width: 65px;font-weight: bold;"><?php echo JText::_('CK_ACTION') ?></span> </div> <p></p> </div> <?php } private function renderOptions($bloc) { // $prefix = $bloc->id; $btnClass = $bloc->enabled ? ' active ckbutton-info' : ''; ?> <div class="datarow widgetrow" style="text-align:left;" data-id="<?php echo $bloc->id ?>"> <span style="display:inline-block;width: 150px;" class=""><?php echo $bloc->id ?></span> <span style="display:inline-block;" class="ckselecttopfixedwrapper ckbutton <?php echo $btnClass ?>" onclick="TCK_WidgetTopfixedwrapperToggle(this)" data-state="<?php echo $bloc->enabled ?>"><span class="fa fa-check-square-o"></span> <?php echo JText::_('CK_SELECT'); ?></span> <div class="clr"></div> </div> <?php } private function renderCss() { ?> <style> </style> <?php } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings