作者 王智

'222'

正在显示 86 个修改的文件 包含 4591 行增加120 行删除

要显示太多修改。

为保证性能只显示 86 of 86+ 个文件。

{"license":"regular","licenseto":"10789","licensekey":"OjLlr8IYNxMp9BDz uKkpOjQFl18LY5KxoHc0Vw==","menus":["command","command\/index","command\/add","command\/detail","command\/execute","command\/del","command\/multi"],"files":["application\\admin\\controller\\Command.php","application\\admin\\lang\\zh-cn\\command.php","application\\admin\\model\\Command.php","application\\admin\\validate\\Command.php","application\\admin\\view\\command\\add.html","application\\admin\\view\\command\\detail.html","application\\admin\\view\\command\\index.html","public\\assets\\js\\backend\\command.js"]}
\ No newline at end of file
... ...
<?php
namespace addons\command;
use app\common\library\Menu;
use think\Addons;
/**
* 在线命令插件
*/
class Command extends Addons
{
/**
* 插件安装方法
* @return bool
*/
public function install()
{
$menu = [
[
'name' => 'command',
'title' => '在线命令管理',
'icon' => 'fa fa-terminal',
'sublist' => [
['name' => 'command/index', 'title' => '查看'],
['name' => 'command/add', 'title' => '添加'],
['name' => 'command/detail', 'title' => '详情'],
['name' => 'command/execute', 'title' => '运行'],
['name' => 'command/del', 'title' => '删除'],
['name' => 'command/multi', 'title' => '批量更新'],
]
]
];
Menu::create($menu);
return true;
}
/**
* 插件卸载方法
* @return bool
*/
public function uninstall()
{
Menu::delete('command');
return true;
}
/**
* 插件启用方法
* @return bool
*/
public function enable()
{
Menu::enable('command');
return true;
}
/**
* 插件禁用方法
* @return bool
*/
public function disable()
{
Menu::disable('command');
return true;
}
}
... ...
<?php
return [
];
... ...
<?php
namespace addons\command\controller;
use think\addons\Controller;
class Index extends Controller
{
public function index()
{
$this->error("当前插件暂无前台页面");
}
}
... ...
name = command
title = 在线命令
intro = 可在线执行FastAdmin的命令行相关命令
author = Karson
website = https://www.fastadmin.net
version = 1.0.6
state = 1
url = /addons/command
license = regular
licenseto = 10789
... ...
CREATE TABLE IF NOT EXISTS `__PREFIX__command` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '类型',
`params` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '参数',
`command` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '命令',
`content` text COMMENT '返回结果',
`executetime` int(10) UNSIGNED DEFAULT NULL COMMENT '执行时间',
`createtime` int(10) UNSIGNED DEFAULT NULL COMMENT '创建时间',
`updatetime` int(10) UNSIGNED DEFAULT NULL COMMENT '更新时间',
`status` enum('successed','failured') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'failured' COMMENT '状态',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '在线命令表';
... ...
<?php
namespace addons\command\library;
/**
* Class Output
*/
class Output extends \think\console\Output
{
protected $message = [];
public function __construct($driver = 'console')
{
parent::__construct($driver);
}
protected function block($style, $message)
{
$this->message[] = $message;
}
public function getMessage()
{
return $this->message;
}
}
... ...
{"license":"regular","licenseto":"10789","licensekey":"xAs6r2qpj0IeFlYP KlHZ0AMhcYlkrMNZEFDehA==","files":["public\\assets\\addons\\simditor\\css\\simditor.min.css","public\\assets\\addons\\simditor\\images\\image.png","public\\assets\\addons\\simditor\\js\\simditor.min.js"]}
\ No newline at end of file
... ...
<?php
namespace addons\simditor;
use think\Addons;
/**
* 插件
*/
class Simditor extends Addons
{
/**
* 插件安装方法
* @return bool
*/
public function install()
{
return true;
}
/**
* 插件卸载方法
* @return bool
*/
public function uninstall()
{
return true;
}
}
... ...
require.config({
paths: {
'simditor': '../addons/simditor/js/simditor.min',
},
shim: {
'simditor': [
'css!../addons/simditor/css/simditor.min.css'
]
}
});
require(['form'], function (Form) {
var _bindevent = Form.events.bindevent;
Form.events.bindevent = function (form) {
_bindevent.apply(this, [form]);
if ($(".editor", form).size() > 0) {
//修改上传的接口调用
require(['upload', 'simditor'], function (Upload, Simditor) {
var editor, mobileToolbar, toolbar;
Simditor.locale = 'zh-CN';
Simditor.list = {};
toolbar = ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment'];
mobileToolbar = ["bold", "underline", "strikethrough", "color", "ul", "ol"];
$(".editor", form).each(function () {
var id = $(this).attr("id");
editor = new Simditor({
textarea: this,
toolbarFloat: false,
toolbar: toolbar,
pasteImage: true,
defaultImage: Config.__CDN__ + '/assets/addons/simditor/images/image.png',
upload: {url: '/'}
});
editor.uploader.on('beforeupload', function (e, file) {
Upload.api.send(file.obj, function (data) {
var url = Fast.api.cdnurl(data.url);
editor.uploader.trigger("uploadsuccess", [file, {success: true, file_path: url}]);
});
return false;
});
editor.on("blur", function () {
this.textarea.trigger("blur");
});
Simditor.list[id] = editor;
});
});
}
}
});
\ No newline at end of file
... ...
#!/bin/bash
/usr/local/bin/node r.js -o ./js.js name=simditor baseUrl=../src/js out=../assets/js/simditor.min.js
/usr/local/bin/node r.js -o ./css.js cssIn=../src/css/simditor.css out=../assets/css/simditor.min.css
... ...
({
optimizeCss: "default",
optimize: "uglify"
})
\ No newline at end of file
... ...
({
name: "simditor",
paths: {
'jquery': 'empty:',
'simditor': 'simditor',
'simple-module': 'module',
'simple-uploader': 'uploader',
'simple-hotkeys': 'hotkeys',
},
});
\ No newline at end of file
... ...
此 diff 太大无法显示。
<?php
return [
];
... ...
name = simditor
title = Simditor
intro = 简洁清晰的富文本插件
author = Karson
website = http://www.fastadmin.net
version = 1.0.5
state = 1
url = /addons/simditor
license = regular
licenseto = 10789
... ...
@media screen and (max-device-width: 240px) and (min-device-width: 220px) {
body {
width: 240px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 80px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 80px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 320px) and (min-device-width: 300px) {
body {
width: 320px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 80px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 80px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 360px) and (min-device-width: 340px) {
body {
width: 360px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 80px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 80px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 480px) and (min-device-width: 460px) {
body {
width: 480px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 80px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 80px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 640px) and (min-device-width: 620px) {
body {
width: 320px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 80px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 80px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 720px) and (min-device-width: 700px) {
body {
width: 360px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 80px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 80px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 800px) and (min-device-width: 780px) {
body {
width: 400px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 88.8888888889px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 88.8888888889px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 960px) and (min-device-width: 940px) {
body {
width: 480px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 100px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 100px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 1024px) and (min-device-width: 1004px) {
body {
width: 512px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 100px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 100px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (max-device-width: 1280px) and (min-device-width: 1260px) {
body {
width: 640px;
margin: 0 auto;
}
body .wrapper {
width: 100%;
}
body .wrapper header {
padding: 30px 0 20px;
}
body .wrapper header h1 {
background-size: 200px auto;
background-position: 50px 0;
padding-top: 90px;
height: 45px;
}
body .wrapper header h1 a {
background-size: 160px auto;
background-position: 10px 0;
}
body .wrapper header p.desc {
font-size: 16px;
}
body .wrapper footer {
margin: 20px 0;
}
body .wrapper #page-demo {
width: 96%;
margin: 0 2%;
}
body .wrapper #link-fork {
z-index: -1;
width: 100px;
height: auto;
}
body .wrapper #link-fork img {
max-width: 100px;
height: auto;
}
nav {
display: none;
}
}
@media screen and (device-aspect-ratio: 40 / 71) and (orientation: landscape) {
body {
width: 568px;
}
}
@media screen and (device-aspect-ratio: 2 / 3) and (orientation: landscape) {
body {
width: 480px;
}
}
... ...
@font-face {
font-family: 'Simditor';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABp8AA4AAAAAKmwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAaYAAAABoAAAAcdO8GE09TLzIAAAG0AAAARQAAAGAQ+ZFXY21hcAAAAkgAAABRAAABWuA2Gx9jdnQgAAAEgAAAAAoAAAAKAwQAxGZwZ20AAAKcAAABsQAAAmUPtC+nZ2x5ZgAABNgAABPeAAAgZG/p6QxoZWFkAAABRAAAADAAAAA2BvuCgGhoZWEAAAF0AAAAHgAAACQH9QTlaG10eAAAAfwAAABKAAAAlHv7AItsb2NhAAAEjAAAAEwAAABMi4qTXm1heHAAAAGUAAAAIAAAACABRwHNbmFtZQAAGLgAAAEFAAAB12vS/ulwb3N0AAAZwAAAAJ4AAAFsyCrvunByZXAAAARQAAAALgAAAC6w8isUeNpjYGRgYADiKAkPy3h+m68M8swfgCIMF0/IVyDo/84sFswJQC4HAxNIFAAZwAnyeNpjYGRgYE5gmMAQzWLBwPD/O5AEiqAAVQBa6wPkAAAAAQAAACUAoAAKAAAAAAACAAEAAgAWAAABAAEpAAAAAHjaY2BhnsA4gYGVgYGpn+kgAwNDL4RmfMxgxMgCFGVgZWaAAUYBBjTQwMDwQY454X8BQzRzAsMEIJcRSVaBgREAQ9oK6QAAAHj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iz8cg+Y42+E0mX4o+pXhStOJ7z2QxrWH6036gw2RFCfVu1xer1b5EN8hGS1i51e2tdsAsDkIPGYliDdesazes7CRI9OdoekjR6bxa8mk4OL7XB7OJ3aGoMLP4ddyVS7j5kK/36mLGfHnojgBj4/h49BOiPiadnfd9BGRDfJ9nKua6657hIdVGMMiWEOnOmvoYoT+C93/Vj8AAHjafY+/asMwEIc/JU6aQhsyltJBQ6eCg20IgdCt1GTwlNJsHUJijCCxwHaeqVufpM/Qta/Ri31ZOkTipO9Ov/sjYMwXhm7d8qBsGPGs3OOKd+U+j3wqB6L5UR5wY4zykJGxojTBtXj3bdaJDROelHvS91W5z5IP5UA038oD7vhVHjIxY1I8JQ2ObUs1lkz2C6S+bNzWl7XNMnHfRHNgJ2cjykoC7rBzjRdakVNwZM/m9LDKi+N+I3AunrYJhagsCVMiuRdi/0t20Vg0IXOxRJQxs26U1FdFbpNpZBf23FowTsJ5mETx7OKEa+ldyedcO9GpRzcF67yqnS9tLHUvVfgDz/ZF8gAAAHjabc25DgFhGIXh/53B2Pd9J9HPN/bSWolC4iI0OjfgxhFO6SQnT/k6z333errI/dvkc5yHh+98YsRJEJAkRZoMWXLkKVCkRJkKVWrUadCkRZsOXXr0GTBkxDh2vp5O3u4SPO63YxiG0mQkp3Im53Ihl3Il13Ijt3In9/Igjz9NfVPf1Df1TX1T39Q39U19U9/UN/VNfVPfDm8tR0peAAB42mNgYGBkAIKLcceVwfQJ+XIoXQEARe8GegAA) format("woff");
font-weight: normal;
font-style: normal;
}
.simditor-icon {
display: inline-block;
font: normal normal normal 14px/1 'Simditor';
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
}
.simditor-icon-code:before {
content: '\f000';
}
.simditor-icon-bold:before {
content: '\f001';
}
.simditor-icon-italic:before {
content: '\f002';
}
.simditor-icon-underline:before {
content: '\f003';
}
.simditor-icon-times:before {
content: '\f004';
}
.simditor-icon-strikethrough:before {
content: '\f005';
}
.simditor-icon-list-ol:before {
content: '\f006';
}
.simditor-icon-list-ul:before {
content: '\f007';
}
.simditor-icon-quote-left:before {
content: '\f008';
}
.simditor-icon-table:before {
content: '\f009';
}
.simditor-icon-link:before {
content: '\f00a';
}
.simditor-icon-picture-o:before {
content: '\f00b';
}
.simditor-icon-minus:before {
content: '\f00c';
}
.simditor-icon-indent:before {
content: '\f00d';
}
.simditor-icon-outdent:before {
content: '\f00e';
}
.simditor-icon-unlink:before {
content: '\f00f';
}
.simditor-icon-caret-down:before {
content: '\f010';
}
.simditor-icon-caret-right:before {
content: '\f011';
}
.simditor-icon-upload:before {
content: '\f012';
}
.simditor-icon-undo:before {
content: '\f013';
}
.simditor-icon-smile-o:before {
content: '\f014';
}
.simditor-icon-tint:before {
content: '\f015';
}
.simditor-icon-font:before {
content: '\f016';
}
.simditor-icon-html5:before {
content: '\f017';
}
.simditor-icon-mark:before {
content: '\f018';
}
.simditor-icon-align-center:before {
content: '\f019';
}
.simditor-icon-align-left:before {
content: '\f01a';
}
.simditor-icon-align-right:before {
content: '\f01b';
}
.simditor-icon-font-minus:before {
content: '\f01c';
}
.simditor-icon-markdown:before {
content: '\f01d';
}
.simditor-icon-checklist:before {
content: '\f01e';
}
.simditor {
position: relative;
border: 1px solid #c9d8db;
}
.simditor .simditor-wrapper {
position: relative;
background: #ffffff;
}
.simditor .simditor-wrapper > textarea {
display: none !important;
width: 100%;
box-sizing: border-box;
font-family: monaco;
font-size: 14px;
line-height: 1.6;
border: none;
padding: 22px 15px 36px;
min-height: 300px;
outline: none;
background: transparent;
resize: none;
}
.simditor .simditor-wrapper .simditor-placeholder {
display: none;
position: absolute;
left: 0;
z-index: 0;
padding: 22px 15px;
font-size: 16px;
font-family: arial, sans-serif;
line-height: 1.5;
color: #999999;
background: transparent;
}
.simditor .simditor-wrapper.toolbar-floating .simditor-toolbar {
position: fixed;
top: 0;
z-index: 10;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}
.simditor .simditor-wrapper .simditor-image-loading {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2;
}
.simditor .simditor-wrapper .simditor-image-loading .progress {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
position: absolute;
bottom: 0;
left: 0;
}
.simditor .simditor-body {
padding: 10px;
min-height: 300px;
outline: none;
cursor: text;
position: relative;
z-index: 1;
background: transparent;
width:100%;
}
.simditor .simditor-body a.selected {
background: #b3d4fd;
}
.simditor .simditor-body a.simditor-mention {
cursor: pointer;
}
.simditor .simditor-body .simditor-table {
position: relative;
}
.simditor .simditor-body .simditor-table.resizing {
cursor: col-resize;
}
.simditor .simditor-body .simditor-table .simditor-resize-handle {
position: absolute;
left: 0;
top: 0;
width: 10px;
height: 100%;
cursor: col-resize;
}
.simditor .simditor-body pre {
/*min-height: 28px;*/
box-sizing: border-box;
-moz-box-sizing: border-box;
word-wrap: break-word !important;
white-space: pre-wrap !important;
}
.simditor .simditor-body img {
cursor: pointer;
}
.simditor .simditor-body img.selected {
box-shadow: 0 0 0 4px #cccccc;
}
.simditor .simditor-paste-bin {
position: fixed;
bottom: 10px;
right: 10px;
width: 1px;
height: 20px;
font-size: 1px;
line-height: 1px;
overflow: hidden;
padding: 0;
margin: 0;
opacity: 0;
-webkit-user-select: text;
}
.simditor .simditor-toolbar {
border-bottom: 1px solid #eeeeee;
background: #ffffff;
width: 100%;
}
.simditor .simditor-toolbar > ul {
margin: 0;
padding: 0 0 0 6px;
list-style: none;
}
.simditor .simditor-toolbar > ul > li {
position: relative;
display: inline-block;
font-size: 0;
}
.simditor .simditor-toolbar > ul > li > span.separator {
display: inline-block;
background: #cfcfcf;
width: 1px;
height: 18px;
margin: 11px 15px;
vertical-align: middle;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item {
display: inline-block;
width: 36px;
height: 36px;
outline: none;
color: #333333;
font-size: 15px;
line-height: 36px;
vertical-align: middle;
text-align: center;
text-decoration: none;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item span {
opacity: 0.6;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item span.simditor-icon {
display: inline;
line-height: normal;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item:hover span {
opacity: 1;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.active {
background: #eeeeee;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.active span {
opacity: 1;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.disabled {
cursor: default;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.disabled span {
opacity: 0.3;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title span:before {
content: "H";
font-size: 19px;
font-weight: bold;
font-family: 'Times New Roman';
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h1 span:before {
content: 'H1';
font-size: 18px;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h2 span:before {
content: 'H2';
font-size: 18px;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-title.active-h3 span:before {
content: 'H3';
font-size: 18px;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-image {
position: relative;
overflow: hidden;
}
.simditor .simditor-toolbar > ul > li > .toolbar-item.toolbar-item-image > input[type=file] {
position: absolute;
right: 0px;
top: 0px;
opacity: 0;
font-size: 100px;
cursor: pointer;
}
.simditor .simditor-toolbar > ul > li.menu-on .toolbar-item {
position: relative;
z-index: 20;
background: #ffffff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.simditor .simditor-toolbar > ul > li.menu-on .toolbar-item span {
opacity: 1;
}
.simditor .simditor-toolbar > ul > li.menu-on .toolbar-menu {
display: block;
}
.simditor .simditor-toolbar .toolbar-menu {
display: none;
position: absolute;
top: 36px;
left: 0;
z-index: 21;
background: #ffffff;
text-align: left;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}
.simditor .simditor-toolbar .toolbar-menu:before {
content: '';
display: block;
width: 36px;
height: 4px;
background: #ffffff;
position: absolute;
top: -3px;
left: 0;
}
.simditor .simditor-toolbar .toolbar-menu ul {
min-width: 160px;
list-style: none;
margin: 0;
padding: 10px 1px;
}
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item {
display: block;
font-size: 14px;
line-height: 2em;
padding: 0 10px;
text-decoration: none;
color: #666666;
}
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item:hover {
background: #f6f6f6;
}
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h1 {
font-size: 24px;
color: #333333;
}
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h2 {
font-size: 22px;
color: #333333;
}
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h3 {
font-size: 20px;
color: #333333;
}
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h4 {
font-size: 18px;
color: #333333;
}
.simditor .simditor-toolbar .toolbar-menu ul > li .menu-item.menu-item-h5 {
font-size: 16px;
color: #333333;
}
.simditor .simditor-toolbar .toolbar-menu ul > li .separator {
display: block;
border-top: 1px solid #cccccc;
height: 0;
line-height: 0;
font-size: 0;
margin: 6px 0;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color {
width: 96px;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list {
height: 36px;
margin: 10px 6px 6px 10px;
padding: 0;
min-width: 0;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li {
float: left;
margin: 0 4px 4px 0;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color {
display: block;
width: 16px;
height: 16px;
background: #dfdfdf;
border-radius: 2px;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color:hover {
opacity: 0.8;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color.font-color-default {
background: #333333;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-1 {
background: #E33737;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-2 {
background: #e28b41;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-3 {
background: #c8a732;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-4 {
background: #209361;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-5 {
background: #418caf;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-6 {
background: #aa8773;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-color .color-list li .font-color-7 {
background: #999999;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table {
background: #ffffff;
padding: 1px;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table {
border: none;
border-collapse: collapse;
border-spacing: 0;
table-layout: fixed;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td {
padding: 0;
cursor: pointer;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td:before {
width: 16px;
height: 16px;
border: 1px solid #ffffff;
background: #f3f3f3;
display: block;
content: "";
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-create-table table td.selected:before {
background: #cfcfcf;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-edit-table {
display: none;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-table .menu-edit-table ul li {
white-space: nowrap;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-image .menu-item-upload-image {
position: relative;
overflow: hidden;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-image .menu-item-upload-image input[type=file] {
position: absolute;
right: 0px;
top: 0px;
opacity: 0;
font-size: 100px;
cursor: pointer;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment {
width: 100%;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment ul {
min-width: 100%;
}
.simditor .simditor-toolbar .toolbar-menu.toolbar-menu-alignment .menu-item {
text-align: center;
}
.simditor .simditor-popover {
display: none;
padding: 5px 8px 0;
background: #ffffff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
border-radius: 2px;
position: absolute;
z-index: 2;
}
.simditor .simditor-popover .settings-field {
margin: 0 0 5px 0;
font-size: 12px;
height: 25px;
line-height: 25px;
}
.simditor .simditor-popover .settings-field label {
display: inline-block;
margin: 0 5px 0 0;
}
.simditor .simditor-popover .settings-field input[type=text] {
display: inline-block;
width: 200px;
box-sizing: border-box;
font-size: 12px;
}
.simditor .simditor-popover .settings-field input[type=text].image-size {
width: 83px;
}
.simditor .simditor-popover .settings-field .times {
display: inline-block;
width: 26px;
font-size: 12px;
text-align: center;
}
.simditor .simditor-popover.link-popover .btn-unlink, .simditor .simditor-popover.image-popover .btn-upload, .simditor .simditor-popover.image-popover .btn-restore {
display: inline-block;
margin: 0 0 0 5px;
color: #333333;
font-size: 14px;
outline: 0;
}
.simditor .simditor-popover.link-popover .btn-unlink span, .simditor .simditor-popover.image-popover .btn-upload span, .simditor .simditor-popover.image-popover .btn-restore span {
opacity: 0.6;
}
.simditor .simditor-popover.link-popover .btn-unlink:hover span, .simditor .simditor-popover.image-popover .btn-upload:hover span, .simditor .simditor-popover.image-popover .btn-restore:hover span {
opacity: 1;
}
.simditor .simditor-popover.image-popover .btn-upload {
position: relative;
display: inline-block;
overflow: hidden;
vertical-align: middle;
}
.simditor .simditor-popover.image-popover .btn-upload input[type=file] {
position: absolute;
right: 0px;
top: 0px;
opacity: 0;
height: 100%;
width: 28px;
}
.simditor.simditor-mobile .simditor-wrapper.toolbar-floating .simditor-toolbar {
position: absolute;
top: 0;
z-index: 10;
box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}
.simditor .simditor-body, .editor-style {
font-size: 14px;
font-family: arial, sans-serif;
line-height: 1.6;
color: #333;
outline: none;
word-wrap: break-word;
}
.simditor .simditor-body > :first-child, .editor-style > :first-child {
margin-top: 0 !important;
}
.simditor .simditor-body a, .editor-style a {
color: #4298BA;
text-decoration: none;
word-break: break-all;
}
.simditor .simditor-body a:visited, .editor-style a:visited {
color: #4298BA;
}
.simditor .simditor-body a:hover, .editor-style a:hover {
color: #0F769F;
}
.simditor .simditor-body a:active, .editor-style a:active {
color: #9E792E;
}
.simditor .simditor-body a:hover, .simditor .simditor-body a:active, .editor-style a:hover, .editor-style a:active {
outline: 0;
}
.simditor .simditor-body h1, .simditor .simditor-body h2, .simditor .simditor-body h3, .simditor .simditor-body h4, .simditor .simditor-body h5, .simditor .simditor-body h6, .editor-style h1, .editor-style h2, .editor-style h3, .editor-style h4, .editor-style h5, .editor-style h6 {
font-weight: normal;
margin: 36px 0 20px;
color: #000000;
}
.simditor .simditor-body h1, .editor-style h1 {
font-size: 24px;
}
.simditor .simditor-body h2, .editor-style h2 {
font-size: 22px;
}
.simditor .simditor-body h3, .editor-style h3 {
font-size: 20px;
}
.simditor .simditor-body h4, .editor-style h4 {
font-size: 18px;
}
.simditor .simditor-body h5, .editor-style h5 {
font-size: 16px;
}
.simditor .simditor-body h6, .editor-style h6 {
font-size: 16px;
}
.simditor .simditor-body p, .simditor .simditor-body div, .editor-style p, .editor-style div {
word-wrap: break-word;
margin: 0 0 10px 0;
color: #333;
word-wrap: break-word;
}
.simditor .simditor-body b, .simditor .simditor-body strong, .editor-style b, .editor-style strong {
font-weight: bold;
}
.simditor .simditor-body i, .simditor .simditor-body em, .editor-style i, .editor-style em {
font-style: italic;
}
.simditor .simditor-body u, .editor-style u {
text-decoration: underline;
}
.simditor .simditor-body strike, .simditor .simditor-body del, .editor-style strike, .editor-style del {
text-decoration: line-through;
}
.simditor .simditor-body ul, .simditor .simditor-body ol, .editor-style ul, .editor-style ol {
list-style: disc outside none;
margin: 15px 0;
padding: 0 0 0 36px;
line-height: 1.6;
}
.simditor .simditor-body ul li, .simditor .simditor-body ol li, .editor-style ul li, .editor-style ol li {
list-style-type: inherit;
}
.simditor .simditor-body ul ul, .simditor .simditor-body ul ol, .simditor .simditor-body ol ul, .simditor .simditor-body ol ol, .editor-style ul ul, .editor-style ul ol, .editor-style ol ul, .editor-style ol ol {
padding-left: 30px;
}
.simditor .simditor-body ul ul, .simditor .simditor-body ol ul, .editor-style ul ul, .editor-style ol ul {
list-style: circle outside none;
}
.simditor .simditor-body ul ul ul, .simditor .simditor-body ol ul ul, .editor-style ul ul ul, .editor-style ol ul ul {
list-style: square outside none;
}
.simditor .simditor-body ol, .editor-style ol {
list-style: decimal;
}
.simditor .simditor-body blockquote, .editor-style blockquote {
border-left: 6px solid #ddd;
padding: 5px 0 5px 10px;
margin: 15px 0 15px 15px;
}
.simditor .simditor-body blockquote > :first-child, .editor-style blockquote > :first-child {
margin-top: 0;
}
.simditor .simditor-body code, .editor-style code {
display: inline-block;
padding: 0 4px;
margin: 0 5px;
background: #eeeeee;
border-radius: 3px;
font-size: 13px;
font-family: 'monaco', 'Consolas', "Liberation Mono", Courier, monospace;
}
.simditor .simditor-body pre, .editor-style pre {
padding: 10px 5px 10px 10px;
margin: 15px 0;
display: block;
line-height: 18px;
background: #F0F0F0;
border-radius: 3px;
font-size: 13px;
font-family: 'monaco', 'Consolas', "Liberation Mono", Courier, monospace;
white-space: pre;
word-wrap: normal;
overflow-x: auto;
}
.simditor .simditor-body pre code, .editor-style pre code {
display: block;
padding: 0;
margin: 0;
background: none;
border-radius: 0;
}
.simditor .simditor-body hr, .editor-style hr {
display: block;
height: 0px;
border: 0;
border-top: 1px solid #ccc;
margin: 15px 0;
padding: 0;
}
.simditor .simditor-body table, .editor-style table {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
border-spacing: 0;
margin: 15px 0;
}
.simditor .simditor-body table thead, .editor-style table thead {
background-color: #f9f9f9;
}
.simditor .simditor-body table td, .simditor .simditor-body table th, .editor-style table td, .editor-style table th {
min-width: 36px;
height: 30px;
border: 1px solid #ccc;
vertical-align: top;
padding: 2px 4px;
text-align: left;
box-sizing: border-box;
}
.simditor .simditor-body table td.active, .simditor .simditor-body table th.active, .editor-style table td.active, .editor-style table th.active {
background-color: #ffffee;
}
.simditor .simditor-body img, .editor-style img {
margin: 0 5px;
vertical-align: middle;
}
... ...
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
define('simple-hotkeys', ["jquery","simple-module"], function ($, SimpleModule) {
return (root['hotkeys'] = factory($, SimpleModule));
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(require("jquery"),require("simple-module"));
} else {
root.simple = root.simple || {};
root.simple['hotkeys'] = factory(jQuery,SimpleModule);
}
}(this, function ($, SimpleModule) {
var Hotkeys, hotkeys,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
Hotkeys = (function(superClass) {
extend(Hotkeys, superClass);
function Hotkeys() {
return Hotkeys.__super__.constructor.apply(this, arguments);
}
Hotkeys.count = 0;
Hotkeys.keyNameMap = {
8: "Backspace",
9: "Tab",
13: "Enter",
16: "Shift",
17: "Control",
18: "Alt",
19: "Pause",
20: "CapsLock",
27: "Esc",
32: "Spacebar",
33: "PageUp",
34: "PageDown",
35: "End",
36: "Home",
37: "Left",
38: "Up",
39: "Right",
40: "Down",
45: "Insert",
46: "Del",
91: "Meta",
93: "Meta",
48: "0",
49: "1",
50: "2",
51: "3",
52: "4",
53: "5",
54: "6",
55: "7",
56: "8",
57: "9",
65: "A",
66: "B",
67: "C",
68: "D",
69: "E",
70: "F",
71: "G",
72: "H",
73: "I",
74: "J",
75: "K",
76: "L",
77: "M",
78: "N",
79: "O",
80: "P",
81: "Q",
82: "R",
83: "S",
84: "T",
85: "U",
86: "V",
87: "W",
88: "X",
89: "Y",
90: "Z",
96: "0",
97: "1",
98: "2",
99: "3",
100: "4",
101: "5",
102: "6",
103: "7",
104: "8",
105: "9",
106: "Multiply",
107: "Add",
109: "Subtract",
110: "Decimal",
111: "Divide",
112: "F1",
113: "F2",
114: "F3",
115: "F4",
116: "F5",
117: "F6",
118: "F7",
119: "F8",
120: "F9",
121: "F10",
122: "F11",
123: "F12",
124: "F13",
125: "F14",
126: "F15",
127: "F16",
128: "F17",
129: "F18",
130: "F19",
131: "F20",
132: "F21",
133: "F22",
134: "F23",
135: "F24",
59: ";",
61: "=",
186: ";",
187: "=",
188: ",",
190: ".",
191: "/",
192: "`",
219: "[",
220: "\\",
221: "]",
222: "'"
};
Hotkeys.aliases = {
"escape": "esc",
"delete": "del",
"return": "enter",
"ctrl": "control",
"space": "spacebar",
"ins": "insert",
"cmd": "meta",
"command": "meta",
"wins": "meta",
"windows": "meta"
};
Hotkeys.normalize = function(shortcut) {
var i, j, key, keyname, keys, len;
keys = shortcut.toLowerCase().replace(/\s+/gi, "").split("+");
for (i = j = 0, len = keys.length; j < len; i = ++j) {
key = keys[i];
keys[i] = this.aliases[key] || key;
}
keyname = keys.pop();
keys.sort().push(keyname);
return keys.join("_");
};
Hotkeys.prototype.opts = {
el: document
};
Hotkeys.prototype._init = function() {
this.id = ++this.constructor.count;
this._map = {};
this._delegate = typeof this.opts.el === "string" ? document : this.opts.el;
return $(this._delegate).on("keydown.simple-hotkeys-" + this.id, this.opts.el, (function(_this) {
return function(e) {
var ref;
return (ref = _this._getHander(e)) != null ? ref.call(_this, e) : void 0;
};
})(this));
};
Hotkeys.prototype._getHander = function(e) {
var keyname, shortcut;
if (!(keyname = this.constructor.keyNameMap[e.which])) {
return;
}
shortcut = "";
if (e.altKey) {
shortcut += "alt_";
}
if (e.ctrlKey) {
shortcut += "control_";
}
if (e.metaKey) {
shortcut += "meta_";
}
if (e.shiftKey) {
shortcut += "shift_";
}
shortcut += keyname.toLowerCase();
return this._map[shortcut];
};
Hotkeys.prototype.respondTo = function(subject) {
if (typeof subject === 'string') {
return this._map[this.constructor.normalize(subject)] != null;
} else {
return this._getHander(subject) != null;
}
};
Hotkeys.prototype.add = function(shortcut, handler) {
this._map[this.constructor.normalize(shortcut)] = handler;
return this;
};
Hotkeys.prototype.remove = function(shortcut) {
delete this._map[this.constructor.normalize(shortcut)];
return this;
};
Hotkeys.prototype.destroy = function() {
$(this._delegate).off(".simple-hotkeys-" + this.id);
this._map = {};
return this;
};
return Hotkeys;
})(SimpleModule);
hotkeys = function(opts) {
return new Hotkeys(opts);
};
return hotkeys;
}));
... ...
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
define('simple-module', ["jquery"], function (a0) {
return (root['Module'] = factory(a0));
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(require("jquery"));
} else {
root['SimpleModule'] = factory(jQuery);
}
}(this, function ($) {
var Module,
slice = [].slice;
Module = (function() {
Module.extend = function(obj) {
var key, ref, val;
if (!((obj != null) && typeof obj === 'object')) {
return;
}
for (key in obj) {
val = obj[key];
if (key !== 'included' && key !== 'extended') {
this[key] = val;
}
}
return (ref = obj.extended) != null ? ref.call(this) : void 0;
};
Module.include = function(obj) {
var key, ref, val;
if (!((obj != null) && typeof obj === 'object')) {
return;
}
for (key in obj) {
val = obj[key];
if (key !== 'included' && key !== 'extended') {
this.prototype[key] = val;
}
}
return (ref = obj.included) != null ? ref.call(this) : void 0;
};
Module.connect = function(cls) {
if (typeof cls !== 'function') {
return;
}
if (!cls.pluginName) {
throw new Error('Module.connect: cannot connect plugin without pluginName');
return;
}
cls.prototype._connected = true;
if (!this._connectedClasses) {
this._connectedClasses = [];
}
this._connectedClasses.push(cls);
if (cls.pluginName) {
return this[cls.pluginName] = cls;
}
};
Module.prototype.opts = {};
function Module(opts) {
var base, cls, i, instance, instances, len, name;
this.opts = $.extend({}, this.opts, opts);
(base = this.constructor)._connectedClasses || (base._connectedClasses = []);
instances = (function() {
var i, len, ref, results;
ref = this.constructor._connectedClasses;
results = [];
for (i = 0, len = ref.length; i < len; i++) {
cls = ref[i];
name = cls.pluginName.charAt(0).toLowerCase() + cls.pluginName.slice(1);
if (cls.prototype._connected) {
cls.prototype._module = this;
}
results.push(this[name] = new cls());
}
return results;
}).call(this);
if (this._connected) {
this.opts = $.extend({}, this.opts, this._module.opts);
} else {
this._init();
for (i = 0, len = instances.length; i < len; i++) {
instance = instances[i];
if (typeof instance._init === "function") {
instance._init();
}
}
}
this.trigger('initialized');
}
Module.prototype._init = function() {};
Module.prototype.on = function() {
var args, ref;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
(ref = $(this)).on.apply(ref, args);
return this;
};
Module.prototype.one = function() {
var args, ref;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
(ref = $(this)).one.apply(ref, args);
return this;
};
Module.prototype.off = function() {
var args, ref;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
(ref = $(this)).off.apply(ref, args);
return this;
};
Module.prototype.trigger = function() {
var args, ref;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
(ref = $(this)).trigger.apply(ref, args);
return this;
};
Module.prototype.triggerHandler = function() {
var args, ref;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return (ref = $(this)).triggerHandler.apply(ref, args);
};
Module.prototype._t = function() {
var args, ref;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return (ref = this.constructor)._t.apply(ref, args);
};
Module._t = function() {
var args, key, ref, result;
key = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
result = ((ref = this.i18n[this.locale]) != null ? ref[key] : void 0) || '';
if (!(args.length > 0)) {
return result;
}
result = result.replace(/([^%]|^)%(?:(\d+)\$)?s/g, function(p0, p, position) {
if (position) {
return p + args[parseInt(position) - 1];
} else {
return p + args.shift();
}
});
return result.replace(/%%s/g, '%s');
};
Module.i18n = {
'zh-CN': {}
};
Module.locale = 'zh-CN';
return Module;
})();
return Module;
}));
... ...
此 diff 太大无法显示。
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
define('simple-uploader', ["jquery","simple-module"], function ($, SimpleModule) {
return (root['uploader'] = factory($, SimpleModule));
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(require("jquery"),require("simple-module"));
} else {
root.simple = root.simple || {};
root.simple['uploader'] = factory(jQuery,SimpleModule);
}
}(this, function ($, SimpleModule) {
var Uploader, uploader,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
Uploader = (function(superClass) {
extend(Uploader, superClass);
function Uploader() {
return Uploader.__super__.constructor.apply(this, arguments);
}
Uploader.count = 0;
Uploader.prototype.opts = {
url: '',
params: null,
fileKey: 'upload_file',
connectionCount: 3
};
Uploader.prototype._init = function() {
this.files = [];
this.queue = [];
this.id = ++Uploader.count;
this.on('uploadcomplete', (function(_this) {
return function(e, file) {
_this.files.splice($.inArray(file, _this.files), 1);
if (_this.queue.length > 0 && _this.files.length < _this.opts.connectionCount) {
return _this.upload(_this.queue.shift());
} else if (_this.files.length === 0) {
return _this.uploading = false;
}
};
})(this));
return $(window).on('beforeunload.uploader-' + this.id, (function(_this) {
return function(e) {
if (!_this.uploading) {
return;
}
e.originalEvent.returnValue = _this._t('leaveConfirm');
return _this._t('leaveConfirm');
};
})(this));
};
Uploader.prototype.generateId = (function() {
var id;
id = 0;
return function() {
return id += 1;
};
})();
Uploader.prototype.upload = function(file, opts) {
var f, i, key, len;
if (opts == null) {
opts = {};
}
if (file == null) {
return;
}
if ($.isArray(file) || file instanceof FileList) {
for (i = 0, len = file.length; i < len; i++) {
f = file[i];
this.upload(f, opts);
}
} else if ($(file).is('input:file')) {
key = $(file).attr('name');
if (key) {
opts.fileKey = key;
}
this.upload($.makeArray($(file)[0].files), opts);
} else if (!file.id || !file.obj) {
file = this.getFile(file);
}
if (!(file && file.obj)) {
return;
}
$.extend(file, opts);
if (this.files.length >= this.opts.connectionCount) {
this.queue.push(file);
return;
}
if (this.triggerHandler('beforeupload', [file]) === false) {
return;
}
this.files.push(file);
this._xhrUpload(file);
return this.uploading = true;
};
Uploader.prototype.getFile = function(fileObj) {
var name, ref, ref1;
if (fileObj instanceof window.File || fileObj instanceof window.Blob) {
name = (ref = fileObj.fileName) != null ? ref : fileObj.name;
} else {
return null;
}
return {
id: this.generateId(),
url: this.opts.url,
params: this.opts.params,
fileKey: this.opts.fileKey,
name: name,
size: (ref1 = fileObj.fileSize) != null ? ref1 : fileObj.size,
ext: name ? name.split('.').pop().toLowerCase() : '',
obj: fileObj
};
};
Uploader.prototype._xhrUpload = function(file) {
var formData, k, ref, v;
formData = new FormData();
formData.append(file.fileKey, file.obj);
formData.append("original_filename", file.name);
if (file.params) {
ref = file.params;
for (k in ref) {
v = ref[k];
formData.append(k, v);
}
}
return file.xhr = $.ajax({
url: file.url,
data: formData,
processData: false,
contentType: false,
type: 'POST',
headers: {
'X-File-Name': encodeURIComponent(file.name)
},
xhr: function() {
var req;
req = $.ajaxSettings.xhr();
if (req) {
req.upload.onprogress = (function(_this) {
return function(e) {
return _this.progress(e);
};
})(this);
}
return req;
},
progress: (function(_this) {
return function(e) {
if (!e.lengthComputable) {
return;
}
return _this.trigger('uploadprogress', [file, e.loaded, e.total]);
};
})(this),
error: (function(_this) {
return function(xhr, status, err) {
return _this.trigger('uploaderror', [file, xhr, status]);
};
})(this),
success: (function(_this) {
return function(result) {
_this.trigger('uploadprogress', [file, file.size, file.size]);
_this.trigger('uploadsuccess', [file, result]);
return $(document).trigger('uploadsuccess', [file, result, _this]);
};
})(this),
complete: (function(_this) {
return function(xhr, status) {
return _this.trigger('uploadcomplete', [file, xhr.responseText]);
};
})(this)
});
};
Uploader.prototype.cancel = function(file) {
var f, i, len, ref;
if (!file.id) {
ref = this.files;
for (i = 0, len = ref.length; i < len; i++) {
f = ref[i];
if (f.id === file * 1) {
file = f;
break;
}
}
}
this.trigger('uploadcancel', [file]);
if (file.xhr) {
file.xhr.abort();
}
return file.xhr = null;
};
Uploader.prototype.readImageFile = function(fileObj, callback) {
var fileReader, img;
if (!$.isFunction(callback)) {
return;
}
img = new Image();
img.onload = function() {
return callback(img);
};
img.onerror = function() {
return callback();
};
if (window.FileReader && FileReader.prototype.readAsDataURL && /^image/.test(fileObj.type)) {
fileReader = new FileReader();
fileReader.onload = function(e) {
return img.src = e.target.result;
};
return fileReader.readAsDataURL(fileObj);
} else {
return callback();
}
};
Uploader.prototype.destroy = function() {
var file, i, len, ref;
this.queue.length = 0;
ref = this.files;
for (i = 0, len = ref.length; i < len; i++) {
file = ref[i];
this.cancel(file);
}
$(window).off('.uploader-' + this.id);
return $(document).off('.uploader-' + this.id);
};
Uploader.i18n = {
'zh-CN': {
leaveConfirm: '正在上传文件,如果离开上传会自动取消'
}
};
Uploader.locale = 'zh-CN';
return Uploader;
})(SimpleModule);
uploader = function(opts) {
return new Uploader(opts);
};
return uploader;
}));
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 关于我们
*
* @icon fa fa-circle-o
*/
class About extends Backend
{
/**
* About模型对象
* @var \app\admin\model\About
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\About;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 版本介绍
*
* @icon fa fa-circle-o
*/
class Banben extends Backend
{
/**
* Banben模型对象
* @var \app\admin\model\Banben
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Banben;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
use think\Config;
use think\console\Input;
use think\Db;
use think\Exception;
/**
* 在线命令管理
*
* @icon fa fa-circle-o
*/
class Command extends Backend
{
/**
* Command模型对象
*/
protected $model = null;
protected $noNeedRight = ['get_controller_list', 'get_field_list'];
public function _initialize()
{
parent::_initialize();
$this->model = model('Command');
$this->view->assign("statusList", $this->model->getStatusList());
}
/**
* 添加
*/
public function add()
{
$tableList = [];
$list = \think\Db::query("SHOW TABLES");
foreach ($list as $key => $row) {
$tableList[reset($row)] = reset($row);
}
$this->view->assign("tableList", $tableList);
return $this->view->fetch();
}
/**
* 获取字段列表
* @internal
*/
public function get_field_list()
{
$dbname = Config::get('database.database');
$prefix = Config::get('database.prefix');
$table = $this->request->request('table');
//从数据库中获取表字段信息
$sql = "SELECT * FROM `information_schema`.`columns` "
. "WHERE TABLE_SCHEMA = ? AND table_name = ? "
. "ORDER BY ORDINAL_POSITION";
//加载主表的列
$columnList = Db::query($sql, [$dbname, $table]);
$fieldlist = [];
foreach ($columnList as $index => $item) {
$fieldlist[] = $item['COLUMN_NAME'];
}
$this->success("", null, ['fieldlist' => $fieldlist]);
}
/**
* 获取控制器列表
* @internal
*/
public function get_controller_list()
{
//搜索关键词,客户端输入以空格分开,这里接收为数组
$word = (array)$this->request->request("q_word/a");
$word = implode('', $word);
$adminPath = dirname(__DIR__) . DS;
$controllerDir = $adminPath . 'controller' . DS;
$files = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($controllerDir), \RecursiveIteratorIterator::LEAVES_ONLY
);
$list = [];
foreach ($files as $name => $file) {
if (!$file->isDir()) {
$filePath = $file->getRealPath();
$name = str_replace($controllerDir, '', $filePath);
$name = str_replace(DS, "/", $name);
if (!preg_match("/(.*)\.php\$/", $name)) {
continue;
}
if (!$word || stripos($name, $word) !== false) {
$list[] = ['id' => $name, 'name' => $name];
}
}
}
$pageNumber = $this->request->request("pageNumber");
$pageSize = $this->request->request("pageSize");
return json(['list' => array_slice($list, ($pageNumber - 1) * $pageSize, $pageSize), 'total' => count($list)]);
}
/**
* 详情
*/
public function detail($ids)
{
$row = $this->model->get($ids);
if (!$row) {
$this->error(__('No Results were found'));
}
$this->view->assign("row", $row);
return $this->view->fetch();
}
/**
* 执行
*/
public function execute($ids)
{
$row = $this->model->get($ids);
if (!$row) {
$this->error(__('No Results were found'));
}
$result = $this->doexecute($row['type'], json_decode($row['params'], true));
$this->success("", null, ['result' => $result]);
}
/**
* 执行命令
*/
public function command($action = '')
{
$commandtype = $this->request->request("commandtype");
$params = $this->request->request();
$allowfields = [
'crud' => 'table,controller,model,fields,force,local,delete,menu',
'menu' => 'controller,delete',
'min' => 'module,resource,optimize',
'api' => 'url,module,output,template,force,title,author,class,language',
];
$argv = [];
$allowfields = isset($allowfields[$commandtype]) ? explode(',', $allowfields[$commandtype]) : [];
$allowfields = array_filter(array_intersect_key($params, array_flip($allowfields)));
if (isset($params['local']) && !$params['local']) {
$allowfields['local'] = $params['local'];
} else {
unset($allowfields['local']);
}
foreach ($allowfields as $key => $param) {
$argv[] = "--{$key}=" . (is_array($param) ? implode(',', $param) : $param);
}
if ($commandtype == 'crud') {
$extend = 'setcheckboxsuffix,enumradiosuffix,imagefield,filefield,intdatesuffix,switchsuffix,citysuffix,selectpagesuffix,selectpagessuffix,ignorefields,sortfield,editorsuffix,headingfilterfield';
$extendArr = explode(',', $extend);
foreach ($params as $index => $item) {
if (in_array($index, $extendArr)) {
foreach (explode(',', $item) as $key => $value) {
if ($value) {
$argv[] = "--{$index}={$value}";
}
}
}
}
$isrelation = (int)$this->request->request('isrelation');
if ($isrelation && isset($params['relation'])) {
foreach ($params['relation'] as $index => $relation) {
foreach ($relation as $key => $value) {
$argv[] = "--{$key}=" . (is_array($value) ? implode(',', $value) : $value);
}
}
}
} else {
if ($commandtype == 'menu') {
if (isset($params['allcontroller']) && $params['allcontroller']) {
$argv[] = "--controller=all-controller";
} else {
foreach (explode(',', $params['controllerfile']) as $index => $param) {
if ($param) {
$argv[] = "--controller=" . substr($param, 0, -4);
}
}
}
} else {
if ($commandtype == 'min') {
} else {
if ($commandtype == 'api') {
} else {
}
}
}
}
if ($action == 'execute') {
$result = $this->doexecute($commandtype, $argv);
$this->success("", null, ['result' => $result]);
} else {
$this->success("", null, ['command' => "php think {$commandtype} " . implode(' ', $argv)]);
}
return;
}
protected function doexecute($commandtype, $argv)
{
$commandName = "\\app\\admin\\command\\" . ucfirst($commandtype);
$input = new Input($argv);
$output = new \addons\command\library\Output();
$command = new $commandName($commandtype);
$data = [
'type' => $commandtype,
'params' => json_encode($argv),
'command' => "php think {$commandtype} " . implode(' ', $argv),
'executetime' => time(),
];
$this->model->save($data);
try {
$command->run($input, $output);
$result = implode("\n", $output->getMessage());
$this->model->status = 'successed';
} catch (Exception $e) {
$result = implode("\n", $output->getMessage()) . "\n";
$result .= $e->getMessage();
$this->model->status = 'failured';
}
$result = trim($result);
$this->model->content = $result;
$this->model->save();
return $result;
}
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 日签管理
*
* @icon fa fa-circle-o
*/
class Day extends Backend
{
/**
* Day模型对象
* @var \app\admin\model\Day
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Day;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 用户日记管理
*
* @icon fa fa-circle-o
*/
class Diary extends Backend
{
/**
* Diary模型对象
* @var \app\admin\model\Diary
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Diary;
$this->view->assign("statusList", $this->model->getStatusList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax()) {
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('keyField')) {
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$list = $this->model
->with(['user','isclass','isclassson','type'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('user')->visible(['nickname','avatar']);
$row->getRelation('isclass')->visible(['isclass']);
$row->getRelation('isclassson')->visible(['isclass_son']);
$row->getRelation('type')->visible(['type']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 一级分类
*
* @icon fa fa-circle-o
*/
class Isclass extends Backend
{
/**
* Isclass模型对象
* @var \app\admin\model\Isclass
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Isclass;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 二级分类
*
* @icon fa fa-circle-o
*/
class IsclassSon extends Backend
{
/**
* IsclassSon模型对象
* @var \app\admin\model\IsclassSon
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\IsclassSon;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax()) {
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('keyField')) {
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$list = $this->model
->with(['isclass'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('isclass')->visible(['isclass']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 联系客服
*
* @icon fa fa-circle-o
*/
class Kf extends Backend
{
/**
* Kf模型对象
* @var \app\admin\model\Kf
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Kf;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 首页设置
*
* @icon fa fa-circle-o
*/
class Miniappindex extends Backend
{
/**
* Miniappindex模型对象
* @var \app\admin\model\Miniappindex
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Miniappindex;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 积分设置
*
* @icon fa fa-circle-o
*/
class Num extends Backend
{
/**
* Num模型对象
* @var \app\admin\model\Num
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Num;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 日签二维码
*
* @icon fa fa-qrcode
*/
class Qrcode extends Backend
{
/**
* Qrcode模型对象
* @var \app\admin\model\Qrcode
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Qrcode;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 问题设置
*
* @icon fa fa-question
*/
class Question extends Backend
{
/**
* Question模型对象
* @var \app\admin\model\Question
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Question;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 日记类型
*
* @icon fa fa-circle-o
*/
class Type extends Backend
{
/**
* Type模型对象
* @var \app\admin\model\Type
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\Type;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
namespace app\admin\controller;
use app\common\controller\Backend;
/**
* 用户管理
*
* @icon fa fa-user
*/
class User extends Backend
{
/**
* User模型对象
* @var \app\admin\model\User
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\User;
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}
... ...
<?php
return [
'Id' => 'ID',
'Content' => '富文本'
];
... ...
<?php
return [
'Id' => 'ID',
'Title' => '标题',
'Content' => '富文本',
'Createtime' => '创建时间'
];
... ...
<?php
return [
'Id' => 'ID',
'Type' => '类型',
'Params' => '参数',
'Command' => '命令',
'Content' => '返回结果',
'Executetime' => '执行时间',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Execute again' => '再次执行',
'Successed' => '成功',
'Failured' => '失败',
'Status' => '状态'
];
... ...
<?php
return [
'Id' => 'ID',
'Image' => '日签图',
'Title' => '标题',
'Content' => '内容'
];
... ...
<?php
return [
'Id' => 'ID',
'User_id' => '用户ID',
'Content' => '日记内容',
'Isclass_id' => '日记一级分类',
'Isclass_son_id' => '日记二级分类',
'Num' => '积分',
'Other' => '1=加,0=减',
'Status' => '可见范围',
'Status 1' => '仅自己',
'Status 2' => '分享可见',
'Con' => '认知反驳/认知预演',
'Createtime' => '创建时间',
'Updatetime' => '更改时间',
'Type_id' => '日记类型',
'User.nickname' => '微信名',
'User.avatar' => '头像',
'Isclass.isclass' => '一级分类',
'Isclassson.isclass_son' => '二级分类',
'Type.type' => '日记类型'
];
... ...
<?php
return [
'Id' => 'ID',
'Isclass' => '一级分类',
'Createtime' => '创建时间',
'Updatetime' => '更改时间'
];
... ...
<?php
return [
'Id' => 'ID',
'Isclass_id' => '一级ID',
'Isclass_son' => '二级分类',
'Createtime' => '创建时间',
'Updatetime' => '更改时间',
'Isclass.isclass' => '一级分类'
];
... ...
<?php
return [
'Id' => 'ID',
'We_image' => '公众号二维码',
'Kf_image' => '客服二维码',
'Wx' => '客服微信号',
'Createtime' => '创建时间',
'Updatetime' => '更改时间'
];
... ...
<?php
return [
'Id' => 'ID',
'Content' => '首页标语',
'Video_file' => '视频',
'Title' => '积极课堂标题',
'Createtime' => '创建时间',
'Updatetime' => '更改时间'
];
... ...
<?php
return [
'Id' => 'ID',
'Num' => '积分设置',
'Createtime' => '创建时间',
'Updatetime' => '更改时间'
];
... ...
<?php
return [
'Id' => 'ID',
'Image' => '二维码'
];
... ...
<?php
return [
'Id' => 'ID',
'Question' => '问题',
'Video_file' => '视频文件',
'Title' => '标题',
'Content' => '富文本',
'Createtime' => '创建时间',
'Updatetime' => '更改时间'
];
... ...
<?php
return [
'Id' => 'ID',
'Type' => '日记类型',
'Image' => '图标'
];
... ...
<?php
return [
'Id' => 'ID',
'Openid' => 'OPENID',
'Token' => 'Token',
'Nickname' => '微信名',
'Avatar' => '头像'
];
... ...
<?php
namespace app\admin\model;
use think\Model;
class About extends Model
{
// 表名
protected $name = 'about';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Banben extends Model
{
// 表名
protected $name = 'banben';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Command extends Model
{
// 表名
protected $name = 'command';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
// 追加属性
protected $append = [
'executetime_text',
'type_text',
'status_text'
];
public function getStatusList()
{
return ['successed' => __('Successed'), 'failured' => __('Failured')];
}
public function getExecutetimeTextAttr($value, $data)
{
$value = $value ? $value : $data['executetime'];
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getTypeTextAttr($value, $data)
{
$value = $value ? $value : $data['type'];
$list = ['crud' => '一键生成CRUD', 'menu' => '一键生成菜单', 'min' => '一键压缩打包', 'api' => '一键生成文档'];
return isset($list[$value]) ? $list[$value] : '';
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : $data['status'];
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setExecutetimeAttr($value)
{
return $value && !is_numeric($value) ? strtotime($value) : $value;
}
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Day extends Model
{
// 表名
protected $name = 'day';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Diary extends Model
{
// 表名
protected $name = 'diary';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
'status_text'
];
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function user()
{
return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function isclass()
{
return $this->belongsTo('Isclass', 'isclass_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function isclassson()
{
return $this->belongsTo('IsclassSon', 'isclass_son_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function type()
{
return $this->belongsTo('Type', 'type_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Isclass extends Model
{
// 表名
protected $name = 'isclass';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class IsclassSon extends Model
{
// 表名
protected $name = 'isclass_son';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
public function isclass()
{
return $this->belongsTo('Isclass', 'isclass_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Kf extends Model
{
// 表名
protected $name = 'kf';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Miniappindex extends Model
{
// 表名
protected $name = 'miniappindex';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Num extends Model
{
// 表名
protected $name = 'num';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Qrcode extends Model
{
// 表名
protected $name = 'qrcode';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Question extends Model
{
// 表名
protected $name = 'question';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model;
use think\Model;
class Type extends Model
{
// 表名
protected $name = 'type';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
... ... @@ -2,113 +2,39 @@
namespace app\admin\model;
use app\common\model\MoneyLog;
use app\common\model\ScoreLog;
use think\Model;
class User extends Model
{
// 表名
protected $name = 'user';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'prevtime_text',
'logintime_text',
'jointime_text'
];
public function getOriginData()
{
return $this->origin;
}
protected static function init()
{
self::beforeUpdate(function ($row) {
$changed = $row->getChangedData();
//如果有修改密码
if (isset($changed['password'])) {
if ($changed['password']) {
$salt = \fast\Random::alnum();
$row->password = \app\common\library\Auth::instance()->getEncryptPassword($changed['password'], $salt);
$row->salt = $salt;
} else {
unset($row->password);
}
}
});
self::beforeUpdate(function ($row) {
$changedata = $row->getChangedData();
if (isset($changedata['money'])) {
$origin = $row->getOriginData();
MoneyLog::create(['user_id' => $row['id'], 'money' => $changedata['money'] - $origin['money'], 'before' => $origin['money'], 'after' => $changedata['money'], 'memo' => '管理员变更金额']);
}
if (isset($changedata['score'])) {
$origin = $row->getOriginData();
ScoreLog::create(['user_id' => $row['id'], 'score' => $changedata['score'] - $origin['score'], 'before' => $origin['score'], 'after' => $changedata['score'], 'memo' => '管理员变更积分']);
}
});
}
public function getGenderList()
{
return ['1' => __('Male'), '0' => __('Female')];
}
public function getStatusList()
{
return ['normal' => __('Normal'), 'hidden' => __('Hidden')];
}
public function getPrevtimeTextAttr($value, $data)
{
$value = $value ? $value : $data['prevtime'];
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getLogintimeTextAttr($value, $data)
{
$value = $value ? $value : $data['logintime'];
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getJointimeTextAttr($value, $data)
{
$value = $value ? $value : $data['jointime'];
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setPrevtimeAttr($value)
{
return $value && !is_numeric($value) ? strtotime($value) : $value;
}
protected function setLogintimeAttr($value)
{
return $value && !is_numeric($value) ? strtotime($value) : $value;
}
protected function setJointimeAttr($value)
{
return $value && !is_numeric($value) ? strtotime($value) : $value;
}
protected function setBirthdayAttr($value)
{
return $value ? $value : null;
}
public function group()
{
return $this->belongsTo('UserGroup', 'group_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class About extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Banben extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Command extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Day extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Diary extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Isclass extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class IsclassSon extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Kf extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Miniappindex extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Num extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Qrcode extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Question extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate;
use think\Validate;
class Type extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
... ... @@ -10,17 +10,6 @@ class User extends Validate
* 验证规则
*/
protected $rule = [
'username' => 'require|regex:\w{3,32}|unique:user',
'nickname' => 'require|unique:user',
'password' => 'regex:\S{6,32}',
'email' => 'require|email|unique:user',
'mobile' => 'unique:user'
];
/**
* 字段描述
*/
protected $field = [
];
/**
* 提示消息
... ... @@ -32,19 +21,7 @@ class User extends Validate
*/
protected $scene = [
'add' => [],
'edit' => ['username', 'email', 'nickname', 'password', 'email', 'mobile'],
'edit' => [],
];
public function __construct(array $rules = [], $message = [], $field = [])
{
$this->field = [
'username' => __('Username'),
'nickname' => __('Nickname'),
'password' => __('Password'),
'email' => __('Email'),
'mobile' => __('Mobile')
];
parent::__construct($rules, $message, $field);
}
}
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group 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 disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
</div>
</div>
<div class="form-group 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 disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<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">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<!--<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('about/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('about/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('about/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('about/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<!--<div class="dropdown btn-group {:$auth->check('about/multi')?'':'hide'}">-->
<!--<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 table-nowrap"
data-operate-edit="{:$auth->check('about/edit')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group 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 disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
</div>
</div>
<div class="form-group 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 disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<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">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('banben/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('banben/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('banben/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!--<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('banben/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<!--<div class="dropdown btn-group {:$auth->check('banben/multi')?'':'hide'}">-->
<!--<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 table-nowrap"
data-operate-edit="{:$auth->check('banben/edit')}"
data-operate-del="{:$auth->check('banben/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<style>
.relation-item {margin-top:10px;}
legend {padding-bottom:5px;font-size:14px;font-weight:600;}
label {font-weight:normal;}
.form-control{padding:6px 8px;}
#extend-zone .col-xs-2 {margin-top:10px;padding-right:0;}
#extend-zone .col-xs-2:nth-child(6n+0) {padding-right:15px;}
</style>
<div class="panel panel-default panel-intro">
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href="#crud" data-toggle="tab">{:__('一键生成CRUD')}</a></li>
<li><a href="#menu" data-toggle="tab">{:__('一键生成菜单')}</a></li>
<li><a href="#min" data-toggle="tab">{:__('一键压缩打包')}</a></li>
<li><a href="#api" data-toggle="tab">{:__('一键生成API文档')}</a></li>
</ul>
</div>
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="crud">
<div class="row">
<div class="col-xs-12">
<form role="form">
<input type="hidden" name="commandtype" value="crud" />
<div class="form-group">
<div class="row">
<div class="col-xs-3">
<input checked="" name="isrelation" type="hidden" value="0">
<label class="control-label" data-toggle="tooltip" title="当前只支持生成1对1关联模型,选中后请配置关联表和字段">
<input name="isrelation" type="checkbox" value="1">
关联模型
</label>
</div>
<div class="col-xs-3">
<input checked="" name="local" type="hidden" value="1">
<label class="control-label" data-toggle="tooltip" title="默认模型生成在application/admin/model目录下,选中后将生成在application/common/model目录下">
<input name="local" type="checkbox" value="0"> 全局模型类
</label>
</div>
<div class="col-xs-3">
<input checked="" name="delete" type="hidden" value="0">
<label class="control-label" data-toggle="tooltip" title="删除CRUD生成的相关文件">
<input name="delete" type="checkbox" value="1"> 删除模式
</label>
</div>
<div class="col-xs-3">
<input checked="" name="force" type="hidden" value="0">
<label class="control-label" data-toggle="tooltip" title="选中后,如果已经存在同名文件将被覆盖。如果是删除将不再提醒">
<input name="force" type="checkbox" value="1">
强制覆盖模式
</label>
</div>
<!--
<div class="col-xs-3">
<input checked="" name="menu" type="hidden" value="0">
<label class="control-label" data-toggle="tooltip" title="选中后,将同时生成后台菜单规则">
<input name="menu" type="checkbox" value="1">
生成菜单
</label>
</div>
-->
</div>
</div>
<div class="form-group">
<legend>主表设置</legend>
<div class="row">
<div class="col-xs-3">
<label>请选择主表</label>
{:build_select('table',$tableList,null,['class'=>'form-control selectpicker', 'data-live-search'=>'true']);}
</div>
<div class="col-xs-3">
<label>自定义控制器名</label>
<input type="text" class="form-control" name="controller" data-toggle="tooltip" title="默认根据表名自动生成,如果需要放在二级目录请手动填写" placeholder="支持目录层级,以/分隔">
</div>
<div class="col-xs-3">
<label>自定义模型名</label>
<input type="text" class="form-control" name="model" data-toggle="tooltip" title="默认根据表名自动生成" placeholder="不支持目录层级">
</div>
<div class="col-xs-3">
<label>请选择显示字段(默认全部)</label>
<select name="fields[]" id="fields" multiple style="height:30px;" class="form-control selectpicker"></select>
</div>
</div>
</div>
<div class="form-group hide" id="relation-zone">
<legend>关联表设置</legend>
<div class="row" style="margin-top:15px;">
<div class="col-xs-12">
<a href="javascript:;" class="btn btn-primary btn-sm btn-newrelation" data-index="1">追加关联模型</a>
</div>
</div>
</div>
<hr>
<div class="form-group" id="extend-zone">
<legend>字段识别设置 <span style="font-size:12px;font-weight: normal;">(与之匹配的字段都将生成相应组件)</span></legend>
<div class="row">
<div class="col-xs-2">
<label>复选框后缀</label>
<input type="text" class="form-control" name="setcheckboxsuffix" placeholder="默认为set类型" />
</div>
<div class="col-xs-2">
<label>单选框后缀</label>
<input type="text" class="form-control" name="enumradiosuffix" placeholder="默认为enum类型" />
</div>
<div class="col-xs-2">
<label>图片类型后缀</label>
<input type="text" class="form-control" name="imagefield" placeholder="默认为image,images,avatar,avatars" />
</div>
<div class="col-xs-2">
<label>文件类型后缀</label>
<input type="text" class="form-control" name="filefield" placeholder="默认为file,files" />
</div>
<div class="col-xs-2">
<label>日期时间后缀</label>
<input type="text" class="form-control" name="intdatesuffix" placeholder="默认为time" />
</div>
<div class="col-xs-2">
<label>开关后缀</label>
<input type="text" class="form-control" name="switchsuffix" placeholder="默认为switch" />
</div>
<div class="col-xs-2">
<label>城市选择后缀</label>
<input type="text" class="form-control" name="citysuffix" placeholder="默认为city" />
</div>
<div class="col-xs-2">
<label>动态下拉后缀(单)</label>
<input type="text" class="form-control" name="selectpagesuffix" placeholder="默认为_id" />
</div>
<div class="col-xs-2">
<label>动态下拉后缀(多)</label>
<input type="text" class="form-control" name="selectpagessuffix" placeholder="默认为_ids" />
</div>
<div class="col-xs-2">
<label>忽略的字段</label>
<input type="text" class="form-control" name="ignorefields" placeholder="默认无" />
</div>
<div class="col-xs-2">
<label>排序字段</label>
<input type="text" class="form-control" name="sortfield" placeholder="默认为weigh" />
</div>
<div class="col-xs-2">
<label>富文本编辑器</label>
<input type="text" class="form-control" name="editorsuffix" placeholder="默认为content" />
</div>
<div class="col-xs-2">
<label>选项卡过滤字段</label>
<input type="text" class="form-control" name="headingfilterfield" placeholder="默认为status" />
</div>
</div>
</div>
<div class="form-group">
<legend>生成命令行</legend>
<textarea class="form-control" data-toggle="tooltip" title="如果在线执行命令失败,可以将命令复制到命令行进行执行" rel="command" rows="1" placeholder="请点击生成命令行"></textarea>
</div>
<div class="form-group">
<legend>返回结果</legend>
<textarea class="form-control" rel="result" rows="5" placeholder="请点击立即执行"></textarea>
</div>
<div class="form-group">
<button type="button" class="btn btn-info btn-embossed btn-command">{:__('生成命令行')}</button>
<button type="button" class="btn btn-success btn-embossed btn-execute">{:__('立即执行')}</button>
</div>
</form>
</div>
</div>
</div>
<div class="tab-pane fade" id="menu">
<div class="row">
<div class="col-xs-12">
<form role="form">
<input type="hidden" name="commandtype" value="menu" />
<div class="form-group">
<div class="row">
<div class="col-xs-3">
<input checked="" name="allcontroller" type="hidden" value="0">
<label class="control-label">
<input name="allcontroller" data-toggle="collapse" data-target="#controller" type="checkbox" value="1"> 一键生成全部控制器
</label>
</div>
<div class="col-xs-3">
<input checked="" name="delete" type="hidden" value="0">
<label class="control-label">
<input name="delete" type="checkbox" value="1"> 删除模式
</label>
</div>
<div class="col-xs-3">
<input checked="" name="force" type="hidden" value="0">
<label class="control-label">
<input name="force" type="checkbox" value="1"> 强制覆盖模式
</label>
</div>
</div>
</div>
<div class="form-group in" id="controller">
<legend>控制器设置</legend>
<div class="row" style="margin-top:15px;">
<div class="col-xs-12">
<input type="text" name="controllerfile" class="form-control selectpage" style="width:720px;" data-source="command/get_controller_list" data-multiple="true" name="controller" placeholder="请选择控制器" />
</div>
</div>
</div>
<div class="form-group">
<legend>生成命令行</legend>
<textarea class="form-control" rel="command" rows="1" placeholder="请点击生成命令行"></textarea>
</div>
<div class="form-group">
<legend>返回结果</legend>
<textarea class="form-control" rel="result" rows="5" placeholder="请点击立即执行"></textarea>
</div>
<div class="form-group">
<button type="button" class="btn btn-info btn-embossed btn-command">{:__('生成命令行')}</button>
<button type="button" class="btn btn-success btn-embossed btn-execute">{:__('立即执行')}</button>
</div>
</form>
</div>
</div>
</div>
<div class="tab-pane fade" id="min">
<div class="row">
<div class="col-xs-12">
<form role="form">
<input type="hidden" name="commandtype" value="min" />
<div class="form-group">
<legend>基础设置</legend>
<div class="row">
<div class="col-xs-3">
<label>请选择压缩模块</label>
<select name="module" class="form-control selectpicker">
<option value="all" selected>全部</option>
<option value="backend">后台Backend</option>
<option value="frontend">前台Frontend</option>
</select>
</div>
<div class="col-xs-3">
<label>请选择压缩资源</label>
<select name="resource" class="form-control selectpicker">
<option value="all" selected>全部</option>
<option value="js">JS</option>
<option value="css">CSS</option>
</select>
</div>
<div class="col-xs-3">
<label>请选择压缩模式</label>
<select name="optimize" class="form-control selectpicker">
<option value=""></option>
<option value="uglify">uglify</option>
<option value="closure">closure</option>
</select>
</div>
</div>
</div>
<div class="form-group in">
<legend>控制器设置</legend>
<div class="row" style="margin-top:15px;">
<div class="col-xs-12">
</div>
</div>
</div>
<div class="form-group">
<legend>生成命令行</legend>
<textarea class="form-control" rel="command" rows="1" placeholder="请点击生成命令行"></textarea>
</div>
<div class="form-group">
<legend>返回结果</legend>
<textarea class="form-control" rel="result" rows="5" placeholder="请点击立即执行"></textarea>
</div>
<div class="form-group">
<button type="button" class="btn btn-info btn-embossed btn-command">{:__('生成命令行')}</button>
<button type="button" class="btn btn-success btn-embossed btn-execute">{:__('立即执行')}</button>
</div>
</form>
</div>
</div>
</div>
<div class="tab-pane fade" id="api">
<div class="row">
<div class="col-xs-12">
<form role="form">
<input type="hidden" name="commandtype" value="api" />
<div class="form-group">
<div class="row">
<div class="col-xs-3">
<input checked="" name="force" type="hidden" value="0">
<label class="control-label">
<input name="force" type="checkbox" value="1">
覆盖模式
</label>
</div>
</div>
</div>
<div class="form-group">
<legend>文档设置</legend>
<div class="row">
<div class="col-xs-3">
<label>请输入接口URL</label>
<input type="text" name="url" class="form-control" placeholder="API URL,可留空" />
</div>
<div class="col-xs-3">
<label>接口生成文件</label>
<input type="text" name="output" class="form-control" placeholder="留空则使用api.html" />
</div>
<div class="col-xs-3">
<label>模板文件</label>
<input type="text" name="template" class="form-control" placeholder="如果不清楚请留空" />
</div>
</div>
<div class="row" style="margin-top:10px;">
<div class="col-xs-3">
<label>文档标题</label>
<input type="text" name="title" class="form-control" placeholder="默认为FastAdmin" />
</div>
<div class="col-xs-3">
<label>文档作者</label>
<input type="text" name="author" class="form-control" placeholder="默认为FastAdmin" />
</div>
<div class="col-xs-3">
<label>文档语言</label>
<select name="language" class="form-control">
<option value="" selected>请选择语言</option>
<option value="zh-cn">中文</option>
<option value="en">英文</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<legend>生成命令行</legend>
<textarea class="form-control" rel="command" rows="1" placeholder="请点击生成命令行"></textarea>
</div>
<div class="form-group">
<legend>返回结果</legend>
<textarea class="form-control" rel="result" rows="5" placeholder="请点击立即执行"></textarea>
</div>
<div class="form-group">
<button type="button" class="btn btn-info btn-embossed btn-command">{:__('生成命令行')}</button>
<button type="button" class="btn btn-success btn-embossed btn-execute">{:__('立即执行')}</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script id="relationtpl" type="text/html">
<div class="row relation-item">
<div class="col-xs-2">
<label>请选择关联表</label>
<select name="relation[<%=index%>][relation]" class="form-control relationtable" data-live-search="true"></select>
</div>
<div class="col-xs-2">
<label>请选择关联类型</label>
<select name="relation[<%=index%>][relationmode]" class="form-control relationmode"></select>
</div>
<div class="col-xs-2">
<label>关联外键</label>
<select name="relation[<%=index%>][relationforeignkey]" class="form-control relationforeignkey"></select>
</div>
<div class="col-xs-2">
<label>关联主键</label>
<select name="relation[<%=index%>][relationprimarykey]" class="form-control relationprimarykey"></select>
</div>
<div class="col-xs-2">
<label>请选择显示字段</label>
<select name="relation[<%=index%>][relationfields][]" multiple class="form-control relationfields"></select>
</div>
<div class="col-xs-2">
<label>&nbsp;</label>
<a href="javascript:;" class="btn btn-danger btn-block btn-removerelation">移除</a>
</div>
</div>
</script>
... ...