主题,导航,友情链接,自定义页面
parent
8a4c86665e
commit
5611b56946
|
|
@ -243,7 +243,7 @@ class ArticleController extends CommonController
|
|||
|
||||
// 正则匹配文章图片
|
||||
$temp_image = $this->MatchContentImage($m->content);
|
||||
$m->image = serialize($temp_image);
|
||||
$m->image = json_encode($temp_image);
|
||||
$m->image_count = count($temp_image);
|
||||
|
||||
// 数据添加
|
||||
|
|
@ -282,7 +282,7 @@ class ArticleController extends CommonController
|
|||
|
||||
// 正则匹配文章图片
|
||||
$temp_image = $this->MatchContentImage($m->content);
|
||||
$m->image = serialize($temp_image);
|
||||
$m->image = json_encode($temp_image);
|
||||
$m->image_count = count($temp_image);
|
||||
|
||||
// 数据更新
|
||||
|
|
@ -310,7 +310,7 @@ class ArticleController extends CommonController
|
|||
{
|
||||
if(!empty($content))
|
||||
{
|
||||
$pattern = '/<img.*?src=[\'|\"](\/Public\/Upload\/Article\/image\/.*?[\.gif|\.jpg|\.jpeg|\.png|\.bmp])[\'|\"].*?[\/]?>/';
|
||||
$pattern = '/<img.*?src=[\'|\"](\/Public\/Upload\/article\/image\/.*?[\.gif|\.jpg|\.jpeg|\.png|\.bmp])[\'|\"].*?[\/]?>/';
|
||||
preg_match_all($pattern, $content, $match);
|
||||
return empty($match[1]) ? array() : $match[1];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ class CustomViewController extends CommonController
|
|||
|
||||
// 正则匹配文章图片
|
||||
$temp_image = $this->MatchContentImage($m->content);
|
||||
$m->image = serialize($temp_image);
|
||||
$m->image = json_encode($temp_image);
|
||||
$m->image_count = count($temp_image);
|
||||
|
||||
// 数据添加
|
||||
|
|
@ -284,7 +284,7 @@ class CustomViewController extends CommonController
|
|||
|
||||
// 正则匹配文章图片
|
||||
$temp_image = $this->MatchContentImage($m->content);
|
||||
$m->image = serialize($temp_image);
|
||||
$m->image = json_encode($temp_image);
|
||||
$m->image_count = count($temp_image);
|
||||
$m->upd_time = time();
|
||||
$m->title = I('title');
|
||||
|
|
@ -314,7 +314,7 @@ class CustomViewController extends CommonController
|
|||
{
|
||||
if(!empty($content))
|
||||
{
|
||||
$pattern = '/<img.*?src=[\'|\"](\/Public\/Upload\/Article\/image\/.*?[\.gif|\.jpg|\.jpeg|\.png|\.bmp])[\'|\"].*?[\/]?>/';
|
||||
$pattern = '/<img.*?src=[\'|\"](\/Public\/Upload\/customview\/image\/.*?[\.gif|\.jpg|\.jpeg|\.png|\.bmp])[\'|\"].*?[\/]?>/';
|
||||
preg_match_all($pattern, $content, $match);
|
||||
return empty($match[1]) ? array() : $match[1];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,235 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 底部导航
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class NavFooterController extends CommonController
|
||||
{
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 登录校验
|
||||
$this->Is_Login();
|
||||
|
||||
// 权限校验
|
||||
$this->Is_Power();
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 导航列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 获取导航列表
|
||||
$this->assign('list', $this->GetNavList());
|
||||
|
||||
// 文章分类
|
||||
$this->assign('article_category_list', M('ArticleCategory')->field(array('id', 'name'))->where(array('is_enable'=>1))->select());
|
||||
|
||||
// 自定义页面
|
||||
$this->assign('customview_list', M('CustomView')->field(array('id', 'title'))->where(array('is_enable'=>1))->select());
|
||||
|
||||
// 是否新窗口打开
|
||||
$this->assign('common_is_new_window_open_list', L('common_is_new_window_open_list'));
|
||||
|
||||
// 是否显示
|
||||
$this->assign('common_is_show_list', L('common_is_show_list'));
|
||||
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
/**
|
||||
* [GetNavList 获取数据列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-10T22:16:29+0800
|
||||
*/
|
||||
private function GetNavList()
|
||||
{
|
||||
$m = M('Navigation');
|
||||
$field = array('id', 'name', 'url', 'value', 'data_type', 'sort', 'is_show', 'is_new_window_open');
|
||||
return NavDataDealWith($m->field($field)->where(array('nav_type'=>'footer'))->order('sort')->select());
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 添加/编辑]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-07T21:58:19+0800
|
||||
*/
|
||||
public function Save()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 请求类型
|
||||
switch(I('data_type'))
|
||||
{
|
||||
// 自定义导航
|
||||
case 'custom':
|
||||
$this->DataSave(5);
|
||||
break;
|
||||
|
||||
// 文章分类导航
|
||||
case 'article_category':
|
||||
$this->DataSave(6);
|
||||
break;
|
||||
|
||||
// 自定义页面导航
|
||||
case 'customview':
|
||||
$this->DataSave(7);
|
||||
break;
|
||||
}
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* [DataSave 导航数据保存]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-02-05T20:12:30+0800
|
||||
* @param [int] $check_type [校验类型]
|
||||
*/
|
||||
private function DataSave($check_type)
|
||||
{
|
||||
$m = D('Navigation');
|
||||
|
||||
// 数据校验
|
||||
if($m->create($_POST, $check_type))
|
||||
{
|
||||
// 非自定义导航数据处理
|
||||
if(empty($_POST['name']))
|
||||
{
|
||||
switch(I('data_type'))
|
||||
{
|
||||
// 文章分类导航
|
||||
case 'article_category':
|
||||
$temp_name = M('ArticleCategory')->where(array('id'=>I('value')))->getField('name');
|
||||
break;
|
||||
|
||||
// 自定义页面导航
|
||||
case 'customview':
|
||||
$temp_name = M('CustomView')->where(array('id'=>I('value')))->getField('title');
|
||||
break;
|
||||
}
|
||||
// 只截取16个字符
|
||||
$m->name = mb_substr($temp_name, 0, 16, C('DEFAULT_CHARSET'));
|
||||
} else {
|
||||
$m->name = I('name');
|
||||
}
|
||||
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_footer_key'), null);
|
||||
|
||||
// id为空则表示是新增
|
||||
if(empty($_POST['id']))
|
||||
{
|
||||
// 额外数据处理
|
||||
$m->add_time = time();
|
||||
$m->nav_type = 'footer';
|
||||
|
||||
// 写入数据库
|
||||
if($m->add())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_add_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_add_error'), -100);
|
||||
}
|
||||
} else {
|
||||
// 数据编辑
|
||||
if($m->where(array('id'=>I('id')))->save())
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-09T21:13:47+0800
|
||||
*/
|
||||
public function Delete()
|
||||
{
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
$m = D('Navigation');
|
||||
if($m->create($_POST, 4))
|
||||
{
|
||||
if($m->delete($id))
|
||||
{
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_footer_key'), null);
|
||||
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
} else {
|
||||
$this->ajaxReturn($m->getError(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [StatusUpdate 状态更新]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2017-01-12T22:23:06+0800
|
||||
*/
|
||||
public function StatusUpdate()
|
||||
{
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
{
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
}
|
||||
|
||||
// 数据更新
|
||||
if(M('Navigation')->where(array('id'=>I('id')))->save(array('is_show'=>I('state'))))
|
||||
{
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_footer_key'), null);
|
||||
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -9,7 +9,7 @@ namespace Admin\Controller;
|
|||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class NavHeaderController extends CommonController
|
||||
class NavigationController extends CommonController
|
||||
{
|
||||
private $nav_type;
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ class NavHeaderController extends CommonController
|
|||
}
|
||||
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_header_key'), null);
|
||||
S(C('cache_common_home_nav_'.$this->nav_type.'_key', null));
|
||||
|
||||
// id为空则表示是新增
|
||||
if(empty($_POST['id']))
|
||||
|
|
@ -228,7 +228,7 @@ class NavHeaderController extends CommonController
|
|||
if($m->delete($id))
|
||||
{
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_header_key'), null);
|
||||
S(C('cache_common_home_nav_'.$this->nav_type.'_key', null));
|
||||
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
} else {
|
||||
|
|
@ -258,7 +258,7 @@ class NavHeaderController extends CommonController
|
|||
if(M('Navigation')->where(array('id'=>I('id')))->save(array('is_show'=>I('state'))))
|
||||
{
|
||||
// 清除缓存
|
||||
S(C('cache_common_home_nav_header_key'), null);
|
||||
S(C('cache_common_home_nav_'.$this->nav_type.'_key', null));
|
||||
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
|
|
@ -35,6 +35,9 @@ class ThemeController extends CommonController
|
|||
// 静态目录和html目录
|
||||
$this->html_path = 'Application'.DS.'Home'.DS.'View'.DS;
|
||||
$this->static_path = 'Public'.DS.'Home'.DS;
|
||||
|
||||
// 小导航
|
||||
$this->view_type = I('view_type', 'home');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -46,12 +49,8 @@ class ThemeController extends CommonController
|
|||
*/
|
||||
public function Index()
|
||||
{
|
||||
// 导航参数
|
||||
$view_type = I('view_type', 'home');
|
||||
$this->assign('view_type', $view_type);
|
||||
|
||||
// 模板
|
||||
switch($view_type)
|
||||
switch($this->view_type)
|
||||
{
|
||||
// 模板安装
|
||||
case 'upload':
|
||||
|
|
@ -69,6 +68,9 @@ class ThemeController extends CommonController
|
|||
|
||||
$this->display('Index');
|
||||
}
|
||||
|
||||
// 导航参数
|
||||
$this->assign('view_type', $this->view_type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class UeditorController extends CommonController
|
|||
}
|
||||
|
||||
/* 生成上传实例对象并完成上传 */
|
||||
$up = new \My\Uploader($field_name, $temp_config, $base64);
|
||||
$up = new \Library\Uploader($field_name, $temp_config, $base64);
|
||||
|
||||
/**
|
||||
* 得到上传文件所对应的各个参数,数组结构
|
||||
|
|
@ -292,7 +292,7 @@ class UeditorController extends CommonController
|
|||
$source = isset($_POST[$field_name]) ? $_POST[$field_name] : $_GET[$field_name];
|
||||
foreach($source as $imgUrl)
|
||||
{
|
||||
$item = new \My\Uploader($imgUrl, $temp_config, "remote");
|
||||
$item = new \Library\Uploader($imgUrl, $temp_config, "remote");
|
||||
$info = $item->getFileInfo();
|
||||
array_push($list, array(
|
||||
"state" => $info["state"],
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-底部导航
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 公共
|
||||
'navheader_add_name' => '导航添加',
|
||||
'navheader_edit_name' => '导航编辑',
|
||||
'navheader_custom_operation_add' => '自定义',
|
||||
'navheader_article_category_operation_add' => '分类',
|
||||
'navheader_customview_operation_add' => '页面',
|
||||
'navheader_article_category_name_format' => '默认文章分类名称',
|
||||
'navheader_customview_name_format' => '默认自定义页面名称',
|
||||
|
||||
// 自定义导航
|
||||
'navheader_level_text' => '导航级别',
|
||||
'navheader_level_format' => '导航级别选择错误',
|
||||
'navheader_name_text' => '导航名称',
|
||||
'navheader_name_format' => '导航名称格式 2~16 个字符',
|
||||
'navheader_url_text' => 'url地址',
|
||||
'navheader_url_text_tips' => '带http://',
|
||||
'navheader_url_format' => 'url格式有误',
|
||||
|
||||
// 文章分类导航
|
||||
'navheader_article_category_id_text' => '文章分类',
|
||||
'navheader_article_category_id_format' => '文章分类选择有误',
|
||||
|
||||
// 自定义页面导航
|
||||
'navheader_customview_id_text' => '自定义页面',
|
||||
'navheader_customview_id_format' => '自定义页面选择有误',
|
||||
);
|
||||
?>
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-顶部导航
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 公共
|
||||
'navheader_add_name' => '导航添加',
|
||||
'navheader_edit_name' => '导航编辑',
|
||||
'navheader_custom_operation_add' => '自定义',
|
||||
'navheader_article_category_operation_add' => '文字分类',
|
||||
'navheader_customview_operation_add' => '自定义页面',
|
||||
'navheader_goods_category_operation_add' => '商品分类页面',
|
||||
'navheader_article_category_name_format' => '默认文章分类名称',
|
||||
'navheader_customview_name_format' => '默认自定义页面名称',
|
||||
'navheader_goods_category_name_format' => '默认商品分类名称',
|
||||
|
||||
// 自定义导航
|
||||
'navheader_level_text' => '导航级别',
|
||||
'navheader_level_format' => '导航级别选择错误',
|
||||
'navheader_name_text' => '导航名称',
|
||||
'navheader_name_format' => '导航名称格式 2~16 个字符',
|
||||
'navheader_url_text' => 'url地址',
|
||||
'navheader_url_text_tips' => '带http://',
|
||||
'navheader_url_format' => 'url格式有误',
|
||||
|
||||
// 文章分类导航
|
||||
'navheader_article_category_id_text' => '文章分类',
|
||||
'navheader_article_category_id_format' => '文章分类选择有误',
|
||||
|
||||
// 自定义页面导航
|
||||
'navheader_customview_id_text' => '自定义页面',
|
||||
'navheader_customview_id_format' => '自定义页面选择有误',
|
||||
|
||||
// 商品分类导航
|
||||
'navheader_goods_category_id_text' => '商品分类',
|
||||
'navheader_goods_category_id_format' => '商品分类选择有误',
|
||||
|
||||
'navheader_nav_header_name' => '中间导航',
|
||||
'navheader_nav_footer_name' => '底部导航',
|
||||
);
|
||||
?>
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-导航
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 公共
|
||||
'navigation_add_name' => '导航添加',
|
||||
'navigation_edit_name' => '导航编辑',
|
||||
'navigation_custom_operation_add' => '自定义',
|
||||
'navigation_article_category_operation_add' => '文字分类',
|
||||
'navigation_customview_operation_add' => '自定义',
|
||||
'navigation_goods_category_operation_add' => '商品分类',
|
||||
'navigation_article_category_name_format' => '默认文章分类名称',
|
||||
'navigation_customview_name_format' => '默认自定义页面名称',
|
||||
'navigation_goods_category_name_format' => '默认商品分类名称',
|
||||
|
||||
// 自定义导航
|
||||
'navigation_level_text' => '导航级别',
|
||||
'navigation_level_format' => '导航级别选择错误',
|
||||
'navigation_name_text' => '导航名称',
|
||||
'navigation_name_format' => '导航名称格式 2~16 个字符',
|
||||
'navigation_url_text' => 'url地址',
|
||||
'navigation_url_text_tips' => '带http://',
|
||||
'navigation_url_format' => 'url格式有误',
|
||||
|
||||
// 文章分类导航
|
||||
'navigation_article_category_id_text' => '文章分类',
|
||||
'navigation_article_category_id_format' => '文章分类选择有误',
|
||||
|
||||
// 自定义页面导航
|
||||
'navigation_customview_id_text' => '自定义页面',
|
||||
'navigation_customview_id_format' => '自定义页面选择有误',
|
||||
|
||||
// 商品分类导航
|
||||
'navigation_goods_category_id_text' => '商品分类',
|
||||
'navigation_goods_category_id_format' => '商品分类选择有误',
|
||||
|
||||
// tab nav
|
||||
'navigation_nav_header_name' => '中间导航',
|
||||
'navigation_nav_footer_name' => '底部导航',
|
||||
);
|
||||
?>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
</td>
|
||||
<td class="am-hide-sm-only">{{$v.describe}}</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_enable'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Link/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}"></a>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_enable'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Link/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_enable']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#data-save-win'}" data-json='{{:json_encode($v)}}'></button>
|
||||
|
|
|
|||
|
|
@ -1,173 +0,0 @@
|
|||
<include file="Public/Header" />
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- operation start -->
|
||||
<div class="am-g">
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-custom-save-win'}" data-tag="nav-custom-save-win"> {{:L('navheader_custom_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-article_category-save-win'}" data-tag="nav-article_category-save-win"> {{:L('navheader_article_category_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-customview-save-win'}" data-tag="nav-customview-save-win"> {{:L('navheader_customview_operation_add')}}</button>
|
||||
</div>
|
||||
<!-- operation end -->
|
||||
|
||||
<!-- custom save win start -->
|
||||
<div class="am-popup am-radius" id="nav-custom-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation" action="{{:U('Admin/NavFooter/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}</label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_url_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_url_text_tips')}})</span></label>
|
||||
<input type="url" placeholder="{{:L('navheader_url_text')}}" name="url" data-validation-message="{{:L('navheader_url_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="custom" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- custom save win end -->
|
||||
|
||||
<!-- article_category save win start -->
|
||||
<div class="am-popup am-radius" id="nav-article_category-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_article_category_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_article_category_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_article_category_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-article_category" action="{{:U('Admin/NavFooter/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_article_category_id_text')}}</label>
|
||||
<select class="am-radius c-p" name="value" data-validation-message="{{:L('navheader_article_category_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="article_category_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_article_category_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="article_category" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- article_category save win end -->
|
||||
|
||||
<!-- customview save win start -->
|
||||
<div class="am-popup am-radius" id="nav-customview-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-customview" action="{{:U('Admin/NavFooter/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_customview_id_text')}}</label>
|
||||
<select class="am-radius c-p" name="value" data-validation-message="{{:L('navheader_customview_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="customview_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.title}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_customview_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="0" required />
|
||||
</div>
|
||||
<include file="Lib/IsShow" />
|
||||
<include file="Lib/IsNewWindowOpen" />
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" />
|
||||
<input type="hidden" name="data_type" value="customview" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- customview save win end -->
|
||||
|
||||
<!-- list start -->
|
||||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:L('navheader_name_text')}}</th>
|
||||
<th>{{:L('common_nav_type_name')}}</th>
|
||||
<th>{{:L('common_view_status_title')}}</th>
|
||||
<th>{{:L('common_operation_name')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<if condition="!empty($list)">
|
||||
<foreach name="list" item="v">
|
||||
<tr id="data-list-{{$v.id}}" <if condition="$v['is_show'] eq 0">class="am-active"</if>>
|
||||
<td>{{$v.name}}
|
||||
<a href="{{$v.url}}" target="_blank">
|
||||
<i class="am-icon-external-link"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{:L('common_nav_type_list')[$v['data_type']]}}</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/NavFooter/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_show']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#nav-{{$v.data_type}}-save-win'}" data-json='{{:json_encode($v)}}' data-tag="nav-{{$v.data_type}}-save-win"></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/NavFooter/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
<else />
|
||||
<tr><td colspan="5" class="table-no">{{:L('common_not_data_tips')}}</td></tr>
|
||||
</if>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<include file="Public/Footer" />
|
||||
<!-- footer end -->
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
<!-- operation start -->
|
||||
<div class="am-g">
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-custom-save-win'}" data-tag="nav-custom-save-win"> {{:L('navheader_custom_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-article_category-save-win'}" data-tag="nav-article_category-save-win"> {{:L('navheader_article_category_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-customview-save-win'}" data-tag="nav-customview-save-win"> {{:L('navheader_customview_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-goods_category-save-win'}" data-tag="nav-goods_category-save-win"> {{:L('navheader_goods_category_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-custom-save-win'}" data-tag="nav-custom-save-win"> {{:L('navigation_custom_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-article_category-save-win'}" data-tag="nav-article_category-save-win"> {{:L('navigation_article_category_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-customview-save-win'}" data-tag="nav-customview-save-win"> {{:L('navigation_customview_operation_add')}}</button>
|
||||
<button class="am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus submit-add" data-am-modal="{target: '#nav-goods_category-save-win'}" data-tag="nav-goods_category-save-win"> {{:L('navigation_goods_category_operation_add')}}</button>
|
||||
</div>
|
||||
<!-- operation end -->
|
||||
|
||||
|
|
@ -20,15 +20,15 @@
|
|||
<div class="am-popup am-radius" id="nav-custom-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_custom_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_custom_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navigation_custom_operation_add')}}{{:L('navigation_add_name')}}" data-edit-title="{{:L('navigation_custom_operation_add')}}{{:L('navigation_edit_name')}}">{{:L('navigation_custom_operation_add')}}{{:L('navigation_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<form class="am-form form-validation" action="{{:U('Admin/Navigation/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_level_text')}}</label>
|
||||
<select class="am-radius c-p" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
|
||||
<label>{{:L('navigation_level_text')}}</label>
|
||||
<select class="am-radius c-p" name="pid" data-validation-message="{{:L('navigation_level_format')}}">
|
||||
<option value="0">{{:L('common_select_level_one_choice')}}</option>
|
||||
<foreach name="nav_header_pid_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
|
|
@ -36,12 +36,12 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}</label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" required />
|
||||
<label>{{:L('navigation_name_text')}}</label>
|
||||
<input type="text" placeholder="{{:L('navigation_name_text')}}" name="name" minlength="2" maxlength="16" data-validation-message="{{:L('navigation_name_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_url_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_url_text_tips')}})</span></label>
|
||||
<input type="url" placeholder="{{:L('navheader_url_text')}}" name="url" data-validation-message="{{:L('navheader_url_format')}}" class="am-radius" required />
|
||||
<label>{{:L('navigation_url_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navigation_url_text_tips')}})</span></label>
|
||||
<input type="url" placeholder="{{:L('navigation_url_text')}}" name="url" data-validation-message="{{:L('navigation_url_format')}}" class="am-radius" required />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
|
|
@ -66,15 +66,15 @@
|
|||
<div class="am-popup am-radius" id="nav-article_category-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_article_category_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_article_category_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_article_category_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navigation_article_category_operation_add')}}{{:L('navigation_add_name')}}" data-edit-title="{{:L('navigation_article_category_operation_add')}}{{:L('navigation_edit_name')}}">{{:L('navigation_article_category_operation_add')}}{{:L('navigation_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-article_category" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<form class="am-form form-validation-article_category" action="{{:U('Admin/Navigation/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
|
||||
<label>{{:L('navigation_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navigation_level_format')}}">
|
||||
<option value="0">{{:L('common_select_level_one_choice')}}</option>
|
||||
<foreach name="nav_header_pid_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
|
|
@ -82,8 +82,8 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_article_category_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navheader_article_category_id_format')}}" required>
|
||||
<label>{{:L('navigation_article_category_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navigation_article_category_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="article_category_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
|
|
@ -91,8 +91,8 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_article_category_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
<label>{{:L('navigation_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navigation_article_category_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navigation_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navigation_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
|
|
@ -117,16 +117,16 @@
|
|||
<div class="am-popup am-radius" id="nav-customview-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_customview_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_customview_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navigation_customview_operation_add')}}{{:L('navigation_add_name')}}" data-edit-title="{{:L('navigation_customview_operation_add')}}{{:L('navigation_edit_name')}}">{{:L('navigation_customview_operation_add')}}{{:L('navigation_add_name')}}</h4>
|
||||
<span data-am-modal-close
|
||||
class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-customview" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<form class="am-form form-validation-customview" action="{{:U('Admin/Navigation/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
|
||||
<label>{{:L('navigation_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navigation_level_format')}}">
|
||||
<option value="0">{{:L('common_select_level_one_choice')}}</option>
|
||||
<foreach name="nav_header_pid_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
|
|
@ -134,8 +134,8 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_customview_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navheader_customview_id_format')}}" required>
|
||||
<label>{{:L('navigation_customview_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navigation_customview_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="customview_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.title}}</option>
|
||||
|
|
@ -143,8 +143,8 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_customview_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
<label>{{:L('navigation_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navigation_customview_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navigation_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navigation_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
|
|
@ -169,15 +169,15 @@
|
|||
<div class="am-popup am-radius" id="nav-goods_category-save-win">
|
||||
<div class="am-popup-inner">
|
||||
<div class="am-popup-hd">
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navheader_goods_category_operation_add')}}{{:L('navheader_add_name')}}" data-edit-title="{{:L('navheader_goods_category_operation_add')}}{{:L('navheader_edit_name')}}">{{:L('navheader_goods_category_operation_add')}}{{:L('navheader_add_name')}}</h4>
|
||||
<h4 class="am-popup-title" data-add-title="{{:L('navigation_goods_category_operation_add')}}{{:L('navigation_add_name')}}" data-edit-title="{{:L('navigation_goods_category_operation_add')}}{{:L('navigation_edit_name')}}">{{:L('navigation_goods_category_operation_add')}}{{:L('navigation_add_name')}}</h4>
|
||||
<span data-am-modal-close class="am-close">×</span>
|
||||
</div>
|
||||
<div class="am-popup-bd">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation-goods_category" action="{{:U('Admin/NavHeader/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<form class="am-form form-validation-goods_category" action="{{:U('Admin/Navigation/Save')}}" method="POST" request-type="ajax-reload" request-value="">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navheader_level_format')}}">
|
||||
<label>{{:L('navigation_level_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="pid" data-validation-message="{{:L('navigation_level_format')}}">
|
||||
<option value="0">{{:L('common_select_level_one_choice')}}</option>
|
||||
<foreach name="nav_header_pid_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
|
|
@ -185,8 +185,8 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_goods_category_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navheader_goods_category_id_format')}}" required>
|
||||
<label>{{:L('navigation_goods_category_id_text')}}</label>
|
||||
<select class="am-radius c-p chosen-select" name="value" data-validation-message="{{:L('navigation_goods_category_id_format')}}" required>
|
||||
<option value="">{{:L('common_please_select_choose')}}</option>
|
||||
<foreach name="goods_category_list" item="v">
|
||||
<option value="{{$v.id}}">{{$v.name}}</option>
|
||||
|
|
@ -194,8 +194,8 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('navheader_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navheader_goods_category_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navheader_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navheader_name_format')}}" class="am-radius" />
|
||||
<label>{{:L('navigation_name_text')}}<span class="fs-12 fw-100 cr-999">({{:L('navigation_goods_category_name_format')}})</span></label>
|
||||
<input type="text" placeholder="{{:L('navigation_name_text')}}" name="name" maxlength="16" data-validation-message="{{:L('navigation_name_format')}}" class="am-radius" />
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
|
|
@ -220,7 +220,7 @@
|
|||
<table class="am-table am-table-striped am-table-hover am-text-middle m-t-10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:L('navheader_name_text')}}</th>
|
||||
<th>{{:L('navigation_name_text')}}</th>
|
||||
<th>{{:L('common_nav_type_name')}}</th>
|
||||
<th>{{:L('common_view_status_title')}}</th>
|
||||
<th>{{:L('common_operation_name')}}</th>
|
||||
|
|
@ -237,11 +237,11 @@
|
|||
</td>
|
||||
<td>{{:L('common_nav_type_list')[$v['data_type']]}}</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/NavHeader/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_show']}}" data-is-update-status="1"></a>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$v['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Navigation/StatusUpdate')}}" data-id="{{$v.id}}" data-state="{{$v['is_show']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#nav-{{$v.data_type}}-save-win'}" data-json='{{:json_encode($v)}}' data-tag="nav-{{$v.data_type}}-save-win"></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/NavHeader/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/Navigation/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$v.id}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
<if condition="!empty($list)">
|
||||
|
|
@ -254,11 +254,11 @@
|
|||
</td>
|
||||
<td>{{:L('common_nav_type_list')[$vs['data_type']]}}</td>
|
||||
<td>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$vs['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/NavHeader/StatusUpdate')}}" data-id="{{$vs.id}}" data-state="{{$vs['is_show']}}" data-is-update-status="1"></a>
|
||||
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state <if condition="$vs['is_show'] eq 1">am-success<else />am-default</if>" data-url="{{:U('Admin/Navigation/StatusUpdate')}}" data-id="{{$vs.id}}" data-state="{{$vs['is_show']}}" data-is-update-status="1"></a>
|
||||
</td>
|
||||
<td>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit submit-edit" data-am-popover="{content: '{{:L('common_operation_edit')}}', trigger: 'hover focus'}" data-am-modal="{target: '#nav-{{$vs.data_type}}-save-win'}" data-json='{{:json_encode($vs)}}' data-tag="nav-{{$vs.data_type}}-save-win"></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/NavHeader/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$vs.id}}"></button>
|
||||
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete" data-url="{{:U('Admin/Navigation/Delete')}}" data-am-popover="{content: '{{:L('common_operation_delete')}}', trigger: 'hover focus'}" data-id="{{$vs.id}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<ul class="am-nav am-nav-pills table-nav m-b-10">
|
||||
<li <if condition="$nav_type eq 'header'">class="am-active"</if> data-type="header">
|
||||
<a href="{{:U('Admin/NavHeader/Index', ['nav_type'=>'header'])}}">{{:L('navheader_nav_header_name')}}</a>
|
||||
<a href="{{:U('Admin/Navigation/Index', ['nav_type'=>'header'])}}">{{:L('navigation_nav_header_name')}}</a>
|
||||
</li>
|
||||
<li <if condition="$nav_type eq 'footer'">class="am-active"</if> data-type="footer">
|
||||
<a href="{{:U('Admin/NavHeader/Index', ['nav_type'=>'footer'])}}">{{:L('navheader_nav_footer_name')}}</a>
|
||||
<a href="{{:U('Admin/Navigation/Index', ['nav_type'=>'footer'])}}">{{:L('navigation_nav_footer_name')}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</foreach>
|
||||
<ul>
|
||||
<else />
|
||||
null---
|
||||
<div class="table-no">{{:L('common_not_data_tips')}}</div>
|
||||
</notempty>
|
||||
<!-- lis end -->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -345,13 +345,18 @@ function NavDataDealWith($data)
|
|||
switch($v['data_type'])
|
||||
{
|
||||
// 文章分类
|
||||
case 'article_class':
|
||||
$v['url'] = str_replace('admin.php', 'index.php', U('Home/Channel/Index', array('id'=>$v['value'], 'viewid'=>$v['id'])));
|
||||
case 'article_category':
|
||||
$v['url'] = HomeUrl('Channel', 'Index', ['id'=>$v['value'], 'viewid'=>$v['id']]);
|
||||
break;
|
||||
|
||||
// 自定义页面
|
||||
case 'customview':
|
||||
$v['url'] = str_replace('admin.php', 'index.php', U('Home/CustomView/Index', array('id'=>$v['value'], 'viewid'=>$v['id'])));
|
||||
$v['url'] = HomeUrl('CustomView', 'Index', ['id'=>$v['value'], 'viewid'=>$v['id']]);
|
||||
break;
|
||||
|
||||
// 商品分类
|
||||
case 'goods_category':
|
||||
$v['url'] = HomeUrl('Goods', 'Index', ['id'=>$v['value'], 'viewid'=>$v['id']]);
|
||||
break;
|
||||
}
|
||||
$data[$k] = $v;
|
||||
|
|
|
|||
|
|
@ -444,6 +444,7 @@ return array(
|
|||
'custom' => '自定义',
|
||||
'article_category' => '文章分类',
|
||||
'customview' => '自定义页面',
|
||||
'goods_category' => '商品分类',
|
||||
),
|
||||
|
||||
// 是否含头部
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ class Uploader
|
|||
"ERROR_HTTP_CONTENTTYPE" => "链接contentType不正确",
|
||||
"INVALID_URL" => "非法 URL",
|
||||
"INVALID_IP" => "非法 IP",
|
||||
"ERROR_IMAGES_HIGHT_PROPORTION" => "高度比例有误",
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
@ -90,21 +89,6 @@ class Uploader
|
|||
$this->stateInfo = $this->getStateInfo("ERROR_TMPFILE");
|
||||
return;
|
||||
}
|
||||
// 尺寸比例校验,高度差距上下5个像数
|
||||
$image_proportion = MyC('common_image_proportion', 0);
|
||||
if($image_proportion > 0)
|
||||
{
|
||||
if(I('get.path_type', 'Other') == 'Article' && I('get.action') == 'uploadimage')
|
||||
{
|
||||
$info = getimagesize($file['tmp_name']);
|
||||
$temp_height = $image_proportion/100*$info[0];
|
||||
if(($info[1] > $temp_height+5 || $info[1] < $temp_height-5))
|
||||
{
|
||||
$this->stateInfo = $this->getStateInfo("ERROR_IMAGES_HIGHT_PROPORTION");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->oriName = $file['name'];
|
||||
$this->fileSize = $file['size'];
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
//000000000000a:120:{i:41;s:12:"config_index";i:42;s:11:"config_save";i:81;s:10:"site_index";i:103;s:10:"site_index";i:105;s:9:"site_save";i:104;s:9:"sms_index";i:107;s:8:"sms_save";i:219;s:11:"email_index";i:220;s:10:"email_save";i:221;s:15:"email_emailtest";i:199;s:9:"seo_index";i:200;s:8:"seo_save";i:1;s:11:"power_index";i:22;s:11:"admin_index";i:19;s:14:"admin_saveinfo";i:20;s:10:"admin_save";i:21;s:12:"admin_delete";i:4;s:10:"power_role";i:17;s:18:"power_rolesaveinfo";i:18;s:14:"power_rolesave";i:23;s:16:"power_roledelete";i:13;s:11:"power_index";i:15;s:15:"power_powersave";i:16;s:17:"power_powerdelete";i:126;s:10:"user_index";i:127;s:10:"user_index";i:128;s:13:"user_saveinfo";i:129;s:9:"user_save";i:130;s:11:"user_delete";i:146;s:16:"user_excelexport";i:38;s:11:"goods_index";i:39;s:11:"goods_index";i:57;s:14:"goods_saveinfo";i:58;s:10:"goods_save";i:59;s:12:"goods_delete";i:181;s:19:"goods_statusshelves";i:218;s:27:"goods_statushomerecommended";i:201;s:19:"goodscategory_index";i:202;s:18:"goodscategory_save";i:203;s:20:"goodscategory_delete";i:177;s:11:"order_index";i:178;s:11:"order_index";i:179;s:12:"order_delete";i:180;s:12:"order_cancel";i:213;s:12:"answer_index";i:214;s:12:"answer_index";i:215;s:11:"answer_save";i:216;s:13:"answer_delete";i:217;s:19:"answer_statusupdate";i:222;s:15:"navheader_index";i:223;s:15:"navheader_index";i:225;s:18:"navheader_saveinfo";i:226;s:14:"navheader_save";i:227;s:16:"navheader_delete";i:228;s:22:"navheader_statusupdate";i:224;s:15:"navfooter_index";i:229;s:18:"navfooter_saveinfo";i:230;s:14:"navfooter_save";i:231;s:16:"navfooter_delete";i:232;s:22:"navfooter_statusupdate";i:234;s:16:"customview_index";i:235;s:19:"customview_saveinfo";i:236;s:15:"customview_save";i:237;s:17:"customview_delete";i:238;s:23:"customview_statusupdate";i:239;s:10:"link_index";i:240;s:13:"link_saveinfo";i:241;s:9:"link_save";i:242;s:11:"link_delete";i:243;s:17:"link_statusupdate";i:244;s:11:"theme_index";i:245;s:10:"theme_save";i:246;s:12:"theme_upload";i:247;s:12:"theme_delete";i:204;s:13:"article_index";i:205;s:13:"article_index";i:206;s:16:"article_saveinfo";i:207;s:12:"article_save";i:208;s:14:"article_delete";i:209;s:20:"article_statusupdate";i:210;s:21:"articlecategory_index";i:211;s:20:"articlecategory_save";i:212;s:22:"articlecategory_delete";i:162;s:15:"marketing_index";i:163;s:12:"coupon_index";i:164;s:18:"coupon_stateupdate";i:165;s:15:"coupon_saveinfo";i:166;s:11:"coupon_save";i:167;s:11:"coupon_user";i:168;s:13:"coupon_delete";i:169;s:15:"coupon_sendinfo";i:170;s:11:"coupon_send";i:171;s:16:"coupon_userquery";i:182;s:10:"data_index";i:183;s:13:"message_index";i:184;s:14:"message_delete";i:185;s:12:"paylog_index";i:186;s:21:"userintegrallog_index";i:187;s:15:"complaint_index";i:188;s:14:"complaint_save";i:189;s:16:"complaint_delete";i:152;s:15:"resources_index";i:153;s:12:"region_index";i:154;s:11:"region_save";i:155;s:13:"region_delete";i:156;s:13:"express_index";i:157;s:12:"express_save";i:158;s:14:"express_delete";i:172;s:11:"slide_index";i:173;s:14:"slide_saveinfo";i:174;s:10:"slide_save";i:175;s:17:"slide_stateupdate";i:176;s:12:"slide_delete";i:193;s:15:"agreement_index";i:194;s:14:"agreement_save";i:118;s:10:"tool_index";i:119;s:11:"cache_index";i:120;s:16:"cache_siteupdate";i:121;s:20:"cache_templateupdate";i:122;s:18:"cache_moduleupdate";}
|
||||
//000000000000a:114:{i:41;s:12:"config_index";i:42;s:11:"config_save";i:81;s:10:"site_index";i:103;s:10:"site_index";i:105;s:9:"site_save";i:104;s:9:"sms_index";i:107;s:8:"sms_save";i:219;s:11:"email_index";i:220;s:10:"email_save";i:221;s:15:"email_emailtest";i:199;s:9:"seo_index";i:200;s:8:"seo_save";i:1;s:11:"power_index";i:22;s:11:"admin_index";i:19;s:14:"admin_saveinfo";i:20;s:10:"admin_save";i:21;s:12:"admin_delete";i:4;s:10:"power_role";i:17;s:18:"power_rolesaveinfo";i:18;s:14:"power_rolesave";i:23;s:16:"power_roledelete";i:13;s:11:"power_index";i:15;s:15:"power_powersave";i:16;s:17:"power_powerdelete";i:126;s:10:"user_index";i:127;s:10:"user_index";i:128;s:13:"user_saveinfo";i:129;s:9:"user_save";i:130;s:11:"user_delete";i:146;s:16:"user_excelexport";i:38;s:11:"goods_index";i:39;s:11:"goods_index";i:57;s:14:"goods_saveinfo";i:58;s:10:"goods_save";i:59;s:12:"goods_delete";i:181;s:19:"goods_statusshelves";i:218;s:27:"goods_statushomerecommended";i:201;s:19:"goodscategory_index";i:202;s:18:"goodscategory_save";i:203;s:20:"goodscategory_delete";i:177;s:11:"order_index";i:178;s:11:"order_index";i:179;s:12:"order_delete";i:180;s:12:"order_cancel";i:213;s:12:"answer_index";i:214;s:12:"answer_index";i:215;s:11:"answer_save";i:216;s:13:"answer_delete";i:217;s:19:"answer_statusupdate";i:222;s:16:"navigation_index";i:223;s:16:"navigation_index";i:226;s:15:"navigation_save";i:227;s:17:"navigation_delete";i:228;s:23:"navigation_statusupdate";i:234;s:16:"customview_index";i:235;s:19:"customview_saveinfo";i:236;s:15:"customview_save";i:237;s:17:"customview_delete";i:238;s:23:"customview_statusupdate";i:239;s:10:"link_index";i:240;s:13:"link_saveinfo";i:241;s:9:"link_save";i:242;s:11:"link_delete";i:243;s:17:"link_statusupdate";i:244;s:11:"theme_index";i:245;s:10:"theme_save";i:246;s:12:"theme_upload";i:247;s:12:"theme_delete";i:204;s:13:"article_index";i:205;s:13:"article_index";i:206;s:16:"article_saveinfo";i:207;s:12:"article_save";i:208;s:14:"article_delete";i:209;s:20:"article_statusupdate";i:210;s:21:"articlecategory_index";i:211;s:20:"articlecategory_save";i:212;s:22:"articlecategory_delete";i:162;s:15:"marketing_index";i:163;s:12:"coupon_index";i:164;s:18:"coupon_stateupdate";i:165;s:15:"coupon_saveinfo";i:166;s:11:"coupon_save";i:167;s:11:"coupon_user";i:168;s:13:"coupon_delete";i:169;s:15:"coupon_sendinfo";i:170;s:11:"coupon_send";i:171;s:16:"coupon_userquery";i:182;s:10:"data_index";i:183;s:13:"message_index";i:184;s:14:"message_delete";i:185;s:12:"paylog_index";i:186;s:21:"userintegrallog_index";i:187;s:15:"complaint_index";i:188;s:14:"complaint_save";i:189;s:16:"complaint_delete";i:152;s:15:"resources_index";i:153;s:12:"region_index";i:154;s:11:"region_save";i:155;s:13:"region_delete";i:156;s:13:"express_index";i:157;s:12:"express_save";i:158;s:14:"express_delete";i:172;s:11:"slide_index";i:173;s:14:"slide_saveinfo";i:174;s:10:"slide_save";i:175;s:17:"slide_stateupdate";i:176;s:12:"slide_delete";i:193;s:15:"agreement_index";i:194;s:14:"agreement_save";i:118;s:10:"tool_index";i:119;s:11:"cache_index";i:120;s:16:"cache_siteupdate";i:121;s:20:"cache_templateupdate";i:122;s:18:"cache_moduleupdate";}
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,26 +0,0 @@
|
|||
// 表单初始化
|
||||
FromInit('form.form-validation-article_category');
|
||||
FromInit('form.form-validation-customview');
|
||||
FromInit('form.form-validation-goods_category');
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
$('.submit-add').on('click', function()
|
||||
{
|
||||
// 获取标签
|
||||
var tag = $(this).data('tag');
|
||||
|
||||
// 更改窗口名称
|
||||
$title = $('#'+tag).find('.am-popup-title');
|
||||
$title.text($title.data('add-title'));
|
||||
|
||||
// 清空表单
|
||||
FormDataFill({"id":"", "name":"", "url":"", "value":"", "sort":0, "is_show":1, "is_new_window_open":0}, '#'+tag);
|
||||
|
||||
// 校验成功状态增加失去焦点
|
||||
$('#'+tag).find('form').find('.am-field-valid').each(function()
|
||||
{
|
||||
$(this).blur();
|
||||
});
|
||||
});
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue