Refactor CSS styles for admin slideshow interface and update slide list template
- Improved formatting and consistency in the CSS file for better readability and maintainability. - Increased the width of the slides content area from 500px to 800px in the slide list template. - Removed obsolete image files related to the slideshow module. - Updated the layout and styles for various elements in the slideshow admin interface.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 2007-2015 Leotheme
|
||||
*
|
||||
@@ -13,377 +14,430 @@
|
||||
* @license http://leotheme.com - prestashop template provider
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
# module validation
|
||||
exit;
|
||||
if (!defined('_PS_VERSION_'))
|
||||
{
|
||||
# module validation
|
||||
exit;
|
||||
}
|
||||
|
||||
class AdminLeoSlideshowController extends ModuleAdminController
|
||||
{
|
||||
protected $max_image_size = null;
|
||||
public $theme_name;
|
||||
public $img_path;
|
||||
public $img_url;
|
||||
protected $max_image_size = null;
|
||||
public $theme_name;
|
||||
public $img_path;
|
||||
public $img_url;
|
||||
|
||||
public function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->max_image_size = (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE');
|
||||
parent::__construct();
|
||||
$this->theme_name = _THEME_NAME_;
|
||||
$this->img_path = LeoSlideshowHelper::getImgThemeDir();
|
||||
$this->img_url = LeoSlideshowHelper::getImgThemeUrl();
|
||||
}
|
||||
|
||||
public function setMedia($isNewTheme = false)
|
||||
{
|
||||
//DONGND:: update new direction for media
|
||||
$media_dir = $this->module->getMediaDir();
|
||||
|
||||
$this->addCss(__PS_BASE_URI__ . $media_dir . 'css/admin/admincontroller.css', 'all');
|
||||
//_PS_THEME_DIR_
|
||||
return parent::setMedia($isNewTheme);
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
if (count($this->errors) > 0)
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->max_image_size = (int)Configuration::get('PS_PRODUCT_PICTURE_MAX_SIZE');
|
||||
parent::__construct();
|
||||
$this->theme_name = _THEME_NAME_;
|
||||
$this->img_path = LeoSlideshowHelper::getImgThemeDir();
|
||||
$this->img_url = LeoSlideshowHelper::getImgThemeUrl();
|
||||
if ($this->ajax)
|
||||
{
|
||||
$array = array('hasError' => true, 'errors' => $this->errors[0]);
|
||||
die(Tools::jsonEncode($array));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
public function setMedia($isNewTheme = false)
|
||||
if (($img_name = Tools::getValue('imgName', false)) !== false)
|
||||
{
|
||||
//DONGND:: update new direction for media
|
||||
$media_dir = $this->module->getMediaDir();
|
||||
|
||||
$this->addCss(__PS_BASE_URI__.$media_dir.'css/admin/admincontroller.css', 'all');
|
||||
//_PS_THEME_DIR_
|
||||
return parent::setMedia($isNewTheme);
|
||||
# module validation
|
||||
unlink($this->img_path . $img_name);
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
if ($reload_slider_image = Tools::getValue('reloadSliderImage'))
|
||||
{
|
||||
if (count($this->errors) > 0) {
|
||||
if ($this->ajax) {
|
||||
$array = array('hasError' => true, 'errors' => $this->errors[0]);
|
||||
die(Tools::jsonEncode($array));
|
||||
}
|
||||
return;
|
||||
//DONGND:: reload list image after delete
|
||||
$tpl = $this->createTemplate('imagemanager.tpl');
|
||||
$sort_by = Tools::getValue('sortBy');
|
||||
|
||||
$images = $this->getImageList($sort_by);
|
||||
$tpl->assign(array(
|
||||
'images' => $images,
|
||||
'reloadSliderImage' => $reload_slider_image,
|
||||
'link' => $this->context->link,
|
||||
));
|
||||
// print_r('test');die();
|
||||
if ($reload_slider_image)
|
||||
{
|
||||
# module validation
|
||||
die(Tools::jsonEncode($tpl->fetch()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
parent::postProcess();
|
||||
}
|
||||
|
||||
public function importGroup()
|
||||
{
|
||||
$type = Tools::strtolower(Tools::substr(strrchr($_FILES['import_file']['name'], '.'), 1));
|
||||
|
||||
if (isset($_FILES['import_file']) && $type == 'txt' && isset($_FILES['import_file']['tmp_name']) && !empty($_FILES['import_file']['tmp_name']))
|
||||
{
|
||||
include_once(_PS_MODULE_DIR_ . 'leoslideshow/classes/LeoSlideshowGroup.php');
|
||||
include_once(_PS_MODULE_DIR_ . 'leoslideshow/classes/LeoSlideshowSlide.php');
|
||||
|
||||
$content = Tools::file_get_contents($_FILES['import_file']['tmp_name']);
|
||||
$content = Tools::jsonDecode(LeoSlideshowSlide::base64Decode($content), true);
|
||||
|
||||
//DONGND:: validate if file not match
|
||||
if (!is_array($content) || !isset($content['id_leoslideshow_groups']) || $content['id_leoslideshow_groups'] == '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$language_field = array('title', 'link', 'image', 'thumbnail', 'video', 'layersparams');
|
||||
$languages = Language::getLanguages();
|
||||
$lang_list = array();
|
||||
foreach ($languages as $lang)
|
||||
{
|
||||
# module validation
|
||||
$lang_list[$lang['iso_code']] = $lang['id_lang'];
|
||||
}
|
||||
|
||||
$override_group = Tools::getValue('override_group');
|
||||
|
||||
//override or edit
|
||||
if ($override_group && LeoSlideshowGroup::groupExists($content['id_leoslideshow_groups']))
|
||||
{
|
||||
$mod_group = new LeoSlideshowGroup($content['id_leoslideshow_groups']);
|
||||
//edit group
|
||||
$mod_group = $this->setDataForGroup($mod_group, $content);
|
||||
if (!$mod_group->update())
|
||||
{
|
||||
# module validation
|
||||
return false;
|
||||
}
|
||||
LeoSlideshowGroup::deleteAllSlider($content['id_leoslideshow_groups']);
|
||||
|
||||
if (($img_name = Tools::getValue('imgName', false)) !== false) {
|
||||
foreach ($content['sliders'] as $slider)
|
||||
{
|
||||
$mod_slide = new LeoSlideshowSlide();
|
||||
foreach ($slider as $key => $val)
|
||||
{
|
||||
if (in_array($key, $language_field))
|
||||
{
|
||||
foreach ($val as $key_lang => $val_lang)
|
||||
{
|
||||
# module validation
|
||||
$mod_slide->{$key}[$lang_list[$key_lang]] = $val_lang;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# module validation
|
||||
$mod_slide->{$key} = $val;
|
||||
}
|
||||
}
|
||||
$mod_slide->id_group = $mod_group->id;
|
||||
if (isset($slider['id']) && $slider['id'] && LeoSlideshowSlide::sliderExist($slider['id']))
|
||||
{
|
||||
# module validation
|
||||
unlink($this->img_path.$img_name);
|
||||
|
||||
$mod_slide->update();
|
||||
}
|
||||
else
|
||||
{
|
||||
# module validation
|
||||
$mod_slide->add();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$mod_group = new LeoSlideshowGroup();
|
||||
$mod_group = $this->setDataForGroup($mod_group, $content);
|
||||
$mod_group->randkey = LeoSlideshowHelper::genKey();
|
||||
if (!$mod_group->add())
|
||||
{
|
||||
# module validation
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($reload_slider_image = Tools::getValue('reloadSliderImage')) {
|
||||
//DONGND:: reload list image after delete
|
||||
$tpl = $this->createTemplate('imagemanager.tpl');
|
||||
$sort_by = Tools::getValue('sortBy');
|
||||
|
||||
$images = $this->getImageList($sort_by);
|
||||
$tpl->assign(array(
|
||||
'images' => $images,
|
||||
'reloadSliderImage' => $reload_slider_image,
|
||||
'link' => $this->context->link,
|
||||
));
|
||||
// print_r('test');die();
|
||||
if ($reload_slider_image) {
|
||||
foreach ($content['sliders'] as $slider)
|
||||
{
|
||||
$mod_slide = new LeoSlideshowSlide();
|
||||
foreach ($slider as $key => $val)
|
||||
{
|
||||
if (in_array($key, $language_field))
|
||||
{
|
||||
foreach ($val as $key_lang => $val_lang)
|
||||
{
|
||||
# module validation
|
||||
die(Tools::jsonEncode($tpl->fetch()));
|
||||
$mod_slide->{$key}[$lang_list[$key_lang]] = $val_lang;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# module validation
|
||||
$mod_slide->{$key} = $val;
|
||||
}
|
||||
}
|
||||
$mod_slide->id_group = $mod_group->id;
|
||||
$mod_slide->id = 0;
|
||||
$mod_slide->add();
|
||||
}
|
||||
|
||||
|
||||
|
||||
parent::postProcess();
|
||||
}
|
||||
//add new
|
||||
//return true;
|
||||
}
|
||||
Tools::redirectAdmin('index.php?controller=AdminModules&token=' . Tools::getAdminTokenLite('AdminModules') . '&configure=leoslideshow&tab_module=leotheme&module_name=leoslideshow&conf=4');
|
||||
// return false;
|
||||
}
|
||||
|
||||
public function importGroup()
|
||||
{
|
||||
$type = Tools::strtolower(Tools::substr(strrchr($_FILES['import_file']['name'], '.'), 1));
|
||||
|
||||
if (isset($_FILES['import_file']) && $type == 'txt' && isset($_FILES['import_file']['tmp_name']) && !empty($_FILES['import_file']['tmp_name'])) {
|
||||
include_once(_PS_MODULE_DIR_.'leoslideshow/classes/LeoSlideshowGroup.php');
|
||||
include_once(_PS_MODULE_DIR_.'leoslideshow/classes/LeoSlideshowSlide.php');
|
||||
|
||||
$content = Tools::file_get_contents($_FILES['import_file']['tmp_name']);
|
||||
$content = Tools::jsonDecode(LeoSlideshowSlide::base64Decode($content), true);
|
||||
|
||||
//DONGND:: validate if file not match
|
||||
if (!is_array($content) || !isset($content['id_leoslideshow_groups']) || $content['id_leoslideshow_groups'] == '') {
|
||||
return false;
|
||||
}
|
||||
$language_field = array('title', 'link', 'image', 'thumbnail', 'video', 'layersparams');
|
||||
$languages = Language::getLanguages();
|
||||
$lang_list = array();
|
||||
foreach ($languages as $lang) {
|
||||
# module validation
|
||||
$lang_list[$lang['iso_code']] = $lang['id_lang'];
|
||||
}
|
||||
|
||||
$override_group = Tools::getValue('override_group');
|
||||
|
||||
//override or edit
|
||||
if ($override_group && LeoSlideshowGroup::groupExists($content['id_leoslideshow_groups'])) {
|
||||
$mod_group = new LeoSlideshowGroup($content['id_leoslideshow_groups']);
|
||||
//edit group
|
||||
$mod_group = $this->setDataForGroup($mod_group, $content);
|
||||
if (!$mod_group->update()) {
|
||||
# module validation
|
||||
return false;
|
||||
}
|
||||
LeoSlideshowGroup::deleteAllSlider($content['id_leoslideshow_groups']);
|
||||
|
||||
foreach ($content['sliders'] as $slider) {
|
||||
$mod_slide = new LeoSlideshowSlide();
|
||||
foreach ($slider as $key => $val) {
|
||||
if (in_array($key, $language_field)) {
|
||||
foreach ($val as $key_lang => $val_lang) {
|
||||
# module validation
|
||||
$mod_slide->{$key}[$lang_list[$key_lang]] = $val_lang;
|
||||
}
|
||||
} else {
|
||||
# module validation
|
||||
$mod_slide->{$key} = $val;
|
||||
}
|
||||
}
|
||||
$mod_slide->id_group = $mod_group->id;
|
||||
if (isset($slider['id']) && $slider['id'] && LeoSlideshowSlide::sliderExist($slider['id'])) {
|
||||
# module validation
|
||||
$mod_slide->update();
|
||||
} else {
|
||||
# module validation
|
||||
$mod_slide->add();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$mod_group = new LeoSlideshowGroup();
|
||||
$mod_group = $this->setDataForGroup($mod_group, $content);
|
||||
$mod_group->randkey = LeoSlideshowHelper::genKey();
|
||||
if (!$mod_group->add()) {
|
||||
# module validation
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($content['sliders'] as $slider) {
|
||||
$mod_slide = new LeoSlideshowSlide();
|
||||
foreach ($slider as $key => $val) {
|
||||
if (in_array($key, $language_field)) {
|
||||
foreach ($val as $key_lang => $val_lang) {
|
||||
# module validation
|
||||
$mod_slide->{$key}[$lang_list[$key_lang]] = $val_lang;
|
||||
}
|
||||
} else {
|
||||
# module validation
|
||||
$mod_slide->{$key} = $val;
|
||||
}
|
||||
}
|
||||
$mod_slide->id_group = $mod_group->id;
|
||||
$mod_slide->id = 0;
|
||||
$mod_slide->add();
|
||||
}
|
||||
}
|
||||
//add new
|
||||
//return true;
|
||||
}
|
||||
Tools::redirectAdmin('index.php?controller=AdminModules&token='.Tools::getAdminTokenLite('AdminModules').'&configure=leoslideshow&tab_module=leotheme&module_name=leoslideshow&conf=4');
|
||||
// return false;
|
||||
}
|
||||
|
||||
public function setDataForGroup($group, $content)
|
||||
{
|
||||
$group->title = $content['title'];
|
||||
$group->id_shop = $this->context->shop->id;
|
||||
$group->hook = $content['hook'];
|
||||
$group->active = $content['active'];
|
||||
$group->params = $content['params'];
|
||||
$group->sliders = $content['sliders'];
|
||||
return $group;
|
||||
}
|
||||
/*
|
||||
public function setDataForGroup($group, $content)
|
||||
{
|
||||
$group->title = $content['title'];
|
||||
$group->id_shop = $this->context->shop->id;
|
||||
$group->hook = $content['hook'];
|
||||
$group->active = $content['active'];
|
||||
$group->params = $content['params'];
|
||||
$group->sliders = $content['sliders'];
|
||||
return $group;
|
||||
}
|
||||
/*
|
||||
* get all slider data
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* renderForm contains all necessary initialization needed for all tabs
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function renderList()
|
||||
/**
|
||||
* renderForm contains all necessary initialization needed for all tabs
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function renderList()
|
||||
{
|
||||
//DONGND:: update new direction for media
|
||||
$media_dir = $this->module->getMediaDir();
|
||||
|
||||
//this code for typo
|
||||
$typo = Tools::getValue('typo');
|
||||
// print_r('test');die();
|
||||
if ($typo)
|
||||
{
|
||||
//DONGND:: update new direction for media
|
||||
$media_dir = $this->module->getMediaDir();
|
||||
|
||||
//this code for typo
|
||||
$typo = Tools::getValue('typo');
|
||||
// print_r('test');die();
|
||||
if ($typo) {
|
||||
//DONGND:: new direction
|
||||
if (file_exists(_PS_THEME_DIR_.'assets/css/modules/leoslideshow/views/css/typo/typo.css')) {
|
||||
# module validation
|
||||
$typo_dir = _THEME_DIR_.'assets/css/modules/leoslideshow/views/css/typo/typo.css';
|
||||
} else {
|
||||
# module validation
|
||||
//check css file in theme
|
||||
if (file_exists(_PS_THEME_DIR_.'modules/leoslideshow/views/css/typo/typo.css')) {
|
||||
# module validation
|
||||
$typo_dir = _THEME_DIR_.str_replace('//', '/', 'modules/leoslideshow').'/views/css/typo/typo.css';
|
||||
} else {
|
||||
# module validation
|
||||
$typo_dir = __PS_BASE_URI__.$media_dir.'/css/typo/typo.css';
|
||||
}
|
||||
}
|
||||
|
||||
$this->addCss($typo_dir, 'all');
|
||||
$this->addJS(__PS_BASE_URI__.$media_dir.'js/admin/jquery-ui-1.10.3.custom.min.js');
|
||||
|
||||
$content = Tools::file_get_contents($this->context->link->getMediaLink($typo_dir));
|
||||
preg_match_all('#\.tp-caption\.(\w+)\s*{\s*#', $content, $matches);
|
||||
|
||||
if (isset($matches[1])) {
|
||||
# module validation
|
||||
$captions = $matches[1];
|
||||
}
|
||||
$tpl = $this->createTemplate('typo.tpl');
|
||||
$tpl->assign(array(
|
||||
'typoDir' => $typo_dir,
|
||||
'captions' => $captions,
|
||||
'field' => Tools::getValue('field')
|
||||
));
|
||||
return $tpl->fetch();
|
||||
//DONGND:: new direction
|
||||
if (file_exists(_PS_THEME_DIR_ . 'assets/css/modules/leoslideshow/views/css/typo/typo.css'))
|
||||
{
|
||||
# module validation
|
||||
$typo_dir = _THEME_DIR_ . 'assets/css/modules/leoslideshow/views/css/typo/typo.css';
|
||||
}
|
||||
else
|
||||
{
|
||||
# module validation
|
||||
//check css file in theme
|
||||
if (file_exists(_PS_THEME_DIR_ . 'modules/leoslideshow/views/css/typo/typo.css'))
|
||||
{
|
||||
# module validation
|
||||
$typo_dir = _THEME_DIR_ . str_replace('//', '/', 'modules/leoslideshow') . '/views/css/typo/typo.css';
|
||||
}
|
||||
|
||||
//this code for select or upload IMG
|
||||
$tpl = $this->createTemplate('imagemanager.tpl');
|
||||
$sort_by = Tools::getValue('sortBy');
|
||||
$reload_slider_image = Tools::getValue('reloadSliderImage');
|
||||
$images = $this->getImageList($sort_by);
|
||||
$tpl->assign(array(
|
||||
'images' => $images,
|
||||
'reloadSliderImage' => $reload_slider_image,
|
||||
));
|
||||
// print_r('test');die();
|
||||
if ($reload_slider_image) {
|
||||
# module validation
|
||||
die(Tools::jsonEncode($tpl->fetch()));
|
||||
else
|
||||
{
|
||||
# module validation
|
||||
$typo_dir = __PS_BASE_URI__ . $media_dir . '/css/typo/typo.css';
|
||||
}
|
||||
}
|
||||
|
||||
$image_uploader = new HelperImageUploader('file');
|
||||
$image_uploader->setSavePath($this->img_path);
|
||||
$url = Context::getContext()->link->getAdminLink('AdminLeoSlideshow').'&ajax=1&action=addSliderImage';
|
||||
$image_uploader->setMultiple(true)->setUseAjax(true)->setUrl($url);
|
||||
$this->addCss($typo_dir, 'all');
|
||||
$this->addJS(__PS_BASE_URI__ . $media_dir . 'js/admin/jquery-ui-1.10.3.custom.min.js');
|
||||
|
||||
$tpl->assign(array(
|
||||
'countImages' => count($images),
|
||||
'images' => $images,
|
||||
'max_image_size' => $this->max_image_size / 1024 / 1024,
|
||||
'image_uploader' => $image_uploader->render(),
|
||||
'imgManUrl' => Context::getContext()->link->getAdminLink('AdminLeoSlideshow'),
|
||||
'token' => $this->token,
|
||||
'imgUploadDir' => $this->img_path
|
||||
));
|
||||
$content = Tools::file_get_contents($this->context->link->getMediaLink($typo_dir));
|
||||
preg_match_all('#\.tp-caption\.(\w+)\s*{\s*#', $content, $matches);
|
||||
|
||||
return $tpl->fetch();
|
||||
if (isset($matches[1]))
|
||||
{
|
||||
# module validation
|
||||
$captions = $matches[1];
|
||||
}
|
||||
$tpl = $this->createTemplate('typo.tpl');
|
||||
$tpl->assign(array(
|
||||
'typoDir' => $typo_dir,
|
||||
'captions' => $captions,
|
||||
'field' => Tools::getValue('field')
|
||||
));
|
||||
return $tpl->fetch();
|
||||
}
|
||||
|
||||
public function getImageList($sort_by)
|
||||
//this code for select or upload IMG
|
||||
$tpl = $this->createTemplate('imagemanager.tpl');
|
||||
$sort_by = Tools::getValue('sortBy');
|
||||
$reload_slider_image = Tools::getValue('reloadSliderImage');
|
||||
$images = $this->getImageList($sort_by);
|
||||
$tpl->assign(array(
|
||||
'images' => $images,
|
||||
'reloadSliderImage' => $reload_slider_image,
|
||||
));
|
||||
// print_r('test');die();
|
||||
if ($reload_slider_image)
|
||||
{
|
||||
$path = $this->img_path;
|
||||
$this->createFolderUpImage();
|
||||
$images = glob($path.'{*.jpeg,*.JPEG,*.jpg,*.JPG,*.gif,*.GIF,*.png,*.PNG}', GLOB_BRACE);
|
||||
if (!$images) {
|
||||
# module validation
|
||||
$images = $this->getAllImage($path);
|
||||
}
|
||||
|
||||
if ($sort_by == 'name_desc') {
|
||||
# module validation
|
||||
rsort($images);
|
||||
}
|
||||
|
||||
if ($sort_by == 'date' || $sort_by == 'date_desc') {
|
||||
# module validation
|
||||
array_multisort(array_map('filemtime', $images), SORT_NUMERIC, SORT_DESC, $images);
|
||||
}
|
||||
if ($sort_by == 'date_desc') {
|
||||
# module validation
|
||||
rsort($images);
|
||||
}
|
||||
|
||||
$result = array();
|
||||
foreach ($images as &$file) {
|
||||
$file_info = pathinfo($file);
|
||||
$result[] = array('name' => $file_info['basename'], 'link' => $this->img_url.$file_info['basename']);
|
||||
}
|
||||
return $result;
|
||||
# module validation
|
||||
die(Tools::jsonEncode($tpl->fetch()));
|
||||
}
|
||||
|
||||
public function getAllImage($path)
|
||||
$image_uploader = new HelperImageUploader('file');
|
||||
$image_uploader->setSavePath($this->img_path);
|
||||
$url = Context::getContext()->link->getAdminLink('AdminLeoSlideshow') . '&ajax=1&action=addSliderImage';
|
||||
$image_uploader->setMultiple(true)->setUseAjax(true)->setUrl($url);
|
||||
|
||||
$tpl->assign(array(
|
||||
'countImages' => count($images),
|
||||
'images' => $images,
|
||||
'max_image_size' => $this->max_image_size / 1024 / 1024,
|
||||
'image_uploader' => $image_uploader->render(),
|
||||
'imgManUrl' => Context::getContext()->link->getAdminLink('AdminLeoSlideshow'),
|
||||
'token' => $this->token,
|
||||
'imgUploadDir' => $this->img_path
|
||||
));
|
||||
|
||||
return $tpl->fetch();
|
||||
}
|
||||
|
||||
public function getImageList($sort_by)
|
||||
{
|
||||
$path = $this->img_path;
|
||||
$this->createFolderUpImage();
|
||||
$images = glob($path . '{*.jpeg,*.JPEG,*.jpg,*.JPG,*.gif,*.GIF,*.png,*.PNG}', GLOB_BRACE);
|
||||
if (!$images)
|
||||
{
|
||||
$images = array();
|
||||
foreach (scandir($path) as $d) {
|
||||
if (preg_match('/(.*)\.(jpg|png|gif|jpeg)$/', $d)) {
|
||||
# module validation
|
||||
$images[] = $d;
|
||||
}
|
||||
}
|
||||
return $images;
|
||||
# module validation
|
||||
$images = $this->getAllImage($path);
|
||||
}
|
||||
|
||||
public function ajaxProcessaddSliderImage()
|
||||
if ($sort_by == 'name_desc')
|
||||
{
|
||||
if (isset($_FILES['file'])) {
|
||||
$image_uploader = new HelperUploader('file');
|
||||
$this->createFolderUpImage();
|
||||
$image_uploader->setSavePath($this->img_path);
|
||||
$image_uploader->setAcceptTypes(array('jpeg', 'gif', 'png', 'jpg'))->setMaxSize($this->max_image_size);
|
||||
$files = $image_uploader->process();
|
||||
$total_errors = array();
|
||||
|
||||
foreach ($files as &$file) {
|
||||
$errors = array();
|
||||
// Evaluate the memory required to resize the image: if it's too much, you can't resize it.
|
||||
if (!ImageManager::checkImageMemoryLimit($file['save_path'])) {
|
||||
# module validation
|
||||
$errors[] = Tools::displayError('Due to memory limit restrictions, this image cannot be loaded. Please increase your memory_limit value via your server\'s configuration settings. ');
|
||||
}
|
||||
|
||||
if (count($errors)) {
|
||||
# module validation
|
||||
$total_errors = array_merge($total_errors, $errors);
|
||||
}
|
||||
|
||||
//unlink($file['save_path']);
|
||||
//Necesary to prevent hacking
|
||||
unset($file['save_path']);
|
||||
|
||||
//Add image preview and delete url
|
||||
}
|
||||
|
||||
if (count($total_errors)) {
|
||||
# module validation
|
||||
$this->context->controller->errors = array_merge($this->context->controller->errors, $total_errors);
|
||||
}
|
||||
|
||||
$images = $this->getImageList('date');
|
||||
$tpl = $this->createTemplate('imagemanager.tpl');
|
||||
$tpl->assign(array(
|
||||
'images' => $images,
|
||||
'reloadSliderImage' => 1,
|
||||
'link' => Context::getContext()->link
|
||||
));
|
||||
die(Tools::jsonEncode($tpl->fetch()));
|
||||
}
|
||||
# module validation
|
||||
rsort($images);
|
||||
}
|
||||
|
||||
public function createFolderUpImage()
|
||||
if ($sort_by == 'date' || $sort_by == 'date_desc')
|
||||
{
|
||||
if (!is_dir($this->img_path)) {
|
||||
mkdir($this->img_path, 0755, true);
|
||||
}
|
||||
# module validation
|
||||
array_multisort(array_map('filemtime', $images), SORT_NUMERIC, SORT_DESC, $images);
|
||||
}
|
||||
if ($sort_by == 'date_desc')
|
||||
{
|
||||
# module validation
|
||||
rsort($images);
|
||||
}
|
||||
|
||||
/**
|
||||
* PERMISSION ACCOUNT demo@demo.com
|
||||
* OVERRIDE CORE
|
||||
*/
|
||||
public function initProcess()
|
||||
$result = array();
|
||||
foreach ($images as &$file)
|
||||
{
|
||||
parent::initProcess();
|
||||
if (count($this->errors) <= 0) {
|
||||
if (($module_instance = Module::getInstanceByName('leoslideshow'))) {
|
||||
if (!$module_instance->access('configure')) {
|
||||
$this->errors[] = $this->trans('You do not have permission to configure this.', array(), 'Admin.Notifications.Error');
|
||||
}
|
||||
}
|
||||
}
|
||||
$file_info = pathinfo($file);
|
||||
$result[] = array('name' => $file_info['basename'], 'link' => $this->img_url . $file_info['basename']);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getAllImage($path)
|
||||
{
|
||||
$images = array();
|
||||
foreach (scandir($path) as $d)
|
||||
{
|
||||
if (preg_match('/(.*)\.(jpg|png|gif|jpeg)$/', $d))
|
||||
{
|
||||
# module validation
|
||||
$images[] = $d;
|
||||
}
|
||||
}
|
||||
return $images;
|
||||
}
|
||||
|
||||
public function ajaxProcessaddSliderImage()
|
||||
{
|
||||
if (isset($_FILES['file']))
|
||||
{
|
||||
$image_uploader = new HelperUploader('file');
|
||||
$this->createFolderUpImage();
|
||||
$image_uploader->setSavePath($this->img_path);
|
||||
$image_uploader->setAcceptTypes(array('jpeg', 'gif', 'png', 'jpg'))->setMaxSize($this->max_image_size);
|
||||
$files = $image_uploader->process();
|
||||
$total_errors = array();
|
||||
|
||||
foreach ($files as &$file)
|
||||
{
|
||||
$errors = array();
|
||||
// Evaluate the memory required to resize the image: if it's too much, you can't resize it.
|
||||
if (!ImageManager::checkImageMemoryLimit($file['save_path']))
|
||||
{
|
||||
# module validation
|
||||
$errors[] = Tools::displayError('Due to memory limit restrictions, this image cannot be loaded. Please increase your memory_limit value via your server\'s configuration settings. ');
|
||||
}
|
||||
|
||||
if (count($errors))
|
||||
{
|
||||
# module validation
|
||||
$total_errors = array_merge($total_errors, $errors);
|
||||
}
|
||||
|
||||
//unlink($file['save_path']);
|
||||
//Necesary to prevent hacking
|
||||
unset($file['save_path']);
|
||||
|
||||
//Add image preview and delete url
|
||||
}
|
||||
|
||||
if (count($total_errors))
|
||||
{
|
||||
# module validation
|
||||
$this->context->controller->errors = array_merge($this->context->controller->errors, $total_errors);
|
||||
}
|
||||
|
||||
$images = $this->getImageList('date');
|
||||
$tpl = $this->createTemplate('imagemanager.tpl');
|
||||
$tpl->assign(array(
|
||||
'images' => $images,
|
||||
'reloadSliderImage' => 1,
|
||||
'link' => Context::getContext()->link
|
||||
));
|
||||
die(Tools::jsonEncode($tpl->fetch()));
|
||||
}
|
||||
}
|
||||
|
||||
public function createFolderUpImage()
|
||||
{
|
||||
if (!is_dir($this->img_path))
|
||||
{
|
||||
mkdir($this->img_path, 0755, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PERMISSION ACCOUNT demo@demo.com
|
||||
* OVERRIDE CORE
|
||||
*/
|
||||
public function initProcess()
|
||||
{
|
||||
parent::initProcess();
|
||||
if (count($this->errors) <= 0)
|
||||
{
|
||||
if (($module_instance = Module::getInstanceByName('leoslideshow')))
|
||||
{
|
||||
if (!$module_instance->access('configure'))
|
||||
{
|
||||
$this->errors[] = $this->trans('You do not have permission to configure this.', array(), 'Admin.Notifications.Error');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,370 +1,707 @@
|
||||
.ui-dialog{
|
||||
z-index: 99999;
|
||||
.ui-dialog {
|
||||
z-index: 99999;
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar-close span{
|
||||
margin:-8px !important;
|
||||
|
||||
.ui-dialog .ui-dialog-titlebar-close span {
|
||||
margin: -8px !important;
|
||||
}
|
||||
#slides li li{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
#slides li li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
content: ".";
|
||||
display: block;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
line-height: 0;
|
||||
height: 0;
|
||||
}
|
||||
.nullimg{display: none}
|
||||
|
||||
|
||||
.nullimg {
|
||||
display: none
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
display: inline-block;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
html[xmlns] .clearfix {
|
||||
display: block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
* html .clearfix {
|
||||
height: 1%;
|
||||
height: 1%;
|
||||
}
|
||||
|
||||
h3 span { color:#FAA732;}
|
||||
|
||||
.box > .heading{
|
||||
-webkit-border-radius: 7px 7px 7px 7px;
|
||||
-moz-border-radius: 7px 7px 7px 7px;
|
||||
-khtml-border-radius: 7px 7px 7px 7px;
|
||||
border-radius: 7px 7px 7px 7px;
|
||||
h3 span {
|
||||
color: #FAA732;
|
||||
}
|
||||
|
||||
.slider-params-wrap{
|
||||
background: #f9f9f9;
|
||||
padding: 12px;
|
||||
clear: both;
|
||||
.box>.heading {
|
||||
-webkit-border-radius: 7px 7px 7px 7px;
|
||||
-moz-border-radius: 7px 7px 7px 7px;
|
||||
-khtml-border-radius: 7px 7px 7px 7px;
|
||||
border-radius: 7px 7px 7px 7px;
|
||||
}
|
||||
.page-content{ padding:30px 0; }
|
||||
.pull-right{ float: right;}
|
||||
|
||||
.slider-params-wrap {
|
||||
background: #f9f9f9;
|
||||
padding: 12px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/**
|
||||
* Group Page Name
|
||||
*/
|
||||
|
||||
.groups {
|
||||
width: 300px; float: left;
|
||||
}
|
||||
.group-form{ overflow: hidden; float: left; min-width: 60%; }
|
||||
.groups ul{padding-left: 18px }
|
||||
.groups ul li { font-weight: bold; padding: 6px 0}
|
||||
.groups ul li .active{ color: #5BB75B }
|
||||
.groups {
|
||||
width: 300px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.group-form {
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
min-width: 60%;
|
||||
}
|
||||
|
||||
.groups ul {
|
||||
padding-left: 18px
|
||||
}
|
||||
|
||||
.groups ul li {
|
||||
font-weight: bold;
|
||||
padding: 6px 0
|
||||
}
|
||||
|
||||
.groups ul li .active {
|
||||
color: #5BB75B
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
.buttons > div{ float: left; padding: 8px 12px; background: #000; color: #FFF}
|
||||
.buttons>div {
|
||||
float: left;
|
||||
padding: 8px 12px;
|
||||
background: #000;
|
||||
color: #FFF
|
||||
}
|
||||
|
||||
/****/
|
||||
.slider-foot .layer-collection-wrapper{ float: right; }
|
||||
.slider-foot .layer-form {overflow: hidden;}
|
||||
.slider-foot .layer-collection-wrapper {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.slider-foot .layer-form {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.layer-form {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #DDDDDD;
|
||||
margin: 10px 0;
|
||||
padding: 11px;
|
||||
float: left; width: 45%
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #DDDDDD;
|
||||
margin: 10px 0;
|
||||
padding: 11px;
|
||||
float: left;
|
||||
width: 45%
|
||||
}
|
||||
|
||||
/*******/
|
||||
.slider-layers{margin-top: 10px;}
|
||||
.slider-toolbar{
|
||||
overflow: hidden;
|
||||
background: #F5F5F5;
|
||||
width: 70px;
|
||||
padding: 12px 6px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
font-size: 10px;
|
||||
margin: 109px auto 0;
|
||||
-webkit-border-radius: 6px;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0,0,0,.065);
|
||||
-moz-box-shadow: 0 1px 4px rgba(0,0,0,.065);
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,.065);
|
||||
.slider-layers {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.slider-toolbar ul{ padding: 0; margin: 0}
|
||||
.slider-toolbar li{
|
||||
display: block;
|
||||
|
||||
.slider-toolbar {
|
||||
overflow: hidden;
|
||||
background: #F5F5F5;
|
||||
width: 70px;
|
||||
padding: 12px 6px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
font-size: 10px;
|
||||
margin: 109px auto 0;
|
||||
-webkit-border-radius: 6px;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, .065);
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, .065);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, .065);
|
||||
}
|
||||
|
||||
.slider-toolbar ul {
|
||||
padding: 0;
|
||||
margin: 0
|
||||
}
|
||||
|
||||
.slider-toolbar li {
|
||||
display: block;
|
||||
|
||||
margin: 0 0 -1px;
|
||||
padding: 8px 1px;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #f3f3f3;
|
||||
|
||||
display: block;
|
||||
margin: 2px;
|
||||
|
||||
background: #3A87AD;
|
||||
color: #FFF;
|
||||
font-size: 11px;
|
||||
cursor: hand; cursor: pointer;
|
||||
border-radius: 10px 10px 10px 10px; -moz-transition:all 0.5s
|
||||
}
|
||||
.slider-toolbar li:hover{ background: #1BA6E5;-moz-transition:all 0.5s; }
|
||||
.slider-toolbar .icon{
|
||||
height: 35px;
|
||||
margin: 0 auto;
|
||||
|
||||
width: 35px;
|
||||
display: block;
|
||||
margin: 2px;
|
||||
|
||||
}
|
||||
.slider-toolbar .icon-image{
|
||||
background: url("../../img/admin/image.png") no-repeat scroll left 0;
|
||||
|
||||
}
|
||||
.slider-toolbar .icon-video{
|
||||
background: url("../../img/admin/video.png") no-repeat scroll left 0;
|
||||
}
|
||||
.slider-toolbar .icon-text{
|
||||
background: url("../../img/admin/text.png") no-repeat scroll left 0;
|
||||
}
|
||||
.slider-toolbar .icon-delete{
|
||||
background: url("../../img/admin/delete.png") no-repeat scroll left 0;
|
||||
}
|
||||
.btn-delete{ padding-top:20px;color: red;}
|
||||
.slider-toolbar h4{ text-align: center; font-size: 11px; }
|
||||
|
||||
.slider-editor-wrap{
|
||||
position: relative;
|
||||
width: 980px;
|
||||
height: 400px;
|
||||
border: solid 1px #888;
|
||||
}
|
||||
.slider-layers .simage{
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background: #3A87AD;
|
||||
color: #FFF;
|
||||
font-size: 11px;
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
-moz-transition: all 0.5s
|
||||
}
|
||||
|
||||
.slider-layers .slider-editor {
|
||||
top: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
width: 980px;
|
||||
height: 400px;
|
||||
.slider-toolbar li:hover {
|
||||
background: #1BA6E5;
|
||||
-moz-transition: all 0.5s;
|
||||
}
|
||||
|
||||
|
||||
.dialog-video{
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
background: #FFF;
|
||||
z-index: 99999;
|
||||
left: 120px;
|
||||
border: solid 1px #000;
|
||||
padding: 12px 20px;
|
||||
display: none;
|
||||
min-width: 500px;
|
||||
min-height: 300px;
|
||||
max-width: 680px;
|
||||
display: none ;
|
||||
.slider-toolbar .icon {
|
||||
height: 35px;
|
||||
margin: 0 auto;
|
||||
|
||||
width: 35px;
|
||||
|
||||
}
|
||||
|
||||
.slider-toolbar .icon-image {
|
||||
background: url("../../img/admin/image.png") no-repeat scroll left 0;
|
||||
|
||||
}
|
||||
|
||||
.slider-toolbar .icon-video {
|
||||
background: url("../../img/admin/video.png") no-repeat scroll left 0;
|
||||
}
|
||||
|
||||
.slider-toolbar .icon-text {
|
||||
background: url("../../img/admin/text.png") no-repeat scroll left 0;
|
||||
}
|
||||
|
||||
.slider-toolbar .icon-delete {
|
||||
background: url("../../img/admin/delete.png") no-repeat scroll left 0;
|
||||
}
|
||||
|
||||
.btn-delete {
|
||||
padding-top: 20px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.slider-toolbar h4 {
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.slider-editor-wrap {
|
||||
position: relative;
|
||||
width: 980px;
|
||||
height: 400px;
|
||||
border: solid 1px #888;
|
||||
}
|
||||
|
||||
.slider-layers .simage {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.slider-layers .slider-editor {
|
||||
top: 0;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
width: 980px;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
|
||||
.dialog-video {
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
background: #FFF;
|
||||
z-index: 99999;
|
||||
left: 120px;
|
||||
border: solid 1px #000;
|
||||
padding: 12px 20px;
|
||||
display: none;
|
||||
min-width: 500px;
|
||||
min-height: 300px;
|
||||
max-width: 680px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**********************/
|
||||
.slider-editor {
|
||||
.slider-editor {}
|
||||
|
||||
}
|
||||
.slider-editor .in-active{
|
||||
visibility: hidden;
|
||||
}
|
||||
.slider-editor .draggable-item{
|
||||
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
padding:0;
|
||||
|
||||
cursor: hand;cursor: pointer;
|
||||
|
||||
.slider-editor .in-active {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.slider-editor .layer-active{
|
||||
box-shadow: 1px 1px 2px 1px rgba(217,110,74,0.45), 1px 1px 5px 2px rgba(221,221,221,1), 1px 1px 10px 5px rgba(221,221,221,1);
|
||||
-webkit-box-shadow: 1px 1px 2px 1px rgba(217,110,74,0.45), 1px 1px 5px 2px rgba(221,221,221,1), 1px 1px 10px 5px rgba(221,221,221,1);
|
||||
-moz-box-shadow: 1px 1px 2px 1px rgba(217,110,74,0.45), 1px 1px 5px 2px rgba(221,221,221,1), 1px 1px 10px 5px rgba(221,221,221,1);
|
||||
.slider-editor .draggable-item {
|
||||
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
padding: 0;
|
||||
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.slider-editor .layer-active {
|
||||
box-shadow: 1px 1px 2px 1px rgba(217, 110, 74, 0.45), 1px 1px 5px 2px rgba(221, 221, 221, 1), 1px 1px 10px 5px rgba(221, 221, 221, 1);
|
||||
-webkit-box-shadow: 1px 1px 2px 1px rgba(217, 110, 74, 0.45), 1px 1px 5px 2px rgba(221, 221, 221, 1), 1px 1px 10px 5px rgba(221, 221, 221, 1);
|
||||
-moz-box-shadow: 1px 1px 2px 1px rgba(217, 110, 74, 0.45), 1px 1px 5px 2px rgba(221, 221, 221, 1), 1px 1px 10px 5px rgba(221, 221, 221, 1);
|
||||
|
||||
}
|
||||
|
||||
.layers-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.slider-foot {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
}
|
||||
.layers-wrapper{ position: relative; }
|
||||
.slider-foot{position: relative; }
|
||||
/****/
|
||||
#layer-form{ display: none; }
|
||||
#layer-form {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layer-form {
|
||||
minx-width: 500px;
|
||||
|
||||
padding: 12px;
|
||||
margin:12px 0;
|
||||
background-color: #FFF;
|
||||
border: 1px solid #DDDDDD;
|
||||
minx-width: 500px;
|
||||
|
||||
padding: 12px;
|
||||
margin: 12px 0;
|
||||
background-color: #FFF;
|
||||
border: 1px solid #DDDDDD;
|
||||
}
|
||||
.layer-form table.form tr td{ font-size: 10px }
|
||||
.layer-form table.form tr > td:first-child{
|
||||
width: 70px;
|
||||
font-size: 100%;
|
||||
|
||||
.layer-form table.form tr td {
|
||||
font-size: 10px
|
||||
}
|
||||
.layer-form textarea{resize: vertical}
|
||||
.slider-form label{
|
||||
margin-left: 12px;
|
||||
|
||||
.layer-form table.form tr>td:first-child {
|
||||
width: 70px;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.layer-form textarea {
|
||||
resize: vertical
|
||||
}
|
||||
|
||||
.slider-form label {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
/****/
|
||||
.layer-collection-wrapper { width: 48%; padding: 15px 12px 30px; margin-left: 12px; margin-top: 12px; border: 1px solid #DDDDDD }
|
||||
.layer-collection .layer-active{ background: #f6f6f6; border: 1px solid #ccc }
|
||||
.layer-index{ background: #fff; padding: 5px 8px; margin-bottom: 1px; cursor:hand; cursor: pointer;
|
||||
border: solid 1px #eee; overflow: hidden;
|
||||
}
|
||||
|
||||
.layer-index span{
|
||||
margin: 0 5px;
|
||||
padding: 5px 12px;
|
||||
.layer-collection-wrapper {
|
||||
width: 48%;
|
||||
padding: 15px 12px 30px;
|
||||
margin-left: 12px;
|
||||
margin-top: 12px;
|
||||
border: 1px solid #DDDDDD
|
||||
}
|
||||
.layer-index .layer-index-caption{
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
height: 24px;
|
||||
overflow: hidden;
|
||||
width: 235px;
|
||||
}
|
||||
.layer-index .i-no{ background:#D9EDF7; margin-left: 0; display: block; float: left;}
|
||||
.layer-index .status { display: block; float: right; background: #F2DEDE;}
|
||||
.layer-index .input-time{ float: right; }
|
||||
.layer-index .in-active{ background: #ccc }
|
||||
|
||||
.slider-wrap { position: relative; padding:6px 0 8px;}
|
||||
.slider-wrap .t-start, .slider-wrap .t-end { position: absolute; bottom:4px ; left:0; z-index: 10;font-size: 9px }
|
||||
.slider-wrap .t-end { left: auto; right: 0}
|
||||
.layer-index .slider-timing{ display: block; clear: both; height: 5px; width: 80%; margin:0 auto; }
|
||||
|
||||
.layer-index .ui-slider .ui-slider-handle { width: 8px; top: -7px; }
|
||||
|
||||
.layer-content {}
|
||||
.layer-content .caption-layer, .layer-content .btn-change-img,.layer-content .btn-change-video{
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
font-size: 10px;
|
||||
background: red; padding: 3px 5px;
|
||||
background-color: #F2DEDE
|
||||
}
|
||||
|
||||
.layer-content .caption-layer{ top: 0; }
|
||||
.layer-content .btn-change-img, .layer-content .btn-change-video{ bottom: 0;}
|
||||
|
||||
.layer-content:hover .caption-layer, .layer-content:hover .btn-change-img , .layer-content:hover .btn-change-video{
|
||||
display: block;
|
||||
}
|
||||
.layer_video .content-sample{ width: 190px; height: 190px; background: green;}
|
||||
.layer_image .content-sample{ width: 190px; height: 190px; background: #888;}
|
||||
|
||||
.buttons .pull-right {float:right}
|
||||
.buttons .btn {
|
||||
background: none repeat scroll 0 0 #003A88;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
color: #FFFFFF;
|
||||
display: inline-block;
|
||||
padding: 10px 15px;
|
||||
text-decoration: none;
|
||||
margin-right: 12px;
|
||||
font-weight: bold;
|
||||
font-size: 11px; text-align: center;
|
||||
cursor: pointer;cursor: hand; border:#f3f3f3 solid 3px;
|
||||
.layer-collection .layer-active {
|
||||
background: #f6f6f6;
|
||||
border: 1px solid #ccc
|
||||
}
|
||||
td .buttons .btn{ padding:5px 12px; font-weight: normal; margin:0;}
|
||||
.buttons .grey{ background: #5BB75B; color:#fff }
|
||||
|
||||
.layer-index {
|
||||
background: #fff;
|
||||
padding: 5px 8px;
|
||||
margin-bottom: 1px;
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
border: solid 1px #eee;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.layer-index span {
|
||||
margin: 0 5px;
|
||||
padding: 5px 12px;
|
||||
}
|
||||
|
||||
.layer-index .layer-index-caption {
|
||||
display: block;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
height: 24px;
|
||||
overflow: hidden;
|
||||
width: 235px;
|
||||
}
|
||||
|
||||
.layer-index .i-no {
|
||||
background: #D9EDF7;
|
||||
margin-left: 0;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.layer-index .status {
|
||||
display: block;
|
||||
float: right;
|
||||
background: #F2DEDE;
|
||||
}
|
||||
|
||||
.layer-index .input-time {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.layer-index .in-active {
|
||||
background: #ccc
|
||||
}
|
||||
|
||||
.slider-wrap {
|
||||
position: relative;
|
||||
padding: 6px 0 8px;
|
||||
}
|
||||
|
||||
.slider-wrap .t-start,
|
||||
.slider-wrap .t-end {
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
font-size: 9px
|
||||
}
|
||||
|
||||
.slider-wrap .t-end {
|
||||
left: auto;
|
||||
right: 0
|
||||
}
|
||||
|
||||
.layer-index .slider-timing {
|
||||
display: block;
|
||||
clear: both;
|
||||
height: 5px;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.layer-index .ui-slider .ui-slider-handle {
|
||||
width: 8px;
|
||||
top: -7px;
|
||||
}
|
||||
|
||||
.layer-content {}
|
||||
|
||||
.layer-content .caption-layer,
|
||||
.layer-content .btn-change-img,
|
||||
.layer-content .btn-change-video {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
font-size: 10px;
|
||||
background: red;
|
||||
padding: 3px 5px;
|
||||
background-color: #F2DEDE
|
||||
}
|
||||
|
||||
.layer-content .caption-layer {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.layer-content .btn-change-img,
|
||||
.layer-content .btn-change-video {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.layer-content:hover .caption-layer,
|
||||
.layer-content:hover .btn-change-img,
|
||||
.layer-content:hover .btn-change-video {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layer_video .content-sample {
|
||||
width: 190px;
|
||||
height: 190px;
|
||||
background: green;
|
||||
}
|
||||
|
||||
.layer_image .content-sample {
|
||||
width: 190px;
|
||||
height: 190px;
|
||||
background: #888;
|
||||
}
|
||||
|
||||
.buttons .pull-right {
|
||||
float: right
|
||||
}
|
||||
|
||||
.buttons .btn {
|
||||
background: none repeat scroll 0 0 #003A88;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
color: #FFFFFF;
|
||||
display: inline-block;
|
||||
padding: 10px 15px;
|
||||
text-decoration: none;
|
||||
margin-right: 12px;
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
border: #f3f3f3 solid 3px;
|
||||
}
|
||||
|
||||
td .buttons .btn {
|
||||
padding: 5px 12px;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.buttons .grey {
|
||||
background: #5BB75B;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.buttons .orange {
|
||||
background: #FAA732;
|
||||
background: #FAA732;
|
||||
}
|
||||
.buttons .btn:hover{ border:#CCC solid 3px;}
|
||||
|
||||
/*
|
||||
*
|
||||
.buttons .btn:hover {
|
||||
border: #CCC solid 3px;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
.group-sliders > div{ display: block; width: 200px; height: 115px; overflow: hidden; background: #CCC; float:left; margin: 5px 8px; position: relative; }
|
||||
.group-sliders > div div{ font-size: 11px; padding:3px 5px; position: absolute;bottom: 0; left: 0; }
|
||||
.group-sliders > div a.image { display: block; width: 100%;height: 100%}
|
||||
.slider-item.active{background: #999}
|
||||
.new-slider-item a { display: block;width: 100%; height: 100%; background: url(../../img/admin/plus_orange.png) no-repeat center center #888; }
|
||||
.new-slider-item div{position: absolute;bottom: 0;left: 0; color: #f3f3f3; padding:12px; }
|
||||
.slider-status,.slider-clone, .slider-delete{
|
||||
position: absolute; top: 6px; left: 6px; display: block; width: 20px; height: 20px; background: red; overflow: hidden;text-indent: -999em;
|
||||
}
|
||||
.slider-clone{left: auto;right:6px;background: url(../../img/admin/copy.png) no-repeat center center }
|
||||
.slider-delete{left: auto;right:36px;background: url(../../img/admin/delete.gif) no-repeat center center }
|
||||
|
||||
.slider-status-off{ background: #000 }
|
||||
.upload-img-form{
|
||||
border: 1px solid #EEEEEE;
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
.group-sliders>div {
|
||||
display: block;
|
||||
width: 200px;
|
||||
height: 115px;
|
||||
overflow: hidden;
|
||||
background: #CCC;
|
||||
float: left;
|
||||
margin: 5px 8px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.action-simage{position: absolute;z-index: 100;top: -18px}
|
||||
.action-simage a{color: red;}
|
||||
.back-ground{margin-bottom: 20px;border:1px solid #DDDDDD;padding: 10px;position: relative;height: 50px}
|
||||
.back-ground lable{line-height: 24px}
|
||||
.title-back{font-weight: bold;left: -1px;position: absolute;top: -20px;}
|
||||
.text-attr td{padding: 2px}
|
||||
.group-sliders>div div {
|
||||
font-size: 11px;
|
||||
padding: 3px 5px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.leo-width-val{float:left;width: 45px}
|
||||
.leo-add-column,.leo-w-option, .leo-change-width{height: 30px}
|
||||
.leo-width{width: 328px;float: left;height: 17px;background: url(../../img/admin/colsize.png);background-position:-3px -3px}
|
||||
ul.leo-col-class li{display: inline-block;padding: 5px 10px}
|
||||
.group-sliders>div a.image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.leo-w-2 { background-position:-3px -255px }
|
||||
.leo-w-2-4 { background-position:-3px -234px }
|
||||
.leo-w-3 { background-position:-3px -213px }
|
||||
.leo-w-4 { background-position:-3px -192px }
|
||||
.leo-w-4-8 { background-position:-3px -171px }
|
||||
.leo-w-6{background-position:-3px -129px}
|
||||
.leo-w-7-2 { background-position:-3px -108px }
|
||||
.leo-w-8 { background-position:-3px -87px }
|
||||
.leo-w-9 { background-position:-3px -66px }
|
||||
.leo-w-9-6 { background-position:-3px -45px }
|
||||
.leo-w-10 { background-position:-3px -24px }
|
||||
.slider-item.active {
|
||||
background: #999
|
||||
}
|
||||
|
||||
.new-slider-item a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url(../../img/admin/plus_orange.png) no-repeat center center #888;
|
||||
}
|
||||
|
||||
.new-slider-item div {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
color: #f3f3f3;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.slider-status,
|
||||
.slider-clone,
|
||||
.slider-delete {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 6px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: red;
|
||||
overflow: hidden;
|
||||
text-indent: -999em;
|
||||
}
|
||||
|
||||
.slider-clone {
|
||||
left: auto;
|
||||
right: 6px;
|
||||
background: url(../../img/admin/copy.png) no-repeat center center
|
||||
}
|
||||
|
||||
.slider-delete {
|
||||
left: auto;
|
||||
right: 36px;
|
||||
background: url(../../img/admin/delete.gif) no-repeat center center
|
||||
}
|
||||
|
||||
.slider-status-off {
|
||||
background: #000
|
||||
}
|
||||
|
||||
.upload-img-form {
|
||||
border: 1px solid #EEEEEE;
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.action-simage {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: -18px
|
||||
}
|
||||
|
||||
.action-simage a {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.back-ground {
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #DDDDDD;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
height: 50px
|
||||
}
|
||||
|
||||
.back-ground lable {
|
||||
line-height: 24px
|
||||
}
|
||||
|
||||
.title-back {
|
||||
font-weight: bold;
|
||||
left: -1px;
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
}
|
||||
|
||||
.text-attr td {
|
||||
padding: 2px
|
||||
}
|
||||
|
||||
.leo-width-val {
|
||||
float: left;
|
||||
width: 45px
|
||||
}
|
||||
|
||||
.leo-add-column,
|
||||
.leo-w-option,
|
||||
.leo-change-width {
|
||||
height: 30px
|
||||
}
|
||||
|
||||
.leo-width {
|
||||
width: 328px;
|
||||
float: left;
|
||||
height: 17px;
|
||||
background: url(../../img/admin/colsize.png);
|
||||
background-position: -3px -3px
|
||||
}
|
||||
|
||||
ul.leo-col-class li {
|
||||
display: inline-block;
|
||||
padding: 5px 10px
|
||||
}
|
||||
|
||||
.leo-w-2 {
|
||||
background-position: -3px -255px
|
||||
}
|
||||
|
||||
.leo-w-2-4 {
|
||||
background-position: -3px -234px
|
||||
}
|
||||
|
||||
.leo-w-3 {
|
||||
background-position: -3px -213px
|
||||
}
|
||||
|
||||
.leo-w-4 {
|
||||
background-position: -3px -192px
|
||||
}
|
||||
|
||||
.leo-w-4-8 {
|
||||
background-position: -3px -171px
|
||||
}
|
||||
|
||||
.leo-w-6 {
|
||||
background-position: -3px -129px
|
||||
}
|
||||
|
||||
.leo-w-7-2 {
|
||||
background-position: -3px -108px
|
||||
}
|
||||
|
||||
.leo-w-8 {
|
||||
background-position: -3px -87px
|
||||
}
|
||||
|
||||
.leo-w-9 {
|
||||
background-position: -3px -66px
|
||||
}
|
||||
|
||||
.leo-w-9-6 {
|
||||
background-position: -3px -45px
|
||||
}
|
||||
|
||||
.leo-w-10 {
|
||||
background-position: -3px -24px
|
||||
}
|
||||
|
||||
/***************DONGND:: CSS for tab config BEGIN *******************/
|
||||
.leoslideshow-tablist a:hover, .leoslideshow-tablist li.active a {
|
||||
border-bottom: medium none !important;
|
||||
border-top: 3px solid #25b9d7 !important;
|
||||
.leoslideshow-tablist a:hover,
|
||||
.leoslideshow-tablist li.active a {
|
||||
border-bottom: medium none !important;
|
||||
border-top: 3px solid #25b9d7 !important;
|
||||
}
|
||||
|
||||
.leoslideshow-tablist a:focus {
|
||||
border-bottom: medium none !important;
|
||||
border-top: 3px solid #25b9d7 !important;
|
||||
border-bottom: medium none !important;
|
||||
border-top: 3px solid #25b9d7 !important;
|
||||
}
|
||||
|
||||
#slideshowgeneralsetting .panel {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#slideshowgeneralsetting .panel.active {
|
||||
display: block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#slideshowgeneralsetting .panel {
|
||||
border-radius: 0 0 5px 5px !important;
|
||||
border-radius: 0 0 5px 5px !important;
|
||||
}
|
||||
|
||||
.nav-tabs a:focus {
|
||||
outline: medium none;
|
||||
outline: medium none;
|
||||
}
|
||||
|
||||
#slides li
|
||||
{
|
||||
list-style: none;
|
||||
margin: 0 0 4px 0;
|
||||
padding: 10px;
|
||||
background-color: #F4E6C9;
|
||||
border: #CCCCCC solid 1px;
|
||||
color:#000;
|
||||
#slides li {
|
||||
list-style: none;
|
||||
margin: 0 0 4px 0;
|
||||
padding: 10px;
|
||||
background-color: #F4E6C9;
|
||||
border: #CCCCCC solid 1px;
|
||||
color: #000;
|
||||
}
|
||||
/***************DONGND:: CSS for tab config END *******************/
|
||||
|
||||
#slides>li {
|
||||
height: 65px;
|
||||
}
|
||||
|
||||
/***************DONGND:: CSS for tab config END *******************/
|
||||
@@ -1,4 +1,4 @@
|
||||
{*
|
||||
{*
|
||||
* @Module Name: Leo Slideshow
|
||||
* @Website: leotheme.com.com - prestashop template provider
|
||||
* @author Leotheme <leotheme@gmail.com>
|
||||
@@ -17,7 +17,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="alert alert-info"><a href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=leoslideshow&editgroup=1&id_group={$id_group|intval}" alt={l s='Back to' mod='leoslideshow'} {$group_title|escape:'html':'UTF-8'}>{l s='Back to' mod='leoslideshow'} {$group_title|escape:'html':'UTF-8'}</a></div>
|
||||
<div id="slidesContent" style="width: 500px; margin-top: 30px;">
|
||||
<div id="slidesContent" style="width: 800px; margin-top: 30px;">
|
||||
<ul id="slides">
|
||||
{foreach from=$slides item=slide}
|
||||
<li id="slides_{$slide.id_slide|intval}">
|
||||
@@ -25,7 +25,7 @@
|
||||
<div style="float: right;margin-top: -5px;">
|
||||
{$slide.status}{* HTML form , no escape necessary *}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default dropdown-toggle" href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=leoslideshow&editSlider=1&id_slide={$slide.id_slide|intval}&id_group={$id_group|intval}">
|
||||
<a class="btn btn-default dropdown-toggle" href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=leoslideshow&editSlider=1&id_slide={$slide.id_slide|intval}&id_group={$id_group|intval}">
|
||||
{if $slide.id_slide == $currentSliderID}
|
||||
{l s='Editting' mod='leoslideshow'}
|
||||
{else}
|
||||
@@ -38,7 +38,7 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu" style="border: none">
|
||||
<li style="background-color:#fff;border: none">
|
||||
<a class="" href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=leoslideshow&editSlider=1&id_slide={$slide.id_slide|intval}&id_group={$id_group|intval}">
|
||||
<a class="" href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=leoslideshow&editSlider=1&id_slide={$slide.id_slide|intval}&id_group={$id_group|intval}">
|
||||
<i class="icon-edit"></i> {l s='Click to Edit' mod='leoslideshow'}
|
||||
</a>
|
||||
</li>
|
||||
@@ -46,15 +46,15 @@
|
||||
<a class="color_danger btn-actionslider delete-slide" data-confirm="{l s='Are you sure you want to delete this slider?' mod='leoslideshow'}" data-id-slide="{$slide.id_slide|intval}" href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=leoslideshow&leoajax=1&action=deleteSlider&id_slide={$slide.id_slide|intval}"><i class="icon-remove-sign"></i> {l s='Delete This slider' mod='leoslideshow'}</a>
|
||||
</li>
|
||||
<li style="background-color:#fff;border: none">
|
||||
<a class="btn-actionslider" data-confirm="{l s='Are you sure you want to duplicate this slider?' mod='leoslideshow'}" data-id-slide="{$slide.id_slide|intval}" href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=leoslideshow&leoajax=1&action=duplicateSlider&id_slide={$slide.id_slide|intval}">
|
||||
<a class="btn-actionslider" data-confirm="{l s='Are you sure you want to duplicate this slider?' mod='leoslideshow'}" data-id-slide="{$slide.id_slide|intval}" href="{$link->getAdminLink('AdminModules')|escape:'html':'UTF-8'}&configure=leoslideshow&leoajax=1&action=duplicateSlider&id_slide={$slide.id_slide|intval}">
|
||||
<i class="icon-film"></i> {l s='Duplicate This Slider' mod='leoslideshow'}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default {if $languages|count > 1}dropdown-toggle {else}slider-preview {/if}color_danger" href="{$previewLink|escape:'html':'UTF-8'}&id_group={$id_group|intval}&id_slide={$slide.id_slide|intval}"><i class="icon-eye-open"></i> {l s='Preview' mod='leoslideshow'}</a>
|
||||
{if $languages|count > 1}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user