File manager - Edit - /home/jardides/www/Jardi-design/administrator/components/com_templateck/views/template/tmpl/ajaxrowmanager.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 */ // No direct access to this file defined('_JEXEC') or die('Restricted access'); $app = JFactory::getApplication(); ?> <div class="ckpopupoverlay"></div> <div class="ckpopupheader"> <div class="ckpopuplogo"></div> <div class="ckpopuptitle"><?php echo JText::_('CK_ROW_MANAGER'); ?></div> <div style="float:right;"> <div class="ckclose ckcancel" onclick="$ck('#popup_editionck').empty().hide();"><?php echo JText::_('CK_CANCEL'); ?></div> <div class="ckclose cksave" onclick="saveRowPopup();"><?php echo JText::_('CK_VALIDATE'); ?></div> </div> <div class="clr"></div> </div> <table> <tr> <td style="vertical-align:top;"> <div class="layoutinfos"> <div class="layoutinfostitle"><?php echo JText::_('CK_ROW_MANAGER_INFOS'); ?></div> <div class="layoutinfosdesc"><?php echo JText::_('CK_ROW_MANAGER_DESC'); ?></div> </div> </td> <td style="vertical-align:top;"> <div id="elementscontainer" style="margin-top: 8px;"> <div id="modulesnumberselect"> <div class="modulemanagerheader"><?php echo JText::_('CK_NUMBEROFMODULES'); ?></div> <div class="blocnumberselect" onclick="selectnumberofmodules(1);"> <?php echo JText::_('1'); ?> </div> <div class="blocnumberselect" onclick="selectnumberofmodules(2);"> <?php echo JText::_('2'); ?> </div> <div class="blocnumberselect" onclick="selectnumberofmodules(3);"> <?php echo JText::_('3'); ?> </div> <div class="blocnumberselect" onclick="selectnumberofmodules(4);"> <?php echo JText::_('4'); ?> </div> <div class="blocnumberselect" onclick="selectnumberofmodules(5);"> <?php echo JText::_('5'); ?> </div> <div class="blocnumberselect" onclick="selectnumberofmodules(6);"> <?php echo JText::_('6'); ?> </div> <div class="blocnumberselect" onclick="selectnumberofmodules(7);"> <?php echo JText::_('7'); ?> </div> <div class="blocnumberselect" onclick="selectnumberofmodules(8);"> <?php echo JText::_('8'); ?> </div> <input type="hidden" name="blocnumberselect" id="blocnumberselect" value="" /> <div class="clr"></div> </div> <div id="modulesmanagertitle"><?php echo JText::_('CK_ROW_MANAGER'); ?></div> <div id="modulesmanager"> <div class="modulemanagercontainer clearfix"> <?php for($i=0; $i<8; $i++) { ?> <div class="modulemanager"> <div class="inner" onclick="togglemodulewidthstate(this);"> </div> <div class="modulewidthselectcont"> <input type="text" class="inputbox modulewidthselect" id="rowmanagerbloc<?php echo $i ?>" value="" onchange="calculateblocswidth(this);"/> <?php echo JText::_('%'); ?> </div> <div class="modulewidth"> <div class="modulewidth_barleft"></div> <div class="modulewidth_barright"></div> <div class="clr"></div> </div> </div> <?php } ?> </div> </div> </div> </td> </tr> </table> <script language="javascript" type="text/javascript"> function calculateblocswidth(field) { var container = $ck(field).parents('.modulemanagercontainer'); var enabledfields = $ck('.modulemanager:not(.disabled) .modulewidthselect:not(.disabled,.locked,#' + $ck(field).attr('id') + ')', container); var amount = enabledfields.length; var lockedvalue = 0; $ck('.modulewidthselect.locked', container).each(function(i, modulefield) { modulefield = $ck(modulefield); if (modulefield.attr('value') == '') { modulefield.removeClass('locked').next('input').attr('checked', false); calculateblocswidth(field); } if (modulefield.attr('id') != $ck(field).attr('id')) { lockedvalue = parseFloat(modulefield.attr('value')) + parseFloat(lockedvalue); } }); var mw = parseFloat($ck(field).attr('value')); // $ck(field).attr('value',mw+'%'); var percent = (100 - mw - lockedvalue) / amount; enabledfields.each(function(i, modulefield) { if ($ck(modulefield).attr('id') != $ck(field).attr('id') && !$ck(modulefield).hasClass('locked')) { $ck(modulefield).attr('value', parseFloat(percent)); } }); changemoduledisplay(); } function togglemodulewidthstate(locker) { var input = $ck(locker).parent().find('input.modulewidthselect'); var enableamount = $ck('.modulemanager:not(.disabled)', $ck(locker).parents('.modulemanagercontainer')).length; var loackedamount = $ck('.modulewidthselect.locked', $ck(locker).parents('.modulemanagercontainer')).length; if (loackedamount >= (enableamount - 1) && !input.hasClass('locked')) { alert('Not possible ! You can not lock all the width'); return; } if (!input.hasClass('locked')) { input.addClass('locked'); $ck(locker).addClass('locked'); } else { input.removeClass('locked'); $ck(locker).removeClass('locked'); } } function selectnumberofmodules(number) { $ck('.modulemanager:gt(' + (number - 1) + ')').css('display', 'none').addClass('disabled'); $ck('.modulemanager:lt(' + (number) + ')').css('display', 'block').removeClass('disabled'); $ck('.blocnumberselect').removeClass('selected'); $ck('.blocnumberselect:eq(' + (number - 1) + ')').addClass('selected'); $ck('#blocnumberselect').attr('value', number); setmoduleswidth(true); changemoduledisplay(); } function changemoduledisplay() { $ck('.modulemanager').each(function(i, module) { $ck(module).css('width', parseFloat($ck(module).find('.modulewidthselect').attr('value')) + '%'); }); } function initmodules() { var focus = $ck('.cssfocus'); if (!focus.attr('numberofmodules')) { selectnumberofmodules(4); } else { selectnumberofmodules(focus.attr('numberofmodules')); } setmoduleswidth(); changemoduledisplay(); } function setmoduleswidth(isnew) { nbmodules = $ck('#blocnumberselect').val(); moduleswidthfromfocus = $ck('.cssfocus > .inner > .ckrowcontainer').map(function() { return $ck(this).attr('data-width'); }); moduleswidth = moduleswidthfromfocus.length && !isnew ? moduleswidthfromfocus : getdefaultwidth(nbmodules) // moduleswidth = $ck('.cssfocus').attr('blocswidth') && !isnew ? $ck('.cssfocus').attr('blocswidth').split(',') : getdefaultwidth(nbmodules); $ck('.modulewidthselect').each(function(j, module) { module = $ck(module); module.attr('value', moduleswidth[j]); }); } initmodules(); </script>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings