feat(deployed): add Helix3 2.5.5 (no-source, vetted live)
Helix3 (JoomShaper) template + system/ajax plugins; the live templates/shaper_helix3/index.php was fbwjedi-cloaking-infected and is replaced with the clean monolith copy -> deployed files. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
82
deployed/helix3/plugins/ajax/helix3/classes/image.php
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class Helix3Image {
|
||||||
|
|
||||||
|
public static function createThumbs($src, $sizes = array(), $folder, $base_name, $ext) {
|
||||||
|
|
||||||
|
list($originalWidth, $originalHeight) = getimagesize($src);
|
||||||
|
|
||||||
|
switch($ext) {
|
||||||
|
case 'bmp': $img = imagecreatefromwbmp($src); break;
|
||||||
|
case 'gif': $img = imagecreatefromgif($src); break;
|
||||||
|
case 'jpg': $img = imagecreatefromjpeg($src); break;
|
||||||
|
case 'jpeg': $img = imagecreatefromjpeg($src); break;
|
||||||
|
case 'png': $img = imagecreatefrompng($src); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($sizes)) {
|
||||||
|
$output = array();
|
||||||
|
|
||||||
|
if($base_name) {
|
||||||
|
$output['original'] = $folder . '/' . $base_name . '.' . $ext;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($sizes as $key => $size) {
|
||||||
|
$targetWidth = $size[0];
|
||||||
|
$targetHeight = $size[1];
|
||||||
|
$ratio_thumb = $targetWidth/$targetHeight;
|
||||||
|
$ratio_original = $originalWidth/$originalHeight;
|
||||||
|
|
||||||
|
if ($ratio_original >= $ratio_thumb) {
|
||||||
|
$height = $originalHeight;
|
||||||
|
$width = ceil(($height*$targetWidth)/$targetHeight);
|
||||||
|
$x = ceil(($originalWidth-$width)/2);
|
||||||
|
$y = 0;
|
||||||
|
} else {
|
||||||
|
$width = $originalWidth;
|
||||||
|
$height = ceil(($width*$targetHeight)/$targetWidth);
|
||||||
|
$y = ceil(($originalHeight-$height)/2);
|
||||||
|
$x = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$new = imagecreatetruecolor($targetWidth, $targetHeight);
|
||||||
|
|
||||||
|
if($ext == "gif" or $ext == "png") {
|
||||||
|
imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 100));
|
||||||
|
imagealphablending($new, false);
|
||||||
|
imagesavealpha($new, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
imagecopyresampled($new, $img, 0, 0, $x, $y, $targetWidth, $targetHeight, $width, $height);
|
||||||
|
|
||||||
|
if($base_name) {
|
||||||
|
$dest = dirname($src) . '/' . $base_name . '_' . $key . '.' . $ext;
|
||||||
|
$output[$key] = $folder . '/' . $base_name . '_' . $key . '.' . $ext;
|
||||||
|
} else {
|
||||||
|
$dest = $folder . '/' . $key . '.' . $ext;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch($ext) {
|
||||||
|
case 'bmp': imagewbmp($new, $dest); break;
|
||||||
|
case 'gif': imagegif($new, $dest); break;
|
||||||
|
case 'jpg': imagejpeg($new, $dest, 100); break;
|
||||||
|
case 'jpeg': imagejpeg($new, $dest, 100); break;
|
||||||
|
case 'png': imagepng($new, $dest); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
789
deployed/helix3/plugins/ajax/helix3/helix3.php
Normal file
@ -0,0 +1,789 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.plugin.plugin');
|
||||||
|
jimport('joomla.filesystem.folder');
|
||||||
|
jimport('joomla.filesystem.file');
|
||||||
|
jimport('joomla.registry.registry');
|
||||||
|
jimport('joomla.image.image');
|
||||||
|
|
||||||
|
require_once __DIR__ . '/classes/image.php';
|
||||||
|
|
||||||
|
class plgAjaxHelix3 extends JPlugin
|
||||||
|
{
|
||||||
|
|
||||||
|
function onAjaxHelix3()
|
||||||
|
{
|
||||||
|
$input = JFactory::getApplication()->input;
|
||||||
|
$action = $input->post->get('action', '', 'STRING');
|
||||||
|
|
||||||
|
if($action=='upload_image') {
|
||||||
|
$this->upload_image();
|
||||||
|
return;
|
||||||
|
} else if($action=='remove_image') {
|
||||||
|
$this->remove_image();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_POST['data']) {
|
||||||
|
$data = json_decode(json_encode($_POST['data']), true);;
|
||||||
|
$action = $data['action'];
|
||||||
|
$layoutName = '';
|
||||||
|
|
||||||
|
if (isset($data['layoutName'])) {
|
||||||
|
$layoutName = $data['layoutName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = self::getTemplate()->template;
|
||||||
|
$layoutPath = JPATH_SITE.'/templates/'.$template.'/layout/';
|
||||||
|
|
||||||
|
$filepath = $layoutPath.$layoutName;
|
||||||
|
|
||||||
|
$report = array();
|
||||||
|
$report['action'] = 'none';
|
||||||
|
$report['status'] = 'false';
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
case 'remove':
|
||||||
|
if (file_exists($filepath)) {
|
||||||
|
unlink($filepath);
|
||||||
|
$report['action'] = 'remove';
|
||||||
|
$report['status'] = 'true';
|
||||||
|
}
|
||||||
|
$report['layout'] = JFolder::files($layoutPath, '.json');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'save':
|
||||||
|
if ($layoutName) {
|
||||||
|
$layoutName = strtolower(str_replace(' ','-',$layoutName));
|
||||||
|
}
|
||||||
|
$content = $data['content'];
|
||||||
|
|
||||||
|
if ($content && $layoutName) {
|
||||||
|
$file = fopen($layoutPath.$layoutName.'.json', 'wb');
|
||||||
|
fwrite($file, $content);
|
||||||
|
fclose($file);
|
||||||
|
}
|
||||||
|
$report['layout'] = JFolder::files($layoutPath, '.json');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'load':
|
||||||
|
if (file_exists($filepath)) {
|
||||||
|
$content = file_get_contents($filepath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($content) && $content) {
|
||||||
|
echo $layoutHtml = self::loadNewLayout(json_decode($content));
|
||||||
|
}
|
||||||
|
die();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'resetLayout':
|
||||||
|
if($layoutName){
|
||||||
|
echo self::resetMenuLayout($layoutName);
|
||||||
|
}
|
||||||
|
die();
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Upload Image
|
||||||
|
case 'upload_image':
|
||||||
|
echo "Joomla";
|
||||||
|
die();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'voting':
|
||||||
|
|
||||||
|
if (JSession::checkToken()) {
|
||||||
|
return json_encode($report);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rate = -1;
|
||||||
|
$pk = 0;
|
||||||
|
|
||||||
|
if (isset($data['user_rating'])) {
|
||||||
|
$rate = (int)$data['user_rating'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($data['id'])) {
|
||||||
|
$id = str_replace('post_vote_','',$data['id']);
|
||||||
|
$pk = (int)$id;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($rate >= 1 && $rate <= 5 && $id > 0)
|
||||||
|
{
|
||||||
|
$userIP = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query->select('*')
|
||||||
|
->from($db->quoteName('#__content_rating'))
|
||||||
|
->where($db->quoteName('content_id') . ' = ' . (int) $pk);
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$rating = $db->loadObject();
|
||||||
|
}
|
||||||
|
catch (RuntimeException $e)
|
||||||
|
{
|
||||||
|
return json_encode($report);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$rating)
|
||||||
|
{
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query->insert($db->quoteName('#__content_rating'))
|
||||||
|
->columns(array($db->quoteName('content_id'), $db->quoteName('lastip'), $db->quoteName('rating_sum'), $db->quoteName('rating_count')))
|
||||||
|
->values((int) $pk . ', ' . $db->quote($userIP) . ',' . (int) $rate . ', 1');
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$db->execute();
|
||||||
|
|
||||||
|
$data = self::getItemRating($pk);
|
||||||
|
$rating = $data->rating;
|
||||||
|
|
||||||
|
$report['action'] = $rating;
|
||||||
|
$report['status'] = 'true';
|
||||||
|
|
||||||
|
return json_encode($report);
|
||||||
|
}
|
||||||
|
catch (RuntimeException $e)
|
||||||
|
{
|
||||||
|
return json_encode($report);;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($userIP != ($rating->lastip))
|
||||||
|
{
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query->update($db->quoteName('#__content_rating'))
|
||||||
|
->set($db->quoteName('rating_count') . ' = rating_count + 1')
|
||||||
|
->set($db->quoteName('rating_sum') . ' = rating_sum + ' . (int) $rate)
|
||||||
|
->set($db->quoteName('lastip') . ' = ' . $db->quote($userIP))
|
||||||
|
->where($db->quoteName('content_id') . ' = ' . (int) $pk);
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$db->execute();
|
||||||
|
|
||||||
|
$data = self::getItemRating($pk);
|
||||||
|
$rating = $data->rating;
|
||||||
|
|
||||||
|
$report['action'] = $rating;
|
||||||
|
$report['status'] = 'true';
|
||||||
|
|
||||||
|
return json_encode($report);
|
||||||
|
}
|
||||||
|
catch (RuntimeException $e)
|
||||||
|
{
|
||||||
|
return json_encode($report);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
$report['status'] = 'invalid';
|
||||||
|
return json_encode($report);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$report['action'] = 'failed';
|
||||||
|
$report['status'] = 'false';
|
||||||
|
return json_encode($report);
|
||||||
|
break;
|
||||||
|
|
||||||
|
//Font variant
|
||||||
|
case 'fontVariants':
|
||||||
|
|
||||||
|
$template_path = JPATH_SITE . '/templates/' . self::getTemplate()->template . '/webfonts/webfonts.json';
|
||||||
|
$plugin_path = JPATH_PLUGINS . '/system/helix3/assets/webfonts/webfonts.json';
|
||||||
|
|
||||||
|
if(JFile::exists( $template_path )) {
|
||||||
|
$json = JFile::read( $template_path );
|
||||||
|
} else {
|
||||||
|
$json = JFile::read( $plugin_path );
|
||||||
|
}
|
||||||
|
|
||||||
|
$webfonts = json_decode($json);
|
||||||
|
$items = $webfonts->items;
|
||||||
|
|
||||||
|
$output = array();
|
||||||
|
$fontVariants = '';
|
||||||
|
$fontSubsets = '';
|
||||||
|
foreach ($items as $item) {
|
||||||
|
if($item->family==$layoutName) {
|
||||||
|
|
||||||
|
//Variants
|
||||||
|
foreach ($item->variants as $variant) {
|
||||||
|
$fontVariants .= '<option value="'. $variant .'">' . $variant . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Subsets
|
||||||
|
foreach ($item->subsets as $subset) {
|
||||||
|
$fontSubsets .= '<option value="'. $subset .'">' . $subset . '</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$output['variants'] = $fontVariants;
|
||||||
|
$output['subsets'] = $fontSubsets;
|
||||||
|
|
||||||
|
return json_encode($output);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
//Font variant
|
||||||
|
case 'updateFonts':
|
||||||
|
|
||||||
|
jimport( 'joomla.filesystem.folder' );
|
||||||
|
jimport('joomla.http.http');
|
||||||
|
|
||||||
|
$template_path = JPATH_SITE . '/templates/' . self::getTemplate()->template . '/webfonts';
|
||||||
|
|
||||||
|
if(!JFolder::exists( $template_path )) {
|
||||||
|
JFolder::create( $template_path, 0755 );
|
||||||
|
}
|
||||||
|
|
||||||
|
$url = 'https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyBVybAjpiMHzNyEm3ncA_RZ4WETKsLElDg';
|
||||||
|
$http = new JHttp();
|
||||||
|
$str = $http->get($url);
|
||||||
|
|
||||||
|
if ( JFile::write( $template_path . '/webfonts.json', $str->body )) {
|
||||||
|
echo "<p class='font-update-success'>Google Webfonts list successfully updated! Please refresh your browser.</p>";
|
||||||
|
} else {
|
||||||
|
echo "<p class='font-update-failed'>Google Webfonts update failed. Please make sure that your template folder is writable.</p>";
|
||||||
|
}
|
||||||
|
|
||||||
|
die();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
//Template setting import
|
||||||
|
case 'import':
|
||||||
|
|
||||||
|
$template_id = filter_var( $data['template_id'], FILTER_VALIDATE_INT );
|
||||||
|
|
||||||
|
if ( !$template_id ) {
|
||||||
|
die();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$settings = $data['settings'];
|
||||||
|
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$fields = array(
|
||||||
|
$db->quoteName( 'params' ) . ' = ' . $db->quote( $settings )
|
||||||
|
);
|
||||||
|
|
||||||
|
$conditions = array(
|
||||||
|
$db->quoteName( 'id' ) . ' = '. $db->quote( $template_id ),
|
||||||
|
$db->quoteName('client_id') . ' = 0'
|
||||||
|
);
|
||||||
|
|
||||||
|
$query->update($db->quoteName('#__template_styles'))->set($fields)->where($conditions);
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$db->execute();
|
||||||
|
|
||||||
|
die();
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return json_encode($report);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function getItemRating($pk = 0){
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select('ROUND(rating_sum / rating_count, 0) AS rating, rating_count')
|
||||||
|
->from($db->quoteName('#__content_rating'))
|
||||||
|
->where($db->quoteName('content_id') . ' = ' . (int) $pk);
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
$data = $db->loadObject();
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function resetMenuLayout($current_menu_id = 0){
|
||||||
|
|
||||||
|
if (!$current_menu_id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$items = self::menuItems();
|
||||||
|
$item = array();
|
||||||
|
|
||||||
|
if (isset($items[$current_menu_id]) && !empty($items[$current_menu_id])) {
|
||||||
|
$item = $items[$current_menu_id];
|
||||||
|
}
|
||||||
|
|
||||||
|
$menuItems = new JMenuSite;
|
||||||
|
|
||||||
|
$no_child = true;
|
||||||
|
$count = 0;
|
||||||
|
$x_key = 0;
|
||||||
|
$y_key = 0;
|
||||||
|
$check_child = 0;
|
||||||
|
$item_array = array();
|
||||||
|
|
||||||
|
foreach ($item as $key => $id){
|
||||||
|
$status = 0;
|
||||||
|
if (isset($items[$id]) && is_array($items[$id])){
|
||||||
|
$no_child = false;
|
||||||
|
$count = $count + 1;
|
||||||
|
$check_child = $check_child+1;
|
||||||
|
$status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($check_child === 2){
|
||||||
|
$y_key = 0;
|
||||||
|
$x_key = $x_key + 1;
|
||||||
|
$check_child = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$item_array[$x_key][$y_key] = array($id,$status);
|
||||||
|
$y_key = $y_key + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($no_child === true){
|
||||||
|
$count = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($count > 4 && $count != 6){
|
||||||
|
$count = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
if($no_child === true)
|
||||||
|
{
|
||||||
|
echo '<div class="menu-section">';
|
||||||
|
echo '<span class="row-move"><i class="fa fa-bars"></i></span>';
|
||||||
|
echo '<div class="spmenu sp-row">';
|
||||||
|
echo '<div class="column sp-col-md-12" data-column="12">';
|
||||||
|
echo '<div class="column-items-wrap">';
|
||||||
|
if (!empty($item)) {
|
||||||
|
echo '<h4 style="display:none" data-current_child="'.$current_menu_id.'" >'.$menuItems->getItem($current_menu_id)->title.'</h4>';
|
||||||
|
echo '<ul class="child-menu-items">';
|
||||||
|
|
||||||
|
foreach ($item as $key => $id)
|
||||||
|
{
|
||||||
|
echo '<li>'.$menuItems->getItem($id)->title.'</li>';
|
||||||
|
}
|
||||||
|
echo '</ul>';
|
||||||
|
}
|
||||||
|
echo '<div class="modules-container">';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<div class="menu-section">';
|
||||||
|
echo '<span class="row-move"><i class="fa fa-bars"></i></span>';
|
||||||
|
echo '<div class="spmenu sp-row">';
|
||||||
|
|
||||||
|
$columnNumber = 12 / $count;
|
||||||
|
foreach ($item_array as $key => $item_array)
|
||||||
|
{
|
||||||
|
echo '<div class="column sp-col-md-'.$columnNumber.'" data-column="'.$columnNumber.'">';
|
||||||
|
echo '<div class="column-items-wrap">';
|
||||||
|
|
||||||
|
foreach ($item_array as $key => $item)
|
||||||
|
{
|
||||||
|
$id = $item[0];
|
||||||
|
echo '<h4 data-current_child="'.$id.'" >'.$menuItems->getItem($id)->title.'</h4>';
|
||||||
|
if ($item[1])
|
||||||
|
{
|
||||||
|
echo '<ul class="child-menu-items">';
|
||||||
|
echo self::create_menu($id);
|
||||||
|
echo '</ul>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo '<div class="modules-container"></div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = ob_get_contents();
|
||||||
|
ob_clean();
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function create_menu($current_menu_id)
|
||||||
|
{
|
||||||
|
$items = self::menuItems();
|
||||||
|
$menus = new JMenuSite;
|
||||||
|
|
||||||
|
if (isset($items[$current_menu_id]))
|
||||||
|
{
|
||||||
|
$item = $items[$current_menu_id];
|
||||||
|
foreach ($item as $key => $item_id)
|
||||||
|
{
|
||||||
|
echo '<li>';
|
||||||
|
echo $menus->getItem($item_id)->title;
|
||||||
|
echo '</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function menuItems()
|
||||||
|
{
|
||||||
|
$menus = new JMenuSite;
|
||||||
|
$menus = $menus->getMenu();
|
||||||
|
$new = array();
|
||||||
|
foreach ($menus as $item) {
|
||||||
|
$new[$item->parent_id][] = $item->id;
|
||||||
|
}
|
||||||
|
return $new;
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function loadNewLayout($layout_data = null){
|
||||||
|
|
||||||
|
$lang = JFactory::getLanguage();
|
||||||
|
$lang->load('tpl_' . self::getTemplate()->template, JPATH_SITE, $lang->getName(), true);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
$colGrid = array(
|
||||||
|
'12' => '12',
|
||||||
|
'66' => '6,6',
|
||||||
|
'444' => '4,4,4',
|
||||||
|
'3333' => '3,3,3,3',
|
||||||
|
'48' => '4,8',
|
||||||
|
'39' => '3,9',
|
||||||
|
'363' => '3,6,3',
|
||||||
|
'264' => '2,6,4',
|
||||||
|
'210' => '2,10',
|
||||||
|
'57' => '5,7',
|
||||||
|
'237' => '2,3,7',
|
||||||
|
'255' => '2,5,5',
|
||||||
|
'282' => '2,8,2',
|
||||||
|
'2442' => '2,4,4,2',
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($layout_data) {
|
||||||
|
foreach ($layout_data as $row) {
|
||||||
|
$rowSettings = self::getSettings($row->settings);
|
||||||
|
$name = JText::_('HELIX_SECTION_TITLE');
|
||||||
|
|
||||||
|
if (isset($row->settings->name)) {
|
||||||
|
$name = $row->settings->name;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="layoutbuilder-section" <?php echo $rowSettings; ?>>
|
||||||
|
<div class="settings-section clearfix">
|
||||||
|
<div class="settings-left pull-left">
|
||||||
|
<a class="row-move" href="#"><i class="fa fa-arrows"></i></a>
|
||||||
|
<strong class="section-title"><?php echo $name; ?></strong>
|
||||||
|
</div>
|
||||||
|
<div class="settings-right pull-right">
|
||||||
|
<ul class="button-group">
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-small add-columns" href="#"><i class="fa fa-columns"></i> <?php echo JText::_('HELIX_ADD_COLUMNS'); ?></a>
|
||||||
|
<ul class="column-list">
|
||||||
|
<?php
|
||||||
|
$_active = '';
|
||||||
|
foreach ($colGrid as $key => $grid){
|
||||||
|
if($key == $row->layout){
|
||||||
|
$_active = 'active';
|
||||||
|
}
|
||||||
|
echo '<li><a href="#" class="column-layout column-layout-' .$key. ' '.$_active.'" data-layout="'.$grid.'"></a></li>';
|
||||||
|
$_active ='';
|
||||||
|
} ?>
|
||||||
|
<?php
|
||||||
|
$active = '';
|
||||||
|
$customLayout = '';
|
||||||
|
if (!isset($colGrid[$row->layout])) {
|
||||||
|
$active = 'active';
|
||||||
|
$split = str_split($row->layout);
|
||||||
|
$customLayout = implode(',',$split);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li><a href="#" class="hasTooltip column-layout-custom column-layout custom <?php echo $active; ?>" data-layout="<?php echo $customLayout; ?>" data-type='custom' data-original-title="<strong>Custom Layout</strong>"></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a class="btn btn-small add-row" href="#"><i class="fa fa-bars"></i> <?php echo JText::_('HELIX_ADD_ROW'); ?></a></li>
|
||||||
|
<li><a class="btn btn-small row-ops-set" href="#"><i class="fa fa-gears"></i> <?php echo JText::_('HELIX_SETTINGS'); ?></a></li>
|
||||||
|
<li><a class="btn btn-danger btn-small remove-row" href="#"><i class="fa fa-times"></i> <?php echo JText::_('HELIX_REMOVE'); ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row ui-sortable">
|
||||||
|
<?php foreach ($row->attr as $column) { $colSettings = self::getSettings($column->settings); ?>
|
||||||
|
<div class="<?php echo $column->className; ?>" <?php echo $colSettings; ?>>
|
||||||
|
<div class="column">
|
||||||
|
<?php if (isset($column->settings->column_type) && $column->settings->column_type) {
|
||||||
|
echo '<h6 class="col-title pull-left">Component</h6>';
|
||||||
|
}else{
|
||||||
|
if (!isset($column->settings->name)) {
|
||||||
|
$column->settings->name = 'none';
|
||||||
|
}
|
||||||
|
echo '<h6 class="col-title pull-left">'.$column->settings->name.'</h6>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<a class="col-ops-set pull-right" href="#" ><i class="fa fa-gears"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$items = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
return $items;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function getSettings($config = null){
|
||||||
|
$data = '';
|
||||||
|
if (count($config)) {
|
||||||
|
foreach ($config as $key => $value) {
|
||||||
|
$data .= ' data-'.$key.'="'.$value.'"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get template name
|
||||||
|
private static function getTemplate() {
|
||||||
|
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('template', 'params')));
|
||||||
|
$query->from($db->quoteName('#__template_styles'));
|
||||||
|
$query->where($db->quoteName('client_id') . ' = '. $db->quote(0));
|
||||||
|
$query->where($db->quoteName('home') . ' = '. $db->quote(1));
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadObject();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Upload File
|
||||||
|
private function upload_image() {
|
||||||
|
$input = JFactory::getApplication()->input;
|
||||||
|
$image = $input->files->get('image');
|
||||||
|
$imageonly = $input->post->get('imageonly', false, 'BOOLEAN');
|
||||||
|
|
||||||
|
$tplRegistry = new JRegistry();
|
||||||
|
$tplParams = $tplRegistry->loadString(self::getTemplate()->params);
|
||||||
|
|
||||||
|
$report = array();
|
||||||
|
|
||||||
|
// User is not authorised
|
||||||
|
if (!JFactory::getUser()->authorise('core.create', 'com_media'))
|
||||||
|
{
|
||||||
|
$report['status'] = false;
|
||||||
|
$report['output'] = JText::_('You are not authorised to upload file.');
|
||||||
|
echo json_encode($report);
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($image)) {
|
||||||
|
|
||||||
|
if ($image['error'] == UPLOAD_ERR_OK) {
|
||||||
|
|
||||||
|
$error = false;
|
||||||
|
|
||||||
|
$params = JComponentHelper::getParams('com_media');
|
||||||
|
|
||||||
|
// Total length of post back data in bytes.
|
||||||
|
$contentLength = (int) $_SERVER['CONTENT_LENGTH'];
|
||||||
|
|
||||||
|
// Instantiate the media helper
|
||||||
|
$mediaHelper = new JHelperMedia;
|
||||||
|
|
||||||
|
// Maximum allowed size of post back data in MB.
|
||||||
|
$postMaxSize = $mediaHelper->toBytes(ini_get('post_max_size'));
|
||||||
|
|
||||||
|
// Maximum allowed size of script execution in MB.
|
||||||
|
$memoryLimit = $mediaHelper->toBytes(ini_get('memory_limit'));
|
||||||
|
|
||||||
|
// Check for the total size of post back data.
|
||||||
|
if (($postMaxSize > 0 && $contentLength > $postMaxSize) || ($memoryLimit != -1 && $contentLength > $memoryLimit)) {
|
||||||
|
$report['status'] = false;
|
||||||
|
$report['output'] = JText::_('Total size of upload exceeds the limit.');
|
||||||
|
$error = true;
|
||||||
|
echo json_encode($report);
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
$uploadMaxSize = $params->get('upload_maxsize', 0) * 1024 * 1024;
|
||||||
|
$uploadMaxFileSize = $mediaHelper->toBytes(ini_get('upload_max_filesize'));
|
||||||
|
|
||||||
|
if (($image['error'] == 1) || ($uploadMaxSize > 0 && $image['size'] > $uploadMaxSize) || ($uploadMaxFileSize > 0 && $image['size'] > $uploadMaxFileSize))
|
||||||
|
{
|
||||||
|
$report['status'] = false;
|
||||||
|
$report['output'] = JText::_('This file is too large to upload.');
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Upload if no error found
|
||||||
|
if(!$error) {
|
||||||
|
// Organised folder structure
|
||||||
|
$date = JFactory::getDate();
|
||||||
|
$folder = JHtml::_('date', $date, 'Y') . '/' . JHtml::_('date', $date, 'm') . '/' . JHtml::_('date', $date, 'd');
|
||||||
|
|
||||||
|
if(!file_exists( JPATH_ROOT . '/images/' . $folder )) {
|
||||||
|
JFolder::create(JPATH_ROOT . '/images/' . $folder, 0755);
|
||||||
|
}
|
||||||
|
|
||||||
|
$name = $image['name'];
|
||||||
|
$path = $image['tmp_name'];
|
||||||
|
|
||||||
|
// Do no override existing file
|
||||||
|
$file = pathinfo($name);
|
||||||
|
$i = 0;
|
||||||
|
do {
|
||||||
|
$base_name = $file['filename'] . ($i ? "$i" : "");
|
||||||
|
$ext = $file['extension'];
|
||||||
|
$image_name = $base_name . "." . $ext;
|
||||||
|
$i++;
|
||||||
|
$dest = JPATH_ROOT . '/images/' . $folder . '/' . $image_name;
|
||||||
|
$src = 'images/' . $folder . '/' . $image_name;
|
||||||
|
$data_src = 'images/' . $folder . '/' . $image_name;
|
||||||
|
} while(file_exists($dest));
|
||||||
|
// End Do not override
|
||||||
|
|
||||||
|
if(JFile::upload($path, $dest)) {
|
||||||
|
|
||||||
|
$sizes = array();
|
||||||
|
|
||||||
|
if($tplParams->get('image_small', 0)) {
|
||||||
|
$sizes['small'] = explode('x', strtolower($tplParams->get('image_small_size', '100X100')));
|
||||||
|
}
|
||||||
|
|
||||||
|
if($tplParams->get('image_thumbnail', 1)) {
|
||||||
|
$sizes['thumbnail'] = explode('x', strtolower($tplParams->get('image_thumbnail_size', '200X200')));
|
||||||
|
}
|
||||||
|
|
||||||
|
if($tplParams->get('image_medium', 0)) {
|
||||||
|
$sizes['medium'] = explode('x', strtolower($tplParams->get('image_medium_size', '300X300')));
|
||||||
|
}
|
||||||
|
|
||||||
|
if($tplParams->get('image_large', 0)) {
|
||||||
|
$sizes['large'] = explode('x', strtolower($tplParams->get('image_large_size', '600X600')));
|
||||||
|
}
|
||||||
|
|
||||||
|
$sources = Helix3Image::createThumbs($dest, $sizes, $folder, $base_name, $ext);
|
||||||
|
|
||||||
|
if(file_exists(JPATH_ROOT . '/images/' . $folder . '/' . $base_name . '_thumbnail.' . $ext)) {
|
||||||
|
$src = 'images/' . $folder . '/' . $base_name . '_thumbnail.' . $ext;
|
||||||
|
}
|
||||||
|
|
||||||
|
$report['status'] = true;
|
||||||
|
|
||||||
|
if($imageonly) {
|
||||||
|
$report['output'] = '<img src="'. JURI::root(true) . '/' . $src . '" data-src="'. $data_src .'" alt="">';
|
||||||
|
} else {
|
||||||
|
$report['output'] = '<li data-src="'. $data_src .'"><a href="#" class="btn btn-mini btn-danger btn-remove-image">Delete</a><img src="'. JURI::root(true) . '/' . $src . '" alt=""></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$report['status'] = false;
|
||||||
|
$report['output'] = JText::_('Upload Failed!');
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($report);
|
||||||
|
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete File
|
||||||
|
private function remove_image() {
|
||||||
|
$report = array();
|
||||||
|
|
||||||
|
if (!JFactory::getUser()->authorise('core.delete', 'com_media'))
|
||||||
|
{
|
||||||
|
$report['status'] = false;
|
||||||
|
$report['output'] = JText::_('You are not authorised to delete file.');
|
||||||
|
echo json_encode($report);
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
$input = JFactory::getApplication()->input;
|
||||||
|
$src = $input->post->get('src', '', 'STRING');
|
||||||
|
|
||||||
|
$path = JPATH_ROOT . '/' . $src;
|
||||||
|
|
||||||
|
if(file_exists($path)) {
|
||||||
|
|
||||||
|
if(JFile::delete($path)) {
|
||||||
|
|
||||||
|
$basename = basename($src);
|
||||||
|
$small = JPATH_ROOT . '/' . dirname($src) . '/' . JFile::stripExt($basename) . '_small.' . JFile::getExt($basename);
|
||||||
|
$thumbnail = JPATH_ROOT . '/' . dirname($src) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename);
|
||||||
|
$medium = JPATH_ROOT . '/' . dirname($src) . '/' . JFile::stripExt($basename) . '_medium.' . JFile::getExt($basename);
|
||||||
|
$large = JPATH_ROOT . '/' . dirname($src) . '/' . JFile::stripExt($basename) . '_large.' . JFile::getExt($basename);
|
||||||
|
|
||||||
|
if(file_exists($small)) {
|
||||||
|
JFile::delete($small);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(file_exists($thumbnail)) {
|
||||||
|
JFile::delete($thumbnail);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(file_exists($medium)) {
|
||||||
|
JFile::delete($medium);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(file_exists($large)) {
|
||||||
|
JFile::delete($large);
|
||||||
|
}
|
||||||
|
|
||||||
|
$report['status'] = true;
|
||||||
|
} else {
|
||||||
|
$report['status'] = false;
|
||||||
|
$report['output'] = JText::_('Delete failed');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$report['status'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($report);
|
||||||
|
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
21
deployed/helix3/plugins/ajax/helix3/helix3.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<extension version="3.4" type="plugin" group="ajax" method="upgrade">
|
||||||
|
<name>Helix3 - Ajax</name>
|
||||||
|
<author>JoomShaper.com</author>
|
||||||
|
<creationDate>Jan 2015</creationDate>
|
||||||
|
<copyright>Copyright (C) 2010 - 2017 JoomShaper. All rights reserved.</copyright>
|
||||||
|
<license>http://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later</license>
|
||||||
|
<authorEmail>support@joomshaper.com</authorEmail>
|
||||||
|
<authorUrl>www.joomshaper.com</authorUrl>
|
||||||
|
<version>2.5.5</version>
|
||||||
|
<description>Helix3 Framework - Joomla Template Framework by JoomShaper</description>
|
||||||
|
|
||||||
|
<updateservers>
|
||||||
|
<server type="extension" priority="1" name="Helix3 - Ajax">http://www.joomshaper.com/updates/plg-ajax-helix3.xml</server>
|
||||||
|
</updateservers>
|
||||||
|
|
||||||
|
<files>
|
||||||
|
<filename plugin="helix3">helix3.php</filename>
|
||||||
|
<folder>classes/</folder>
|
||||||
|
</files>
|
||||||
|
</extension>
|
||||||
@ -0,0 +1,671 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
body.com_templates {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-fluid.container-main {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-inline.form-inline-header {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a,a:hover {text-decoration:none !important}
|
||||||
|
a.btn-primary,
|
||||||
|
a.btn-success,
|
||||||
|
a.btn-inverse,
|
||||||
|
a.btn-ino{color:#fff}
|
||||||
|
|
||||||
|
.helix-group{
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.btn-danger.layout-del-action .fa-spin{
|
||||||
|
margin-left: 5px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Basic*/
|
||||||
|
.com_templates.view-style input[type="text"]:not(.minicolors),
|
||||||
|
.com_templates.view-style input[type="url"],
|
||||||
|
.com_templates.view-style input[type="password"],
|
||||||
|
.com_templates.view-style input[type="number"],
|
||||||
|
.com_templates.view-style input[type="email"],
|
||||||
|
.com_templates.view-style textarea,
|
||||||
|
.com_templates.view-style select
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
height: 34px;
|
||||||
|
padding: 6px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.42857143;
|
||||||
|
color: #555;
|
||||||
|
background-color: #fff;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid #e6e6e5;
|
||||||
|
border-bottom-width: 2px;
|
||||||
|
border-radius: 3px;
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
|
||||||
|
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
|
||||||
|
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com_templates.view-style input[type="text"]:focus,
|
||||||
|
.com_templates.view-style input[type="url"]:focus,
|
||||||
|
.com_templates.view-style input[type="password"]:focus,
|
||||||
|
.com_templates.view-style input[type="number"]:focus,
|
||||||
|
.com_templates.view-style input[type="email"]:focus,
|
||||||
|
.com_templates.view-style textarea:focus,
|
||||||
|
.com_templates.view-style select:focus {
|
||||||
|
border-color: rgba(82,168,236,0.8);
|
||||||
|
outline: 0;
|
||||||
|
outline: thin dotted \9;
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
|
||||||
|
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.com_templates.view-style input[type="text"][disabled],
|
||||||
|
.com_templates.view-style input[type="url"][disabled],
|
||||||
|
.com_templates.view-style input[type="password"][disabled],
|
||||||
|
.com_templates.view-style input[type="number"][disabled],
|
||||||
|
.com_templates.view-style input[type="email"][disabled],
|
||||||
|
.com_templates.view-style textarea[disabled],
|
||||||
|
.com_templates.view-style select[disabled] {
|
||||||
|
cursor: not-allowed;
|
||||||
|
background-color: #eee;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com_templates.view-style textarea {
|
||||||
|
height: auto;
|
||||||
|
width: 400px;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-inline-header input[type="text"],
|
||||||
|
.form-inline-header select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Main Tab*/
|
||||||
|
.helix-options .nav.nav-tabs {
|
||||||
|
border-radius: 0;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
background: #164d7d url(../images/helix-logo.png) no-repeat 100% 50%;
|
||||||
|
border: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .nav.nav-tabs > li {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .nav.nav-tabs > li > a {
|
||||||
|
padding: 25px 15px;
|
||||||
|
line-height: 1;
|
||||||
|
border: 0;
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
margin: 0;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .nav.nav-tabs > li:hover > a,
|
||||||
|
.helix-options .nav.nav-tabs > li.active > a {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #164d7d;
|
||||||
|
padding: 20px 15px 25px;
|
||||||
|
line-height: 1;
|
||||||
|
border: 0;
|
||||||
|
border-top: 5px solid #eee;
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .nav.nav-tabs > li > a > i {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Tab Common*/
|
||||||
|
.control-group.group-separator {
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
padding: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #000;
|
||||||
|
line-height: 1;
|
||||||
|
font-weight: 700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
margin: 30px -20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-group.group-separator span {
|
||||||
|
display: block;
|
||||||
|
margin-top: 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: normal;
|
||||||
|
text-transform: none;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-pane > .control-group.group-separator:first-child {
|
||||||
|
border-top: 0;
|
||||||
|
padding-top: 0;
|
||||||
|
margin-top: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com_templates.view-style .input-append input {
|
||||||
|
float: left;
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-append button[type="button"] {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Layout Builder */
|
||||||
|
#attrib-layout > .control-group > .controls {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#attrib-layout > .control-group > .control-label {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#attrib-layout > div:first-child {
|
||||||
|
margin: 30px 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-button-wrap {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-button-wrap .btn {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layoutbuilder-section{
|
||||||
|
padding: 15px 0;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 4px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layoutbuilder-section * {
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layoutbuilder-section *:before,
|
||||||
|
.layoutbuilder-section *:after {
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layoutbuilder-section .row {
|
||||||
|
margin-left: 0px;
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-section{
|
||||||
|
padding: 0 15px 15px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-section .settings-left,
|
||||||
|
.settings-section .settings-right {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-section .settings-left a.row-move i {
|
||||||
|
border-radius: 2px;
|
||||||
|
background: #a8a9ad;
|
||||||
|
color: #fff;
|
||||||
|
padding: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-section .settings-left a {
|
||||||
|
cursor: move;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-section .settings-left a:hover i {
|
||||||
|
background: #0072bc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-column .column {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
height: 54px;
|
||||||
|
line-height: 54px;
|
||||||
|
color: #000;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-column .column:hover {
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-column .column .col-title {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 14px;
|
||||||
|
font-weight: normal;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 5px 10px;
|
||||||
|
color: #888;
|
||||||
|
margin-top: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-column .column a {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #97989c;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-column .column a:hover {
|
||||||
|
color: #0072bc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layoutlist,
|
||||||
|
.layout-button-wrap {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com_templates.view-style .layoutlist select{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Menu Assignment */
|
||||||
|
#assignment{padding: 15px;}
|
||||||
|
#assignment #jform_menuselect-lbl,
|
||||||
|
#assignment .btn-toolbar {display: inline-block;}
|
||||||
|
#assignment .btn-toolbar {margin-right: 30px;}
|
||||||
|
#menu-assignment {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Button*/
|
||||||
|
.helix-options .btn, .helix-options .input-append .add-on, .helix-options .input-prepend .add-on {
|
||||||
|
border-color: #e5e5e5;
|
||||||
|
border-width: 0;
|
||||||
|
border-bottom-width: 2px;
|
||||||
|
padding: 7px 15px;
|
||||||
|
background-image: none;
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
-webkit-transition: background-color 400ms;
|
||||||
|
transition: background-color 400ms;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .btn.active,
|
||||||
|
.helix-options .btn:active {
|
||||||
|
box-shadow: none;
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .btn.btn-danger {
|
||||||
|
border-color: #bd362f;
|
||||||
|
background-color: #bd362f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .btn.btn-danger.active,
|
||||||
|
.helix-options .btn.btn-danger:hover {
|
||||||
|
border-color: #a32f29;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .btn.btn-success {
|
||||||
|
border-color: #51a351;
|
||||||
|
background-color: #409740;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .btn.btn-success.active,
|
||||||
|
.helix-options .btn.btn-success:hover {
|
||||||
|
border-color: #458a45;
|
||||||
|
background-color: #378137;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .btn.btn-primary {
|
||||||
|
border-color: #1a5896;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .btn.btn-primary.active,
|
||||||
|
.helix-options .btn.btn-primary:hover {
|
||||||
|
border-color: #1a5896;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > .btn {
|
||||||
|
border-radius: 0;
|
||||||
|
border-right-width: 0;
|
||||||
|
padding: 2px 10px;
|
||||||
|
border-width: 1px;
|
||||||
|
border-right-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li:first-child > .btn {
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li:last-child > .btn {
|
||||||
|
border-right-width: 1px;
|
||||||
|
border-radius: 0 3px 3px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul{
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: -5px;
|
||||||
|
right: 100%;
|
||||||
|
width: 505px;
|
||||||
|
padding: 10px 5px;
|
||||||
|
background: #b3b3b3;
|
||||||
|
border-radius: 3px;
|
||||||
|
z-index: 999;
|
||||||
|
text-align: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li:hover > ul {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrange-column:hover .add-column {
|
||||||
|
background: #36c77b;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li{
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a{
|
||||||
|
text-align: left;
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0 2px;
|
||||||
|
color: #fff;
|
||||||
|
background-color: transparent;
|
||||||
|
width: 29px;
|
||||||
|
height: 17px;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 50%;
|
||||||
|
-webkit-transition: background-color 400ms;
|
||||||
|
transition: background-color 400ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-12 {
|
||||||
|
background-image: url(../images/layout/12.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-3333 {
|
||||||
|
background-image: url(../images/layout/3333.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-444 {
|
||||||
|
background-image: url(../images/layout/444.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-66 {
|
||||||
|
background-image: url(../images/layout/66.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-48 {
|
||||||
|
background-image: url(../images/layout/48.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-39 {
|
||||||
|
background-image: url(../images/layout/39.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-57 {
|
||||||
|
background-image: url(../images/layout/57.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-363 {
|
||||||
|
background-image: url(../images/layout/363.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-264 {
|
||||||
|
background-image: url(../images/layout/264.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-210 {
|
||||||
|
background-image: url(../images/layout/210.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-237{
|
||||||
|
background-image: url(../images/layout/237.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-282{
|
||||||
|
background-image: url(../images/layout/282.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-222222{
|
||||||
|
background-image: url(../images/layout/222222.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-255{
|
||||||
|
background-image: url(../images/layout/255.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li > ul li a.column-layout-2442{
|
||||||
|
background-image: url(../images/layout/2442.png);
|
||||||
|
}
|
||||||
|
.button-group > li > ul li a.column-layout-custom{
|
||||||
|
background-image: url(../images/layout/custom.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-group > li ul li a:hover,
|
||||||
|
.button-group > li ul li a.active{
|
||||||
|
background-color: rgba(0,0,0,.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Media*/
|
||||||
|
.controls .input-append .media-preview.add-on,
|
||||||
|
.controls .input-prepend .media-preview.add-on {
|
||||||
|
border: 0;
|
||||||
|
background: none;
|
||||||
|
display: block;
|
||||||
|
float: none;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls .modal.btn, .controls .button-select.btn{
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls .media-preview + input[type="text"]{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Presets*/
|
||||||
|
.presets > div{
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 0 20px 20px 0;
|
||||||
|
width: 120px;
|
||||||
|
height: 80px;
|
||||||
|
float: left;
|
||||||
|
position: relative;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.presets > div label {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.presets .preset-title {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1;
|
||||||
|
background: transparent;
|
||||||
|
padding: 5px;
|
||||||
|
color: #fff;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.presets > div.active {
|
||||||
|
-webkit-box-shadow: inset 0 0 0 5px rgba(0,0,0,.4);
|
||||||
|
box-shadow: inset 0 0 0 5px rgba(0,0,0,.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.presets > div.active .preset-title {
|
||||||
|
background: rgba(0,0,0,.4);
|
||||||
|
color: #fff;
|
||||||
|
padding: 5px 5px 0 0;
|
||||||
|
left: 5px;
|
||||||
|
bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.com_templates.view-style .minicolors input[type="text"]:not(.minicolors) {
|
||||||
|
width: 100%;
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Web Font*/
|
||||||
|
.webfont input[type="text"],
|
||||||
|
.webfont input[type="number"],
|
||||||
|
.webfont select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.webfont-preview {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font-update-success,
|
||||||
|
.font-update-failed {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font-update-success {
|
||||||
|
color: #51a351;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font-update-failed {
|
||||||
|
color: #bd362f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Menu Assignment*/
|
||||||
|
#menu-assignment .thumbnail {
|
||||||
|
height: 300px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Others*/
|
||||||
|
.clr{ clear:both}
|
||||||
|
|
||||||
|
/* Helix3 Footer Area */
|
||||||
|
|
||||||
|
.helix-footer-area {
|
||||||
|
background: #164D78;
|
||||||
|
margin-top: 40px;
|
||||||
|
padding: 40px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-footer-area .helix-logo-area{
|
||||||
|
display: inline-block;
|
||||||
|
width: 130px;
|
||||||
|
height: 40px;
|
||||||
|
background: url(../images/helix-logo.png) no-repeat;
|
||||||
|
background-position: -20px;
|
||||||
|
border: 0;
|
||||||
|
text-indent: -9999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-footer-area .template-version{
|
||||||
|
background: #8dc63f;
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-footer-area .help-links{
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-footer-area .help-links a{
|
||||||
|
color: #fff;
|
||||||
|
margin-right: 7px;
|
||||||
|
margin-left: 7px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Joomla 3.7 Compatible */
|
||||||
|
.helix-options .controls .field-media-wrapper[data-preview-container=".field-media-preview"] .input-append > input[type="text"]{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.helix-options .control-group .field-media-wrapper .field-media-preview{
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.helix-options .control-group .field-media-wrapper .field-media-preview img{
|
||||||
|
max-height: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
height: inherit !important;
|
||||||
|
}
|
||||||
1323
deployed/helix3/plugins/system/helix3/assets/css/bootstrap.css
vendored
Normal file
4
deployed/helix3/plugins/system/helix3/assets/css/font-awesome.min.css
vendored
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
.megamenu {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
.sidebar-title {
|
||||||
|
margin: 10 0;
|
||||||
|
font-size: 14px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-list {
|
||||||
|
overflow-y: scroll;
|
||||||
|
height: 400px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-module {
|
||||||
|
display: block;
|
||||||
|
background: #e5e5e5;
|
||||||
|
padding: 8px 10px;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: move;
|
||||||
|
position: relative;
|
||||||
|
z-index: 99;
|
||||||
|
transition: background-color 400ms;
|
||||||
|
-webkit-transition: background-color 400ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-module.ui-draggable-dragging{
|
||||||
|
width: 300px;
|
||||||
|
background: #5bb75b;
|
||||||
|
z-index: 99999;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section-state-highlight {
|
||||||
|
background: #fff;
|
||||||
|
border: 2px dashed #999;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-module:hover {
|
||||||
|
background: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-module .fa {
|
||||||
|
display: block;
|
||||||
|
float: right;
|
||||||
|
font-size: 10px;
|
||||||
|
line-height: 18px;
|
||||||
|
color: #fff;
|
||||||
|
height: 18px;
|
||||||
|
width: 18px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-module .fa-arrows {
|
||||||
|
background: #5bb75b;
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draggable-module .fa-remove {
|
||||||
|
background: #da4f49;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-list .fa-remove {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-container .fa-arrows {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#megamenulayout {
|
||||||
|
margin-left: 30px;
|
||||||
|
background: #e5e5e5;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#megamenulayout .row-move {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -30px;
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section {
|
||||||
|
background: #ccc;
|
||||||
|
padding: 10px;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#megamenulayout .menu-section:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section .column {
|
||||||
|
min-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section .column-items-wrap {
|
||||||
|
background: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section .column-items-wrap h4 {
|
||||||
|
margin: 0 0 10px;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section .column-items-wrap ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section .column-items-wrap ul li {
|
||||||
|
display: block;
|
||||||
|
padding: 7px 0;
|
||||||
|
border-top: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section .ui-state-highlight,
|
||||||
|
.modules-container:empty {
|
||||||
|
border: 2px dashed #999;
|
||||||
|
border-radius: 3px;
|
||||||
|
height: 40px;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-container:empty:after {
|
||||||
|
content: "Drop Module";
|
||||||
|
line-height: 36px;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*List Layout*/
|
||||||
|
.menu-layout {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-layout-list {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-layout-list > li {
|
||||||
|
display: block;
|
||||||
|
width: 33.3333%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-layout-list > li > a {
|
||||||
|
margin: 10px;
|
||||||
|
display: block;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar {
|
||||||
|
margin-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar ul{
|
||||||
|
list-style: none;
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar ul li{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menuWidth{
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.size-shape{
|
||||||
|
padding: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
margin: 0 1px;
|
||||||
|
}
|
||||||
|
.background{
|
||||||
|
background-color: green;
|
||||||
|
}
|
||||||
589
deployed/helix3/plugins/system/helix3/assets/css/modal.css
Normal file
@ -0,0 +1,589 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
.sp-modal-open {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.sp-modal {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1050;
|
||||||
|
display: none;
|
||||||
|
overflow: auto;
|
||||||
|
overflow-y: scroll;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
.sp-modal.fade .sp-modal-dialog {
|
||||||
|
-webkit-transition: -webkit-transform .3s ease-out;
|
||||||
|
-moz-transition: -moz-transform .3s ease-out;
|
||||||
|
-o-transition: -o-transform .3s ease-out;
|
||||||
|
transition: transform .3s ease-out;
|
||||||
|
-webkit-transform: translate(0, -25%);
|
||||||
|
-ms-transform: translate(0, -25%);
|
||||||
|
transform: translate(0, -25%);
|
||||||
|
}
|
||||||
|
.sp-modal.in .sp-modal-dialog {
|
||||||
|
-webkit-transform: translate(0, 0);
|
||||||
|
-ms-transform: translate(0, 0);
|
||||||
|
transform: translate(0, 0);
|
||||||
|
}
|
||||||
|
.sp-modal-dialog {
|
||||||
|
position: relative;
|
||||||
|
width: auto;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
.sp-modal-content {
|
||||||
|
position: relative;
|
||||||
|
background-color: #fff;
|
||||||
|
background-clip: padding-box;
|
||||||
|
border: 1px solid #999;
|
||||||
|
border: 1px solid rgba(0, 0, 0, .2);
|
||||||
|
border-radius: 6px;
|
||||||
|
outline: none;
|
||||||
|
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
|
||||||
|
box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
|
||||||
|
}
|
||||||
|
.sp-modal-backdrop {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1040;
|
||||||
|
background-color: rgba(0,0,0,.6);
|
||||||
|
}
|
||||||
|
.sp-modal-backdrop.fade {
|
||||||
|
filter: alpha(opacity=0);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.sp-modal-backdrop.fade.in {
|
||||||
|
filter: alpha(opacity=50);
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
.sp-modal-header {
|
||||||
|
min-height: 16.42857143px;
|
||||||
|
padding: 15px;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
.sp-modal-header .close {
|
||||||
|
margin-top: -2px;
|
||||||
|
}
|
||||||
|
.sp-modal-title {
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.42857143;
|
||||||
|
}
|
||||||
|
.sp-modal-body {
|
||||||
|
position: relative;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.sp-modal-footer {
|
||||||
|
padding: 19px 20px 20px;
|
||||||
|
margin-top: 15px;
|
||||||
|
text-align: right;
|
||||||
|
border-top: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
.sp-modal-footer .sppb-btn + .sppb-btn {
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
.sp-modal-footer .btn-group .btn + .btn {
|
||||||
|
margin-left: -1px;
|
||||||
|
}
|
||||||
|
.sp-modal-footer .btn-block + .btn-block {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.sp-modal-dialog {
|
||||||
|
width: 600px;
|
||||||
|
margin: 30px auto;
|
||||||
|
}
|
||||||
|
.sp-modal-content {
|
||||||
|
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
|
||||||
|
box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
|
||||||
|
}
|
||||||
|
.sp-modal-sm {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.sp-modal-lg {
|
||||||
|
width: 900px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-modal-xlg {
|
||||||
|
width: 1270px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-modal-footer:before,
|
||||||
|
.sp-modal-footer:after {
|
||||||
|
display: table;
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Form */
|
||||||
|
.form-group {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
margin-left: -20px;
|
||||||
|
margin-right: -20px;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
*>.form-group:last-child {
|
||||||
|
padding-bottom: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group label{
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group .form-control {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group input.form-control{
|
||||||
|
min-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group .help-block {
|
||||||
|
display: block;
|
||||||
|
margin-top: 10px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-modal .radio,
|
||||||
|
.sp-modal .checkbox {
|
||||||
|
display: block;
|
||||||
|
min-height: 20px;
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.sp-modal .radio label,
|
||||||
|
.sp-modal .checkbox label {
|
||||||
|
display: inline;
|
||||||
|
font-weight: normal;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.sp-modal .radio input[type="radio"],
|
||||||
|
.sp-modal .radio-inline input[type="radio"],
|
||||||
|
.sp-modal .checkbox input[type="checkbox"],
|
||||||
|
.sp-modal .checkbox-inline input[type="checkbox"] {
|
||||||
|
float: left;
|
||||||
|
margin-left: -20px;
|
||||||
|
}
|
||||||
|
.sp-modal .radio + .radio,
|
||||||
|
.sp-modal .checkbox + .checkbox {
|
||||||
|
margin-top: -5px;
|
||||||
|
}
|
||||||
|
.sp-modal .radio-inline,
|
||||||
|
.sp-modal .checkbox-inline {
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-weight: normal;
|
||||||
|
vertical-align: middle;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.sp-modal .radio-inline + .radio-inline,
|
||||||
|
.sp-modal .checkbox-inline + .checkbox-inline {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.sp-modal input[type="radio"][disabled],
|
||||||
|
.sp-modal input[type="checkbox"][disabled],
|
||||||
|
.sp-modal .radio[disabled],
|
||||||
|
.sp-modal .radio-inline[disabled],
|
||||||
|
.sp-modal .checkbox[disabled],
|
||||||
|
.sp-modal .checkbox-inline[disabled],
|
||||||
|
.sp-modal fieldset[disabled] input[type="radio"],
|
||||||
|
.sp-modal fieldset[disabled] input[type="checkbox"],
|
||||||
|
.sp-modal fieldset[disabled] .radio,
|
||||||
|
.sp-modal fieldset[disabled] .radio-inline,
|
||||||
|
.sp-modal fieldset[disabled] .checkbox,
|
||||||
|
.sp-modal fieldset[disabled] .checkbox-inline {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-modal .input-append .btn{
|
||||||
|
padding: 8px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-modal textarea{
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Button*/
|
||||||
|
.sppb-btn {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-weight: normal;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
cursor: pointer;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding: 6px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.42857143;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.sppb-btn:focus,
|
||||||
|
.sppb-btn:active:focus,
|
||||||
|
.sppb-btn.active:focus {
|
||||||
|
outline: thin dotted;
|
||||||
|
outline: 5px auto -webkit-focus-ring-color;
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
.sppb-btn:hover,
|
||||||
|
.sppb-btn:focus {
|
||||||
|
color: #333333;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.sppb-btn:active,
|
||||||
|
.sppb-btn.active {
|
||||||
|
outline: 0;
|
||||||
|
background-image: none;
|
||||||
|
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||||
|
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||||
|
}
|
||||||
|
.sppb-btn.disabled,
|
||||||
|
.sppb-btn[disabled],
|
||||||
|
fieldset[disabled] .sppb-btn {
|
||||||
|
cursor: not-allowed;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.65;
|
||||||
|
filter: alpha(opacity=65);
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-default {
|
||||||
|
color: #333333;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-color: #cccccc;
|
||||||
|
}
|
||||||
|
.sppb-btn-default:hover,
|
||||||
|
.sppb-btn-default:focus,
|
||||||
|
.sppb-btn-default:active,
|
||||||
|
.sppb-btn-default.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-default {
|
||||||
|
color: #333333;
|
||||||
|
background-color: #e6e6e6;
|
||||||
|
border-color: #adadad;
|
||||||
|
}
|
||||||
|
.sppb-btn-default:active,
|
||||||
|
.sppb-btn-default.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-default {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-default.disabled,
|
||||||
|
.sppb-btn-default[disabled],
|
||||||
|
fieldset[disabled] .sppb-btn-default,
|
||||||
|
.sppb-btn-default.disabled:hover,
|
||||||
|
.sppb-btn-default[disabled]:hover,
|
||||||
|
fieldset[disabled] .sppb-btn-default:hover,
|
||||||
|
.sppb-btn-default.disabled:focus,
|
||||||
|
.sppb-btn-default[disabled]:focus,
|
||||||
|
fieldset[disabled] .sppb-btn-default:focus,
|
||||||
|
.sppb-btn-default.disabled:active,
|
||||||
|
.sppb-btn-default[disabled]:active,
|
||||||
|
fieldset[disabled] .sppb-btn-default:active,
|
||||||
|
.sppb-btn-default.disabled.active,
|
||||||
|
.sppb-btn-default[disabled].active,
|
||||||
|
fieldset[disabled] .sppb-btn-default.active {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-color: #cccccc;
|
||||||
|
}
|
||||||
|
.sppb-btn-default .badge {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #333333;
|
||||||
|
}
|
||||||
|
.sppb-btn-primary {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #428bca;
|
||||||
|
border-color: #357ebd;
|
||||||
|
}
|
||||||
|
.sppb-btn-primary:hover,
|
||||||
|
.sppb-btn-primary:focus,
|
||||||
|
.sppb-btn-primary:active,
|
||||||
|
.sppb-btn-primary.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-primary {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #3071a9;
|
||||||
|
border-color: #285e8e;
|
||||||
|
}
|
||||||
|
.sppb-btn-primary:active,
|
||||||
|
.sppb-btn-primary.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-primary {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-primary.disabled,
|
||||||
|
.sppb-btn-primary[disabled],
|
||||||
|
fieldset[disabled] .sppb-btn-primary,
|
||||||
|
.sppb-btn-primary.disabled:hover,
|
||||||
|
.sppb-btn-primary[disabled]:hover,
|
||||||
|
fieldset[disabled] .sppb-btn-primary:hover,
|
||||||
|
.sppb-btn-primary.disabled:focus,
|
||||||
|
.sppb-btn-primary[disabled]:focus,
|
||||||
|
fieldset[disabled] .sppb-btn-primary:focus,
|
||||||
|
.sppb-btn-primary.disabled:active,
|
||||||
|
.sppb-btn-primary[disabled]:active,
|
||||||
|
fieldset[disabled] .sppb-btn-primary:active,
|
||||||
|
.sppb-btn-primary.disabled.active,
|
||||||
|
.sppb-btn-primary[disabled].active,
|
||||||
|
fieldset[disabled] .sppb-btn-primary.active {
|
||||||
|
background-color: #428bca;
|
||||||
|
border-color: #357ebd;
|
||||||
|
}
|
||||||
|
.sppb-btn-primary .badge {
|
||||||
|
color: #428bca;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.sppb-btn-success {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #5cb85c;
|
||||||
|
border-color: #4cae4c;
|
||||||
|
}
|
||||||
|
.sppb-btn-success:hover,
|
||||||
|
.sppb-btn-success:focus,
|
||||||
|
.sppb-btn-success:active,
|
||||||
|
.sppb-btn-success.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-success {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #449d44;
|
||||||
|
border-color: #398439;
|
||||||
|
}
|
||||||
|
.sppb-btn-success:active,
|
||||||
|
.sppb-btn-success.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-success {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-success.disabled,
|
||||||
|
.sppb-btn-success[disabled],
|
||||||
|
fieldset[disabled] .sppb-btn-success,
|
||||||
|
.sppb-btn-success.disabled:hover,
|
||||||
|
.sppb-btn-success[disabled]:hover,
|
||||||
|
fieldset[disabled] .sppb-btn-success:hover,
|
||||||
|
.sppb-btn-success.disabled:focus,
|
||||||
|
.sppb-btn-success[disabled]:focus,
|
||||||
|
fieldset[disabled] .sppb-btn-success:focus,
|
||||||
|
.sppb-btn-success.disabled:active,
|
||||||
|
.sppb-btn-success[disabled]:active,
|
||||||
|
fieldset[disabled] .sppb-btn-success:active,
|
||||||
|
.sppb-btn-success.disabled.active,
|
||||||
|
.sppb-btn-success[disabled].active,
|
||||||
|
fieldset[disabled] .sppb-btn-success.active {
|
||||||
|
background-color: #5cb85c;
|
||||||
|
border-color: #4cae4c;
|
||||||
|
}
|
||||||
|
.sppb-btn-success .badge {
|
||||||
|
color: #5cb85c;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.sppb-btn-info {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #5bc0de;
|
||||||
|
border-color: #46b8da;
|
||||||
|
}
|
||||||
|
.sppb-btn-info:hover,
|
||||||
|
.sppb-btn-info:focus,
|
||||||
|
.sppb-btn-info:active,
|
||||||
|
.sppb-btn-info.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-info {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #31b0d5;
|
||||||
|
border-color: #269abc;
|
||||||
|
}
|
||||||
|
.sppb-btn-info:active,
|
||||||
|
.sppb-btn-info.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-info {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-info.disabled,
|
||||||
|
.sppb-btn-info[disabled],
|
||||||
|
fieldset[disabled] .sppb-btn-info,
|
||||||
|
.sppb-btn-info.disabled:hover,
|
||||||
|
.sppb-btn-info[disabled]:hover,
|
||||||
|
fieldset[disabled] .sppb-btn-info:hover,
|
||||||
|
.sppb-btn-info.disabled:focus,
|
||||||
|
.sppb-btn-info[disabled]:focus,
|
||||||
|
fieldset[disabled] .sppb-btn-info:focus,
|
||||||
|
.sppb-btn-info.disabled:active,
|
||||||
|
.sppb-btn-info[disabled]:active,
|
||||||
|
fieldset[disabled] .sppb-btn-info:active,
|
||||||
|
.sppb-btn-info.disabled.active,
|
||||||
|
.sppb-btn-info[disabled].active,
|
||||||
|
fieldset[disabled] .sppb-btn-info.active {
|
||||||
|
background-color: #5bc0de;
|
||||||
|
border-color: #46b8da;
|
||||||
|
}
|
||||||
|
.sppb-btn-info .badge {
|
||||||
|
color: #5bc0de;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.sppb-btn-warning {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #f0ad4e;
|
||||||
|
border-color: #eea236;
|
||||||
|
}
|
||||||
|
.sppb-btn-warning:hover,
|
||||||
|
.sppb-btn-warning:focus,
|
||||||
|
.sppb-btn-warning:active,
|
||||||
|
.sppb-btn-warning.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-warning {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #ec971f;
|
||||||
|
border-color: #d58512;
|
||||||
|
}
|
||||||
|
.sppb-btn-warning:active,
|
||||||
|
.sppb-btn-warning.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-warning {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-warning.disabled,
|
||||||
|
.sppb-btn-warning[disabled],
|
||||||
|
fieldset[disabled] .sppb-btn-warning,
|
||||||
|
.sppb-btn-warning.disabled:hover,
|
||||||
|
.sppb-btn-warning[disabled]:hover,
|
||||||
|
fieldset[disabled] .sppb-btn-warning:hover,
|
||||||
|
.sppb-btn-warning.disabled:focus,
|
||||||
|
.sppb-btn-warning[disabled]:focus,
|
||||||
|
fieldset[disabled] .sppb-btn-warning:focus,
|
||||||
|
.sppb-btn-warning.disabled:active,
|
||||||
|
.sppb-btn-warning[disabled]:active,
|
||||||
|
fieldset[disabled] .sppb-btn-warning:active,
|
||||||
|
.sppb-btn-warning.disabled.active,
|
||||||
|
.sppb-btn-warning[disabled].active,
|
||||||
|
fieldset[disabled] .sppb-btn-warning.active {
|
||||||
|
background-color: #f0ad4e;
|
||||||
|
border-color: #eea236;
|
||||||
|
}
|
||||||
|
.sppb-btn-warning .badge {
|
||||||
|
color: #f0ad4e;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.sppb-btn-danger {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #d9534f;
|
||||||
|
border-color: #d43f3a;
|
||||||
|
}
|
||||||
|
.sppb-btn-danger:hover,
|
||||||
|
.sppb-btn-danger:focus,
|
||||||
|
.sppb-btn-danger:active,
|
||||||
|
.sppb-btn-danger.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-danger {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #c9302c;
|
||||||
|
border-color: #ac2925;
|
||||||
|
}
|
||||||
|
.sppb-btn-danger:active,
|
||||||
|
.sppb-btn-danger.active,
|
||||||
|
.open > .dropdown-toggle.sppb-btn-danger {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-danger.disabled,
|
||||||
|
.sppb-btn-danger[disabled],
|
||||||
|
fieldset[disabled] .sppb-btn-danger,
|
||||||
|
.sppb-btn-danger.disabled:hover,
|
||||||
|
.sppb-btn-danger[disabled]:hover,
|
||||||
|
fieldset[disabled] .sppb-btn-danger:hover,
|
||||||
|
.sppb-btn-danger.disabled:focus,
|
||||||
|
.sppb-btn-danger[disabled]:focus,
|
||||||
|
fieldset[disabled] .sppb-btn-danger:focus,
|
||||||
|
.sppb-btn-danger.disabled:active,
|
||||||
|
.sppb-btn-danger[disabled]:active,
|
||||||
|
fieldset[disabled] .sppb-btn-danger:active,
|
||||||
|
.sppb-btn-danger.disabled.active,
|
||||||
|
.sppb-btn-danger[disabled].active,
|
||||||
|
fieldset[disabled] .sppb-btn-danger.active {
|
||||||
|
background-color: #d9534f;
|
||||||
|
border-color: #d43f3a;
|
||||||
|
}
|
||||||
|
.sppb-btn-danger .badge {
|
||||||
|
color: #d9534f;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.sppb-btn-link {
|
||||||
|
color: #428bca;
|
||||||
|
font-weight: normal;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.sppb-btn-link,
|
||||||
|
.sppb-btn-link:active,
|
||||||
|
.sppb-btn-link[disabled],
|
||||||
|
fieldset[disabled] .sppb-btn-link {
|
||||||
|
background-color: transparent;
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-link,
|
||||||
|
.sppb-btn-link:hover,
|
||||||
|
.sppb-btn-link:focus,
|
||||||
|
.sppb-btn-link:active {
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
.sppb-btn-link:hover,
|
||||||
|
.sppb-btn-link:focus {
|
||||||
|
color: #2a6496;
|
||||||
|
text-decoration: underline;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.sppb-btn-link[disabled]:hover,
|
||||||
|
fieldset[disabled] .sppb-btn-link:hover,
|
||||||
|
.sppb-btn-link[disabled]:focus,
|
||||||
|
fieldset[disabled] .sppb-btn-link:focus {
|
||||||
|
color: #777777;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.sppb-btn-lg {
|
||||||
|
padding: 10px 16px;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 1.33;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
.sppb-btn-sm {
|
||||||
|
padding: 5px 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.sppb-btn-xs {
|
||||||
|
padding: 1px 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.sppb-btn-block {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.sppb-btn-block + .sppb-btn-block {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2016 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
.sppb-row-container {
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
padding-left: 15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.sppb-row-container {
|
||||||
|
width: 750px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.sppb-row-container {
|
||||||
|
width: 970px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.sppb-row-container {
|
||||||
|
width: 1170px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
.sp-gallery-items {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: -5px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
.sp-gallery-items:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-gallery-items>li {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
display: block;
|
||||||
|
margin: 5px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
float: left;
|
||||||
|
position: relative;
|
||||||
|
-webkit-transition: background-color 400ms;
|
||||||
|
transition: background-color 400ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-gallery-items>li:hover {
|
||||||
|
cursor: move;
|
||||||
|
background: #e5e5e5;
|
||||||
|
border-color: #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-gallery-items>li>.btn-remove-image {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-gallery-items>li:hover>.btn-remove-image {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-gallery-items img {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-gallery-items .sp-gallery-item-loader {
|
||||||
|
line-height: 100px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
31
deployed/helix3/plugins/system/helix3/assets/css/spimage.css
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
.sp-image-upload-wrapper:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-image-upload-wrapper {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
display: block;
|
||||||
|
background: #f5f5f5;
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-image-upload-wrapper img {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp-image-item-loader {
|
||||||
|
line-height: 200px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 434 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 945 B |
|
After Width: | Height: | Size: 953 B |
|
After Width: | Height: | Size: 951 B |
|
After Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 955 B |
|
After Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 957 B |
|
After Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 951 B |
|
After Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 954 B |
|
After Width: | Height: | Size: 955 B |
|
After Width: | Height: | Size: 954 B |
|
After Width: | Height: | Size: 954 B |
|
After Width: | Height: | Size: 952 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
230
deployed/helix3/plugins/system/helix3/assets/js/admin.general.js
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
jQuery(function($){
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
$('.form-horizontal').addClass('helix-options');
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
/*Basic Fields*/
|
||||||
|
$('#details').find('>.row-fluid').find('hr').first().prev().andSelf().remove();
|
||||||
|
$('#jform_params___field1-lbl').parent().parent().remove();
|
||||||
|
$('#details').find('.control-group').unwrap();
|
||||||
|
$('#jform_client_id').parent().removeClass().hide();
|
||||||
|
/*Basic Fields*/
|
||||||
|
|
||||||
|
var childParentEngine = function(){
|
||||||
|
var classes = new Array();
|
||||||
|
$("fieldset.parent, select.parent").each(function(){
|
||||||
|
var eleclass = $(this).attr('class').split(/\s/g);
|
||||||
|
var $key = $.inArray("parent", eleclass);
|
||||||
|
if( $key!=-1 ){
|
||||||
|
classes.push( eleclass[$key+1] );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("fieldset.parent, select.parent").each(function(){
|
||||||
|
|
||||||
|
var parent = $(this);
|
||||||
|
var eleclass = $(this).attr('class').split(/\s/g);
|
||||||
|
var childClassName = '.child';
|
||||||
|
var conditionClassName = '';
|
||||||
|
var i;
|
||||||
|
|
||||||
|
for (i=0;i<eleclass.length;i++) {
|
||||||
|
if( $.inArray(eleclass[i], classes) < 0 ) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
var elecls = '.' + eleclass[i];
|
||||||
|
|
||||||
|
$(childClassName+elecls).parents('.control-group').hide();
|
||||||
|
if( $(parent).prop('type')=='fieldset' ){
|
||||||
|
var selected = $(parent).find('input[type=radio]:checked');
|
||||||
|
var radios = $(parent).find('input[type=radio]');
|
||||||
|
var activeItems = conditionClassName+elecls+'_'+$(selected).val();
|
||||||
|
var childitem = $.trim(childClassName+elecls+activeItems);
|
||||||
|
setTimeout(function(){
|
||||||
|
$(childitem).parents('.control-group').show();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
$(radios).on("click", function(event){
|
||||||
|
$(childClassName+elecls).parents('.control-group').hide();
|
||||||
|
$(childClassName+elecls+conditionClassName+elecls+'_'+$.trim($(this).val())).parents('.control-group').fadeIn();
|
||||||
|
});
|
||||||
|
|
||||||
|
} else if( $(parent).prop('type')=='select-one' ) {
|
||||||
|
var element = $(parent);
|
||||||
|
var selected = $(parent).find('option:selected');
|
||||||
|
var option = $(parent).find('option');
|
||||||
|
var activeItems = conditionClassName+elecls+'_'+$(selected).val();
|
||||||
|
var childitem = $.trim(childClassName+elecls+activeItems);
|
||||||
|
setTimeout(function(){
|
||||||
|
$(childitem).parents('.control-group').show();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
$(element).on("change", function(event){
|
||||||
|
$(childClassName+elecls).parents('.control-group').hide();
|
||||||
|
$(childClassName+elecls+conditionClassName+elecls+'_'+$.trim($(this).val())).parents('.control-group').fadeIn();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}//end childParentEngine
|
||||||
|
|
||||||
|
$('.info-labels').unwrap();
|
||||||
|
|
||||||
|
$('.group_separator').each(function(){
|
||||||
|
$(this).parent().prev().remove();
|
||||||
|
$(this).parent().parent().addClass('group-separator');
|
||||||
|
$(this).unwrap();
|
||||||
|
});
|
||||||
|
|
||||||
|
//Presets
|
||||||
|
$('.preset').parent().unwrap().prev().remove();
|
||||||
|
$('.preset').parent().removeClass('controls').addClass('presets clearfix');
|
||||||
|
|
||||||
|
//Load Preset
|
||||||
|
$('#attrib-preset').find('.preset-control').each(function(){
|
||||||
|
if($(this).hasClass( current_preset )) {
|
||||||
|
$(this).closest('.control-group').show();
|
||||||
|
} else {
|
||||||
|
$(this).closest('.control-group').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Change Preset
|
||||||
|
$('.preset').on('click', function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
var $that = $(this);
|
||||||
|
|
||||||
|
$('.preset').removeClass('active');
|
||||||
|
$(this).addClass('active');
|
||||||
|
|
||||||
|
$('#attrib-preset').find('.preset-control').each(function(){
|
||||||
|
if($(this).hasClass( $that.data('preset') )) {
|
||||||
|
$(this).closest('.control-group').fadeIn();
|
||||||
|
} else {
|
||||||
|
$(this).closest('.control-group').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#template-preset').val( $that.data('preset') );
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//Change Preset
|
||||||
|
$(document).on('blur', '.preset-control', function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var active_preset = $('.preset.active').data('preset');
|
||||||
|
|
||||||
|
if( $(this).attr('id') == 'jform_params_' + active_preset + '_major' ) {
|
||||||
|
$('.preset.active').css('background-color', $(this).val())
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Template Information
|
||||||
|
$('#jform_template').closest('.control-group').appendTo( $( '.form-inline.form-inline-header' ) );
|
||||||
|
$('#jform_home').closest('.control-group').appendTo( $( '.form-inline.form-inline-header' ) );
|
||||||
|
|
||||||
|
$('.info-labels').next().appendTo( $('#sp-theme-info') );
|
||||||
|
$('.info-labels').prev().addBack().remove();
|
||||||
|
|
||||||
|
childParentEngine();
|
||||||
|
|
||||||
|
// Helix3 Admin Footer
|
||||||
|
var footerHtml = '<div class="helix-footer-area">';
|
||||||
|
footerHtml += '<div class="clearfix">';
|
||||||
|
footerHtml += '<a class="helix-logo-area" href="https://www.joomshaper.com/helix" target="_blank">Helix3 Logo</a>';
|
||||||
|
footerHtml += '<span class="template-version">'+ pluginVersion +'</span>';
|
||||||
|
footerHtml += '</div>';
|
||||||
|
footerHtml += '<div class="help-links">';
|
||||||
|
footerHtml += '<a href="https://www.joomshaper.com/documentation/helix-framework/helix3" target="_blank">Documentation</a><span>|</span>';
|
||||||
|
footerHtml += '<a href="https://www.facebook.com/groups/819713448150532/" target="_blank">Helix Community</a><span>|</span>';
|
||||||
|
footerHtml += '<a href="https://www.joomshaper.com/page-builder" target="_blank">Page Builder Pro</a><span>|</span>';
|
||||||
|
footerHtml += '<a href="https://www.joomshaper.com/joomla-templates" target="_blank">Premium Templates</a><span>|</span>';
|
||||||
|
footerHtml += '<a href="https://www.joomshaper.com/joomla-extensions" target="_blank">Joomla Extensions</a>';
|
||||||
|
footerHtml += '</div>';
|
||||||
|
footerHtml += '</div>';
|
||||||
|
|
||||||
|
$(footerHtml).insertAfter('.form-horizontal');
|
||||||
|
});
|
||||||
|
|
||||||
|
//Media Button
|
||||||
|
$( '.input-prepend, .input-append' ).find( '.btn' ).each(function(){
|
||||||
|
if($(this).is( '.modal, .button-select' ) ) {
|
||||||
|
$(this).addClass( 'btn-success' );
|
||||||
|
} else {
|
||||||
|
$(this).addClass( 'btn-danger' );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.controls' ).find( '.field-media-preview' ).each(function(){
|
||||||
|
$(this).insertBefore($(this).parent().find('.input-append'));
|
||||||
|
});
|
||||||
|
|
||||||
|
$( '.control-group .field-media-preview' ).not( 'img' ).each(function(){
|
||||||
|
$(this).append('<div id="preview_empty">No image selected.</div>');
|
||||||
|
});
|
||||||
|
|
||||||
|
// clear image
|
||||||
|
$( '.helix-options .controls .field-media-wrapper .input-append' ).on( 'click', '.button-clear', function( event ) {
|
||||||
|
$(this).closest('.field-media-wrapper').find('.field-media-preview').html('<div id="preview_empty">No image selected.</div>');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Add .btn-group class
|
||||||
|
$( '.radio' ).addClass( 'btn-group' );
|
||||||
|
|
||||||
|
//Import Template Settings
|
||||||
|
$( '.form-horizontal' ).on( 'click', '#import-settings', function( event ) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $that = $( this ),
|
||||||
|
template_id = $that.data( 'template_id' ),
|
||||||
|
temp_settings = $.trim( $that.prev().val() );
|
||||||
|
|
||||||
|
if ( temp_settings == '' ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( confirm( "Warning: It will change all current settings of this Template." ) != true ){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
action : 'import',
|
||||||
|
template_id : template_id,
|
||||||
|
settings : temp_settings
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'data' : data,
|
||||||
|
'format' : 'json'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : request,
|
||||||
|
success: function (response) {
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Somethings wrong, Try again');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
604
deployed/helix3/plugins/system/helix3/assets/js/admin.layout.js
Normal file
@ -0,0 +1,604 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
jQuery(function($) {
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
$(this).find('select').each(function(){
|
||||||
|
$(this).chosen('destroy');
|
||||||
|
});
|
||||||
|
|
||||||
|
});//end ready
|
||||||
|
|
||||||
|
/* ---------- Load existing template ------------- */
|
||||||
|
$('.form-horizontal').on('click', '.layout-del-action', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $that = $(this),
|
||||||
|
layoutName = $(".layoutlist select").val(),
|
||||||
|
data = {
|
||||||
|
action : $that.data('action'),
|
||||||
|
layoutName : layoutName
|
||||||
|
};
|
||||||
|
|
||||||
|
if ( confirm("Click Ok button to delete "+layoutName+", Cancel to leave.") != true ){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( data.action != 'remove' ){
|
||||||
|
alert('You are doing somethings wrong.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'data' : data,
|
||||||
|
'format' : 'json'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : request,
|
||||||
|
beforeSend: function(){
|
||||||
|
$('.layout-del-action .fa-spin').show();
|
||||||
|
},
|
||||||
|
success: function (response) {
|
||||||
|
var data = $.parseJSON(response.data),
|
||||||
|
layouts = data.layout,
|
||||||
|
tplHtml = '';
|
||||||
|
|
||||||
|
$('#jform_params_layoutlist').find('option').remove();
|
||||||
|
if (layouts.length) {
|
||||||
|
for (var i = 0; i < layouts.length; i++) {
|
||||||
|
tplHtml += '<option value="'+ layouts[i] +'">'+ layouts[i].replace('.json','')+'</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#jform_params_layoutlist').html(tplHtml);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.layout-del-action .fa-spin').fadeOut('fast');
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Somethings wrong, Try again');
|
||||||
|
$('.layout-del-action .fa-spin').fadeOut('fast');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Save new copy of layout
|
||||||
|
$('.form-horizontal').on('click', '.layout-save-action', function(event) {
|
||||||
|
$('#layout-modal').find('.sp-modal-body').empty();
|
||||||
|
$('#layout-modal .sp-modal-title').text('Save New Layout');
|
||||||
|
$('#layout-modal #save-settings').data('flag', 'save-layout');
|
||||||
|
|
||||||
|
var $clone = $('.save-box').clone(true);
|
||||||
|
$('#layout-modal').find('.sp-modal-body').append( $clone );
|
||||||
|
|
||||||
|
$('#layout-modal').spmodal();
|
||||||
|
});
|
||||||
|
|
||||||
|
// load layout from file
|
||||||
|
|
||||||
|
$(".layoutlist select").chosen().change(function(){
|
||||||
|
var $that = $(this),
|
||||||
|
layoutName = $that.val(),
|
||||||
|
data = {
|
||||||
|
action : 'load',
|
||||||
|
layoutName : layoutName
|
||||||
|
};
|
||||||
|
|
||||||
|
if ( layoutName == '' || layoutName == ' ' ){
|
||||||
|
alert('You are doing somethings wrong.');
|
||||||
|
}
|
||||||
|
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'data' : data,
|
||||||
|
'format' : 'raw'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : request,
|
||||||
|
dataType: "html",
|
||||||
|
beforeSend: function(){
|
||||||
|
},
|
||||||
|
success: function (response) {
|
||||||
|
$('#helix-layout-builder').empty();
|
||||||
|
$('#helix-layout-builder').append(response).fadeIn('normal');
|
||||||
|
jqueryUiLayout();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
/********* Lyout Builder JavaScript **********/
|
||||||
|
|
||||||
|
jqueryUiLayout();
|
||||||
|
|
||||||
|
function jqueryUiLayout()
|
||||||
|
{
|
||||||
|
$( "#helix-layout-builder" ).sortable({
|
||||||
|
placeholder: "ui-state-highlight",
|
||||||
|
forcePlaceholderSize: true,
|
||||||
|
axis: 'y',
|
||||||
|
opacity: 0.8,
|
||||||
|
tolerance: 'pointer'
|
||||||
|
|
||||||
|
}).disableSelection();
|
||||||
|
|
||||||
|
$('.layoutbuilder-section').find('.row').rowSortable();
|
||||||
|
}
|
||||||
|
|
||||||
|
// setInputValue Callback Function
|
||||||
|
$.fn.setInputValue = function(options){
|
||||||
|
if (this.attr('type') == 'checkbox') {
|
||||||
|
if (options.filed == '1') {
|
||||||
|
this.attr('checked','checked');
|
||||||
|
}else{
|
||||||
|
this.removeAttr('checked');
|
||||||
|
}
|
||||||
|
}else if(this.hasClass('input-media')){
|
||||||
|
if(options.filed){
|
||||||
|
$imgParent = this.parent('.media');
|
||||||
|
console.log($imgParent);
|
||||||
|
$imgParent.find('img.media-preview').each(function() {
|
||||||
|
$(this).attr('src',layoutbuilder_base+options.filed);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.val( options.filed );
|
||||||
|
}else{
|
||||||
|
this.val( options.filed );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.data('attrname') == 'column_type'){
|
||||||
|
if (this.val() == 'component') {
|
||||||
|
$('.form-group.name').hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// callback function, return checkbox value
|
||||||
|
$.fn.getInputValue = function(){
|
||||||
|
if (this.attr('type') == 'checkbox') {
|
||||||
|
if (this.attr("checked")) {
|
||||||
|
return '1';
|
||||||
|
}else{
|
||||||
|
return '0';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return this.val();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// color picker initialize
|
||||||
|
$.fn.initColorPicker = function(){
|
||||||
|
this.find('.minicolors').each(function() {
|
||||||
|
$(this).minicolors({
|
||||||
|
control: 'hue',
|
||||||
|
position: 'bottom',
|
||||||
|
theme: 'bootstrap'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Open Row settings Modal
|
||||||
|
$(document).on('click', '.row-ops-set', function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
$('.layoutbuilder-section').removeClass('row-active');
|
||||||
|
$parent = $(this).closest('.layoutbuilder-section');
|
||||||
|
$parent.addClass('row-active');
|
||||||
|
|
||||||
|
$('#layout-modal').find('.sp-modal-body').empty();
|
||||||
|
$('#layout-modal .sp-modal-title').text('Row Settings');
|
||||||
|
$('#layout-modal #save-settings').data('flag', 'row-setting');
|
||||||
|
|
||||||
|
var $clone = $('.row-settings').clone(true);
|
||||||
|
$clone.find('.sppb-color').each(function(){
|
||||||
|
$(this).addClass('minicolors');
|
||||||
|
});
|
||||||
|
|
||||||
|
$clone = $('#layout-modal').find('.sp-modal-body').append( $clone );
|
||||||
|
|
||||||
|
$clone.find('.addon-input').each(function(){
|
||||||
|
var $that = $(this),
|
||||||
|
attrValue = $parent.data( $that.data('attrname'));
|
||||||
|
$that.setInputValue({filed: attrValue});
|
||||||
|
});
|
||||||
|
|
||||||
|
$clone.initColorPicker();
|
||||||
|
|
||||||
|
$('#layout-modal').randomIds();
|
||||||
|
|
||||||
|
$clone.find('select').chosen({
|
||||||
|
allow_single_deselect: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#layout-modal').spmodal();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Open Column settings Modal
|
||||||
|
$(document).on('click','.col-ops-set',function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
$('.layout-column').removeClass('column-active');
|
||||||
|
$parent = $(this).closest('.layout-column');
|
||||||
|
$parent.addClass('column-active');
|
||||||
|
|
||||||
|
$('#layout-modal').find('.sp-modal-body').empty();
|
||||||
|
$('#layout-modal .sp-modal-title').text('Column Settings');
|
||||||
|
$('#layout-modal #save-settings').data('flag', 'col-setting');
|
||||||
|
|
||||||
|
var $clone = $('.column-settings').clone(true);
|
||||||
|
$clone.find('.sppb-color').each(function(){
|
||||||
|
$(this).addClass('minicolors');
|
||||||
|
});
|
||||||
|
|
||||||
|
$clone = $('#layout-modal').find('.sp-modal-body').append( $clone );
|
||||||
|
var comFlug = false;
|
||||||
|
$clone.find('.addon-input').each(function(){
|
||||||
|
var $that = $(this),
|
||||||
|
$attrname = $that.data('attrname'),
|
||||||
|
attrValue = $parent.data($attrname);
|
||||||
|
|
||||||
|
if ( $attrname == 'column_type' && attrValue == '1' ) {
|
||||||
|
comFlug = true;
|
||||||
|
}else if($attrname == 'name' && comFlug == true){
|
||||||
|
$that.closest('.form-group').slideUp('fast');
|
||||||
|
}
|
||||||
|
|
||||||
|
$that.setInputValue({filed: attrValue});
|
||||||
|
});
|
||||||
|
|
||||||
|
$clone.initColorPicker();
|
||||||
|
|
||||||
|
$clone.find('select').chosen({
|
||||||
|
allow_single_deselect: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#layout-modal').randomIds();
|
||||||
|
$('#layout-modal').spmodal();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('.input-column_type').change(function(event) {
|
||||||
|
|
||||||
|
var $parent = $(this).closest('.column-settings'),
|
||||||
|
flag = false;
|
||||||
|
|
||||||
|
$('#helix-layout-builder').find('.layout-column').not( ".column-active" ).each(function(index, val) {
|
||||||
|
if ($(this).data('column_type') == '1') {
|
||||||
|
flag = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
alert('Component Area Taken');
|
||||||
|
$(this).prop('checked',false);
|
||||||
|
$parent.children('.form-group.name').slideDown('400');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($(this).attr("checked")) {
|
||||||
|
$parent.children('.form-group.name').slideUp('400');
|
||||||
|
}else{
|
||||||
|
$parent.children('.form-group.name').slideDown('400');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Save Row Column Settings
|
||||||
|
$(document).on('click', '#save-settings', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var flag = $(this).data('flag');
|
||||||
|
|
||||||
|
switch(flag){
|
||||||
|
case 'row-setting':
|
||||||
|
$('#layout-modal').find('.addon-input').each(function(){
|
||||||
|
var $this = $(this),
|
||||||
|
$parent = $('.row-active'),
|
||||||
|
$attrname = $this.data('attrname');
|
||||||
|
$parent.removeData( $attrname );
|
||||||
|
|
||||||
|
if ($attrname == 'name') {
|
||||||
|
var nameVal = $this.val();
|
||||||
|
|
||||||
|
if (nameVal !='' || $this.val() != null) {
|
||||||
|
$('.row-active .section-title').text($this.val());
|
||||||
|
}else{
|
||||||
|
$('.row-active .section-title').text('Section Header');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$parent.attr('data-' + $attrname, $this.getInputValue());
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'col-setting':
|
||||||
|
var component = false;
|
||||||
|
|
||||||
|
$('#layout-modal').find('.addon-input').each(function(){
|
||||||
|
|
||||||
|
var $this = $(this),
|
||||||
|
$parent = $('.column-active'),
|
||||||
|
$attrname = $this.data('attrname');
|
||||||
|
$parent.removeData( $attrname ),
|
||||||
|
dataVal = $this.val();
|
||||||
|
|
||||||
|
if ( $attrname == 'column_type' && $(this).attr("checked") ) {
|
||||||
|
component = true;
|
||||||
|
$('.column-active .col-title').text('Component');
|
||||||
|
}else if( $attrname == 'name' && component != true ) {
|
||||||
|
if (dataVal == '' || dataVal == undefined) {
|
||||||
|
dataVal = 'none';
|
||||||
|
}
|
||||||
|
$('.column-active .col-title').text(dataVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
$parent.attr('data-' + $attrname, $this.getInputValue());
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'save-layout':
|
||||||
|
var layoutName = $('#layout-modal .addon-input').val(),
|
||||||
|
data = {
|
||||||
|
action : 'save',
|
||||||
|
layoutName : layoutName,
|
||||||
|
content: JSON.stringify(getGeneratedLayout())
|
||||||
|
};
|
||||||
|
|
||||||
|
if (layoutName =='' || layoutName ==' ') {
|
||||||
|
alert("Without Name Layout Can't be save");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'data' : data,
|
||||||
|
'format' : 'json'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : request,
|
||||||
|
beforeSend: function(){
|
||||||
|
},
|
||||||
|
success: function (response) {
|
||||||
|
var data = $.parseJSON(response.data),
|
||||||
|
layouts = data.layout,
|
||||||
|
tplHtml = '';
|
||||||
|
|
||||||
|
$('#jform_params_layoutlist').find('option').remove();
|
||||||
|
if (layouts.length) {
|
||||||
|
for (var i = 0; i < layouts.length; i++) {
|
||||||
|
tplHtml += '<option value="'+ layouts[i] +'">'+ layouts[i].replace('.json','')+'</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#jform_params_layoutlist').html(tplHtml);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(){
|
||||||
|
alert('Somethings wrong, Try again');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
alert('You are doing somethings wrongs. Try again');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Column Layout Arrange
|
||||||
|
$(document).on('click', '.column-layout', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $that = $(this),
|
||||||
|
colType = $that.data('type'), column;
|
||||||
|
|
||||||
|
if ($that.hasClass('active') && colType != 'custom' ) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (colType == 'custom') {
|
||||||
|
column = prompt('Enter your custom layout like 4,2,2,2,2 as total 12 grid','4,2,2,2,2');
|
||||||
|
}
|
||||||
|
|
||||||
|
var $parent = $that.closest('.column-list'),
|
||||||
|
$gparent = $that.closest('.layoutbuilder-section'),
|
||||||
|
oldLayoutData = $parent.find('.active').data('layout'),
|
||||||
|
oldLayout = ['12'],
|
||||||
|
layoutData = $that.data('layout'),
|
||||||
|
newLayout = ['12'];
|
||||||
|
|
||||||
|
if (oldLayoutData !=12) {
|
||||||
|
oldLayout = oldLayoutData.split(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(layoutData != 12 ){
|
||||||
|
newLayout = layoutData.split(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( colType == 'custom' ) {
|
||||||
|
var error = true;
|
||||||
|
|
||||||
|
if ( column != null ) {
|
||||||
|
var colArray = column.split(',');
|
||||||
|
|
||||||
|
var colSum = colArray.reduce(function(a, b) {
|
||||||
|
return Number(a) + Number(b);
|
||||||
|
});
|
||||||
|
|
||||||
|
if ( colSum == 12 ) {
|
||||||
|
newLayout = colArray;
|
||||||
|
$(this).data('layout', column)
|
||||||
|
error = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
alert('Error generated. Please correct your column arragnement and try again.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var col = [],
|
||||||
|
colAttr = [];
|
||||||
|
|
||||||
|
$gparent.find('.layout-column').each(function(i,val){
|
||||||
|
col[i] = $(this).html();
|
||||||
|
var colData = $(this).data();
|
||||||
|
|
||||||
|
if (typeof colData == 'object') {
|
||||||
|
colAttr[i] = $(this).data();
|
||||||
|
}else{
|
||||||
|
colAttr[i] = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$parent.find('.active').removeClass('active');
|
||||||
|
$that.addClass('active');
|
||||||
|
|
||||||
|
var new_item = '';
|
||||||
|
|
||||||
|
for(var i=0; i < newLayout.length; i++)
|
||||||
|
{
|
||||||
|
var dataAttr = '';
|
||||||
|
if (typeof colAttr[i] == 'object') {
|
||||||
|
$.each(colAttr[i],function(index,value){
|
||||||
|
dataAttr += ' data-'+index+'="'+value+'"';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
new_item +='<div class="layout-column col-sm-'+ newLayout[i].trim() +'" '+dataAttr+'>';
|
||||||
|
if (col[i]) {
|
||||||
|
new_item += col[i];
|
||||||
|
}else{
|
||||||
|
new_item += '<div class="column"> <h6 class="col-title pull-left">None</h6> <a class="col-ops-set pull-right" href="#" ><i class="fa fa-gears"></i></a></div>';
|
||||||
|
}
|
||||||
|
new_item +='</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$old_column = $gparent.find('.layout-column');
|
||||||
|
$gparent.find('.row.ui-sortable').append( new_item );
|
||||||
|
|
||||||
|
$old_column.remove();
|
||||||
|
jqueryUiLayout();
|
||||||
|
});
|
||||||
|
|
||||||
|
// add row
|
||||||
|
$(document).on('click','.add-row',function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $parent = $(this).closest('.layoutbuilder-section'),
|
||||||
|
$rowClone = $('#layoutbuilder-section').clone(true);
|
||||||
|
|
||||||
|
$rowClone.addClass('layoutbuilder-section').removeAttr('id');
|
||||||
|
$($rowClone).insertAfter($parent);
|
||||||
|
|
||||||
|
jqueryUiLayout();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Remove Row
|
||||||
|
$(document).on('click', '.remove-row', function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
if ( confirm("Click Ok button to delete Row, Cancel to leave.") == true )
|
||||||
|
{
|
||||||
|
$(this).closest('.layoutbuilder-section').slideUp(500, function(){
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Remove Media
|
||||||
|
$(document).on('click','.remove-media',function(){
|
||||||
|
var $that = $(this),
|
||||||
|
$imgParent = $that.parent('.media');
|
||||||
|
|
||||||
|
$imgParent.find('img.media-preview').each(function() {
|
||||||
|
$(this).attr('src','');
|
||||||
|
$(this).closest('.image-preview').css('display', 'none');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Generate Layout JSON
|
||||||
|
|
||||||
|
function getGeneratedLayout(){
|
||||||
|
var item = [];
|
||||||
|
$('#helix-layout-builder').find('.layoutbuilder-section').each(function(index){
|
||||||
|
var $row = $(this),
|
||||||
|
rowIndex = index,
|
||||||
|
rowObj = $row.data();
|
||||||
|
delete rowObj.sortableItem;
|
||||||
|
|
||||||
|
var activeLayout = $row.find('.column-layout.active'),
|
||||||
|
layoutArray = activeLayout.data('layout'),
|
||||||
|
layout = 12;
|
||||||
|
|
||||||
|
if( layoutArray != 12){
|
||||||
|
layout = layoutArray.split(',').join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
item[rowIndex] = {
|
||||||
|
'type' : 'row',
|
||||||
|
'layout' : layout,
|
||||||
|
'settings' : rowObj,
|
||||||
|
'attr' : []
|
||||||
|
};
|
||||||
|
|
||||||
|
// Find Column Elements
|
||||||
|
$row.find('.layout-column').each(function(index) {
|
||||||
|
|
||||||
|
var $column = $(this),
|
||||||
|
colIndex = index,
|
||||||
|
className = $column.attr('class'),
|
||||||
|
colObj = $column.data();
|
||||||
|
delete colObj.sortableItem;
|
||||||
|
|
||||||
|
item[rowIndex].attr[colIndex] = {
|
||||||
|
'type' : 'sp_col',
|
||||||
|
'className' : className,
|
||||||
|
'settings' : colObj
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
//On Submit
|
||||||
|
document.adminForm.onsubmit = function(event){
|
||||||
|
|
||||||
|
//Webfonts
|
||||||
|
$('.webfont').each(function(){
|
||||||
|
var $that = $(this),
|
||||||
|
webfont = {
|
||||||
|
'fontFamily' : $that.find('.list-font-families').val(),
|
||||||
|
'fontWeight' : $that.find('.list-font-weight').val(),
|
||||||
|
'fontSubset' : $that.find('.list-font-subset').val(),
|
||||||
|
'fontSize' : $that.find('.webfont-size').val()
|
||||||
|
}
|
||||||
|
|
||||||
|
$that.find('.input-webfont').val( JSON.stringify(webfont) )
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//Generate Layout
|
||||||
|
$('#jform_params_layout').val( JSON.stringify(getGeneratedLayout()) );
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
81
deployed/helix3/plugins/system/helix3/assets/js/helper.js
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function ($) {
|
||||||
|
|
||||||
|
//Remove Chosen
|
||||||
|
$.fn.rowSortable = function(){
|
||||||
|
$(this).sortable({
|
||||||
|
placeholder: "ui-state-highlight",
|
||||||
|
forcePlaceholderSize: true,
|
||||||
|
axis: 'x',
|
||||||
|
opacity: 0.8,
|
||||||
|
tolerance: 'pointer',
|
||||||
|
|
||||||
|
start: function(event, ui) {
|
||||||
|
$( ".layoutbuilder-section .row" ).find('.ui-state-highlight').addClass( $(ui.item).attr('class') );
|
||||||
|
$( ".layoutbuilder-section .row" ).find('.ui-state-highlight').css( 'height', $(ui.item).outerHeight() );
|
||||||
|
}
|
||||||
|
|
||||||
|
}).disableSelection();
|
||||||
|
};
|
||||||
|
|
||||||
|
//Random number
|
||||||
|
function random_number() {
|
||||||
|
return randomFromInterval(1, 1e6)
|
||||||
|
}
|
||||||
|
|
||||||
|
function randomFromInterval(e, t) {
|
||||||
|
return Math.floor(Math.random() * (t - e + 1) + e)
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.randomIds = function()
|
||||||
|
{
|
||||||
|
//Media
|
||||||
|
$(this).find('.media').each(function(){
|
||||||
|
var $id = random_number();
|
||||||
|
|
||||||
|
$(this).find('.input-media').attr('id', 'media-' + $id);
|
||||||
|
|
||||||
|
//Preview
|
||||||
|
$(this).find('.image-preview').attr('id', 'media-' + $id + '_preview_img');
|
||||||
|
$(this).find('.image-preview').find('img').attr('id', 'media-' + $id + '_preview');
|
||||||
|
|
||||||
|
$(this).find('a.modal').attr('href', 'index.php?option=com_media&view=images&tmpl=component&fieldid=' + 'media-' + $id);
|
||||||
|
$(this).find('a.remove-media').attr('onClick', "jInsertFieldValue('', 'media-" + $id + "');return false;");
|
||||||
|
|
||||||
|
$(this).find('a.remove-media').on('click', function(){
|
||||||
|
$(this).closest('.media').find('.input-media').val('');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Re-initialize modal
|
||||||
|
SqueezeBox.assign( $(this).find('a.modal') , {
|
||||||
|
parse: 'rel'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//remove ids
|
||||||
|
$.fn.cleanRandomIds = function(){
|
||||||
|
|
||||||
|
$(this).find('select').chosen('destroy');
|
||||||
|
|
||||||
|
//Media
|
||||||
|
$(this).find('.media').each(function(){
|
||||||
|
$(this).find('.input-media').removeAttr('id');
|
||||||
|
//Preview
|
||||||
|
$(this).find('.image-preview').removeAttr('id');
|
||||||
|
$(this).find('.image-preview').find('img').removeAttr('id');
|
||||||
|
$(this).find('a.modal').removeAttr('href');
|
||||||
|
$(this).find('a.remove-media').removeAttr('onClick');
|
||||||
|
});
|
||||||
|
|
||||||
|
return $(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
6
deployed/helix3/plugins/system/helix3/assets/js/jquery-ui.draggable.min.js
vendored
Normal file
8
deployed/helix3/plugins/system/helix3/assets/js/jquery-ui.min.js
vendored
Normal file
@ -0,0 +1,298 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
jQuery(function($) {
|
||||||
|
|
||||||
|
$('#attrib-spmegamenu').find('.control-group').first().find('.control-label').remove();
|
||||||
|
$('#attrib-spmegamenu').find('.control-group').first().find('>.controls').removeClass().addClass('megamenu').unwrap();
|
||||||
|
|
||||||
|
//Section Sortable callbck
|
||||||
|
$.fn.sectionSort = function(){
|
||||||
|
$(this).sortable({
|
||||||
|
items: ".menu-section",
|
||||||
|
placeholder: "menu-section-state-highlight",
|
||||||
|
forcePlaceholderSize: true,
|
||||||
|
opacity: 0.8,
|
||||||
|
handle: ".row-move",
|
||||||
|
distance: 0.5,
|
||||||
|
tolerance: 'pointer',
|
||||||
|
start: function(event, ui) {
|
||||||
|
ui.placeholder.height(ui.item.height());
|
||||||
|
}}).disableSelection();
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.columnSort = function(){
|
||||||
|
$(this).sortable({
|
||||||
|
items: '.column',
|
||||||
|
placeholder: 'ui-state-highlight',
|
||||||
|
opacity: 0.8,
|
||||||
|
dropOnEmpty: true,
|
||||||
|
distance: 0.5,
|
||||||
|
tolerance: 'pointer',
|
||||||
|
start: function(event, ui) {
|
||||||
|
var plus;
|
||||||
|
if(ui.item.hasClass('sp-col-sm-1')) plus = 'sp-col-sm-1'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-2')) plus = 'sp-col-sm-2'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-3')) plus = 'sp-col-sm-3'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-4')) plus = 'sp-col-sm-4'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-5')) plus = 'sp-col-sm-5'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-7')) plus = 'sp-col-sm-7'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-8')) plus = 'sp-col-sm-8'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-9')) plus = 'sp-col-sm-9'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-10')) plus = 'sp-col-sm-10'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-11')) plus = 'sp-col-sm-11'; else
|
||||||
|
if(ui.item.hasClass('sp-col-sm-12')) plus = 'sp-col-sm-12'; else
|
||||||
|
plus = 'sp-col-sm-6';
|
||||||
|
ui.placeholder.addClass(plus);
|
||||||
|
ui.placeholder.height(ui.item.height());
|
||||||
|
}}).disableSelection();
|
||||||
|
};
|
||||||
|
|
||||||
|
function mdouleSortable(){
|
||||||
|
$('.modules-container').sortable({
|
||||||
|
connectWith: '.modules-container',
|
||||||
|
items: '.draggable-module',
|
||||||
|
placeholder: 'ui-state-highlight',
|
||||||
|
opacity: 0.8,
|
||||||
|
dropOnEmpty: true,
|
||||||
|
distance: 0.5,
|
||||||
|
tolerance: 'pointer'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$('#megamenulayout').sectionSort();
|
||||||
|
$('.spmenu').columnSort();
|
||||||
|
|
||||||
|
mdouleSortable();
|
||||||
|
|
||||||
|
$('.modules-list').find('.draggable-module').draggable({
|
||||||
|
connectToSortable: '.modules-container',
|
||||||
|
items: '.draggable-module',
|
||||||
|
helper: 'clone',
|
||||||
|
stop: function( event, ui ) {
|
||||||
|
mdouleSortable();
|
||||||
|
ui.helper.removeAttr('style');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Menu Width
|
||||||
|
$('#menuWidth').change(function(){
|
||||||
|
var width = $('#menuWidth').val();
|
||||||
|
if(width >= 200){
|
||||||
|
$('#megamenulayout').css('width',width)
|
||||||
|
.data('width',width);
|
||||||
|
}else{
|
||||||
|
alert("Width can't be less than 200 Pixels");
|
||||||
|
$('#menuWidth').val($('#megamenulayout').data('width'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Mega menu alignment
|
||||||
|
$('.action-bar').on('click','.alignment',function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $that = $(this);
|
||||||
|
$('.alignment').removeClass('active');
|
||||||
|
$that.addClass('active');
|
||||||
|
$('#megamenulayout').data('menu_align',$(this).data('al_flag'));
|
||||||
|
});
|
||||||
|
|
||||||
|
//Modal
|
||||||
|
$(document).on('click','.add-layout',function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
$('#layout-modal').spmodal();
|
||||||
|
});
|
||||||
|
|
||||||
|
//Remove Module
|
||||||
|
$(document).on('click', '.modules-container .fa-remove', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
$(this).closest('.draggable-module').fadeOut(400).delay(400, function(){
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.layout-reset').on('click', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
var $that = $(this);
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
action : 'resetLayout',
|
||||||
|
layoutName : $that.data('current_item')
|
||||||
|
};
|
||||||
|
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'data' : data,
|
||||||
|
'format' : 'raw'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : request,
|
||||||
|
dataType: "html",
|
||||||
|
success: function (response) {
|
||||||
|
if (response) {
|
||||||
|
$('#megamenulayout').find('.menu-section').remove();
|
||||||
|
$('#megamenulayout').append(response);
|
||||||
|
|
||||||
|
// sorting layout
|
||||||
|
$('#megamenulayout').sectionSort();
|
||||||
|
$('.spmenu').columnSort();
|
||||||
|
mdouleSortable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// new layout generator
|
||||||
|
$(document).on('click', '#layout-modal a', function(event){
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
if($(this).hasClass('active')){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var $that = $(this),
|
||||||
|
newLayoutData = $that.data('layout'),
|
||||||
|
layoutDesign = $that.data('design'),
|
||||||
|
$parent = $('#layout-modal'),
|
||||||
|
oldLayout = $('#megamenulayout').data('menu_item'),
|
||||||
|
newLayout = [12];
|
||||||
|
|
||||||
|
if(newLayoutData != 12 ){
|
||||||
|
newLayout = newLayoutData.split(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newLayout.length !== 1 && newLayout.length < oldLayout) {
|
||||||
|
alert("You can't add small layout than default layout");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var colHtml = [];
|
||||||
|
|
||||||
|
var designString = $('#'+layoutDesign).html();
|
||||||
|
|
||||||
|
$('#megamenulayout').find('.column-items-wrap').each(function(i,val){
|
||||||
|
var $that = $(this);
|
||||||
|
colHtml[i] = this.innerHTML;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!String.prototype.format) {
|
||||||
|
String.prototype.format = function() {
|
||||||
|
var args = arguments;
|
||||||
|
return this.replace(/{(\d+)}/g, function(match, number) {
|
||||||
|
return typeof args[number] != 'undefined'
|
||||||
|
? args[number]
|
||||||
|
: '<div class="modules-container"></div>'
|
||||||
|
;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newLayout.length === 1) {
|
||||||
|
var html = '';
|
||||||
|
for (var i = 0; i < colHtml.length; i++) {
|
||||||
|
|
||||||
|
html += colHtml[i];
|
||||||
|
}
|
||||||
|
var newLayoutHtml = designString.format(html);
|
||||||
|
}else{
|
||||||
|
var newLayoutHtml = designString.format(colHtml[0],colHtml[1],colHtml[2],colHtml[3],colHtml[4],colHtml[5]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Manage Modal layout
|
||||||
|
$parent.find('.active').removeClass('active');
|
||||||
|
$parent.spmodal('hide');
|
||||||
|
$(this).addClass('active');
|
||||||
|
|
||||||
|
var $oldLayoutHtml = $('#megamenulayout').find('.menu-section');
|
||||||
|
|
||||||
|
$oldLayoutHtml.remove();
|
||||||
|
$('#megamenulayout').append(newLayoutHtml);
|
||||||
|
|
||||||
|
if (newLayout.length === 1) {
|
||||||
|
$('#megamenulayout').find('.modules-container').remove();
|
||||||
|
$('#megamenulayout').find('.column-items-wrap').append('<div class="modules-container"></div>');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#megamenulayout').sectionSort();
|
||||||
|
$('.spmenu').columnSort();
|
||||||
|
mdouleSortable();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
document.adminForm.onsubmit = function(event){
|
||||||
|
var layout = [];
|
||||||
|
|
||||||
|
// Get each row data;
|
||||||
|
$('#megamenulayout').find('.spmenu').each(function(index) {
|
||||||
|
var $row = $(this),
|
||||||
|
rowIndex = index;
|
||||||
|
layout[rowIndex] = {
|
||||||
|
'type' : 'row',
|
||||||
|
'attr' : []
|
||||||
|
};
|
||||||
|
|
||||||
|
// Get each column data;
|
||||||
|
$row.find('.column').each(function(index) {
|
||||||
|
var $column = $(this),
|
||||||
|
colIndex = index,
|
||||||
|
colGrid = $column.data('column');
|
||||||
|
|
||||||
|
layout[rowIndex].attr[colIndex] = {
|
||||||
|
'type' : 'column',
|
||||||
|
'colGrid' : colGrid,
|
||||||
|
'menuParentId' : '',
|
||||||
|
'moduleId' : ''
|
||||||
|
};
|
||||||
|
|
||||||
|
// get current child id
|
||||||
|
var menuParentId = '';
|
||||||
|
|
||||||
|
$column.find('h4').each(function(index, el) {
|
||||||
|
menuParentId += $(this).data('current_child')+',';
|
||||||
|
});
|
||||||
|
|
||||||
|
if (menuParentId) {
|
||||||
|
menuParentId = menuParentId.slice(',',-1);
|
||||||
|
layout[rowIndex].attr[colIndex].menuParentId = menuParentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// get modules id
|
||||||
|
var moduleId = '';
|
||||||
|
$column.find('.draggable-module').each(function(index, el) {
|
||||||
|
moduleId += $(this).data('mod_id')+',';
|
||||||
|
});
|
||||||
|
|
||||||
|
if(moduleId){
|
||||||
|
moduleId = moduleId.slice(',',-1);
|
||||||
|
layout[rowIndex].attr[colIndex].moduleId = moduleId;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var initData = $('#megamenulayout').data();
|
||||||
|
|
||||||
|
var menumData = {
|
||||||
|
'width' : initData.width,
|
||||||
|
'menuItem' : initData.menu_item,
|
||||||
|
'menuAlign' : initData.menu_align,
|
||||||
|
'layout' : layout
|
||||||
|
};
|
||||||
|
|
||||||
|
var megamenu = 0,
|
||||||
|
mega_lenght = $('#megamenulayout').find('.column').length;
|
||||||
|
|
||||||
|
if (mega_lenght > 1) {
|
||||||
|
megamenu = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#jform_params_megamenu').val(megamenu);
|
||||||
|
$('#jform_params_menulayout').val( JSON.stringify(menumData) );
|
||||||
|
}
|
||||||
|
});
|
||||||
249
deployed/helix3/plugins/system/helix3/assets/js/modal.js
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
/* ========================================================================
|
||||||
|
* Bootstrap: modal.js v3.1.1
|
||||||
|
* http://getbootstrap.com/javascript/#modals
|
||||||
|
* ========================================================================
|
||||||
|
* Copyright 2011-2014 Twitter, Inc.
|
||||||
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
|
* ======================================================================== */
|
||||||
|
|
||||||
|
|
||||||
|
+function ($) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// MODAL CLASS DEFINITION
|
||||||
|
// ======================
|
||||||
|
|
||||||
|
var SPModal = function (element, options) {
|
||||||
|
this.options = options
|
||||||
|
this.$element = $(element)
|
||||||
|
this.$backdrop =
|
||||||
|
this.isShown = null
|
||||||
|
|
||||||
|
if (this.options.remote) {
|
||||||
|
this.$element
|
||||||
|
.find('.sp-modal-content')
|
||||||
|
.load(this.options.remote, $.proxy(function () {
|
||||||
|
this.$element.trigger('loaded.bs.spmodal')
|
||||||
|
}, this))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.DEFAULTS = {
|
||||||
|
backdrop: true,
|
||||||
|
keyboard: false,
|
||||||
|
show: true
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.prototype.toggle = function (_relatedTarget) {
|
||||||
|
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.prototype.show = function (_relatedTarget) {
|
||||||
|
|
||||||
|
$(document.body).addClass('sp-modal-open')
|
||||||
|
|
||||||
|
var that = this
|
||||||
|
var e = $.Event('show.bs.spmodal', { relatedTarget: _relatedTarget })
|
||||||
|
|
||||||
|
this.$element.trigger(e)
|
||||||
|
|
||||||
|
if (this.isShown || e.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
this.isShown = true
|
||||||
|
|
||||||
|
this.escape()
|
||||||
|
|
||||||
|
this.$element.on('click.dismiss.bs.spmodal', '[data-dismiss="spmodal"]', $.proxy(this.hide, this))
|
||||||
|
|
||||||
|
this.backdrop(function () {
|
||||||
|
var transition = $.support.transition && that.$element.hasClass('fade')
|
||||||
|
|
||||||
|
if (!that.$element.parent().length) {
|
||||||
|
that.$element.appendTo(document.body) // don't move modals dom position
|
||||||
|
}
|
||||||
|
|
||||||
|
that.$element
|
||||||
|
.show()
|
||||||
|
.scrollTop(0)
|
||||||
|
|
||||||
|
if (transition) {
|
||||||
|
that.$element[0].offsetWidth // force reflow
|
||||||
|
}
|
||||||
|
|
||||||
|
that.$element
|
||||||
|
.addClass('in')
|
||||||
|
.attr('aria-hidden', false)
|
||||||
|
|
||||||
|
that.enforceFocus()
|
||||||
|
|
||||||
|
var e = $.Event('shown.bs.spmodal', { relatedTarget: _relatedTarget })
|
||||||
|
|
||||||
|
transition ?
|
||||||
|
that.$element.find('.sp-modal-dialog') // wait for modal to slide in
|
||||||
|
.one($.support.transition.end, function () {
|
||||||
|
that.$element.focus().trigger(e)
|
||||||
|
})
|
||||||
|
.emulateTransitionEnd(300) :
|
||||||
|
that.$element.focus().trigger(e)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.prototype.hide = function (e) {
|
||||||
|
|
||||||
|
$(document.body).removeClass('sp-modal-open')
|
||||||
|
|
||||||
|
|
||||||
|
if (e) e.preventDefault()
|
||||||
|
|
||||||
|
e = $.Event('hide.bs.spmodal')
|
||||||
|
|
||||||
|
this.$element.trigger(e)
|
||||||
|
|
||||||
|
if (!this.isShown || e.isDefaultPrevented()) return
|
||||||
|
|
||||||
|
this.isShown = false
|
||||||
|
|
||||||
|
this.escape()
|
||||||
|
|
||||||
|
$(document).off('focusin.bs.spmodal')
|
||||||
|
|
||||||
|
this.$element
|
||||||
|
.removeClass('in')
|
||||||
|
.attr('aria-hidden', true)
|
||||||
|
.off('click.dismiss.bs.spmodal')
|
||||||
|
|
||||||
|
$.support.transition && this.$element.hasClass('fade') ?
|
||||||
|
this.$element
|
||||||
|
.one($.support.transition.end, $.proxy(this.hideSPModal, this))
|
||||||
|
.emulateTransitionEnd(300) :
|
||||||
|
this.hideSPModal()
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.prototype.enforceFocus = function () {
|
||||||
|
$(document)
|
||||||
|
.off('focusin.bs.spmodal') // guard against infinite focus loop
|
||||||
|
.on('focusin.bs.spmodal', $.proxy(function (e) {
|
||||||
|
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
|
||||||
|
this.$element.focus()
|
||||||
|
}
|
||||||
|
}, this))
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.prototype.escape = function () {
|
||||||
|
if (this.isShown && this.options.keyboard) {
|
||||||
|
this.$element.on('keyup.dismiss.bs.spmodal', $.proxy(function (e) {
|
||||||
|
e.which == 27 && this.hide()
|
||||||
|
}, this))
|
||||||
|
} else if (!this.isShown) {
|
||||||
|
this.$element.off('keyup.dismiss.bs.spmodal')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.prototype.hideSPModal = function () {
|
||||||
|
var that = this
|
||||||
|
this.$element.hide()
|
||||||
|
this.backdrop(function () {
|
||||||
|
that.removeBackdrop()
|
||||||
|
that.$element.trigger('hidden.bs.spmodal')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.prototype.removeBackdrop = function () {
|
||||||
|
this.$backdrop && this.$backdrop.remove()
|
||||||
|
this.$backdrop = null
|
||||||
|
}
|
||||||
|
|
||||||
|
SPModal.prototype.backdrop = function (callback) {
|
||||||
|
var animate = this.$element.hasClass('fade') ? 'fade' : ''
|
||||||
|
|
||||||
|
if (this.isShown && this.options.backdrop) {
|
||||||
|
var doAnimate = $.support.transition && animate
|
||||||
|
|
||||||
|
this.$backdrop = $('<div class="sp-modal-backdrop ' + animate + '" />')
|
||||||
|
.appendTo(document.body)
|
||||||
|
|
||||||
|
/*
|
||||||
|
this.$element.on('click.dismiss.bs.spmodal', $.proxy(function (e) {
|
||||||
|
if (e.target !== e.currentTarget) return
|
||||||
|
this.options.backdrop == 'static'
|
||||||
|
? this.$element[0].focus.call(this.$element[0])
|
||||||
|
: this.hide.call(this)
|
||||||
|
}, this))
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
||||||
|
|
||||||
|
this.$backdrop.addClass('in')
|
||||||
|
|
||||||
|
if (!callback) return
|
||||||
|
|
||||||
|
doAnimate ?
|
||||||
|
this.$backdrop
|
||||||
|
.one($.support.transition.end, callback)
|
||||||
|
.emulateTransitionEnd(150) :
|
||||||
|
callback()
|
||||||
|
|
||||||
|
} else if (!this.isShown && this.$backdrop) {
|
||||||
|
this.$backdrop.removeClass('in')
|
||||||
|
|
||||||
|
$.support.transition && this.$element.hasClass('fade') ?
|
||||||
|
this.$backdrop
|
||||||
|
.one($.support.transition.end, callback)
|
||||||
|
.emulateTransitionEnd(150) :
|
||||||
|
callback()
|
||||||
|
|
||||||
|
} else if (callback) {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MODAL PLUGIN DEFINITION
|
||||||
|
// =======================
|
||||||
|
|
||||||
|
var old = $.fn.spmodal
|
||||||
|
|
||||||
|
$.fn.spmodal = function (option, _relatedTarget) {
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $(this)
|
||||||
|
var data = $this.data('bs.spmodal')
|
||||||
|
var options = $.extend({}, SPModal.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||||
|
|
||||||
|
if (!data) $this.data('bs.spmodal', (data = new SPModal(this, options)))
|
||||||
|
if (typeof option == 'string') data[option](_relatedTarget)
|
||||||
|
else if (options.show) data.show(_relatedTarget)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.spmodal.Constructor = SPModal
|
||||||
|
|
||||||
|
|
||||||
|
// MODAL NO CONFLICT
|
||||||
|
// =================
|
||||||
|
|
||||||
|
$.fn.spmodal.noConflict = function () {
|
||||||
|
$.fn.spmodal = old
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// MODAL DATA-API
|
||||||
|
// ==============
|
||||||
|
|
||||||
|
$(document).on('click.bs.spmodal.data-api', '[data-toggle="spmodal"]', function (e) {
|
||||||
|
|
||||||
|
var $this = $(this)
|
||||||
|
var href = $this.attr('href')
|
||||||
|
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
||||||
|
var option = $target.data('bs.spmodal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
||||||
|
|
||||||
|
if ($this.is('a')) e.preventDefault()
|
||||||
|
|
||||||
|
$target
|
||||||
|
.spmodal(option, this)
|
||||||
|
.one('hide', function () {
|
||||||
|
$this.is(':visible') && $this.focus()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}(jQuery);
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
jQuery(function($) {
|
||||||
|
|
||||||
|
$('.post-formats input').on('click', function(){
|
||||||
|
checkFormate();
|
||||||
|
});
|
||||||
|
|
||||||
|
function checkFormate(){
|
||||||
|
|
||||||
|
var formate = $('.post-formats input:checked').attr('value');
|
||||||
|
|
||||||
|
if(typeof formate != 'undefined'){
|
||||||
|
|
||||||
|
$('#jform_attribs_gallery, #jform_attribs_audio, #jform_attribs_audio, #jform_attribs_video, #jform_attribs_link_title, #jform_attribs_link_url, #jform_attribs_quote_text, #jform_attribs_quote_author, #jform_attribs_post_status').closest('.control-group').hide();
|
||||||
|
|
||||||
|
if( formate=='video' ) {
|
||||||
|
$('#jform_attribs_video').closest('.control-group').show();
|
||||||
|
} else if( formate=='gallery' ) {
|
||||||
|
$('#jform_attribs_gallery').closest('.control-group').show();
|
||||||
|
} else if( formate=='audio' ) {
|
||||||
|
$('#jform_attribs_audio').closest('.control-group').show();
|
||||||
|
} else if( formate=='link' ) {
|
||||||
|
$('#jform_attribs_link_title').closest('.control-group').show();
|
||||||
|
$('#jform_attribs_link_url').closest('.control-group').show();
|
||||||
|
} else if( formate=='quote' ) {
|
||||||
|
$('#jform_attribs_quote_text').closest('.control-group').show();
|
||||||
|
$('#jform_attribs_quote_author').closest('.control-group').show();
|
||||||
|
} else if( formate=='status' ) {
|
||||||
|
$('#jform_attribs_post_status').closest('.control-group').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
checkFormate();
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
136
deployed/helix3/plugins/system/helix3/assets/js/spgallery.js
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
jQuery(function($) {
|
||||||
|
|
||||||
|
$('.sp-gallery-field').each(function(index, el) {
|
||||||
|
|
||||||
|
var $field = $(el);
|
||||||
|
|
||||||
|
// Upload form
|
||||||
|
$field.find('.btn-sp-gallery-item-upload').on('click', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
$field.find('.sp-gallery-item-upload').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
//Sortable
|
||||||
|
$field.find('.sp-gallery-items').sortable({
|
||||||
|
stop : function(event,ui){
|
||||||
|
// Set Value
|
||||||
|
var images = [];
|
||||||
|
$.each($field.find('.sp-gallery-items').find('>li'), function( index, value ) {
|
||||||
|
images.push( '"' + $(value).data('src') + '"' );
|
||||||
|
});
|
||||||
|
var output = '{"'+ $field.find('.form-field-spgallery').data('name') +'":['+ images +']}';
|
||||||
|
$field.find('.form-field-spgallery').val(output);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Upload
|
||||||
|
$field.find(".sp-gallery-item-upload").on('change', (function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var $this = $(this);
|
||||||
|
var file = $(this).prop('files')[0];
|
||||||
|
|
||||||
|
var data = new FormData();
|
||||||
|
data.append('option', 'com_ajax');
|
||||||
|
data.append('plugin', 'helix3');
|
||||||
|
data.append('action', 'upload_image');
|
||||||
|
data.append('format', 'json');
|
||||||
|
|
||||||
|
if (file.type.match(/image.*/)) {
|
||||||
|
data.append('image', file);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: data,
|
||||||
|
contentType: false,
|
||||||
|
cache: false,
|
||||||
|
processData:false,
|
||||||
|
beforeSend: function() {
|
||||||
|
$this.prop('disabled', true);
|
||||||
|
$field.find('.btn-sp-gallery-item-upload').attr('disabled', 'disabled');
|
||||||
|
var loader = $('<li class="sp-gallery-item-loader"><i class="fa fa-circle-o-notch fa-spin"></i></li>');
|
||||||
|
$this.prev('.sp-gallery-items').append(loader)
|
||||||
|
},
|
||||||
|
success: function(response)
|
||||||
|
{
|
||||||
|
var data = $.parseJSON(response);
|
||||||
|
|
||||||
|
if(data.status) {
|
||||||
|
$field.find('.sp-gallery-item-loader').before(data.output);
|
||||||
|
} else {
|
||||||
|
alert(data.output);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this.val('');
|
||||||
|
$this.prev('.sp-gallery-items').find('.sp-gallery-item-loader').remove();
|
||||||
|
$this.prop('disabled', false);
|
||||||
|
$field.find('.btn-sp-gallery-item-upload').removeAttr('disabled');
|
||||||
|
|
||||||
|
var images = [];
|
||||||
|
$.each($field.find('.sp-gallery-items').find('>li'), function( index, value ) {
|
||||||
|
images.push( '"' + $(value).data('src') + '"' );
|
||||||
|
});
|
||||||
|
var output = '{"'+ $field.find('.form-field-spgallery').data('name') +'":['+ images +']}';
|
||||||
|
$('.form-field-spgallery').val(output);
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function()
|
||||||
|
{
|
||||||
|
$this.prev('.sp-gallery-items').find('.sp-gallery-item-loader').remove();
|
||||||
|
$this.val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$this.val('');
|
||||||
|
|
||||||
|
}));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Delete Image
|
||||||
|
$(document).on('click', '.btn-remove-image', function(event) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
if (confirm("You are about to permanently delete this item. 'Cancel' to stop, 'OK' to delete.") == true) {
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'action' : 'remove_image',
|
||||||
|
'src' : $(this).parent().data('src'),
|
||||||
|
'format' : 'json'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data : request,
|
||||||
|
success: function(response)
|
||||||
|
{
|
||||||
|
var data = $.parseJSON(response);
|
||||||
|
if(data.status) {
|
||||||
|
$this.parent().remove();
|
||||||
|
|
||||||
|
var images = [];
|
||||||
|
$.each($('.sp-gallery-items').find('>li'), function( index, value ) {
|
||||||
|
images.push( '"' + $(value).data('src') + '"' );
|
||||||
|
});
|
||||||
|
var output = '{"'+ $('.form-field-spgallery').data('name') +'":['+ images +']}';
|
||||||
|
$('.form-field-spgallery').val(output);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert(data.output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
126
deployed/helix3/plugins/system/helix3/assets/js/spimage.js
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
jQuery(function($) {
|
||||||
|
|
||||||
|
$('.sp-image-field').each(function(index, el) {
|
||||||
|
|
||||||
|
var $field = $(el);
|
||||||
|
|
||||||
|
// Upload form
|
||||||
|
$field.find('.btn-sp-image-upload').on('click', function(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
$field.find('.sp-image-upload').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
//Upload
|
||||||
|
$field.find(".sp-image-upload").on('change', (function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var $this = $(this);
|
||||||
|
var file = $(this).prop('files')[0];
|
||||||
|
|
||||||
|
var data = new FormData();
|
||||||
|
data.append('option', 'com_ajax');
|
||||||
|
data.append('plugin', 'helix3');
|
||||||
|
data.append('action', 'upload_image');
|
||||||
|
data.append('imageonly', false);
|
||||||
|
data.append('format', 'json');
|
||||||
|
|
||||||
|
if (file.type.match(/image.*/)) {
|
||||||
|
data.append('image', file);
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: data,
|
||||||
|
contentType: false,
|
||||||
|
cache: false,
|
||||||
|
processData:false,
|
||||||
|
beforeSend: function() {
|
||||||
|
$this.prop('disabled', true);
|
||||||
|
$field.find('.btn-sp-image-upload').attr('disabled', 'disabled');
|
||||||
|
var loader = $('<div class="sp-image-item-loader"><i class="fa fa-circle-o-notch fa-spin"></i></div>');
|
||||||
|
$field.find('.sp-image-upload-wrapper').html(loader)
|
||||||
|
},
|
||||||
|
success: function(response)
|
||||||
|
{
|
||||||
|
var data = $.parseJSON(response);
|
||||||
|
|
||||||
|
if(data.status) {
|
||||||
|
$field.find('.sp-image-upload-wrapper').empty().html(data.output);
|
||||||
|
} else {
|
||||||
|
$field.find('.sp-image-upload-wrapper').empty();
|
||||||
|
alert(data.output);
|
||||||
|
}
|
||||||
|
|
||||||
|
var $image = $field.find('.sp-image-upload-wrapper').find('>img');
|
||||||
|
|
||||||
|
if($image.length) {
|
||||||
|
$field.find('.btn-sp-image-upload').addClass('hide');
|
||||||
|
$field.find('.btn-sp-image-remove').removeClass('hide');
|
||||||
|
$field.find('.form-field-spimage').val($image.data('src'));
|
||||||
|
} else {
|
||||||
|
$field.find('.btn-sp-image-upload').removeClass('hide');
|
||||||
|
$field.find('.btn-sp-image-remove').addClass('hide');
|
||||||
|
$field.find('.form-field-spimage').val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this.val('');
|
||||||
|
$this.prop('disabled', false);
|
||||||
|
$field.find('.btn-sp-image-upload').removeAttr('disabled');
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function()
|
||||||
|
{
|
||||||
|
$field.find('.sp-image-upload-wrapper').empty();
|
||||||
|
$this.val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$this.val('');
|
||||||
|
|
||||||
|
}));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// Delete Image
|
||||||
|
$(document).on('click', '.btn-sp-image-remove', function(event) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $this = $(this);
|
||||||
|
var $parent = $this.closest('.sp-image-field');
|
||||||
|
|
||||||
|
if (confirm("You are about to permanently delete this item. 'Cancel' to stop, 'OK' to delete.") == true) {
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'action' : 'remove_image',
|
||||||
|
'src' : $parent.find('.sp-image-upload-wrapper').find('>img').data('src'),
|
||||||
|
'format' : 'json'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data : request,
|
||||||
|
success: function(response)
|
||||||
|
{
|
||||||
|
var data = $.parseJSON(response);
|
||||||
|
if(data.status) {
|
||||||
|
$parent.find('.sp-image-upload-wrapper').empty();
|
||||||
|
$parent.find('.btn-sp-image-upload').removeClass('hide');
|
||||||
|
$parent.find('.btn-sp-image-remove').addClass('hide');
|
||||||
|
$parent.find('.form-field-spimage').val('');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert(data.output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
173
deployed/helix3/plugins/system/helix3/assets/js/webfont.js
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
jQuery(function($) {
|
||||||
|
|
||||||
|
//Web Fonts
|
||||||
|
$('.list-font-families').on('change', function(event) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $that = $(this),
|
||||||
|
layoutName = $(this).val(),
|
||||||
|
data = {
|
||||||
|
action : 'fontVariants',
|
||||||
|
layoutName : layoutName
|
||||||
|
};
|
||||||
|
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'data' : data,
|
||||||
|
'format' : 'json'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : request,
|
||||||
|
success: function (response) {
|
||||||
|
var font = $.parseJSON(response.data);
|
||||||
|
$that.closest('.webfont').find('.list-font-weight').html(font.variants);
|
||||||
|
$that.closest('.webfont').find('.list-font-subset').html(font.subsets);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//Change Preview
|
||||||
|
var font = $that.val().replace(" ", "+");
|
||||||
|
$('head').append("<link href='//fonts.googleapis.com/css?family="+ font +"' rel='stylesheet' type='text/css'>");
|
||||||
|
$(this).closest('.webfont').find('.webfont-preview').fadeIn().css('font-family', $(this).val());
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
//Font Size
|
||||||
|
$('.list-font-weight').on('change', function(event) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var variant = $(this).val(),
|
||||||
|
weight = '',
|
||||||
|
style = '',
|
||||||
|
family = $(this).closest('.webfont').find('.list-font-families').val().replace(" ", "+") + ':' + variant
|
||||||
|
|
||||||
|
if(variant=='regular') {
|
||||||
|
weight = 'regular';
|
||||||
|
style = '';
|
||||||
|
} else if (variant=='italic') {
|
||||||
|
weight = 'regular';
|
||||||
|
style = 'italic';
|
||||||
|
} else {
|
||||||
|
weight = parseInt(variant);
|
||||||
|
style = $(this).val().replace(weight, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('head').append("<link href='//fonts.googleapis.com/css?family="+ family +"' rel='stylesheet' type='text/css'>");
|
||||||
|
$(this).closest('.webfont').find('.webfont-preview').fadeIn().css({
|
||||||
|
'font-family': $(this).closest('.webfont').find('.list-font-families').val(),
|
||||||
|
'font-weight': weight,
|
||||||
|
'font-style': style
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//Font Subset
|
||||||
|
$('.list-font-subset').on('change', function(event) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var subsets = $(this).val(),
|
||||||
|
variant = $(this).closest('.webfont').find('.list-font-weight').val(),
|
||||||
|
weight = '',
|
||||||
|
style = '',
|
||||||
|
family = $(this).closest('.webfont').find('.list-font-families').val().replace(" ", "+") + ':' + variant + '&subset=' + subsets
|
||||||
|
|
||||||
|
if(variant=='regular') {
|
||||||
|
weight = 'regular';
|
||||||
|
style = '';
|
||||||
|
} else if (variant=='italic') {
|
||||||
|
weight = 'regular';
|
||||||
|
style = 'italic';
|
||||||
|
} else {
|
||||||
|
weight = parseInt(variant);
|
||||||
|
style = $(this).val().replace(weight, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('head').append("<link href='//fonts.googleapis.com/css?family="+ family +"' rel='stylesheet' type='text/css'>");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//Font Size
|
||||||
|
$('.webfont-size').on('change', function(event) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var font_size = $(this).val(),
|
||||||
|
subsets = $(this).closest('.webfont').find('.list-font-subset').val(),
|
||||||
|
variant = $(this).closest('.webfont').find('.list-font-weight').val(),
|
||||||
|
weight = '',
|
||||||
|
style = '',
|
||||||
|
family = $(this).closest('.webfont').find('.list-font-families').val().replace(" ", "+") + ':' + variant + '&subset=' + subsets
|
||||||
|
|
||||||
|
if(variant=='regular') {
|
||||||
|
weight = 'regular';
|
||||||
|
style = '';
|
||||||
|
} else if (variant=='italic') {
|
||||||
|
weight = 'regular';
|
||||||
|
style = 'italic';
|
||||||
|
} else {
|
||||||
|
weight = parseInt(variant);
|
||||||
|
style = $(this).val().replace(weight, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('head').append("<link href='//fonts.googleapis.com/css?family="+ family +"' rel='stylesheet' type='text/css'>");
|
||||||
|
$(this).closest('.webfont').find('.webfont-preview').fadeIn().css({
|
||||||
|
'font-family': $(this).closest('.webfont').find('.list-font-families').val(),
|
||||||
|
'font-weight': weight,
|
||||||
|
'font-style': style,
|
||||||
|
'font-size': $(this).val() + 'px',
|
||||||
|
'line-height': '1',
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//Update Fonts list
|
||||||
|
$('.btn-update-fonts-list').on('click', function(event){
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $that = $(this),
|
||||||
|
data = {
|
||||||
|
action : 'updateFonts',
|
||||||
|
layoutName : ''
|
||||||
|
};
|
||||||
|
|
||||||
|
var request = {
|
||||||
|
'option' : 'com_ajax',
|
||||||
|
'plugin' : 'helix3',
|
||||||
|
'data' : data,
|
||||||
|
'format' : 'raw'
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type : 'POST',
|
||||||
|
data : request,
|
||||||
|
beforeSend: function(){
|
||||||
|
$that.prepend('<i class="fa fa-spinner fa-spin"></i> ');
|
||||||
|
},
|
||||||
|
success: function (response) {
|
||||||
|
$that.after(response);
|
||||||
|
$that.find('.fa-spinner').remove();
|
||||||
|
$that.next().delay(1000).fadeOut(300, function(){
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
12564
deployed/helix3/plugins/system/helix3/assets/webfonts/webfonts.json
Normal file
BIN
deployed/helix3/plugins/system/helix3/core/.DS_Store
vendored
Normal file
587
deployed/helix3/plugins/system/helix3/core/classes/Minifier.php
Normal file
@ -0,0 +1,587 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* This file is part of the JShrink package.
|
||||||
|
*
|
||||||
|
* (c) Robert Hafner <tedivm@tedivm.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* JShrink
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @package JShrink
|
||||||
|
* @author Robert Hafner <tedivm@tedivm.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace JShrink;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minifier
|
||||||
|
*
|
||||||
|
* Usage - Minifier::minify($js);
|
||||||
|
* Usage - Minifier::minify($js, $options);
|
||||||
|
* Usage - Minifier::minify($js, array('flaggedComments' => false));
|
||||||
|
*
|
||||||
|
* @package JShrink
|
||||||
|
* @author Robert Hafner <tedivm@tedivm.com>
|
||||||
|
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
|
||||||
|
*/
|
||||||
|
class Minifier
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The input javascript to be minified.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $input;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The location of the character (in the input string) that is next to be
|
||||||
|
* processed.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $index = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The first of the characters currently being looked at.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $a = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The next character being looked at (after a);
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $b = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This character is only active when certain look ahead actions take place.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $c;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the options for the current minification process.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $options;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the default options for minification. This array is merged with
|
||||||
|
* the one passed in by the user to create the request specific set of
|
||||||
|
* options (stored in the $options attribute).
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected static $defaultOptions = array('flaggedComments' => true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains lock ids which are used to replace certain code patterns and
|
||||||
|
* prevent them from being minified
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $locks = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Takes a string containing javascript and removes unneeded characters in
|
||||||
|
* order to shrink the code without altering it's functionality.
|
||||||
|
*
|
||||||
|
* @param string $js The raw javascript to be minified
|
||||||
|
* @param array $options Various runtime options in an associative array
|
||||||
|
* @throws \Exception
|
||||||
|
* @return bool|string
|
||||||
|
*/
|
||||||
|
public static function minify($js, $options = array())
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
$jshrink = new Minifier();
|
||||||
|
$js = $jshrink->lock($js);
|
||||||
|
$jshrink->minifyDirectToOutput($js, $options);
|
||||||
|
|
||||||
|
// Sometimes there's a leading new line, so we trim that out here.
|
||||||
|
$js = ltrim(ob_get_clean());
|
||||||
|
$js = $jshrink->unlock($js);
|
||||||
|
unset($jshrink);
|
||||||
|
|
||||||
|
return $js;
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
if (isset($jshrink)) {
|
||||||
|
// Since the breakdownScript function probably wasn't finished
|
||||||
|
// we clean it out before discarding it.
|
||||||
|
$jshrink->clean();
|
||||||
|
unset($jshrink);
|
||||||
|
}
|
||||||
|
|
||||||
|
// without this call things get weird, with partially outputted js.
|
||||||
|
ob_end_clean();
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Processes a javascript string and outputs only the required characters,
|
||||||
|
* stripping out all unneeded characters.
|
||||||
|
*
|
||||||
|
* @param string $js The raw javascript to be minified
|
||||||
|
* @param array $options Various runtime options in an associative array
|
||||||
|
*/
|
||||||
|
protected function minifyDirectToOutput($js, $options)
|
||||||
|
{
|
||||||
|
$this->initialize($js, $options);
|
||||||
|
$this->loop();
|
||||||
|
$this->clean();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes internal variables, normalizes new lines,
|
||||||
|
*
|
||||||
|
* @param string $js The raw javascript to be minified
|
||||||
|
* @param array $options Various runtime options in an associative array
|
||||||
|
*/
|
||||||
|
protected function initialize($js, $options)
|
||||||
|
{
|
||||||
|
$this->options = array_merge(static::$defaultOptions, $options);
|
||||||
|
$js = str_replace("\r\n", "\n", $js);
|
||||||
|
$js = str_replace('/**/', '', $js);
|
||||||
|
$this->input = str_replace("\r", "\n", $js);
|
||||||
|
|
||||||
|
// We add a newline to the end of the script to make it easier to deal
|
||||||
|
// with comments at the bottom of the script- this prevents the unclosed
|
||||||
|
// comment error that can otherwise occur.
|
||||||
|
$this->input .= PHP_EOL;
|
||||||
|
|
||||||
|
// Populate "a" with a new line, "b" with the first character, before
|
||||||
|
// entering the loop
|
||||||
|
$this->a = "\n";
|
||||||
|
$this->b = $this->getReal();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The primary action occurs here. This function loops through the input string,
|
||||||
|
* outputting anything that's relevant and discarding anything that is not.
|
||||||
|
*/
|
||||||
|
protected function loop()
|
||||||
|
{
|
||||||
|
while ($this->a !== false && !is_null($this->a) && $this->a !== '') {
|
||||||
|
|
||||||
|
switch ($this->a) {
|
||||||
|
// new lines
|
||||||
|
case "\n":
|
||||||
|
// if the next line is something that can't stand alone preserve the newline
|
||||||
|
if (strpos('(-+{[@', $this->b) !== false) {
|
||||||
|
echo $this->a;
|
||||||
|
$this->saveString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if B is a space we skip the rest of the switch block and go down to the
|
||||||
|
// string/regex check below, resetting $this->b with getReal
|
||||||
|
if($this->b === ' ')
|
||||||
|
break;
|
||||||
|
|
||||||
|
// otherwise we treat the newline like a space
|
||||||
|
|
||||||
|
case ' ':
|
||||||
|
if(static::isAlphaNumeric($this->b))
|
||||||
|
echo $this->a;
|
||||||
|
|
||||||
|
$this->saveString();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
switch ($this->b) {
|
||||||
|
case "\n":
|
||||||
|
if (strpos('}])+-"\'', $this->a) !== false) {
|
||||||
|
echo $this->a;
|
||||||
|
$this->saveString();
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
if (static::isAlphaNumeric($this->a)) {
|
||||||
|
echo $this->a;
|
||||||
|
$this->saveString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ' ':
|
||||||
|
if(!static::isAlphaNumeric($this->a))
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// check for some regex that breaks stuff
|
||||||
|
if ($this->a == '/' && ($this->b == '\'' || $this->b == '"')) {
|
||||||
|
$this->saveRegex();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $this->a;
|
||||||
|
$this->saveString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// do reg check of doom
|
||||||
|
$this->b = $this->getReal();
|
||||||
|
|
||||||
|
if(($this->b == '/' && strpos('(,=:[!&|?', $this->a) !== false))
|
||||||
|
$this->saveRegex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets attributes that do not need to be stored between requests so that
|
||||||
|
* the next request is ready to go. Another reason for this is to make sure
|
||||||
|
* the variables are cleared and are not taking up memory.
|
||||||
|
*/
|
||||||
|
protected function clean()
|
||||||
|
{
|
||||||
|
unset($this->input);
|
||||||
|
$this->index = 0;
|
||||||
|
$this->a = $this->b = '';
|
||||||
|
unset($this->c);
|
||||||
|
unset($this->options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the next string for processing based off of the current index.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function getChar()
|
||||||
|
{
|
||||||
|
// Check to see if we had anything in the look ahead buffer and use that.
|
||||||
|
if (isset($this->c)) {
|
||||||
|
$char = $this->c;
|
||||||
|
unset($this->c);
|
||||||
|
|
||||||
|
// Otherwise we start pulling from the input.
|
||||||
|
} else {
|
||||||
|
$char = substr($this->input, $this->index, 1);
|
||||||
|
|
||||||
|
// If the next character doesn't exist return false.
|
||||||
|
if (isset($char) && $char === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise increment the pointer and use this char.
|
||||||
|
$this->index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Normalize all whitespace except for the newline character into a
|
||||||
|
// standard space.
|
||||||
|
if($char !== "\n" && ord($char) < 32)
|
||||||
|
|
||||||
|
return ' ';
|
||||||
|
|
||||||
|
return $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function gets the next "real" character. It is essentially a wrapper
|
||||||
|
* around the getChar function that skips comments. This has significant
|
||||||
|
* performance benefits as the skipping is done using native functions (ie,
|
||||||
|
* c code) rather than in script php.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return string Next 'real' character to be processed.
|
||||||
|
* @throws \RuntimeException
|
||||||
|
*/
|
||||||
|
protected function getReal()
|
||||||
|
{
|
||||||
|
$startIndex = $this->index;
|
||||||
|
$char = $this->getChar();
|
||||||
|
|
||||||
|
// Check to see if we're potentially in a comment
|
||||||
|
if ($char !== '/') {
|
||||||
|
return $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->c = $this->getChar();
|
||||||
|
|
||||||
|
if ($this->c == '/') {
|
||||||
|
return $this->processOneLineComments($startIndex);
|
||||||
|
|
||||||
|
} elseif ($this->c == '*') {
|
||||||
|
return $this->processMultiLineComments($startIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removed one line comments, with the exception of some very specific types of
|
||||||
|
* conditional comments.
|
||||||
|
*
|
||||||
|
* @param int $startIndex The index point where "getReal" function started
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function processOneLineComments($startIndex)
|
||||||
|
{
|
||||||
|
$thirdCommentString = substr($this->input, $this->index, 1);
|
||||||
|
|
||||||
|
// kill rest of line
|
||||||
|
$this->getNext("\n");
|
||||||
|
|
||||||
|
if ($thirdCommentString == '@') {
|
||||||
|
$endPoint = ($this->index) - $startIndex;
|
||||||
|
unset($this->c);
|
||||||
|
$char = "\n" . substr($this->input, $startIndex, $endPoint);
|
||||||
|
} else {
|
||||||
|
// first one is contents of $this->c
|
||||||
|
$this->getChar();
|
||||||
|
$char = $this->getChar();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skips multiline comments where appropriate, and includes them where needed.
|
||||||
|
* Conditional comments and "license" style blocks are preserved.
|
||||||
|
*
|
||||||
|
* @param int $startIndex The index point where "getReal" function started
|
||||||
|
* @return bool|string False if there's no character
|
||||||
|
* @throws \RuntimeException Unclosed comments will throw an error
|
||||||
|
*/
|
||||||
|
protected function processMultiLineComments($startIndex)
|
||||||
|
{
|
||||||
|
$this->getChar(); // current C
|
||||||
|
$thirdCommentString = $this->getChar();
|
||||||
|
|
||||||
|
// kill everything up to the next */ if it's there
|
||||||
|
if ($this->getNext('*/')) {
|
||||||
|
|
||||||
|
$this->getChar(); // get *
|
||||||
|
$this->getChar(); // get /
|
||||||
|
$char = $this->getChar(); // get next real character
|
||||||
|
|
||||||
|
// Now we reinsert conditional comments and YUI-style licensing comments
|
||||||
|
if (($this->options['flaggedComments'] && $thirdCommentString == '!')
|
||||||
|
|| ($thirdCommentString == '@') ) {
|
||||||
|
|
||||||
|
// If conditional comments or flagged comments are not the first thing in the script
|
||||||
|
// we need to echo a and fill it with a space before moving on.
|
||||||
|
if ($startIndex > 0) {
|
||||||
|
echo $this->a;
|
||||||
|
$this->a = " ";
|
||||||
|
|
||||||
|
// If the comment started on a new line we let it stay on the new line
|
||||||
|
if ($this->input[($startIndex - 1)] == "\n") {
|
||||||
|
echo "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$endPoint = ($this->index - 1) - $startIndex;
|
||||||
|
echo substr($this->input, $startIndex, $endPoint);
|
||||||
|
|
||||||
|
return $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$char = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($char === false)
|
||||||
|
throw new \RuntimeException('Unclosed multiline comment at position: ' . ($this->index - 2));
|
||||||
|
|
||||||
|
// if we're here c is part of the comment and therefore tossed
|
||||||
|
if(isset($this->c))
|
||||||
|
unset($this->c);
|
||||||
|
|
||||||
|
return $char;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pushes the index ahead to the next instance of the supplied string. If it
|
||||||
|
* is found the first character of the string is returned and the index is set
|
||||||
|
* to it's position.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
* @return string|false Returns the first character of the string or false.
|
||||||
|
*/
|
||||||
|
protected function getNext($string)
|
||||||
|
{
|
||||||
|
// Find the next occurrence of "string" after the current position.
|
||||||
|
$pos = strpos($this->input, $string, $this->index);
|
||||||
|
|
||||||
|
// If it's not there return false.
|
||||||
|
if($pos === false)
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Adjust position of index to jump ahead to the asked for string
|
||||||
|
$this->index = $pos;
|
||||||
|
|
||||||
|
// Return the first character of that string.
|
||||||
|
return substr($this->input, $this->index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When a javascript string is detected this function crawls for the end of
|
||||||
|
* it and saves the whole string.
|
||||||
|
*
|
||||||
|
* @throws \RuntimeException Unclosed strings will throw an error
|
||||||
|
*/
|
||||||
|
protected function saveString()
|
||||||
|
{
|
||||||
|
$startpos = $this->index;
|
||||||
|
|
||||||
|
// saveString is always called after a gets cleared, so we push b into
|
||||||
|
// that spot.
|
||||||
|
$this->a = $this->b;
|
||||||
|
|
||||||
|
// If this isn't a string we don't need to do anything.
|
||||||
|
if ($this->a != "'" && $this->a != '"') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// String type is the quote used, " or '
|
||||||
|
$stringType = $this->a;
|
||||||
|
|
||||||
|
// Echo out that starting quote
|
||||||
|
echo $this->a;
|
||||||
|
|
||||||
|
// Loop until the string is done
|
||||||
|
while (1) {
|
||||||
|
|
||||||
|
// Grab the very next character and load it into a
|
||||||
|
$this->a = $this->getChar();
|
||||||
|
|
||||||
|
switch ($this->a) {
|
||||||
|
|
||||||
|
// If the string opener (single or double quote) is used
|
||||||
|
// output it and break out of the while loop-
|
||||||
|
// The string is finished!
|
||||||
|
case $stringType:
|
||||||
|
break 2;
|
||||||
|
|
||||||
|
// New lines in strings without line delimiters are bad- actual
|
||||||
|
// new lines will be represented by the string \n and not the actual
|
||||||
|
// character, so those will be treated just fine using the switch
|
||||||
|
// block below.
|
||||||
|
case "\n":
|
||||||
|
throw new \RuntimeException('Unclosed string at position: ' . $startpos );
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Escaped characters get picked up here. If it's an escaped new line it's not really needed
|
||||||
|
case '\\':
|
||||||
|
|
||||||
|
// a is a slash. We want to keep it, and the next character,
|
||||||
|
// unless it's a new line. New lines as actual strings will be
|
||||||
|
// preserved, but escaped new lines should be reduced.
|
||||||
|
$this->b = $this->getChar();
|
||||||
|
|
||||||
|
// If b is a new line we discard a and b and restart the loop.
|
||||||
|
if ($this->b == "\n") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// echo out the escaped character and restart the loop.
|
||||||
|
echo $this->a . $this->b;
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
// Since we're not dealing with any special cases we simply
|
||||||
|
// output the character and continue our loop.
|
||||||
|
default:
|
||||||
|
echo $this->a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When a regular expression is detected this function crawls for the end of
|
||||||
|
* it and saves the whole regex.
|
||||||
|
*
|
||||||
|
* @throws \RuntimeException Unclosed regex will throw an error
|
||||||
|
*/
|
||||||
|
protected function saveRegex()
|
||||||
|
{
|
||||||
|
echo $this->a . $this->b;
|
||||||
|
|
||||||
|
while (($this->a = $this->getChar()) !== false) {
|
||||||
|
if($this->a == '/')
|
||||||
|
break;
|
||||||
|
|
||||||
|
if ($this->a == '\\') {
|
||||||
|
echo $this->a;
|
||||||
|
$this->a = $this->getChar();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->a == "\n")
|
||||||
|
throw new \RuntimeException('Unclosed regex pattern at position: ' . $this->index);
|
||||||
|
|
||||||
|
echo $this->a;
|
||||||
|
}
|
||||||
|
$this->b = $this->getReal();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks to see if a character is alphanumeric.
|
||||||
|
*
|
||||||
|
* @param string $char Just one character
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected static function isAlphaNumeric($char)
|
||||||
|
{
|
||||||
|
return preg_match('/^[\w\$]$/', $char) === 1 || $char == '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace patterns in the given string and store the replacement
|
||||||
|
*
|
||||||
|
* @param string $js The string to lock
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function lock($js)
|
||||||
|
{
|
||||||
|
/* lock things like <code>"asd" + ++x;</code> */
|
||||||
|
$lock = '"LOCK---' . crc32(time()) . '"';
|
||||||
|
|
||||||
|
$matches = array();
|
||||||
|
preg_match('/([+-])(\s+)([+-])/', $js, $matches);
|
||||||
|
if (empty($matches)) {
|
||||||
|
return $js;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->locks[$lock] = $matches[2];
|
||||||
|
|
||||||
|
$js = preg_replace('/([+-])\s+([+-])/', "$1{$lock}$2", $js);
|
||||||
|
/* -- */
|
||||||
|
|
||||||
|
return $js;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace "locks" with the original characters
|
||||||
|
*
|
||||||
|
* @param string $js The string to unlock
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function unlock($js)
|
||||||
|
{
|
||||||
|
if (!count($this->locks)) {
|
||||||
|
return $js;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->locks as $lock => $replacement) {
|
||||||
|
$js = str_replace($lock, $replacement, $js);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $js;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
250
deployed/helix3/plugins/system/helix3/core/classes/cssmin.php
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Class CSSMinify
|
||||||
|
* @package Minify
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compress CSS
|
||||||
|
*
|
||||||
|
* This is a heavy regex-based removal of whitespace, unnecessary
|
||||||
|
* comments and tokens, and some CSS value minimization, where practical.
|
||||||
|
* Many steps have been taken to avoid breaking comment-based hacks,
|
||||||
|
* including the ie5/mac filter (and its inversion), but expect tricky
|
||||||
|
* hacks involving comment tokens in 'content' value strings to break
|
||||||
|
* minimization badly. A test suite is available.
|
||||||
|
*
|
||||||
|
* @package Minify
|
||||||
|
* @author Stephen Clay <steve@mrclay.org>
|
||||||
|
* @author http://code.google.com/u/1stvamp/ (Issue 64 patch)
|
||||||
|
*/
|
||||||
|
class CSSMinify {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minify a CSS string
|
||||||
|
*
|
||||||
|
* @param string $css
|
||||||
|
*
|
||||||
|
* @param array $options (currently ignored)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function process($css, $options = array())
|
||||||
|
{
|
||||||
|
$obj = new CSSMinify($options);
|
||||||
|
return $obj->_process($css);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array options
|
||||||
|
*/
|
||||||
|
protected $_options = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool Are we "in" a hack?
|
||||||
|
*
|
||||||
|
* I.e. are some browsers targetted until the next comment?
|
||||||
|
*/
|
||||||
|
protected $_inHack = false;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param array $options (currently ignored)
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
private function __construct($options) {
|
||||||
|
$this->_options = $options;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minify a CSS string
|
||||||
|
*
|
||||||
|
* @param string $css
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function _process($css)
|
||||||
|
{
|
||||||
|
$css = str_replace("\r\n", "\n", $css);
|
||||||
|
|
||||||
|
// preserve empty comment after '>'
|
||||||
|
// http://www.webdevout.net/css-hacks#in_css-selectors
|
||||||
|
$css = preg_replace('@>/\\*\\s*\\*/@', '>/*keep*/', $css);
|
||||||
|
|
||||||
|
// preserve empty comment between property and value
|
||||||
|
// http://css-discuss.incutio.com/?page=BoxModelHack
|
||||||
|
$css = preg_replace('@/\\*\\s*\\*/\\s*:@', '/*keep*/:', $css);
|
||||||
|
$css = preg_replace('@:\\s*/\\*\\s*\\*/@', ':/*keep*/', $css);
|
||||||
|
|
||||||
|
// apply callback to all valid comments (and strip out surrounding ws
|
||||||
|
$css = preg_replace_callback('@\\s*/\\*([\\s\\S]*?)\\*/\\s*@'
|
||||||
|
,array($this, '_commentCB'), $css);
|
||||||
|
|
||||||
|
// remove ws around { } and last semicolon in declaration block
|
||||||
|
$css = preg_replace('/\\s*{\\s*/', '{', $css);
|
||||||
|
$css = preg_replace('/;?\\s*}\\s*/', '}', $css);
|
||||||
|
|
||||||
|
// remove ws surrounding semicolons
|
||||||
|
$css = preg_replace('/\\s*;\\s*/', ';', $css);
|
||||||
|
|
||||||
|
// remove ws around urls
|
||||||
|
$css = preg_replace('/
|
||||||
|
url\\( # url(
|
||||||
|
\\s*
|
||||||
|
([^\\)]+?) # 1 = the URL (really just a bunch of non right parenthesis)
|
||||||
|
\\s*
|
||||||
|
\\) # )
|
||||||
|
/x', 'url($1)', $css);
|
||||||
|
|
||||||
|
// remove ws between rules and colons
|
||||||
|
$css = preg_replace('/
|
||||||
|
\\s*
|
||||||
|
([{;]) # 1 = beginning of block or rule separator
|
||||||
|
\\s*
|
||||||
|
([\\*_]?[\\w\\-]+) # 2 = property (and maybe IE filter)
|
||||||
|
\\s*
|
||||||
|
:
|
||||||
|
\\s*
|
||||||
|
(\\b|[#\'"]) # 3 = first character of a value
|
||||||
|
/x', '$1$2:$3', $css);
|
||||||
|
|
||||||
|
// remove ws in selectors
|
||||||
|
$css = preg_replace_callback('/
|
||||||
|
(?: # non-capture
|
||||||
|
\\s*
|
||||||
|
[^~>+,\\s]+ # selector part
|
||||||
|
\\s*
|
||||||
|
[,>+~] # combinators
|
||||||
|
)+
|
||||||
|
\\s*
|
||||||
|
[^~>+,\\s]+ # selector part
|
||||||
|
{ # open declaration block
|
||||||
|
/x'
|
||||||
|
,array($this, '_selectorsCB'), $css);
|
||||||
|
|
||||||
|
// minimize hex colors
|
||||||
|
$css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i'
|
||||||
|
, '$1#$2$3$4$5', $css);
|
||||||
|
|
||||||
|
// remove spaces between font families
|
||||||
|
$css = preg_replace_callback('/font-family:([^;}]+)([;}])/'
|
||||||
|
,array($this, '_fontFamilyCB'), $css);
|
||||||
|
|
||||||
|
$css = preg_replace('/@import\\s+url/', '@import url', $css);
|
||||||
|
|
||||||
|
// replace any ws involving newlines with a single newline
|
||||||
|
$css = preg_replace('/[ \\t]*\\n+\\s*/', "\n", $css);
|
||||||
|
|
||||||
|
// separate common descendent selectors w/ newlines (to limit line lengths)
|
||||||
|
$css = preg_replace('/([\\w#\\.\\*]+)\\s+([\\w#\\.\\*]+){/', "$1\n$2{", $css);
|
||||||
|
|
||||||
|
// Use newline after 1st numeric value (to limit line lengths).
|
||||||
|
$css = preg_replace('/
|
||||||
|
((?:padding|margin|border|outline):\\d+(?:px|em)?) # 1 = prop : 1st numeric value
|
||||||
|
\\s+
|
||||||
|
/x'
|
||||||
|
,"$1\n", $css);
|
||||||
|
|
||||||
|
// prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/
|
||||||
|
$css = preg_replace('/:first-l(etter|ine)\\{/', ':first-l$1 {', $css);
|
||||||
|
|
||||||
|
return trim($css);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace what looks like a set of selectors
|
||||||
|
*
|
||||||
|
* @param array $m regex matches
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function _selectorsCB($m)
|
||||||
|
{
|
||||||
|
// remove ws around the combinators
|
||||||
|
return preg_replace('/\\s*([,>+~])\\s*/', '$1', $m[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process a comment and return a replacement
|
||||||
|
*
|
||||||
|
* @param array $m regex matches
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function _commentCB($m)
|
||||||
|
{
|
||||||
|
$hasSurroundingWs = (trim($m[0]) !== $m[1]);
|
||||||
|
$m = $m[1];
|
||||||
|
// $m is the comment content w/o the surrounding tokens,
|
||||||
|
// but the return value will replace the entire comment.
|
||||||
|
if ($m === 'keep') {
|
||||||
|
return '/**/';
|
||||||
|
}
|
||||||
|
if ($m === '" "') {
|
||||||
|
// component of http://tantek.com/CSS/Examples/midpass.html
|
||||||
|
return '/*" "*/';
|
||||||
|
}
|
||||||
|
if (preg_match('@";\\}\\s*\\}/\\*\\s+@', $m)) {
|
||||||
|
// component of http://tantek.com/CSS/Examples/midpass.html
|
||||||
|
return '/*";}}/* */';
|
||||||
|
}
|
||||||
|
if ($this->_inHack) {
|
||||||
|
// inversion: feeding only to one browser
|
||||||
|
if (preg_match('@
|
||||||
|
^/ # comment started like /*/
|
||||||
|
\\s*
|
||||||
|
(\\S[\\s\\S]+?) # has at least some non-ws content
|
||||||
|
\\s*
|
||||||
|
/\\* # ends like /*/ or /**/
|
||||||
|
@x', $m, $n)) {
|
||||||
|
// end hack mode after this comment, but preserve the hack and comment content
|
||||||
|
$this->_inHack = false;
|
||||||
|
return "/*/{$n[1]}/**/";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (substr($m, -1) === '\\') { // comment ends like \*/
|
||||||
|
// begin hack mode and preserve hack
|
||||||
|
$this->_inHack = true;
|
||||||
|
return '/*\\*/';
|
||||||
|
}
|
||||||
|
if ($m !== '' && $m[0] === '/') { // comment looks like /*/ foo */
|
||||||
|
// begin hack mode and preserve hack
|
||||||
|
$this->_inHack = true;
|
||||||
|
return '/*/*/';
|
||||||
|
}
|
||||||
|
if ($this->_inHack) {
|
||||||
|
// a regular comment ends hack mode but should be preserved
|
||||||
|
$this->_inHack = false;
|
||||||
|
return '/**/';
|
||||||
|
}
|
||||||
|
// Issue 107: if there's any surrounding whitespace, it may be important, so
|
||||||
|
// replace the comment with a single space
|
||||||
|
return $hasSurroundingWs // remove all other comments
|
||||||
|
? ' '
|
||||||
|
: '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process a font-family listing and return a replacement
|
||||||
|
*
|
||||||
|
* @param array $m regex matches
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function _fontFamilyCB($m)
|
||||||
|
{
|
||||||
|
$m[1] = preg_replace('/
|
||||||
|
\\s*
|
||||||
|
(
|
||||||
|
"[^"]+" # 1 = family in double qutoes
|
||||||
|
|\'[^\']+\' # or 1 = family in single quotes
|
||||||
|
|[\\w\\-]+ # or 1 = unquoted family
|
||||||
|
)
|
||||||
|
\\s*
|
||||||
|
/x', '$1', $m[1]);
|
||||||
|
return 'font-family:' . $m[1] . $m[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
3673
deployed/helix3/plugins/system/helix3/core/classes/lessc.inc.php
Normal file
536
deployed/helix3/plugins/system/helix3/core/classes/menu.php
Normal file
@ -0,0 +1,536 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2018 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class Helix3Menu {
|
||||||
|
|
||||||
|
protected $_items = array();
|
||||||
|
protected $active = 0;
|
||||||
|
protected $active_tree = array();
|
||||||
|
protected $menu = '';
|
||||||
|
public $_params = null;
|
||||||
|
public $menuname = 'mainmenu';
|
||||||
|
|
||||||
|
function __construct($class = '', $name = ''){
|
||||||
|
$this->app = JFactory::getApplication();
|
||||||
|
$this->template = $this->app->getTemplate(true);
|
||||||
|
$this->_params = $this->template->params;
|
||||||
|
$this->extraclass = $class;
|
||||||
|
if($name) {
|
||||||
|
$this->menuname = $name;
|
||||||
|
} else {
|
||||||
|
$this->menuname = $this->_params->get('menu');
|
||||||
|
}
|
||||||
|
$this->initMenu();
|
||||||
|
$this->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initMenu(){
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
$menu = $app->getMenu('site');
|
||||||
|
|
||||||
|
$attributes = array('menutype');
|
||||||
|
$menu_name = array($this->menuname);
|
||||||
|
|
||||||
|
$items = $menu->getItems($attributes, $menu_name);
|
||||||
|
$active_item = ($menu->getActive()) ? $menu->getActive() : $menu->getDefault();
|
||||||
|
|
||||||
|
$this->active = $active_item ? $active_item->id : 0;
|
||||||
|
$this->active_tree = $active_item->tree;
|
||||||
|
|
||||||
|
foreach ( $items as &$item ) {
|
||||||
|
if($item->level >= 2 && !isset($this->_items[$item->parent_id])){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$parent = isset($this->children[$item->parent_id]) ? $this->children[$item->parent_id] : array();
|
||||||
|
$parent[] = $item;
|
||||||
|
$this->children[$item->parent_id] = $parent;
|
||||||
|
$this->_items[$item->id] = $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($items as &$item) {
|
||||||
|
|
||||||
|
$class = '';
|
||||||
|
if ($item->id == $this->active) {
|
||||||
|
$class .= ' current-item';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_array($item->id, $this->active_tree)) {
|
||||||
|
$class .= ' active';
|
||||||
|
}elseif ($item->type == 'alias') {
|
||||||
|
$aliasToId = $item->params->get('aliasoptions');
|
||||||
|
if (count($this->active_tree) > 0 && $aliasToId == $this->active_tree[count($this->active_tree) - 1]) {
|
||||||
|
$class .= ' active';
|
||||||
|
} elseif (in_array($aliasToId, $this->active_tree)) {
|
||||||
|
$class .= ' alias-parent-active';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$item->class = $class;
|
||||||
|
$item->dropdown =0;
|
||||||
|
if (isset($this->children[$item->id])) {
|
||||||
|
$item->dropdown = 1;
|
||||||
|
}
|
||||||
|
$item->megamenu = ($item->params->get('megamenu')) ? $item->params->get('megamenu') : 0;
|
||||||
|
$item->flink = $item->link;
|
||||||
|
|
||||||
|
switch ($item->type) {
|
||||||
|
case 'separator':
|
||||||
|
case 'heading':
|
||||||
|
// No further action needed.
|
||||||
|
continue;
|
||||||
|
|
||||||
|
case 'url':
|
||||||
|
if ((strpos($item->link, 'index.php?') === 0) && (strpos($item->link, 'Itemid=') === false)) {
|
||||||
|
$item->flink = $item->link . '&Itemid=' . $item->id;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'alias':
|
||||||
|
$item->flink = 'index.php?Itemid=' . $item->params->get('aliasoptions');
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$router = JSite::getRouter();
|
||||||
|
if ($router->getMode() == JROUTER_MODE_SEF) {
|
||||||
|
$item->flink = 'index.php?Itemid=' . $item->id;
|
||||||
|
} else {
|
||||||
|
$item->flink .= '&Itemid=' . $item->id;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcasecmp(substr($item->flink, 0, 4), 'http') && (strpos($item->flink, 'index.php?') !== false)) {
|
||||||
|
$item->flink = JRoute::_($item->flink, true, $item->params->get('secure'));
|
||||||
|
} else {
|
||||||
|
$item->flink = JRoute::_($item->flink);
|
||||||
|
}
|
||||||
|
|
||||||
|
// We prevent the double encoding because for some reason the $item is shared for menu modules and we get double encoding
|
||||||
|
// when the cause of that is found the argument should be removed
|
||||||
|
$item->title = htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8', false);
|
||||||
|
$item->anchor_css = htmlspecialchars($item->params->get('menu-anchor_css', ''), ENT_COMPAT, 'UTF-8', false);
|
||||||
|
$item->anchor_title = htmlspecialchars($item->params->get('menu-anchor_title', ''), ENT_COMPAT, 'UTF-8', false);
|
||||||
|
$item->menu_image = $item->params->get('menu_image', '') ? htmlspecialchars($item->params->get('menu_image', ''), ENT_COMPAT, 'UTF-8', false) : '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
$this->menu = '';
|
||||||
|
$keys = array_keys($this->_items);
|
||||||
|
|
||||||
|
if (count($keys)) {
|
||||||
|
$this->navigation(null,$keys[0]);
|
||||||
|
}
|
||||||
|
echo $this->menu;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function navigation($pitem, $start = 0, $end = 0, $class = '')
|
||||||
|
{
|
||||||
|
if ( $start > 0 ) {
|
||||||
|
if (!isset($this->_items[$start]))
|
||||||
|
return;
|
||||||
|
$pid = $this->_items[$start]->parent_id;
|
||||||
|
$items = array();
|
||||||
|
$started = false;
|
||||||
|
|
||||||
|
foreach ($this->children[$pid] as $item) {
|
||||||
|
if ($started) {
|
||||||
|
if ($item->id == $end)
|
||||||
|
break;
|
||||||
|
$items[] = $item;
|
||||||
|
} else {
|
||||||
|
if ($item->id == $start) {
|
||||||
|
$started = true;
|
||||||
|
$items[] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!count($items))
|
||||||
|
return;
|
||||||
|
}else if( $start === 0 ){
|
||||||
|
$pid = $pitem->id;
|
||||||
|
if (!isset($this->children[$pid]))
|
||||||
|
return;
|
||||||
|
$items = $this->children[$pid];
|
||||||
|
}else{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Parent class
|
||||||
|
if($pid==1) {
|
||||||
|
|
||||||
|
if($this->_params->get('menu_animation') != 'none') {
|
||||||
|
$animation = ' ' . $this->_params->get('menu_animation');
|
||||||
|
} else {
|
||||||
|
$animation = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$class = 'sp-megamenu-parent' . $animation;
|
||||||
|
|
||||||
|
if($this->extraclass) $class = $class . ' ' . $this->extraclass;
|
||||||
|
|
||||||
|
$this->menu .= $this->start_lvl($class);
|
||||||
|
} else {
|
||||||
|
$this->menu .= $this->start_lvl($class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($items as $item) {
|
||||||
|
$this->getItem($item);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .= $this->end_lvl();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getItem($item) {
|
||||||
|
|
||||||
|
$this->menu .= $this->start_el(array('item' => $item));
|
||||||
|
$this->menu .= $this->item($item); // get item url
|
||||||
|
|
||||||
|
if ( $item->megamenu ) {
|
||||||
|
$this->mega($item);
|
||||||
|
} else if ( $item->dropdown ) {
|
||||||
|
$this->dropdown( $item );
|
||||||
|
}
|
||||||
|
else if ( ( $item->parent_id == 1 ) && ($item->megamenu == 0 ))
|
||||||
|
{
|
||||||
|
$menulayout = json_decode($this->_items[$item->id]->params->get('menulayout'));
|
||||||
|
|
||||||
|
if ($menulayout) {
|
||||||
|
$layout = $menulayout->layout;
|
||||||
|
$attr = $layout[0]->attr;
|
||||||
|
|
||||||
|
if ( $attr[0]->moduleId !== '' ) {
|
||||||
|
$this->mega($item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .= $this->end_el();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function dropdown($item) {
|
||||||
|
$items = isset($this->children[$item->id]) ? $this->children[$item->id] : array();
|
||||||
|
$firstitem = count($items) ? $items[0]->id : 0;
|
||||||
|
|
||||||
|
//Dropdown
|
||||||
|
$class = ($item->level==1) ? 'sp-dropdown sp-dropdown-main' : 'sp-dropdown sp-dropdown-sub';
|
||||||
|
|
||||||
|
$dropdown_width = $this->_params->get('dropdown_width');
|
||||||
|
|
||||||
|
if(!$dropdown_width) {
|
||||||
|
$dropdown_width = 240;
|
||||||
|
}
|
||||||
|
|
||||||
|
$dropdown_style = 'width: '. $dropdown_width .'px;';
|
||||||
|
|
||||||
|
$layout = json_decode($this->_items[$item->id]->params->get('menulayout'));
|
||||||
|
$sub_alignment = $this->_items[$item->id]->params->get('dropdown_position', 'right');
|
||||||
|
|
||||||
|
if(isset($layout->menuAlign) && $layout->menuAlign) {
|
||||||
|
$alignment = $layout->menuAlign;
|
||||||
|
} else {
|
||||||
|
$alignment = 'right';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($alignment=='center') {
|
||||||
|
$dropdown_style .= 'left: -'. ($dropdown_width/2) .'px;';
|
||||||
|
} else if( $sub_alignment == 'left' ) {
|
||||||
|
$dropdown_style .= 'left: -'. $dropdown_width .'px;';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .= '<div class="' . $class . ' sp-menu-'. $alignment .'" style="' . $dropdown_style . '">';
|
||||||
|
$this->menu .= '<div class="sp-dropdown-inner">';
|
||||||
|
$this->navigation($item, $firstitem, 0, 'sp-dropdown-items');
|
||||||
|
|
||||||
|
$mega_json = $item->params->get('menulayout');
|
||||||
|
if ($mega_json)
|
||||||
|
{
|
||||||
|
$mega = json_decode($mega_json);
|
||||||
|
$layout = $mega->layout;
|
||||||
|
|
||||||
|
$layout = $layout[0];
|
||||||
|
$col = $layout->attr[0];
|
||||||
|
$mod_ids = ($col->moduleId)? explode(',', $col->moduleId):array();
|
||||||
|
|
||||||
|
if (count($mod_ids))
|
||||||
|
{
|
||||||
|
foreach ($mod_ids as $mod_id)
|
||||||
|
{
|
||||||
|
$this->menu .= $this->load_module($mod_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .= '</div>';
|
||||||
|
$this->menu .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function mega($item)
|
||||||
|
{
|
||||||
|
$items = isset($this->children[$item->id]) ? $this->children[$item->id] : array();
|
||||||
|
$firstitem = count($items) ? $items[0]->id : 0;
|
||||||
|
|
||||||
|
$mega_json = $item->params->get('menulayout');
|
||||||
|
$mega = json_decode($mega_json);
|
||||||
|
$layout = $mega->layout;
|
||||||
|
|
||||||
|
$mega_style = 'width: '. $mega->width .'px;';
|
||||||
|
|
||||||
|
if($mega->menuAlign=='center') {
|
||||||
|
$mega_style .= 'left: -' . ($mega->width/2) . 'px;';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($mega->menuAlign=='full') {
|
||||||
|
$mega_style = '';
|
||||||
|
$mega->menuAlign = $mega->menuAlign . ' container';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .='<div class="sp-dropdown sp-dropdown-main sp-dropdown-mega sp-menu-'. $mega->menuAlign .'" style="' . $mega_style . '">';
|
||||||
|
$this->menu .='<div class="sp-dropdown-inner">';
|
||||||
|
foreach ($layout as $row)
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->menu .='<div class="row">';
|
||||||
|
foreach ($row->attr as $col)
|
||||||
|
{
|
||||||
|
$this->menu .='<div class="col-sm-'.$col->colGrid.'">';
|
||||||
|
|
||||||
|
if (count($items))
|
||||||
|
{
|
||||||
|
$item_ids = ($col->menuParentId)? explode(',', $col->menuParentId):array();
|
||||||
|
|
||||||
|
if (count($item_ids))
|
||||||
|
{
|
||||||
|
$this->menu .= $this->start_lvl('sp-mega-group');
|
||||||
|
|
||||||
|
foreach ($item_ids as $item_id)
|
||||||
|
{
|
||||||
|
if (!empty($this->_items[$item_id]))
|
||||||
|
{
|
||||||
|
$item = $this->_items[$item_id];
|
||||||
|
$items = isset($this->children[$item_id]) ? $this->children[$item_id] : array();
|
||||||
|
|
||||||
|
$firstitem = count($items) ? $items[0]->id : 0;
|
||||||
|
|
||||||
|
$this->menu .= $this->start_el(array('item' => $item));
|
||||||
|
|
||||||
|
//Mega Group Title
|
||||||
|
if(isset($this->children[$item_id])) {
|
||||||
|
$this->menu .= $this->item($item, 'sp-group-title');
|
||||||
|
} else {
|
||||||
|
$this->menu .= $this->item($item);
|
||||||
|
}
|
||||||
|
if ($firstitem) {
|
||||||
|
$this->navigation(null, $firstitem, 0, 'sp-mega-group-child sp-dropdown-items');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .= $this->end_el();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .= $this->end_lvl();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$mod_ids = ($col->moduleId)? explode(',', $col->moduleId):array();
|
||||||
|
|
||||||
|
if (count($mod_ids))
|
||||||
|
{
|
||||||
|
foreach ($mod_ids as $mod_id)
|
||||||
|
{
|
||||||
|
$this->menu .= $this->load_module($mod_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .='</div>';
|
||||||
|
}
|
||||||
|
$this->menu .='</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->menu .='</div>';
|
||||||
|
$this->menu .='</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function start_lvl($cls = '')
|
||||||
|
{
|
||||||
|
$class = trim($cls);
|
||||||
|
return '<ul class="'.$class.'">';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function end_lvl(){
|
||||||
|
|
||||||
|
return '</ul>';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function start_el( $args = array() )
|
||||||
|
{
|
||||||
|
$item = $args['item'];
|
||||||
|
$class = 'sp-menu-item';
|
||||||
|
|
||||||
|
if( !empty( $this->children[$item->id] ) ) {
|
||||||
|
$class .= ' sp-has-child';
|
||||||
|
} else if( isset( $item->megamenu ) && ( $item->megamenu ) ) {
|
||||||
|
$class .= ' sp-has-child';
|
||||||
|
}
|
||||||
|
else if ( ( $item->parent_id == 1 ) && ( $item->megamenu == 0 ) )
|
||||||
|
{
|
||||||
|
$menulayout = json_decode( $this->_items[$item->id]->params->get('menulayout') );
|
||||||
|
|
||||||
|
if ( $menulayout ) {
|
||||||
|
$layout = $menulayout->layout;
|
||||||
|
$attr = $layout[0]->attr;
|
||||||
|
|
||||||
|
if ( $attr[0]->moduleId !== '' ) {
|
||||||
|
$class .= ' sp-has-child';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( $custom_class = $item->params->get( 'class' ) ) {
|
||||||
|
$class .= ' ' . $custom_class;
|
||||||
|
}
|
||||||
|
|
||||||
|
$class .= $item->class;
|
||||||
|
|
||||||
|
return '<li class="'.$class.'">';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function end_el(){
|
||||||
|
return '</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
private function item($item, $extra_class=''){
|
||||||
|
$class = $extra_class;
|
||||||
|
$title = $item->anchor_title ? 'title="' . $item->anchor_title . '" ' : '';
|
||||||
|
|
||||||
|
$class .= ($item->anchor_css && $class) ? ' ' . $item->anchor_css : $item->anchor_css;
|
||||||
|
$class = ($class) ? 'class="' . $class . '"' : '';
|
||||||
|
|
||||||
|
if ($item->menu_image)
|
||||||
|
{
|
||||||
|
$item->params->get('menu_text', 1) ?
|
||||||
|
$linktitle = '<img src="' . $item->menu_image . '" alt="' . $item->title . '" /><span class="image-title">' . $item->title . '</span> ' :
|
||||||
|
$linktitle = '<img src="' . $item->menu_image . '" alt="' . $item->title . '" />';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$linktitle = $item->title;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Hide Link Title
|
||||||
|
if(!$showmenutitle = $item->params->get('showmenutitle', 1)) {
|
||||||
|
$linktitle = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Add Menu Icon
|
||||||
|
if($icon = $item->params->get('icon')) {
|
||||||
|
if($showmenutitle) {
|
||||||
|
$linktitle = '<i class="fa ' . $icon . '"></i> ' . $linktitle;
|
||||||
|
} else {
|
||||||
|
$linktitle = '<i class="fa ' . $icon . '"></i>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$flink = $item->flink;
|
||||||
|
$flink = str_replace('&', '&', JFilterOutput::ampReplace(htmlspecialchars($flink)));
|
||||||
|
|
||||||
|
$output = '';
|
||||||
|
$options ='';
|
||||||
|
if ($item->params->get('menu_show', 1) != 0) {
|
||||||
|
switch ($item->browserNav) {
|
||||||
|
default:
|
||||||
|
case 0:
|
||||||
|
$link_rel = ($item->params->get('menu-anchor_rel', '')) ? 'rel="' . $item->params->get('menu-anchor_rel') . '"' : '' ;
|
||||||
|
$flink = ($flink) ? $flink : 'javascript:void(0);' ;
|
||||||
|
$output .= '<a '.$class.' href="'. $flink .'" '. $link_rel .' '.$title.'>'.$linktitle.'</a>';
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$link_rel = ($item->params->get('menu-anchor_rel', '') == 'nofollow') ? 'noopener noreferrer nofollow' : 'noopener noreferrer';
|
||||||
|
$output .= '<a '. $class .' href="'. $flink .'" rel="'. $link_rel .'" target="_blank" '. $title .'>'. $linktitle .'</a>';
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$options .= 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,' . $item->params->get('window_open');
|
||||||
|
$output .= '<a '. $class .' href="'. $flink .'" onclick="window.open(this.href,\'targetWindow\',\''. $options. '\');return false;" '. $title .'>'. $linktitle .'</a>';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Load Module by id or position
|
||||||
|
private function load_module($mod)
|
||||||
|
{
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
$user = JFactory::getUser();
|
||||||
|
$groups = implode(',', $user->getAuthorisedViewLevels());
|
||||||
|
$lang = JFactory::getLanguage()->getTag();
|
||||||
|
$clientId = (int) $app->getClientId();
|
||||||
|
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select('id, title, module, position, content, showtitle, params');
|
||||||
|
$query->from('#__modules AS m');
|
||||||
|
$query->where('m.published = 1');
|
||||||
|
|
||||||
|
if (is_numeric($mod)) {
|
||||||
|
$query->where('m.id = ' . $mod);
|
||||||
|
} else {
|
||||||
|
$query->where('m.position = "' . $mod . '"');
|
||||||
|
}
|
||||||
|
|
||||||
|
$date = JFactory::getDate();
|
||||||
|
$now = $date->toSql();
|
||||||
|
$nullDate = $db->getNullDate();
|
||||||
|
$query->where('(m.publish_up = '.$db->Quote($nullDate).' OR m.publish_up <= '.$db->Quote($now).')');
|
||||||
|
$query->where('(m.publish_down = '.$db->Quote($nullDate).' OR m.publish_down >= '.$db->Quote($now).')');
|
||||||
|
|
||||||
|
$query->where('m.access IN ('.$groups.')');
|
||||||
|
$query->where('m.client_id = '. $clientId);
|
||||||
|
|
||||||
|
// Filter by language
|
||||||
|
if ($app->isSite() && $app->getLanguageFilter()) {
|
||||||
|
$query->where('m.language IN (' . $db->Quote($lang) . ',' . $db->Quote('*') . ')');
|
||||||
|
}
|
||||||
|
|
||||||
|
$query->order('position, ordering');
|
||||||
|
|
||||||
|
// Set the query
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
$modules = $db->loadObjectList();
|
||||||
|
|
||||||
|
if (!$modules) return null;
|
||||||
|
|
||||||
|
$options = array('style' => 'sp_xhtml');
|
||||||
|
$output = '';
|
||||||
|
ob_start();
|
||||||
|
foreach ($modules as $module) {
|
||||||
|
$file = $module->module;
|
||||||
|
$custom = substr($file, 0, 4) == 'mod_' ? 0 : 1;
|
||||||
|
$module->user = $custom;
|
||||||
|
$module->name = $custom ? $module->title : substr($file, 4);
|
||||||
|
$module->style = null;
|
||||||
|
$module->position = strtolower($module->position);
|
||||||
|
$clean[$module->id] = $module;
|
||||||
|
echo JModuleHelper::renderModule($module, $options);
|
||||||
|
}
|
||||||
|
$output = ob_get_clean();
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
}
|
||||||
1167
deployed/helix3/plugins/system/helix3/core/helix3.php
Normal file
61
deployed/helix3/plugins/system/helix3/fields/asset.php
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
class JFormFieldAsset extends JFormField
|
||||||
|
{
|
||||||
|
protected $type = 'Asset';
|
||||||
|
|
||||||
|
protected function getInput() {
|
||||||
|
|
||||||
|
$helix_plg_url = JURI::root(true).'/plugins/system/helix3';
|
||||||
|
$doc = JFactory::getDocument();
|
||||||
|
$doc->addScriptdeclaration('var layoutbuilder_base="' . JURI::root() . '";');
|
||||||
|
$doc->addScriptDeclaration("var basepath = '{$helix_plg_url}';");
|
||||||
|
$doc->addScriptDeclaration("var pluginVersion = '{$this->getVersion()}';");
|
||||||
|
|
||||||
|
//Core scripts
|
||||||
|
JHtml::_('jquery.ui', array('core', 'sortable'));
|
||||||
|
JHtml::_('formbehavior.chosen', 'select');
|
||||||
|
|
||||||
|
$doc->addScript($helix_plg_url.'/assets/js/helper.js');
|
||||||
|
$doc->addScript($helix_plg_url.'/assets/js/webfont.js');
|
||||||
|
$doc->addScript($helix_plg_url.'/assets/js/modal.js');
|
||||||
|
$doc->addScript($helix_plg_url.'/assets/js/admin.general.js');
|
||||||
|
$doc->addScript($helix_plg_url.'/assets/js/admin.layout.js');
|
||||||
|
|
||||||
|
//CSS
|
||||||
|
$doc->addStyleSheet($helix_plg_url.'/assets/css/bootstrap.css');
|
||||||
|
$doc->addStyleSheet($helix_plg_url.'/assets/css/modal.css');
|
||||||
|
$doc->addStyleSheet($helix_plg_url.'/assets/css/font-awesome.min.css');
|
||||||
|
$doc->addStyleSheet($helix_plg_url.'/assets/css/admin.general.css');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getVersion() {
|
||||||
|
$db = JFactory::getDBO();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query
|
||||||
|
->select(array('*'))
|
||||||
|
->from($db->quoteName('#__extensions'))
|
||||||
|
->where($db->quoteName('type').' = '.$db->quote('plugin'))
|
||||||
|
->where($db->quoteName('element').' = '.$db->quote('helix3'))
|
||||||
|
->where($db->quoteName('folder').' = '.$db->quote('system'));
|
||||||
|
$db->setQuery($query);
|
||||||
|
$result = $db->loadObject();
|
||||||
|
$manifest_cache = json_decode($result->manifest_cache);
|
||||||
|
if (isset($manifest_cache->version)) {
|
||||||
|
return $manifest_cache->version;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
26
deployed/helix3/plugins/system/helix3/fields/button.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
class JFormFieldButton extends JFormField
|
||||||
|
{
|
||||||
|
protected $type = 'Button';
|
||||||
|
protected function getInput() {
|
||||||
|
|
||||||
|
$url = !empty($this->element['url']) ? $this->element['url'] : '#';
|
||||||
|
$class = !empty($this->element['class']) ? ' ' . $this->element['class'] : '';
|
||||||
|
$text = !empty($this->element['text']) ? $this->element['text'] : 'Button';
|
||||||
|
$target = !empty($this->element['target']) ? $this->element['target'] : '_self';
|
||||||
|
|
||||||
|
return '<a id="'. $this->id .'" class="btn'. $class .'" href="'. $url .'" target="' . $target . '">'. JText::_($text) .'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
26
deployed/helix3/plugins/system/helix3/fields/group.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
class JFormFieldGroup extends JFormField {
|
||||||
|
protected $type = 'Group';
|
||||||
|
public function getInput() {
|
||||||
|
$text = (string) $this->element['title'];
|
||||||
|
$subtitle = (!empty($this->element['subtitle'])) ? '<span>' . JText::_($this->element['subtitle']) . '</span>':'';
|
||||||
|
$group = ($this->element['group']=='no')?'no_group':'in_group';
|
||||||
|
return '<div class="group_separator '.$group.'" title="'. JText::_($this->element['desc']) .'">' . JText::_($text) . $subtitle . '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabel(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
759
deployed/helix3/plugins/system/helix3/fields/icon.php
Normal file
@ -0,0 +1,759 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
jimport('joomla.html.html.select');
|
||||||
|
|
||||||
|
class JFormFieldIcon extends JFormField {
|
||||||
|
|
||||||
|
protected $type = 'Icon';
|
||||||
|
|
||||||
|
public function getInput() {
|
||||||
|
|
||||||
|
$icons = $this->getIconsList();
|
||||||
|
|
||||||
|
$arr = array();
|
||||||
|
$arr[] = JHtml::_('select.option', '', '' );
|
||||||
|
|
||||||
|
foreach ($icons as $value) {
|
||||||
|
$arr[] = JHtml::_('select.option', $value, str_replace('fa-', '', $value) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return JHtml::_('select.genericlist', $arr, $this->name, null, 'value', 'text', $this->value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Icons List*/
|
||||||
|
private static function getIconsList() {
|
||||||
|
return array(
|
||||||
|
'fa-500px',
|
||||||
|
'fa-adjust',
|
||||||
|
'fa-adn',
|
||||||
|
'fa-align-center',
|
||||||
|
'fa-align-justify',
|
||||||
|
'fa-align-left',
|
||||||
|
'fa-align-right',
|
||||||
|
'fa-amazon',
|
||||||
|
'fa-ambulance',
|
||||||
|
'fa-anchor',
|
||||||
|
'fa-android',
|
||||||
|
'fa-angellist',
|
||||||
|
'fa-angle-double-down',
|
||||||
|
'fa-angle-double-left',
|
||||||
|
'fa-angle-double-right',
|
||||||
|
'fa-angle-double-up',
|
||||||
|
'fa-angle-down',
|
||||||
|
'fa-angle-left',
|
||||||
|
'fa-angle-right',
|
||||||
|
'fa-angle-up',
|
||||||
|
'fa-apple',
|
||||||
|
'fa-archive',
|
||||||
|
'fa-area-chart',
|
||||||
|
'fa-arrow-circle-down',
|
||||||
|
'fa-arrow-circle-left',
|
||||||
|
'fa-arrow-circle-o-down',
|
||||||
|
'fa-arrow-circle-o-left',
|
||||||
|
'fa-arrow-circle-o-right',
|
||||||
|
'fa-arrow-circle-o-up',
|
||||||
|
'fa-arrow-circle-right',
|
||||||
|
'fa-arrow-circle-up',
|
||||||
|
'fa-arrow-down',
|
||||||
|
'fa-arrow-left',
|
||||||
|
'fa-arrow-right',
|
||||||
|
'fa-arrow-up',
|
||||||
|
'fa-arrows',
|
||||||
|
'fa-arrows-alt',
|
||||||
|
'fa-arrows-h',
|
||||||
|
'fa-arrows-v',
|
||||||
|
'fa-asterisk',
|
||||||
|
'fa-at',
|
||||||
|
'fa-automobile',
|
||||||
|
'fa-backward',
|
||||||
|
'fa-balance-scale',
|
||||||
|
'fa-ban',
|
||||||
|
'fa-bank',
|
||||||
|
'fa-bar-chart',
|
||||||
|
'fa-bar-chart-o',
|
||||||
|
'fa-barcode',
|
||||||
|
'fa-bars',
|
||||||
|
'fa-battery0',
|
||||||
|
'fa-battery1',
|
||||||
|
'fa-battery2',
|
||||||
|
'fa-battery3',
|
||||||
|
'fa-battery4',
|
||||||
|
'fa-battery-empty',
|
||||||
|
'fa-battery-full',
|
||||||
|
'fa-battery-half',
|
||||||
|
'fa-battery-quarter',
|
||||||
|
'fa-battery-three-quarters',
|
||||||
|
'fa-bed',
|
||||||
|
'fa-beer',
|
||||||
|
'fa-behance',
|
||||||
|
'fa-behance-square',
|
||||||
|
'fa-bell',
|
||||||
|
'fa-bell-o',
|
||||||
|
'fa-bell-slash',
|
||||||
|
'fa-bell-slash-o',
|
||||||
|
'fa-bicycle',
|
||||||
|
'fa-binoculars',
|
||||||
|
'fa-birthday-cake',
|
||||||
|
'fa-bitbucket',
|
||||||
|
'fa-bitbucket-square',
|
||||||
|
'fa-bitcoin',
|
||||||
|
'fa-black-tie',
|
||||||
|
'fa-bold',
|
||||||
|
'fa-bolt',
|
||||||
|
'fa-bomb',
|
||||||
|
'fa-book',
|
||||||
|
'fa-bookmark',
|
||||||
|
'fa-bookmark-o',
|
||||||
|
'fa-briefcase',
|
||||||
|
'fa-btc',
|
||||||
|
'fa-bug',
|
||||||
|
'fa-building',
|
||||||
|
'fa-building-o',
|
||||||
|
'fa-bullhorn',
|
||||||
|
'fa-bullseye',
|
||||||
|
'fa-bus',
|
||||||
|
'fa-buysellads',
|
||||||
|
'fa-cab',
|
||||||
|
'fa-calculator',
|
||||||
|
'fa-calendar',
|
||||||
|
'fa-calendar-check-o',
|
||||||
|
'fa-calendar-minus-o',
|
||||||
|
'fa-calendar-o',
|
||||||
|
'fa-calendar-plus-o',
|
||||||
|
'fa-calendar-times-o',
|
||||||
|
'fa-camera',
|
||||||
|
'fa-camera-retro',
|
||||||
|
'fa-car',
|
||||||
|
'fa-caret-down',
|
||||||
|
'fa-caret-left',
|
||||||
|
'fa-caret-right',
|
||||||
|
'fa-caret-square-o-down',
|
||||||
|
'fa-caret-square-o-left',
|
||||||
|
'fa-caret-square-o-right',
|
||||||
|
'fa-caret-square-o-up',
|
||||||
|
'fa-caret-up',
|
||||||
|
'fa-cart-arrow-down',
|
||||||
|
'fa-cart-plus',
|
||||||
|
'fa-cc',
|
||||||
|
'fa-cc-amex',
|
||||||
|
'fa-cc-diners-club',
|
||||||
|
'fa-cc-discover',
|
||||||
|
'fa-cc-jcb',
|
||||||
|
'fa-cc-mastercard',
|
||||||
|
'fa-cc-paypal',
|
||||||
|
'fa-cc-stripe',
|
||||||
|
'fa-cc-visa',
|
||||||
|
'fa-certificate',
|
||||||
|
'fa-chain',
|
||||||
|
'fa-chain-broken',
|
||||||
|
'fa-check',
|
||||||
|
'fa-check-circle',
|
||||||
|
'fa-check-circle-o',
|
||||||
|
'fa-check-square',
|
||||||
|
'fa-check-square-o',
|
||||||
|
'fa-chevron-circle-down',
|
||||||
|
'fa-chevron-circle-left',
|
||||||
|
'fa-chevron-circle-right',
|
||||||
|
'fa-chevron-circle-up',
|
||||||
|
'fa-chevron-down',
|
||||||
|
'fa-chevron-left',
|
||||||
|
'fa-chevron-right',
|
||||||
|
'fa-chevron-up',
|
||||||
|
'fa-child',
|
||||||
|
'fa-chrome',
|
||||||
|
'fa-circle',
|
||||||
|
'fa-circle-o',
|
||||||
|
'fa-circle-o-notch',
|
||||||
|
'fa-circle-thin',
|
||||||
|
'fa-clipboard',
|
||||||
|
'fa-clock-o',
|
||||||
|
'fa-clone',
|
||||||
|
'fa-close',
|
||||||
|
'fa-cloud',
|
||||||
|
'fa-cloud-download',
|
||||||
|
'fa-cloud-upload',
|
||||||
|
'fa-cny',
|
||||||
|
'fa-code',
|
||||||
|
'fa-code-fork',
|
||||||
|
'fa-codepen',
|
||||||
|
'fa-coffee',
|
||||||
|
'fa-cog',
|
||||||
|
'fa-cogs',
|
||||||
|
'fa-columns',
|
||||||
|
'fa-comment',
|
||||||
|
'fa-comment-o',
|
||||||
|
'fa-commenting',
|
||||||
|
'fa-commenting-o',
|
||||||
|
'fa-comments',
|
||||||
|
'fa-comments-o',
|
||||||
|
'fa-compass',
|
||||||
|
'fa-compress',
|
||||||
|
'fa-connectdevelop',
|
||||||
|
'fa-contao',
|
||||||
|
'fa-copy',
|
||||||
|
'fa-copyright',
|
||||||
|
'fa-creative-commons',
|
||||||
|
'fa-credit-card',
|
||||||
|
'fa-crop',
|
||||||
|
'fa-crosshairs',
|
||||||
|
'fa-css3',
|
||||||
|
'fa-cube',
|
||||||
|
'fa-cubes',
|
||||||
|
'fa-cut',
|
||||||
|
'fa-cutlery',
|
||||||
|
'fa-dashboard',
|
||||||
|
'fa-dashcube',
|
||||||
|
'fa-database',
|
||||||
|
'fa-dedent',
|
||||||
|
'fa-delicious',
|
||||||
|
'fa-desktop',
|
||||||
|
'fa-deviantart',
|
||||||
|
'fa-diamond',
|
||||||
|
'fa-digg',
|
||||||
|
'fa-dollar',
|
||||||
|
'fa-dot-circle-o',
|
||||||
|
'fa-download',
|
||||||
|
'fa-dribbble',
|
||||||
|
'fa-dropbox',
|
||||||
|
'fa-drupal',
|
||||||
|
'fa-edit',
|
||||||
|
'fa-eject',
|
||||||
|
'fa-ellipsis-h',
|
||||||
|
'fa-ellipsis-v',
|
||||||
|
'fa-empire',
|
||||||
|
'fa-envelope',
|
||||||
|
'fa-envelope-o',
|
||||||
|
'fa-envelope-square',
|
||||||
|
'fa-eraser',
|
||||||
|
'fa-eur',
|
||||||
|
'fa-euro',
|
||||||
|
'fa-exchange',
|
||||||
|
'fa-exclamation',
|
||||||
|
'fa-exclamation-circle',
|
||||||
|
'fa-exclamation-triangle',
|
||||||
|
'fa-expand',
|
||||||
|
'fa-expeditedssl',
|
||||||
|
'fa-external-link',
|
||||||
|
'fa-external-link-square',
|
||||||
|
'fa-eye',
|
||||||
|
'fa-eye-slash',
|
||||||
|
'fa-eyedropper',
|
||||||
|
'fa-facebook',
|
||||||
|
'fa-facebook-f',
|
||||||
|
'fa-facebook-official',
|
||||||
|
'fa-facebook-square',
|
||||||
|
'fa-fast-backward',
|
||||||
|
'fa-fast-forward',
|
||||||
|
'fa-fax',
|
||||||
|
'fa-female',
|
||||||
|
'fa-fighter-jet',
|
||||||
|
'fa-file',
|
||||||
|
'fa-file-archive-o',
|
||||||
|
'fa-file-audio-o',
|
||||||
|
'fa-file-code-o',
|
||||||
|
'fa-file-excel-o',
|
||||||
|
'fa-file-image-o',
|
||||||
|
'fa-file-movie-o',
|
||||||
|
'fa-file-o',
|
||||||
|
'fa-file-pdf-o',
|
||||||
|
'fa-file-photo-o',
|
||||||
|
'fa-file-picture-o',
|
||||||
|
'fa-file-powerpoint-o',
|
||||||
|
'fa-file-sound-o',
|
||||||
|
'fa-file-text',
|
||||||
|
'fa-file-text-o',
|
||||||
|
'fa-file-video-o',
|
||||||
|
'fa-file-word-o',
|
||||||
|
'fa-file-zip-o',
|
||||||
|
'fa-files-o',
|
||||||
|
'fa-film',
|
||||||
|
'fa-filter',
|
||||||
|
'fa-fire',
|
||||||
|
'fa-fire-extinguisher',
|
||||||
|
'fa-firefox',
|
||||||
|
'fa-flag',
|
||||||
|
'fa-flag-checkered',
|
||||||
|
'fa-flag-o',
|
||||||
|
'fa-flash',
|
||||||
|
'fa-flask',
|
||||||
|
'fa-flickr',
|
||||||
|
'fa-floppy-o',
|
||||||
|
'fa-folder',
|
||||||
|
'fa-folder-o',
|
||||||
|
'fa-folder-open',
|
||||||
|
'fa-folder-open-o',
|
||||||
|
'fa-font',
|
||||||
|
'fa-fonticons',
|
||||||
|
'fa-forumbee',
|
||||||
|
'fa-forward',
|
||||||
|
'fa-foursquare',
|
||||||
|
'fa-frown-o',
|
||||||
|
'fa-futbol-o',
|
||||||
|
'fa-gamepad',
|
||||||
|
'fa-gavel',
|
||||||
|
'fa-gbp',
|
||||||
|
'fa-ge',
|
||||||
|
'fa-gear',
|
||||||
|
'fa-gears',
|
||||||
|
'fa-genderless',
|
||||||
|
'fa-get-pocket',
|
||||||
|
'fa-gg',
|
||||||
|
'fa-gg-circle',
|
||||||
|
'fa-gift',
|
||||||
|
'fa-git',
|
||||||
|
'fa-git-square',
|
||||||
|
'fa-github',
|
||||||
|
'fa-github-alt',
|
||||||
|
'fa-github-square',
|
||||||
|
'fa-gittip',
|
||||||
|
'fa-glass',
|
||||||
|
'fa-globe',
|
||||||
|
'fa-google',
|
||||||
|
'fa-google-plus',
|
||||||
|
'fa-google-plus-square',
|
||||||
|
'fa-google-wallet',
|
||||||
|
'fa-graduation-cap',
|
||||||
|
'fa-gratipay',
|
||||||
|
'fa-group',
|
||||||
|
'fa-h-square',
|
||||||
|
'fa-hacker-news',
|
||||||
|
'fa-hand-grab-o',
|
||||||
|
'fa-hand-lizard-o',
|
||||||
|
'fa-hand-o-down',
|
||||||
|
'fa-hand-o-left',
|
||||||
|
'fa-hand-o-right',
|
||||||
|
'fa-hand-o-up',
|
||||||
|
'fa-hand-paper-o',
|
||||||
|
'fa-hand-peace-o',
|
||||||
|
'fa-hand-pointer-o',
|
||||||
|
'fa-hand-rock-o',
|
||||||
|
'fa-hand-scissors-o',
|
||||||
|
'fa-hand-spock-o',
|
||||||
|
'fa-hand-stop-o',
|
||||||
|
'fa-hdd-o',
|
||||||
|
'fa-header',
|
||||||
|
'fa-headphones',
|
||||||
|
'fa-heart',
|
||||||
|
'fa-heart-o',
|
||||||
|
'fa-heartbeat',
|
||||||
|
'fa-history',
|
||||||
|
'fa-home',
|
||||||
|
'fa-hospital-o',
|
||||||
|
'fa-hotel',
|
||||||
|
'fa-hourglass',
|
||||||
|
'fa-hourglass-1',
|
||||||
|
'fa-hourglass-2',
|
||||||
|
'fa-hourglass-3',
|
||||||
|
'fa-hourglass-end',
|
||||||
|
'fa-hourglass-half',
|
||||||
|
'fa-hourglass-o',
|
||||||
|
'fa-hourglass-start',
|
||||||
|
'fa-houzz',
|
||||||
|
'fa-html5',
|
||||||
|
'fa-i-cursor',
|
||||||
|
'fa-ils',
|
||||||
|
'fa-image',
|
||||||
|
'fa-inbox',
|
||||||
|
'fa-indent',
|
||||||
|
'fa-industry',
|
||||||
|
'fa-info',
|
||||||
|
'fa-info-circle',
|
||||||
|
'fa-inr',
|
||||||
|
'fa-instagram',
|
||||||
|
'fa-internet-explorer',
|
||||||
|
'fa-institution',
|
||||||
|
'fa-ioxhost',
|
||||||
|
'fa-italic',
|
||||||
|
'fa-joomla',
|
||||||
|
'fa-jpy',
|
||||||
|
'fa-jsfiddle',
|
||||||
|
'fa-key',
|
||||||
|
'fa-keyboard-o',
|
||||||
|
'fa-krw',
|
||||||
|
'fa-language',
|
||||||
|
'fa-laptop',
|
||||||
|
'fa-lastfm',
|
||||||
|
'fa-lastfm-square',
|
||||||
|
'fa-leaf',
|
||||||
|
'fa-leanpub',
|
||||||
|
'fa-legal',
|
||||||
|
'fa-lemon-o',
|
||||||
|
'fa-level-down',
|
||||||
|
'fa-level-up',
|
||||||
|
'fa-life-bouy',
|
||||||
|
'fa-life-buoy',
|
||||||
|
'fa-life-ring',
|
||||||
|
'fa-life-saver',
|
||||||
|
'fa-lightbulb-o',
|
||||||
|
'fa-line-chart',
|
||||||
|
'fa-link',
|
||||||
|
'fa-linkedin',
|
||||||
|
'fa-linkedin-square',
|
||||||
|
'fa-linux',
|
||||||
|
'fa-list',
|
||||||
|
'fa-list-alt',
|
||||||
|
'fa-list-ol',
|
||||||
|
'fa-list-ul',
|
||||||
|
'fa-location-arrow',
|
||||||
|
'fa-lock',
|
||||||
|
'fa-long-arrow-down',
|
||||||
|
'fa-long-arrow-left',
|
||||||
|
'fa-long-arrow-right',
|
||||||
|
'fa-long-arrow-up',
|
||||||
|
'fa-magic',
|
||||||
|
'fa-magnet',
|
||||||
|
'fa-mail-forward',
|
||||||
|
'fa-mail-reply',
|
||||||
|
'fa-mail-reply-all',
|
||||||
|
'fa-male',
|
||||||
|
'fa-map',
|
||||||
|
'fa-map-marker',
|
||||||
|
'fa-map-o',
|
||||||
|
'fa-map-pin',
|
||||||
|
'fa-map-signs',
|
||||||
|
'fa-mars',
|
||||||
|
'fa-mars-double',
|
||||||
|
'fa-mars-stroke',
|
||||||
|
'fa-mars-stroke-h',
|
||||||
|
'fa-mars-stroke-v',
|
||||||
|
'fa-maxcdn',
|
||||||
|
'fa-meanpath',
|
||||||
|
'fa-medium',
|
||||||
|
'fa-medkit',
|
||||||
|
'fa-meh-o',
|
||||||
|
'fa-mercury',
|
||||||
|
'fa-microphone',
|
||||||
|
'fa-microphone-slash',
|
||||||
|
'fa-minus',
|
||||||
|
'fa-minus-circle',
|
||||||
|
'fa-minus-square',
|
||||||
|
'fa-minus-square-o',
|
||||||
|
'fa-mobile',
|
||||||
|
'fa-mobile-phone',
|
||||||
|
'fa-money',
|
||||||
|
'fa-moon-o',
|
||||||
|
'fa-mortar-board',
|
||||||
|
'fa-motorcycle',
|
||||||
|
'fa-mouse-pointer',
|
||||||
|
'fa-music',
|
||||||
|
'fa-navicon',
|
||||||
|
'fa-neuter',
|
||||||
|
'fa-newspaper-o',
|
||||||
|
'fa-object-group',
|
||||||
|
'fa-odnoklassniki',
|
||||||
|
'fa-odnoklassniki-square',
|
||||||
|
'fa-opencart',
|
||||||
|
'fa-openid',
|
||||||
|
'fa-optin-monster',
|
||||||
|
'fa-outdent',
|
||||||
|
'fa-pagelines',
|
||||||
|
'fa-paint-brush',
|
||||||
|
'fa-paper-plane',
|
||||||
|
'fa-paper-plane-o',
|
||||||
|
'fa-paperclip',
|
||||||
|
'fa-paragraph',
|
||||||
|
'fa-paste',
|
||||||
|
'fa-pause',
|
||||||
|
'fa-paw',
|
||||||
|
'fa-paypal',
|
||||||
|
'fa-pencil',
|
||||||
|
'fa-pencil-square',
|
||||||
|
'fa-pencil-square-o',
|
||||||
|
'fa-phone',
|
||||||
|
'fa-phone-square',
|
||||||
|
'fa-photo',
|
||||||
|
'fa-picture-o',
|
||||||
|
'fa-pie-chart',
|
||||||
|
'fa-pied-piper',
|
||||||
|
'fa-pied-piper-alt',
|
||||||
|
'fa-pinterest',
|
||||||
|
'fa-pinterest-p',
|
||||||
|
'fa-pinterest-square',
|
||||||
|
'fa-plane',
|
||||||
|
'fa-play',
|
||||||
|
'fa-play-circle',
|
||||||
|
'fa-play-circle-o',
|
||||||
|
'fa-plug',
|
||||||
|
'fa-plus',
|
||||||
|
'fa-plus-circle',
|
||||||
|
'fa-plus-square',
|
||||||
|
'fa-plus-square-o',
|
||||||
|
'fa-power-off',
|
||||||
|
'fa-print',
|
||||||
|
'fa-puzzle-piece',
|
||||||
|
'fa-qq',
|
||||||
|
'fa-qrcode',
|
||||||
|
'fa-question',
|
||||||
|
'fa-question-circle',
|
||||||
|
'fa-quote-left',
|
||||||
|
'fa-quote-right',
|
||||||
|
'fa-ra',
|
||||||
|
'fa-random',
|
||||||
|
'fa-rebel',
|
||||||
|
'fa-recycle',
|
||||||
|
'fa-reddit',
|
||||||
|
'fa-reddit-square',
|
||||||
|
'fa-refresh',
|
||||||
|
'fa-registered',
|
||||||
|
'fa-remove',
|
||||||
|
'fa-renren',
|
||||||
|
'fa-reorder',
|
||||||
|
'fa-repeat',
|
||||||
|
'fa-reply',
|
||||||
|
'fa-reply-all',
|
||||||
|
'fa-retweet',
|
||||||
|
'fa-rmb',
|
||||||
|
'fa-road',
|
||||||
|
'fa-rocket',
|
||||||
|
'fa-rotate-left',
|
||||||
|
'fa-rotate-right',
|
||||||
|
'fa-rouble',
|
||||||
|
'fa-rss',
|
||||||
|
'fa-rss-square',
|
||||||
|
'fa-rub',
|
||||||
|
'fa-ruble',
|
||||||
|
'fa-rupee',
|
||||||
|
'fa-safari',
|
||||||
|
'fa-save',
|
||||||
|
'fa-scissors',
|
||||||
|
'fa-search',
|
||||||
|
'fa-search-minus',
|
||||||
|
'fa-search-plus',
|
||||||
|
'fa-sellsy',
|
||||||
|
'fa-send',
|
||||||
|
'fa-send-o',
|
||||||
|
'fa-server',
|
||||||
|
'fa-share',
|
||||||
|
'fa-share-alt',
|
||||||
|
'fa-share-alt-square',
|
||||||
|
'fa-share-square',
|
||||||
|
'fa-share-square-o',
|
||||||
|
'fa-shekel',
|
||||||
|
'fa-sheqel',
|
||||||
|
'fa-shield',
|
||||||
|
'fa-ship',
|
||||||
|
'fa-shirtsinbulk',
|
||||||
|
'fa-shopping-cart',
|
||||||
|
'fa-sign-in',
|
||||||
|
'fa-sign-out',
|
||||||
|
'fa-signal',
|
||||||
|
'fa-simplybuilt',
|
||||||
|
'fa-sitemap',
|
||||||
|
'fa-skyatlas',
|
||||||
|
'fa-skype',
|
||||||
|
'fa-slack',
|
||||||
|
'fa-sliders',
|
||||||
|
'fa-slideshare',
|
||||||
|
'fa-smile-o',
|
||||||
|
'fa-soccer-ball-o',
|
||||||
|
'fa-sort',
|
||||||
|
'fa-sort-alpha-asc',
|
||||||
|
'fa-sort-alpha-desc',
|
||||||
|
'fa-sort-amount-asc',
|
||||||
|
'fa-sort-amount-desc',
|
||||||
|
'fa-sort-asc',
|
||||||
|
'fa-sort-desc',
|
||||||
|
'fa-sort-down',
|
||||||
|
'fa-sort-numeric-asc',
|
||||||
|
'fa-sort-numeric-desc',
|
||||||
|
'fa-sort-up',
|
||||||
|
'fa-soundcloud',
|
||||||
|
'fa-space-shuttle',
|
||||||
|
'fa-spinner',
|
||||||
|
'fa-spoon',
|
||||||
|
'fa-spotify',
|
||||||
|
'fa-square',
|
||||||
|
'fa-square-o',
|
||||||
|
'fa-stack-exchange',
|
||||||
|
'fa-stack-overflow',
|
||||||
|
'fa-star',
|
||||||
|
'fa-star-half',
|
||||||
|
'fa-star-half-empty',
|
||||||
|
'fa-star-half-full',
|
||||||
|
'fa-star-half-o',
|
||||||
|
'fa-star-o',
|
||||||
|
'fa-steam',
|
||||||
|
'fa-steam-square',
|
||||||
|
'fa-step-backward',
|
||||||
|
'fa-step-forward',
|
||||||
|
'fa-stethoscope',
|
||||||
|
'fa-sticky-note-o',
|
||||||
|
'fa-stop',
|
||||||
|
'fa-street-view',
|
||||||
|
'fa-strikethrough',
|
||||||
|
'fa-stumbleupon',
|
||||||
|
'fa-stumbleupon-circle',
|
||||||
|
'fa-subscript',
|
||||||
|
'fa-subway',
|
||||||
|
'fa-suitcase',
|
||||||
|
'fa-sun-o',
|
||||||
|
'fa-superscript',
|
||||||
|
'fa-support',
|
||||||
|
'fa-table',
|
||||||
|
'fa-tablet',
|
||||||
|
'fa-tachometer',
|
||||||
|
'fa-tag',
|
||||||
|
'fa-tags',
|
||||||
|
'fa-tasks',
|
||||||
|
'fa-taxi',
|
||||||
|
'fa-television',
|
||||||
|
'fa-tencent-weibo',
|
||||||
|
'fa-terminal',
|
||||||
|
'fa-text-height',
|
||||||
|
'fa-text-width',
|
||||||
|
'fa-th',
|
||||||
|
'fa-th-large',
|
||||||
|
'fa-th-list',
|
||||||
|
'fa-thumb-tack',
|
||||||
|
'fa-thumbs-down',
|
||||||
|
'fa-thumbs-o-down',
|
||||||
|
'fa-thumbs-o-up',
|
||||||
|
'fa-thumbs-up',
|
||||||
|
'fa-ticket',
|
||||||
|
'fa-times',
|
||||||
|
'fa-times-circle',
|
||||||
|
'fa-times-circle-o',
|
||||||
|
'fa-tint',
|
||||||
|
'fa-toggle-down',
|
||||||
|
'fa-toggle-left',
|
||||||
|
'fa-toggle-off',
|
||||||
|
'fa-toggle-on',
|
||||||
|
'fa-toggle-right',
|
||||||
|
'fa-toggle-up',
|
||||||
|
'fa-trademark',
|
||||||
|
'fa-train',
|
||||||
|
'fa-transgender',
|
||||||
|
'fa-transgender-alt',
|
||||||
|
'fa-trash',
|
||||||
|
'fa-trash-o',
|
||||||
|
'fa-tree',
|
||||||
|
'fa-trello',
|
||||||
|
'fa-trophy',
|
||||||
|
'fa-truck',
|
||||||
|
'fa-try',
|
||||||
|
'fa-tty',
|
||||||
|
'fa-tumblr',
|
||||||
|
'fa-tumblr-square',
|
||||||
|
'fa-turkish-lira',
|
||||||
|
'fa-tv',
|
||||||
|
'fa-twitch',
|
||||||
|
'fa-twitter',
|
||||||
|
'fa-twitter-square',
|
||||||
|
'fa-umbrella',
|
||||||
|
'fa-underline',
|
||||||
|
'fa-undo',
|
||||||
|
'fa-university',
|
||||||
|
'fa-unlink',
|
||||||
|
'fa-unlock',
|
||||||
|
'fa-unlock-alt',
|
||||||
|
'fa-unsorted',
|
||||||
|
'fa-upload',
|
||||||
|
'fa-usd',
|
||||||
|
'fa-user',
|
||||||
|
'fa-user-md',
|
||||||
|
'fa-user-plus',
|
||||||
|
'fa-user-secret',
|
||||||
|
'fa-user-times',
|
||||||
|
'fa-users',
|
||||||
|
'fa-venus',
|
||||||
|
'fa-venus-double',
|
||||||
|
'fa-venus-mars',
|
||||||
|
'fa-viacoin',
|
||||||
|
'fa-video-camera',
|
||||||
|
'fa-vimeo',
|
||||||
|
'fa-vimeo-square',
|
||||||
|
'fa-vine',
|
||||||
|
'fa-vk',
|
||||||
|
'fa-volume-down',
|
||||||
|
'fa-volume-off',
|
||||||
|
'fa-volume-up',
|
||||||
|
'fa-warning',
|
||||||
|
'fa-wechat',
|
||||||
|
'fa-weibo',
|
||||||
|
'fa-weixin',
|
||||||
|
'fa-whatsapp',
|
||||||
|
'fa-wheelchair',
|
||||||
|
'fa-wifi',
|
||||||
|
'fa-wikipedia-w',
|
||||||
|
'fa-windows',
|
||||||
|
'fa-won',
|
||||||
|
'fa-wordpress',
|
||||||
|
'fa-wrench',
|
||||||
|
'fa-xing',
|
||||||
|
'fa-xing-square',
|
||||||
|
'fa-yahoo',
|
||||||
|
'fa-yc',
|
||||||
|
'fa-yelp',
|
||||||
|
'fa-yen',
|
||||||
|
'fa-youtube',
|
||||||
|
'fa-youtube-play',
|
||||||
|
'fa-youtube-square',
|
||||||
|
'fa-address-book',
|
||||||
|
'fa-address-book-o',
|
||||||
|
'fa-vcard',
|
||||||
|
'fa-address-card',
|
||||||
|
'fa-vcard-o',
|
||||||
|
'fa-address-card-o',
|
||||||
|
'fa-bandcamp',
|
||||||
|
'fa-bathtub',
|
||||||
|
'fa-s15',
|
||||||
|
'fa-bath',
|
||||||
|
'fa-drivers-license',
|
||||||
|
'fa-id-card',
|
||||||
|
'fa-drivers-license-o',
|
||||||
|
'fa-id-card-o',
|
||||||
|
'fa-eercast',
|
||||||
|
'fa-envelope-open',
|
||||||
|
'fa-envelope-open-o',
|
||||||
|
'fa-etsy',
|
||||||
|
'fa-free-code-camp',
|
||||||
|
'fa-grav',
|
||||||
|
'fa-handshake-o',
|
||||||
|
'fa-id-badge',
|
||||||
|
'fa-imdb',
|
||||||
|
'fa-linode',
|
||||||
|
'fa-meetup',
|
||||||
|
'fa-microchip',
|
||||||
|
'fa-podcast',
|
||||||
|
'fa-quora',
|
||||||
|
'fa-ravelry',
|
||||||
|
'fa-shower',
|
||||||
|
'fa-snowflake-o',
|
||||||
|
'fa-superpowers',
|
||||||
|
'fa-telegram',
|
||||||
|
'fa-thermometer-4',
|
||||||
|
'fa-thermometer',
|
||||||
|
'fa-thermometer-full',
|
||||||
|
'fa-thermometer-3',
|
||||||
|
'fa-thermometer-three-quarters',
|
||||||
|
'fa-thermometer-2',
|
||||||
|
'fa-thermometer-half',
|
||||||
|
'fa-thermometer-1',
|
||||||
|
'fa-thermometer-quarter',
|
||||||
|
'fa-thermometer-0',
|
||||||
|
'fa-thermometer-empty',
|
||||||
|
'fa-times-rectangle',
|
||||||
|
'fa-window-close',
|
||||||
|
'fa-times-rectangle-o',
|
||||||
|
'fa-window-close-o',
|
||||||
|
'fa-user-circle',
|
||||||
|
'fa-user-circle-o',
|
||||||
|
'fa-window-maximize',
|
||||||
|
'fa-window-minimize',
|
||||||
|
'fa-window-restore',
|
||||||
|
'fa-wpexplorer'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
67
deployed/helix3/plugins/system/helix3/fields/layout.php
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
class JFormFieldLayout extends JFormField {
|
||||||
|
|
||||||
|
protected $type = 'Layout';
|
||||||
|
|
||||||
|
public function getInput()
|
||||||
|
{
|
||||||
|
$helix_layout_path = JPATH_SITE.'/plugins/system/helix3/layout/';
|
||||||
|
|
||||||
|
$json = json_decode($this->value);
|
||||||
|
|
||||||
|
if(!empty($json)) {
|
||||||
|
$value = $json;
|
||||||
|
} else {
|
||||||
|
$layout_file = JFile::read( JPATH_SITE . '/templates/' . $this->getTemplate() . '/layout/default.json' );
|
||||||
|
$value = json_decode($layout_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
$htmls = $this->generateLayout($helix_layout_path, $value);
|
||||||
|
$htmls .= '<input type="hidden" id="'.$this->id.'" name="'.$this->name.'">';
|
||||||
|
return $htmls;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function generateLayout($path,$layout_data = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
include_once( $path.'generated.php' );
|
||||||
|
$items = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
return $items;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getLabel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get template name
|
||||||
|
private static function getTemplate() {
|
||||||
|
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('template')));
|
||||||
|
$query->from($db->quoteName('#__template_styles'));
|
||||||
|
$query->where($db->quoteName('id') . ' = '. $db->quote( JRequest::getVar('id') ));
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
55
deployed/helix3/plugins/system/helix3/fields/layoutlist.php
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
class JFormFieldLayoutlist extends JFormField
|
||||||
|
{
|
||||||
|
protected $type = 'Layoutlist';
|
||||||
|
|
||||||
|
public function getInput()
|
||||||
|
{
|
||||||
|
$template = self::getTemplate();
|
||||||
|
$layoutPath = JPATH_SITE.'/templates/'.$template.'/layout/';
|
||||||
|
$laoutlist = JFolder::files($layoutPath, '.json');
|
||||||
|
|
||||||
|
$htmls = '<div class="layoutlist"><select id="'.$this->id.'" name="'.$this->name.'">';
|
||||||
|
if ($laoutlist) {
|
||||||
|
foreach ($laoutlist as $name) {
|
||||||
|
$htmls .= '<option value="'.$name.'">'.str_replace('.json','',$name).'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$htmls .= '</select></div>';
|
||||||
|
$htmls .= '<div class="layout-button-wrap"><a href="#" class="btn btn-success layout-save-action" data-action="save">'. JText::_('HELIX_SAVE_COPY') .'</a>';
|
||||||
|
$htmls .= '<a href="#" class="btn btn-danger layout-del-action" data-action="remove">'. JText::_('HELIX_DELETE') .'</a></div>';
|
||||||
|
|
||||||
|
return $htmls;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getLabel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get template name
|
||||||
|
private static function getTemplate() {
|
||||||
|
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('template')));
|
||||||
|
$query->from($db->quoteName('#__template_styles'));
|
||||||
|
$query->where($db->quoteName('id') . ' = '. $db->quote( JRequest::getVar('id') ));
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadResult();
|
||||||
|
}
|
||||||
|
}
|
||||||
38
deployed/helix3/plugins/system/helix3/fields/megamenu.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
class JFormFieldMegamenu extends JFormField
|
||||||
|
{
|
||||||
|
protected $type = "Megamenu";
|
||||||
|
|
||||||
|
public function getInput()
|
||||||
|
{
|
||||||
|
$mega_menu_path = JPATH_SITE.'/plugins/system/helix3/fields/';
|
||||||
|
|
||||||
|
$html = $this->getMegaSettings($mega_menu_path,json_decode($this->value));
|
||||||
|
$html .= '<input type="hidden" name="'.$this->name.'" id="'.$this->id.'" value="'.$this->value.'">';
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMegaSettings($path,$value = null)
|
||||||
|
{
|
||||||
|
ob_start();
|
||||||
|
$menu_data = $value;
|
||||||
|
include_once $path.'menulayout.php';
|
||||||
|
$html = ob_get_contents();
|
||||||
|
ob_clean();
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
}
|
||||||
562
deployed/helix3/plugins/system/helix3/fields/menulayout.php
Normal file
@ -0,0 +1,562 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
$current_menu_id = $this->form->getValue('id');
|
||||||
|
|
||||||
|
function create_menu($current_menu_id)
|
||||||
|
{
|
||||||
|
$items = menuItems();
|
||||||
|
$menus = new JMenuSite;
|
||||||
|
|
||||||
|
if (isset($items[$current_menu_id]))
|
||||||
|
{
|
||||||
|
$item = $items[$current_menu_id];
|
||||||
|
foreach ($item as $key => $item_id)
|
||||||
|
{
|
||||||
|
echo '<li>';
|
||||||
|
echo $menus->getItem($item_id)->title;
|
||||||
|
echo '</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menuItems()
|
||||||
|
{
|
||||||
|
$menus = new JMenuSite;
|
||||||
|
$menus = $menus->getMenu();
|
||||||
|
$new = array();
|
||||||
|
foreach ($menus as $item) {
|
||||||
|
$new[$item->parent_id][] = $item->id;
|
||||||
|
}
|
||||||
|
return $new;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getModuleNameId($id = 'all')
|
||||||
|
{
|
||||||
|
$db = JFactory::getDBO();
|
||||||
|
|
||||||
|
if ($id == 'all') {
|
||||||
|
$query = 'SELECT id, title FROM `#__modules` WHERE ( `published` !=-2 AND `published` !=0 ) AND client_id = 0';
|
||||||
|
} else {
|
||||||
|
$query = 'SELECT id, title FROM `#__modules` WHERE ( `published` !=-2 AND `published` !=0 ) AND id = ' . $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadObjectList();
|
||||||
|
}
|
||||||
|
|
||||||
|
$modules = getModuleNameId();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$menu_width = 600;
|
||||||
|
$align = 'right';
|
||||||
|
$layout = '';
|
||||||
|
|
||||||
|
if (isset($menu_data->width))
|
||||||
|
{
|
||||||
|
$menu_width = $menu_data->width;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($menu_data->menuAlign))
|
||||||
|
{
|
||||||
|
$align = $menu_data->menuAlign;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($menu_data->layout))
|
||||||
|
{
|
||||||
|
$layout = $menu_data->layout;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$items = menuItems();
|
||||||
|
$item = array();
|
||||||
|
if (isset($items[$current_menu_id]) && !empty($items[$current_menu_id])) {
|
||||||
|
$item = $items[$current_menu_id];
|
||||||
|
}
|
||||||
|
|
||||||
|
$menuItems = new JMenuSite;
|
||||||
|
|
||||||
|
$no_child = true;
|
||||||
|
$count = 0;
|
||||||
|
$x_key = 0;
|
||||||
|
$y_key = 0;
|
||||||
|
$check_child = 0;
|
||||||
|
$item_array = array();
|
||||||
|
|
||||||
|
foreach ($item as $key => $id)
|
||||||
|
{
|
||||||
|
$status = 0;
|
||||||
|
if (isset($items[$id]) && is_array($items[$id]))
|
||||||
|
{
|
||||||
|
$no_child = false;
|
||||||
|
$count = $count + 1;
|
||||||
|
$check_child = $check_child+1;
|
||||||
|
$status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($check_child === 2)
|
||||||
|
{
|
||||||
|
$y_key = 0;
|
||||||
|
$x_key = $x_key + 1;
|
||||||
|
$check_child = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$item_array[$x_key][$y_key] = array($id,$status);
|
||||||
|
$y_key = $y_key + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($no_child === true)
|
||||||
|
{
|
||||||
|
$count = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($count > 4 && $count != 6)
|
||||||
|
{
|
||||||
|
$count = 4;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
|
||||||
|
<div class="span2">
|
||||||
|
<h3 class="sidebar-title"><?php echo JText::_('HELIX_MENU_DRAG_MODULE'); ?></h3>
|
||||||
|
<div class="modules-list">
|
||||||
|
<?php
|
||||||
|
$modules = getModuleNameId();
|
||||||
|
if($modules) {
|
||||||
|
foreach($modules as $module){
|
||||||
|
echo '<div class="draggable-module" data-mod_id="' . $module->id . '">' . $module->title . '<i class="fa fa-remove"></i><i class="fa fa-arrows"></i></div>';
|
||||||
|
}
|
||||||
|
}?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span10">
|
||||||
|
|
||||||
|
<div class="action-bar">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<strong><?php echo JText::_('HELIX_MENU_SUB_WIDTH'); ?></strong> <input type="number" id="menuWidth" name="width" value="<?php echo $menu_width; ?>">
|
||||||
|
</li>
|
||||||
|
<li id="sizeShape"><a href="#" class="add-layout btn btn-primary"><i class="fa fa-plus"></i> <?php echo JText::_('HELIX_MENU_MANAGE_LAYOUT'); ?></a></li>
|
||||||
|
<li class="btn-group">
|
||||||
|
<a class="alignment btn <?php echo ($align == 'left')?'active':''; ?>" data-al_flag="left" href="#"><?php echo JText::_('HELIX_GLOBAL_LEFT'); ?></a>
|
||||||
|
<a class="alignment btn <?php echo ($align == 'center')?'active':''; ?>" data-al_flag="center" href="#"><?php echo JText::_('HELIX_GLOBAL_CENTER'); ?></a>
|
||||||
|
<a class="alignment btn <?php echo ($align == 'right')?'active':''; ?>" data-al_flag="right" href="#"><?php echo JText::_('HELIX_GLOBAL_RIGHT'); ?></a>
|
||||||
|
<a class="alignment btn <?php echo ($align == 'full')?'active':''; ?>" data-al_flag="full" href="#"><?php echo JText::_('HELIX_GLOBAL_FULL'); ?></a>
|
||||||
|
</li>
|
||||||
|
<li class="btn-group">
|
||||||
|
<a class="layout-reset btn btn-success"href="#" data-current_item="<?php echo $current_menu_id; ?>"><i class="fa fa-refresh"></i> <?php echo JText::_('HELIX_GLOBAL_RESET'); ?></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="megamenulayout" style="width:<?php echo $menu_width; ?>px;" data-width="<?php echo $menu_width; ?>" data-menu_item="<?php echo $count; ?>" data-menu_align="<?php echo $align; ?>">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ($layout) {
|
||||||
|
|
||||||
|
foreach ($layout as $key => $row) {
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
|
||||||
|
<?php foreach ($row->attr as $key => $column){ ?>
|
||||||
|
|
||||||
|
<div class="column sp-col-sm-<?php echo $column->colGrid; ?>" data-column="<?php echo $column->colGrid; ?>">
|
||||||
|
<div class="column-items-wrap">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$menus_id = $column->menuParentId;
|
||||||
|
$modId = $column->moduleId;
|
||||||
|
|
||||||
|
if ( $menus_id )
|
||||||
|
{
|
||||||
|
$menu_id_array = explode(',',$menus_id);
|
||||||
|
foreach ($menu_id_array as $menuId) {
|
||||||
|
?>
|
||||||
|
<?php if(in_array( $menuId , $item)) { ?>
|
||||||
|
|
||||||
|
<h4 data-current_child="<?php echo $menuId; ?>" ><?php echo $menuItems->getItem($menuId)->title; ?></h4>
|
||||||
|
<?php }else if($current_menu_id != $menuId){ ?>
|
||||||
|
<h4 style="display:none" data-current_child="<?php echo $menuId; ?>" ><?php echo $menuItems->getItem($current_menu_id)->title; ?></h4>
|
||||||
|
<?php }else if (isset($menuId)) { ?>
|
||||||
|
<h4 style="display:none" data-current_child="<?php echo $menuId; ?>" ><?php echo $menuItems->getItem($menuId)->title; ?></h4>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if (isset($items[$menuId])) {?>
|
||||||
|
|
||||||
|
<ul class="child-menu-items">
|
||||||
|
<?php echo create_menu($menuId); ?>
|
||||||
|
</ul>
|
||||||
|
<?php } ?>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modules-container"><?php if ($modId){
|
||||||
|
$modArray = explode(',',$modId);
|
||||||
|
foreach ($modArray as $mod_id)
|
||||||
|
{
|
||||||
|
$modules = getModuleNameId($mod_id);
|
||||||
|
|
||||||
|
if ($modules) {
|
||||||
|
$module = $modules[0];
|
||||||
|
?>
|
||||||
|
<div class='draggable-module' data-mod_id="<?php echo $module->id; ?>"><?php echo $module->title; ?><i class="fa fa-remove"></i><i class="fa fa-arrows"></i></div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}?></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($no_child === true)
|
||||||
|
{
|
||||||
|
echo '<div class="menu-section">';
|
||||||
|
echo '<span class="row-move"><i class="fa fa-bars"></i></span>';
|
||||||
|
echo '<div class="spmenu sp-row">';
|
||||||
|
echo '<div class="column sp-col-md-12" data-column="12">';
|
||||||
|
echo '<div class="column-items-wrap">';
|
||||||
|
echo '<h4 style="display:none" data-current_child="'.$current_menu_id.'" >'.$menuItems->getItem($current_menu_id)->title.'</h4>';
|
||||||
|
echo '<ul class="child-menu-items">';
|
||||||
|
|
||||||
|
foreach ($item as $key => $id)
|
||||||
|
{
|
||||||
|
echo '<li>'.$menuItems->getItem($id)->title.'</li>';
|
||||||
|
}
|
||||||
|
echo '</ul>';
|
||||||
|
echo '<div class="modules-container">';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo '<div class="menu-section">';
|
||||||
|
echo '<span class="row-move"><i class="fa fa-bars"></i></span>';
|
||||||
|
echo '<div class="spmenu sp-row">';
|
||||||
|
|
||||||
|
$columnNumber = 12 / $count;
|
||||||
|
foreach ($item_array as $key => $item_array)
|
||||||
|
{
|
||||||
|
echo '<div class="column sp-col-md-'.$columnNumber.'" data-column="'.$columnNumber.'">';
|
||||||
|
echo '<div class="column-items-wrap">';
|
||||||
|
|
||||||
|
foreach ($item_array as $key => $item)
|
||||||
|
{
|
||||||
|
$id = $item[0];
|
||||||
|
echo '<h4 data-current_child="'.$id.'" >'.$menuItems->getItem($id)->title.'</h4>';
|
||||||
|
|
||||||
|
if ($item[1])
|
||||||
|
{
|
||||||
|
echo '<ul class="child-menu-items">';
|
||||||
|
echo create_menu($id);
|
||||||
|
echo '</ul>';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<div class="modules-container"></div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
} ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sp-modal" id="layout-modal" tabindex="-1" role="dialog" aria-labelledby="modal-label" aria-hidden="true">
|
||||||
|
<div class="sp-modal-dialog">
|
||||||
|
<div class="sp-modal-content">
|
||||||
|
<div class="sp-modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="spmodal" aria-hidden="true">×</button>
|
||||||
|
<h3 class="sp-modal-title" id="modal-label"><?php echo JText::_('HELIX_MENU_CHOOSE_LAYOUT'); ?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="sp-modal-body">
|
||||||
|
<ul class="menu-layout-list clearfix">
|
||||||
|
<li><a href="#" class="layout12" data-layout="12" data-design="layout12"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/12.png'; ?>" alt="12"></a></li>
|
||||||
|
<li><a href="#" class="layout66" data-layout="6,6" data-design="layout66"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/6-6.png'; ?>" alt="6+6"></a></li>
|
||||||
|
<li><a href="#" class="layout444" data-layout="4,4,4" data-design="layout444"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/4-4-4.png'; ?>" alt="4+4+4"></a></li>
|
||||||
|
<li><a href="#" class="layout3333" data-layout="3,3,3,3" data-design="layout3333"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/3-3-3-3.png'; ?>" alt="3+3+3+3"></a></li>
|
||||||
|
<li><a href="#" class="layout222222" data-layout="2,2,2,2,2,2" data-design="layout222222"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/2-2-2-2-2-2.png'; ?>" alt="2+2+2+2+2+2"></a></li>
|
||||||
|
<li><a href="#" class="layout57" data-layout="5,7" data-design="layout57"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/5-7.png'; ?>" alt="5+7"></a></li>
|
||||||
|
<li><a href="#" class="layout48" data-layout="4,8" data-design="layout48"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/4-8.png'; ?>" alt="4+8"></a></li>
|
||||||
|
<li><a href="#" class="layout39" data-layout="3,9" data-design="layout39"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/3-9.png'; ?>" alt="3+9"></a></li>
|
||||||
|
<li><a href="#" class="layout44412" data-layout="4,4,4,12" data-design="layout44412"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/4-4-4-12.png'; ?>" alt="4+4+4+12"></a></li>
|
||||||
|
<li><a href="#" class="layout333312" data-layout="3,3,3,3,12" data-design="layout333312"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/3-3-3-3-12.png'; ?>" alt="3+3+3+3+12"></a></li>
|
||||||
|
<li><a href="#" class="layout6612" data-layout="6,6,12" data-design="layout6612"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/6-6-12.png'; ?>" alt="6+6+12"></a></li>
|
||||||
|
<li><a href="#" class="layout44466" data-layout="4,4,4,6,6" data-design="layout44466"><img src="<?php echo JURI::root(true) . '/plugins/system/helix3/assets/images/megamenu/4-4-4-6-6.png'; ?>" alt="4+4+4+6+6"></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="menu-layout">
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout12">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-12" data-column="12">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout66">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-6" data-column="6">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-6" data-column="6">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout444">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{2}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout3333">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{2}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{3}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout222222">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-2" data-column="2">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-2" data-column="2">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-2" data-column="2">
|
||||||
|
<div class="column-items-wrap">{2}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-2" data-column="2">
|
||||||
|
<div class="column-items-wrap">{3}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-2" data-column="2">
|
||||||
|
<div class="column-items-wrap">{4}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-2" data-column="2">
|
||||||
|
<div class="column-items-wrap">{5}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout57">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-5" data-column="5">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-7" data-column="7">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout48">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-8" data-column="8">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout39">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-9" data-column="9">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout44412">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{2}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-12" data-column="12">
|
||||||
|
<div class="column-items-wrap">{3}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout333312">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{2}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-3" data-column="3">
|
||||||
|
<div class="column-items-wrap">{3}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-12" data-column="12">
|
||||||
|
<div class="column-items-wrap">{4}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout6612">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-6" data-column="6">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-6" data-column="6">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-12" data-column="12">
|
||||||
|
<div class="column-items-wrap">{2}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layout-design" id="layout44466">
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{0}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{1}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-4" data-column="4">
|
||||||
|
<div class="column-items-wrap">{2}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="menu-section">
|
||||||
|
<span class="row-move"><i class="fa fa-bars"></i></span>
|
||||||
|
<div class="spmenu sp-row">
|
||||||
|
<div class="column sp-col-sm-6" data-column="6">
|
||||||
|
<div class="column-items-wrap">{3}</div>
|
||||||
|
</div>
|
||||||
|
<div class="column sp-col-sm-6" data-column="6">
|
||||||
|
<div class="column-items-wrap">{4}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
64
deployed/helix3/plugins/system/helix3/fields/modpos.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
JFormHelper::loadFieldClass('text');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Supports a modal article picker.
|
||||||
|
*
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_modules
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
class JFormFieldModPos extends JFormFieldText
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The form field type.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
protected $type = 'ModPos';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to get the field input markup.
|
||||||
|
*
|
||||||
|
* @return string The field input markup.
|
||||||
|
* @since 1.6
|
||||||
|
*/
|
||||||
|
protected function getInput()
|
||||||
|
{
|
||||||
|
$db = JFactory::getDBO();
|
||||||
|
$query = 'SELECT `position` FROM `#__modules` WHERE `client_id`=0 AND ( `published` !=-2 AND `published` !=0 ) GROUP BY `position` ORDER BY `position` ASC';
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
$dbpositions = (array) $db->loadAssocList();
|
||||||
|
|
||||||
|
|
||||||
|
$template = $this->form->getValue('template');
|
||||||
|
$templateXML = JPATH_SITE.'/templates/'.$template.'/templateDetails.xml';
|
||||||
|
$template = simplexml_load_file( $templateXML );
|
||||||
|
$options = array();
|
||||||
|
|
||||||
|
foreach($dbpositions as $positions) $options[] = $positions['position'];
|
||||||
|
|
||||||
|
foreach($template->positions[0] as $position) $options[] = (string) $position;
|
||||||
|
|
||||||
|
$options = array_unique($options);
|
||||||
|
|
||||||
|
$selectOption = array();
|
||||||
|
sort($selectOption);
|
||||||
|
|
||||||
|
foreach($options as $option) $selectOption[] = JHTML::_( 'select.option',$option,$option );
|
||||||
|
|
||||||
|
return JHTML::_('select.genericlist', $selectOption, 'jform[params]['.$this->element['name'].']', 'class="'.$this->element['class'].'"', 'value', 'text', $this->value, 'jform_params_helix_'.$this->element['name']);
|
||||||
|
}
|
||||||
|
}
|
||||||
38
deployed/helix3/plugins/system/helix3/fields/optionio.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
class JFormFieldOptionio extends JFormField
|
||||||
|
{
|
||||||
|
protected $type = 'optionio';
|
||||||
|
|
||||||
|
protected function getInput()
|
||||||
|
{
|
||||||
|
$input = JFactory::getApplication()->input;
|
||||||
|
$template_id = $input->get('id',0,'INT');
|
||||||
|
|
||||||
|
$url_cureent = "//$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||||
|
|
||||||
|
$export_url = $url_cureent . '&helix3task=export';
|
||||||
|
|
||||||
|
$output = '';
|
||||||
|
$output .= '<div class="import-export clearfix" style="margin-bottom:30px;">';
|
||||||
|
$output .= '<a class="btn btn-success" target="_blank" href="'. $export_url .'">'. JText::_("HELIX_SETTINGS_EXPORT") .'</a>';
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '<div class="import-export clearfix">';
|
||||||
|
$output .= '<textarea id="import-data" name="import-data" rows="5" style="margin-bottom:20px;"></textarea>';
|
||||||
|
$output .= '<a id="import-settings" class="btn btn-primary" data-template_id="'. $template_id .'" target="_blank" href="#">'. JText::_("HELIX_SETTINGS_IMPORT") .'</a>';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
}
|
||||||
83
deployed/helix3/plugins/system/helix3/fields/presets.php
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
jimport('joomla.filesystem.folder');
|
||||||
|
jimport('joomla.filesystem.file');
|
||||||
|
|
||||||
|
|
||||||
|
class JFormFieldPresets extends JFormField {
|
||||||
|
|
||||||
|
protected $type = 'Presets';
|
||||||
|
|
||||||
|
protected function getInput()
|
||||||
|
{
|
||||||
|
|
||||||
|
$template = $this->form->getValue('template');
|
||||||
|
$templatePresetsDir = JPATH_SITE.'/templates/'.$template.'/images/presets/';
|
||||||
|
$base_url = JURI::root(true).'/templates/'.$template.'/images/presets/';
|
||||||
|
$root_path = JPATH_SITE.'/templates/'.$template.'/images/presets/';
|
||||||
|
$doc = JFactory::getDocument();
|
||||||
|
$helix_url = JURI::root(true).'/plugins/system/helix3/';
|
||||||
|
|
||||||
|
$folders = JFolder::folders($templatePresetsDir);
|
||||||
|
|
||||||
|
if( !defined('CURRENT_PRESET') ){
|
||||||
|
define('CURRENT_PRESET', $this->value);
|
||||||
|
$doc->addScriptDeclaration('var current_preset = "'.$this->value.'";');
|
||||||
|
}
|
||||||
|
|
||||||
|
$html = '';
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
$template = $app->getTemplate('shaper_helix3');
|
||||||
|
$params = $template->params;
|
||||||
|
$variable = $params->get('variable');
|
||||||
|
|
||||||
|
natsort($folders );
|
||||||
|
|
||||||
|
foreach($folders as $folder)
|
||||||
|
{
|
||||||
|
|
||||||
|
$preset = basename($folder);
|
||||||
|
|
||||||
|
$major_color = $preset . '_major';
|
||||||
|
|
||||||
|
if(isset($this->form->getValue('params')->$major_color) && $this->form->getValue('params')->$major_color) {
|
||||||
|
$major = $this->form->getValue('params')->$major_color;
|
||||||
|
} else {
|
||||||
|
$major = '#333333';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .='<div style="background-color: '. $major .'" data-preset="'. basename($folder) .'" class="preset' .(($this->value == basename($folder))?' active':'').'">';
|
||||||
|
$html .='<div class="preset-title">';
|
||||||
|
$html .= basename($folder);
|
||||||
|
$html .='</div>';
|
||||||
|
|
||||||
|
$html .='<div class="preset-contents">';
|
||||||
|
$html .='<label>';
|
||||||
|
$html .='</div>';
|
||||||
|
|
||||||
|
$html .='</label>';
|
||||||
|
$html .='</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .='<input type="hidden" id="template-preset" value="'. $this->value .'" name="'. $this->name .'" />';
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLabel()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
74
deployed/helix3/plugins/system/helix3/fields/spgallery.php
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class JFormFieldSpgallery extends JFormField {
|
||||||
|
|
||||||
|
protected $type = 'Spgallery';
|
||||||
|
|
||||||
|
protected function getInput()
|
||||||
|
{
|
||||||
|
$doc = JFactory::getDocument();
|
||||||
|
|
||||||
|
JHtml::_('jquery.framework');
|
||||||
|
JHtml::_('jquery.ui', array('core', 'sortable'));
|
||||||
|
|
||||||
|
$plg_path = JURI::root(true) . '/plugins/system/helix3';
|
||||||
|
$doc->addScript($plg_path . '/assets/js/spgallery.js');
|
||||||
|
$doc->addStyleSheet($plg_path . '/assets/css/spgallery.css');
|
||||||
|
|
||||||
|
$values = json_decode($this->value);
|
||||||
|
|
||||||
|
if($values) {
|
||||||
|
$images = $this->element['name'] . '_images';
|
||||||
|
$values = $values->$images;
|
||||||
|
} else {
|
||||||
|
$values = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = '<div class="sp-gallery-field">';
|
||||||
|
$output .= '<ul class="sp-gallery-items clearfix">';
|
||||||
|
|
||||||
|
if(is_array($values) && $values) {
|
||||||
|
foreach ($values as $key => $value) {
|
||||||
|
|
||||||
|
$data_src = $value;
|
||||||
|
|
||||||
|
$src = JURI::root(true) . '/' . $value;
|
||||||
|
|
||||||
|
$basename = basename($src);
|
||||||
|
|
||||||
|
$thumbnail = JPATH_ROOT . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename);
|
||||||
|
if(file_exists($thumbnail)) {
|
||||||
|
$src = JURI::root(true) . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename);
|
||||||
|
}
|
||||||
|
|
||||||
|
$small_size = JPATH_ROOT . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_small.' . JFile::getExt($basename);
|
||||||
|
if(file_exists($small_size)) {
|
||||||
|
$src = JURI::root(true) . '/' . dirname($value) . '/' . JFile::stripExt($basename) . '_small.' . JFile::getExt($basename);
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '<li data-src="' . $data_src . '"><a href="#" class="btn btn-mini btn-danger btn-remove-image">Delete</a><img src="'. $src .'" alt=""></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</ul>';
|
||||||
|
|
||||||
|
$output .= '<input type="file" class="sp-gallery-item-upload" accept="image/*" style="display:none;">';
|
||||||
|
$output .= '<a class="btn btn-default btn-large btn-sp-gallery-item-upload" href="#"><i class="fa fa-plus"></i> Upload Images</a>';
|
||||||
|
|
||||||
|
|
||||||
|
$output .= '<input type="hidden" name="'. $this->name .'" data-name="'. $this->element['name'] .'_images" id="' . $this->id . '" value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8')
|
||||||
|
. '" class="form-field-spgallery">';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
}
|
||||||
64
deployed/helix3/plugins/system/helix3/fields/spimage.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class JFormFieldSpimage extends JFormField
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $type = 'Spimage';
|
||||||
|
|
||||||
|
protected function getInput()
|
||||||
|
{
|
||||||
|
$doc = JFactory::getDocument();
|
||||||
|
|
||||||
|
JHtml::_('jquery.framework');
|
||||||
|
|
||||||
|
$plg_path = JURI::root(true) . '/plugins/system/helix3';
|
||||||
|
$doc->addScript($plg_path . '/assets/js/spimage.js');
|
||||||
|
$doc->addStyleSheet($plg_path . '/assets/css/spimage.css');
|
||||||
|
|
||||||
|
if($this->value) {
|
||||||
|
$class1 = ' hide';
|
||||||
|
$class2 = '';
|
||||||
|
} else {
|
||||||
|
$class1 = '';
|
||||||
|
$class2 = ' hide';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = '<div class="sp-image-field clearfix">';
|
||||||
|
$output .= '<div class="sp-image-upload-wrapper">';
|
||||||
|
|
||||||
|
if($this->value) {
|
||||||
|
$data_src = $this->value;
|
||||||
|
$src = JURI::root(true) . '/' . $data_src;
|
||||||
|
|
||||||
|
$basename = basename($data_src);
|
||||||
|
$thumbnail = JPATH_ROOT . '/' . dirname($data_src) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename);
|
||||||
|
|
||||||
|
if(file_exists($thumbnail)) {
|
||||||
|
$src = JURI::root(true) . '/' . dirname($data_src) . '/' . JFile::stripExt($basename) . '_thumbnail.' . JFile::getExt($basename);
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '<img src="'. $src .'" data-src="' . $data_src . '" alt="">';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
$output .= '<input type="file" class="sp-image-upload" accept="image/*" style="display:none;">';
|
||||||
|
$output .= '<a class="btn btn-info btn-sp-image-upload'. $class1 .'" href="#"><i class="fa fa-plus"></i> Upload Image</a>';
|
||||||
|
$output .= '<a class="btn btn-danger btn-sp-image-remove'. $class2 .'" href="#"><i class="fa fa-minus-circle"></i> Remove Image</a>';
|
||||||
|
|
||||||
|
$output .= '<input type="hidden" name="'. $this->name .'" id="' . $this->id . '" value="' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8')
|
||||||
|
. '" class="form-field-spimage">';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
}
|
||||||
151
deployed/helix3/plugins/system/helix3/fields/typography.php
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.form.formfield');
|
||||||
|
|
||||||
|
class JFormFieldTypography extends JFormField
|
||||||
|
{
|
||||||
|
protected $type = 'Typography';
|
||||||
|
|
||||||
|
protected function getInput() {
|
||||||
|
|
||||||
|
$template_path = JPATH_SITE . '/templates/' . self::getTemplate() . '/webfonts/webfonts.json';
|
||||||
|
$plugin_path = JPATH_PLUGINS . '/system/helix3/assets/webfonts/webfonts.json';
|
||||||
|
|
||||||
|
if(file_exists( $template_path )) {
|
||||||
|
$json = JFile::read( $template_path );
|
||||||
|
} else {
|
||||||
|
$json = JFile::read( $plugin_path );
|
||||||
|
}
|
||||||
|
|
||||||
|
$webfonts = json_decode($json);
|
||||||
|
$items = $webfonts->items;
|
||||||
|
|
||||||
|
$value = json_decode($this->value);
|
||||||
|
|
||||||
|
if(isset($value->fontFamily)) {
|
||||||
|
$font = self::filterArray($items, $value->fontFamily);
|
||||||
|
}
|
||||||
|
|
||||||
|
$html = '';
|
||||||
|
|
||||||
|
$classes = (!empty($this->element['class'])) ? $this->element['class'] : '';
|
||||||
|
|
||||||
|
//Font Family
|
||||||
|
$html .= '<div class="webfont '. $classes .'">';
|
||||||
|
$html .= '<div class="row-fluid">';
|
||||||
|
|
||||||
|
$html .= '<div class="span3 font-families">';
|
||||||
|
$html .= '<label><strong>'. JText::_('HELIX_FONT_FAMILY') .'</strong></label>';
|
||||||
|
$html .= '<select class="list-font-families">';
|
||||||
|
|
||||||
|
foreach ($items as $item) {
|
||||||
|
if(isset($value->fontFamily) && $item->family==$value->fontFamily) {
|
||||||
|
$html .= '<option selected="selected" value="'. $item->family .'">'. $item->family .'</option>';
|
||||||
|
} else {
|
||||||
|
$html .= '<option value="'. $item->family .'">'. $item->family .'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
//Font Weight
|
||||||
|
$html .= '<div class="span2 font-weight">';
|
||||||
|
$html .= '<label><strong>'. JText::_('HELIX_FONT_WEIGHT_STYLE') .'</strong></label>';
|
||||||
|
$html .= '<select class="list-font-weight">';
|
||||||
|
|
||||||
|
if(isset($value->fontFamily)) {
|
||||||
|
foreach ($font->variants as $variant) {
|
||||||
|
if($variant == $value->fontWeight) {
|
||||||
|
$html .= '<option selected="selected" value="'. $variant .'">'. $variant .'</option>';
|
||||||
|
} else {
|
||||||
|
$html .= '<option value="'. $variant .'">'. $variant .'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
foreach ($items[0]->variants as $variant) {
|
||||||
|
$html .= '<option value="'. $variant .'">'. $variant .'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
//Font Subsets
|
||||||
|
$html .= '<div class="span2 font-subsets">';
|
||||||
|
$html .= '<label><strong>'. JText::_('HELIX_FONT_SUBSET') .'</strong></label>';
|
||||||
|
$html .= '<select class="list-font-subset">';
|
||||||
|
|
||||||
|
if(isset($value->fontFamily)) {
|
||||||
|
foreach ($font->subsets as $subset) {
|
||||||
|
if($subset == $value->fontSubset) {
|
||||||
|
$html .= '<option selected="selected" value="'. $subset .'">'. $subset .'</option>';
|
||||||
|
} else {
|
||||||
|
$html .= '<option value="'. $subset .'">'. $subset .'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
foreach ($items[0]->subsets as $subset) {
|
||||||
|
$html .= '<option value="'. $subset .'">'. $subset .'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
//Font Size
|
||||||
|
$fontSize = (isset($value->fontSize))?$value->fontSize:'';
|
||||||
|
$html .= '<div class="span2 font-size">';
|
||||||
|
$html .= '<label><strong>'. JText::_('HELIX_FONT_SIZE') .'</strong></label>';
|
||||||
|
$html .= '<input type="number" value="'. $fontSize .'" class="webfont-size" min="1" placeholder="14">';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
//Preview
|
||||||
|
$html .= '<p style="display:none" class="webfont-preview">1 2 3 4 5 6 7 8 9 0 Grumpy wizards make toxic brew for the evil Queen and Jack.</p>';
|
||||||
|
|
||||||
|
$html .= '<input type="hidden" name="' . $this->name .'" value="'. $this->value .'" class="input-webfont" id="'. $this->id .'">';
|
||||||
|
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get current font
|
||||||
|
private static function filterArray($items, $key) {
|
||||||
|
|
||||||
|
foreach ($items as $item) {
|
||||||
|
if($item->family == $key) {
|
||||||
|
return $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Get template name
|
||||||
|
private static function getTemplate() {
|
||||||
|
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('template')));
|
||||||
|
$query->from($db->quoteName('#__template_styles'));
|
||||||
|
$query->where($db->quoteName('id') . ' = '. $db->quote( JRequest::getVar('id') ));
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
204
deployed/helix3/plugins/system/helix3/helix3.php
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
jimport('joomla.plugin.plugin');
|
||||||
|
jimport( 'joomla.event.plugin' );
|
||||||
|
jimport('joomla.registry.registry');
|
||||||
|
|
||||||
|
if(!class_exists('Helix3')) {
|
||||||
|
require_once (__DIR__ . '/core/helix3.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
class plgSystemHelix3 extends JPlugin
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $autoloadLanguage = true;
|
||||||
|
|
||||||
|
// Copied style
|
||||||
|
function onAfterDispatch() {
|
||||||
|
|
||||||
|
if( !JFactory::getApplication()->isAdmin() ) {
|
||||||
|
|
||||||
|
$activeMenu = JFactory::getApplication()->getMenu()->getActive();
|
||||||
|
|
||||||
|
if(is_null($activeMenu)) $template_style_id = 0;
|
||||||
|
else $template_style_id = (int) $activeMenu->template_style_id;
|
||||||
|
if( $template_style_id > 0 ){
|
||||||
|
|
||||||
|
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_templates/tables');
|
||||||
|
$style = JTable::getInstance('Style', 'TemplatesTable');
|
||||||
|
$style->load($template_style_id);
|
||||||
|
|
||||||
|
if( !empty($style->template) ) JFactory::getApplication()->setTemplate($style->template, $style->params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onContentPrepareForm($form, $data) {
|
||||||
|
|
||||||
|
$doc = JFactory::getDocument();
|
||||||
|
$plg_path = JURI::root(true).'/plugins/system/helix3';
|
||||||
|
JForm::addFormPath(JPATH_PLUGINS.'/system/helix3/params');
|
||||||
|
|
||||||
|
if ($form->getName()=='com_menus.item') { //Add Helix menu params to the menu item
|
||||||
|
JHtml::_('jquery.framework');
|
||||||
|
$data = (array)$data;
|
||||||
|
|
||||||
|
if($data['id'] && $data['parent_id'] == 1) {
|
||||||
|
JHtml::_('jquery.ui', array('core', 'more', 'sortable'));
|
||||||
|
$doc->addScript($plg_path.'/assets/js/jquery-ui.draggable.min.js');
|
||||||
|
$doc->addStyleSheet($plg_path.'/assets/css/bootstrap.css');
|
||||||
|
$doc->addStyleSheet($plg_path.'/assets/css/font-awesome.min.css');
|
||||||
|
$doc->addStyleSheet($plg_path.'/assets/css/modal.css');
|
||||||
|
$doc->addStyleSheet($plg_path.'/assets/css/menu.generator.css');
|
||||||
|
$doc->addScript($plg_path.'/assets/js/modal.js');
|
||||||
|
$doc->addScript( $plg_path. '/assets/js/menu.generator.js' );
|
||||||
|
$form->loadFile('menu-parent', false);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$form->loadFile('menu-child', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$form->loadFile('page-title', false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Article Post format
|
||||||
|
if ($form->getName()=='com_content.article') {
|
||||||
|
JHtml::_('jquery.framework');
|
||||||
|
$doc->addStyleSheet($plg_path.'/assets/css/font-awesome.min.css');
|
||||||
|
$doc->addScript($plg_path.'/assets/js/post-formats.js');
|
||||||
|
|
||||||
|
$tpl_path = JPATH_ROOT . '/templates/' . $this->getTemplateName();
|
||||||
|
|
||||||
|
if(JFile::exists( $tpl_path . '/post-formats.xml' )) {
|
||||||
|
JForm::addFormPath($tpl_path);
|
||||||
|
} else {
|
||||||
|
JForm::addFormPath(JPATH_PLUGINS . '/system/helix3/params');
|
||||||
|
}
|
||||||
|
|
||||||
|
$form->loadFile('post-formats', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Live Update system
|
||||||
|
public function onExtensionAfterSave($option, $data) {
|
||||||
|
|
||||||
|
if ($option == 'com_templates.style' && !empty($data->id)) {
|
||||||
|
|
||||||
|
$params = new JRegistry;
|
||||||
|
$params->loadString($data->params);
|
||||||
|
|
||||||
|
$email = $params->get('joomshaper_email');
|
||||||
|
$license_key = $params->get('joomshaper_license_key');
|
||||||
|
$template = trim($data->template);
|
||||||
|
|
||||||
|
if(!empty($email) and !empty($license_key) )
|
||||||
|
{
|
||||||
|
|
||||||
|
$extra_query = 'joomshaper_email=' . urlencode($email);
|
||||||
|
$extra_query .='&joomshaper_license_key=' . urlencode($license_key);
|
||||||
|
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
|
||||||
|
$fields = array(
|
||||||
|
$db->quoteName('extra_query') . '=' . $db->quote($extra_query),
|
||||||
|
$db->quoteName('last_check_timestamp') . '=0'
|
||||||
|
);
|
||||||
|
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->update($db->quoteName('#__update_sites'))
|
||||||
|
->set($fields)
|
||||||
|
->where($db->quoteName('name').'='.$db->quote($template));
|
||||||
|
$db->setQuery($query);
|
||||||
|
$db->execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onAfterRoute()
|
||||||
|
{
|
||||||
|
$japps = JFactory::getApplication();
|
||||||
|
|
||||||
|
if ( $japps->isAdmin() )
|
||||||
|
{
|
||||||
|
$user = JFactory::getUser();
|
||||||
|
|
||||||
|
if( !in_array( 8, $user->groups ) ){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$inputs = JFactory::getApplication()->input;
|
||||||
|
|
||||||
|
$option = $inputs->get ( 'option', '' );
|
||||||
|
$id = $inputs->get ( 'id', '0', 'INT' );
|
||||||
|
$helix3task = $inputs->get ( 'helix3task' ,'' );
|
||||||
|
|
||||||
|
if ( strtolower( $option ) == 'com_templates' && $id && $helix3task == "export" )
|
||||||
|
{
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
|
||||||
|
$query
|
||||||
|
->select( '*' )
|
||||||
|
->from( $db->quoteName( '#__template_styles' ) )
|
||||||
|
->where( $db->quoteName( 'id' ) . ' = ' . $db->quote( $id ) . ' AND ' . $db->quoteName( 'client_id' ) . ' = 0' );
|
||||||
|
|
||||||
|
$db->setQuery( $query );
|
||||||
|
|
||||||
|
$result = $db->loadObject();
|
||||||
|
|
||||||
|
header( 'Content-Description: File Transfer' );
|
||||||
|
header( 'Content-type: application/txt' );
|
||||||
|
header( 'Content-Disposition: attachment; filename="' . $result->template . '_settings_' . date( 'd-m-Y' ) . '.json"' );
|
||||||
|
header( 'Content-Transfer-Encoding: binary' );
|
||||||
|
header( 'Expires: 0' );
|
||||||
|
header( 'Cache-Control: must-revalidate' );
|
||||||
|
header( 'Pragma: public' );
|
||||||
|
|
||||||
|
echo $result->params;
|
||||||
|
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getTemplateName()
|
||||||
|
{
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('template')));
|
||||||
|
$query->from($db->quoteName('#__template_styles'));
|
||||||
|
$query->where($db->quoteName('client_id') . ' = 0');
|
||||||
|
$query->where($db->quoteName('home') . ' = 1');
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadObject()->template;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onAfterRender() {
|
||||||
|
$app = JFactory::getApplication();
|
||||||
|
|
||||||
|
if ($app->isAdmin())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$body = JResponse::getBody();
|
||||||
|
$preset = Helix3::Preset();
|
||||||
|
|
||||||
|
$body = str_replace('{helix_preset}', $preset, $body);
|
||||||
|
|
||||||
|
JResponse::setBody($body);
|
||||||
|
}
|
||||||
|
}
|
||||||
32
deployed/helix3/plugins/system/helix3/helix3.xml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<extension version="3.4" type="plugin" group="system" method="upgrade">
|
||||||
|
<name>System - Helix3 Framework</name>
|
||||||
|
<author>JoomShaper.com</author>
|
||||||
|
<creationDate>Jan 2015</creationDate>
|
||||||
|
<copyright>Copyright (C) 2010 - 2017 JoomShaper. All rights reserved.</copyright>
|
||||||
|
<license>http://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later</license>
|
||||||
|
<authorEmail>support@joomshaper.com</authorEmail>
|
||||||
|
<authorUrl>www.joomshaper.com</authorUrl>
|
||||||
|
<version>2.5.5</version>
|
||||||
|
<description>Helix3 Framework - Joomla Template Framework by JoomShaper</description>
|
||||||
|
|
||||||
|
<updateservers>
|
||||||
|
<server type="extension" priority="1" name="System - Helix3 Framework">http://www.joomshaper.com/updates/plg-system-helix3.xml</server>
|
||||||
|
</updateservers>
|
||||||
|
|
||||||
|
<languages>
|
||||||
|
<language tag="en-GB">language/en-GB.plg_system_helix3.ini</language>
|
||||||
|
</languages>
|
||||||
|
|
||||||
|
<files>
|
||||||
|
<filename plugin="helix3">helix3.php</filename>
|
||||||
|
<folder plugin="helix3">assets</folder>
|
||||||
|
<folder plugin="helix3">core</folder>
|
||||||
|
<folder plugin="helix3">language</folder>
|
||||||
|
<folder plugin="helix3">fields</folder>
|
||||||
|
<folder plugin="helix3">layout</folder>
|
||||||
|
<folder plugin="helix3">layouts</folder>
|
||||||
|
<folder plugin="helix3">params</folder>
|
||||||
|
</files>
|
||||||
|
<fieldset addfieldpath="/plugins/system/helix3/fields"></fieldset>
|
||||||
|
</extension>
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
;Megamenu
|
||||||
|
HELIX_MENU="Helix Megamenu Options"
|
||||||
|
HELIX_SUB_MENU="Helix Menu Options"
|
||||||
|
HELIX_MENU_SHOW_TITLE="Show Menu Title"
|
||||||
|
HELIX_MENU_SHOW_TITLE_DESC="Disable this option to hide menu title."
|
||||||
|
HELIX_MENU_ICON="Menu Icon"
|
||||||
|
HELIX_MENU_ICON_DESC="Select any icon from the list to display just before this menu item title."
|
||||||
|
HELIX_MENU_CLASS="Custom CSS Class"
|
||||||
|
HELIX_MENU_CLASS_DESC="Add custom css class to this menu item."
|
||||||
|
HELIX_MENU_MANAGE_LAYOUT="Manage Layout"
|
||||||
|
HELIX_GLOBAL_LEFT="Left"
|
||||||
|
HELIX_GLOBAL_CENTER="Center"
|
||||||
|
HELIX_GLOBAL_RIGHT="Right"
|
||||||
|
HELIX_GLOBAL_FULL="Full"
|
||||||
|
HELIX_GLOBAL_RESET="Reset"
|
||||||
|
HELIX_MENU_SUB_WIDTH="Dropdown Width"
|
||||||
|
HELIX_MENU_DRAG_MODULE="Drag Module"
|
||||||
|
HELIX_MENU_CHOOSE_LAYOUT="Choose Layout"
|
||||||
|
HELIX_YES="Yes"
|
||||||
|
HELIX_NO="NO"
|
||||||
|
HELIX_MENU_DROPDOWN_POSITION="Dropdown Position"
|
||||||
|
HELIX_MENU_DROPDOWN_POSITION_DESC="Set the position of the dropdown under this menu item."
|
||||||
|
|
||||||
|
;Page Title
|
||||||
|
HELIX_PAGE_TITLE="Helix Page Title"
|
||||||
|
ENABLE_PAGE_TITLE="Enable Page Title"
|
||||||
|
ENABLE_PAGE_TITLE_DESC="Enable this option show page title after just below the header."
|
||||||
|
ENABLE_PAGE_TITLE="Enable Page Title"
|
||||||
|
ENABLE_PAGE_TITLE_DESC="Enable this option show page title after just below the header."
|
||||||
|
PAGE_TITLE_ALT="Alternative Title"
|
||||||
|
PAGE_TITLE_ALT_DESC="Alternative title will override joomla default menu title."
|
||||||
|
PAGE_SUBTITLE="Page Subtitle"
|
||||||
|
PAGE_SUBTITLE_DESC="Add brief description about the page as page subtitle."
|
||||||
|
PAGE_BACKGROUND_COLOR="Background Color"
|
||||||
|
PAGE_BACKGROUND_COLOR_DESC="Background color for the title area."
|
||||||
|
PAGE_BACKGROUND_IMAGE="Background Image"
|
||||||
|
PAGE_BACKGROUND_IMAGE_DESC="Background image for the title area."
|
||||||
|
|
||||||
|
;Blog
|
||||||
|
BLOG_OPTIONS="<i class='fa fa-joomla fa-fw'></i>Helix Blog Options"
|
||||||
|
BLOG_POST_FORMAT_STANDARD="<i class='fa fa-thumb-tack fa-fw'></i> Standard"
|
||||||
|
BLOG_POST_FORMAT_VIDEO="<i class='fa fa-film fa-fw'></i> Video"
|
||||||
|
BLOG_POST_FORMAT_GALLERY="<i class='fa fa-picture-o fa-fw'></i> Gallery"
|
||||||
|
BLOG_POST_FORMAT_AUDIO="<i class='fa fa-music fa-fw'></i> Audio"
|
||||||
|
BLOG_POST_FORMAT_LINK="<i class='fa fa-link fa-fw'></i> Link"
|
||||||
|
BLOG_POST_FORMAT_QUOTE="<i class='fa fa-quote-left fa-fw'></i> Quote"
|
||||||
|
BLOG_POST_FORMAT_STATUS="<i class='fa fa-comment-o fa-fw'></i> Status"
|
||||||
|
BLOG_POST_FORMAT_GALLERY_LABEL="Upload Gallery Images"
|
||||||
|
BLOG_POST_FORMAT_GALLERY_DESCRIPTION="Select one or more images"
|
||||||
|
BLOG_POST_FORMAT_AUDIO_LABEL="Audio Embed Code"
|
||||||
|
BLOG_POST_FORMAT_AUDIO_DESCRIPTION="Write Your Audio Embed Code Here"
|
||||||
|
BLOG_POST_FORMAT_VIDEO_LABEL="Video URL"
|
||||||
|
BLOG_POST_FORMAT_VIDEO_DESCRIPTION="Add YouTube or Vimeo full URL."
|
||||||
|
BLOG_POST_FORMAT_LINK_TITLE_LABEL="Link Title"
|
||||||
|
BLOG_POST_FORMAT_LINK_TITLE_DESCRIPTION="Add the title of the link."
|
||||||
|
BLOG_POST_FORMAT_LINK_LABEL="Link URL"
|
||||||
|
BLOG_POST_FORMAT_LINK_DESCRIPTION="Add Link URL."
|
||||||
|
BLOG_POST_FORMAT_QUOTE_TEXT_LABEL="Quote Text"
|
||||||
|
BLOG_POST_FORMAT_QUOTE_TEXT_DESCRIPTION="Add quote text"
|
||||||
|
BLOG_POST_FORMAT_QUOTE_AUTHOR_LABEL="Quote Author"
|
||||||
|
BLOG_POST_FORMAT_QUOTE_AUTHOR_DESCRIPTION="Add Quote Author. e.g. John Doe"
|
||||||
|
BLOG_POST_FORMAT_STATUS_LABEL="Add Status"
|
||||||
|
BLOG_POST_FORMAT_STATUS_DESCRIPTION="Add embeded status. Write Facebook, Twitter etc status link"
|
||||||
193
deployed/helix3/plugins/system/helix3/layout/generated.php
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
$types = JFolder::files( dirname( __FILE__ ) . '/types', '\.php$', false, true);
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($types as $type) {
|
||||||
|
require_once $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
// require_once 'layout-settings/fields-helper.php';
|
||||||
|
require_once 'layout-settings/row-column-settings.php';
|
||||||
|
|
||||||
|
echo RowColumnSettings::getRowSettings($rowSettings);
|
||||||
|
echo RowColumnSettings::getColumnSettings($columnSettings);
|
||||||
|
|
||||||
|
$colGrid = array(
|
||||||
|
'12' => '12',
|
||||||
|
'66' => '6,6',
|
||||||
|
'444' => '4,4,4',
|
||||||
|
'3333' => '3,3,3,3',
|
||||||
|
'48' => '4,8',
|
||||||
|
'39' => '3,9',
|
||||||
|
'363' => '3,6,3',
|
||||||
|
'264' => '2,6,4',
|
||||||
|
'210' => '2,10',
|
||||||
|
'57' => '5,7',
|
||||||
|
'237' => '2,3,7',
|
||||||
|
'255' => '2,5,5',
|
||||||
|
'282' => '2,8,2',
|
||||||
|
'2442' => '2,4,4,2',
|
||||||
|
);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="hidden">
|
||||||
|
<div class="save-box">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>
|
||||||
|
<?php echo JText::_('HELIX_ENTER_LAYOUT_NAME'); ?>
|
||||||
|
<input class="form-control addon-input addon-name" type="text" data-attrname="layout_name" value="" placeholder="">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal for all -->
|
||||||
|
|
||||||
|
<div class="sp-modal" id="layout-modal" tabindex="-1" role="dialog" aria-labelledby="modal-label" aria-hidden="true">
|
||||||
|
<div class="sp-modal-dialog">
|
||||||
|
<div class="sp-modal-content">
|
||||||
|
<div class="sp-modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="spmodal" aria-hidden="true">×</button>
|
||||||
|
<h3 class="sp-modal-title" id="modal-label"></h3>
|
||||||
|
</div>
|
||||||
|
<div class="sp-modal-body"></div>
|
||||||
|
<div class="sp-modal-footer clearfix">
|
||||||
|
<a href="javascript:void(0)" class="sppb-btn sppb-btn-success pull-left" id="save-settings" data-dismiss="spmodal"><?php echo JText::_('HELIX_APPLY'); ?></a>
|
||||||
|
<button class="sppb-btn sppb-btn-danger pull-left" data-dismiss="spmodal" aria-hidden="true"><?php echo JText::_('HELIX_CANCEL'); ?></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hidden">
|
||||||
|
<div id="layoutbuilder-section">
|
||||||
|
<div class="settings-section clearfix">
|
||||||
|
|
||||||
|
<div class="settings-left pull-left">
|
||||||
|
<a class="row-move" href="#"><i class="fa fa-arrows"></i></a>
|
||||||
|
<strong class="section-title"><?php echo JText::_('HELIX_SECTION_TITLE'); ?></strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="settings-right pull-right">
|
||||||
|
<ul class="button-group">
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-small add-columns" href="#"><i class="fa fa-columns"></i> <?php echo JText::_('HELIX_ADD_COLUMNS'); ?></a>
|
||||||
|
<ul class="column-list">
|
||||||
|
<?php
|
||||||
|
foreach ($colGrid as $key => $grid){
|
||||||
|
$active = ($key==12) ? ' active' : '';
|
||||||
|
echo '<li><a href="#" class="column-layout hasTooltip column-layout-' .$key. $active .'" data-layout="'.$grid.'" data-original-title="<strong>'.$grid.'</strong>"></a></li>';
|
||||||
|
$active = '';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li><a href="#" class="hasTooltip column-layout-custom column-layout custom <?php echo $active; ?>" data-layout="" data-type='custom' data-original-title="<strong>Custom Layout</strong>"></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a class="btn btn-small add-row" href="#"><i class="fa fa-bars"></i> <?php echo JText::_('HELIX_ADD_ROW'); ?></a></li>
|
||||||
|
<li><a class="btn btn-small row-ops-set" href="#"><i class="fa fa-gears"></i> <?php echo JText::_('HELIX_SETTINGS'); ?></a></li>
|
||||||
|
<li><a class="btn btn-danger btn-small remove-row" href="#"><i class="fa fa-times"></i> <?php echo JText::_('HELIX_REMOVE'); ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row ui-sortable">
|
||||||
|
<div class="layout-column col-sm-12">
|
||||||
|
<div class="column">
|
||||||
|
<h6 class="col-title pull-left"><?php echo JText::_('HELIX_NONE'); ?></h6>
|
||||||
|
<a class="col-ops-set pull-right" href="#" ><i class="fa fa-gears"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<!-- Layout Builder Section -->
|
||||||
|
<div id="helix-layout-builder" >
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if ($layout_data) {
|
||||||
|
foreach ($layout_data as $row) {
|
||||||
|
$rowSettings = RowColumnSettings::getSettings($row->settings);
|
||||||
|
$name = JText::_('HELIX_SECTION_TITLE');
|
||||||
|
|
||||||
|
if (isset($row->settings->name)) {
|
||||||
|
$name = $row->settings->name;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="layoutbuilder-section" <?php echo $rowSettings; ?>>
|
||||||
|
<div class="settings-section clearfix">
|
||||||
|
<div class="settings-left pull-left">
|
||||||
|
<a class="row-move" href="#"><i class="fa fa-arrows"></i></a>
|
||||||
|
<strong class="section-title"><?php echo $name; ?></strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="settings-right pull-right">
|
||||||
|
<ul class="button-group">
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-small add-columns" href="#"><i class="fa fa-columns"></i> <?php echo JText::_('HELIX_ADD_COLUMNS'); ?></a>
|
||||||
|
<ul class="column-list">
|
||||||
|
<?php
|
||||||
|
$active = '';
|
||||||
|
foreach ($colGrid as $key => $grid){
|
||||||
|
if($key == $row->layout){
|
||||||
|
$active = 'active';
|
||||||
|
}
|
||||||
|
echo '<li><a href="#" class="column-layout hasTooltip column-layout-' .$key. ' '.$active.'" data-layout="'.$grid.'" data-original-title="<strong>'.$grid.'</strong>"></a></li>';
|
||||||
|
$active ='';
|
||||||
|
} ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$customLayout = '';
|
||||||
|
if (!isset($colGrid[$row->layout])) {
|
||||||
|
$active = 'active';
|
||||||
|
$split = str_split($row->layout);
|
||||||
|
$customLayout = implode(',',$split);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li><a href="#" class="hasTooltip column-layout-custom column-layout custom <?php echo $active; ?>" data-layout="<?php echo $customLayout; ?>" data-type='custom' data-original-title="<strong>Custom Layout</strong>"></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a class="btn btn-small add-row" href="#"><i class="fa fa-bars"></i> <?php echo JText::_('HELIX_ADD_ROW'); ?></a></li>
|
||||||
|
<li><a class="btn btn-small row-ops-set" href="#"><i class="fa fa-gears"></i> <?php echo JText::_('HELIX_SETTINGS'); ?></a></li>
|
||||||
|
<li><a class="btn btn-danger btn-small remove-row" href="#"><i class="fa fa-times"></i> <?php echo JText::_('HELIX_REMOVE'); ?></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row ui-sortable">
|
||||||
|
<?php foreach ($row->attr as $column) { $colSettings = RowColumnSettings::getSettings($column->settings); ?>
|
||||||
|
<div class="<?php echo $column->className; ?>" <?php echo $colSettings; ?>>
|
||||||
|
<div class="column">
|
||||||
|
<?php if (isset($column->settings->column_type) && $column->settings->column_type) {
|
||||||
|
echo '<h6 class="col-title pull-left">Component</h6>';
|
||||||
|
}else{
|
||||||
|
if (!isset($column->settings->name)) {
|
||||||
|
$column->settings->name = 'none';
|
||||||
|
}
|
||||||
|
echo '<h6 class="col-title pull-left">'.$column->settings->name.'</h6>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<a class="col-ops-set pull-right" href="#" ><i class="fa fa-gears"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class FieldsHelper{
|
||||||
|
|
||||||
|
protected function __construct()
|
||||||
|
{
|
||||||
|
|
||||||
|
$types = JFolder::files( dirname( __FILE__ ) . '/types', '\.php$', false, true);
|
||||||
|
|
||||||
|
foreach ($types as $type) {
|
||||||
|
require_once $type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function getInputElements( $key, $attr )
|
||||||
|
{
|
||||||
|
return call_user_func(array( 'SpType' . ucfirst( $attr['type'] ), 'getInput'), $key, $attr );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,325 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
$rowSettings = array(
|
||||||
|
'type'=>'general',
|
||||||
|
'title'=>'',
|
||||||
|
'attr'=>array(
|
||||||
|
|
||||||
|
'name' => array(
|
||||||
|
'type' => 'text',
|
||||||
|
'title' => JText::_('HELIX_SECTION_TITLE'),
|
||||||
|
'desc' => JText::_('HELIX_SECTION_TITLE_DESC'),
|
||||||
|
'std' => ''
|
||||||
|
),
|
||||||
|
'background_color' => array(
|
||||||
|
'type' => 'color',
|
||||||
|
'title' => JText::_('HELIX_SECTION_BACKGROUND_COLOR'),
|
||||||
|
'desc' => JText::_('HELIX_SECTION_BACKGROUND_COLOR_DESC')
|
||||||
|
),
|
||||||
|
'color' => array(
|
||||||
|
'type' => 'color',
|
||||||
|
'title' => JText::_('HELIX_SECTION_TEXT_COLOR'),
|
||||||
|
'desc' => JText::_('HELIX_SECTION_TEXT_COLOR_DESC')
|
||||||
|
),
|
||||||
|
'background_image' => array(
|
||||||
|
'type' => 'media',
|
||||||
|
'title' => JText::_('HELIX_SECTION_BACKGROUND_IMAGE'),
|
||||||
|
'desc' => JText::_('HELIX_SECTION_BACKGROUND_IMAGE_DESC'),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'background_repeat'=>array(
|
||||||
|
'type'=>'select',
|
||||||
|
'title'=>JText::_('HELIX_BG_REPEAT'),
|
||||||
|
'desc'=>JText::_('HELIX_BG_REPEAT_DESC'),
|
||||||
|
'values'=>array(
|
||||||
|
'no-repeat'=>JText::_('HELIX_BG_REPEAT_NO'),
|
||||||
|
'repeat'=>JText::_('HELIX_BG_REPEAT_ALL'),
|
||||||
|
'repeat-x'=>JText::_('HELIX_BG_REPEAT_HORIZ'),
|
||||||
|
'repeat-y'=>JText::_('HELIX_BG_REPEAT_VERTI'),
|
||||||
|
'inherit'=>JText::_('HELIX_BG_REPEAT_INHERIT'),
|
||||||
|
),
|
||||||
|
'std'=>'no-repeat',
|
||||||
|
),
|
||||||
|
'background_size' => array(
|
||||||
|
'type' => 'select',
|
||||||
|
'title'=>JText::_('HELIX_BG_SIZE'),
|
||||||
|
'desc'=>JText::_('HELIX_BG_SIZE_DESC'),
|
||||||
|
'values'=>array(
|
||||||
|
'cover'=>JText::_('HELIX_BG_COVER'),
|
||||||
|
'contain'=>JText::_('HELIX_BG_CONTAIN'),
|
||||||
|
'inherit'=>JText::_('HELIX_BG_INHERIT'),
|
||||||
|
),
|
||||||
|
'std'=>'cover',
|
||||||
|
),
|
||||||
|
'background_attachment'=>array(
|
||||||
|
'type'=>'select',
|
||||||
|
'title'=>JText::_('HELIX_BG_ATTACHMENT'),
|
||||||
|
'desc'=>JText::_('HELIX_BG_ATTACHMENT_DESC'),
|
||||||
|
'values'=>array(
|
||||||
|
'fixed'=>JText::_('HELIX_BG_ATTACHMENT_FIXED'),
|
||||||
|
'scroll'=>JText::_('HELIX_BG_ATTACHMENT_SCROLL'),
|
||||||
|
'inherit'=>JText::_('HELIX_BG_ATTACHMENT_INHERIT'),
|
||||||
|
),
|
||||||
|
'std'=>'fixed',
|
||||||
|
),
|
||||||
|
'background_position' => array(
|
||||||
|
'type' => 'select',
|
||||||
|
'title'=>JText::_('HELIX_BG_POSITION'),
|
||||||
|
'desc'=>JText::_('HELIX_BG_POSITION_DESC'),
|
||||||
|
'values'=>array(
|
||||||
|
'0 0'=>JText::_('HELIX_BG_POSITION_LEFT_TOP'),
|
||||||
|
'0 50%'=>JText::_('HELIX_BG_POSITION_LEFT_CENTER'),
|
||||||
|
'0 100%'=>JText::_('HELIX_BG_POSITION_LEFT_BOTTOM'),
|
||||||
|
'50% 0'=>JText::_('HELIX_BG_POSITION_CENTER_TOP'),
|
||||||
|
'50% 50%'=>JText::_('HELIX_BG_POSITION_CENTER_CENTER'),
|
||||||
|
'50% 100%'=>JText::_('HELIX_BG_POSITION_CENTER_BOTTOM'),
|
||||||
|
'100% 0'=>JText::_('HELIX_BG_POSITION_RIGHT_TOP'),
|
||||||
|
'100% 50%'=>JText::_('HELIX_BG_POSITION_RIGHT_CENTER'),
|
||||||
|
'100% 100%'=>JText::_('HELIX_BG_POSITION_RIGHT_BOTTOM'),
|
||||||
|
),
|
||||||
|
'std'=>'0 0',
|
||||||
|
),
|
||||||
|
'link_color' => array(
|
||||||
|
'type' => 'color',
|
||||||
|
'title' => JText::_('HELIX_LINK_COLOR'),
|
||||||
|
'desc' => JText::_('HELIX_LINK_COLOR_DESC')
|
||||||
|
),
|
||||||
|
'link_hover_color' => array(
|
||||||
|
'type' => 'color',
|
||||||
|
'title' => JText::_('HELIX_LINK_HOVER_COLOR'),
|
||||||
|
'desc' => JText::_('HELIX_LINK_HOVER_COLOR_DESC')
|
||||||
|
),
|
||||||
|
'hidden_xs' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => JText::_('HELIX_HIDDEN_MOBILE'),
|
||||||
|
'desc' => JText::_('HELIX_HIDDEN_MOBILE_DESC'),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'hidden_sm' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => JText::_('HELIX_HIDDEN_TABLET'),
|
||||||
|
'desc' => JText::_('HELIX_HIDDEN_TABLET_DESC'),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'hidden_md' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => JText::_('HELIX_HIDDEN_DESKTOP'),
|
||||||
|
'desc' => JText::_('HELIX_HIDDEN_DESKTOP_DESC'),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'padding' => array(
|
||||||
|
'type' => 'text',
|
||||||
|
'title' => JText::_('HELIX_PADDING'),
|
||||||
|
'desc' => JText::_('HELIX_PADDING_DESC'),
|
||||||
|
'std' => ''
|
||||||
|
),
|
||||||
|
'margin' => array(
|
||||||
|
'type' => 'text',
|
||||||
|
'title' => JText::_('HELIX_MARGIN'),
|
||||||
|
'desc' => JText::_('HELIX_MARGIN_DESC'),
|
||||||
|
'std' => ''
|
||||||
|
),
|
||||||
|
'fluidrow' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => JText::_('HELIX_ROW_FULL_WIDTH'),
|
||||||
|
'desc' => JText::_('HELIX_ROW_FULL_WIDTH_DESC'),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'custom_class' => array(
|
||||||
|
'type' => 'text',
|
||||||
|
'title' => JText::_('HELIX_CUSTOM_CLASS'),
|
||||||
|
'desc' => JText::_('HELIX_CUSTOM_CLASS_DESC'),
|
||||||
|
'std' => ''
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$columnSettings = array(
|
||||||
|
'type'=>'general',
|
||||||
|
'title'=>'',
|
||||||
|
'attr'=>array(
|
||||||
|
|
||||||
|
'column_type' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => JText::_('HELIX_COMPONENT'),
|
||||||
|
'desc' => JText::_('HELIX_COMPONENT_DESC'),
|
||||||
|
'std'=>'',
|
||||||
|
),
|
||||||
|
'name' => array(
|
||||||
|
'type' => 'select',
|
||||||
|
'title' => JText::_('HELIX_MODULE_POSITION'),
|
||||||
|
'desc' => JText::_('HELIX_MODULE_POSITION_DESC'),
|
||||||
|
'values' => array(),
|
||||||
|
'std'=>'none',
|
||||||
|
),
|
||||||
|
'hidden_xs' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => JText::_('HELIX_HIDDEN_MOBILE'),
|
||||||
|
'desc' => JText::_('HELIX_HIDDEN_MOBILE_DESC'),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'hidden_sm' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => JText::_('HELIX_HIDDEN_TABLET'),
|
||||||
|
'desc' => JText::_('HELIX_HIDDEN_TABLET_DESC'),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'hidden_md' => array(
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'title' => JText::_('HELIX_HIDDEN_DESKTOP'),
|
||||||
|
'desc' => JText::_('HELIX_HIDDEN_DESKTOP_DESC'),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'sm_col' => array(
|
||||||
|
'type' => 'select',
|
||||||
|
'title' => JText::_('HELIX_TABLET_LAYOUT'),
|
||||||
|
'desc' => JText::_('HELIX_TABLET_LAYOUT_DESC'),
|
||||||
|
'values' => array(
|
||||||
|
'' => "",
|
||||||
|
'col-sm-1' => 'col-sm-1',
|
||||||
|
'col-sm-2' => 'col-sm-2',
|
||||||
|
'col-sm-3' => 'col-sm-3',
|
||||||
|
'col-sm-4' => 'col-sm-4',
|
||||||
|
'col-sm-5' => 'col-sm-5',
|
||||||
|
'col-sm-6' => 'col-sm-6',
|
||||||
|
'col-sm-7' => 'col-sm-7',
|
||||||
|
'col-sm-8' => 'col-sm-8',
|
||||||
|
'col-sm-9' => 'col-sm-9',
|
||||||
|
'col-sm-10' => 'col-sm-10',
|
||||||
|
'col-sm-11' => 'col-sm-11',
|
||||||
|
'col-sm-12' => 'col-sm-12',
|
||||||
|
),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'xs_col' => array(
|
||||||
|
'type' => 'select',
|
||||||
|
'title' => JText::_('HELIX_MOBILE_LAYOUT'),
|
||||||
|
'desc' => JText::_('HELIX_MOBILE_LAYOUT_DESC'),
|
||||||
|
'values' => array(
|
||||||
|
'' => "",
|
||||||
|
'col-xs-1' => 'col-xs-1',
|
||||||
|
'col-xs-2' => 'col-xs-2',
|
||||||
|
'col-xs-3' => 'col-xs-3',
|
||||||
|
'col-xs-4' => 'col-xs-4',
|
||||||
|
'col-xs-5' => 'col-xs-5',
|
||||||
|
'col-xs-6' => 'col-xs-6',
|
||||||
|
'col-xs-7' => 'col-xs-7',
|
||||||
|
'col-xs-8' => 'col-xs-8',
|
||||||
|
'col-xs-9' => 'col-xs-9',
|
||||||
|
'col-xs-10' => 'col-xs-10',
|
||||||
|
'col-xs-11' => 'col-xs-11',
|
||||||
|
'col-xs-12' => 'col-xs-12',
|
||||||
|
),
|
||||||
|
'std' => '',
|
||||||
|
),
|
||||||
|
'custom_class' => array(
|
||||||
|
'type' => 'text',
|
||||||
|
'title' => JText::_('HELIX_CUSTOM_CLASS'),
|
||||||
|
'desc' => JText::_('HELIX_CUSTOM_CLASS_DESC'),
|
||||||
|
'std' => ''
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
class RowColumnSettings{
|
||||||
|
|
||||||
|
private static function getInputElements( $key, $attr )
|
||||||
|
{
|
||||||
|
return call_user_func(array( 'SpType' . ucfirst( $attr['type'] ), 'getInput'), $key, $attr );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getRowSettings($row_settings = array())
|
||||||
|
{
|
||||||
|
|
||||||
|
$output = '<div class="hidden">';
|
||||||
|
$output .= '<div class="row-settings">';
|
||||||
|
|
||||||
|
foreach ($row_settings['attr'] as $key => $rowAttr) {
|
||||||
|
$output .= self::getInputElements( $key, $rowAttr );
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getColumnSettings($col_settings = array())
|
||||||
|
{
|
||||||
|
|
||||||
|
$col_settings['attr']['name']['values'] = self::getPositionss();
|
||||||
|
|
||||||
|
$output = '<div class="hidden">';
|
||||||
|
$output .= '<div class="column-settings">';
|
||||||
|
|
||||||
|
foreach ($col_settings['attr'] as $key => $rowAttr) {
|
||||||
|
$output .= self::getInputElements( $key, $rowAttr );
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getTemplateName()
|
||||||
|
{
|
||||||
|
$db = JFactory::getDbo();
|
||||||
|
$query = $db->getQuery(true);
|
||||||
|
$query->select($db->quoteName(array('template')));
|
||||||
|
$query->from($db->quoteName('#__template_styles'));
|
||||||
|
$query->where($db->quoteName('client_id') . ' = 0');
|
||||||
|
$query->where($db->quoteName('home') . ' = 1');
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadObject()->template;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static function getPositionss() {
|
||||||
|
|
||||||
|
$db = JFactory::getDBO();
|
||||||
|
$query = 'SELECT `position` FROM `#__modules` WHERE `client_id`=0 AND ( `published` !=-2 AND `published` !=0 ) GROUP BY `position` ORDER BY `position` ASC';
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
$dbpositions = (array) $db->loadAssocList();
|
||||||
|
|
||||||
|
$template = self::getTemplateName();
|
||||||
|
|
||||||
|
$templateXML = JPATH_SITE.'/templates/'.$template.'/templateDetails.xml';
|
||||||
|
$template = simplexml_load_file( $templateXML );
|
||||||
|
$options = array();
|
||||||
|
|
||||||
|
foreach($dbpositions as $positions) $options[] = $positions['position'];
|
||||||
|
|
||||||
|
foreach($template->positions[0] as $position) $options[] = (string) $position;
|
||||||
|
|
||||||
|
$options = array_unique($options);
|
||||||
|
|
||||||
|
$selectOption = array();
|
||||||
|
sort($selectOption);
|
||||||
|
|
||||||
|
foreach($options as $option) $selectOption[$option] = $option;
|
||||||
|
|
||||||
|
return $selectOption;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getSettings($config = null){
|
||||||
|
$data = '';
|
||||||
|
if ($config) {
|
||||||
|
foreach ($config as $key => $value) {
|
||||||
|
$data .= ' data-'.$key.'="'.$value.'"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2015 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class SpTypeCheckbox{
|
||||||
|
|
||||||
|
static function getInput($key, $attr)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (isset($attr['value'])) {
|
||||||
|
$attr['std'] = $attr['value'];
|
||||||
|
}else{
|
||||||
|
if (!isset($attr['std'])) {
|
||||||
|
$attr['std'] = '0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = '<div class="form-group">';
|
||||||
|
$output .= '<div class="checkbox">';
|
||||||
|
$output .= '<label>';
|
||||||
|
$output .= '<input class="addon-input input-'.$key.'" data-attrname="'.$key.'" type="checkbox" '.(($attr['std'] == 1)?'checked':'').'> ' .$attr['title'];
|
||||||
|
$output .= '</label>';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
if( ( isset($attr['desc']) ) && ( isset($attr['desc']) != '' ) )
|
||||||
|
{
|
||||||
|
$output .= '<p class="help-block">' . $attr['desc'] . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
39
deployed/helix3/plugins/system/helix3/layout/types/color.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2015 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class SpTypeColor{
|
||||||
|
|
||||||
|
static function getInput($key, $attr)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!isset($attr['std'])){
|
||||||
|
$attr['std'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Including fallback code for HTML5 non supported browsers.
|
||||||
|
JHtml::_('jquery.framework');
|
||||||
|
JHtml::_('script', 'system/html5fallback.js', false, true);
|
||||||
|
|
||||||
|
$output = '<div class="form-group">';
|
||||||
|
$output .= '<label>'.$attr['title'].'</label>';
|
||||||
|
$output .= '<input type="text" class="sppb-color addon-input" data-attrname="'.$key.'" placeholder="#rrggbb" value="'.$attr['std'].'">';
|
||||||
|
|
||||||
|
if( ( isset($attr['desc']) ) && ( isset($attr['desc']) != '' ) )
|
||||||
|
{
|
||||||
|
$output .= '<p class="help-block">' . $attr['desc'] . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
55
deployed/helix3/plugins/system/helix3/layout/types/media.php
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2015 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class SpTypeMedia
|
||||||
|
{
|
||||||
|
static function getInput($key, $attr)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!isset($attr['std'])){
|
||||||
|
$attr['std'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if($attr['std']!='') {
|
||||||
|
$src = 'src="' . JURI::root() . $attr['std'] . '"';
|
||||||
|
} else {
|
||||||
|
$src = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
JHtml::_('behavior.modal');
|
||||||
|
JHtml::_('jquery.framework');
|
||||||
|
|
||||||
|
$output = '<div class="form-group">';
|
||||||
|
$output .= '<label>' . $attr['title'] . '</label>';
|
||||||
|
$output .= '<div class="media">';
|
||||||
|
|
||||||
|
$output .= '<div class="media-preview add-on">';
|
||||||
|
$output .= '<div class="image-preview">';
|
||||||
|
$output .= '<img class="media-preview" ' . $src . ' alt="" height="100px">';
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
$output .= '<input type="hidden" data-attrname="'.$key.'" class="input-media addon-input" value="'.$attr['std'].'">';
|
||||||
|
$output .= '<a class="modal sppb-btn sppb-btn-primary" title="Select" rel="{handler: \'iframe\', size: {x: 800, y: 500}}">Select</a>';
|
||||||
|
$output .= ' <a class="sppb-btn sppb-btn-danger remove-media" href="#"><i class="icon-remove"></i></a>';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
if( ( isset($attr['desc']) ) && ( isset($attr['desc']) != '' ) )
|
||||||
|
{
|
||||||
|
$output .= '<p class="help-block">' . $attr['desc'] . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2015 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class SpTypeSelect{
|
||||||
|
|
||||||
|
static function getInput($key, $attr)
|
||||||
|
{
|
||||||
|
if(!isset($attr['std'])){
|
||||||
|
$attr['std'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = '<div class="form-group '.$key.'">';
|
||||||
|
$output .= '<label>'.$attr['title'].'</label>';
|
||||||
|
|
||||||
|
$output .= '<select class="form-control addon-input" data-attrname="'.$key.'">';
|
||||||
|
|
||||||
|
foreach( $attr['values'] as $key => $value )
|
||||||
|
{
|
||||||
|
$output .= '<option value="'.$key.'" '.(($attr['std'] == $key )?'selected':'').'>'.$value.'</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</select>';
|
||||||
|
|
||||||
|
if( ( isset($attr['desc']) ) && ( isset($attr['desc']) != '' ) )
|
||||||
|
{
|
||||||
|
$output .= '<p class="help-block">' . $attr['desc'] . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
39
deployed/helix3/plugins/system/helix3/layout/types/text.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2015 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no direct accees
|
||||||
|
defined ('_JEXEC') or die ('resticted aceess');
|
||||||
|
|
||||||
|
class SpTypeText{
|
||||||
|
|
||||||
|
static function getInput($key, $attr)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!isset($attr['std'])) {
|
||||||
|
$attr['std'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($attr['placeholder'])) {
|
||||||
|
$attr['placeholder'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = '<div class="form-group">';
|
||||||
|
$output .= '<label>'.$attr['title'].'</label>';
|
||||||
|
$output .= '<input class="form-control addon-input addon-'.$key.'" type="text" data-attrname="'.$key.'" value="'.$attr['std'].'" placeholder="'.$attr['placeholder'].'" />';
|
||||||
|
|
||||||
|
if( ( isset($attr['desc']) ) && ( isset($attr['desc']) != '' ) )
|
||||||
|
{
|
||||||
|
$output .= '<p class="help-block">' . $attr['desc'] . '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
defined('_JEXEC') or die('Restricted Access');
|
||||||
|
|
||||||
|
//Helix3
|
||||||
|
helix3::addLess('frontend-edit', 'frontend-edit');
|
||||||
|
helix3::addJS('frontend-edit.js');
|
||||||
|
|
||||||
|
$data = $displayData;
|
||||||
|
|
||||||
|
$output ='';
|
||||||
|
|
||||||
|
$output .= '<div id="sp-component" class="' . $data->className . '">';
|
||||||
|
|
||||||
|
$output .= '<div class="sp-column ' . ($data->settings->custom_class) . '">';
|
||||||
|
$output .= '<jdoc:include type="message" />';
|
||||||
|
$output .= '<jdoc:include type="component" />';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo $output;
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
defined('_JEXEC') or die('Restricted Access');
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
//helper & model
|
||||||
|
$menu_class = JPATH_ROOT . '/plugins/system/helix3/core/classes/helix3.php';
|
||||||
|
|
||||||
|
if (file_exists($menu_class)) {
|
||||||
|
require_once($menu_class);
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = JFactory::getApplication()->getTemplate();
|
||||||
|
$themepath = JPATH_THEMES . '/' . $template;
|
||||||
|
$rows_file = $themepath . '/html/layouts/helix3/frontend/rows.php';
|
||||||
|
$lyt_thm_path = $themepath . '/html/layouts/helix3/';
|
||||||
|
|
||||||
|
$layout_path = (file_exists($rows_file)) ? $lyt_thm_path : JPATH_ROOT .'/plugins/system/helix3/layouts';
|
||||||
|
|
||||||
|
$data = $displayData;
|
||||||
|
|
||||||
|
$output ='';
|
||||||
|
|
||||||
|
$output .= '<' . $data['sematic'] . ' id="' . $data['id'] . '"' . $data['row_class'] . '>';
|
||||||
|
|
||||||
|
if ($data['componentArea']){
|
||||||
|
if (!$data['pagebuilder'] && !$data['fluidrow']){
|
||||||
|
$output .= '<div class="container">';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if (!$data['fluidrow']){
|
||||||
|
$output .= '<div class="container">';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$getLayout = new JLayoutFile('frontend.rows', $layout_path );
|
||||||
|
|
||||||
|
$output .= $getLayout->render($data);
|
||||||
|
|
||||||
|
|
||||||
|
if ($data['componentArea']){
|
||||||
|
if (!$data['pagebuilder']){
|
||||||
|
$output .= '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if (!$data['fluidrow']){
|
||||||
|
$output .= '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</' . $data['sematic'] . '>';
|
||||||
|
|
||||||
|
|
||||||
|
echo $output;
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
defined('_JEXEC') or die('Restricted Access');
|
||||||
|
|
||||||
|
//helper & model
|
||||||
|
$menu_class = JPATH_ROOT . '/plugins/system/helix3/core/classes/helix3.php';
|
||||||
|
|
||||||
|
if (file_exists($menu_class)) {
|
||||||
|
require_once($menu_class);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $displayData;
|
||||||
|
|
||||||
|
$output ='';
|
||||||
|
|
||||||
|
$output .= '<div id="sp-' . JFilterOutput::stringURLSafe($data->settings->name) . '" class="' . $data->className . '">';
|
||||||
|
|
||||||
|
$output .= '<div class="sp-column ' . ($data->settings->custom_class) . '">';
|
||||||
|
|
||||||
|
$features = (Helix3::hasFeature($data->settings->name))? helix3::getInstance()->loadFeature[$data->settings->name] : array();
|
||||||
|
|
||||||
|
foreach ($features as $key => $feature){
|
||||||
|
if (isset($feature['feature']) && $feature['load_pos'] == 'before' ) {
|
||||||
|
$output .= $feature['feature'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '<jdoc:include type="modules" name="' . $data->settings->name . '" style="sp_xhtml" />';
|
||||||
|
|
||||||
|
foreach ($features as $key => $feature){
|
||||||
|
if (isset($feature['feature']) && $feature['load_pos'] != 'before' ) {
|
||||||
|
$output .= $feature['feature'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>'; //.sp-column
|
||||||
|
|
||||||
|
$output .= '</div>'; //.sp-
|
||||||
|
|
||||||
|
|
||||||
|
echo $output;
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Helix3 Framework
|
||||||
|
* @author JoomShaper http://www.joomshaper.com
|
||||||
|
* @copyright Copyright (c) 2010 - 2017 JoomShaper
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
|
||||||
|
*/
|
||||||
|
defined('_JEXEC') or die('Restricted Access');
|
||||||
|
|
||||||
|
//helper & model
|
||||||
|
$helix3_class = JPATH_ROOT . '/plugins/system/helix3/core/classes/helix3.php';
|
||||||
|
|
||||||
|
if (file_exists($helix3_class)) {
|
||||||
|
require_once($helix3_class);
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = JFactory::getApplication()->getTemplate();
|
||||||
|
$themepath = JPATH_THEMES . '/' . $template;
|
||||||
|
$carea_file = $themepath . '/html/layouts/helix3/frontend/conponentarea.php';
|
||||||
|
$module_file = $themepath . '/html/layouts/helix3/frontend/modules.php';
|
||||||
|
$lyt_thm_path = $themepath . '/html/layouts/helix3/';
|
||||||
|
|
||||||
|
$layout_path_carea = (file_exists($carea_file)) ? $lyt_thm_path : JPATH_ROOT .'/plugins/system/helix3/layouts';
|
||||||
|
$layout_path_module = (file_exists($module_file)) ? $lyt_thm_path : JPATH_ROOT .'/plugins/system/helix3/layouts';
|
||||||
|
|
||||||
|
$data = $displayData;
|
||||||
|
|
||||||
|
$output ='';
|
||||||
|
|
||||||
|
$output .= '<div class="row">';
|
||||||
|
|
||||||
|
foreach ($data['rowColumns'] as $key => $column){
|
||||||
|
|
||||||
|
//Responsive Utilities
|
||||||
|
if (isset($column->settings->xs_col) && $column->settings->xs_col) {
|
||||||
|
$column->className = $column->settings->xs_col . ' ' . $column->className;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($column->settings->sm_col) && $column->settings->sm_col) {
|
||||||
|
$column->className = preg_replace('/col-sm-\d*/', $column->settings->sm_col, $column->className);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($column->settings->hidden_md) && $column->settings->hidden_md) {
|
||||||
|
$column->className = $column->className . ' hidden-md hidden-lg';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($column->settings->hidden_sm) && $column->settings->hidden_sm) {
|
||||||
|
$column->className = $column->className . ' hidden-sm';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($column->settings->hidden_xs) && $column->settings->hidden_xs) {
|
||||||
|
$column->className = $column->className . ' hidden-xs';
|
||||||
|
}
|
||||||
|
//End Responsive Utilities
|
||||||
|
|
||||||
|
if ($column->settings->column_type){ //Component
|
||||||
|
$getLayout = new JLayoutFile('frontend.conponentarea', $layout_path_carea );
|
||||||
|
$output .= $getLayout->render($column);
|
||||||
|
}
|
||||||
|
else { // Module
|
||||||
|
|
||||||
|
$getLayout = new JLayoutFile('frontend.modules', $layout_path_module );
|
||||||
|
$output .= $getLayout->render($column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= '</div>'; //.row
|
||||||
|
|
||||||
|
echo $output;
|
||||||
17
deployed/helix3/plugins/system/helix3/params/menu-child.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="params" addfieldpath="/plugins/system/helix3/fields">
|
||||||
|
<fieldset name="spsubmenu" label="HELIX_SUB_MENU">
|
||||||
|
<field name="dropdown_position" type="radio" class="btn-group" default="right" label="HELIX_MENU_DROPDOWN_POSITION" description="HELIX_MENU_DROPDOWN_POSITION_DESC">
|
||||||
|
<option value="left">HELIX_GLOBAL_LEFT</option>
|
||||||
|
<option value="right">HELIX_GLOBAL_RIGHT</option>
|
||||||
|
</field>
|
||||||
|
<field name="showmenutitle" type="radio" default="1" class="btn-group" label="HELIX_MENU_SHOW_TITLE" description="HELIX_MENU_SHOW_TITLE_DESC">
|
||||||
|
<option value="1">HELIX_YES</option>
|
||||||
|
<option value="0">HELIX_NO</option>
|
||||||
|
</field>
|
||||||
|
<field name="icon" type="icon" label="HELIX_MENU_ICON" description="HELIX_MENU_ICON_DESC" />
|
||||||
|
<field name="class" type="text" label="HELIX_MENU_CLASS" description="HELIX_MENU_CLASS_DESC" />
|
||||||
|
</fieldset>
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
15
deployed/helix3/plugins/system/helix3/params/menu-parent.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="params" addfieldpath="/plugins/system/helix3/fields">
|
||||||
|
<fieldset name="spmegamenu" label="HELIX_MENU">
|
||||||
|
<field name="menulayout" type="megamenu" />
|
||||||
|
<field name="megamenu" type="hidden" default="0" />
|
||||||
|
<field name="showmenutitle" type="radio" default="1" class="btn-group" label="HELIX_MENU_SHOW_TITLE" description="HELIX_MENU_SHOW_TITLE_DESC">
|
||||||
|
<option value="1">HELIX_YES</option>
|
||||||
|
<option value="0">HELIX_NO</option>
|
||||||
|
</field>
|
||||||
|
<field name="icon" type="icon" label="HELIX_MENU_ICON" description="HELIX_MENU_ICON_DESC" />
|
||||||
|
<field name="class" type="text" label="HELIX_MENU_CLASS" description="HELIX_MENU_CLASS_DESC" />
|
||||||
|
</fieldset>
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
16
deployed/helix3/plugins/system/helix3/params/page-title.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="params" addfieldpath="/plugins/system/helix3/fields">
|
||||||
|
<fieldset name="pagetitle" label="HELIX_PAGE_TITLE">
|
||||||
|
<field name="enable_page_title" type="radio" class="btn-group" default="0" label="ENABLE_PAGE_TITLE" description="ENABLE_PAGE_TITLE_DESC">
|
||||||
|
<option value="1">JYES</option>
|
||||||
|
<option value="0">JNO</option>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
<field name="page_title_alt" type="text" default="" label="PAGE_TITLE_ALT" description="PAGE_TITLE_ALT_DESC" />
|
||||||
|
<field name="page_subtitle" type="text" default="" label="PAGE_SUBTITLE" description="PAGE_SUBTITLE_DESC" />
|
||||||
|
<field name="page_title_bg_color" type="color" label="PAGE_BACKGROUND_COLOR" description="PAGE_BACKGROUND_COLOR_DESC" />
|
||||||
|
<field name="page_title_bg_image" type="media" label="PAGE_BACKGROUND_IMAGE" description="PAGE_BACKGROUND_IMAGE_DESC" />
|
||||||
|
</fieldset>
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<form>
|
||||||
|
<fields name="attribs" addfieldpath="/plugins/system/helix3/fields">
|
||||||
|
<fieldset name="sppostformats" label="BLOG_OPTIONS">
|
||||||
|
<field name="spfeatured_image" type="spimage" label="Featured Image" description="BLOG_POST_FORMAT_GALLERY_DESCRIPTION" />
|
||||||
|
<field name="post_format" type="radio" label="Post Format" default="standard" class="btn-group post-formats" description="Mega Menu Layout">
|
||||||
|
<option value="standard">BLOG_POST_FORMAT_STANDARD</option>
|
||||||
|
<option value="video">BLOG_POST_FORMAT_VIDEO</option>
|
||||||
|
<option value="gallery">BLOG_POST_FORMAT_GALLERY</option>
|
||||||
|
<option value="audio">BLOG_POST_FORMAT_AUDIO</option>
|
||||||
|
<option value="link">BLOG_POST_FORMAT_LINK</option>
|
||||||
|
<option value="quote">BLOG_POST_FORMAT_QUOTE</option>
|
||||||
|
<option value="status">BLOG_POST_FORMAT_STATUS</option>
|
||||||
|
</field>
|
||||||
|
<field name="gallery" type="spgallery" label="BLOG_POST_FORMAT_GALLERY_LABEL" description="BLOG_POST_FORMAT_GALLERY_DESCRIPTION" />
|
||||||
|
<field name="audio" type="textarea" rows="5" label="BLOG_POST_FORMAT_AUDIO_LABEL" description="BLOG_POST_FORMAT_AUDIO_DESCRIPTION" class="input-xxlarge" filter="raw" />
|
||||||
|
<field name="video" type="url" label="BLOG_POST_FORMAT_VIDEO_LABEL" description="BLOG_POST_FORMAT_VIDEO_DESCRIPTION" />
|
||||||
|
<field name="link_title" type="text" label="BLOG_POST_FORMAT_LINK_TITLE_LABEL" description="BLOG_POST_FORMAT_LINK_TITLE_DESCRIPTION" hint="Best Joomla Templates" />
|
||||||
|
<field name="link_url" type="url" label="BLOG_POST_FORMAT_LINK_LABEL" description="BLOG_POST_FORMAT_LINK_DESCRIPTION" hint="http://www.joomshaper.com/joomla-templates" />
|
||||||
|
<field name="quote_text" type="textarea" rows="5" label="BLOG_POST_FORMAT_QUOTE_TEXT_LABEL" description="BLOG_POST_FORMAT_QUOTE_TEXT_DESCRIPTION" class="input-xxlarge" filter="raw" />
|
||||||
|
<field name="quote_author" type="text" label="BLOG_POST_FORMAT_QUOTE_AUTHOR_LABEL" description="BLOG_POST_FORMAT_QUOTE_AUTHOR_DESCRIPTION" />
|
||||||
|
<field name="post_status" type="textarea" rows="5" label="BLOG_POST_FORMAT_STATUS_LABEL" description="BLOG_POST_FORMAT_STATUS_DESCRIPTION" class="input-xxlarge" filter="raw" />
|
||||||
|
</fieldset>
|
||||||
|
</fields>
|
||||||
|
</form>
|
||||||
BIN
deployed/helix3/templates/shaper_helix3/.DS_Store
vendored
Normal file
4
deployed/helix3/templates/shaper_helix3/.htaccess.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Options +ExecCGI
|
||||||
|
AddType application/x-httpd-php .json
|
||||||
|
AddHandler application/x-httpd-php .json
|
||||||
|
AddHandler application/x-httpd-php5 .json
|
||||||