mirror of https://gitee.com/karson/fastadmin.git
新增Cxselect联动插件
新增后台上传头像功能 新增全局捕捉管理员日志 新增多个开发示例(联表、联动、跳转等) 新增Backend.api.addtabs方法,用于无刷新快速切换 新增面包屑导航显示 新增全局Config变量,无需再引入Config模块 修复刷新当前页URL出现编码的问题 修复Nice-validator的加载问题,现已默认加载中文语言 修复当管理员密码为空时导致无法登录的BUG 修复管理员列表显示非自己组别管理BUG 修复无法执行typeahead查找BUG 修复二级目录下cdnurl值未自适应的问题 移除高级搜索插件,使用普通搜索替代 移除require-config,使用全局Config替代 合并backend-func.css和backend.css为单一文件 JS和控制器中移除后台登录每日一图,改在视图中直接输出pull/323483/MERGE
parent
0739f7def1
commit
ef52c2effd
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\behavior;
|
||||
|
||||
use think\Config;
|
||||
|
||||
class AdminLog
|
||||
{
|
||||
|
||||
public function run(&$params)
|
||||
{
|
||||
if (request()->isPost())
|
||||
{
|
||||
\app\admin\model\AdminLog::record();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -31,7 +31,7 @@ class Menu extends Command
|
|||
$this->model = new AuthRule();
|
||||
$adminPath = dirname(__DIR__) . DS;
|
||||
//控制器名
|
||||
$controller = $input->getOption('controller') ? : '';
|
||||
$controller = $input->getOption('controller') ?: '';
|
||||
if (!$controller)
|
||||
{
|
||||
throw new Exception("please input controller name");
|
||||
|
|
@ -129,21 +129,19 @@ class Menu extends Command
|
|||
$controllerArr[$key] = ucfirst($controllerArr[$key]);
|
||||
$classSuffix = Config::get('controller_suffix') ? ucfirst(Config::get('url_controller_layer')) : '';
|
||||
$className = "\\app\\admin\\controller\\" . implode("\\", $controllerArr) . $classSuffix;
|
||||
if (version_compare(PHP_VERSION, '7.0.0', '<'))
|
||||
{
|
||||
$pathArr = $controllerArr;
|
||||
array_unshift($pathArr, '', 'application', 'admin', 'controller');
|
||||
$classFile = ROOT_PATH . implode(DS, $pathArr) . $classSuffix . ".php";
|
||||
$classContent = file_get_contents($classFile);
|
||||
$uniqueName = uniqid("FastAdmin") . $classSuffix;
|
||||
$classContent = str_replace("class " . $controllerArr[$key] . $classSuffix . " ", 'class ' . $uniqueName . ' ', $classContent);
|
||||
$classContent = preg_replace("/namespace\s(.*);/", 'namespace ' . __NAMESPACE__ . ";", $classContent);
|
||||
|
||||
//临时的类文件
|
||||
$tempClassFile = __DIR__ . DS . $uniqueName . ".php";
|
||||
file_put_contents($tempClassFile, $classContent);
|
||||
$className = "\\app\\admin\\command\\" . $uniqueName;
|
||||
}
|
||||
$pathArr = $controllerArr;
|
||||
array_unshift($pathArr, '', 'application', 'admin', 'controller');
|
||||
$classFile = ROOT_PATH . implode(DS, $pathArr) . $classSuffix . ".php";
|
||||
$classContent = file_get_contents($classFile);
|
||||
$uniqueName = uniqid("FastAdmin") . $classSuffix;
|
||||
$classContent = str_replace("class " . $controllerArr[$key] . $classSuffix . " ", 'class ' . $uniqueName . ' ', $classContent);
|
||||
$classContent = preg_replace("/namespace\s(.*);/", 'namespace ' . __NAMESPACE__ . ";", $classContent);
|
||||
|
||||
//临时的类文件
|
||||
$tempClassFile = __DIR__ . DS . $uniqueName . ".php";
|
||||
file_put_contents($tempClassFile, $classContent);
|
||||
$className = "\\app\\admin\\command\\" . $uniqueName;
|
||||
//反射机制调用类的注释和方法名
|
||||
$reflector = new ReflectionClass($className);
|
||||
|
||||
|
|
@ -181,16 +179,20 @@ class Menu extends Command
|
|||
}
|
||||
//过滤掉其它字符
|
||||
$controllerTitle = trim(preg_replace(array('/^\/\*\*(.*)[\n\r\t]/u', '/[\s]+\*\//u', '/\*\s@(.*)/u', '/[\s|\*]+/u'), '', $classComment));
|
||||
|
||||
//导入中文语言包
|
||||
\think\Lang::load(dirname(__DIR__) . DS . 'lang/zh-cn.php');
|
||||
|
||||
//先定入菜单的数据
|
||||
$pid = 0;
|
||||
$name = "/admin";
|
||||
foreach (explode('/', $controller) as $k => $v)
|
||||
{
|
||||
$name .= '/' . strtolower($v);
|
||||
$title = (!isset($controllerArr[$k + 1]) ? $controllerTitle : ucfirst($v));
|
||||
$title = (!isset($controllerArr[$k + 1]) ? $controllerTitle : '');
|
||||
$icon = (!isset($controllerArr[$k + 1]) ? $controllerIcon : 'fa fa-list');
|
||||
$remark = (!isset($controllerArr[$k + 1]) ? $controllerRemark : '');
|
||||
$title = $title ? $title : ucfirst($v);
|
||||
$title = $title ? $title : __(ucfirst($v) . ' manager');
|
||||
$rulemodel = $this->model->get(['name' => $name]);
|
||||
if (!$rulemodel)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{%config%}
|
||||
,
|
||||
optimizeCss: "standard",
|
||||
optimize: "none",
|
||||
optimize: "none", //可使用uglify|closure|none
|
||||
removeCombined: false,
|
||||
baseUrl: "{%jsBasePath%}", //JS文件所在的基础目录
|
||||
name: "{%jsBaseName%}", //来源文件,不包含后缀
|
||||
|
|
|
|||
|
|
@ -140,12 +140,10 @@ function build_heading($title = NULL, $content = NULL)
|
|||
{
|
||||
if (is_null($title) && is_null($content))
|
||||
{
|
||||
$path = request()->pathinfo();
|
||||
$path = $path[0] == '/' ? $path : '/' . $path;
|
||||
// 根据当前的URI自动匹配父节点的标题和备注
|
||||
$path = Auth::instance()->getRequestUri();
|
||||
$data = Db::name('auth_rule')->where('id', 'IN', function($query) use($path)
|
||||
{
|
||||
$query->name('auth_rule')->where('name', $path)->field('pid');
|
||||
})->find();
|
||||
$data = Db::name('auth_rule')->where('name', $path)->field('title,remark')->find();
|
||||
if ($data)
|
||||
{
|
||||
$title = $data['title'];
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use fast\Http;
|
||||
use fast\Random;
|
||||
use fast\Tree;
|
||||
use RecursiveDirectoryIterator;
|
||||
|
|
@ -20,7 +19,7 @@ use think\Lang;
|
|||
class Ajax extends Backend
|
||||
{
|
||||
|
||||
protected $noNeedLogin = ['dailybg', 'lang'];
|
||||
protected $noNeedLogin = ['lang'];
|
||||
protected $noNeedRight = ['*'];
|
||||
protected $layout = '';
|
||||
|
||||
|
|
@ -29,8 +28,8 @@ class Ajax extends Backend
|
|||
*/
|
||||
public function typeahead()
|
||||
{
|
||||
$search = $this->_request->getRequest("search");
|
||||
$field = $this->_request->getRequest("field");
|
||||
$search = $this->request->get("search");
|
||||
$field = $this->request->get("field");
|
||||
$field = str_replace(['row[', ']'], '', $field);
|
||||
if (substr($field, -3) !== '_id' && substr($field, -4) !== '_ids')
|
||||
{
|
||||
|
|
@ -50,11 +49,12 @@ class Ajax extends Backend
|
|||
break;
|
||||
}
|
||||
|
||||
$searchlist = Db::table($field)
|
||||
->orWhere($searchfield, 'like', "%{$search}%")
|
||||
->orWhere('id', 'like', "%{$search}%")
|
||||
$searchlist = Db::name($field)
|
||||
->whereOr($searchfield, 'like', "%{$search}%")
|
||||
->whereOr('id', 'like', "%{$search}%")
|
||||
->limit(10)
|
||||
->select("id,{$searchfield} AS name");
|
||||
->field("id,{$searchfield} AS name")
|
||||
->select();
|
||||
|
||||
foreach ($searchlist as $k => &$v)
|
||||
{
|
||||
|
|
@ -80,54 +80,6 @@ class Ajax extends Backend
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 每日一图
|
||||
*/
|
||||
public function dailybg()
|
||||
{
|
||||
//采用Infinty的图片
|
||||
$this->code = 1;
|
||||
$this->data = [
|
||||
'url' => 'http://img.infinitynewtab.com/wallpaper/' . (date("Ymd") % 4000) . '.jpg'
|
||||
];
|
||||
return;
|
||||
//采用Bing每日一图
|
||||
$ret = Http::sendRequest("http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1", [], 'GET');
|
||||
if ($ret['ret'])
|
||||
{
|
||||
$json = json_decode($ret['msg'], TRUE);
|
||||
if ($json && isset($json['images'][0]))
|
||||
{
|
||||
$url = $json['images'][0]['url'];
|
||||
$startdate = $json['images'][0]['startdate'];
|
||||
$enddate = $json['images'][0]['enddate'];
|
||||
$copyright = $json['images'][0]['copyright'];
|
||||
$url = substr($url, 0, 4) != 'http' ? 'http://cn.bing.com' . $url : $url;
|
||||
$title = '';
|
||||
$intro = '';
|
||||
$ret = Http::sendRequest("http://cn.bing.com/cnhp/coverstory/", [], 'GET');
|
||||
if ($ret['ret'])
|
||||
{
|
||||
$info = json_decode($ret['msg'], TRUE);
|
||||
if (isset($info['title']))
|
||||
{
|
||||
$title = $info['title'];
|
||||
$intro = $info['para1'];
|
||||
}
|
||||
}
|
||||
$this->code = 1;
|
||||
$this->data = [
|
||||
'title' => $title,
|
||||
'intro' => $intro,
|
||||
'url' => $url,
|
||||
'startdate' => $startdate,
|
||||
'enddate' => $enddate,
|
||||
'copyright' => $copyright,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取角色权限树
|
||||
*/
|
||||
|
|
@ -374,4 +326,51 @@ class Ajax extends Backend
|
|||
$this->code = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取分类数据
|
||||
*/
|
||||
public function category()
|
||||
{
|
||||
$type = $this->request->get('type');
|
||||
$pid = $this->request->get('pid');
|
||||
$where = ['status' => 'normal'];
|
||||
if ($type)
|
||||
{
|
||||
$where['type'] = $type;
|
||||
}
|
||||
if ($pid)
|
||||
{
|
||||
$where['pid'] = $pid;
|
||||
}
|
||||
|
||||
$categorylist = Db::name('category')->where($where)->field('id as value,name')->order('weigh desc,id desc')->select();
|
||||
$this->code = 1;
|
||||
$this->data = $categorylist;
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取省市区数据
|
||||
*/
|
||||
public function area()
|
||||
{
|
||||
$province = $this->request->get('province');
|
||||
$city = $this->request->get('city');
|
||||
$where = ['pid' => 0, 'level' => 1];
|
||||
if ($province)
|
||||
{
|
||||
$where['pid'] = $province;
|
||||
$where['level'] = 2;
|
||||
}
|
||||
if ($city)
|
||||
{
|
||||
$where['pid'] = $city;
|
||||
$where['level'] = 3;
|
||||
}
|
||||
$provincelist = Db::name('area')->where($where)->field('id as value,name')->select();
|
||||
$this->code = 1;
|
||||
$this->data = $provincelist;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\controller\auth;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
use fast\Random;
|
||||
use fast\Tree;
|
||||
|
|
@ -46,6 +45,37 @@ class Admin extends Backend
|
|||
$this->view->assign('groupdata', $groupdata);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if ($this->request->isAjax())
|
||||
{
|
||||
$childrenAdminIds = model('AuthGroupAccess')
|
||||
->field('uid')
|
||||
->where('group_id', 'in', $this->childrenIds)
|
||||
->column('uid');
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
$total = $this->model
|
||||
->where($where)
|
||||
->where('id', 'in', $childrenAdminIds)
|
||||
->order($sort, $order)
|
||||
->count();
|
||||
|
||||
$list = $this->model
|
||||
->where($where)
|
||||
->where('id', 'in', $childrenAdminIds)
|
||||
->order($sort, $order)
|
||||
->limit($offset, $limit)
|
||||
->select();
|
||||
$result = array("total" => $total, "rows" => $list);
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
|
|
@ -61,7 +91,6 @@ class Admin extends Backend
|
|||
$params['password'] = md5(md5($params['password']) . $params['salt']);
|
||||
|
||||
$admin = $this->model->create($params);
|
||||
AdminLog::record(__('Add'), $this->model->getLastInsID());
|
||||
$group = $this->request->post("group/a");
|
||||
|
||||
//过滤不允许的组别,避免越权
|
||||
|
|
@ -99,8 +128,11 @@ class Admin extends Backend
|
|||
$params['salt'] = Random::alnum();
|
||||
$params['password'] = md5(md5($params['password']) . $params['salt']);
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($params['password'], $params['salt']);
|
||||
}
|
||||
$row->save($params);
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
|
||||
// 先移除所有权限
|
||||
model('AuthGroupAccess')->where('uid', $row->id)->delete();
|
||||
|
|
@ -142,8 +174,7 @@ class Admin extends Backend
|
|||
{
|
||||
// 避免越权删除管理员
|
||||
$childrenGroupIds = $this->childrenIds;
|
||||
$adminList = $this->model->where('id', 'in', $ids)->where('id', 'in', function($query) use($childrenGroupIds)
|
||||
{
|
||||
$adminList = $this->model->where('id', 'in', $ids)->where('id', 'in', function($query) use($childrenGroupIds) {
|
||||
$query->name('auth_group_access')->where('group_id', 'in', $childrenGroupIds)->field('uid');
|
||||
})->select();
|
||||
if ($adminList)
|
||||
|
|
@ -156,7 +187,6 @@ class Admin extends Backend
|
|||
$deleteIds = array_diff($deleteIds, [$this->auth->id]);
|
||||
if ($deleteIds)
|
||||
{
|
||||
AdminLog::record(__('Del'), $deleteIds);
|
||||
$this->model->destroy($deleteIds);
|
||||
model('AuthGroupAccess')->where('uid', 'in', $deleteIds)->delete();
|
||||
$this->code = 1;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\controller\auth;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
use fast\Tree;
|
||||
|
||||
|
|
@ -106,7 +105,6 @@ class Group extends Backend
|
|||
if ($params)
|
||||
{
|
||||
$this->model->create($params);
|
||||
AdminLog::record(__('Add'), $this->model->getLastInsID());
|
||||
$this->code = 1;
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +152,6 @@ class Group extends Backend
|
|||
if ($params)
|
||||
{
|
||||
$row->save($params);
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +206,6 @@ class Group extends Backend
|
|||
$count = $this->model->where('id', 'in', $ids)->delete();
|
||||
if ($count)
|
||||
{
|
||||
AdminLog::record(__('Del'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\controller\auth;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
use fast\Tree;
|
||||
use think\Cache;
|
||||
|
|
@ -70,7 +69,6 @@ class Rule extends Backend
|
|||
return;
|
||||
}
|
||||
$this->model->create($params);
|
||||
AdminLog::record(__('Add'), $this->model->getLastInsID());
|
||||
Cache::rm('__menu__');
|
||||
$this->code = 1;
|
||||
}
|
||||
|
|
@ -100,7 +98,6 @@ class Rule extends Backend
|
|||
return;
|
||||
}
|
||||
$row->save($params);
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
Cache::rm('__menu__');
|
||||
$this->code = 1;
|
||||
}
|
||||
|
|
@ -128,7 +125,6 @@ class Rule extends Backend
|
|||
$count = $this->model->where('id', 'in', $delIds)->delete();
|
||||
if ($count)
|
||||
{
|
||||
AdminLog::record(__('Del'), $ids);
|
||||
Cache::rm('__menu__');
|
||||
$this->code = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\example;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 表格完整示例
|
||||
*
|
||||
* @icon fa fa-table
|
||||
* @remark 在使用Bootstrap-table中的常用方式,更多使用方式可查看:http://bootstrap-table.wenzhixin.net.cn/zh-cn/
|
||||
*/
|
||||
class Bootstraptable extends Backend
|
||||
{
|
||||
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = model('AdminLog');
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if ($this->request->isAjax())
|
||||
{
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams(NULL);
|
||||
$total = $this->model
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->count();
|
||||
$list = $this->model
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->limit($offset, $limit)
|
||||
->select();
|
||||
$result = array("total" => $total, "rows" => $list);
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
public function detail($ids)
|
||||
{
|
||||
$row = $this->model->get(['id' => $ids]);
|
||||
if (!$row)
|
||||
$this->error(__('No Results were found'));
|
||||
$this->view->assign("row", $row->toArray());
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\example;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 彩色角标
|
||||
*
|
||||
* @icon fa fa-table
|
||||
* @remark 在JS端控制角标的显示与隐藏,请注意左侧菜单栏角标的数值变化
|
||||
*/
|
||||
class Colorbadge extends Backend
|
||||
{
|
||||
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = model('AdminLog');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\example;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 控制器间跳转
|
||||
*
|
||||
* @icon fa fa-table
|
||||
* @remark FastAdmin支持在控制器间跳转,点击后将切换到另外一个TAB中,无需刷新当前页面
|
||||
*/
|
||||
class Controllerjump extends Backend
|
||||
{
|
||||
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = model('AdminLog');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\example;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 多级联动
|
||||
*
|
||||
* @icon fa fa-table
|
||||
* @remark FastAdmin使用了jQuery-cxselect实现多级联动,更多文档请参考https://github.com/karsonzhang/cxSelect
|
||||
*/
|
||||
class Cxselect extends Backend
|
||||
{
|
||||
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\example;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 多表格示例
|
||||
*
|
||||
* @icon fa fa-table
|
||||
* @remark 当一个页面上存在多个Bootstrap-table时该如何控制按钮和表格
|
||||
*/
|
||||
class Multitable extends Backend
|
||||
{
|
||||
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\example;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
* 多模型关联
|
||||
*
|
||||
* @icon fa fa-table
|
||||
* @remark 当使用到关联模型时需要重载index方法
|
||||
*/
|
||||
class Relationmodel extends Backend
|
||||
{
|
||||
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = model('AdminLog');
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if ($this->request->isAjax())
|
||||
{
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
$total = $this->model
|
||||
->with("Admin")
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->count();
|
||||
$list = $this->model
|
||||
->with("Admin")
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->limit($offset, $limit)
|
||||
->select();
|
||||
$result = array("total" => $total, "rows" => $list);
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\controller\general;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
|
||||
/**
|
||||
|
|
@ -76,7 +75,6 @@ class Configvalue extends Backend
|
|||
$params['content'] = array_combine($fieldarr, $valuearr);
|
||||
}
|
||||
$this->model->save($params);
|
||||
AdminLog::record(__('Add'), $this->model->getLastInsID());
|
||||
$this->code = 1;
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +117,6 @@ class Configvalue extends Backend
|
|||
$params['content'] = array_combine($fieldarr, $valuearr);
|
||||
}
|
||||
$row->save($params);
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\controller\general;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\Debug;
|
||||
|
|
@ -60,7 +59,6 @@ class Database extends Backend
|
|||
|
||||
if (in_array($do_action, array('doquery', 'optimizeall', 'repairall')))
|
||||
{
|
||||
AdminLog::record(__('query'), ['table' => $tablename, 'action' => $do_action, 'sql' => $this->request->post('sqlquery')]);
|
||||
$this->$do_action();
|
||||
}
|
||||
else if (count($tablename) == 0)
|
||||
|
|
@ -69,7 +67,6 @@ class Database extends Backend
|
|||
}
|
||||
else
|
||||
{
|
||||
AdminLog::record(__('query'), ['table' => $tablename, 'action' => $do_action]);
|
||||
foreach ($tablename as $table)
|
||||
{
|
||||
$this->$do_action($table);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class Profile extends Backend
|
|||
{
|
||||
$this->code = -1;
|
||||
$params = $this->request->post("row/a");
|
||||
$params = array_filter(array_intersect_key($params, array_flip(array('email', 'nickname', 'password'))));
|
||||
$params = array_filter(array_intersect_key($params, array_flip(array('email', 'nickname', 'password', 'avatar'))));
|
||||
unset($v);
|
||||
if (isset($params['password']))
|
||||
{
|
||||
|
|
@ -62,7 +62,6 @@ class Profile extends Backend
|
|||
if ($params)
|
||||
{
|
||||
model('admin')->where('id', $this->auth->id)->update($params);
|
||||
AdminLog::record(__('Update'), $params);
|
||||
//因为个人资料面板读取的Session显示,修改自己资料后同时更新Session
|
||||
$admin = Session::get('admin');
|
||||
$admin_id = $admin ? $admin->id : 0;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@
|
|||
|
||||
namespace app\admin\controller\wechat;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
use app\common\model\WechatResponse;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 微信自动回复管理
|
||||
|
|
@ -28,7 +26,7 @@ class Autoreply extends Backend
|
|||
*/
|
||||
public function edit($ids = NULL)
|
||||
{
|
||||
$row = Db::table($this->table)->where('id', $ids)->get();
|
||||
$row = $this->model->get(['id' => $ids]);
|
||||
if (!$row)
|
||||
$this->error(__('No Results were found'));
|
||||
if ($this->request->isPost())
|
||||
|
|
@ -38,7 +36,6 @@ class Autoreply extends Backend
|
|||
if ($params)
|
||||
{
|
||||
$row->save($params);
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\controller\wechat;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
use app\common\model\Configvalue;
|
||||
|
||||
|
|
@ -55,7 +54,6 @@ class Config extends Backend
|
|||
$this->obj['config'][] = $this->request->post('row/a');
|
||||
$this->wechatcfg->content = $this->obj;
|
||||
$this->wechatcfg->save();
|
||||
AdminLog::record(__('Add'), $this->request->post('row/a'));
|
||||
$this->code = 1;
|
||||
return;
|
||||
}
|
||||
|
|
@ -86,7 +84,6 @@ class Config extends Backend
|
|||
$this->wechatcfg->content = $this->obj;
|
||||
$this->wechatcfg->save();
|
||||
$this->code = 1;
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
return;
|
||||
}
|
||||
$this->view->assign("row", $row);
|
||||
|
|
@ -111,7 +108,6 @@ class Config extends Backend
|
|||
}
|
||||
$this->wechatcfg->content = $this->obj;
|
||||
$this->wechatcfg->save();
|
||||
AdminLog::record(__('Del'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\controller\wechat;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
use app\common\model\Configvalue;
|
||||
use app\common\model\WechatResponse;
|
||||
|
|
@ -53,7 +52,6 @@ class Menu extends Backend
|
|||
$content['menu'] = $menu;
|
||||
$this->wechatcfg->content = $content;
|
||||
$this->wechatcfg->save();
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
$this->code = 1;
|
||||
return;
|
||||
}
|
||||
|
|
@ -71,7 +69,6 @@ class Menu extends Backend
|
|||
$ret = $app->menu->add($this->wechatcfg->content['menu']);
|
||||
if ($ret->errcode == 0)
|
||||
{
|
||||
AdminLog::record(__('Sync'), $this->wechatcfg->content['menu']);
|
||||
$this->code = 1;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\controller\wechat;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\Backend;
|
||||
use fast\service\Wechat;
|
||||
|
||||
|
|
@ -45,7 +44,6 @@ class Response extends Backend
|
|||
if ($params)
|
||||
{
|
||||
$this->model->save($params);
|
||||
AdminLog::record(__('Add'), $this->model->getLastInsID());
|
||||
$this->code = 1;
|
||||
$this->content = $params;
|
||||
}
|
||||
|
|
@ -74,7 +72,6 @@ class Response extends Backend
|
|||
if ($params)
|
||||
{
|
||||
$row->save($params);
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ return [
|
|||
'Hot' => '热门',
|
||||
'Recommend' => '推荐',
|
||||
'Dashboard' => '控制台',
|
||||
'Upload' => '上传',
|
||||
'Code' => '编号',
|
||||
'Message' => '内容',
|
||||
'Line' => '行号',
|
||||
|
|
@ -72,7 +73,6 @@ return [
|
|||
'Parent' => '父级',
|
||||
'Params' => '参数',
|
||||
'Permission' => '权限',
|
||||
'Advance search' => '高级搜索',
|
||||
'Check all' => '选中全部',
|
||||
'Expand all' => '展开全部',
|
||||
'Begin time' => '开始时间',
|
||||
|
|
@ -84,9 +84,11 @@ return [
|
|||
'Operation failed' => '操作失败!',
|
||||
'Unknown data format' => '未知的数据格式!',
|
||||
'Network error' => '网络错误!',
|
||||
'Issues & Wiki' => '问题交流',
|
||||
'Advanced search' => '高级搜索',
|
||||
'Auth manager' => '权限管理',
|
||||
'General manager' => '常规管理',
|
||||
'Example manager' => '测试管理',
|
||||
'Common search' => '普通搜索',
|
||||
'Search %s' => '搜索 %s',
|
||||
'%d second%s ago' => '%d秒前',
|
||||
'%d minute%s ago' => '%d分钟前',
|
||||
'%d hour%s ago' => '%d小时前',
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ class Auth extends \fast\Auth
|
|||
{
|
||||
|
||||
protected $requestUri = '';
|
||||
protected $breadcrumb = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
@ -203,6 +204,27 @@ class Auth extends \fast\Auth
|
|||
return in_array('*', $this->getRuleIds()) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得面包屑导航
|
||||
* @param string $path
|
||||
* @return array
|
||||
*/
|
||||
public function getBreadCrumb($path = '')
|
||||
{
|
||||
if ($this->breadcrumb || !$path)
|
||||
return $this->breadcrumb;
|
||||
$path_rule_id = 0;
|
||||
foreach ($this->rules as $rule)
|
||||
{
|
||||
$path_rule_id = $rule['name'] == $path ? $rule['id'] : $path_rule_id;
|
||||
}
|
||||
if ($path_rule_id)
|
||||
{
|
||||
$this->breadcrumb = Tree::instance()->init($this->rules)->getParents($path_rule_id, true);
|
||||
}
|
||||
return $this->breadcrumb;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取左侧菜单栏
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace app\admin\library\traits;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
|
||||
trait Backend
|
||||
{
|
||||
|
|
@ -49,7 +48,6 @@ trait Backend
|
|||
$v = substr($k, -4) == 'time' && !is_numeric($v) ? strtotime($v) : $v;
|
||||
}
|
||||
$this->model->create($params);
|
||||
AdminLog::record(__('Add'), $this->model->getLastInsID());
|
||||
$this->code = 1;
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +76,6 @@ trait Backend
|
|||
$v = substr($k, -4) == 'time' && !is_numeric($v) ? strtotime($v) : $v;
|
||||
}
|
||||
$row->save($params);
|
||||
AdminLog::record(__('Edit'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +96,6 @@ trait Backend
|
|||
$count = $this->model->where('id', 'in', $ids)->delete();
|
||||
if ($count)
|
||||
{
|
||||
AdminLog::record(__('Del'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -125,7 +121,6 @@ trait Backend
|
|||
$count = $this->model->where('id', 'in', $ids)->update($values);
|
||||
if ($count)
|
||||
{
|
||||
AdminLog::record(__('Multi'), $ids);
|
||||
$this->code = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,19 +13,39 @@ class AdminLog extends Model
|
|||
protected $createTime = 'createtime';
|
||||
protected $updateTime = '';
|
||||
|
||||
public static function record($title, $content = '', $username = '')
|
||||
public static function record($title = '')
|
||||
{
|
||||
$admin = \think\Session::get('admin');
|
||||
$admin_id = $admin ? $admin->id : 0;
|
||||
$content = !is_scalar($content) ? json_encode($content) : $content . '';
|
||||
$username = $username ? $username : ($admin ? $admin->username : __(''));
|
||||
$username = $admin ? $admin->username : __('Unknown');
|
||||
$content = request()->param();
|
||||
foreach ($content as $k => $v)
|
||||
{
|
||||
if (is_string($v) && strlen($v) > 200)
|
||||
{
|
||||
unset($content[$k]);
|
||||
}
|
||||
}
|
||||
$title = [];
|
||||
$breadcrumb = \app\admin\library\Auth::instance()->getBreadcrumb();
|
||||
foreach ($breadcrumb as $k => $v)
|
||||
{
|
||||
$title[] = $v['title'];
|
||||
}
|
||||
self::create([
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
'url' => request()->url(),
|
||||
'admin_id' => $admin_id,
|
||||
'username' => $username
|
||||
'title' => implode(' ', $title),
|
||||
'content' => json_encode($content),
|
||||
'url' => request()->url(),
|
||||
'admin_id' => $admin_id,
|
||||
'username' => $username,
|
||||
'useragent' => request()->server('HTTP_USER_AGENT'),
|
||||
'ip' => request()->ip()
|
||||
]);
|
||||
}
|
||||
|
||||
public function admin()
|
||||
{
|
||||
return $this->belongsTo('Admin', 'admin_id')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
// 应用行为扩展定义文件
|
||||
return [
|
||||
// 应用结束
|
||||
'app_end' => [
|
||||
'app\\admin\\behavior\\AdminLog',
|
||||
],
|
||||
];
|
||||
|
|
@ -8,25 +8,25 @@
|
|||
<div class="form-group">
|
||||
<label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" class="form-control" id="username" name="row[username]" value="" pattern="[A-Za-z0-9_]{3,}" required="required" />
|
||||
<input type="text" class="form-control" id="username" name="row[username]" value="" data-rule="required;username" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="email" class="form-control" id="email" name="row[email]" value="" required="required" />
|
||||
<input type="email" class="form-control" id="email" name="row[email]" value="" data-rule="required;email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" class="form-control" id="nickname" name="row[nickname]" value="" required="required" />
|
||||
<input type="text" class="form-control" id="nickname" name="row[nickname]" value="" data-rule="required" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="password" class="form-control" id="password" name="row[password]" value="" required="required" />
|
||||
<input type="password" class="form-control" id="password" name="row[password]" value="" data-rule="required" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -8,19 +8,19 @@
|
|||
<div class="form-group">
|
||||
<label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" class="form-control" id="username" name="row[username]" value="{$row.username}" pattern="[A-Za-z0-9_]{3,}" required="required" />
|
||||
<input type="text" class="form-control" id="username" name="row[username]" value="{$row.username}" data-rule="required;username" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="email" class="form-control" id="email" name="row[email]" value="{$row.email}" required="required" />
|
||||
<input type="email" class="form-control" id="email" name="row[email]" value="{$row.email}" data-rule="required;email" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input type="text" class="form-control" id="nickname" name="row[nickname]" value="{$row.nickname}" required="required" />
|
||||
<input type="text" class="form-control" id="nickname" name="row[nickname]" value="{$row.nickname}" data-rule="required" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-flag" class="control-label">{:__('Flag')}:</label>
|
||||
{:build_select('row[flag]', 'h,i,s', null, ['id'=>'c-flag','class'=>'form-control selectpicker','required'=>''])}
|
||||
{:build_select('row[flag]', ['recommend'=>__('Recommend'), 'index'=>__('Index'), 'hot'=>__('Hot')], null, ['id'=>'c-flag','class'=>'form-control selectpicker','required'=>''])}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="control-label">{:__('Status')}:</label>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-flag" class="control-label">{:__('Flag')}:</label>
|
||||
{:build_select('row[flag]', 'h,i,s', $row['flag'], ['id'=>'c-flag','class'=>'form-control selectpicker','required'=>''])}
|
||||
{:build_select('row[flag]', ['recommend'=>__('Recommend'), 'index'=>__('Index'), 'hot'=>__('Hot')], $row['flag'], ['id'=>'c-flag','class'=>'form-control selectpicker','required'=>''])}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content" class="control-label">{:__('Status')}:</label>
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
<!-- 账号信息下拉框 -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="__CDN__{$admin.avatar}" class="user-image" alt="User Image">
|
||||
<img src="__CDN__{$admin.avatar}" class="user-image" alt="{$admin.nickname}">
|
||||
<span class="hidden-xs">{$admin.nickname}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="{:rtrim(url('general.profile/'),'/')}" class="btn btn-default btn-flat">{:__('Profile')}</a>
|
||||
<a href="general/profile" class="btn btn-default btn-flat addtabsit">{:__('Profile')}</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('index/logout')}" class="btn btn-default btn-flat">{:__('Logout')}</a>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel hidden-xs">
|
||||
<div class="pull-left image">
|
||||
<img src="__CDN__{$admin.avatar}" class="img-circle" />
|
||||
<a href="general/profile" class="addtabsit"><img src="__CDN__{$admin.avatar}" class="img-circle" /></a>
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{$admin.nickname}</p>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
<![endif]-->
|
||||
<script type="text/javascript">
|
||||
var require = {
|
||||
config: {
|
||||
'config': {$config|json_encode}
|
||||
}
|
||||
config: {$config|json_encode}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>标题</th>
|
||||
<th>内容</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="row" id="vo" }
|
||||
<tr>
|
||||
<td>{$key}</td>
|
||||
<td>{$vo}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="hide layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="reset" class="btn btn-primary btn-embossed btn-close">{:__('Close')}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('delete')}
|
||||
<div class="dropdown btn-group">
|
||||
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> <?= __('More') ?></a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('delete')}
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('delete')}
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
<style>#cxselect-example textarea{margin:10px 0;}</style>
|
||||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding" id="cxselect-example">
|
||||
<form id="cxselectform" action="">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><b>省市区联动</b>(通过AJAX读取数据)</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-9">
|
||||
<div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
|
||||
<select class="province form-control" name="province" data-url="ajax/area"></select>
|
||||
<select class="city form-control" name="city" data-url="ajax/area"></select>
|
||||
<select class="area form-control" name="area" data-url="ajax/area"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-right">
|
||||
<h6><label class="label label-primary"><i class="fa fa-pencil"></i> 增加</label></h6>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<textarea class="form-control" rows="8">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-9">
|
||||
<div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
|
||||
<select class="province form-control" name="province" data-url="ajax/area">
|
||||
<option value="1964" selected>广东省</option>
|
||||
</select>
|
||||
<select class="city form-control" name="city" data-url="ajax/area">
|
||||
<option value="1988" selected>深圳市</option>
|
||||
</select>
|
||||
<select class="area form-control" name="area" data-url="ajax/area">
|
||||
<option value="1991" selected>南山区</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-right">
|
||||
<h6><label class="label label-success"><i class="fa fa-edit"></i> 修改</label></h6>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<textarea class="form-control" rows="8">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><b>类别联动</b>(Ajax读取数据)</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-9">
|
||||
<div class="form-inline" data-toggle="cxselect" data-selects="first,second">
|
||||
<select class="first form-control" name="first" data-url="ajax/category?type=page&pid=5"></select>
|
||||
<select class="second form-control" name="second" data-url="ajax/category" data-query-name="pid"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-right">
|
||||
<h6><label class="label label-primary"><i class="fa fa-pencil"></i> 增加</label></h6>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<textarea class="form-control" rows="8">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-9">
|
||||
<div class="form-inline" data-toggle="cxselect" data-selects="first,second">
|
||||
<select class="first form-control" name="first" data-url="ajax/category?type=page&pid=5">
|
||||
<option value="6" selected>网站建站</option>
|
||||
</select>
|
||||
<select class="second form-control" name="second" data-url="ajax/category" data-query-name="pid">
|
||||
<option value="9" selected>移动端</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-right">
|
||||
<h6><label class="label label-success"><i class="fa fa-edit"></i> 修改</label></h6>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<textarea class="form-control" rows="8">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><b>省市区联动</b>(通过JSON渲染数据)</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-9">
|
||||
<!--由于在初始化中修改了默认值,所以这里需要修改-jsonSpace/jsonValue/jsonName的值-->
|
||||
<div class="form-inline" data-toggle="cxselect" data-url="__CDN__/assets/libs/jquery-cxselect/js/cityData.min.json"
|
||||
data-selects="province,city,area" data-json-space="" data-json-name="n" data-json-value="">
|
||||
<select class="province form-control" name="province"></select>
|
||||
<select class="city form-control" name="city"></select>
|
||||
<select class="area form-control" name="area"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-right">
|
||||
<h6><label class="label label-primary"><i class="fa fa-pencil"></i> 增加</label></h6>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<textarea class="form-control" rows="8">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-9">
|
||||
<!--由于在初始化中修改了默认值,所以这里需要修改-jsonSpace/jsonValue/jsonName的值-->
|
||||
<div class="form-inline" data-toggle="cxselect" data-url="__CDN__/assets/libs/jquery-cxselect/js/cityData.min.json"
|
||||
data-selects="province,city,area" data-json-space="" data-json-name="n" data-json-value="">
|
||||
<select class="province form-control" data-first-title="选择省">
|
||||
<option value="">请选择</option>
|
||||
<option value="浙江省" selected>浙江省</option>
|
||||
</select>
|
||||
<select class="city form-control" data-first-title="选择市">
|
||||
<option value="">请选择</option>
|
||||
<option value="杭州市" selected>杭州市</option>
|
||||
</select>
|
||||
<select class="area form-control" data-first-title="选择地区">
|
||||
<option value="">请选择</option>
|
||||
<option value="西湖区" selected>西湖区</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-right">
|
||||
<h6><label class="label label-success"><i class="fa fa-edit"></i> 修改</label></h6>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<textarea class="form-control" rows="8">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div id="toolbar1" class="toolbar">
|
||||
{:build_toolbar()}
|
||||
<div class="dropdown btn-group">
|
||||
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table1" class="table table-striped table-bordered table-hover" width="100%">
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div id="toolbar2" class="toolbar">
|
||||
{:build_toolbar()}
|
||||
<div class="dropdown btn-group">
|
||||
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table2" class="table table-striped table-bordered table-hover" width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('delete')}
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,3 +1,33 @@
|
|||
<style>
|
||||
.profile-avatar-container {
|
||||
position:relative;
|
||||
width:100px;margin:0 auto;
|
||||
}
|
||||
.profile-avatar-container .profile-user-img{
|
||||
width:100px;
|
||||
height:100px;
|
||||
}
|
||||
.profile-avatar-container .profile-avatar-text {
|
||||
display:none;
|
||||
}
|
||||
.profile-avatar-container:hover .profile-avatar-text {
|
||||
display:block;
|
||||
position:absolute;
|
||||
height:100px;
|
||||
width:100px;
|
||||
background:#444;
|
||||
opacity: .6;
|
||||
color: #fff;
|
||||
top:0;
|
||||
left:0;
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
.profile-avatar-container button{
|
||||
position:absolute;
|
||||
top:0;left:0;width:100px;height:100px;opacity: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="row animated fadeInRight">
|
||||
<div class="col-md-4">
|
||||
<div class="box box-success">
|
||||
|
|
@ -5,28 +35,42 @@
|
|||
{:__('Profile')}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form id="update-form" role="form" data-toggle="validator" method="POST" action="{:url('general.profile/update')}">
|
||||
<div class="form-group">
|
||||
<label for="username" class="control-label">{:__('Username')}:</label>
|
||||
<input type="text" class="form-control" name="row[username]" value="{$admin.username}" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="control-label">{:__('Email')}:</label>
|
||||
<input type="text" class="form-control" name="row[email]" value="{$admin.email}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nickname" class="control-label">{:__('Nickname')}:</label>
|
||||
<input type="text" class="form-control" name="row[nickname]" value="{$admin.nickname}" required="required" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="control-label">{:__('Password')}:</label>
|
||||
<input type="text" class="form-control" placeholder="{:__('Leave password blank if dont want to change')}" name="row[password]" value=""/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success">{:__('Submit')}</button>
|
||||
<button type="reset" class="btn btn-default">{:__('Reset')}</button>
|
||||
</div>
|
||||
|
||||
<form id="update-form" role="form" data-toggle="validator" method="POST" action="{:url('general.profile/update')}">
|
||||
<input type="hidden" id="c-avatar" name="row[avatar]" value="{$admin.avatar}" />
|
||||
<div class="box-body box-profile">
|
||||
|
||||
<div class="profile-avatar-container">
|
||||
<img class="profile-user-img img-responsive img-circle plupload" src="{$admin.avatar}" alt="">
|
||||
<div class="profile-avatar-text img-circle">{:__('Click to edit')}</div>
|
||||
<button id="plupload-avatar" class="plupload" data-input-id="c-avatar" data-after-upload="changeavatar"><i class="fa fa-upload"></i> {:__('Upload')}</button>
|
||||
</div>
|
||||
|
||||
<h3 class="profile-username text-center">{$admin.username}</h3>
|
||||
|
||||
<p class="text-muted text-center">{$admin.email}</p>
|
||||
<div class="form-group">
|
||||
<label for="username" class="control-label">{:__('Username')}:</label>
|
||||
<input type="text" class="form-control" name="row[username]" value="{$admin.username}" disabled />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="control-label">{:__('Email')}:</label>
|
||||
<input type="text" class="form-control" name="row[email]" value="{$admin.email}" data-rule="required;email" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="nickname" class="control-label">{:__('Nickname')}:</label>
|
||||
<input type="text" class="form-control" name="row[nickname]" value="{$admin.nickname}" data-rule="required" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="control-label">{:__('Password')}:</label>
|
||||
<input type="text" class="form-control" placeholder="{:__('Leave password blank if dont want to change')}" name="row[password]" value=""/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success">{:__('Submit')}</button>
|
||||
<button type="reset" class="btn btn-default">{:__('Reset')}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<style type="text/css">
|
||||
body {
|
||||
color:#999;
|
||||
background:url('http://img.infinitynewtab.com/wallpaper/{:date("Ymd")%4000}.jpg');
|
||||
background-size:cover;
|
||||
}
|
||||
.login-panel{margin-top:150px;}
|
||||
.login-screen {
|
||||
|
|
@ -72,12 +74,12 @@
|
|||
{:token()}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></div>
|
||||
<input type="text" class="form-control" id="pd-form-username" placeholder="" name="username" autocomplete="off" required="required" value="admin" />
|
||||
<input type="text" class="form-control" id="pd-form-username" placeholder="" name="username" autocomplete="off" value="admin" />
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></div>
|
||||
<input type="password" class="form-control" id="pd-form-password" placeholder="" name="password" autocomplete="off" required="required" value="123456" />
|
||||
<input type="password" class="form-control" id="pd-form-password" placeholder="" name="password" autocomplete="off" value="123456" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
<!-- RIBBON -->
|
||||
<div id="ribbon">
|
||||
<ol class="breadcrumb pull-left">
|
||||
<li><a href="#"><i class="fa fa-dashboard"></i> {:__('Dashboard')}</a></li>
|
||||
<li>{$title|default=''}</li>
|
||||
<li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> {:__('Dashboard')}</a></li>
|
||||
</ol>
|
||||
<ol class="breadcrumb pull-right">
|
||||
{foreach $breadcrumb as $vo}
|
||||
<li>{$vo.title}</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
<div class="shortcut pull-right">
|
||||
<a href="javascript:;" id="search" onclick="$('.search input').focus();"><i class="fa fa-search"></i> <span class="hidden-mobile">{:__('Search')}</span></a>
|
||||
<a href="javascript:;" id="refresh" onclick="location.reload();"><i class="fa fa-refresh"></i> <span class="hidden-mobile">{:__('Refresh')}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END RIBBON -->
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<div class="form-group">
|
||||
<label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('row[flag]', 'h,i,s', null, ['id'=>'c-flag','class'=>'form-control selectpicker','required'=>''])}
|
||||
{:build_select('row[flag]', ['recommend'=>__('Recommend'), 'index'=>__('Index'), 'hot'=>__('Hot')], null, ['id'=>'c-flag','class'=>'form-control selectpicker','required'=>''])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<div class="form-group">
|
||||
<label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('row[flag]', 'h,i,s', $row['flag'], ['id'=>'c-flag','class'=>'form-control selectpicker','required'=>''])}
|
||||
{:build_select('row[flag]', ['recommend'=>__('Recommend'), 'index'=>__('Index'), 'hot'=>__('Hot')], $row['flag'], ['id'=>'c-flag','class'=>'form-control selectpicker','required'=>''])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,154 @@
|
|||
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-category_id" class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_category_select('row[category_id]', 'test', '0', ['id' => 'c-category_id'])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-category_ids" class="control-label col-xs-12 col-sm-2">{:__('Category_ids')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_category_select('row[category_ids]', 'test', '', ['id' => 'c-category_ids','required' => '','multiple' => ''])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-user_id" class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" class="form-control typeahead" name="row[user_id]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-user_ids" class="control-label col-xs-12 col-sm-2">{:__('User_ids')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_ids" required="" class="form-control tagsinput" name="row[user_ids]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-week" class="control-label col-xs-12 col-sm-2">{:__('Week')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('row[week]', ['monday' => __('Monday'),'tuesday' => __('Tuesday'),'wednesday' => __('Wednesday')], '', ['id' => 'c-week','required' => '','class' => 'form-control selectpicker'])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('row[flag][]', ['hot' => __('Hot'),'index' => __('Index'),'recommend' => __('Recommend')], '', ['id' => 'c-flag','required' => '','class' => 'form-control selectpicker','multiple' => ''])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-genderdata" class="control-label col-xs-12 col-sm-2">{:__('Genderdata')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_radios('row[genderdata]', ['male' => __('Male'),'female' => __('Female')], 'male')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-hobbydata" class="control-label col-xs-12 col-sm-2">{:__('Hobbydata')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_checkboxs('row[hobbydata][]', ['music' => __('Music'),'reading' => __('Reading'),'swimming' => __('Swimming')], '')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-title" required="" class="form-control" name="row[title]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-content" required="" class="form-control summernote" rows="5" name="row[content]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="form-inline">
|
||||
<input id="c-image" required="" class="form-control" size="50" name="row[image]" type="text" value="">
|
||||
<span><button id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image"data-mimetype="image/*"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-attachfile" class="control-label col-xs-12 col-sm-2">{:__('Attachfile')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="form-inline">
|
||||
<input id="c-attachfile" required="" class="form-control" size="50" name="row[attachfile]" type="text" value="">
|
||||
<span><button id="plupload-attachfile" class="btn btn-danger plupload" data-input-id="c-attachfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-keywords" class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-keywords" required="" class="form-control" name="row[keywords]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-description" class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-description" required="" class="form-control " rows="5" name="row[description]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-price" class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-views" class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-views" class="form-control" name="row[views]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-startdate" class="control-label col-xs-12 col-sm-2">{:__('Startdate')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-startdate" required="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[startdate]" type="text" value="{:date('Y-m-d')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-activitydate" class="control-label col-xs-12 col-sm-2">{:__('Activitydate')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-activitydate" required="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[activitydate]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-year" class="control-label col-xs-12 col-sm-2">{:__('Year')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-year" required="" class="form-control datetimepicker" data-date-format="YYYY" data-use-current="true" name="row[year]" type="text" value="{:date('Y')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-times" class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-times" required="" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[times]" type="text" value="{:date('H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-refreshtime" class="control-label col-xs-12 col-sm-2">{:__('Refreshtime')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refreshtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refreshtime]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-status" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_radios('row[status]', ['normal' => __('Normal'),'hidden' => __('Hidden')], 'normal')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hide layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
<form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-category_id" class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_category_select('row[category_id]', 'test', $row.category_id, ['id' => 'c-category_id'])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-category_ids" class="control-label col-xs-12 col-sm-2">{:__('Category_ids')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_category_select('row[category_ids]', 'test', $row.category_ids, ['id' => 'c-category_ids','required' => '','multiple' => ''])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-user_id" class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" class="form-control typeahead" name="row[user_id]" type="number" value="{$row.user_id}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-user_ids" class="control-label col-xs-12 col-sm-2">{:__('User_ids')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_ids" required="" class="form-control tagsinput" name="row[user_ids]" type="text" value="{$row.user_ids}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-week" class="control-label col-xs-12 col-sm-2">{:__('Week')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('row[week]', ['monday' => __('Monday'),'tuesday' => __('Tuesday'),'wednesday' => __('Wednesday')], $row.week, ['id' => 'c-week','required' => '','class' => 'form-control selectpicker'])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-flag" class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('row[flag][]', ['hot' => __('Hot'),'index' => __('Index'),'recommend' => __('Recommend')], $row.flag, ['id' => 'c-flag','required' => '','class' => 'form-control selectpicker','multiple' => ''])}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-genderdata" class="control-label col-xs-12 col-sm-2">{:__('Genderdata')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_radios('row[genderdata]', ['male' => __('Male'),'female' => __('Female')], $row.genderdata)}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-hobbydata" class="control-label col-xs-12 col-sm-2">{:__('Hobbydata')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_checkboxs('row[hobbydata][]', ['music' => __('Music'),'reading' => __('Reading'),'swimming' => __('Swimming')], $row.hobbydata)}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-title" required="" class="form-control" name="row[title]" type="text" value="{$row.title}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-content" required="" class="form-control summernote" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="form-inline">
|
||||
<input id="c-image" required="" class="form-control" size="50" name="row[image]" type="text" value="{$row.image}">
|
||||
<span><button id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image"data-mimetype="image/*"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-attachfile" class="control-label col-xs-12 col-sm-2">{:__('Attachfile')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="form-inline">
|
||||
<input id="c-attachfile" required="" class="form-control" size="50" name="row[attachfile]" type="text" value="{$row.attachfile}">
|
||||
<span><button id="plupload-attachfile" class="btn btn-danger plupload" data-input-id="c-attachfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-keywords" class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-keywords" required="" class="form-control" name="row[keywords]" type="text" value="{$row.keywords}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-description" class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-description" required="" class="form-control " rows="5" name="row[description]" cols="50">{$row.description}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-price" class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-price" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-views" class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-views" class="form-control" name="row[views]" type="number" value="{$row.views}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-startdate" class="control-label col-xs-12 col-sm-2">{:__('Startdate')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-startdate" required="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[startdate]" type="text" value="{$row.startdate}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-activitydate" class="control-label col-xs-12 col-sm-2">{:__('Activitydate')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-activitydate" required="" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[activitydate]" type="text" value="{$row.activitydate}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-year" class="control-label col-xs-12 col-sm-2">{:__('Year')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-year" required="" class="form-control datetimepicker" data-date-format="YYYY" data-use-current="true" name="row[year]" type="text" value="{$row.year}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-times" class="control-label col-xs-12 col-sm-2">{:__('Times')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-times" required="" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[times]" type="text" value="{$row.times}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-refreshtime" class="control-label col-xs-12 col-sm-2">{:__('Refreshtime')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refreshtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refreshtime]" type="text" value="{$row.refreshtime|datetime}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c-status" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_radios('row[status]', ['normal' => __('Normal'),'hidden' => __('Hidden')], $row.status)}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hide layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar()}
|
||||
<div class="dropdown btn-group">
|
||||
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
|
||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover" width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -9,7 +9,8 @@ class Common
|
|||
|
||||
public function run(&$params)
|
||||
{
|
||||
$cdnurl = str_replace('/index.php', '', $params->root());
|
||||
$cdnurl = str_replace($_SERVER['SCRIPT_NAME'], '', $params->root());
|
||||
|
||||
// 如果未设置__CDN__则自动匹配得出
|
||||
if (!Config::get('view_replace_str.__CDN__'))
|
||||
{
|
||||
|
|
@ -20,6 +21,11 @@ class Common
|
|||
{
|
||||
Config::set('site.cdnurl', $cdnurl);
|
||||
}
|
||||
// 如果未设置cdnurl则自动匹配得出
|
||||
if (!Config::get('upload.cdnurl'))
|
||||
{
|
||||
Config::set('upload.cdnurl', $cdnurl);
|
||||
}
|
||||
// 如果是调试模式将version置为当前的时间戳可避免缓存
|
||||
if (!Config::get('app_debug'))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,16 +84,8 @@ class Backend extends Controller
|
|||
// 非选项卡时重定向
|
||||
if (!IS_AJAX && !IS_ADDTABS && $controllername != 'index' && $actionname == 'index')
|
||||
{
|
||||
$url = $this->request->baseUrl();
|
||||
$start = stripos($url, 'index.php');
|
||||
$start = $start !== false ? $start : 0;
|
||||
$url = substr($url, 0, $start + 9) . str_replace('.', '/', substr($url, $start + 9));
|
||||
// 如果是域名部署则加上前缀
|
||||
if (Config::get('url_domain_deploy'))
|
||||
{
|
||||
$url = rtrim(url('/'), '/') . $url;
|
||||
}
|
||||
header("location:" . url('index/index#!' . urlencode($url), '', false));
|
||||
$url = $this->request->url();
|
||||
$this->redirect('index/index', [], 302, ['referer' => $url]);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -120,6 +112,12 @@ class Backend extends Controller
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 设置面包屑导航数据
|
||||
$breadcrumb = $this->auth->getBreadCrumb($path);
|
||||
array_pop($breadcrumb);
|
||||
$this->view->breadcrumb = $breadcrumb;
|
||||
|
||||
// 如果有使用模板布局
|
||||
if ($this->layout)
|
||||
{
|
||||
|
|
@ -138,8 +136,10 @@ class Backend extends Controller
|
|||
'actionname' => $actionname,
|
||||
'jsname' => 'backend/' . str_replace('.', '/', $controllername),
|
||||
'moduleurl' => url("/{$modulename}", '', false),
|
||||
'language' => $lang
|
||||
'language' => $lang,
|
||||
'referer' => Session::get("referer")
|
||||
];
|
||||
|
||||
Lang::load(APP_PATH . $modulename . '/lang/' . $lang . '/' . str_replace('.', '/', $controllername) . '.php');
|
||||
|
||||
$this->assign('site', Config::get("site"));
|
||||
|
|
@ -177,9 +177,27 @@ class Backend extends Controller
|
|||
}
|
||||
$where[] = "(" . implode(' OR ', $searchlist) . ")";
|
||||
}
|
||||
$table = '';
|
||||
if (!empty($this->model))
|
||||
{
|
||||
$class = get_class($this->model);
|
||||
$name = basename(str_replace('\\', '/', $class));
|
||||
$table = $this->model->db(false)->getTable($name);
|
||||
$table = $table . ".";
|
||||
}
|
||||
if (stripos($sort, ".") === false)
|
||||
{
|
||||
|
||||
$sort = $table . $sort;
|
||||
}
|
||||
foreach ($filter as $k => $v)
|
||||
{
|
||||
$sym = isset($op[$k]) ? $op[$k] : '=';
|
||||
if (stripos($k, ".") === false)
|
||||
{
|
||||
$k = $table . $k;
|
||||
}
|
||||
$sym = isset($op[$k]) ? $op[$k] : $sym;
|
||||
switch ($sym)
|
||||
{
|
||||
case '=':
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ class Category Extends Model
|
|||
'default' => __('Default'),
|
||||
'page' => __('Page'),
|
||||
'article' => __('Article'),
|
||||
'block' => __('Block'),
|
||||
];
|
||||
return $typelist;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class User extends Frontend
|
|||
{
|
||||
$url = $this->request->get('url', '/');
|
||||
if ($this->user->check())
|
||||
$this->error(__('You are already logged in'), $url);
|
||||
$this->error(__('You\'ve logged in, do not login again'), $url);
|
||||
if ($this->request->isPost())
|
||||
{
|
||||
$username = $this->request->post('username');
|
||||
|
|
@ -77,7 +77,7 @@ class User extends Frontend
|
|||
{
|
||||
$url = $this->request->get('url', '/');
|
||||
if ($this->user->check())
|
||||
$this->error(__('You are already logged in'), $url);
|
||||
$this->error(__('You\'ve logged in, do not login again'), $url);
|
||||
if ($this->request->isPost())
|
||||
{
|
||||
$account = $this->request->post('account');
|
||||
|
|
|
|||
|
|
@ -92,6 +92,9 @@ return [
|
|||
'Please enter your username' => '请输入你的用户名',
|
||||
'Please enter your password' => '请输入你的密码',
|
||||
'Please login first' => '请登录后操作',
|
||||
'Sign up successful' => '注册成功',
|
||||
'Logged in successful' => '登录成功',
|
||||
'Logout successful' => '注销成功',
|
||||
'You\'ve logged in, do not login again' => '你已经登录,无需重复登录',
|
||||
'Username or password can not be empty' => '用户名密码不能为空',
|
||||
'Username is incorrect' => '用户名不正确',
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
<div class="page-header"><h3>组件</h3></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row" id="component-list">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a href="{:url('index/user/login')}"><img style="height: 200px; width: 100%; display: block;" src="__CDN__/assets/img/third.jpg" data-holder-rendered="true"></a>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{$config.language}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>FastAdmin</title>
|
||||
|
|
@ -16,14 +16,15 @@
|
|||
<![endif]-->
|
||||
<script type="text/javascript">
|
||||
var require = {
|
||||
config: {
|
||||
'config': {$config|json_encode}
|
||||
}
|
||||
config: {$config | json_encode}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
html{height:100%;overflow:auto;-webkit-overflow-scrolling: touch;}
|
||||
body{padding:70px 0;}
|
||||
body{padding:70px 0 0 0;}
|
||||
footer {margin-top:20px;font-size:14px;padding:25px 0;background:#f4f6f6;}
|
||||
.footer-link ul li a{margin-top:10px;line-height: 25px;}
|
||||
#component-list .caption p {font-size:13px;line-height:20px;}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
|
@ -44,7 +45,7 @@
|
|||
</div>
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">更多示例 <span class="caret"></span></a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">你好!{:$user->id?$user->nickname:'游客'} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a id="userindex" href="{:url('user/index')}">会员中心</a></li>
|
||||
<li><a id="thirdlogin" href="{:url('user/login')}">第三方登录</a></li>
|
||||
|
|
@ -61,6 +62,41 @@
|
|||
|
||||
{__CONTENT__}
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="footer-link">
|
||||
<ul class="list-inline">
|
||||
<li><a href="http://www.fastadmin.net">关于我们</a></li>
|
||||
<li><a href="http://doc.fastadmin.net">帮助文档</a></li>
|
||||
<li><a href="https://git.oschina.net/karson/fastadmin">Git@OSC</a></li>
|
||||
<li><a href="https://github.com/karsonzhang/fastadmin" class="">Github</a></li>
|
||||
<li><a href="http://www.fastadmin.net/#donate" class="">打赏</a></li>
|
||||
<li><a href="http://www.fastadmin.net/#contact" class="">联系我们</a></li>
|
||||
<li><a href="http://demo.fastadmin.net/" class="">在线演示</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<p>
|
||||
<span class="text-muted"><a href="http://www.miitbeian.gov.cn/" target="_blank">粤ICP备15054802号-4</a></span>
|
||||
</p>
|
||||
<span class="small"></span>
|
||||
<p>
|
||||
Copyright © fastadmin.net 2017-2018 All rights reserved
|
||||
</p>
|
||||
</div>
|
||||
<div class="pull-right hidden-xs hidden-sm">
|
||||
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="__CDN__/assets/js/require.js" data-main="__CDN__/assets/js/require-frontend{$Think.config.app_debug?'':'.min'}.js?v={$site.version}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,29 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>会员中心</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link href="__CDN__/assets/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="__CDN__/assets/css/fastadmin.min.css" rel="stylesheet" />
|
||||
<link href="__CDN__/assets/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
|
||||
<html lang="{$config.language}">
|
||||
<head>
|
||||
<title>会员中心</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link href="__CDN__/assets/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="__CDN__/assets/css/fastadmin.min.css" rel="stylesheet" />
|
||||
<link href="__CDN__/assets/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
|
||||
|
||||
<link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
|
||||
<link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="__CDN__/assets/js/html5shiv.js"></script>
|
||||
<script src="__CDN__/assets/js/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="row tips">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-gray">
|
||||
<div class="box-body">
|
||||
{__CONTENT__}
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="__CDN__/assets/js/html5shiv.js"></script>
|
||||
<script src="__CDN__/assets/js/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="row tips">
|
||||
<div class="col-xs-12">
|
||||
<div class="box box-gray">
|
||||
<div class="box-body">
|
||||
{__CONTENT__}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{if $user->check()}
|
||||
<div class="alert alert-dismissable alert-warning clearfix">
|
||||
<div class="alert alert-dismissable bg-gray-light clearfix">
|
||||
<div class="pull-left"><img class="img-responsive img-circle" style="width:100px;" src="/assets/img/avatar.png" /></div>
|
||||
<div class="pull-left text-left" style="margin-left:15px;">
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
"devDependencies": {
|
||||
"dragsort": "https://github.com/karsonzhang/dragsort.git",
|
||||
"jquery-addtabs": "https://github.com/karsonzhang/jquery-addtabs.git",
|
||||
"jquery-cxselect": "https://github.com/karsonzhang/cxSelect.git#",
|
||||
"jqcron": "https://github.com/karsonzhang/jqcron.git#"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class Auth
|
|||
* @var object 对象实例
|
||||
*/
|
||||
protected static $instance;
|
||||
protected $rules = [];
|
||||
|
||||
/**
|
||||
* 当前请求实例
|
||||
|
|
@ -179,7 +180,7 @@ class Auth
|
|||
->view($auth_group, 'id,pid,name,rules', "{$auth_group_access}.group_id={$auth_group}.id", 'LEFT')
|
||||
->where("{$auth_group_access}.uid='{$uid}' and {$auth_group}.status='normal'")
|
||||
->select();
|
||||
$groups[$uid] = $user_groups ? : [];
|
||||
$groups[$uid] = $user_groups ?: [];
|
||||
|
||||
return $groups[$uid];
|
||||
}
|
||||
|
|
@ -208,7 +209,7 @@ class Auth
|
|||
$_rulelist[$uid] = [];
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
// 筛选条件
|
||||
$where = [
|
||||
'status' => 'normal'
|
||||
|
|
@ -218,10 +219,11 @@ class Auth
|
|||
$where['id'] = ['in', $ids];
|
||||
}
|
||||
//读取用户组所有权限规则
|
||||
$rules = Db::name($this->config['auth_rule'])->where($where)->field('id,condition,name,ismenu')->select();
|
||||
$this->rules = Db::name($this->config['auth_rule'])->where($where)->field('id,pid,condition,icon,name,title,ismenu')->select();
|
||||
|
||||
//循环规则,判断结果。
|
||||
$rulelist = []; //
|
||||
foreach ($rules as $rule)
|
||||
foreach ($this->rules as $rule)
|
||||
{
|
||||
//超级管理员无需验证condition
|
||||
if (!empty($rule['condition']) && !in_array('*', $ids))
|
||||
|
|
|
|||
|
|
@ -1,503 +0,0 @@
|
|||
body {
|
||||
background: #f1f4f6;
|
||||
}
|
||||
.selection {
|
||||
position: absolute;
|
||||
border: 1px solid #8B9;
|
||||
background-color: #BEC;
|
||||
}
|
||||
.main-header .logo,
|
||||
.main-header .navbar {
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
-o-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
.main-header .navbar {
|
||||
position: relative;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
position: absolute;
|
||||
width: 45px;
|
||||
text-align: center;
|
||||
}
|
||||
.main-header .navbar #nav {
|
||||
position: absolute;
|
||||
left: 45px;
|
||||
}
|
||||
.main-header .navbar .navbar-custom-menu {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
.note-dialog .modal {
|
||||
z-index: 1060;
|
||||
}
|
||||
.bootstrap-dialog .modal-dialog {
|
||||
/*width: 70%;*/
|
||||
max-width: 885px;
|
||||
}
|
||||
#header {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.content-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
.tab-addtabs {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tab-addtabs .tab-pane {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.tab-addtabs.ios-iframe-fix .tab-pane {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
}
|
||||
.common-search-table {
|
||||
min-height: 20px;
|
||||
padding: 15px;
|
||||
margin-bottom: 15px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
/*
|
||||
* RIBBON
|
||||
*/
|
||||
#ribbon {
|
||||
overflow: hidden;
|
||||
padding: 15px 15px 0 15px;
|
||||
position: relative;
|
||||
}
|
||||
#ribbon a {
|
||||
color: #777 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
#ribbon .breadcrumb {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
vertical-align: top;
|
||||
}
|
||||
#ribbon .breadcrumb > .active,
|
||||
#ribbon .breadcrumb li:last-child {
|
||||
color: #aaa;
|
||||
}
|
||||
#ribbon .shortcut a {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.is-dialog #main {
|
||||
background: #fff;
|
||||
}
|
||||
.is-dialog form label {
|
||||
font-weight: normal;
|
||||
}
|
||||
/*panel扩展描述样式*/
|
||||
.panel-intro {
|
||||
margin-bottom: 0;
|
||||
border: none;
|
||||
}
|
||||
.panel-intro .panel-heading {
|
||||
padding: 15px;
|
||||
padding-bottom: 0;
|
||||
background: #e8edf0;
|
||||
border-color: #e8edf0;
|
||||
position: relative;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-lead {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-lead em {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-title {
|
||||
height: 25px;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-control {
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-control .fa {
|
||||
font-size: 14px;
|
||||
}
|
||||
.panel-intro .panel-heading .nav-tabs {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.panel-intro .panel-heading .nav-tabs > li > a {
|
||||
margin-right: 4px;
|
||||
color: #95a5a6;
|
||||
background-color: #d8e0e6;
|
||||
border: 1px solid #e8edf0;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.panel-intro .panel-heading .nav-tabs > li > a:hover,
|
||||
.panel-intro .panel-heading .nav-tabs > li > a:focus {
|
||||
border: 1px solid #e8edf0;
|
||||
color: #7b8a8b;
|
||||
background-color: #c9d4dc;
|
||||
}
|
||||
.panel-intro .panel-heading .nav-tabs > li.active > a,
|
||||
.panel-intro .panel-heading .nav-tabs > li.active > a:hover,
|
||||
.panel-intro .panel-heading .nav-tabs > li.active > a:focus {
|
||||
color: #7b8a8b;
|
||||
background-color: #ffffff;
|
||||
border-bottom-color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
/*单表格*/
|
||||
.panel-tabs .panel-heading {
|
||||
padding: 12px 15px 12px 15px;
|
||||
}
|
||||
.panel-tabs .panel-heading .panel-lead {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
/*选项卡*/
|
||||
.panel-nav .panel-heading {
|
||||
padding: 0px;
|
||||
padding-bottom: 0;
|
||||
background: #f1f4f6;
|
||||
border-color: #f1f4f6;
|
||||
}
|
||||
.panel-nav .nav-tabs > li > a {
|
||||
padding: 12px 15px;
|
||||
background-color: #e8edf0;
|
||||
border: 1px solid #f1f4f6;
|
||||
}
|
||||
.panel-nav .nav-tabs > li > a:hover,
|
||||
.panel-nav .nav-tabs > li > a:focus {
|
||||
border: 1px solid #e8edf0;
|
||||
background-color: #e8edf0;
|
||||
}
|
||||
.panel-nav .nav-tabs > li.active > a,
|
||||
.panel-nav .nav-tabs > li.active > a:hover,
|
||||
.panel-nav .nav-tabs > li.active > a:focus {
|
||||
border-color: #f1f4f6;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
/*顶栏addtabs*/
|
||||
.nav-addtabs {
|
||||
border: none;
|
||||
}
|
||||
.nav-addtabs.disable-top-badge > li > a > .pull-right-container {
|
||||
display: none;
|
||||
}
|
||||
.nav-addtabs > li {
|
||||
margin: 0;
|
||||
}
|
||||
.nav-addtabs > li > a {
|
||||
height: 49px;
|
||||
line-height: 49px;
|
||||
padding: 0 15px;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
margin: 0;
|
||||
color: #95a5a6;
|
||||
}
|
||||
.nav-addtabs > li > a:hover,
|
||||
.nav-addtabs > li > a:focus {
|
||||
border: none;
|
||||
color: #2c3e50;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.nav-addtabs > li > a i {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.nav-addtabs > li.active > a {
|
||||
height: 49px;
|
||||
line-height: 49px;
|
||||
padding: 0 15px;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
background: #f1f4f6;
|
||||
color: #2c3e50;
|
||||
overflow: hidden;
|
||||
}
|
||||
.nav-addtabs > li.active > a:hover,
|
||||
.nav-addtabs > li.active > a:focus {
|
||||
border: none;
|
||||
color: #2c3e50;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
background: #f1f4f6;
|
||||
}
|
||||
.nav-addtabs > li .close-tab {
|
||||
font-size: 10px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 50%;
|
||||
margin-top: -7px;
|
||||
z-index: 100;
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
display: none;
|
||||
}
|
||||
.nav-addtabs .open > a:hover,
|
||||
.nav-addtabs .open > a:focus {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.nav-addtabs ul li {
|
||||
position: relative;
|
||||
}
|
||||
.nav-addtabs li:hover > .close-tab {
|
||||
display: block;
|
||||
}
|
||||
.sidebar-menu.show-submenu .treeview-menu {
|
||||
display: block;
|
||||
}
|
||||
.sidebar-menu > li .badge {
|
||||
margin-top: 0;
|
||||
}
|
||||
#treeview .jstree-container-ul .jstree-node {
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-leaf:not(:first-child) {
|
||||
float: left;
|
||||
background: none;
|
||||
margin-left: 0;
|
||||
width: 80px;
|
||||
clear: none;
|
||||
}
|
||||
#treeview .jstree-leaf {
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
padding-left: 24px;
|
||||
width: 80px;
|
||||
clear: none;
|
||||
color: #777;
|
||||
}
|
||||
#treeview .jstree-leaf > .jstree-icon,
|
||||
#treeview .jstree-leaf .jstree-themeicon {
|
||||
display: none;
|
||||
}
|
||||
#treeview .jstree-last {
|
||||
background-image: url("../img/32px.png");
|
||||
background-position: -292px -4px;
|
||||
background-repeat: repeat-y;
|
||||
}
|
||||
#treeview .jstree-children:before,
|
||||
#treeview .jstree-children:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
#treeview .jstree-children:after {
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-children:before,
|
||||
#treeview .jstree-children:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
#treeview .jstree-children:after {
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-themeicon {
|
||||
display: none;
|
||||
}
|
||||
/*去除bootstrap-table的边框*/
|
||||
.fixed-table-container {
|
||||
border: none!important;
|
||||
}
|
||||
.note-editor .note-editing-area .note-editable {
|
||||
display: block !important;
|
||||
}
|
||||
.pjax-loader-bar .progress {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
background: #77b6ff;
|
||||
box-shadow: 0 0 10px rgba(119, 182, 255, 0.7);
|
||||
-webkit-transition: width 0.4s ease;
|
||||
transition: width 0.4s ease;
|
||||
}
|
||||
.dropdown-menu.text-left a,
|
||||
.dropdown-menu.text-left li {
|
||||
text-align: left!important;
|
||||
}
|
||||
.bootstrap-table .fixed-table-toolbar .dropdown-menu {
|
||||
overflow: visible;
|
||||
}
|
||||
.bootstrap-table table tbody tr:first-child td .bs-checkbox {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -6px;
|
||||
margin-left: -1px;
|
||||
-webkit-border-radius: 0 6px 6px 6px;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-border-radius: 0 6px 6px 6px;
|
||||
-moz-background-clip: padding;
|
||||
border-radius: 0 6px 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.dropdown-submenu:hover > .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-submenu:hover > a:after {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.dropdown-submenu > a:after {
|
||||
display: block;
|
||||
content: " ";
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-left-color: #ccc;
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
.dropdown-submenu.pull-left {
|
||||
float: none;
|
||||
}
|
||||
.dropdown-submenu.pull-left > .dropdown-menu {
|
||||
left: -100%;
|
||||
margin-left: 10px;
|
||||
-webkit-border-radius: 6px 0 6px 6px;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-border-radius: 6px 0 6px 6px;
|
||||
-moz-background-clip: padding;
|
||||
border-radius: 6px 0 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
/*重写toast的几个背景色*/
|
||||
.toast-primary {
|
||||
background-color: #48c9b0!important;
|
||||
}
|
||||
.toast-success {
|
||||
background-color: #2ecc71!important;
|
||||
}
|
||||
.toast-error {
|
||||
background-color: #e74c3c!important;
|
||||
}
|
||||
.toast-info {
|
||||
background-color: #5dade2!important;
|
||||
}
|
||||
.toast-warning {
|
||||
background-color: #f1c40f!important;
|
||||
}
|
||||
.toast-inverse {
|
||||
background-color: #34495e!important;
|
||||
}
|
||||
.toast-default {
|
||||
background-color: #bdc3c7!important;
|
||||
}
|
||||
.layui-layer-title {
|
||||
background: #2c3e50!important;
|
||||
color: #fff!important;
|
||||
}
|
||||
/*避免出现多滚动条*/
|
||||
.layui-layer-noborder {
|
||||
border: none!important;
|
||||
box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important;
|
||||
}
|
||||
.layui-layer-moves {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.layui-layer-iframe {
|
||||
overflow: hidden!important;
|
||||
}
|
||||
.layui-layer-iframe .layui-layer-content {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: hidden!important;
|
||||
overflow: hidden;
|
||||
}
|
||||
/*自定义底部灰色操作区*/
|
||||
.layui-layer-btn {
|
||||
text-align: center!important;
|
||||
padding: 10px!important;
|
||||
background: #ecf0f1;
|
||||
}
|
||||
.layui-layer-footer {
|
||||
padding: 8px 20px;
|
||||
background-color: #ecf0f1;
|
||||
height: auto;
|
||||
text-align: inherit!important;
|
||||
}
|
||||
.layui-layer-btn a {
|
||||
background-color: #95a5a6!important;
|
||||
border-color: #95a5a6!important;
|
||||
color: #fff!important;
|
||||
}
|
||||
.layui-layer-btn .layui-layer-btn0 {
|
||||
background-color: #18bc9c!important;
|
||||
border-color: #18bc9c!important;
|
||||
}
|
||||
.layui-layer-setwin {
|
||||
top: 10px!important;
|
||||
}
|
||||
.layui-layer-setwin > a {
|
||||
background: none!important;
|
||||
}
|
||||
.layui-layer-setwin > a cite {
|
||||
display: none;
|
||||
}
|
||||
.layui-layer-setwin > a:after {
|
||||
content: "\e625";
|
||||
font-family: iconfont;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-decoration: inherit;
|
||||
position: absolute;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.layui-layer-setwin > a:hover {
|
||||
text-decoration: none!important;
|
||||
background: none!important;
|
||||
}
|
||||
.layui-layer-setwin > a:focus {
|
||||
text-decoration: none!important;
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-min:after {
|
||||
content: "\e625";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-max:after {
|
||||
content: "\e623";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-maxmin:after {
|
||||
content: "\e624";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-close1:after {
|
||||
content: "\e626";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-close2,
|
||||
.layui-layer-setwin .layui-layer-close2:hover {
|
||||
background: url('../libs/layer/build/skin/default/icon.png') no-repeat -149px -31px !important;
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-close2:after,
|
||||
.layui-layer-setwin .layui-layer-close2:hover:after {
|
||||
display: none;
|
||||
}
|
||||
/*手机版样式*/
|
||||
@media (max-width: 480px) {
|
||||
.nav-addtabs {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
/*平板样式*/
|
||||
/*# sourceMappingURL=backend-func.css.map */
|
||||
|
|
@ -5,4 +5,527 @@
|
|||
@import url("../libs/font-awesome/css/font-awesome.min.css");
|
||||
@import url("../libs/toastr/toastr.min.css");
|
||||
@import url("../libs/layer/build/skin/default/layer.css");
|
||||
@import url("../css/backend-func.css");
|
||||
@import url("../libs/bootstrap-table/dist/bootstrap-table.min.css");
|
||||
@import url("../libs/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css");
|
||||
@import url("../libs/nice-validator/dist/jquery.validator.css");
|
||||
body {
|
||||
background: #f1f4f6;
|
||||
}
|
||||
.selection {
|
||||
position: absolute;
|
||||
border: 1px solid #8B9;
|
||||
background-color: #BEC;
|
||||
}
|
||||
.main-header .logo,
|
||||
.main-header .navbar {
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
-o-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
.main-header .navbar {
|
||||
position: relative;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
position: absolute;
|
||||
width: 45px;
|
||||
text-align: center;
|
||||
}
|
||||
.main-header .navbar #nav {
|
||||
position: absolute;
|
||||
left: 45px;
|
||||
}
|
||||
.main-header .navbar .navbar-custom-menu {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
.note-dialog .modal {
|
||||
z-index: 1060;
|
||||
}
|
||||
.bootstrap-dialog .modal-dialog {
|
||||
/*width: 70%;*/
|
||||
max-width: 885px;
|
||||
}
|
||||
#header {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.content-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
.tab-addtabs {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tab-addtabs .tab-pane {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.tab-addtabs.ios-iframe-fix .tab-pane {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
}
|
||||
.common-search-table {
|
||||
min-height: 20px;
|
||||
padding: 15px;
|
||||
margin-bottom: 15px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.searchit {
|
||||
border-bottom: 1px dashed #3c8dbc;
|
||||
}
|
||||
/*
|
||||
* RIBBON
|
||||
*/
|
||||
#ribbon {
|
||||
overflow: hidden;
|
||||
padding: 15px 15px 0 15px;
|
||||
position: relative;
|
||||
}
|
||||
#ribbon a {
|
||||
color: #777 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
#ribbon .breadcrumb {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
vertical-align: top;
|
||||
}
|
||||
#ribbon .breadcrumb > .active,
|
||||
#ribbon .breadcrumb li {
|
||||
color: #aaa;
|
||||
}
|
||||
#ribbon .shortcut a {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.is-dialog #main {
|
||||
background: #fff;
|
||||
}
|
||||
.is-dialog form label {
|
||||
font-weight: normal;
|
||||
}
|
||||
.user-panel > .image img {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
}
|
||||
/*panel扩展描述样式*/
|
||||
.panel-intro {
|
||||
margin-bottom: 0;
|
||||
border: none;
|
||||
}
|
||||
.panel-intro > .panel-heading {
|
||||
padding: 15px;
|
||||
padding-bottom: 0;
|
||||
background: #e8edf0;
|
||||
border-color: #e8edf0;
|
||||
position: relative;
|
||||
}
|
||||
.panel-intro > .panel-heading .panel-lead {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.panel-intro > .panel-heading .panel-lead em {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
.panel-intro > .panel-heading .panel-title {
|
||||
height: 25px;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.panel-intro > .panel-heading .panel-control {
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
}
|
||||
.panel-intro > .panel-heading .panel-control .fa {
|
||||
font-size: 14px;
|
||||
}
|
||||
.panel-intro > .panel-heading .nav-tabs {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.panel-intro > .panel-heading .nav-tabs > li > a {
|
||||
margin-right: 4px;
|
||||
color: #95a5a6;
|
||||
background-color: #d8e0e6;
|
||||
border: 1px solid #e8edf0;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.panel-intro > .panel-heading .nav-tabs > li > a:hover,
|
||||
.panel-intro > .panel-heading .nav-tabs > li > a:focus {
|
||||
border: 1px solid #e8edf0;
|
||||
color: #7b8a8b;
|
||||
background-color: #c9d4dc;
|
||||
}
|
||||
.panel-intro > .panel-heading .nav-tabs > li.active > a,
|
||||
.panel-intro > .panel-heading .nav-tabs > li.active > a:hover,
|
||||
.panel-intro > .panel-heading .nav-tabs > li.active > a:focus {
|
||||
color: #7b8a8b;
|
||||
background-color: #ffffff;
|
||||
border-bottom-color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
/*单表格*/
|
||||
.panel-tabs .panel-heading {
|
||||
padding: 12px 15px 12px 15px;
|
||||
}
|
||||
.panel-tabs .panel-heading .panel-lead {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
/*选项卡*/
|
||||
.panel-nav .panel-heading {
|
||||
padding: 0px;
|
||||
padding-bottom: 0;
|
||||
background: #f1f4f6;
|
||||
border-color: #f1f4f6;
|
||||
}
|
||||
.panel-nav .nav-tabs > li > a {
|
||||
padding: 12px 15px;
|
||||
background-color: #e8edf0;
|
||||
border: 1px solid #f1f4f6;
|
||||
}
|
||||
.panel-nav .nav-tabs > li > a:hover,
|
||||
.panel-nav .nav-tabs > li > a:focus {
|
||||
border: 1px solid #e8edf0;
|
||||
background-color: #e8edf0;
|
||||
}
|
||||
.panel-nav .nav-tabs > li.active > a,
|
||||
.panel-nav .nav-tabs > li.active > a:hover,
|
||||
.panel-nav .nav-tabs > li.active > a:focus {
|
||||
border-color: #f1f4f6;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
/*顶栏addtabs*/
|
||||
.nav-addtabs {
|
||||
border: none;
|
||||
}
|
||||
.nav-addtabs.disable-top-badge > li > a > .pull-right-container {
|
||||
display: none;
|
||||
}
|
||||
.nav-addtabs > li {
|
||||
margin: 0;
|
||||
}
|
||||
.nav-addtabs > li > a {
|
||||
height: 49px;
|
||||
line-height: 49px;
|
||||
padding: 0 15px;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
margin: 0;
|
||||
color: #95a5a6;
|
||||
}
|
||||
.nav-addtabs > li > a:hover,
|
||||
.nav-addtabs > li > a:focus {
|
||||
border: none;
|
||||
color: #2c3e50;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.nav-addtabs > li > a i {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.nav-addtabs > li.active > a {
|
||||
height: 49px;
|
||||
line-height: 49px;
|
||||
padding: 0 15px;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
background: #f1f4f6;
|
||||
color: #2c3e50;
|
||||
overflow: hidden;
|
||||
}
|
||||
.nav-addtabs > li.active > a:hover,
|
||||
.nav-addtabs > li.active > a:focus {
|
||||
border: none;
|
||||
color: #2c3e50;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
background: #f1f4f6;
|
||||
}
|
||||
.nav-addtabs > li .close-tab {
|
||||
font-size: 10px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 50%;
|
||||
margin-top: -7px;
|
||||
z-index: 100;
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
display: none;
|
||||
}
|
||||
.nav-addtabs .open > a:hover,
|
||||
.nav-addtabs .open > a:focus {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.nav-addtabs ul li {
|
||||
position: relative;
|
||||
}
|
||||
.nav-addtabs li:hover > .close-tab {
|
||||
display: block;
|
||||
}
|
||||
.sidebar-menu.show-submenu .treeview-menu {
|
||||
display: block;
|
||||
}
|
||||
.sidebar-menu > li .badge {
|
||||
margin-top: 0;
|
||||
}
|
||||
#treeview .jstree-container-ul .jstree-node {
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-leaf:not(:first-child) {
|
||||
float: left;
|
||||
background: none;
|
||||
margin-left: 0;
|
||||
width: 80px;
|
||||
clear: none;
|
||||
}
|
||||
#treeview .jstree-leaf {
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
padding-left: 24px;
|
||||
width: 80px;
|
||||
clear: none;
|
||||
color: #777;
|
||||
}
|
||||
#treeview .jstree-leaf > .jstree-icon,
|
||||
#treeview .jstree-leaf .jstree-themeicon {
|
||||
display: none;
|
||||
}
|
||||
#treeview .jstree-last {
|
||||
background-image: url("../img/32px.png");
|
||||
background-position: -292px -4px;
|
||||
background-repeat: repeat-y;
|
||||
}
|
||||
#treeview .jstree-children:before,
|
||||
#treeview .jstree-children:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
#treeview .jstree-children:after {
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-children:before,
|
||||
#treeview .jstree-children:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
#treeview .jstree-children:after {
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-themeicon {
|
||||
display: none;
|
||||
}
|
||||
/*去除bootstrap-table的边框*/
|
||||
.fixed-table-container {
|
||||
border: none!important;
|
||||
}
|
||||
.note-editor .note-editing-area .note-editable {
|
||||
display: block !important;
|
||||
}
|
||||
.pjax-loader-bar .progress {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
background: #77b6ff;
|
||||
box-shadow: 0 0 10px rgba(119, 182, 255, 0.7);
|
||||
-webkit-transition: width 0.4s ease;
|
||||
transition: width 0.4s ease;
|
||||
}
|
||||
.dropdown-menu.text-left a,
|
||||
.dropdown-menu.text-left li {
|
||||
text-align: left!important;
|
||||
}
|
||||
.bootstrap-table .fixed-table-toolbar .dropdown-menu {
|
||||
overflow: visible;
|
||||
}
|
||||
.bootstrap-table table tbody tr:first-child td .bs-checkbox {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -6px;
|
||||
margin-left: -1px;
|
||||
-webkit-border-radius: 0 6px 6px 6px;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-border-radius: 0 6px 6px 6px;
|
||||
-moz-background-clip: padding;
|
||||
border-radius: 0 6px 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.dropdown-submenu:hover > .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-submenu:hover > a:after {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.dropdown-submenu > a:after {
|
||||
display: block;
|
||||
content: " ";
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-left-color: #ccc;
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
.dropdown-submenu.pull-left {
|
||||
float: none;
|
||||
}
|
||||
.dropdown-submenu.pull-left > .dropdown-menu {
|
||||
left: -100%;
|
||||
margin-left: 10px;
|
||||
-webkit-border-radius: 6px 0 6px 6px;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-border-radius: 6px 0 6px 6px;
|
||||
-moz-background-clip: padding;
|
||||
border-radius: 6px 0 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
/*重写toast的几个背景色*/
|
||||
.toast-primary {
|
||||
background-color: #48c9b0!important;
|
||||
}
|
||||
.toast-success {
|
||||
background-color: #18bc9c!important;
|
||||
}
|
||||
.toast-error {
|
||||
background-color: #e74c3c!important;
|
||||
}
|
||||
.toast-info {
|
||||
background-color: #5dade2!important;
|
||||
}
|
||||
.toast-warning {
|
||||
background-color: #f1c40f!important;
|
||||
}
|
||||
.toast-inverse {
|
||||
background-color: #34495e!important;
|
||||
}
|
||||
.toast-default {
|
||||
background-color: #bdc3c7!important;
|
||||
}
|
||||
#toast-container > div,
|
||||
#toast-container > div:hover {
|
||||
-webkit-box-shadow: 0 0 3px #eee;
|
||||
-moz-box-shadow: 0 0 3px #eee;
|
||||
box-shadow: 0 0 3px #eee;
|
||||
}
|
||||
.layui-layer-title {
|
||||
background: #2c3e50!important;
|
||||
color: #fff!important;
|
||||
}
|
||||
/*避免出现多滚动条*/
|
||||
.layui-layer-noborder {
|
||||
border: none!important;
|
||||
box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important;
|
||||
}
|
||||
.layui-layer-moves {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.layui-layer-iframe {
|
||||
overflow: hidden!important;
|
||||
}
|
||||
.layui-layer-iframe .layui-layer-content {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: hidden!important;
|
||||
overflow: hidden;
|
||||
}
|
||||
/*自定义底部灰色操作区*/
|
||||
.layui-layer-btn {
|
||||
text-align: center!important;
|
||||
padding: 10px!important;
|
||||
background: #ecf0f1;
|
||||
}
|
||||
.layui-layer-footer {
|
||||
padding: 8px 20px;
|
||||
background-color: #ecf0f1;
|
||||
height: auto;
|
||||
text-align: inherit!important;
|
||||
}
|
||||
.layui-layer-btn a {
|
||||
background-color: #95a5a6!important;
|
||||
border-color: #95a5a6!important;
|
||||
color: #fff!important;
|
||||
}
|
||||
.layui-layer-btn .layui-layer-btn0 {
|
||||
background-color: #18bc9c!important;
|
||||
border-color: #18bc9c!important;
|
||||
}
|
||||
.layui-layer-setwin {
|
||||
top: 10px!important;
|
||||
}
|
||||
.layui-layer-setwin > a {
|
||||
background: none!important;
|
||||
}
|
||||
.layui-layer-setwin > a cite {
|
||||
display: none;
|
||||
}
|
||||
.layui-layer-setwin > a:after {
|
||||
content: "\e625";
|
||||
font-family: iconfont;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-decoration: inherit;
|
||||
position: absolute;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.layui-layer-setwin > a:hover {
|
||||
text-decoration: none!important;
|
||||
background: none!important;
|
||||
}
|
||||
.layui-layer-setwin > a:focus {
|
||||
text-decoration: none!important;
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-min:after {
|
||||
content: "\e625";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-max:after {
|
||||
content: "\e623";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-maxmin:after {
|
||||
content: "\e624";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-close1:after {
|
||||
content: "\e626";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-close2,
|
||||
.layui-layer-setwin .layui-layer-close2:hover {
|
||||
background: url('../libs/layer/build/skin/default/icon.png') no-repeat -149px -31px !important;
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-close2:after,
|
||||
.layui-layer-setwin .layui-layer-close2:hover:after {
|
||||
display: none;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.form-inline .form-control {
|
||||
padding-right: 20px;
|
||||
}
|
||||
}
|
||||
/*手机版样式*/
|
||||
@media (max-width: 480px) {
|
||||
.nav-addtabs {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
/*平板样式*/
|
||||
/*# sourceMappingURL=backend.css.map */
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,451 +0,0 @@
|
|||
body {
|
||||
background: #f1f4f6;
|
||||
}
|
||||
.selection {
|
||||
position: absolute;
|
||||
border: 1px solid #8B9;
|
||||
background-color: #BEC;
|
||||
}
|
||||
.note-dialog .modal {
|
||||
z-index: 1060;
|
||||
}
|
||||
.bootstrap-dialog .modal-dialog {
|
||||
/*width: 70%;*/
|
||||
max-width: 885px;
|
||||
}
|
||||
#header {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.content-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
.tab-addtabs {
|
||||
overflow: hidden;
|
||||
}
|
||||
.tab-addtabs .tab-pane {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
/*
|
||||
* RIBBON
|
||||
*/
|
||||
#ribbon {
|
||||
overflow: hidden;
|
||||
padding: 15px 15px 0 15px;
|
||||
position: relative;
|
||||
}
|
||||
#ribbon a {
|
||||
color: #777 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
#ribbon .breadcrumb {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
vertical-align: top;
|
||||
}
|
||||
#ribbon .breadcrumb > .active,
|
||||
#ribbon .breadcrumb li:last-child {
|
||||
color: #aaa;
|
||||
}
|
||||
#ribbon .shortcut a {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.is-dialog #main {
|
||||
background: #fff;
|
||||
}
|
||||
.is-dialog form label {
|
||||
font-weight: normal;
|
||||
}
|
||||
/*panel扩展描述样式*/
|
||||
.panel-intro {
|
||||
margin-bottom: 0;
|
||||
border: none;
|
||||
}
|
||||
.panel-intro .panel-heading {
|
||||
padding: 15px;
|
||||
padding-bottom: 0;
|
||||
background: #e8edf0;
|
||||
border-color: #e8edf0;
|
||||
position: relative;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-lead {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-lead em {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-title {
|
||||
height: 25px;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-control {
|
||||
height: 42px;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
}
|
||||
.panel-intro .panel-heading .panel-control .fa {
|
||||
font-size: 14px;
|
||||
}
|
||||
.panel-intro .panel-heading .nav-tabs {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.panel-intro .panel-heading .nav-tabs > li > a {
|
||||
margin-right: 4px;
|
||||
color: #95a5a6;
|
||||
background-color: #d8e0e6;
|
||||
border: 1px solid #e8edf0;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.panel-intro .panel-heading .nav-tabs > li > a:hover,
|
||||
.panel-intro .panel-heading .nav-tabs > li > a:focus {
|
||||
border: 1px solid #e8edf0;
|
||||
color: #7b8a8b;
|
||||
background-color: #c9d4dc;
|
||||
}
|
||||
.panel-intro .panel-heading .nav-tabs > li.active > a,
|
||||
.panel-intro .panel-heading .nav-tabs > li.active > a:hover,
|
||||
.panel-intro .panel-heading .nav-tabs > li.active > a:focus {
|
||||
color: #7b8a8b;
|
||||
background-color: #ffffff;
|
||||
border-bottom-color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
/*单表格*/
|
||||
.panel-tabs .panel-heading {
|
||||
padding: 12px 15px 12px 15px;
|
||||
}
|
||||
.panel-tabs .panel-heading .panel-lead {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
/*选项卡*/
|
||||
.panel-nav .panel-heading {
|
||||
padding: 0px;
|
||||
padding-bottom: 0;
|
||||
background: #f1f4f6;
|
||||
border-color: #f1f4f6;
|
||||
}
|
||||
.panel-nav .nav-tabs > li > a {
|
||||
padding: 12px 15px;
|
||||
background-color: #e8edf0;
|
||||
border: 1px solid #f1f4f6;
|
||||
}
|
||||
.panel-nav .nav-tabs > li > a:hover,
|
||||
.panel-nav .nav-tabs > li > a:focus {
|
||||
border: 1px solid #e8edf0;
|
||||
background-color: #e8edf0;
|
||||
}
|
||||
.panel-nav .nav-tabs > li.active > a,
|
||||
.panel-nav .nav-tabs > li.active > a:hover,
|
||||
.panel-nav .nav-tabs > li.active > a:focus {
|
||||
border-color: #f1f4f6;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
/*顶栏addtabs*/
|
||||
.nav-addtabs {
|
||||
border: none;
|
||||
}
|
||||
.nav-addtabs > li {
|
||||
margin: 0;
|
||||
}
|
||||
.nav-addtabs > li > a {
|
||||
height: 49px;
|
||||
line-height: 49px;
|
||||
padding: 0 15px;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
margin: 0;
|
||||
color: #95a5a6;
|
||||
}
|
||||
.nav-addtabs > li > a:hover,
|
||||
.nav-addtabs > li > a:focus {
|
||||
border: none;
|
||||
color: #2c3e50;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.nav-addtabs > li > a i {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.nav-addtabs > li.active > a {
|
||||
height: 49px;
|
||||
line-height: 49px;
|
||||
padding: 0 15px;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
background: #f1f4f6;
|
||||
color: #2c3e50;
|
||||
overflow: hidden;
|
||||
}
|
||||
.nav-addtabs > li.active > a:hover,
|
||||
.nav-addtabs > li.active > a:focus {
|
||||
border: none;
|
||||
color: #2c3e50;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
background: #f1f4f6;
|
||||
}
|
||||
.nav-addtabs > li .close-tab {
|
||||
font-size: 10px;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 50%;
|
||||
margin-top: -7px;
|
||||
z-index: 100;
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
display: none;
|
||||
}
|
||||
.nav-addtabs .open > a:hover,
|
||||
.nav-addtabs .open > a:focus {
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.nav-addtabs ul li {
|
||||
position: relative;
|
||||
}
|
||||
.nav-addtabs li:hover > .close-tab {
|
||||
display: block;
|
||||
}
|
||||
#treeview .jstree-container-ul .jstree-node {
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-leaf:not(:first-child) {
|
||||
float: left;
|
||||
background: none;
|
||||
margin-left: 0;
|
||||
width: 80px;
|
||||
clear: none;
|
||||
color: #BBBDC3;
|
||||
}
|
||||
#treeview .jstree-leaf {
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
padding-left: 24px;
|
||||
width: 80px;
|
||||
clear: none;
|
||||
color: #ccc;
|
||||
}
|
||||
#treeview .jstree-leaf > .jstree-icon,
|
||||
#treeview .jstree-leaf .jstree-themeicon {
|
||||
display: none;
|
||||
}
|
||||
#treeview .jstree-last {
|
||||
background-image: url("../img/32px.png");
|
||||
background-position: -292px -4px;
|
||||
background-repeat: repeat-y;
|
||||
}
|
||||
#treeview .jstree-children:before,
|
||||
#treeview .jstree-children:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
#treeview .jstree-children:after {
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-children:before,
|
||||
#treeview .jstree-children:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
#treeview .jstree-children:after {
|
||||
clear: both;
|
||||
}
|
||||
#treeview .jstree-themeicon {
|
||||
display: none;
|
||||
}
|
||||
/*去除bootstrap-table的边框*/
|
||||
.fixed-table-container {
|
||||
border: none!important;
|
||||
}
|
||||
.pjax-loader-bar .progress {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
background: #77b6ff;
|
||||
box-shadow: 0 0 10px rgba(119, 182, 255, 0.7);
|
||||
-webkit-transition: width 0.4s ease;
|
||||
transition: width 0.4s ease;
|
||||
}
|
||||
.dropdown-menu.text-left a,
|
||||
.dropdown-menu.text-left li {
|
||||
text-align: left!important;
|
||||
}
|
||||
.bootstrap-table .fixed-table-toolbar .dropdown-menu {
|
||||
overflow: visible;
|
||||
}
|
||||
.bootstrap-table table tbody tr:first-child td .bs-checkbox {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -6px;
|
||||
margin-left: -1px;
|
||||
-webkit-border-radius: 0 6px 6px 6px;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-border-radius: 0 6px 6px 6px;
|
||||
-moz-background-clip: padding;
|
||||
border-radius: 0 6px 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.dropdown-submenu:hover > .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
.dropdown-submenu:hover > a:after {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.dropdown-submenu > a:after {
|
||||
display: block;
|
||||
content: " ";
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-left-color: #ccc;
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
.dropdown-submenu.pull-left {
|
||||
float: none;
|
||||
}
|
||||
.dropdown-submenu.pull-left > .dropdown-menu {
|
||||
left: -100%;
|
||||
margin-left: 10px;
|
||||
-webkit-border-radius: 6px 0 6px 6px;
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-border-radius: 6px 0 6px 6px;
|
||||
-moz-background-clip: padding;
|
||||
border-radius: 6px 0 6px 6px;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
/*重写toast的几个背景色*/
|
||||
.toast-primary {
|
||||
background-color: #48c9b0!important;
|
||||
}
|
||||
.toast-success {
|
||||
background-color: #2ecc71!important;
|
||||
}
|
||||
.toast-error {
|
||||
background-color: #e74c3c!important;
|
||||
}
|
||||
.toast-info {
|
||||
background-color: #5dade2!important;
|
||||
}
|
||||
.toast-warning {
|
||||
background-color: #f1c40f!important;
|
||||
}
|
||||
.toast-inverse {
|
||||
background-color: #34495e!important;
|
||||
}
|
||||
.toast-default {
|
||||
background-color: #bdc3c7!important;
|
||||
}
|
||||
.layui-layer-title {
|
||||
background: #2c3e50!important;
|
||||
color: #fff!important;
|
||||
}
|
||||
/*避免出现多滚动条*/
|
||||
.layui-layer-noborder {
|
||||
border: none!important;
|
||||
box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3) !important;
|
||||
}
|
||||
.layui-layer-moves {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.layui-layer-iframe {
|
||||
overflow: hidden!important;
|
||||
}
|
||||
.layui-layer-iframe .layui-layer-content {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: hidden!important;
|
||||
overflow: hidden;
|
||||
}
|
||||
/*自定义底部灰色操作区*/
|
||||
.layui-layer-btn {
|
||||
text-align: center!important;
|
||||
padding: 10px!important;
|
||||
background: #ecf0f1;
|
||||
}
|
||||
.layui-layer-footer {
|
||||
padding: 8px 20px;
|
||||
background-color: #ecf0f1;
|
||||
height: auto;
|
||||
text-align: inherit!important;
|
||||
}
|
||||
.layui-layer-btn a {
|
||||
background-color: #95a5a6!important;
|
||||
border-color: #95a5a6!important;
|
||||
color: #fff!important;
|
||||
}
|
||||
.layui-layer-btn .layui-layer-btn0 {
|
||||
background-color: #18bc9c!important;
|
||||
border-color: #18bc9c!important;
|
||||
}
|
||||
.layui-layer-setwin {
|
||||
top: 10px!important;
|
||||
}
|
||||
.layui-layer-setwin > a {
|
||||
background: none!important;
|
||||
}
|
||||
.layui-layer-setwin > a cite {
|
||||
display: none;
|
||||
}
|
||||
.layui-layer-setwin > a:after {
|
||||
content: "\e625";
|
||||
font-family: iconfont;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-decoration: inherit;
|
||||
position: absolute;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.layui-layer-setwin > a:hover {
|
||||
text-decoration: none!important;
|
||||
background: none!important;
|
||||
}
|
||||
.layui-layer-setwin > a:focus {
|
||||
text-decoration: none!important;
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-min:after {
|
||||
content: "\e625";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-max:after {
|
||||
content: "\e623";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-maxmin:after {
|
||||
content: "\e624";
|
||||
}
|
||||
.layui-layer-setwin .layui-layer-close1:after {
|
||||
content: "\e626";
|
||||
}
|
||||
/*手机版样式*/
|
||||
@media (max-width: 480px) {
|
||||
.nav-addtabs {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
/*平板样式*/
|
||||
/*# sourceMappingURL=frontend-func.css.map */
|
||||
|
|
@ -5,4 +5,4 @@
|
|||
@import url("../libs/font-awesome/css/font-awesome.min.css");
|
||||
@import url("../libs/toastr/toastr.min.css");
|
||||
@import url("../libs/layer/build/skin/default/layer.css");
|
||||
@import url("../css/frontend-func.css");
|
||||
/*# sourceMappingURL=frontend.css.map */
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($, undefined, Toastr, Layer, Lang, Config) {
|
||||
define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], function ($, undefined, Toastr, Layer, Lang, Moment) {
|
||||
var Backend = {
|
||||
config: {
|
||||
//toastr默认配置
|
||||
|
|
@ -7,7 +7,7 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($
|
|||
"debug": false,
|
||||
"newestOnTop": false,
|
||||
"progressBar": false,
|
||||
"positionClass": "toast-top-center",
|
||||
"positionClass": "toast-top-right",
|
||||
"preventDuplicates": false,
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
|
|
@ -234,13 +234,46 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($
|
|||
badgeList[$url] = $nums > 0 ? '<small class="' + $class + ' pull-right bg-' + $color + '">' + $nums + '</small>' : '';
|
||||
});
|
||||
$.each(badgeList, function (k, v) {
|
||||
var anchor = $(".treeview li a[addtabs][url='" + k + "']");
|
||||
var anchor = top.window.$(".treeview li a[addtabs][url='" + k + "']");
|
||||
if (anchor) {
|
||||
$(".pull-right-container", anchor).html(v);
|
||||
$(".nav-addtabs li a[node-id='" + anchor.attr("addtabs") + "'] .pull-right-container").html(v);
|
||||
top.window.$(".pull-right-container", anchor).html(v);
|
||||
top.window.$(".nav-addtabs li a[node-id='" + anchor.attr("addtabs") + "'] .pull-right-container").html(v);
|
||||
}
|
||||
});
|
||||
},
|
||||
addtabs: function (url, title, icon) {
|
||||
var dom = ".sidebar-menu li a[url='{url}']"
|
||||
var leftlink = top.window.$(dom.replace(/\{url\}/, url));
|
||||
if (leftlink.size() > 0) {
|
||||
leftlink.trigger("click");
|
||||
} else {
|
||||
url = Backend.api.fixurl(url);
|
||||
leftlink = top.window.$(dom.replace(/\{url\}/, url));
|
||||
if (leftlink.size() > 0) {
|
||||
var event = leftlink.parent().hasClass("active") ? "dblclick" : "click";
|
||||
leftlink.trigger(event);
|
||||
} else {
|
||||
var baseurl = url.substr(0, url.indexOf("?") > -1 ? url.indexOf("?") : url.length);
|
||||
leftlink = top.window.$(dom.replace(/\{url\}/, baseurl));
|
||||
//能找到相对地址
|
||||
if (leftlink.size() > 0) {
|
||||
icon = typeof icon != 'undefined' ? icon : leftlink.find("i").attr("class");
|
||||
title = typeof title != 'undefined' ? title : leftlink.find("span:first").text();
|
||||
leftlink.trigger("fa.event.toggleitem");
|
||||
}
|
||||
var navnode = $(".nav-tabs ul li a[node-url='" + url + "']");
|
||||
if (navnode.size() > 0) {
|
||||
navnode.trigger("click");
|
||||
} else {
|
||||
//追加新的tab
|
||||
var id = Math.floor(new Date().valueOf() * Math.random());
|
||||
icon = typeof icon != 'undefined' ? icon : 'fa fa-circle-o';
|
||||
title = typeof title != 'undefined' ? title : '';
|
||||
top.window.$("<a />").append('<i class="' + icon + '"></i> <span>' + title + '</span>').prop("href", url).attr({url: url, addtabs: id}).appendTo(top.window.document.body).trigger("click");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
success: function (options, callback) {
|
||||
var type = typeof options === 'function';
|
||||
if (type) {
|
||||
|
|
@ -309,13 +342,17 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($
|
|||
},
|
||||
init: function () {
|
||||
//公共代码
|
||||
//配置Toastr的参数
|
||||
Toastr.options = Backend.config.toastr;
|
||||
//点击包含.btn-dialog的元素时弹出dialog
|
||||
$(document).on('click', '.btn-dialog', function (e) {
|
||||
$(document).on('click', '.btn-dialog,.dialogit', function (e) {
|
||||
Backend.api.open(Backend.api.fixurl($(this).attr('href')), $(this).attr('title'));
|
||||
e.preventDefault();
|
||||
});
|
||||
//支持data-bind-url方式进行渲染select元素
|
||||
|
||||
$(document).on('click', '.btn-addtabs,.addtabsit', function (e) {
|
||||
Backend.api.addtabs($(this).attr("href"), $(this).attr("title"));
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
};
|
||||
//将Layer暴露到全局中去
|
||||
|
|
@ -326,9 +363,9 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($
|
|||
window.__ = Backend.lang;
|
||||
//将Backend渲染至全局,以便于在子框架中调用
|
||||
window.Backend = Backend;
|
||||
//Toastr定义
|
||||
Toastr.options = Backend.config.toastr;
|
||||
|
||||
//将Moment方法暴露到全局中去
|
||||
window.Moment = Moment;
|
||||
|
||||
Backend.init();
|
||||
return Backend;
|
||||
});
|
||||
|
|
@ -33,7 +33,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
|
|||
{field: 'ismenu', title: __('Ismenu'), align: 'left'},
|
||||
{field: 'weigh', title: __('Weigh')},
|
||||
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status},
|
||||
{field: 'id', title: '<a href="javascript:;" class="btn btn-primary btn-xs btn-toggle"><i class="fa fa-chevron-down"></i></a>', formatter: Controller.api.formatter.subnode},
|
||||
{field: 'id', title: '<a href="javascript:;" class="btn btn-primary btn-xs btn-toggle"><i class="fa fa-chevron-down"></i></a>', operate: false, formatter: Controller.api.formatter.subnode},
|
||||
{field: 'operate', title: __('Operate'), events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
|
|
@ -93,7 +93,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
|
|||
Form.api.bindevent($("form[role=form]"));
|
||||
$(document).on('click', ".btn-search-icon", function () {
|
||||
if (iconlist.length == 0) {
|
||||
$.get(requirejs.s.contexts._.config.config.config.site.cdnurl + "/assets/libs/font-awesome/less/variables.less", function (ret) {
|
||||
$.get(Config.site.cdnurl + "/assets/libs/font-awesome/less/variables.less", function (ret) {
|
||||
var exp = /fa-var-(.*):/ig;
|
||||
var result;
|
||||
while ((result = exp.exec(ret)) != null) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,103 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'example/bootstraptable/index',
|
||||
add_url: '',
|
||||
edit_url: '',
|
||||
del_url: 'example/bootstraptable/del',
|
||||
multi_url: '',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true, },
|
||||
{field: 'id', title: 'ID', operate: false},
|
||||
//使用Table.api.formatter.search可直接响应搜索
|
||||
{field: 'username', title: __('Username'), formatter: Table.api.formatter.search},
|
||||
{field: 'title', title: __('Title')},
|
||||
{field: 'url', title: __('Url'), align: 'left', formatter: Controller.api.formatter.url},
|
||||
//点击IP时同时执行搜索此IP
|
||||
{field: 'ip', title: __('IP'), events: Controller.api.events.ip, formatter: Controller.api.formatter.ip},
|
||||
//browser是一个不存在的字段
|
||||
//通过formatter来渲染数据,同时为它添加上事件
|
||||
{field: 'browser', title: __('Browser'), operate: false, events: Controller.api.events.browser, formatter: Controller.api.formatter.browser},
|
||||
{field: 'createtime', title: __('Create time'), formatter: Table.api.formatter.datetime, operate: 'BETWEEN', type: 'datetime', addclass: 'datetimepicker', data: 'data-date-format="YYYY-MM-DD HH:mm:ss"'},
|
||||
//我们向操作栏额外添加上一个详情按钮,并保留已有的编辑和删除控制,同时为这个按钮添加上点击事件
|
||||
{field: 'operate', title: __('Operate'), events: Controller.api.events.operate, formatter: Controller.api.formatter.operate}
|
||||
],
|
||||
],
|
||||
//禁用默认搜索
|
||||
search: false,
|
||||
//启用普通表单搜索
|
||||
commonSearch: true,
|
||||
//可以控制是否默认显示搜索单表,false则隐藏,默认为true
|
||||
searchFormVisible: true
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
formatter: {
|
||||
url: function (value, row, index) {
|
||||
return '<div class="input-group input-group-sm" style="width:250px;"><input type="text" class="form-control input-sm" value="' + value + '"><span class="input-group-btn input-group-sm"><a href="' + value + '" target="_blank" class="btn btn-default btn-sm"><i class="fa fa-link"></i></a></span></div>';
|
||||
},
|
||||
ip: function (value, row, index) {
|
||||
return '<a class="btn btn-xs btn-ip bg-success"><i class="fa fa-map-marker"></i> ' + value + '</a>';
|
||||
},
|
||||
browser: function (value, row, index) {
|
||||
//这里我们直接使用row的数据
|
||||
return '<a class="btn btn-xs btn-browser">' + row.useragent.split(" ")[0] + '</a>';
|
||||
},
|
||||
operate: function (value, row, index) {
|
||||
//返回字符串加上Table.api.formatter.operate的结果
|
||||
//默认需要按需显示排序/编辑/删除按钮,则需要在Table.api.formatter.operate将table传入
|
||||
//传入了table以后如果edit_url为空则不显示编辑按钮,如果del_url为空则不显显删除按钮
|
||||
return '<a class="btn btn-info btn-xs btn-detail">' + __('Detail') + '</a> '
|
||||
+ Table.api.formatter.operate(value, row, index, $("#table"));
|
||||
},
|
||||
},
|
||||
events: {
|
||||
ip: {
|
||||
'click .btn-ip': function (e, value, row, index) {
|
||||
var options = $("#table").bootstrapTable('getOptions');
|
||||
//这里我们手动将数据填充到表单然后提交
|
||||
$("#commonSearchContent_" + options.idTable + " form input[name='ip']").val(value);
|
||||
$("#commonSearchContent_" + options.idTable + " form").trigger('submit');
|
||||
Toastr.info("执行了自定义搜索操作");
|
||||
}
|
||||
},
|
||||
browser: {
|
||||
'click .btn-browser': function (e, value, row, index) {
|
||||
Layer.alert("该行数据为: <code>" + JSON.stringify(row) + "</code>");
|
||||
}
|
||||
},
|
||||
operate: $.extend({
|
||||
'click .btn-detail': function (e, value, row, index) {
|
||||
Backend.api.open('example/bootstraptable/detail/ids/' + row['id'], __('Detail'));
|
||||
}
|
||||
}, Table.api.events.operate)
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'example/colorbadge/index',
|
||||
add_url: '',
|
||||
edit_url: '',
|
||||
del_url: 'example/colorbadge/del',
|
||||
multi_url: '',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true, },
|
||||
{field: 'id', title: 'ID'},
|
||||
{field: 'title', title: __('Title')},
|
||||
{field: 'ip', title: __('IP')},
|
||||
{field: 'createtime', title: __('Create time'), formatter: Table.api.formatter.datetime},
|
||||
{field: 'operate', title: __('Operate'), events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
],
|
||||
onLoadSuccess: function (data) {
|
||||
// 在表格第次加载成功后,刷新左侧菜单栏彩色小角标,支持一次渲染多个
|
||||
// 如果需要在进入后台即显示左侧的彩色小角标,请使用服务端渲染方式,详情修改application/admin/controller/Index.php
|
||||
Backend.api.sidebar({
|
||||
'example/colorbadge': data.total
|
||||
});
|
||||
Toastr.info("左侧角标已经刷新成功");
|
||||
}
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
edit: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'example/controllerjump/index',
|
||||
add_url: '',
|
||||
edit_url: '',
|
||||
del_url: 'example/controllerjump/del',
|
||||
multi_url: '',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true, },
|
||||
{field: 'id', title: 'ID'},
|
||||
{field: 'admin_id', title: __('Admin_id')},
|
||||
{field: 'title', title: __('Title')},
|
||||
{field: 'ip', title: __('IP'), formatter: Controller.api.formatter.ip},
|
||||
{field: 'createtime', title: __('Create time'), formatter: Table.api.formatter.datetime},
|
||||
{field: 'operate', title: __('Operate'), events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
edit: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
api: {
|
||||
formatter: {
|
||||
ip: function (value, row, index) {
|
||||
//这里手动构造URL
|
||||
url = "example/bootstraptable?" + this.field + "=" + value;
|
||||
|
||||
//方式一,直接返回class带有addtabsit的链接,这可以方便自定义显示内容
|
||||
return '<a href="' + url + '" class="label label-success addtabsit" title="' + __("Search %s", value) + '">' + __('Search %s', value) + '</a>';
|
||||
|
||||
//方式二,直接调用Table.api.formatter.addtabs
|
||||
return Table.api.formatter.addtabs(value, row, index, url);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
$("#cxselect-example .col-xs-12").each(function () {
|
||||
$("textarea", this).val($(this).prev().prev().html().replace(/[ ]{2}/g, ''));
|
||||
});
|
||||
|
||||
//这里需要手动为Form绑定上元素事件
|
||||
Form.api.bindevent($("form#cxselectform"));
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init();
|
||||
|
||||
// 表格1
|
||||
var table1 = $("#table1").bootstrapTable({
|
||||
url: 'general/configvalue/index',
|
||||
extend: {
|
||||
index_url: 'general/configvalue/index',
|
||||
add_url: 'general/configvalue/add',
|
||||
edit_url: 'general/configvalue/edit',
|
||||
del_url: 'general/configvalue/del',
|
||||
multi_url: 'general/configvalue/multi',
|
||||
table: 'configvalue',
|
||||
},
|
||||
toolbar: '#toolbar1',
|
||||
sortName: 'weigh',
|
||||
search: false,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true, },
|
||||
{field: 'id', title: 'ID'},
|
||||
{field: 'name', title: __('Name')},
|
||||
{field: 'weigh', title: __('Weigh')},
|
||||
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status},
|
||||
{field: 'operate', title: __('Operate'), events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格1绑定事件
|
||||
Table.api.bindevent(table1);
|
||||
|
||||
// 表格2
|
||||
var table2 = $("#table2").bootstrapTable({
|
||||
url: 'general/crontab/index',
|
||||
extend: {
|
||||
index_url: 'general/crontab/index',
|
||||
add_url: 'general/crontab/add',
|
||||
edit_url: 'general/crontab/edit',
|
||||
del_url: 'general/crontab/del',
|
||||
multi_url: 'general/crontab/multi',
|
||||
table: 'crontab',
|
||||
},
|
||||
toolbar: '#toolbar2',
|
||||
sortName: 'weigh',
|
||||
search: false,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true, },
|
||||
{field: 'id', title: 'ID'},
|
||||
{field: 'type', title: __('Type')},
|
||||
{field: 'title', title: __('Title')},
|
||||
{field: 'maximums', title: __('Maximums')},
|
||||
{field: 'executes', title: __('Executes')},
|
||||
{field: 'begintime', title: __('Begin time'), formatter: Table.api.formatter.datetime},
|
||||
{field: 'endtime', title: __('End time'), formatter: Table.api.formatter.datetime},
|
||||
{field: 'executetime', title: __('Execute time'), formatter: Table.api.formatter.datetime},
|
||||
{field: 'weigh', title: __('Weigh')},
|
||||
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status},
|
||||
{field: 'operate', title: __('Operate'), events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格2绑定事件
|
||||
Table.api.bindevent(table2);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'example/relationmodel/index',
|
||||
add_url: '',
|
||||
edit_url: '',
|
||||
del_url: 'example/relationmodel/del',
|
||||
multi_url: '',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true, },
|
||||
{field: 'id', title: 'ID', operate: '='},
|
||||
{field: 'title', title: __('Title'), operate: 'LIKE %...%', placeholder: '关键字,模糊搜索'},
|
||||
{field: 'admin.avatar', title: __('Avatar'), operate: false, formatter: Table.api.formatter.image},
|
||||
{field: 'admin.username', title: __('Username'), operate: '='},
|
||||
{field: 'admin.nickname', title: __('Nickname'), operate: 'LIKE %...%', placeholder: '关键字,模糊搜索'},
|
||||
{field: 'ip', title: __('IP'), operate: '='},
|
||||
{field: 'createtime', title: __('Create time'), formatter: Table.api.formatter.datetime, operate: 'BETWEEN', type: 'datetime', addclass: 'datetimepicker', data: 'data-date-format="YYYY-MM-DD"'},
|
||||
{field: 'operate', title: __('Operate'), events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
],
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
edit: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'form', 'table', 'config'], function ($, undefined, Backend, Form, Table, Config) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefined, Backend, Form, Table) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'upload'], function ($, undefined, Backend, Table, Form, Upload) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
|
|
@ -26,8 +26,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
[
|
||||
{field: 'id', title: 'ID'},
|
||||
{field: 'title', title: __('Title')},
|
||||
{field: 'content', title: __('Content'), align: 'left'},
|
||||
{field: 'url', title: __('Url'), formatter: Table.api.formatter.url},
|
||||
{field: 'url', title: __('Url'), align: 'left', formatter: Table.api.formatter.url},
|
||||
{field: 'ip', title: __('ip')},
|
||||
{field: 'username', title: __('Userame')},
|
||||
{field: 'createtime', title: __('Createtime'), formatter: Table.api.formatter.datetime},
|
||||
]
|
||||
|
|
@ -39,8 +39,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
|
||||
Form.api.bindevent($("#update-form"), null, function () {
|
||||
$("input[name='row[password]']").val('');
|
||||
var url = Config.upload.cdnurl + $("#c-avatar").val();
|
||||
top.window.$(".user-panel .image img,.user-menu > a > img,.user-header > img").prop("src", url);
|
||||
return true;
|
||||
});
|
||||
Upload.api.custom.changeavatar = function (response) {
|
||||
var url = Config.upload.cdnurl + response.url;
|
||||
$(".profile-user-img").prop("src", url);
|
||||
};
|
||||
console.log(Upload);
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'validator'], function ($, undefined, Backend, undefined, AdminLTE, Form, Validator) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], function ($, undefined, Backend, undefined, AdminLTE, Form) {
|
||||
var Controller = {
|
||||
index: function () {
|
||||
//窗口大小改变,修正主窗体最小高度
|
||||
|
|
@ -83,7 +83,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'validator'], f
|
|||
});
|
||||
|
||||
//切换左侧sidebar显示隐藏
|
||||
$(document).on("click", ".sidebar-menu li > a", function (e) {
|
||||
$(document).on("click fa.event.toggleitem", ".sidebar-menu li > a", function (e) {
|
||||
$(".sidebar-menu li").removeClass("active");
|
||||
//当外部触发隐藏的a时,触发父辈a的事件
|
||||
if (!$(this).closest("ul").is(":visible")) {
|
||||
|
|
@ -141,11 +141,10 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'validator'], f
|
|||
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
|
||||
$(".tab-addtabs").addClass("ios-iframe-fix");
|
||||
}
|
||||
|
||||
if (location.hash.indexOf("#!") === 0) {
|
||||
var url = decodeURIComponent(location.hash.substring(2));
|
||||
//刷新页面后将左侧对应的LI展开
|
||||
$("ul.sidebar-menu a[href='" + url + "']").trigger("click");
|
||||
|
||||
if (Config.referer) {
|
||||
//刷新页面后跳到到刷新前的页面
|
||||
Backend.api.addtabs(Config.referer);
|
||||
} else {
|
||||
$("ul.sidebar-menu li.active a").trigger("click");
|
||||
}
|
||||
|
|
@ -205,7 +204,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'validator'], f
|
|||
|
||||
$("body").addClass(cls);
|
||||
store('skin', cls);
|
||||
var cssfile = requirejs.s.contexts._.config.config.config.upload.cdnurl + "/assets/css/skins/" + cls + ".css";
|
||||
var cssfile = Config.upload.cdnurl + "/assets/css/skins/" + cls + ".css";
|
||||
$('head').append('<link rel="stylesheet" href="' + cssfile + '" type="text/css" />');
|
||||
}
|
||||
return false;
|
||||
|
|
@ -323,26 +322,8 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'validator'], f
|
|||
$(window).resize();
|
||||
},
|
||||
login: function () {
|
||||
|
||||
$("#login-form").validator({
|
||||
timely: 2, theme: 'yellow_right_effect',
|
||||
fields: {
|
||||
username: "required",
|
||||
password: "required",
|
||||
},
|
||||
valid: function (form) {
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: 'ajax/dailybg',
|
||||
dataType: 'json',
|
||||
success: function (ret) {
|
||||
if (ret.code === 1) {
|
||||
$("body").css("background", "url(" + ret.data.url + ")");
|
||||
$("body").css("background-size", "cover");
|
||||
}
|
||||
}
|
||||
Form.api.bindevent($("#login-form"), null, function () {
|
||||
location.href = Backend.api.fixurl("index/index");
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'state', checkbox: true},
|
||||
{field: 'id', title: __('Id'), operate: false},
|
||||
{field: 'category_id', title: __('Category_id'), operate: '='},
|
||||
{field: 'title', title: __('Title'), operate: 'LIKE %...%', placeholder: '标题,模糊搜索,*表示任意字符', style: 'width:200px',
|
||||
{field: 'title', title: __('Title'),
|
||||
operate: 'LIKE %...%',
|
||||
placeholder: '标题,模糊搜索,*表示任意字符',
|
||||
style: 'width:200px',
|
||||
process: function (value, arg) {
|
||||
return value.replace(/\*/g, '%'); //仅演示用法
|
||||
}
|
||||
|
|
@ -37,9 +40,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'views', title: __('Views'), operate: false},
|
||||
{field: 'comments', title: __('Comments'), operate: false},
|
||||
{field: 'weigh', title: __('Weigh'), operate: false},
|
||||
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status, searchList: {'normal': '正常', 'hidden': '隐藏'}, style: 'min-width:100px;'},
|
||||
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status, searchList: {'normal': __('Normal'), 'hidden': __('Hidden')}, style: 'min-width:100px;'},
|
||||
{field: 'createtime', title: __('Create Time'), formatter: Table.api.formatter.datetime, operate: 'BETWEEN', type: 'datetime', addclass: 'datetimepicker', data: 'data-date-format="YYYY-MM-DD"'},
|
||||
{field: 'operate', title: __('Operate'), events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{field: 'operate', title: __('Operate'), events: Controller.api.events.operate, formatter: Controller.api.formatter.operate}
|
||||
]
|
||||
],
|
||||
//普通搜索
|
||||
|
|
@ -80,6 +83,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
},
|
||||
});
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
formatter: {
|
||||
operate: function (value, row, index) {
|
||||
return '<a class="btn btn-info btn-xs btn-detail">' + __('Detail') + '</a> ' + Table.api.formatter.operate(value, row, index);
|
||||
},
|
||||
},
|
||||
events: {
|
||||
operate: $.extend({
|
||||
'click .btn-detail': function (e, value, row, index) {
|
||||
Backend.api.open("page/detail/" + value, __('Detail'));
|
||||
}
|
||||
}, Table.api.events.operate)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,306 +0,0 @@
|
|||
/**
|
||||
* @author: aperez <aperez@datadec.es>
|
||||
* @version: v2.0.0
|
||||
*
|
||||
* @update Dennis Hernández <http://djhvscf.github.io/Blog>
|
||||
*/
|
||||
|
||||
!function ($) {
|
||||
'use strict';
|
||||
|
||||
var firstLoad = false;
|
||||
|
||||
var sprintf = $.fn.bootstrapTable.utils.sprintf;
|
||||
|
||||
var showAvdSearch = function (pColumns, that) {
|
||||
var searchTitle = that.options.formatAdvancedSearch();
|
||||
if (!$("#avdSearchModal" + "_" + that.options.idTable).hasClass("modal")) {
|
||||
var vModal = sprintf("<div id=\"avdSearchModal%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">", "_" + that.options.idTable);
|
||||
vModal += "<div class=\"modal-dialog modal-xs\">";
|
||||
vModal += " <div class=\"modal-content\">";
|
||||
vModal += " <div class=\"modal-header\">";
|
||||
vModal += " <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" >×</button>";
|
||||
vModal += sprintf(" <h4 class=\"modal-title\">%s</h4>", searchTitle);
|
||||
vModal += " </div>";
|
||||
vModal += " <div class=\"modal-body modal-body-custom\">";
|
||||
vModal += sprintf(" <div class=\"container-fluid\" id=\"avdSearchModalContent%s\" style=\"padding-right: 0px;padding-left: 0px;\" >", "_" + that.options.idTable);
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += " <div class=\"modal-footer\">";
|
||||
vModal += createFormBtn(that).join('');
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += "</div>";
|
||||
|
||||
$("body").append($(vModal));
|
||||
|
||||
var vFormAvd = createFormAvd(pColumns, that),
|
||||
timeoutId = 0;
|
||||
;
|
||||
|
||||
$('#avdSearchModalContent' + "_" + that.options.idTable).append(vFormAvd.join(''));
|
||||
|
||||
|
||||
if (that.options.sidePagination != 'server' || !that.options.url) {
|
||||
$('#' + that.options.idForm).off('keyup blur', 'input').on('keyup blur', 'input', function (event) {
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(function () {
|
||||
that.onColumnAdvancedSearch(event);
|
||||
}, that.options.searchTimeOut);
|
||||
});
|
||||
} else {
|
||||
|
||||
}
|
||||
// 提交搜索
|
||||
$("#btnSubmitAvd" + "_" + that.options.idTable).click(function (event) {
|
||||
that.onColumnAdvancedSearch();
|
||||
});
|
||||
// 重置搜索
|
||||
$("#btnResetAvd" + "_" + that.options.idTable).click(function () {
|
||||
$("#avdSearchModal" + "_" + that.options.idTable + " form")[0].reset();
|
||||
that.onColumnAdvancedSearch();
|
||||
});
|
||||
|
||||
$("#avdSearchModal" + "_" + that.options.idTable).modal();
|
||||
} else {
|
||||
$("#avdSearchModal" + "_" + that.options.idTable).modal();
|
||||
}
|
||||
};
|
||||
|
||||
var createFormAvd = function (pColumns, that) {
|
||||
var htmlForm = [];
|
||||
var opList = ['=', '>', '>=', '<', '<=', '!=', 'LIKE', 'LIKE %...%', 'NOT LIKE', 'IN(...)', 'NOT IN(...)', 'BETWEEN', 'NOT BETWEEN', 'IS NULL', 'IS NOT NULL'];
|
||||
var selectList = [];
|
||||
for (var i = 0; i < opList.length; i++) {
|
||||
selectList.push("<option value='" + opList[i] + "'>" + opList[i] + "</option>");
|
||||
}
|
||||
var selectHtml = selectList.join('');
|
||||
htmlForm.push(sprintf('<form class="form-horizontal" id="%s" action="%s" >', that.options.idForm, that.options.actionForm));
|
||||
for (var i in pColumns) {
|
||||
var vObjCol = pColumns[i];
|
||||
if (!vObjCol.checkbox && vObjCol.field != 'operate' && vObjCol.visible && vObjCol.searchable) {
|
||||
htmlForm.push('<div class="form-group">');
|
||||
htmlForm.push(sprintf('<label class="col-sm-3 control-label">%s</label>', vObjCol.title));
|
||||
if (that.options.sidePagination == 'server' && that.options.url) {
|
||||
htmlForm.push('<div class="col-sm-2">');
|
||||
htmlForm.push(sprintf('<select class="form-control" name="field-%s" data-name="%s">%s</select>', vObjCol.field, vObjCol.field, selectHtml));
|
||||
htmlForm.push('</div>');
|
||||
}
|
||||
|
||||
htmlForm.push('<div class="col-sm-6">');
|
||||
if (vObjCol.searchList) {
|
||||
if (typeof vObjCol.searchList == 'function') {
|
||||
htmlForm.push(vObjCol.searchList.call(this, vObjCol));
|
||||
} else {
|
||||
var isArray = vObjCol.searchList.constructor === Array;
|
||||
var searchList = [];
|
||||
searchList.push(sprintf('<option value="">%s</option>', $.fn.bootstrapTable.locales.formatAdvancedChoose()));
|
||||
$.each(vObjCol.searchList, function (key, value) {
|
||||
searchList.push("<option value='" + (isArray ? value : key) + "'>" + value + "</option>");
|
||||
});
|
||||
htmlForm.push(sprintf('<select class="form-control" name="%s">%s</select>', vObjCol.field, searchList.join('')));
|
||||
}
|
||||
} else {
|
||||
htmlForm.push(sprintf('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">', vObjCol.field, vObjCol.title, vObjCol.field));
|
||||
}
|
||||
|
||||
htmlForm.push('</div>');
|
||||
htmlForm.push('</div>');
|
||||
}
|
||||
}
|
||||
|
||||
htmlForm.push('</form>');
|
||||
|
||||
return htmlForm;
|
||||
};
|
||||
|
||||
var createFormBtn = function (that) {
|
||||
var htmlBtn = [];
|
||||
var searchSubmit = that.options.formatAdvancedSubmitButton();
|
||||
var searchReset = that.options.formatAdvancedResetButton();
|
||||
var searchClose = that.options.formatAdvancedCloseButton();
|
||||
htmlBtn.push('<div class="form-group">');
|
||||
htmlBtn.push('<div class="col-sm-12 text-center">');
|
||||
if (that.options.sidePagination == 'server' && that.options.url) {
|
||||
htmlBtn.push(sprintf('<button type="button" id="btnSubmitAvd%s" class="btn btn-success" >%s</button> ', "_" + that.options.idTable, searchSubmit));
|
||||
htmlBtn.push(sprintf('<button type="button" id="btnResetAvd%s" class="btn btn-default" >%s</button> ', "_" + that.options.idTable, searchReset));
|
||||
} else {
|
||||
htmlBtn.push(sprintf('<button type="button" id="btnCloseAvd%s" data-dismiss="modal" class="btn btn-default" >%s</button> ', "_" + that.options.idTable, searchClose));
|
||||
}
|
||||
htmlBtn.push('</div>');
|
||||
htmlBtn.push('</div>');
|
||||
return htmlBtn;
|
||||
};
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, {
|
||||
advancedSearch: false,
|
||||
idForm: 'advancedSearch',
|
||||
actionForm: '',
|
||||
idTable: undefined,
|
||||
onColumnAdvancedSearch: function (field, text) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults.icons, {
|
||||
advancedSearchIcon: 'glyphicon-search'
|
||||
});
|
||||
|
||||
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
||||
'column-advanced-search.bs.table': 'onColumnAdvancedSearch'
|
||||
});
|
||||
$.extend($.fn.bootstrapTable.locales, {
|
||||
formatAdvancedSearch: function () {
|
||||
return 'Advanced search';
|
||||
},
|
||||
formatAdvancedSubmitButton: function () {
|
||||
return "Submit";
|
||||
},
|
||||
formatAdvancedResetButton: function () {
|
||||
return "Reset";
|
||||
},
|
||||
formatAdvancedCloseButton: function () {
|
||||
return "Close";
|
||||
},
|
||||
formatAdvancedChoose: function () {
|
||||
return "Choose";
|
||||
}
|
||||
});
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
|
||||
|
||||
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
||||
_initToolbar = BootstrapTable.prototype.initToolbar,
|
||||
_load = BootstrapTable.prototype.load,
|
||||
_initSearch = BootstrapTable.prototype.initSearch;
|
||||
|
||||
BootstrapTable.prototype.initToolbar = function () {
|
||||
_initToolbar.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.search) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.options.advancedSearch) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.options.idTable) {
|
||||
return;
|
||||
}
|
||||
|
||||
var that = this,
|
||||
html = [];
|
||||
|
||||
html.push(sprintf('<div class="columns columns-%s btn-group pull-%s" role="group">', this.options.buttonsAlign, this.options.buttonsAlign));
|
||||
html.push(sprintf('<button class="btn btn-default%s' + '" type="button" name="advancedSearch" title="%s">', that.options.iconSize === undefined ? '' : ' btn-' + that.options.iconSize, that.options.formatAdvancedSearch()));
|
||||
html.push(sprintf('<i class="%s %s"></i>', that.options.iconsPrefix, that.options.icons.advancedSearchIcon))
|
||||
html.push('</button></div>');
|
||||
|
||||
that.$toolbar.prepend(html.join(''));
|
||||
|
||||
that.$toolbar.find('button[name="advancedSearch"]')
|
||||
.off('click').on('click', function () {
|
||||
showAvdSearch(that.columns, that);
|
||||
});
|
||||
};
|
||||
|
||||
BootstrapTable.prototype.load = function (data) {
|
||||
_load.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.advancedSearch) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof this.options.idTable === 'undefined') {
|
||||
return;
|
||||
} else {
|
||||
if (!firstLoad) {
|
||||
var height = parseInt($(".bootstrap-table").height());
|
||||
height += 10;
|
||||
$("#" + this.options.idTable).bootstrapTable("resetView", {height: height});
|
||||
firstLoad = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
BootstrapTable.prototype.initSearch = function () {
|
||||
_initSearch.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.advancedSearch) {
|
||||
return;
|
||||
}
|
||||
|
||||
var that = this;
|
||||
var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
|
||||
this.data = fp ? $.grep(this.data, function (item, i) {
|
||||
for (var key in fp) {
|
||||
var fval = fp[key].toLowerCase();
|
||||
var value = item[key];
|
||||
value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header,
|
||||
that.header.formatters[$.inArray(key, that.header.fields)],
|
||||
[value, item, i], value);
|
||||
|
||||
if (!($.inArray(key, that.header.fields) !== -1 &&
|
||||
(typeof value === 'string' || typeof value === 'number') &&
|
||||
(value + '').toLowerCase().indexOf(fval) !== -1)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}) : this.data;
|
||||
};
|
||||
|
||||
BootstrapTable.prototype.onColumnAdvancedSearch = function (event) {
|
||||
if (typeof event == 'undefined') {
|
||||
var op = {};
|
||||
var filter = {};
|
||||
$("#avdSearchModalContent_" + this.options.idTable + " select").each(function () {
|
||||
var name = $(this).data("name");
|
||||
var sym = $(this).val();
|
||||
var obj = $("[name='" + name + "']");
|
||||
if (obj.size() == 0)
|
||||
return true;
|
||||
var value = obj.size() > 1 ? $("[name='" + name + "']:checked").val() : obj.val();
|
||||
if (value == '' && sym.indexOf("NULL") == -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
op[name] = sym;
|
||||
filter[name] = value;
|
||||
});
|
||||
// 追加查询关键字
|
||||
this.options.pageNumber = 1;
|
||||
this.options.queryParams = function (params) {
|
||||
return {
|
||||
search: params.search,
|
||||
sort: params.sort,
|
||||
order: params.order,
|
||||
filter: JSON.stringify(filter),
|
||||
op: JSON.stringify(op),
|
||||
offset: params.offset,
|
||||
limit: params.limit,
|
||||
};
|
||||
};
|
||||
this.refresh({query: {filter: JSON.stringify(filter), op: JSON.stringify(op)}});
|
||||
|
||||
} else {
|
||||
var text = $.trim($(event.currentTarget).val());
|
||||
var $field = $(event.currentTarget)[0].id;
|
||||
|
||||
if ($.isEmptyObject(this.filterColumnsPartial)) {
|
||||
this.filterColumnsPartial = {};
|
||||
}
|
||||
if (text) {
|
||||
this.filterColumnsPartial[$field] = text;
|
||||
} else {
|
||||
delete this.filterColumnsPartial[$field];
|
||||
}
|
||||
this.options.pageNumber = 1;
|
||||
this.onSearch(event);
|
||||
// this.updatePagination();
|
||||
this.trigger('column-advanced-search', $field, text);
|
||||
}
|
||||
};
|
||||
}(jQuery);
|
||||
|
|
@ -12,27 +12,19 @@
|
|||
|
||||
var sprintf = $.fn.bootstrapTable.utils.sprintf;
|
||||
|
||||
var showCommonSearch = function (pColumns, that) {
|
||||
|
||||
var initCommonSearch = function (pColumns, that) {
|
||||
var vFormCommon = createFormCommon(pColumns, that), timeoutId = 0;
|
||||
|
||||
var vModal = sprintf("<div id=\"commonSearchModalContent_%s\" class=\"common-search-table\">", that.options.idTable);
|
||||
var vModal = sprintf("<div id=\"commonSearchContent_%s\" class=\"common-search-table %s\">", that.options.idTable, that.options.searchFormVisible ? "" : "hidden");
|
||||
vModal += vFormCommon.join('');
|
||||
vModal += "</div>";
|
||||
$("#myTabContent").before($(vModal));
|
||||
|
||||
if (that.options.sidePagination != 'server' || !that.options.url) {
|
||||
$('#' + that.options.idForm).off('keyup blur', 'input').on('keyup blur', 'input', function (event) {
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(function () {
|
||||
that.onColumnCommonSearch(event);
|
||||
}, that.options.searchTimeOut);
|
||||
});
|
||||
}
|
||||
var form = $("#commonSearchForm" + "_" + that.options.idTable);
|
||||
|
||||
//绑定日期时间元素事件
|
||||
var form = $("#" + that.options.idForm);
|
||||
if ($(".datetimepicker", form).size() > 0) {
|
||||
|
||||
require(['bootstrap-datetimepicker'], function () {
|
||||
$('.datetimepicker', form).parent().css('position', 'relative');
|
||||
$('.datetimepicker', form).datetimepicker({
|
||||
|
|
@ -54,14 +46,15 @@
|
|||
});
|
||||
}
|
||||
|
||||
// 提交搜索
|
||||
$("#btnSubmitCommon" + "_" + that.options.idTable).click(function (event) {
|
||||
// 表单提交
|
||||
form.on("submit", function (event) {
|
||||
that.onColumnCommonSearch();
|
||||
return false;
|
||||
});
|
||||
|
||||
// 重置搜索
|
||||
$("#btnResetCommon" + "_" + that.options.idTable).click(function () {
|
||||
$("#commonSearchModalContent" + "_" + that.options.idTable + " form")[0].reset();
|
||||
form.on("click", "#btnResetCommon" + "_" + that.options.idTable, function (event) {
|
||||
form[0].reset();
|
||||
that.onColumnCommonSearch();
|
||||
});
|
||||
|
||||
|
|
@ -70,28 +63,24 @@
|
|||
var createFormCommon = function (pColumns, that) {
|
||||
var htmlForm = [];
|
||||
var opList = ['=', '>', '>=', '<', '<=', '!=', 'LIKE', 'LIKE %...%', 'NOT LIKE', 'IN(...)', 'NOT IN(...)', 'BETWEEN', 'NOT BETWEEN', 'IS NULL', 'IS NOT NULL'];
|
||||
//var selectList = [];
|
||||
//for (var i = 0; i < opList.length; i++) {
|
||||
// selectList.push("<option value='" + opList[i] + "'>" + opList[i] + "</option>");
|
||||
//}
|
||||
//var selectHtml = selectList.join('');
|
||||
htmlForm.push(sprintf('<form class="form-inline" id="%s" action="%s" >', that.options.idForm, that.options.actionForm));
|
||||
htmlForm.push(sprintf('<form class="form-inline" id="commonSearchForm_%s" action="%s" >', that.options.idTable, that.options.actionForm));
|
||||
htmlForm.push('<fieldset>');
|
||||
if (that.options.titleForm.length > 0)
|
||||
htmlForm.push(sprintf("<legend>%s</legend>", that.options.titleForm));
|
||||
for (var i in pColumns) {
|
||||
var vObjCol = pColumns[i];
|
||||
if (!vObjCol.checkbox && vObjCol.field !== 'operate' && vObjCol.searchable && vObjCol.operate !== false) {
|
||||
var query = Backend.api.query(vObjCol.field);
|
||||
query = query ? query : '';
|
||||
vObjCol.defaultValue = that.options.renderDefault && query != '' ? query : (typeof vObjCol.defaultValue === 'undefined' ? '' : vObjCol.defaultValue);
|
||||
ColumnsForSearch.push(vObjCol);
|
||||
htmlForm.push('<div class="form-group" style="margin:5px">');
|
||||
htmlForm.push(sprintf('<label for="%s" class="control-label" style="padding:0 10px">%s</label>', vObjCol.field, vObjCol.title));
|
||||
if (that.options.sidePagination == 'server' && that.options.url) {
|
||||
//htmlForm.push('<div class="col-sm-2">');
|
||||
//htmlForm.push(sprintf('<select class="form-control" name="field-%s" data-name="%s">%s</select>', vObjCol.field, vObjCol.field, selectHtml));
|
||||
vObjCol.operate = (typeof vObjCol.operate === 'undefined' || $.inArray(vObjCol.operate, opList) === -1) ? '=' : vObjCol.operate;
|
||||
htmlForm.push(sprintf('<input type="hidden" class="form-control operate" name="field-%s" data-name="%s" value="%s" readonly>', vObjCol.field, vObjCol.field, vObjCol.operate));
|
||||
//htmlForm.push('</div>');
|
||||
}
|
||||
//htmlForm.push('<div class="col-sm-2">');
|
||||
//htmlForm.push(sprintf('<select class="form-control" name="field-%s" data-name="%s">%s</select>', vObjCol.field, vObjCol.field, selectHtml));
|
||||
vObjCol.operate = (typeof vObjCol.operate === 'undefined' || $.inArray(vObjCol.operate, opList) === -1) ? '=' : vObjCol.operate;
|
||||
htmlForm.push(sprintf('<input type="hidden" class="form-control operate" name="field-%s" data-name="%s" value="%s" readonly>', vObjCol.field, vObjCol.field, vObjCol.operate));
|
||||
//htmlForm.push('</div>');
|
||||
|
||||
//htmlForm.push('<div class="col-sm-8">');
|
||||
var style = typeof vObjCol.style === 'undefined' ? '' : sprintf('style="%s"', vObjCol.style);
|
||||
|
|
@ -103,7 +92,8 @@
|
|||
var searchList = [];
|
||||
searchList.push(sprintf('<option value="">%s</option>', $.fn.bootstrapTable.locales.formatCommonChoose()));
|
||||
$.each(vObjCol.searchList, function (key, value) {
|
||||
searchList.push("<option value='" + (isArray ? value : key) + "'>" + value + "</option>");
|
||||
var isSelect = (isArray ? value : key) === vObjCol.defaultValue ? 'selected' : '';
|
||||
searchList.push(sprintf("<option value='" + (isArray ? value : key) + "' %s>" + value + "</option>", isSelect));
|
||||
});
|
||||
htmlForm.push(sprintf('<select class="form-control" name="%s" %s>%s</select>', vObjCol.field, style, searchList.join('')));
|
||||
}
|
||||
|
|
@ -112,10 +102,13 @@
|
|||
var type = typeof vObjCol.type === 'undefined' ? 'text' : vObjCol.type;
|
||||
var addclass = typeof vObjCol.addclass === 'undefined' ? 'form-control' : 'form-control ' + vObjCol.addclass;
|
||||
var data = typeof vObjCol.data === 'undefined' ? '' : vObjCol.data;
|
||||
htmlForm.push(sprintf('<input type="%s" class="%s" name="%s" placeholder="%s" id="%s" %s %s>', type, addclass, vObjCol.field, placeholder, vObjCol.field, style, data));
|
||||
var reg = /BETWEEN$/;
|
||||
if (reg.test(vObjCol.operate)) {
|
||||
htmlForm.push(sprintf(' - <input type="%s" class="%s" name="%s" placeholder="%s" id="%s" %s %s>', type, addclass, vObjCol.field, placeholder, vObjCol.field, style, data));
|
||||
var defaultValue = typeof vObjCol.defaultValue === 'undefined' ? '' : vObjCol.defaultValue;
|
||||
if (/BETWEEN$/.test(vObjCol.operate)) {
|
||||
var defaultValueArr = /^.+|.+$/.test(defaultValue) ? defaultValue.split('|') : ['', ''];
|
||||
htmlForm.push(sprintf('<input type="%s" class="%s" name="%s" value="%s" placeholder="%s" id="%s" %s %s>', type, addclass, vObjCol.field, defaultValueArr[0], placeholder, vObjCol.field, style, data));
|
||||
htmlForm.push(sprintf(' - <input type="%s" class="%s" name="%s" value="%s" placeholder="%s" id="%s" %s %s>', type, addclass, vObjCol.field, defaultValueArr[1], placeholder, vObjCol.field, style, data));
|
||||
} else {
|
||||
htmlForm.push(sprintf('<input type="%s" class="%s" name="%s" value="%s" placeholder="%s" id="%s" %s %s>', type, addclass, vObjCol.field, defaultValue, placeholder, vObjCol.field, style, data));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -135,26 +128,80 @@
|
|||
var htmlBtn = [];
|
||||
var searchSubmit = that.options.formatCommonSubmitButton();
|
||||
var searchReset = that.options.formatCommonResetButton();
|
||||
var searchClose = that.options.formatCommonCloseButton();
|
||||
htmlBtn.push('<div class="form-group" style="margin:5px">');
|
||||
htmlBtn.push('<div class="col-sm-12 text-center">');
|
||||
if (that.options.sidePagination == 'server' && that.options.url) {
|
||||
htmlBtn.push(sprintf('<button type="button" id="btnSubmitCommon%s" class="btn btn-success" >%s</button> ', "_" + that.options.idTable, searchSubmit));
|
||||
htmlBtn.push(sprintf('<button type="button" id="btnResetCommon%s" class="btn btn-default" >%s</button> ', "_" + that.options.idTable, searchReset));
|
||||
} else {
|
||||
htmlBtn.push(sprintf('<button type="button" id="btnCloseCommon%s" data-dismiss="modal" class="btn btn-default" >%s</button> ', "_" + that.options.idTable, searchClose));
|
||||
}
|
||||
htmlBtn.push(sprintf('<button type="submit" id="btnSubmitCommon%s" class="btn btn-success" >%s</button> ', "_" + that.options.idTable, searchSubmit));
|
||||
htmlBtn.push(sprintf('<button type="button" id="btnResetCommon%s" class="btn btn-default" >%s</button> ', "_" + that.options.idTable, searchReset));
|
||||
htmlBtn.push('</div>');
|
||||
htmlBtn.push('</div>');
|
||||
return htmlBtn;
|
||||
};
|
||||
|
||||
var isSearchAvailble = function (that) {
|
||||
console.log('isSearchAvailble');
|
||||
//只支持服务端搜索
|
||||
if (!that.options.commonSearch || that.options.sidePagination != 'server' || !that.options.url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!that.options.idTable) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
var getSearchQuery = function (that) {
|
||||
var op = {};
|
||||
var filter = {};
|
||||
$("#commonSearchContent_" + that.options.idTable + " input.operate").each(function (i) {
|
||||
var name = $(this).data("name");
|
||||
var sym = $(this).val();
|
||||
var obj = $("[name='" + name + "']");
|
||||
if (obj.size() == 0)
|
||||
return true;
|
||||
var vObjCol = ColumnsForSearch[i];
|
||||
if (obj.size() > 1) {
|
||||
if (/BETWEEN$/.test(sym)) {
|
||||
var value_begin = $.trim($("[name='" + name + "']:first").val()), value_end = $.trim($("[name='" + name + "']:last").val());
|
||||
if (!value_begin.length || !value_end.length) {
|
||||
return true;
|
||||
}
|
||||
if (typeof vObjCol.process === 'function') {
|
||||
value_begin = vObjCol.process(value_begin, 'begin');
|
||||
value_end = vObjCol.process(value_end, 'end');
|
||||
} else if ($("[name='" + name + "']:first").attr('type') === 'datetime') { //datetime类型字段转换成时间戳
|
||||
var Hms = Moment(value_begin).format("HH:mm:ss");
|
||||
value_begin = parseInt(Moment(value_begin) / 1000);
|
||||
value_end = parseInt(Moment(value_end) / 1000);
|
||||
if (value_begin === value_end && '00:00:00' === Hms) {
|
||||
value_end += 86399;
|
||||
}
|
||||
}
|
||||
var value = value_begin + ',' + value_end;
|
||||
} else {
|
||||
var value = $("[name='" + name + "']:checked").val();
|
||||
}
|
||||
} else {
|
||||
var value = (typeof vObjCol.process === 'function') ? vObjCol.process(obj.val()) : obj.val();
|
||||
}
|
||||
if (value == '' && sym.indexOf("NULL") == -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
op[name] = sym;
|
||||
filter[name] = value;
|
||||
});
|
||||
return {op: op, filter: filter};
|
||||
};
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, {
|
||||
commonSearch: false,
|
||||
idForm: 'commonSearch',
|
||||
titleForm: "Common search",
|
||||
actionForm: '',
|
||||
actionForm: "",
|
||||
idTable: undefined,
|
||||
searchFormVisible: true,
|
||||
searchClass: 'searchit',
|
||||
renderDefault: true,
|
||||
onColumnCommonSearch: function (field, text) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -196,46 +243,68 @@
|
|||
BootstrapTable.prototype.initToolbar = function () {
|
||||
_initToolbar.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.search) {
|
||||
if (!isSearchAvailble(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.options.commonSearch) {
|
||||
var that = this,
|
||||
html = [];
|
||||
html.push(sprintf('<div class="columns-%s pull-%s" style="margin-top:10px;">', this.options.buttonsAlign, this.options.buttonsAlign));
|
||||
html.push(sprintf('<button class="btn btn-default%s' + '" type="button" name="commonSearch" title="%s">', that.options.iconSize === undefined ? '' : ' btn-' + that.options.iconSize, that.options.formatCommonSearch()));
|
||||
html.push(sprintf('<i class="%s %s"></i>', that.options.iconsPrefix, that.options.icons.commonSearchIcon))
|
||||
html.push('</button></div>');
|
||||
|
||||
that.$toolbar.prepend(html.join(''));
|
||||
|
||||
initCommonSearch(that.columns, that);
|
||||
|
||||
var searchContainer = $("#commonSearchContent_" + that.options.idTable);
|
||||
|
||||
that.$toolbar.find('button[name="commonSearch"]')
|
||||
.off('click').on('click', function () {
|
||||
searchContainer.toggleClass("hidden");
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
if (!this.options.idTable) {
|
||||
return;
|
||||
}
|
||||
that.$container.on("click", "." + that.options.searchClass, function () {
|
||||
$("form [name='" + $(this).data("field") + "']", searchContainer).val($(this).data("value"));
|
||||
$("form", searchContainer).trigger("submit");
|
||||
});
|
||||
|
||||
var searchquery = getSearchQuery(this);
|
||||
this.options.queryParams = function (params) {
|
||||
return {
|
||||
search: params.search,
|
||||
sort: params.sort,
|
||||
order: params.order,
|
||||
filter: JSON.stringify(searchquery.filter),
|
||||
op: JSON.stringify(searchquery.op),
|
||||
offset: params.offset,
|
||||
limit: params.limit,
|
||||
};
|
||||
};
|
||||
|
||||
var that = this;
|
||||
|
||||
showCommonSearch(that.columns, that);
|
||||
};
|
||||
|
||||
BootstrapTable.prototype.load = function (data) {
|
||||
_load.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.commonSearch) {
|
||||
if (!isSearchAvailble(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof this.options.idTable === 'undefined') {
|
||||
return;
|
||||
} else {
|
||||
if (!firstLoad) {
|
||||
var height = parseInt($(".bootstrap-table").height());
|
||||
height += 10;
|
||||
$("#" + this.options.idTable).bootstrapTable("resetView", {height: height});
|
||||
firstLoad = true;
|
||||
}
|
||||
if (!firstLoad) {
|
||||
console.log(122);
|
||||
var height = parseInt($(".bootstrap-table").height());
|
||||
height += 10;
|
||||
$("#" + this.options.idTable).bootstrapTable("resetView", {height: height});
|
||||
firstLoad = true;
|
||||
}
|
||||
};
|
||||
|
||||
BootstrapTable.prototype.initSearch = function () {
|
||||
_initSearch.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.commonSearch) {
|
||||
if (!isSearchAvailble(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -261,45 +330,7 @@
|
|||
|
||||
BootstrapTable.prototype.onColumnCommonSearch = function (event) {
|
||||
if (typeof event === 'undefined') {
|
||||
var op = {};
|
||||
var filter = {};
|
||||
$("#commonSearchModalContent_" + this.options.idTable + " input.operate").each(function (i) {
|
||||
var name = $(this).data("name");
|
||||
var sym = $(this).val();
|
||||
var obj = $("[name='" + name + "']");
|
||||
if (obj.size() == 0)
|
||||
return true;
|
||||
var vObjCol = ColumnsForSearch[i];
|
||||
if (obj.size() > 1) {
|
||||
if (/BETWEEN$/.test(sym)) {
|
||||
var value_begin = $.trim($("[name='" + name + "']:first").val()), value_end = $.trim($("[name='" + name + "']:last").val());
|
||||
if (!value_begin.length || !value_end.length) {
|
||||
return true;
|
||||
}
|
||||
if (typeof vObjCol.process === 'function') {
|
||||
value_begin = vObjCol.process(value_begin, 'begin');
|
||||
value_end = vObjCol.process(value_end, 'end');
|
||||
} else if ($("[name='" + name + "']:first").attr('type') === 'datetime') { //datetime类型字段转换成时间戳
|
||||
value_begin = strtotime(value_begin);
|
||||
value_end = strtotime(value_end);
|
||||
if (value_begin === value_end && '00:00:00' === date('H:i:s', value_begin)) {
|
||||
value_end += 86399;
|
||||
}
|
||||
}
|
||||
var value = value_begin + ',' + value_end;
|
||||
} else {
|
||||
var value = $("[name='" + name + "']:checked").val();
|
||||
}
|
||||
} else {
|
||||
var value = (typeof vObjCol.process === 'function') ? vObjCol.process(obj.val()) : obj.val();
|
||||
}
|
||||
if (value == '' && sym.indexOf("NULL") == -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
op[name] = sym;
|
||||
filter[name] = value;
|
||||
});
|
||||
var searchquery = getSearchQuery(this);
|
||||
// 追加查询关键字
|
||||
this.options.pageNumber = 1;
|
||||
this.options.queryParams = function (params) {
|
||||
|
|
@ -307,13 +338,13 @@
|
|||
search: params.search,
|
||||
sort: params.sort,
|
||||
order: params.order,
|
||||
filter: JSON.stringify(filter),
|
||||
op: JSON.stringify(op),
|
||||
filter: JSON.stringify(searchquery.filter),
|
||||
op: JSON.stringify(searchquery.op),
|
||||
offset: params.offset,
|
||||
limit: params.limit,
|
||||
};
|
||||
};
|
||||
this.refresh({query: {filter: JSON.stringify(filter), op: JSON.stringify(op)}});
|
||||
this.refresh({query: {filter: JSON.stringify(searchquery.filter), op: JSON.stringify(searchquery.op)}});
|
||||
|
||||
} else {
|
||||
var text = $.trim($(event.currentTarget).val());
|
||||
|
|
@ -333,52 +364,4 @@
|
|||
this.trigger('column-common-search', $field, text);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 模仿PHP的strtotime()函数
|
||||
* strtotime('2017-05-20 13:14:00') OR strtotime('2017-05-20')
|
||||
* @return 时间戳
|
||||
*/
|
||||
var strtotime = function (str) {
|
||||
var _arr = str.split(' ');
|
||||
var _day = _arr[0].split('-');
|
||||
_arr[1] = (_arr[1] == null) ? '0:0:0' : _arr[1];
|
||||
var _time = _arr[1].split(':');
|
||||
for (var i = _day.length - 1; i >= 0; i--) {
|
||||
_day[i] = isNaN(parseInt(_day[i])) ? 0 : parseInt(_day[i]);
|
||||
}
|
||||
for (var i = _time.length - 1; i >= 0; i--) {
|
||||
_time[i] = isNaN(parseInt(_time[i])) ? 0 : parseInt(_time[i]);
|
||||
}
|
||||
var _temp = new Date(_day[0], _day[1] - 1, _day[2], _time[0], _time[1], _time[2]);
|
||||
return _temp.getTime() / 1000;
|
||||
};
|
||||
/**
|
||||
* 模仿PHP的date()函数
|
||||
* strtotime('Y-m-d H:i:s');
|
||||
* @param format 只支持 'Y-m-d H:i:s','Y-m-d','H:i:s' 三种调用方式
|
||||
* @param time 为空时,取当前时间
|
||||
* @return 日期格式化的字符串
|
||||
*/
|
||||
var date = function (format, time) {
|
||||
var _temp = (time != null) ? new Date(time * 1000) : new Date();
|
||||
var _return = '';
|
||||
|
||||
if (/Y-m-d/.test(format)) {
|
||||
var _day = [_temp.getFullYear(), addzero(1 + _temp.getMonth()), addzero(_temp.getDate())];
|
||||
_return = _day.join('-');
|
||||
}
|
||||
if (/H:i:s/.test(format)) {
|
||||
var _time = [addzero(_temp.getHours()), addzero(_temp.getMinutes()), addzero(_temp.getSeconds())];
|
||||
_return += ' ' + _time.join(':');
|
||||
}
|
||||
return _return.replace(/^\s+|\s+$/gm, '');
|
||||
function addzero(i) {
|
||||
if (i <= 9) {
|
||||
return '0' + i;
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
};
|
||||
}(jQuery);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($, undefined, Toastr, Layer, Lang, Config) {
|
||||
define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefined, Toastr, Layer, Lang) {
|
||||
var Frontend = {
|
||||
config: {
|
||||
//toastr默认配置
|
||||
|
|
@ -237,6 +237,8 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($
|
|||
},
|
||||
init: function () {
|
||||
//公共代码
|
||||
//配置Toastr的参数
|
||||
Toastr.options = Frontend.config.toastr;
|
||||
|
||||
}
|
||||
};
|
||||
|
|
@ -248,8 +250,6 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'config'], function ($
|
|||
window.__ = Frontend.lang;
|
||||
//将Frontend渲染至全局,以便于在子框架中调用
|
||||
window.Frontend = Frontend;
|
||||
//Toastr定义
|
||||
Toastr.options = Frontend.config.toastr;
|
||||
|
||||
Frontend.init();
|
||||
return Frontend;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'frontend', 'config'], function ($, undefined, Frontend, Config) {
|
||||
define(['jquery', 'bootstrap', 'frontend'], function ($, undefined, Frontend) {
|
||||
|
||||
var Controller = {
|
||||
qrcode: function () {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
require.config({
|
||||
urlArgs: "v=" + requirejs.s.contexts._.config.config.config.site.version,
|
||||
urlArgs: "v=" + requirejs.s.contexts._.config.config.site.version,
|
||||
packages: [{
|
||||
name: 'moment',
|
||||
location: '../libs/moment',
|
||||
|
|
@ -9,15 +9,16 @@ require.config({
|
|||
include: ['css', 'layer', 'toastr', 'backend', 'table', 'form', 'dragsort', 'drag', 'drop', 'addtabs'],
|
||||
paths: {
|
||||
'lang': "empty:",
|
||||
'config': 'require-config',
|
||||
'form': 'require-form',
|
||||
'table': 'require-table',
|
||||
'upload': 'require-upload',
|
||||
'validator': 'require-validator',
|
||||
'drag': 'jquery.drag.min',
|
||||
'drop': 'jquery.drop.min',
|
||||
'echarts': 'echarts.min',
|
||||
'echarts-theme': 'echarts-theme',
|
||||
'adminlte': 'adminlte',
|
||||
'bootstrap-table-commonsearch': 'bootstrap-table-commonsearch',
|
||||
//
|
||||
// 以下的包从bower的libs目录加载
|
||||
'jquery': '../libs/jquery/dist/jquery.min',
|
||||
|
|
@ -31,8 +32,6 @@ require.config({
|
|||
'bootstrap-table': '../libs/bootstrap-table/dist/bootstrap-table.min',
|
||||
'bootstrap-table-export': '../libs/bootstrap-table/dist/extensions/export/bootstrap-table-export.min',
|
||||
'bootstrap-table-mobile': '../libs/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile',
|
||||
'bootstrap-table-advancedsearch': 'bootstrap-table-advancedsearch',
|
||||
'bootstrap-table-commonsearch': 'bootstrap-table-commonsearch',
|
||||
'bootstrap-table-lang': '../libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN',
|
||||
'typeahead': '../libs/typeahead.js/dist/typeahead.jquery.min',
|
||||
'bloodhound': '../libs/typeahead.js/dist/bloodhound.min',
|
||||
|
|
@ -45,19 +44,24 @@ require.config({
|
|||
'slimscroll': '../libs/jquery-slimscroll/jquery.slimscroll',
|
||||
'crontab': '../libs/jqcron/src/jqCron.cn',
|
||||
'summernote': '../libs/summernote/dist/lang/summernote-zh-CN.min',
|
||||
'validator': '../libs/nice-validator/dist/jquery.validator',
|
||||
'validator-core': '../libs/nice-validator/dist/jquery.validator',
|
||||
'validator-lang': '../libs/nice-validator/dist/local/zh-CN',
|
||||
'plupload': '../libs/plupload/js/plupload.min',
|
||||
'toastr': '../libs/toastr/toastr',
|
||||
'jstree': '../libs/jstree/dist/jstree.min',
|
||||
'layer': '../libs/layer/src/layer',
|
||||
'cookie': '../libs/jquery.cookie/jquery.cookie',
|
||||
'cxselect': '../libs/jquery-cxselect/js/jquery.cxselect',
|
||||
'template': '../libs/art-template/dist/template-native',
|
||||
},
|
||||
// shim依赖配置
|
||||
shim: {
|
||||
'bootstrap': ['jquery'],
|
||||
'bootstrap-table': {
|
||||
deps: ['bootstrap', 'css!../libs/bootstrap-table/dist/bootstrap-table.min.css'],
|
||||
deps: [
|
||||
'bootstrap',
|
||||
// 'css!../libs/bootstrap-table/dist/bootstrap-table.min.css'
|
||||
],
|
||||
exports: '$.fn.bootstrapTable'
|
||||
},
|
||||
'bootstrap-table-lang': {
|
||||
|
|
@ -104,8 +108,8 @@ require.config({
|
|||
'bootstrap-switch': ['jquery'],
|
||||
'bootstrap-dialog': ['css!../libs/bootstrap3-dialog/dist/css/bootstrap-dialog.min.css'],
|
||||
'bootstrap-datetimepicker': [
|
||||
'css!../libs/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css',
|
||||
'moment/locale/zh-cn',
|
||||
// 'css!../libs/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css',
|
||||
],
|
||||
'bootstrap-tagsinput': [
|
||||
'css!../libs/bootstrap-tagsinput/dist/bootstrap-tagsinput-typeahead.css',
|
||||
|
|
@ -118,15 +122,14 @@ require.config({
|
|||
// 'toastr': ['css!../libs/toastr/toastr.min.css'],
|
||||
'jstree': ['css!../libs/jstree/dist/themes/default/style.css', ],
|
||||
'plupload': {
|
||||
deps: [
|
||||
'../libs/plupload/js/moxie.min'
|
||||
],
|
||||
deps: ['../libs/plupload/js/moxie.min'],
|
||||
exports: "plupload"
|
||||
},
|
||||
// 'layer': ['css!../libs/layer/build/skin/default/layer.css'],
|
||||
|
||||
// 'validator-core': ['css!../libs/nice-validator/dist/jquery.validator.css'],
|
||||
'validator-lang': ['validator-core'],
|
||||
},
|
||||
baseUrl: requirejs.s.contexts._.config.config.config.site.cdnurl + '/assets/js/', //资源基础路径
|
||||
baseUrl: requirejs.s.contexts._.config.config.site.cdnurl + '/assets/js/', //资源基础路径
|
||||
map: {
|
||||
'*': {
|
||||
'css': '../libs/require-css/css.min'
|
||||
|
|
@ -135,7 +138,11 @@ require.config({
|
|||
charset: 'utf-8' // 文件编码
|
||||
});
|
||||
|
||||
require(['jquery', 'bootstrap', 'config'], function ($, undefined, Config) {
|
||||
require(['jquery', 'bootstrap'], function ($, undefined) {
|
||||
//初始配置
|
||||
var Config = requirejs.s.contexts._.config.config;
|
||||
//将Config渲染到全局
|
||||
window.Config = Config;
|
||||
// 配置语言包的路径
|
||||
var paths = {};
|
||||
paths['lang'] = Config.moduleurl + '/ajax/lang?callback=define&controllername=' + Config.controllername;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +0,0 @@
|
|||
define(['module'], function (module) {
|
||||
return module.config();
|
||||
});
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'upload', 'validator'], function ($, undefined, Backend, Config, Toastr, Upload, Validator) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'toastr', 'upload', 'validator'], function ($, undefined, Backend, Toastr, Upload, Validator) {
|
||||
var Form = {
|
||||
config: {
|
||||
},
|
||||
|
|
@ -20,7 +20,7 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'upload', 'validat
|
|||
return false;
|
||||
}
|
||||
}
|
||||
var type = form.attr("method");
|
||||
var type = form.attr("method").toUpperCase();
|
||||
type = type && (type == 'GET' || type == 'POST') ? type : 'GET';
|
||||
url = form.attr("action");
|
||||
url = url ? url : location.href;
|
||||
|
|
@ -96,6 +96,16 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'upload', 'validat
|
|||
});
|
||||
}
|
||||
|
||||
//绑定cxselect元素事件
|
||||
if ($("[data-toggle='cxselect']").size() > 0) {
|
||||
require(['cxselect'], function () {
|
||||
$.cxSelect.defaults.jsonName = 'name';
|
||||
$.cxSelect.defaults.jsonValue = 'value';
|
||||
$.cxSelect.defaults.jsonSpace = 'data';
|
||||
$("[data-toggle='cxselect']").cxSelect();
|
||||
});
|
||||
}
|
||||
|
||||
if ($(".typeahead").size() > 0 || $(".tagsinput").size() > 0) {
|
||||
require(['bloodhound'], function () {
|
||||
var remotesource = function (input) {
|
||||
|
|
@ -103,7 +113,7 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'upload', 'validat
|
|||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
remote: {
|
||||
url: '/ajax/typeahead?search=%QUERY&field=' + $(input).attr("name"),
|
||||
url: 'ajax/typeahead?search=%QUERY&field=' + $(input).attr("name"),
|
||||
wildcard: '%QUERY',
|
||||
transform: function (ret) {
|
||||
return ret.data.searchlist;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
require.config({
|
||||
urlArgs: "v=" + requirejs.s.contexts._.config.config.config.site.version,
|
||||
urlArgs: "v=" + requirejs.s.contexts._.config.config.site.version,
|
||||
packages: [{
|
||||
name: 'moment',
|
||||
location: '../libs/moment',
|
||||
|
|
@ -9,7 +9,6 @@ require.config({
|
|||
include: ['css', 'layer', 'toastr', 'frontend'],
|
||||
paths: {
|
||||
'lang': "empty:",
|
||||
'config': 'require-config',
|
||||
'form': 'require-form',
|
||||
'table': 'require-table',
|
||||
'upload': 'require-upload',
|
||||
|
|
@ -18,6 +17,7 @@ require.config({
|
|||
'echarts': 'echarts.min',
|
||||
'echarts-theme': 'echarts-theme',
|
||||
'adminlte': 'adminlte',
|
||||
'bootstrap-table-commonsearch': 'bootstrap-table-commonsearch',
|
||||
//
|
||||
// 以下的包从bower的libs目录加载
|
||||
'jquery': '../libs/jquery/dist/jquery.min',
|
||||
|
|
@ -31,8 +31,6 @@ require.config({
|
|||
'bootstrap-table': '../libs/bootstrap-table/dist/bootstrap-table.min',
|
||||
'bootstrap-table-export': '../libs/bootstrap-table/dist/extensions/export/bootstrap-table-export.min',
|
||||
'bootstrap-table-mobile': '../libs/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile',
|
||||
'bootstrap-table-advancedsearch': 'bootstrap-table-advancedsearch',
|
||||
'bootstrap-table-commonsearch': 'bootstrap-table-commonsearch',
|
||||
'bootstrap-table-lang': '../libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN',
|
||||
'typeahead': '../libs/typeahead.js/dist/typeahead.jquery.min',
|
||||
'bloodhound': '../libs/typeahead.js/dist/bloodhound.min',
|
||||
|
|
@ -126,7 +124,7 @@ require.config({
|
|||
// 'layer': ['css!../libs/layer/build/skin/default/layer.css'],
|
||||
|
||||
},
|
||||
baseUrl: requirejs.s.contexts._.config.config.config.site.cdnurl + '/assets/js/', //资源基础路径
|
||||
baseUrl: requirejs.s.contexts._.config.config.site.cdnurl + '/assets/js/', //资源基础路径
|
||||
map: {
|
||||
'*': {
|
||||
'css': '../libs/require-css/css.min'
|
||||
|
|
@ -135,7 +133,11 @@ require.config({
|
|||
charset: 'utf-8' // 文件编码
|
||||
});
|
||||
|
||||
require(['jquery', 'bootstrap', 'config'], function ($, undefined, Config) {
|
||||
require(['jquery', 'bootstrap'], function ($, undefined) {
|
||||
//初始配置
|
||||
var Config = requirejs.s.contexts._.config.config;
|
||||
//将Config渲染到全局
|
||||
window.Config = Config;
|
||||
// 配置语言包的路径
|
||||
var paths = {};
|
||||
paths['lang'] = Config.moduleurl + '/ajax/lang?callback=define&controllername=' + Config.controllername;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstrap-table', 'bootstrap-table-lang', 'bootstrap-table-mobile', 'bootstrap-table-export', 'bootstrap-table-advancedsearch', 'bootstrap-table-commonsearch'], function ($, undefined, Backend, Config, Toastr, Moment) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'toastr', 'moment', 'bootstrap-table', 'bootstrap-table-lang', 'bootstrap-table-mobile', 'bootstrap-table-export', 'bootstrap-table-commonsearch'], function ($, undefined, Backend, Toastr, Moment) {
|
||||
var Table = {
|
||||
list: {},
|
||||
// Bootstrap-table 基础配置
|
||||
|
|
@ -9,10 +9,10 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstr
|
|||
toolbar: "#toolbar",
|
||||
search: true,
|
||||
cache: false,
|
||||
advancedSearch: true,
|
||||
commonSearch: false,
|
||||
commonSearch: true,
|
||||
searchFormVisible: false,
|
||||
titleForm: '', //为空则不显示标题,不定义默认显示:普通搜索
|
||||
idTable: 'advancedTable',
|
||||
idTable: 'commonTable',
|
||||
showExport: true,
|
||||
exportDataType: "all",
|
||||
exportTypes: ['json', 'xml', 'csv', 'txt', 'doc', 'excel'],
|
||||
|
|
@ -70,17 +70,20 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstr
|
|||
$.extend($.fn.bootstrapTable.columnDefaults, Table.columnDefaults, columnDefaults);
|
||||
// 写入bootstrap-table locale配置
|
||||
$.extend($.fn.bootstrapTable.locales[Table.defaults.locale], {
|
||||
formatAdvancedSearch: function () {
|
||||
return __('Advanced search');
|
||||
formatCommonSearch: function () {
|
||||
return __('Common search');
|
||||
},
|
||||
formatAdvancedSubmitButton: function () {
|
||||
return __("Submit");
|
||||
formatCommonSubmitButton: function () {
|
||||
return __('Submit');
|
||||
},
|
||||
formatAdvancedResetButton: function () {
|
||||
return __("Reset");
|
||||
formatCommonResetButton: function () {
|
||||
return __('Reset');
|
||||
},
|
||||
formatAdvancedCloseButton: function () {
|
||||
return __("Close");
|
||||
formatCommonCloseButton: function () {
|
||||
return __('Close');
|
||||
},
|
||||
formatCommonChoose: function () {
|
||||
return __('Choose');
|
||||
}
|
||||
}, locales);
|
||||
},
|
||||
|
|
@ -92,7 +95,6 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstr
|
|||
var options = table.bootstrapTable('getOptions');
|
||||
//Bootstrap操作区
|
||||
var toolbar = $(options.toolbar, parenttable);
|
||||
|
||||
//当刷新表格时
|
||||
table.on('load-error.bs.table', function (status, res) {
|
||||
Toastr.error(__('Unknown data format'));
|
||||
|
|
@ -275,6 +277,7 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstr
|
|||
if (typeof custom !== 'undefined') {
|
||||
colorArr = $.extend(colorArr, custom);
|
||||
}
|
||||
value = value.toString();
|
||||
var color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
|
||||
value = value[0].toUpperCase() + value.substr(1);
|
||||
//渲染状态
|
||||
|
|
@ -284,16 +287,28 @@ define(['jquery', 'bootstrap', 'backend', 'config', 'toastr', 'moment', 'bootstr
|
|||
url: function (value, row, index) {
|
||||
return '<a href="' + value + '" target="_blank" class="label bg-green">' + value + '</a>';
|
||||
},
|
||||
flag: function (value, row, index) {
|
||||
var flagstext = __('Flags');
|
||||
var flagscolor = {t: 'red', i: 'blue', r: 'green', h: 'yellow'};
|
||||
if (!value)
|
||||
return value;
|
||||
search: function (value, row, index) {
|
||||
return '<a href="javascript:;" class="searchit" data-field="' + this.field + '" data-value="' + value + '">' + value + '</a>';
|
||||
},
|
||||
addtabs: function (value, row, index, url) {
|
||||
return '<a href="' + url + '" class="addtabsit" title="' + __("Search %s", value) + '">' + value + '</a>';
|
||||
},
|
||||
flag: function (value, row, index, custom) {
|
||||
var colorArr = {index: 'success', hot: 'warning', recommend: 'danger', 'new': 'info'};
|
||||
//如果有自定义状态,可以按需传入
|
||||
if (typeof custom !== 'undefined') {
|
||||
colorArr = $.extend(colorArr, custom);
|
||||
}
|
||||
//渲染Flag
|
||||
var html = [];
|
||||
var arr = value.split(',');
|
||||
arr.forEach(function (value) {
|
||||
html.push('<span class="label bg-' + (typeof flagscolor[value] != 'undefined' ? flagscolor[value] : 'primary') + '">' + (typeof flagstext[value] !== 'undefined' ? flagstext[value] : '') + '</span>');
|
||||
$.each(arr, function (i, value) {
|
||||
value = value.toString();
|
||||
if (value == '')
|
||||
return true;
|
||||
var color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
|
||||
value = value[0].toUpperCase() + value.substr(1);
|
||||
html.push('<span class="label label-' + color + '">' + __(value) + '</span>');
|
||||
});
|
||||
return html.join(' ');
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'config', 'plupload'], function ($, undefined, Backend, Config, Plupload) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'plupload'], function ($, undefined, Backend, Plupload) {
|
||||
var Upload = {
|
||||
list: {},
|
||||
config: {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
define(['validator-core', 'validator-lang'], function (Validator, undefined) {
|
||||
return Validator;
|
||||
});
|
||||
|
|
@ -1,8 +1,20 @@
|
|||
|
||||
@import (reference) "bootstrap-less/mixins.less";
|
||||
@import (reference) "bootstrap-less/variables.less";
|
||||
@import (reference) "fastadmin/mixins.less";
|
||||
@import (reference) "fastadmin/variables.less";
|
||||
@import "lesshat.less";
|
||||
|
||||
@import url("../css/bootstrap.min.css");
|
||||
@import url("../css/fastadmin.min.css");
|
||||
@import url("../css/skins/skin-green.css");
|
||||
@import url("../css/iconfont.css");
|
||||
@import url("../libs/font-awesome/css/font-awesome.min.css");
|
||||
@import url("../libs/toastr/toastr.min.css");
|
||||
@import url("../libs/layer/build/skin/default/layer.css");
|
||||
@import url("../libs/bootstrap-table/dist/bootstrap-table.min.css");
|
||||
@import url("../libs/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css");
|
||||
@import url("../libs/nice-validator/dist/jquery.validator.css");
|
||||
|
||||
.clearfix() {
|
||||
&:before,
|
||||
&:after {
|
||||
|
|
@ -81,6 +93,9 @@ body {
|
|||
margin-bottom: 15px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.searchit{
|
||||
border-bottom:1px dashed @link-color;
|
||||
}
|
||||
|
||||
/*
|
||||
* RIBBON
|
||||
|
|
@ -103,7 +118,7 @@ body {
|
|||
}
|
||||
|
||||
.breadcrumb > .active,
|
||||
.breadcrumb li:last-child {
|
||||
.breadcrumb li {
|
||||
color: #aaa;
|
||||
}
|
||||
.shortcut {
|
||||
|
|
@ -123,11 +138,17 @@ body {
|
|||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.user-panel > .image img{
|
||||
width:45px;
|
||||
height:45px;
|
||||
}
|
||||
|
||||
/*panel扩展描述样式*/
|
||||
.panel-intro {
|
||||
margin-bottom:0;
|
||||
border:none;
|
||||
.panel-heading {
|
||||
> .panel-heading {
|
||||
padding:15px;
|
||||
padding-bottom:0;
|
||||
background:@panel-intro-bg;
|
||||
|
|
@ -411,7 +432,7 @@ body {
|
|||
background-color: #48c9b0!important;
|
||||
}
|
||||
.toast-success {
|
||||
background-color: #2ecc71!important;
|
||||
background-color: #18bc9c!important;
|
||||
}
|
||||
.toast-error {
|
||||
background-color: #e74c3c!important;
|
||||
|
|
@ -428,6 +449,11 @@ body {
|
|||
.toast-default {
|
||||
background-color: #bdc3c7!important;
|
||||
}
|
||||
#toast-container{
|
||||
>div, >div:hover{
|
||||
.box-shadow(0 0 3px #eee);
|
||||
}
|
||||
}
|
||||
|
||||
.layui-layer-title {
|
||||
background:#2c3e50!important;
|
||||
|
|
@ -530,6 +556,12 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px){
|
||||
.form-inline .form-control {
|
||||
padding-right:20px;
|
||||
}
|
||||
}
|
||||
|
||||
/*手机版样式*/
|
||||
@media (max-width: @screen-phone) {
|
||||
.nav-addtabs {
|
||||
|
|
@ -1,485 +0,0 @@
|
|||
|
||||
@import (reference) "bootstrap-less/mixins.less";
|
||||
@import (reference) "bootstrap-less/variables.less";
|
||||
@import "lesshat.less";
|
||||
|
||||
.clearfix() {
|
||||
&:before,
|
||||
&:after {
|
||||
content: " "; // 1
|
||||
display: table; // 2
|
||||
}
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
@main-bg: #f1f4f6;
|
||||
@panel-intro-bg: darken(@main-bg,3%);
|
||||
@panel-nav-bg: #fff;
|
||||
|
||||
body {
|
||||
background:#f1f4f6;
|
||||
}
|
||||
|
||||
.selection {
|
||||
position: absolute;
|
||||
border: 1px solid #8B9;
|
||||
background-color: #BEC;
|
||||
}
|
||||
.note-dialog .modal {z-index:1060;}
|
||||
|
||||
.bootstrap-dialog .modal-dialog {
|
||||
/*width: 70%;*/
|
||||
max-width:885px;
|
||||
}
|
||||
|
||||
#header {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 2px rgba(0,0,0,.05),0 1px 0 rgba(0,0,0,.05);
|
||||
}
|
||||
.content-wrapper {
|
||||
position:relative;
|
||||
}
|
||||
.tab-addtabs {
|
||||
overflow: hidden;
|
||||
.tab-pane {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* RIBBON
|
||||
*/
|
||||
#ribbon {
|
||||
overflow:hidden;
|
||||
padding: 15px 15px 0 15px;
|
||||
position: relative;
|
||||
|
||||
a {
|
||||
color: #777 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.breadcrumb {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.breadcrumb > .active,
|
||||
.breadcrumb li:last-child {
|
||||
color: #aaa;
|
||||
}
|
||||
.shortcut {
|
||||
a{
|
||||
margin-left:10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.is-dialog {
|
||||
#main {
|
||||
background:#fff;
|
||||
}
|
||||
|
||||
form label {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
/*panel扩展描述样式*/
|
||||
.panel-intro {
|
||||
margin-bottom:0;
|
||||
border:none;
|
||||
.panel-heading {
|
||||
padding:15px;
|
||||
padding-bottom:0;
|
||||
background:@panel-intro-bg;
|
||||
border-color:@panel-intro-bg;
|
||||
position:relative;
|
||||
.panel-lead {
|
||||
margin-bottom:15px;
|
||||
em {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-style:normal;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
height:25px;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.panel-control {
|
||||
height: 42px;
|
||||
position:absolute;
|
||||
top:8px;
|
||||
right:8px;
|
||||
.fa {
|
||||
font-size:14px;
|
||||
}
|
||||
}
|
||||
.nav-tabs {
|
||||
border-bottom:0;
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
|
||||
.nav-tabs > li > a{
|
||||
margin-right:4px;
|
||||
color: #95a5a6;
|
||||
background-color: darken(@panel-intro-bg, 5%);
|
||||
border: 1px solid @panel-intro-bg;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.nav-tabs > li > a:hover, .nav-tabs > li > a:focus{
|
||||
border: 1px solid @panel-intro-bg;
|
||||
color: #7b8a8b;
|
||||
background-color: darken(@panel-intro-bg, 10%);
|
||||
}
|
||||
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
|
||||
color: #7b8a8b;
|
||||
background-color: #ffffff;
|
||||
border-bottom-color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*单表格*/
|
||||
.panel-tabs {
|
||||
.panel-heading {
|
||||
padding:12px 15px 12px 15px;
|
||||
.panel-lead {
|
||||
margin-bottom:0px;
|
||||
}
|
||||
.panel-title {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
/*选项卡*/
|
||||
.panel-nav {
|
||||
|
||||
.panel-heading {
|
||||
padding:0px;
|
||||
padding-bottom:0;
|
||||
background:@main-bg;
|
||||
border-color:@main-bg;
|
||||
}
|
||||
.nav-tabs > li > a{
|
||||
padding: 12px 15px;
|
||||
background-color: @panel-intro-bg;
|
||||
border: 1px solid @main-bg;
|
||||
}
|
||||
.nav-tabs > li > a:hover, .nav-tabs > li > a:focus{
|
||||
border: 1px solid @panel-intro-bg;
|
||||
background-color: @panel-intro-bg;
|
||||
}
|
||||
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
|
||||
border-color: @main-bg;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
}
|
||||
/*顶栏addtabs*/
|
||||
.nav-addtabs{
|
||||
border:none;
|
||||
> li{
|
||||
margin:0;
|
||||
> a{
|
||||
height:49px;
|
||||
line-height:49px;
|
||||
padding:0 15px;
|
||||
border-radius:0;
|
||||
border:none;
|
||||
border-right:1px solid rgba(0, 0, 0, 0.05);
|
||||
margin:0;
|
||||
color:#95a5a6;
|
||||
&:hover, &:focus{
|
||||
border:none;
|
||||
color:#2c3e50;
|
||||
border-right:1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
i{
|
||||
margin-right:3px;
|
||||
}
|
||||
}
|
||||
&.active > a{
|
||||
height:49px;line-height:49px;
|
||||
padding:0 15px;
|
||||
border-radius:0;
|
||||
border:none;
|
||||
border-right:1px solid rgba(0, 0, 0, 0.05);
|
||||
background:#f1f4f6;
|
||||
color:#2c3e50;
|
||||
overflow:hidden;
|
||||
&:hover, &:focus{
|
||||
border:none;
|
||||
color:#2c3e50;
|
||||
border-right:1px solid rgba(0, 0, 0, 0.05);
|
||||
background:#f1f4f6;
|
||||
}
|
||||
}
|
||||
.close-tab {
|
||||
font-size: 10px;
|
||||
position:absolute;
|
||||
right: 5px;
|
||||
top: 50%;
|
||||
margin-top:-7px;
|
||||
z-index: 100;
|
||||
cursor: hand;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
.open > a{
|
||||
&:hover,&:focus{
|
||||
border-right:1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
ul li {
|
||||
position:relative;
|
||||
}
|
||||
li:hover > .close-tab {
|
||||
display:block;
|
||||
}
|
||||
}
|
||||
|
||||
#treeview {
|
||||
.jstree-container-ul .jstree-node{
|
||||
display:block;clear:both;
|
||||
}
|
||||
.jstree-leaf:not(:first-child) {
|
||||
float:left;
|
||||
background:none;
|
||||
margin-left:0;
|
||||
width:80px;
|
||||
clear:none;
|
||||
color:#BBBDC3;
|
||||
}
|
||||
.jstree-leaf {
|
||||
float:left;
|
||||
margin-left:0;padding-left:24px;
|
||||
width:80px;
|
||||
clear:none;
|
||||
color:#ccc;
|
||||
}
|
||||
.jstree-leaf > .jstree-icon,.jstree-leaf .jstree-themeicon{
|
||||
display:none;
|
||||
}
|
||||
.jstree-last{
|
||||
background-image: url("../img/32px.png");
|
||||
background-position: -292px -4px;
|
||||
background-repeat: repeat-y;
|
||||
}
|
||||
.jstree-children {
|
||||
.clearfix();
|
||||
}
|
||||
.jstree-themeicon {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/*去除bootstrap-table的边框*/
|
||||
.fixed-table-container {
|
||||
border:none!important;
|
||||
}
|
||||
|
||||
.pjax-loader-bar .progress {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
background: #77b6ff;
|
||||
box-shadow: 0 0 10px rgba(119,182,255,0.7);
|
||||
-webkit-transition: width 0.4s ease;
|
||||
transition: width 0.4s ease;
|
||||
}
|
||||
.dropdown-menu.text-left {
|
||||
a,li{
|
||||
text-align: left!important;
|
||||
}
|
||||
}
|
||||
.bootstrap-table .fixed-table-toolbar .dropdown-menu{
|
||||
overflow:visible;
|
||||
}
|
||||
|
||||
.bootstrap-table table tbody tr:first-child td .bs-checkbox {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
>.dropdown-menu {
|
||||
overflow:auto;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -6px;
|
||||
margin-left: -1px;
|
||||
.border-radius(0 6px 6px 6px);
|
||||
}
|
||||
&:hover {
|
||||
>.dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
>a:after {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
}
|
||||
>a:after {
|
||||
display: block;
|
||||
content: " ";
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
border-left-color: #ccc;
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
&.pull-left {
|
||||
float: none;
|
||||
>.dropdown-menu {
|
||||
left: -100%;
|
||||
margin-left: 10px;
|
||||
.border-radius(6px 0 6px 6px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*重写toast的几个背景色*/
|
||||
.toast-primary {
|
||||
background-color: #48c9b0!important;
|
||||
}
|
||||
.toast-success {
|
||||
background-color: #2ecc71!important;
|
||||
}
|
||||
.toast-error {
|
||||
background-color: #e74c3c!important;
|
||||
}
|
||||
.toast-info {
|
||||
background-color: #5dade2!important;
|
||||
}
|
||||
.toast-warning {
|
||||
background-color: #f1c40f!important;
|
||||
}
|
||||
.toast-inverse {
|
||||
background-color: #34495e!important;
|
||||
}
|
||||
.toast-default {
|
||||
background-color: #bdc3c7!important;
|
||||
}
|
||||
|
||||
.layui-layer-title {
|
||||
background:#2c3e50!important;
|
||||
color:#fff!important;
|
||||
}
|
||||
|
||||
/*避免出现多滚动条*/
|
||||
.layui-layer-noborder {
|
||||
border:none!important;
|
||||
box-shadow: 1px 1px 50px rgba(0,0,0,.3)!important;
|
||||
}
|
||||
.layui-layer-moves{
|
||||
.box-sizing(content-box);
|
||||
}
|
||||
.layui-layer-iframe {
|
||||
overflow:hidden!important;
|
||||
}
|
||||
.layui-layer-iframe .layui-layer-content {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: hidden!important;
|
||||
overflow:hidden;
|
||||
}
|
||||
/*自定义底部灰色操作区*/
|
||||
.layui-layer-btn {
|
||||
text-align: center!important;
|
||||
padding: 10px!important;
|
||||
background: #ecf0f1;
|
||||
}
|
||||
.layui-layer-footer {
|
||||
padding:8px 20px;
|
||||
background-color:#ecf0f1;
|
||||
height:auto;
|
||||
text-align:inherit!important;
|
||||
}
|
||||
|
||||
.layui-layer-btn a {
|
||||
background-color: #95a5a6!important;
|
||||
border-color: #95a5a6!important;
|
||||
color:#fff!important;
|
||||
}
|
||||
|
||||
.layui-layer-btn .layui-layer-btn0{
|
||||
background-color: #18bc9c!important;
|
||||
border-color: #18bc9c!important;
|
||||
}
|
||||
|
||||
.layui-layer-setwin {
|
||||
top:10px!important;
|
||||
> a {
|
||||
background:none!important;
|
||||
cite {
|
||||
display:none;
|
||||
}
|
||||
&:after {
|
||||
content: "\e625";
|
||||
font-family: iconfont;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
text-decoration: inherit;
|
||||
position: absolute;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
&:hover {
|
||||
text-decoration: none!important;
|
||||
background:none!important;
|
||||
}
|
||||
&:focus {
|
||||
text-decoration: none!important;
|
||||
}
|
||||
}
|
||||
.layui-layer-min{
|
||||
&:after {
|
||||
content: "\e625";
|
||||
}
|
||||
}
|
||||
.layui-layer-max{
|
||||
&:after {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
}
|
||||
.layui-layer-maxmin{
|
||||
&:after {
|
||||
content: "\e624";
|
||||
}
|
||||
}
|
||||
.layui-layer-close1{
|
||||
&:after {
|
||||
content: "\e626";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*手机版样式*/
|
||||
@media (max-width: @screen-phone) {
|
||||
.nav-addtabs {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
/*平板样式*/
|
||||
@media (max-width: @screen-tablet) {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
@import (reference) "bootstrap-less/mixins.less";
|
||||
@import (reference) "bootstrap-less/variables.less";
|
||||
@import "lesshat.less";
|
||||
|
||||
@import url("../css/bootstrap.min.css");
|
||||
@import url("../css/fastadmin.min.css");
|
||||
@import url("../css/skins/skin-green.css");
|
||||
@import url("../css/iconfont.css");
|
||||
@import url("../libs/font-awesome/css/font-awesome.min.css");
|
||||
@import url("../libs/toastr/toastr.min.css");
|
||||
@import url("../libs/layer/build/skin/default/layer.css");
|
||||
|
||||
.clearfix() {
|
||||
&:before,
|
||||
&:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue