File manager - Edit - /home/jardides/www/Jardi-design/plugins/system/pagebuilderckparams/includes/library.php
Back
<?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 - http://www.template-creator.com - http://www.joomlack.fr */ defined('_JEXEC') or die; $input = JFactory::getApplication()->input; $target = $input->get('target', '', 'cmd'); ?> <style> body { background: #f5f5f5; color: #333; } body .ckinterface { background: #f5f5f5; } .ckgalleryitem { /*height: 150px;*/ /*width: 150px;*/ overflow: hidden; /*float: left;*/ margin: 10px 0px 5px; cursor: pointer; border: 1px solid #ccc; position: relative; } .ckgalleryitem:after { display: block; content: ""; left: 0; right: 0; top: 0; bottom: 0; position: absolute; background: #000; opacity: 0; z-index: 1; transition: opacity 0.3s; } .ckgalleryitem img { max-height: 100%; max-width: none; width: 100%; } .ckgalleryitem:hover { border: 1px solid #3399ff; box-shadow: 0 0 5px #3399ff; } .ckgalleryitem:hover:after { opacity: 0.3; } .ckgalleryitempreviewbtn, .ckgalleryitemloadbtn { left: 0; right: 0; top: -50px; position: absolute; z-index: 2; text-align: center; transition: all 0.3s; } .ckgalleryitem button { box-shadow: 0 0 15px #333; background: #333; color: #eee; padding: 10px 15px; border: none; } .ckgalleryitem button:hover { background: #3399ff; } .ckgalleryitemloadbtn { top: auto; /*bottom: -50px;*/ opacity: 0; } .ckgalleryitem:hover .ckgalleryitempreviewbtn { top: 20px; } .ckgalleryitem:hover .ckgalleryitemloadbtn { bottom: calc(50% - 20px); opacity: 1; } .ckboxmodal { text-align: center; padding: 10px; } .ckgalleryitemtitle { display: none; /* hidden since 2.3.0 */ font-size: 14px; text-align: center; font-weight: bold; line-height: 20px; margin: 10px 0; height: 20px; } .ckgallerysection { clear: both; padding: 1px; } #filtertoolbar select { width: 100%; } </style> <?php PagebuilderckHelper::loadInlineCKFramework(); ?> <script src="<?php echo PAGEBUILDERCK_MEDIA_URI ?>/assets/ckbox.js" type="text/javascript"></script> <link rel="stylesheet" href="<?php echo PAGEBUILDERCK_MEDIA_URI ?>/assets/ckbox.css" type="text/css" /> <link rel="stylesheet" href="<?php echo PAGEBUILDERCK_MEDIA_URI ?>/assets/pagebuilderck.css" type="text/css" /> <div id="ckinterface" class="ckinterface"> </div> <script> function ckFilterByCats (cat) { if (cat == 'all') { jQuery('section').show(); return; } // jQuery('i.fa').parent().parent().show(); jQuery('section').hide(); jQuery('section#' + cat).show(); // jQuery('#filter-by').val(''); } /* Show the large preview image */ function ckPreviewGalleryItem(btn, imgurl) { var item = jQuery(jQuery(btn).parents('.ckgalleryitem')[0]); var id = item.attr('data-id'); itemImgCont = jQuery('.ckgalleryitempreview[data-id="' + id + '"]'); if (! jQuery('.ckgalleryitempreviewimg img', itemImgCont).length) { jQuery('.ckgalleryitempreviewimg', itemImgCont).removeClass('ckwait').append('<img src="' + imgurl + '" />'); } // itemImgCont.css('display', 'block'); CKBox.open({handler: 'inline', content: itemImgCont.attr('id')}); } /* Load the item in the page */ function ckLoadGalleryItem(category, name) { window.parent.returnLoadPage(category + '/' + name, 'library'); } function ckCapitalize(s) { return s[0].toUpperCase() + s.slice(1); } function ckGetLibraryData() { jQuery('#ckinterface').addClass('ckwait'); sessionStorage.setItem('pagebuilderck_library_categories',''); if (window.sessionStorage && sessionStorage.getItem('pagebuilderck_library_categories')) { var categorieshtml = sessionStorage.getItem('pagebuilderck_library_categories'); jQuery('#ckinterface').append(categorieshtml); jQuery('#ckinterface').removeClass('ckwait'); } else { var url = 'https://media.joomlack.fr/api/pagebuilderck/pages'; jQuery.ajax({ url: url, dataType: 'jsonp', // cache: true, jsonpCallback: "joomlack_jsonpcallback", timeout: 20000, success: function (response) { jQuery('.ckinterface').removeClass('ckwait'); var buttonhtml = ''; var sectionhtml = ''; for (var cat in response) { buttonhtml += '<option value="' + ckCapitalize(cat) + '">' + ckCapitalize(cat) + '</option>'; sectionhtml += '<section id="' + cat.toLowerCase() + '" class="ckgallerysection">' + '<h2 class="page-header">' + ckCapitalize(cat) + '</h2>' + '<div class="row">'; for (var i=0;i<response[cat].length;i++) { var item = response[cat][i]; var dataid = cat.toLowerCase() + '-' + item['name'].toLowerCase(); sectionhtml += '<div class="ckgalleryitem" data-id="' + dataid + '">' + '<div class="ckgalleryitemtitle">' + ckCapitalize(item['name']) + '</div>' + '<img src="' + item['thumb'] + '" />' //+ '<div class="ckgalleryitempreviewbtn"><button class="ckbutton" onclick="ckPreviewGalleryItem(this, \'' + item['preview'] + '\')"><?php //echo JText::_('CK_PREVIEW') ?></button></div>' + '<div class="ckgalleryitemloadbtn"><button class="ckbutton" onclick="ckLoadGalleryItem(\'' + cat.toLowerCase() + '\', \'' + item['name'] + '\')"><?php echo JText::_('CK_IMPORT') ?></button></div>' + '</div>' + '<div class="ckgalleryitempreview" id="' + dataid + 'preview" data-id="' + dataid + '" style="display: none;">' + '<h2 class="ckgalleryitempreviewtitle">' + ckCapitalize(item['name']) + '</h2>' + '<div class="ckgalleryitempreviewimg ckwait"></div>' + '</div>' ; } sectionhtml += '</div>' + '</section>'; } var categorieshtml = '<div id="filtertoolbar">' + '<select onclick="ckFilterByCats(this.value)">' + '<option value="all">All</option>' + buttonhtml + '</select>' + '</div>' + sectionhtml + '<div style="clear:both;"></div>'; sessionStorage.setItem('pagebuilderck_library_categories', categorieshtml); jQuery('#ckinterface').append(categorieshtml); jQuery('#ckinterface').removeClass('ckwait'); }, fail: function() { alert('Error : Unable to connect to the library. Please contact an administrator'); }, complete: function() { }, error: function(request, status, error) { } }); } } jQuery(document).ready(function() { ckGetLibraryData(); }); </script>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings