mirror of https://gitee.com/karson/fastadmin.git
Compare commits
163 Commits
master
...
v1.5.3.202
| Author | SHA1 | Date |
|---|---|---|
|
|
31c3d7b469 | |
|
|
017c7687c3 | |
|
|
2bd2fd5684 | |
|
|
71d15964fd | |
|
|
7a81b078f3 | |
|
|
516c18116a | |
|
|
00c5561c49 | |
|
|
0882b94683 | |
|
|
420b82f6fb | |
|
|
8e3582a392 | |
|
|
b0a44db6d8 | |
|
|
4efc5056a5 | |
|
|
4b9643e967 | |
|
|
8a50431006 | |
|
|
1276d44e48 | |
|
|
d7c3bc90ea | |
|
|
279d8d876f | |
|
|
17931decd5 | |
|
|
4fd2558a8b | |
|
|
be3c601b72 | |
|
|
a5a0a30d07 | |
|
|
426209a5d5 | |
|
|
385a33344c | |
|
|
142ed14afa | |
|
|
cfd8a6a295 | |
|
|
7763aefd61 | |
|
|
16ae2acb2c | |
|
|
63cdd2ad25 | |
|
|
04af4aa1c0 | |
|
|
f4a14c6295 | |
|
|
d6635c1cd6 | |
|
|
3e6ffdf276 | |
|
|
4e28f319b7 | |
|
|
73686e38c8 | |
|
|
986cc85be3 | |
|
|
f01d11d02b | |
|
|
77300998fc | |
|
|
a5025fd1b1 | |
|
|
f57cf5ce80 | |
|
|
c12e304aec | |
|
|
0fb49c1a9a | |
|
|
d12f549396 | |
|
|
7c7780bc56 | |
|
|
b0d295bd67 | |
|
|
3ee684875f | |
|
|
b6ae55ef1e | |
|
|
38969376c9 | |
|
|
1496698d46 | |
|
|
25c0490285 | |
|
|
e8d65eb124 | |
|
|
271596ee2d | |
|
|
6ab795e12f | |
|
|
ac25e4b275 | |
|
|
64c157f56a | |
|
|
b72b5605e5 | |
|
|
db8739670c | |
|
|
e7c96a994b | |
|
|
c4499a3266 | |
|
|
372be26dd2 | |
|
|
ccf6bd9a98 | |
|
|
feed46823f | |
|
|
cc4c0ab3ed | |
|
|
ddccd51105 | |
|
|
6d82e89ff6 | |
|
|
1a8f81cc35 | |
|
|
de5c92e78a | |
|
|
d4c866cb55 | |
|
|
47c4115a53 | |
|
|
5a29c4eeed | |
|
|
7898b811b2 | |
|
|
0de3858c90 | |
|
|
76024147aa | |
|
|
9cf5b91143 | |
|
|
1b9c035daf | |
|
|
8caeeb8a78 | |
|
|
684e6704e8 | |
|
|
afa636ba15 | |
|
|
e37103f8f3 | |
|
|
1cc09a5a19 | |
|
|
80fdc19c8e | |
|
|
03a0e0dd4e | |
|
|
fb5b78e777 | |
|
|
20dea7cb5b | |
|
|
57c2f23106 | |
|
|
b44f3791b1 | |
|
|
4f466551e2 | |
|
|
1066b4108b | |
|
|
4badf65bd2 | |
|
|
5d8da63740 | |
|
|
198604c584 | |
|
|
e0f684a0c3 | |
|
|
c8404c7096 | |
|
|
d5b07d49cb | |
|
|
c846402a79 | |
|
|
d7302f2602 | |
|
|
6f35aff2eb | |
|
|
6b4cdff2e0 | |
|
|
9bbd11e4bc | |
|
|
8947877915 | |
|
|
611d9d1a2e | |
|
|
db510531f4 | |
|
|
7fe625cf5b | |
|
|
dd63aa5948 | |
|
|
85271d1cf7 | |
|
|
a64cf1173f | |
|
|
927510f5ad | |
|
|
c7da57a109 | |
|
|
35d6514381 | |
|
|
3831955b9b | |
|
|
4dabb80044 | |
|
|
96dd46d32d | |
|
|
0e75d1d6cd | |
|
|
3c575e2383 | |
|
|
b50e6c9cf0 | |
|
|
25832b2a0e | |
|
|
89ab1dd690 | |
|
|
031cd59bcd | |
|
|
09bdafd65c | |
|
|
568fd9073b | |
|
|
c1236b17da | |
|
|
3c32166b3b | |
|
|
5e6c32e04c | |
|
|
563596fddc | |
|
|
900db646ee | |
|
|
11290c1724 | |
|
|
9b0db19326 | |
|
|
67aa9df53a | |
|
|
eb66ecb256 | |
|
|
fdaf86ce92 | |
|
|
5b9130a459 | |
|
|
1afdacbcd9 | |
|
|
f49c0ae11b | |
|
|
1dfd1cc66b | |
|
|
db487a52df | |
|
|
d596d4b4a7 | |
|
|
c4e726ff3a | |
|
|
731f27e0d5 | |
|
|
fe9029beac | |
|
|
ab7ebc3787 | |
|
|
cb0fbe022c | |
|
|
c69ba1aea3 | |
|
|
2c09a10786 | |
|
|
7cb8fec4ab | |
|
|
e4cb165c35 | |
|
|
52c83348bc | |
|
|
c9ef6b9780 | |
|
|
4865816388 | |
|
|
cecf1ad1cd | |
|
|
b281396aee | |
|
|
22c2f66e3a | |
|
|
b685a32d63 | |
|
|
a6c3c77949 | |
|
|
0433dc4b30 | |
|
|
6765368781 | |
|
|
a5fd9067c1 | |
|
|
9c422d6285 | |
|
|
ec84778d3d | |
|
|
6f1805ceb0 | |
|
|
9f1c1db03c | |
|
|
242d670b5a | |
|
|
fb5972dd2c | |
|
|
34e4c6c1e5 | |
|
|
bf6c4590ee |
|
|
@ -201,16 +201,20 @@ class Addon extends Command
|
||||||
new \RecursiveDirectoryIterator($addonDir), \RecursiveIteratorIterator::LEAVES_ONLY
|
new \RecursiveDirectoryIterator($addonDir), \RecursiveIteratorIterator::LEAVES_ONLY
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$addonDir = str_replace(DS, '/', $addonDir);
|
||||||
|
$excludeDirRegex = "/\/(\.git|\.svn|\.vscode|\.idea|unpackage)\//i";
|
||||||
foreach ($files as $name => $file) {
|
foreach ($files as $name => $file) {
|
||||||
if (!$file->isDir()) {
|
$filePath = str_replace(DS, '/', $file->getPathname());
|
||||||
$filePath = $file->getRealPath();
|
if ($file->isDir() || preg_match($excludeDirRegex, $filePath))
|
||||||
$relativePath = str_replace(DS, '/', substr($filePath, strlen($addonDir)));
|
continue;
|
||||||
if (!in_array($file->getFilename(), ['.git', '.DS_Store', 'Thumbs.db'])) {
|
$relativePath = substr($filePath, strlen($addonDir));
|
||||||
$zip->addFile($filePath, $relativePath);
|
if (!in_array($file->getFilename(), ['.DS_Store', 'Thumbs.db'])) {
|
||||||
}
|
$zip->addFile($filePath, $relativePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$zip->close();
|
$zip->close();
|
||||||
|
$output->info("Package Resource Path:" . $addonFile);
|
||||||
$output->info("Package Successed!");
|
$output->info("Package Successed!");
|
||||||
break;
|
break;
|
||||||
case 'move':
|
case 'move':
|
||||||
|
|
|
||||||
|
|
@ -98,13 +98,19 @@ class Api extends Command
|
||||||
foreach ($files as $name => $file) {
|
foreach ($files as $name => $file) {
|
||||||
if (!$file->isDir() && $file->getExtension() == 'php') {
|
if (!$file->isDir() && $file->getExtension() == 'php') {
|
||||||
$filePath = $file->getRealPath();
|
$filePath = $file->getRealPath();
|
||||||
$classes[] = $this->getClassFromFile($filePath);
|
$className = $this->getClassFromFile($filePath);
|
||||||
|
if ($className) {
|
||||||
|
$classes[] = $className;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach ($controller as $index => $item) {
|
foreach ($controller as $index => $item) {
|
||||||
$filePath = $moduleDir . Config::get('url_controller_layer') . DS . $item . '.php';
|
$filePath = $moduleDir . Config::get('url_controller_layer') . DS . $item . '.php';
|
||||||
$classes[] = $this->getClassFromFile($filePath);
|
$className = $this->getClassFromFile($filePath);
|
||||||
|
if ($className) {
|
||||||
|
$classes[] = $className;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -183,7 +189,7 @@ class Api extends Command
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$className = $namespace . '\\' . $class;
|
||||||
return $namespace . '\\' . $class;
|
return preg_match('/([a-z0-9_\\]+)([a-z0-9_]+)$/i', $className) ? $className : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,14 +90,15 @@ class Builder
|
||||||
|
|
||||||
$typeArr = [
|
$typeArr = [
|
||||||
'integer' => 'number',
|
'integer' => 'number',
|
||||||
'file' => 'file',
|
'file' => 'file',
|
||||||
];
|
];
|
||||||
$paramslist = array();
|
$paramslist = array();
|
||||||
foreach ($docs['ApiParams'] as $params) {
|
foreach ($docs['ApiParams'] as $params) {
|
||||||
$inputtype = $params['type'] && isset($typeArr[$params['type']]) ? $typeArr[$params['type']] : ($params['name'] == 'password' ? 'password' : 'text');
|
$type = strtolower($params['type'] ?? 'string');
|
||||||
|
$inputtype = $typeArr[$type] ?? ($params['name'] == 'password' ? 'password' : 'text');
|
||||||
$tr = array(
|
$tr = array(
|
||||||
'name' => $params['name'],
|
'name' => $params['name'],
|
||||||
'type' => $params['type'] ?? 'string',
|
'type' => $type,
|
||||||
'inputtype' => $inputtype,
|
'inputtype' => $inputtype,
|
||||||
'sample' => $params['sample'] ?? '',
|
'sample' => $params['sample'] ?? '',
|
||||||
'required' => $params['required'] ?? true,
|
'required' => $params['required'] ?? true,
|
||||||
|
|
@ -162,7 +163,7 @@ class Builder
|
||||||
'OPTIONS' => 'label-info'
|
'OPTIONS' => 'label-info'
|
||||||
);
|
);
|
||||||
|
|
||||||
return isset($labes[$method]) ? $labes[$method] : $labes['GET'];
|
return $labes[$method] ?? $labes['GET'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parse()
|
public function parse()
|
||||||
|
|
@ -230,7 +231,7 @@ class Builder
|
||||||
foreach ($docsList as $index => &$methods) {
|
foreach ($docsList as $index => &$methods) {
|
||||||
$methodSectorArr = [];
|
$methodSectorArr = [];
|
||||||
foreach ($methods as $name => $method) {
|
foreach ($methods as $name => $method) {
|
||||||
$methodSectorArr[$name] = isset($method['weigh']) ? $method['weigh'] : 0;
|
$methodSectorArr[$name] = $method['weigh'] ?? 0;
|
||||||
}
|
}
|
||||||
arsort($methodSectorArr);
|
arsort($methodSectorArr);
|
||||||
$methods = array_merge(array_flip(array_keys($methodSectorArr)), $methods);
|
$methods = array_merge(array_flip(array_keys($methodSectorArr)), $methods);
|
||||||
|
|
@ -253,7 +254,6 @@ class Builder
|
||||||
public function render($template, $vars = [])
|
public function render($template, $vars = [])
|
||||||
{
|
{
|
||||||
$docsList = $this->parse();
|
$docsList = $this->parse();
|
||||||
|
|
||||||
return $this->view->display(file_get_contents($template), array_merge($vars, ['docsList' => $docsList]));
|
return $this->view->display(file_get_contents($template), array_merge($vars, ['docsList' => $docsList]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,8 +154,8 @@
|
||||||
<div id="sidebar">
|
<div id="sidebar">
|
||||||
<div class="list-group panel">
|
<div class="list-group panel">
|
||||||
{foreach name="docsList" id="docs"}
|
{foreach name="docsList" id="docs"}
|
||||||
<a href="#{$key}" class="list-group-item" data-toggle="collapse" data-parent="#sidebar">{$key} <i class="fa fa-caret-down"></i></a>
|
<a href="#{$key|md5|substr=0,8}" class="list-group-item" data-toggle="collapse" data-parent="#sidebar">{$key} <i class="fa fa-caret-down"></i></a>
|
||||||
<div class="child collapse" id="{$key}">
|
<div class="child collapse" id="{$key|md5|substr=0,8}">
|
||||||
{foreach name="docs" id="api" }
|
{foreach name="docs" id="api" }
|
||||||
<a href="javascript:;" data-id="{$api.id}" class="list-group-item">{$api.title}
|
<a href="javascript:;" data-id="{$api.id}" class="list-group-item">{$api.title}
|
||||||
<span class="tag">
|
<span class="tag">
|
||||||
|
|
|
||||||
|
|
@ -920,6 +920,7 @@ class Crud extends Command
|
||||||
$replace = '\'{"custom[type]":"' . $table . '"}\'';
|
$replace = '\'{"custom[type]":"' . $table . '"}\'';
|
||||||
} elseif ($selectpageController == 'admin') {
|
} elseif ($selectpageController == 'admin') {
|
||||||
$attrArr['data-source'] = 'auth/admin/selectpage';
|
$attrArr['data-source'] = 'auth/admin/selectpage';
|
||||||
|
$attrArr['data-field'] = 'nickname';
|
||||||
} elseif ($selectpageController == 'user') {
|
} elseif ($selectpageController == 'user') {
|
||||||
$attrArr['data-source'] = 'user/user/index';
|
$attrArr['data-source'] = 'user/user/index';
|
||||||
$attrArr['data-field'] = 'nickname';
|
$attrArr['data-field'] = 'nickname';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
public function {%methodName%}($value, $data)
|
public function {%methodName%}($value, $data)
|
||||||
{
|
{
|
||||||
$value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : '');
|
$value = $value ?: ($data['{%field%}'] ?? '');
|
||||||
$valueArr = explode(',', $value);
|
$valueArr = explode(',', $value);
|
||||||
$list = $this->{%listMethodName%}();
|
$list = $this->{%listMethodName%}();
|
||||||
return implode(',', array_intersect_key($list, array_flip($valueArr)));
|
return implode(',', array_intersect_key($list, array_flip($valueArr)));
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
public function {%methodName%}($value, $data)
|
public function {%methodName%}($value, $data)
|
||||||
{
|
{
|
||||||
$value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : '');
|
$value = $value ?: ($data['{%field%}'] ?? '');
|
||||||
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
public function {%methodName%}($value, $data)
|
public function {%methodName%}($value, $data)
|
||||||
{
|
{
|
||||||
$value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : '');
|
$value = $value ?: ($data['{%field%}'] ?? '');
|
||||||
$list = $this->{%listMethodName%}();
|
$list = $this->{%listMethodName%}();
|
||||||
return isset($list[$value]) ? $list[$value] : '';
|
return $list[$value] ?? '';
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
public function {%methodName%}($value, $data)
|
public function {%methodName%}($value, $data)
|
||||||
{
|
{
|
||||||
$value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : '');
|
$value = $value ?: ($data['{%field%}'] ?? '');
|
||||||
$list = $this->{%listMethodName%}();
|
$list = $this->{%listMethodName%}();
|
||||||
return isset($list[$value]) ? $list[$value] : '';
|
return $list[$value] ?? '';
|
||||||
}
|
}
|
||||||
|
|
@ -17,6 +17,13 @@ use think\View;
|
||||||
|
|
||||||
class Install extends Command
|
class Install extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最低PHP版本
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $minPhpVersion = '7.4.0';
|
||||||
|
|
||||||
protected $model = null;
|
protected $model = null;
|
||||||
/**
|
/**
|
||||||
* @var \think\View 视图类实例
|
* @var \think\View 视图类实例
|
||||||
|
|
@ -70,7 +77,7 @@ class Install extends Command
|
||||||
|
|
||||||
$adminName = $this->installation($hostname, $hostport, $database, $username, $password, $prefix, $adminUsername, $adminPassword, $adminEmail, $siteName);
|
$adminName = $this->installation($hostname, $hostport, $database, $username, $password, $prefix, $adminUsername, $adminPassword, $adminEmail, $siteName);
|
||||||
if ($adminName) {
|
if ($adminName) {
|
||||||
$output->highlight("Admin url:http://www.example.com/{$adminName}");
|
$output->highlight("Admin url:https://www.example.com/{$adminName}");
|
||||||
}
|
}
|
||||||
|
|
||||||
$output->highlight("Admin username:{$adminUsername}");
|
$output->highlight("Admin username:{$adminUsername}");
|
||||||
|
|
@ -207,22 +214,27 @@ class Install extends Command
|
||||||
$adminFile = ROOT_PATH . 'public' . DS . 'admin.php';
|
$adminFile = ROOT_PATH . 'public' . DS . 'admin.php';
|
||||||
|
|
||||||
// 数据库配置文件
|
// 数据库配置文件
|
||||||
$dbConfigFile = APP_PATH . 'database.php';
|
$envSampleFile = ROOT_PATH . '.env.sample';
|
||||||
$dbConfigText = @file_get_contents($dbConfigFile);
|
$envFile = ROOT_PATH . '.env';
|
||||||
|
if (!file_exists($envFile)) {
|
||||||
|
if (!copy($envSampleFile, $envFile)) {
|
||||||
|
throw new Exception(__('Failed to copy %s to %s', '.env.sample', '.env'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$envText = @file_get_contents($envFile);
|
||||||
|
|
||||||
$callback = function ($matches) use ($mysqlHostname, $mysqlHostport, $mysqlUsername, $mysqlPassword, $mysqlDatabase, $mysqlPrefix) {
|
$callback = function ($matches) use ($mysqlHostname, $mysqlHostport, $mysqlUsername, $mysqlPassword, $mysqlDatabase, $mysqlPrefix) {
|
||||||
$field = "mysql" . ucfirst($matches[1]);
|
$field = "mysql" . ucfirst($matches[1]);
|
||||||
$replace = $$field;
|
$replace = $$field;
|
||||||
if ($matches[1] == 'hostport' && $mysqlHostport == 3306) {
|
return "{$matches[1]} = {$replace}";
|
||||||
$replace = '';
|
|
||||||
}
|
|
||||||
return "'{$matches[1]}'{$matches[2]}=>{$matches[3]}Env::get('database.{$matches[1]}', '{$replace}'),";
|
|
||||||
};
|
};
|
||||||
$dbConfigText = preg_replace_callback("/'(hostname|database|username|password|hostport|prefix)'(\s+)=>(\s+)Env::get\((.*)\)\,/", $callback, $dbConfigText);
|
$envText = preg_replace_callback("/(hostname|database|username|password|hostport|prefix)\s*=\s*(.*)/", $callback, $envText);
|
||||||
|
|
||||||
// 检测能否成功写入数据库配置
|
// 检测能否成功写入数据库配置
|
||||||
$result = @file_put_contents($dbConfigFile, $dbConfigText);
|
$result = @file_put_contents($envFile, $envText);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
throw new Exception(__('The current permissions are insufficient to write the file %s', 'application/database.php'));
|
throw new Exception(__('The current permissions are insufficient to write the file %s', '.env'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置新的Token随机密钥key
|
// 设置新的Token随机密钥key
|
||||||
|
|
@ -237,7 +249,7 @@ class Install extends Command
|
||||||
throw new Exception(__('The current permissions are insufficient to write the file %s', 'application/config.php'));
|
throw new Exception(__('The current permissions are insufficient to write the file %s', 'application/config.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$avatar = request()->domain() . '/assets/img/avatar.png';
|
$avatar = '/assets/img/avatar.png';
|
||||||
// 变更默认管理员密码
|
// 变更默认管理员密码
|
||||||
$adminPassword = $adminPassword ? $adminPassword : Random::alnum(8);
|
$adminPassword = $adminPassword ? $adminPassword : Random::alnum(8);
|
||||||
$adminEmail = $adminEmail ? $adminEmail : "admin@admin.com";
|
$adminEmail = $adminEmail ? $adminEmail : "admin@admin.com";
|
||||||
|
|
@ -309,8 +321,8 @@ class Install extends Command
|
||||||
//数据库配置文件
|
//数据库配置文件
|
||||||
$dbConfigFile = APP_PATH . 'database.php';
|
$dbConfigFile = APP_PATH . 'database.php';
|
||||||
|
|
||||||
if (version_compare(PHP_VERSION, '7.4.0', '<')) {
|
if (version_compare(PHP_VERSION, $this->minPhpVersion, '<')) {
|
||||||
throw new Exception(__("The current version %s is too low, please use PHP 7.4 or higher", PHP_VERSION));
|
throw new Exception(__("The current PHP %s is too low, please use PHP %s or higher", PHP_VERSION, $this->minPhpVersion));
|
||||||
}
|
}
|
||||||
if (!extension_loaded("PDO")) {
|
if (!extension_loaded("PDO")) {
|
||||||
throw new Exception(__("PDO is not currently installed and cannot be installed"));
|
throw new Exception(__("PDO is not currently installed and cannot be installed"));
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ return [
|
||||||
'Password is too weak' => '密码太简单,请重新输入',
|
'Password is too weak' => '密码太简单,请重新输入',
|
||||||
'The two passwords you entered did not match' => '两次输入的密码不一致',
|
'The two passwords you entered did not match' => '两次输入的密码不一致',
|
||||||
'Please input correct website' => '网站名称输入不正确',
|
'Please input correct website' => '网站名称输入不正确',
|
||||||
'The current version %s is too low, please use PHP 7.4 or higher' => '当前版本%s过低,请使用PHP7.4及以上版本',
|
'The current PHP %s is too low, please use PHP %s or higher' => '当前版本PHP %s过低,请使用PHP %s及以上版本',
|
||||||
'PDO is not currently installed and cannot be installed' => '当前未开启PDO,无法进行安装',
|
'PDO is not currently installed and cannot be installed' => '当前未开启PDO,无法进行安装',
|
||||||
'The current permissions are insufficient to write the file %s' => '当前权限不足,无法写入文件%s',
|
'The current permissions are insufficient to write the file %s' => '当前权限不足,无法写入文件%s',
|
||||||
'Please go to the official website to download the full package or resource package and try to install' => '当前代码仅包含核心代码,请前往官网下载完整包或资源包覆盖后再尝试安装',
|
'Please go to the official website to download the full package or resource package and try to install' => '当前代码仅包含核心代码,请前往官网下载完整包或资源包覆盖后再尝试安装',
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -21,7 +21,6 @@ use think\Validate;
|
||||||
*/
|
*/
|
||||||
class Ajax extends Backend
|
class Ajax extends Backend
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $noNeedLogin = ['lang'];
|
protected $noNeedLogin = ['lang'];
|
||||||
protected $noNeedRight = ['*'];
|
protected $noNeedRight = ['*'];
|
||||||
protected $layout = '';
|
protected $layout = '';
|
||||||
|
|
@ -175,18 +174,18 @@ class Ajax extends Backend
|
||||||
$weighdata[$v[$prikey]] = $v[$field];
|
$weighdata[$v[$prikey]] = $v[$field];
|
||||||
}
|
}
|
||||||
$position = array_search($changeid, $ids);
|
$position = array_search($changeid, $ids);
|
||||||
$desc_id = isset($sour[$position]) ? $sour[$position] : end($sour); //移动到目标的ID值,取出所处改变前位置的值
|
$desc_id = $sour[$position] ?? end($sour); //移动到目标的ID值,取出所处改变前位置的值
|
||||||
$sour_id = $changeid;
|
$sour_id = $changeid;
|
||||||
$weighids = array();
|
$weighids = [];
|
||||||
$temp = array_values(array_diff_assoc($ids, $sour));
|
$temp = array_values(array_diff_assoc($ids, $sour));
|
||||||
foreach ($temp as $m => $n) {
|
foreach ($temp as $m => $n) {
|
||||||
if ($n == $sour_id) {
|
if ($n == $sour_id) {
|
||||||
$offset = $desc_id;
|
$offset = $desc_id;
|
||||||
} else {
|
} else {
|
||||||
if ($sour_id == $temp[0]) {
|
if ($sour_id == $temp[0]) {
|
||||||
$offset = isset($temp[$m + 1]) ? $temp[$m + 1] : $sour_id;
|
$offset = $temp[$m + 1] ?? $sour_id;
|
||||||
} else {
|
} else {
|
||||||
$offset = isset($temp[$m - 1]) ? $temp[$m - 1] : $sour_id;
|
$offset = $temp[$m - 1] ?? $sour_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isset($weighdata[$offset])) {
|
if (!isset($weighdata[$offset])) {
|
||||||
|
|
@ -207,7 +206,6 @@ class Ajax extends Backend
|
||||||
$type = $this->request->request("type");
|
$type = $this->request->request("type");
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'all':
|
case 'all':
|
||||||
// no break
|
|
||||||
case 'content':
|
case 'content':
|
||||||
//内容缓存
|
//内容缓存
|
||||||
rmdirs(CACHE_PATH, false);
|
rmdirs(CACHE_PATH, false);
|
||||||
|
|
@ -215,18 +213,21 @@ class Ajax extends Backend
|
||||||
if ($type == 'content') {
|
if ($type == 'content') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// no break
|
||||||
case 'template':
|
case 'template':
|
||||||
// 模板缓存
|
// 模板缓存
|
||||||
rmdirs(TEMP_PATH, false);
|
rmdirs(TEMP_PATH, false);
|
||||||
if ($type == 'template') {
|
if ($type == 'template') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// no break
|
||||||
case 'addons':
|
case 'addons':
|
||||||
// 插件缓存
|
// 插件缓存
|
||||||
Service::refresh();
|
Service::refresh();
|
||||||
if ($type == 'addons') {
|
if ($type == 'addons') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// no break
|
||||||
case 'browser':
|
case 'browser':
|
||||||
// 浏览器缓存
|
// 浏览器缓存
|
||||||
// 只有生产环境下才修改
|
// 只有生产环境下才修改
|
||||||
|
|
@ -323,5 +324,4 @@ class Ajax extends Backend
|
||||||
$response = Response::create($data, '', 200, $header);
|
$response = Response::create($data, '', 200, $header);
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,21 +18,13 @@ class Adminlog extends Backend
|
||||||
* @var \app\admin\model\AdminLog
|
* @var \app\admin\model\AdminLog
|
||||||
*/
|
*/
|
||||||
protected $model = null;
|
protected $model = null;
|
||||||
protected $childrenGroupIds = [];
|
|
||||||
protected $childrenAdminIds = [];
|
protected $childrenAdminIds = [];
|
||||||
|
|
||||||
public function _initialize()
|
public function _initialize()
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
parent::_initialize();
|
||||||
$this->model = model('AdminLog');
|
$this->model = model('AdminLog');
|
||||||
|
|
||||||
$this->childrenAdminIds = $this->auth->getChildrenAdminIds(true);
|
$this->childrenAdminIds = $this->auth->getChildrenAdminIds(true);
|
||||||
$this->childrenGroupIds = $this->auth->getChildrenGroupIds(true);
|
|
||||||
|
|
||||||
$groupName = AuthGroup::where('id', 'in', $this->childrenGroupIds)
|
|
||||||
->column('id,name');
|
|
||||||
|
|
||||||
$this->view->assign('groupdata', $groupName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ class Rule extends Backend
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
$this->error($this->model->getError());
|
$this->error($this->model->getError());
|
||||||
}
|
}
|
||||||
Cache::rm('__menu__');
|
|
||||||
$this->success();
|
$this->success();
|
||||||
}
|
}
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
@ -124,7 +123,6 @@ class Rule extends Backend
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
$this->error($row->getError());
|
$this->error($row->getError());
|
||||||
}
|
}
|
||||||
Cache::rm('__menu__');
|
|
||||||
$this->success();
|
$this->success();
|
||||||
}
|
}
|
||||||
$this->error();
|
$this->error();
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ return [
|
||||||
'Mobile' => '手机',
|
'Mobile' => '手机',
|
||||||
'Email' => '邮箱',
|
'Email' => '邮箱',
|
||||||
'Password' => '密码',
|
'Password' => '密码',
|
||||||
|
'Mobile' => '手机号',
|
||||||
'Sign up' => '注 册',
|
'Sign up' => '注 册',
|
||||||
'Sign in' => '登 录',
|
'Sign in' => '登 录',
|
||||||
'Sign out' => '退 出',
|
'Sign out' => '退 出',
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ return [
|
||||||
'You\'ve logged in, do not login again' => '你已经登录,无需重复登录',
|
'You\'ve logged in, do not login again' => '你已经登录,无需重复登录',
|
||||||
'Username or password can not be empty' => '用户名密码不能为空',
|
'Username or password can not be empty' => '用户名密码不能为空',
|
||||||
'Username or password is incorrect' => '用户名或密码不正确',
|
'Username or password is incorrect' => '用户名或密码不正确',
|
||||||
|
'Username must be 3 to 30 characters' => '用户名只能由3-30位数字、字母、下划线组合',
|
||||||
'Username is incorrect' => '用户名不正确',
|
'Username is incorrect' => '用户名不正确',
|
||||||
'Password is incorrect' => '密码不正确',
|
'Password is incorrect' => '密码不正确',
|
||||||
'Admin is forbidden' => '管理员已经被禁止登录',
|
'Admin is forbidden' => '管理员已经被禁止登录',
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
{if $addon.tips && $addon.tips.value}
|
{if $addon.tips && $addon.tips.value}
|
||||||
<div class="alert {$addon.tips.extend|default='alert-info-light'}" style="margin-bottom:10px;">
|
<div class="alert {$addon.tips.extend|default='alert-info-light'}" style="margin-bottom:10px;">
|
||||||
{if $addon.tips.title}
|
{if $addon.tips.title}
|
||||||
<b>{$addon.tips.title}</b><br>
|
<b>{$addon.tips.title|htmlentities}</b><br>
|
||||||
{/if}
|
{/if}
|
||||||
{$addon.tips.value}
|
{$addon.tips.value|htmlentities}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
<ul class="nav nav-tabs nav-group">
|
<ul class="nav nav-tabs nav-group">
|
||||||
<li class="active"><a href="#all" data-toggle="tab">全部</a></li>
|
<li class="active"><a href="#all" data-toggle="tab">全部</a></li>
|
||||||
{foreach name="groupList" id="tab"}
|
{foreach name="groupList" id="tab"}
|
||||||
<li><a href="#tab-{$key}" title="{$tab}" data-toggle="tab">{$tab}</a></li>
|
<li><a href="#tab-{$key|htmlentities}" title="{$tab|htmlentities}" data-toggle="tab">{$tab|htmlentities}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -23,99 +23,99 @@
|
||||||
<div class="panel-body no-padding">
|
<div class="panel-body no-padding">
|
||||||
<div id="myTabContent" class="tab-content">
|
<div id="myTabContent" class="tab-content">
|
||||||
{foreach name="groupList" id="group" key="groupName"}
|
{foreach name="groupList" id="group" key="groupName"}
|
||||||
<div class="tab-pane fade active in" id="tab-{$groupName}">
|
<div class="tab-pane fade active in" id="tab-{$groupName|htmlentities}">
|
||||||
|
|
||||||
<table class="table table-striped table-config mb-0">
|
<table class="table table-striped table-config mb-0">
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach name="$addon.config" id="item"}
|
{foreach name="$addon.config" id="item"}
|
||||||
{if ((!isset($item['group']) || $item['group']=='') && $groupName=='other') || (isset($item['group']) && $item['group']==$group)}
|
{if ((!isset($item['group']) || $item['group']=='') && $groupName=='other') || (isset($item['group']) && $item['group']==$group)}
|
||||||
<tr data-favisible="{$item.visible|default=''|htmlentities}" data-name="{$item.name}" class="{if $item.visible??''}hidden{/if}">
|
<tr data-favisible="{$item.visible|default=''|htmlentities}" data-name="{$item.name|htmlentities}" class="{if $item.visible??''}hidden{/if}">
|
||||||
<td width="15%">{$item.title}</td>
|
<td width="15%">{$item.title|htmlentities}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-8 col-xs-12">
|
<div class="col-sm-8 col-xs-12">
|
||||||
{switch $item.type}
|
{switch $item.type}
|
||||||
{case string}
|
{case string}
|
||||||
<input {$item.extend} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
|
<input {$item.extend} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule|htmlentities}" data-tip="{$item.tip|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case password}
|
{case password}
|
||||||
<input {$item.extend} type="password" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
|
<input {$item.extend} type="password" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule|htmlentities}" data-tip="{$item.tip|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case text}
|
{case text}
|
||||||
<textarea {$item.extend} name="row[{$item.name}]" class="form-control" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}">{$item.value|htmlentities}</textarea>
|
<textarea {$item.extend} name="row[{$item.name|htmlentities}]" class="form-control" data-rule="{$item.rule|htmlentities}" rows="5" data-tip="{$item.tip|htmlentities}">{$item.value|htmlentities}</textarea>
|
||||||
{/case}
|
{/case}
|
||||||
{case array}
|
{case array}
|
||||||
<dl class="fieldlist" data-name="row[{$item.name}]">
|
<dl class="fieldlist" data-name="row[{$item.name|htmlentities}]">
|
||||||
<dd>
|
<dd>
|
||||||
<ins>{:__('Array key')}</ins>
|
<ins>{:__('Array key')}</ins>
|
||||||
<ins>{:__('Array value')}</ins>
|
<ins>{:__('Array value')}</ins>
|
||||||
</dd>
|
</dd>
|
||||||
<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
|
<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
|
||||||
<textarea name="row[{$item.name}]" cols="30" rows="5" class="hide">{$item.value|json_encode|htmlentities}</textarea>
|
<textarea name="row[{$item.name|htmlentities}]" cols="30" rows="5" class="hide">{$item.value|json_encode|htmlentities}</textarea>
|
||||||
</dl>
|
</dl>
|
||||||
{/case}
|
{/case}
|
||||||
{case date}
|
{case date}
|
||||||
<input {$item.extend} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case time}
|
{case time}
|
||||||
<input {$item.extend} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case datetime}
|
{case datetime}
|
||||||
<input {$item.extend} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case number}
|
{case number}
|
||||||
<input {$item.extend} type="number" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend} type="number" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case checkbox}
|
{case checkbox}
|
||||||
{foreach name="item.content" item="vo"}
|
{foreach name="item.content" item="vo"}
|
||||||
<label for="row[{$item.name}][]-{$key}"><input id="row[{$item.name}][]-{$key}" name="row[{$item.name}][]" type="checkbox" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
|
<label for="row[{$item.name|htmlentities}][]-{$key|htmlentities}"><input id="row[{$item.name|htmlentities}][]-{$key|htmlentities}" name="row[{$item.name|htmlentities}][]" type="checkbox" value="{$key|htmlentities}" data-tip="{$item.tip|htmlentities}" {in name="key" value="$item.value" }checked{/in} /> {$vo|htmlentities}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<span class="msg-box n-right" for="row[{$item.name}]"></span>
|
<span class="msg-box n-right" for="row[{$item.name|htmlentities}]"></span>
|
||||||
{/case}
|
{/case}
|
||||||
{case radio}
|
{case radio}
|
||||||
{foreach name="item.content" item="vo"}
|
{foreach name="item.content" item="vo"}
|
||||||
<label for="row[{$item.name}]-{$key}"><input id="row[{$item.name}]-{$key}" name="row[{$item.name}]" type="radio" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
|
<label for="row[{$item.name|htmlentities}]-{$key|htmlentities}"><input id="row[{$item.name|htmlentities}]-{$key|htmlentities}" name="row[{$item.name|htmlentities}]" type="radio" value="{$key|htmlentities}" data-tip="{$item.tip|htmlentities}" {in name="key" value="$item.value" }checked{/in} /> {$vo|htmlentities}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<span class="msg-box n-right" for="row[{$item.name}]"></span>
|
<span class="msg-box n-right" for="row[{$item.name|htmlentities}]"></span>
|
||||||
{/case}
|
{/case}
|
||||||
{case value="select" break="0"}{/case}
|
{case value="select" break="0"}{/case}
|
||||||
{case value="selects"}
|
{case value="selects"}
|
||||||
<select {$item.extend} name="row[{$item.name}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip}" {$item.type=='selects'?'multiple':''}>
|
<select {$item.extend} name="row[{$item.name|htmlentities}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip|htmlentities}" {$item.type=='selects'?'multiple':''}>
|
||||||
{foreach name="item.content" item="vo"}
|
{foreach name="item.content" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value="$item.value" }selected{/in}>{$vo}</option>
|
<option value="{$key|htmlentities}" {in name="key" value="$item.value" }selected{/in}>{$vo|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
{/case}
|
{/case}
|
||||||
{case value="image" break="0"}{/case}
|
{case value="image" break="0"}{/case}
|
||||||
{case value="images"}
|
{case value="images"}
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<input id="c-{$item.name}" class="form-control" size="28" name="row[{$item.name}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
|
<input id="c-{$item.name|htmlentities}" class="form-control" size="28" name="row[{$item.name|htmlentities}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip|htmlentities}">
|
||||||
<span><button type="button" id="plupload-{$item.name}" class="btn btn-danger plupload" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
<span><button type="button" id="plupload-{$item.name|htmlentities}" class="btn btn-danger plupload" data-input-id="c-{$item.name|htmlentities}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name|htmlentities}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
<span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
<span><button type="button" id="fachoose-{$item.name|htmlentities}" class="btn btn-primary fachoose" data-input-id="c-{$item.name|htmlentities}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
<ul class="row list-inline plupload-preview" id="p-{$item.name}"></ul>
|
<ul class="row list-inline plupload-preview" id="p-{$item.name|htmlentities}"></ul>
|
||||||
<span class="msg-box n-right" for="c-{$item.name}"></span>
|
<span class="msg-box n-right" for="c-{$item.name|htmlentities}"></span>
|
||||||
</div>
|
</div>
|
||||||
{/case}
|
{/case}
|
||||||
{case value="file" break="0"}{/case}
|
{case value="file" break="0"}{/case}
|
||||||
{case value="files"}
|
{case value="files"}
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<input id="c-{$item.name}" class="form-control" size="28" name="row[{$item.name}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
|
<input id="c-{$item.name|htmlentities}" class="form-control" size="28" name="row[{$item.name|htmlentities}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip|htmlentities}">
|
||||||
<span><button type="button" id="plupload-{$item.name}" class="btn btn-danger plupload" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
<span><button type="button" id="plupload-{$item.name|htmlentities}" class="btn btn-danger plupload" data-input-id="c-{$item.name|htmlentities}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
<span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
<span><button type="button" id="fachoose-{$item.name|htmlentities}" class="btn btn-primary fachoose" data-input-id="c-{$item.name|htmlentities}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
<span class="msg-box n-right" for="c-{$item.name}"></span>
|
<span class="msg-box n-right" for="c-{$item.name|htmlentities}"></span>
|
||||||
</div>
|
</div>
|
||||||
{/case}
|
{/case}
|
||||||
{case switch}
|
{case switch}
|
||||||
<input id="c-{$item.name}" name="row[{$item.name}]" type="hidden" value="{:$item.value?1:0}">
|
<input id="c-{$item.name|htmlentities}" name="row[{$item.name|htmlentities}]" type="hidden" value="{:$item.value?1:0}">
|
||||||
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-{$item.name}" data-yes="1" data-no="0">
|
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-{$item.name|htmlentities}" data-yes="1" data-no="0">
|
||||||
<i class="fa fa-toggle-on text-success {if !$item.value}fa-flip-horizontal text-gray{/if} fa-2x"></i>
|
<i class="fa fa-toggle-on text-success {if !$item.value}fa-flip-horizontal text-gray{/if} fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
{/case}
|
{/case}
|
||||||
{case bool}
|
{case bool}
|
||||||
<label for="row[{$item.name}]-yes"><input id="row[{$item.name}]-yes" name="row[{$item.name}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip}" /> {:__('Yes')}</label>
|
<label for="row[{$item.name|htmlentities}]-yes"><input id="row[{$item.name|htmlentities}]-yes" name="row[{$item.name|htmlentities}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip|htmlentities}" /> {:__('Yes')}</label>
|
||||||
<label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" /> {:__('No')}</label>
|
<label for="row[{$item.name|htmlentities}]-no"><input id="row[{$item.name|htmlentities}]-no" name="row[{$item.name|htmlentities}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip|htmlentities}" /> {:__('No')}</label>
|
||||||
{/case}
|
{/case}
|
||||||
{default /}{$item.value}
|
{default /}{$item.value|htmlentities}
|
||||||
{/switch}
|
{/switch}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4"></div>
|
<div class="col-sm-4"></div>
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label">{:__('Version')}</label>
|
<label class="control-label">{:__('Version')}</label>
|
||||||
<input type="hidden" class="operate" data-name="faversion" value="="/>
|
<input type="hidden" class="operate" data-name="faversion" value="="/>
|
||||||
<input class="form-control" name="faversion" type="text" value="{$Think.config.fastadmin.version}">
|
<input class="form-control" name="faversion" type="text" value="{$Think.config.fastadmin.version|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-6 col-md-3">
|
<div class="col-xs-12 col-sm-6 col-md-3">
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
||||||
{foreach name="typeList" item="vo"}
|
{foreach name="typeList" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
|
<option value="{$key|htmlentities}" {in name="key" value=""}selected{/in}>{$vo|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
<select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[pid]">
|
<select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[pid]">
|
||||||
{foreach name="parentList" item="vo"}
|
{foreach name="parentList" item="vo"}
|
||||||
<option data-type="{$vo.type}" value="{$key}" {in name="key" value=""}selected{/in}>{$vo.name}</option>
|
<option data-type="{$vo.type|htmlentities}" value="{$key|htmlentities}" {in name="key" value=""}selected{/in}>{$vo.name|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
<select id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
|
<select id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
|
||||||
{foreach name="flagList" item="vo"}
|
{foreach name="flagList" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
|
<option value="{$key|htmlentities}" {in name="key" value=""}selected{/in}>{$vo|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
||||||
{foreach name="typeList" item="vo"}
|
{foreach name="typeList" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
|
<option value="{$key|htmlentities}" {in name="key" value="$row.type"}selected{/in}>{$vo|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[pid]">
|
<select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[pid]">
|
||||||
{foreach name="parentList" item="vo"}
|
{foreach name="parentList" item="vo"}
|
||||||
<option data-type="{$vo.type}" class="{:$vo.type==$row.type||$vo.type=='all'?'':'hide'}" value="{$key}" {in name="key" value="$row.pid"}selected{/in}>{$vo.name}</option>
|
<option data-type="{$vo.type|htmlentities}" class="{:$vo.type==$row.type||$vo.type=='all'?'':'hide'}" value="{$key|htmlentities}" {in name="key" value="$row.pid"}selected{/in}>{$vo.name|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
<select id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
|
<select id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
|
||||||
{foreach name="flagList" item="vo"}
|
{foreach name="flagList" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value="$row.flag"}selected{/in}>{$vo}</option>
|
<option value="{$key|htmlentities}" {in name="key" value="$row.flag"}selected{/in}>{$vo|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="active"><a href="#all" data-toggle="tab">{:__('All')}</a></li>
|
<li class="active"><a href="#all" data-toggle="tab">{:__('All')}</a></li>
|
||||||
{foreach name="typeList" item="vo"}
|
{foreach name="typeList" item="vo"}
|
||||||
<li><a href="#{$key}" data-toggle="tab">{$vo}</a></li>
|
<li><a href="#{$key|htmlentities}" data-toggle="tab">{$vo|htmlentities}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,10 +117,10 @@
|
||||||
<div id="secondnav">
|
<div id="secondnav">
|
||||||
<ul class="nav nav-tabs nav-addtabs disable-top-badge" role="tablist">
|
<ul class="nav nav-tabs nav-addtabs disable-top-badge" role="tablist">
|
||||||
{if $fixedmenu}
|
{if $fixedmenu}
|
||||||
<li role="presentation" id="tab_{$fixedmenu.id}" class="{:$referermenu?'':'active'}"><a href="#con_{$fixedmenu.id}" node-id="{$fixedmenu.id}" aria-controls="{$fixedmenu.id}" role="tab" data-toggle="tab"><i class="fa fa-dashboard fa-fw"></i> <span>{$fixedmenu.title}</span> <span class="pull-right-container"> </span></a></li>
|
<li role="presentation" id="tab_{$fixedmenu.id|htmlentities}" class="{:$referermenu?'':'active'}"><a href="#con_{$fixedmenu.id|htmlentities}" node-id="{$fixedmenu.id|htmlentities}" aria-controls="{$fixedmenu.id|htmlentities}" role="tab" data-toggle="tab"><i class="fa fa-dashboard fa-fw"></i> <span>{$fixedmenu.title|htmlentities}</span> <span class="pull-right-container"> </span></a></li>
|
||||||
{/if}
|
{/if}
|
||||||
{if $referermenu}
|
{if $referermenu}
|
||||||
<li role="presentation" id="tab_{$referermenu.id}" class="active"><a href="#con_{$referermenu.id}" node-id="{$referermenu.id}" aria-controls="{$referermenu.id}" role="tab" data-toggle="tab"><i class="fa fa-list fa-fw"></i> <span>{$referermenu.title}</span> <span class="pull-right-container"> </span></a> <i class="close-tab fa fa-remove"></i></li>
|
<li role="presentation" id="tab_{$referermenu.id|htmlentities}" class="active"><a href="#con_{$referermenu.id|htmlentities}" node-id="{$referermenu.id|htmlentities}" aria-controls="{$referermenu.id|htmlentities}" role="tab" data-toggle="tab"><i class="fa fa-list fa-fw"></i> <span>{$referermenu.title|htmlentities}</span> <span class="pull-right-container"> </span></a> <i class="close-tab fa fa-remove"></i></li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
<link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
|
<link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
|
||||||
<!-- Loading Bootstrap -->
|
<!-- Loading Bootstrap -->
|
||||||
<link href="__CDN__/assets/css/backend{$Think.config.app_debug?'':'.min'}.css?v={$Think.config.site.version}" rel="stylesheet">
|
<link href="__CDN__/assets/css/backend{$Think.config.app_debug?'':'.min'}.css?v={$Think.config.site.version|htmlentities}" rel="stylesheet">
|
||||||
|
|
||||||
{if $Think.config.fastadmin.adminskin}
|
{if $Think.config.fastadmin.adminskin}
|
||||||
<link href="__CDN__/assets/css/skins/{$Think.config.fastadmin.adminskin}.css?v={$Think.config.site.version}" rel="stylesheet">
|
<link href="__CDN__/assets/css/skins/{$Think.config.fastadmin.adminskin|htmlentities}.css?v={$Think.config.site.version|htmlentities}" rel="stylesheet">
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<script src="__CDN__/assets/js/require{$Think.config.app_debug?'':'.min'}.js" data-main="__CDN__/assets/js/require-backend{$Think.config.app_debug?'':'.min'}.js?v={$site.version|htmlentities}"></script>
|
<script src="__CDN__/assets/js/require.min.js" data-main="__CDN__/assets/js/require-backend{$Think.config.app_debug?'':'.min'}.js?v={$site.version|htmlentities}"></script>
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@
|
||||||
<div class="sm-st clearfix">
|
<div class="sm-st clearfix">
|
||||||
<span class="sm-st-icon st-red"><i class="fa fa-users"></i></span>
|
<span class="sm-st-icon st-red"><i class="fa fa-users"></i></span>
|
||||||
<div class="sm-st-info">
|
<div class="sm-st-info">
|
||||||
<span>{$totaluser}</span>
|
<span>{$totaluser|htmlentities}</span>
|
||||||
{:__('Total user')}
|
{:__('Total user')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -185,7 +185,7 @@
|
||||||
<div class="sm-st clearfix">
|
<div class="sm-st clearfix">
|
||||||
<span class="sm-st-icon st-violet"><i class="fa fa-magic"></i></span>
|
<span class="sm-st-icon st-violet"><i class="fa fa-magic"></i></span>
|
||||||
<div class="sm-st-info">
|
<div class="sm-st-info">
|
||||||
<span>{$totaladdon}</span>
|
<span>{$totaladdon|htmlentities}</span>
|
||||||
{:__('Total addon')}
|
{:__('Total addon')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -194,7 +194,7 @@
|
||||||
<div class="sm-st clearfix">
|
<div class="sm-st clearfix">
|
||||||
<span class="sm-st-icon st-blue"><i class="fa fa-leaf"></i></span>
|
<span class="sm-st-icon st-blue"><i class="fa fa-leaf"></i></span>
|
||||||
<div class="sm-st-info">
|
<div class="sm-st-info">
|
||||||
<span>{$attachmentnums}</span>
|
<span>{$attachmentnums|htmlentities}</span>
|
||||||
{:__('Total attachment')}
|
{:__('Total attachment')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -203,7 +203,7 @@
|
||||||
<div class="sm-st clearfix">
|
<div class="sm-st clearfix">
|
||||||
<span class="sm-st-icon st-green"><i class="fa fa-user"></i></span>
|
<span class="sm-st-icon st-green"><i class="fa fa-user"></i></span>
|
||||||
<div class="sm-st-info">
|
<div class="sm-st-info">
|
||||||
<span>{$totaladmin}</span>
|
<span>{$totaladmin|htmlentities}</span>
|
||||||
{:__('Total admin')}
|
{:__('Total admin')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -221,7 +221,7 @@
|
||||||
<div class="col-xs-6 stat-col">
|
<div class="col-xs-6 stat-col">
|
||||||
<div class="stat-icon"><i class="fa fa-rocket"></i></div>
|
<div class="stat-icon"><i class="fa fa-rocket"></i></div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="value"> {$todayusersignup}</div>
|
<div class="value"> {$todayusersignup|htmlentities}</div>
|
||||||
<div class="name"> {:__('Today user signup')}</div>
|
<div class="name"> {:__('Today user signup')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
|
|
@ -231,7 +231,7 @@
|
||||||
<div class="col-xs-6 stat-col">
|
<div class="col-xs-6 stat-col">
|
||||||
<div class="stat-icon"><i class="fa fa-vcard"></i></div>
|
<div class="stat-icon"><i class="fa fa-vcard"></i></div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="value"> {$todayuserlogin}</div>
|
<div class="value"> {$todayuserlogin|htmlentities}</div>
|
||||||
<div class="name"> {:__('Today user login')}</div>
|
<div class="name"> {:__('Today user login')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
|
|
@ -241,7 +241,7 @@
|
||||||
<div class="col-xs-6 stat-col">
|
<div class="col-xs-6 stat-col">
|
||||||
<div class="stat-icon"><i class="fa fa-calendar"></i></div>
|
<div class="stat-icon"><i class="fa fa-calendar"></i></div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="value"> {$threednu}</div>
|
<div class="value"> {$threednu|htmlentities}</div>
|
||||||
<div class="name"> {:__('Three dnu')}</div>
|
<div class="name"> {:__('Three dnu')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
|
|
@ -251,7 +251,7 @@
|
||||||
<div class="col-xs-6 stat-col">
|
<div class="col-xs-6 stat-col">
|
||||||
<div class="stat-icon"><i class="fa fa-calendar-plus-o"></i></div>
|
<div class="stat-icon"><i class="fa fa-calendar-plus-o"></i></div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="value"> {$sevendnu}</div>
|
<div class="value"> {$sevendnu|htmlentities}</div>
|
||||||
<div class="name"> {:__('Seven dnu')}</div>
|
<div class="name"> {:__('Seven dnu')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
|
|
@ -261,7 +261,7 @@
|
||||||
<div class="col-xs-6 stat-col">
|
<div class="col-xs-6 stat-col">
|
||||||
<div class="stat-icon"><i class="fa fa-user-circle"></i></div>
|
<div class="stat-icon"><i class="fa fa-user-circle"></i></div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="value"> {$sevendau}</div>
|
<div class="value"> {$sevendau|htmlentities}</div>
|
||||||
<div class="name"> {:__('Seven dau')}</div>
|
<div class="name"> {:__('Seven dau')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
|
|
@ -271,7 +271,7 @@
|
||||||
<div class="col-xs-6 stat-col">
|
<div class="col-xs-6 stat-col">
|
||||||
<div class="stat-icon"><i class="fa fa-user-circle-o"></i></div>
|
<div class="stat-icon"><i class="fa fa-user-circle-o"></i></div>
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
<div class="value"> {$thirtydau}</div>
|
<div class="value"> {$thirtydau|htmlentities}</div>
|
||||||
<div class="name"> {:__('Thirty dau')}</div>
|
<div class="name"> {:__('Thirty dau')}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
|
|
@ -298,7 +298,7 @@
|
||||||
<div class="panel-content">
|
<div class="panel-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<h1 class="no-margins">{$totalworkingaddon}</h1>
|
<h1 class="no-margins">{$totalworkingaddon|htmlentities}</h1>
|
||||||
<div class="font-bold"><i class="fa fa-magic"></i>
|
<div class="font-bold"><i class="fa fa-magic"></i>
|
||||||
<small>{:__('Working addon count tips')}</small>
|
<small>{:__('Working addon count tips')}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -318,7 +318,7 @@
|
||||||
<div class="ibox-content">
|
<div class="ibox-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h1 class="no-margins">{$dbtablenums}</h1>
|
<h1 class="no-margins">{$dbtablenums|htmlentities}</h1>
|
||||||
<div class="font-bold"><i class="fa fa-database"></i>
|
<div class="font-bold"><i class="fa fa-database"></i>
|
||||||
<small>{:__('Database table nums')}</small>
|
<small>{:__('Database table nums')}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -346,7 +346,7 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h1 class="no-margins">{$attachmentnums}</h1>
|
<h1 class="no-margins">{$attachmentnums|htmlentities}</h1>
|
||||||
<div class="font-bold"><i class="fa fa-files-o"></i>
|
<div class="font-bold"><i class="fa fa-files-o"></i>
|
||||||
<small>{:__('Attachment nums')}</small>
|
<small>{:__('Attachment nums')}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -373,7 +373,7 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h1 class="no-margins">{$picturenums}</h1>
|
<h1 class="no-margins">{$picturenums|htmlentities}</h1>
|
||||||
<div class="font-bold"><i class="fa fa-picture-o"></i>
|
<div class="font-bold"><i class="fa fa-picture-o"></i>
|
||||||
<small>{:__('Picture nums')}</small>
|
<small>{:__('Picture nums')}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<select name="category-third" id="category-third" class="form-control selectpicker">
|
<select name="category-third" id="category-third" class="form-control selectpicker">
|
||||||
<option value="">{:__('Please select category')}</option>
|
<option value="">{:__('Please select category')}</option>
|
||||||
{foreach name="categoryList" id="item"}
|
{foreach name="categoryList" id="item"}
|
||||||
<option value="{$key}">{$item}</option>
|
<option value="{$key|htmlentities}">{$item|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -42,13 +42,13 @@
|
||||||
<select name="category-local" id="category-local" class="form-control selectpicker">
|
<select name="category-local" id="category-local" class="form-control selectpicker">
|
||||||
<option value="">{:__('Please select category')}</option>
|
<option value="">{:__('Please select category')}</option>
|
||||||
{foreach name="categoryList" id="item"}
|
{foreach name="categoryList" id="item"}
|
||||||
<option value="{$key}">{$item}</option>
|
<option value="{$key|htmlentities}">{$item|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" id="faupload-local" class="btn btn-primary faupload" data-input-id="c-local" data-multiple="true" data-preview-id="p-local" data-url="{:url('ajax/upload')}"><i class="fa fa-upload"></i> {:__("Upload to local")}</button>
|
<button type="button" id="faupload-local" class="btn btn-primary faupload" data-input-id="c-local" data-multiple="true" data-preview-id="p-local" data-url="{:url('ajax/upload')}" data-cdnurl=""><i class="fa fa-upload"></i> {:__("Upload to local")}</button>
|
||||||
{if $config.upload.chunking}
|
{if $config.upload.chunking}
|
||||||
<button type="button" id="faupload-local-chunking" class="btn btn-primary faupload" data-chunking="true" data-maxsize="1gb" data-input-id="c-local" data-multiple="true" data-preview-id="p-local" data-url="{:url('ajax/upload')}"><i class="fa fa-upload"></i> {:__("Upload to local by chunk")}</button>
|
<button type="button" id="faupload-local-chunking" class="btn btn-primary faupload" data-chunking="true" data-maxsize="1gb" data-input-id="c-local" data-multiple="true" data-preview-id="p-local" data-url="{:url('ajax/upload')}" data-cdnurl=""><i class="fa fa-upload"></i> {:__("Upload to local by chunk")}</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<select name="row[category]" class="form-control">
|
<select name="row[category]" class="form-control">
|
||||||
<option value="">{:__('Please select category')}</option>
|
<option value="">{:__('Please select category')}</option>
|
||||||
{foreach name="categoryList" id="item"}
|
{foreach name="categoryList" id="item"}
|
||||||
<option value="{$key}" {if $key==$row.category}selected{/if}>{$item}</option>
|
<option value="{$key|htmlentities}" {if $key==$row.category}selected{/if}>{$item|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,14 @@
|
||||||
<ul class="nav nav-tabs" data-field="category">
|
<ul class="nav nav-tabs" data-field="category">
|
||||||
<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
||||||
{foreach name="categoryList" item="vo"}
|
{foreach name="categoryList" item="vo"}
|
||||||
<li><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
|
<li><a href="#t-{$key|htmlentities}" data-value="{$key|htmlentities}" data-toggle="tab">{$vo|htmlentities}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<li class="pull-right dropdown filter-type">
|
<li class="pull-right dropdown filter-type">
|
||||||
<a href="javascript:" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-filter"></i> {:__('Filter Type')}</a>
|
<a href="javascript:" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-filter"></i> {:__('Filter Type')}</a>
|
||||||
<ul class="dropdown-menu text-left" role="menu">
|
<ul class="dropdown-menu text-left" role="menu">
|
||||||
<li class="active"><a href="javascript:" data-value="">{:__('All')}</a></li>
|
<li class="active"><a href="javascript:" data-value="">{:__('All')}</a></li>
|
||||||
{foreach name="mimetypeList" id="item"}
|
{foreach name="mimetypeList" id="item"}
|
||||||
<li><a href="javascript:" data-value="{$key}">{$item}</a></li>
|
<li><a href="javascript:" data-value="{$key|htmlentities}">{$item|htmlentities}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
<select name="category" class="form-control">
|
<select name="category" class="form-control">
|
||||||
<option value="">{:__('Please select category')}</option>
|
<option value="">{:__('Please select category')}</option>
|
||||||
{foreach name="categoryList" id="item"}
|
{foreach name="categoryList" id="item"}
|
||||||
<option value="{$key}">{$item}</option>
|
<option value="{$key|htmlentities}">{$item|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<ul class="nav nav-tabs" data-field="category">
|
<ul class="nav nav-tabs" data-field="category">
|
||||||
<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
<li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
||||||
{foreach name="categoryList" item="vo"}
|
{foreach name="categoryList" item="vo"}
|
||||||
<li><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
|
<li><a href="#t-{$key|htmlentities}" data-value="{$key|htmlentities}" data-toggle="tab">{$vo|htmlentities}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{if stripos(request()->get('mimetype'),'image/')===false}
|
{if stripos(request()->get('mimetype'),'image/')===false}
|
||||||
<li class="pull-right dropdown filter-type">
|
<li class="pull-right dropdown filter-type">
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
<ul class="dropdown-menu text-left" role="menu">
|
<ul class="dropdown-menu text-left" role="menu">
|
||||||
<li class="active"><a href="javascript:" data-value="">{:__('All')}</a></li>
|
<li class="active"><a href="javascript:" data-value="">{:__('All')}</a></li>
|
||||||
{foreach name="mimetypeList" id="item"}
|
{foreach name="mimetypeList" id="item"}
|
||||||
<li><a href="javascript:" data-value="{$key}">{$item}</a></li>
|
<li><a href="javascript:" data-value="{$key|htmlentities}">{$item|htmlentities}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
{:build_heading(null, false)}
|
{:build_heading(null, false)}
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
{foreach $siteList as $index=>$vo}
|
{foreach $siteList as $index=>$vo}
|
||||||
<li class="{$vo.active?'active':''}"><a href="#tab-{$vo.name}" data-toggle="tab">{:__($vo.title)}</a></li>
|
<li class="{$vo.active?'active':''}"><a href="#tab-{$vo.name|htmlentities}" data-toggle="tab">{:__($vo.title)}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{if $Think.config.app_debug}
|
{if $Think.config.app_debug}
|
||||||
<li data-toggle="tooltip" title="{:__('Add new config')}">
|
<li data-toggle="tooltip" title="{:__('Add new config')}">
|
||||||
|
|
@ -41,9 +41,9 @@
|
||||||
<div id="myTabContent" class="tab-content">
|
<div id="myTabContent" class="tab-content">
|
||||||
<!--@formatter:off-->
|
<!--@formatter:off-->
|
||||||
{foreach $siteList as $index=>$vo}
|
{foreach $siteList as $index=>$vo}
|
||||||
<div class="tab-pane fade {$vo.active ? 'active in' : ''}" id="tab-{$vo.name}">
|
<div class="tab-pane fade {$vo.active ? 'active in' : ''}" id="tab-{$vo.name|htmlentities}">
|
||||||
<div class="widget-body no-padding">
|
<div class="widget-body no-padding">
|
||||||
<form id="{$vo.name}-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('general.config/edit')}">
|
<form id="{$vo.name|htmlentities}-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('general.config/edit')}">
|
||||||
{:token()}
|
{:token()}
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
@ -58,111 +58,111 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach $vo.list as $item}
|
{foreach $vo.list as $item}
|
||||||
<tr data-favisible="{$item.visible|default=''|htmlentities}" data-name="{$item.name}" class="{if $item.visible??''}hidden{/if}">
|
<tr data-favisible="{$item.visible|default=''|htmlentities}" data-name="{$item.name|htmlentities}" class="{if $item.visible??''}hidden{/if}">
|
||||||
<td>{$item.title}</td>
|
<td>{$item.title|htmlentities}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-8 col-xs-12">
|
<div class="col-sm-8 col-xs-12">
|
||||||
{switch $item.type}
|
{switch $item.type}
|
||||||
{case string}
|
{case string}
|
||||||
<input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
|
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule|htmlentities}" data-tip="{$item.tip|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case password}
|
{case password}
|
||||||
<input {$item.extend_html} type="password" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule}" data-tip="{$item.tip}"/>
|
<input {$item.extend_html|htmlentities} type="password" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-rule="{$item.rule|htmlentities}" data-tip="{$item.tip|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case text}
|
{case text}
|
||||||
<textarea {$item.extend_html} name="row[{$item.name}]" class="form-control" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}">{$item.value|htmlentities}</textarea>
|
<textarea {$item.extend_html|htmlentities} name="row[{$item.name|htmlentities}]" class="form-control" data-rule="{$item.rule|htmlentities}" rows="5" data-tip="{$item.tip|htmlentities}">{$item.value|htmlentities}</textarea>
|
||||||
{/case}
|
{/case}
|
||||||
{case editor}
|
{case editor}
|
||||||
<textarea {$item.extend_html} name="row[{$item.name}]" id="editor-{$item.name}" class="form-control editor" data-rule="{$item.rule}" rows="5" data-tip="{$item.tip}">{$item.value|htmlentities}</textarea>
|
<textarea {$item.extend_html|htmlentities} name="row[{$item.name|htmlentities}]" id="editor-{$item.name|htmlentities}" class="form-control editor" data-rule="{$item.rule|htmlentities}" rows="5" data-tip="{$item.tip|htmlentities}">{$item.value|htmlentities}</textarea>
|
||||||
{/case}
|
{/case}
|
||||||
{case array}
|
{case array}
|
||||||
<dl {$item.extend_html} class="fieldlist" data-name="row[{$item.name}]">
|
<dl {$item.extend_html|htmlentities} class="fieldlist" data-name="row[{$item.name|htmlentities}]">
|
||||||
<dd>
|
<dd>
|
||||||
<ins>{:isset($item["setting"]["key"])&&$item["setting"]["key"]?$item["setting"]["key"]:__('Array key')}</ins>
|
<ins>{:isset($item["setting"]["key"])&&$item["setting"]["key"]?$item["setting"]["key"]:__('Array key')}</ins>
|
||||||
<ins>{:isset($item["setting"]["value"])&&$item["setting"]["value"]?$item["setting"]["value"]:__('Array value')}</ins>
|
<ins>{:isset($item["setting"]["value"])&&$item["setting"]["value"]?$item["setting"]["value"]:__('Array value')}</ins>
|
||||||
</dd>
|
</dd>
|
||||||
<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
|
<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
|
||||||
<textarea name="row[{$item.name}]" class="form-control hide" cols="30" rows="5">{$item.value|htmlentities}</textarea>
|
<textarea name="row[{$item.name|htmlentities}]" class="form-control hide" cols="30" rows="5">{$item.value|htmlentities}</textarea>
|
||||||
</dl>
|
</dl>
|
||||||
{/case}
|
{/case}
|
||||||
{case date}
|
{case date}
|
||||||
<input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case time}
|
{case time}
|
||||||
<input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case datetime}
|
{case datetime}
|
||||||
<input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case datetimerange}
|
{case datetimerange}
|
||||||
<input {$item.extend_html} type="text" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control datetimerange" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control datetimerange" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case number}
|
{case number}
|
||||||
<input {$item.extend_html} type="number" name="row[{$item.name}]" value="{$item.value|htmlentities}" class="form-control" data-tip="{$item.tip}" data-rule="{$item.rule}"/>
|
<input {$item.extend_html|htmlentities} type="number" name="row[{$item.name|htmlentities}]" value="{$item.value|htmlentities}" class="form-control" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}"/>
|
||||||
{/case}
|
{/case}
|
||||||
{case checkbox}
|
{case checkbox}
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
{foreach name="item.content" item="vo"}
|
{foreach name="item.content" item="vo"}
|
||||||
<label for="row[{$item.name}][]-{$key}"><input id="row[{$item.name}][]-{$key}" name="row[{$item.name}][]" type="checkbox" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
|
<label for="row[{$item.name|htmlentities}][]-{$key|htmlentities}"><input id="row[{$item.name|htmlentities}][]-{$key|htmlentities}" name="row[{$item.name|htmlentities}][]" type="checkbox" value="{$key|htmlentities}" data-tip="{$item.tip|htmlentities}" {in name="key" value="$item.value" }checked{/in} /> {$vo|htmlentities}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
{/case}
|
{/case}
|
||||||
{case radio}
|
{case radio}
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
{foreach name="item.content" item="vo"}
|
{foreach name="item.content" item="vo"}
|
||||||
<label for="row[{$item.name}]-{$key}"><input id="row[{$item.name}]-{$key}" name="row[{$item.name}]" type="radio" value="{$key}" data-tip="{$item.tip}" {in name="key" value="$item.value" }checked{/in} /> {$vo}</label>
|
<label for="row[{$item.name|htmlentities}]-{$key|htmlentities}"><input id="row[{$item.name|htmlentities}]-{$key|htmlentities}" name="row[{$item.name|htmlentities}]" type="radio" value="{$key|htmlentities}" data-tip="{$item.tip|htmlentities}" {in name="key" value="$item.value" }checked{/in} /> {$vo|htmlentities}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
{/case}
|
{/case}
|
||||||
{case value="select" break="0"}{/case}
|
{case value="select" break="0"}{/case}
|
||||||
{case value="selects"}
|
{case value="selects"}
|
||||||
<select {$item.extend_html} name="row[{$item.name}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip}" {$item.type=='selects'?'multiple':''}>
|
<select {$item.extend_html|htmlentities} name="row[{$item.name|htmlentities}]{$item.type=='selects'?'[]':''}" class="form-control selectpicker" data-tip="{$item.tip|htmlentities}" {$item.type=='selects'?'multiple':''}>
|
||||||
{foreach name="item.content" item="vo"}
|
{foreach name="item.content" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value="$item.value" }selected{/in}>{$vo}</option>
|
<option value="{$key|htmlentities}" {in name="key" value="$item.value" }selected{/in}>{$vo|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
{/case}
|
{/case}
|
||||||
{case value="image" break="0"}{/case}
|
{case value="image" break="0"}{/case}
|
||||||
{case value="images"}
|
{case value="images"}
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<input id="c-{$item.name}" class="form-control" size="50" name="row[{$item.name}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
|
<input id="c-{$item.name|htmlentities}" class="form-control" size="50" name="row[{$item.name|htmlentities}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip|htmlentities}">
|
||||||
<span><button type="button" id="faupload-{$item.name}" class="btn btn-danger faupload" data-input-id="c-{$item.name}" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
<span><button type="button" id="faupload-{$item.name|htmlentities}" class="btn btn-danger faupload" data-input-id="c-{$item.name|htmlentities}" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="{$item.type=='image'?'false':'true'}" data-preview-id="p-{$item.name|htmlentities}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
<span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
<span><button type="button" id="fachoose-{$item.name|htmlentities}" class="btn btn-primary fachoose" data-input-id="c-{$item.name|htmlentities}" data-mimetype="image/*" data-multiple="{$item.type=='image'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
<span class="msg-box n-right" for="c-{$item.name}"></span>
|
<span class="msg-box n-right" for="c-{$item.name|htmlentities}"></span>
|
||||||
<ul class="row list-inline faupload-preview" id="p-{$item.name}"></ul>
|
<ul class="row list-inline faupload-preview" id="p-{$item.name|htmlentities}"></ul>
|
||||||
</div>
|
</div>
|
||||||
{/case}
|
{/case}
|
||||||
{case value="file" break="0"}{/case}
|
{case value="file" break="0"}{/case}
|
||||||
{case value="files"}
|
{case value="files"}
|
||||||
<div class="form-inline">
|
<div class="form-inline">
|
||||||
<input id="c-{$item.name}" class="form-control" size="50" name="row[{$item.name}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip}">
|
<input id="c-{$item.name|htmlentities}" class="form-control" size="50" name="row[{$item.name|htmlentities}]" type="text" value="{$item.value|htmlentities}" data-tip="{$item.tip|htmlentities}">
|
||||||
<span><button type="button" id="faupload-{$item.name}" class="btn btn-danger faupload" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
<span><button type="button" id="faupload-{$item.name|htmlentities}" class="btn btn-danger faupload" data-input-id="c-{$item.name|htmlentities}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
<span><button type="button" id="fachoose-{$item.name}" class="btn btn-primary fachoose" data-input-id="c-{$item.name}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
<span><button type="button" id="fachoose-{$item.name|htmlentities}" class="btn btn-primary fachoose" data-input-id="c-{$item.name|htmlentities}" data-multiple="{$item.type=='file'?'false':'true'}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
<span class="msg-box n-right" for="c-{$item.name}"></span>
|
<span class="msg-box n-right" for="c-{$item.name|htmlentities}"></span>
|
||||||
</div>
|
</div>
|
||||||
{/case}
|
{/case}
|
||||||
{case switch}
|
{case switch}
|
||||||
<input id="c-{$item.name}" name="row[{$item.name}]" type="hidden" value="{:$item.value?1:0}">
|
<input id="c-{$item.name|htmlentities}" name="row[{$item.name|htmlentities}]" type="hidden" value="{:$item.value?1:0}">
|
||||||
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-{$item.name}" data-yes="1" data-no="0">
|
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-{$item.name|htmlentities}" data-yes="1" data-no="0">
|
||||||
<i class="fa fa-toggle-on text-success {if !$item.value}fa-flip-horizontal text-gray{/if} fa-2x"></i>
|
<i class="fa fa-toggle-on text-success {if !$item.value}fa-flip-horizontal text-gray{/if} fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
{/case}
|
{/case}
|
||||||
{case bool}
|
{case bool}
|
||||||
<label for="row[{$item.name}]-yes"><input id="row[{$item.name}]-yes" name="row[{$item.name}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip}" /> {:__('Yes')}</label>
|
<label for="row[{$item.name|htmlentities}]-yes"><input id="row[{$item.name|htmlentities}]-yes" name="row[{$item.name|htmlentities}]" type="radio" value="1" {$item.value?'checked':''} data-tip="{$item.tip|htmlentities}" /> {:__('Yes')}</label>
|
||||||
<label for="row[{$item.name}]-no"><input id="row[{$item.name}]-no" name="row[{$item.name}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip}" /> {:__('No')}</label>
|
<label for="row[{$item.name|htmlentities}]-no"><input id="row[{$item.name|htmlentities}]-no" name="row[{$item.name|htmlentities}]" type="radio" value="0" {$item.value?'':'checked'} data-tip="{$item.tip|htmlentities}" /> {:__('No')}</label>
|
||||||
{/case}
|
{/case}
|
||||||
{case city}
|
{case city}
|
||||||
<div style="position:relative">
|
<div style="position:relative">
|
||||||
<input {$item.extend_html} type="text" name="row[{$item.name}]" id="c-{$item.name}" value="{$item.value|htmlentities}" class="form-control" data-toggle="city-picker" data-tip="{$item.tip}" data-rule="{$item.rule}" />
|
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" id="c-{$item.name|htmlentities}" value="{$item.value|htmlentities}" class="form-control" data-toggle="city-picker" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}" />
|
||||||
</div>
|
</div>
|
||||||
{/case}
|
{/case}
|
||||||
{case value="selectpage" break="0"}{/case}
|
{case value="selectpage" break="0"}{/case}
|
||||||
{case value="selectpages"}
|
{case value="selectpages"}
|
||||||
<input {$item.extend_html} type="text" name="row[{$item.name}]" id="c-{$item.name}" value="{$item.value|htmlentities}" class="form-control selectpage" data-source="{:url('general.config/selectpage')}?id={$item.id}" data-primary-key="{$item.setting.primarykey}" data-field="{$item.setting.field}" data-multiple="{$item.type=='selectpage'?'false':'true'}" data-tip="{$item.tip}" data-rule="{$item.rule}" />
|
<input {$item.extend_html|htmlentities} type="text" name="row[{$item.name|htmlentities}]" id="c-{$item.name|htmlentities}" value="{$item.value|htmlentities}" class="form-control selectpage" data-source="{:url('general.config/selectpage')}?id={$item.id|htmlentities}" data-primary-key="{$item.setting.primarykey|htmlentities}" data-field="{$item.setting.field|htmlentities}" data-multiple="{$item.type=='selectpage'?'false':'true'}" data-tip="{$item.tip|htmlentities}" data-rule="{$item.rule|htmlentities}" />
|
||||||
{/case}
|
{/case}
|
||||||
{case custom}
|
{case custom}
|
||||||
{$item.extend_html}
|
{$item.extend_html|htmlentities}
|
||||||
{/case}
|
{/case}
|
||||||
{/switch}
|
{/switch}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -172,7 +172,7 @@
|
||||||
</td>
|
</td>
|
||||||
{if $Think.config.app_debug}
|
{if $Think.config.app_debug}
|
||||||
<td>{php}echo "{\$site.". $item['name'] . "}";{/php}</td>
|
<td>{php}echo "{\$site.". $item['name'] . "}";{/php}</td>
|
||||||
<td>{if $item['id']>18}<a href="javascript:;" class="btn-delcfg text-muted" data-name="{$item.name}"><i class="fa fa-times"></i></a>{/if}</td>
|
<td>{if $item['id']>18}<a href="javascript:;" class="btn-delcfg text-muted" data-name="{$item.name|htmlentities}"><i class="fa fa-times"></i></a>{/if}</td>
|
||||||
{/if}
|
{/if}
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
@ -205,7 +205,7 @@
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<select name="row[group]" class="form-control selectpicker">
|
<select name="row[group]" class="form-control selectpicker">
|
||||||
{foreach name="groupList" item="vo"}
|
{foreach name="groupList" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value="basic" }selected{/in}>{$vo}</option>
|
<option value="{$key|htmlentities}" {in name="key" value="basic" }selected{/in}>{$vo|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -215,7 +215,7 @@
|
||||||
<div class="col-xs-12 col-sm-4">
|
<div class="col-xs-12 col-sm-4">
|
||||||
<select name="row[type]" id="c-type" class="form-control selectpicker">
|
<select name="row[type]" id="c-type" class="form-control selectpicker">
|
||||||
{foreach name="typeList" item="vo"}
|
{foreach name="typeList" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value="string" }selected{/in}>{$vo}</option>
|
<option value="{$key|htmlentities}" {in name="key" value="string" }selected{/in}>{$vo|htmlentities}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -306,7 +306,7 @@ value2|title2</textarea>
|
||||||
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" type="button">{:__('Choose')}</button>
|
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" type="button">{:__('Choose')}</button>
|
||||||
<ul class="dropdown-menu pull-right rulelist">
|
<ul class="dropdown-menu pull-right rulelist">
|
||||||
{volist name="ruleList" id="item"}
|
{volist name="ruleList" id="item"}
|
||||||
<li><a href="javascript:;" data-value="{$key}">{$item}<span class="text-muted">({$key})</span></a></li>
|
<li><a href="javascript:;" data-value="{$key|htmlentities}">{$item|htmlentities}<span class="text-muted">({$key|htmlentities})</span></a></li>
|
||||||
{/volist}
|
{/volist}
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,13 @@
|
||||||
<!-- 主体内容区域 -->
|
<!-- 主体内容区域 -->
|
||||||
<div class="content-wrapper tab-content tab-addtabs">
|
<div class="content-wrapper tab-content tab-addtabs">
|
||||||
{if $fixedmenu}
|
{if $fixedmenu}
|
||||||
<div role="tabpanel" class="tab-pane {:$referermenu?'':'active'}" id="con_{$fixedmenu.id}">
|
<div role="tabpanel" class="tab-pane {:$referermenu?'':'active'}" id="con_{$fixedmenu.id|htmlentities}">
|
||||||
<iframe src="{$fixedmenu.url}{:stripos($fixedmenu.url, '?') !== false ? '&' : '?'}addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
|
<iframe src="{$fixedmenu.url|htmlentities}{:stripos($fixedmenu.url, '?') !== false ? '&' : '?'}addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $referermenu}
|
{if $referermenu}
|
||||||
<div role="tabpanel" class="tab-pane active" id="con_{$referermenu.id}">
|
<div role="tabpanel" class="tab-pane active" id="con_{$referermenu.id|htmlentities}">
|
||||||
<iframe src="{$referermenu.url}{:stripos($referermenu.url, '?') !== false ? '&' : '?'}addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
|
<iframe src="{$referermenu.url|htmlentities}{:stripos($referermenu.url, '?') !== false ? '&' : '?'}addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<footer class="main-footer hide">
|
<footer class="main-footer hide">
|
||||||
<div class="pull-right hidden-xs">
|
<div class="pull-right hidden-xs">
|
||||||
</div>
|
</div>
|
||||||
<strong>Copyright © 2017-{:date("Y")} <a href="__PUBLIC__">{$site.name}</a>.</strong> All rights reserved.
|
<strong>Copyright © 2017-{:date("Y")} <a href="__PUBLIC__">{$site.name|htmlentities}</a>.</strong> All rights reserved.
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<!-- 右侧控制栏 -->
|
<!-- 右侧控制栏 -->
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
{if $background}
|
{if $background}
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{
|
body{
|
||||||
background-image: url('{$background}');
|
background-image: url('{$background|htmlentities}');
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
@ -116,7 +116,7 @@
|
||||||
{if $Think.config.fastadmin.login_captcha}
|
{if $Think.config.fastadmin.login_captcha}
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-addon"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></div>
|
<div class="input-group-addon"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></div>
|
||||||
<input type="text" name="captcha" class="form-control" placeholder="{:__('Captcha')}" data-rule="{:__('Captcha')}:required;length({$Think.config.captcha.length})" autocomplete="off"/>
|
<input type="text" name="captcha" class="form-control" placeholder="{:__('Captcha')}" data-rule="{:__('Captcha')}:required;length({$Think.config.captcha.length|htmlentities})" autocomplete="off"/>
|
||||||
<span class="input-group-addon" style="padding:0;border:none;cursor:pointer;">
|
<span class="input-group-addon" style="padding:0;border:none;cursor:pointer;">
|
||||||
<img src="{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha" width="100" height="30" onclick="this.src = '{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha&r=' + Math.random();"/>
|
<img src="{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha" width="100" height="30" onclick="this.src = '{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha&r=' + Math.random();"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
</ol>
|
</ol>
|
||||||
<ol class="breadcrumb pull-right">
|
<ol class="breadcrumb pull-right">
|
||||||
{foreach $breadcrumb as $vo}
|
{foreach $breadcrumb as $vo}
|
||||||
<li><a href="javascript:;" data-url="{$vo.url}">{$vo.title}</a></li>
|
<li><a href="javascript:;" data-url="{$vo.url|htmlentities}">{$vo.title|htmlentities}</a></li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
{foreach name="statusList" item="vo"}
|
{foreach name="statusList" item="vo"}
|
||||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label>
|
<label for="row[status]-{$key|htmlentities}"><input id="row[status]-{$key|htmlentities}" name="row[status]" type="radio" value="{$key|htmlentities}" {in name="key" value="normal"}checked{/in} /> {$vo|htmlentities}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
{foreach name="statusList" item="vo"}
|
{foreach name="statusList" item="vo"}
|
||||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
<label for="row[status]-{$key|htmlentities}"><input id="row[status]-{$key|htmlentities}" name="row[status]" type="radio" value="{$key|htmlentities}" {in name="key" value="$row.status"}checked{/in} /> {$vo|htmlentities}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ class Common extends Api
|
||||||
/**
|
/**
|
||||||
* 上传文件
|
* 上传文件
|
||||||
* @ApiMethod (POST)
|
* @ApiMethod (POST)
|
||||||
* @ApiParams (name="file", type="File", required=true, description="文件流")
|
* @ApiParams (name="file", type="file", required=true, description="文件流")
|
||||||
*/
|
*/
|
||||||
public function upload()
|
public function upload()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -577,6 +577,7 @@ class Backend extends Controller
|
||||||
$result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields));
|
$result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields));
|
||||||
}
|
}
|
||||||
$result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0);
|
$result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0);
|
||||||
|
$result = array_map("htmlentities", $result);
|
||||||
$list[] = $result;
|
$list[] = $result;
|
||||||
}
|
}
|
||||||
if ($istree && !$primaryvalue) {
|
if ($istree && !$primaryvalue) {
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,7 @@ class Auth
|
||||||
|
|
||||||
if ($user->loginfailure >= 10 && time() - $user->loginfailuretime < 86400) {
|
if ($user->loginfailure >= 10 && time() - $user->loginfailuretime < 86400) {
|
||||||
$this->setError('Please try again after 1 day');
|
$this->setError('Please try again after 1 day');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->password != $this->getEncryptPassword($password, $user->salt)) {
|
if ($user->password != $this->getEncryptPassword($password, $user->salt)) {
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,8 @@ class Log extends AbstractLogger
|
||||||
* @param array $context
|
* @param array $context
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
|
||||||
* @throws \Psr\Log\InvalidArgumentException
|
|
||||||
*/
|
*/
|
||||||
public function log($level, $message, array $context = array())
|
public function log($level, $message, array $context = [])
|
||||||
{
|
{
|
||||||
\think\Log::write($message);
|
\think\Log::write($message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ class Config extends Model
|
||||||
}
|
}
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
CONF_PATH . 'extra' . DS . 'site.php',
|
CONF_PATH . 'extra' . DS . 'site.php',
|
||||||
'<?php' . "\n\nreturn " . var_export_short($config) . ";\n"
|
'<?php' . "\n\nreturn " . var_export($config, true) . ";\n"
|
||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,10 @@ use think\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员模型
|
* 会员模型
|
||||||
|
* @method static mixed getByUsername($str) 通过用户名查询用户
|
||||||
|
* @method static mixed getByNickname($str) 通过昵称查询用户
|
||||||
|
* @method static mixed getByMobile($str) 通过手机查询用户
|
||||||
|
* @method static mixed getByEmail($str) 通过邮箱查询用户
|
||||||
*/
|
*/
|
||||||
class User extends Model
|
class User extends Model
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -41,18 +41,19 @@
|
||||||
<p class="clearfix">
|
<p class="clearfix">
|
||||||
<a href="__PUBLIC__" class="btn btn-grey">{:__('Go back')}</a>
|
<a href="__PUBLIC__" class="btn btn-grey">{:__('Go back')}</a>
|
||||||
{if $url}
|
{if $url}
|
||||||
<a href="{$url|htmlentities}" class="btn btn-primary">{:__('Jump now')}</a>
|
<a id="href" href="{$url|htmlentities}" class="btn btn-primary">{:__('Jump now')}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{if $url}
|
{if $url}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function () {
|
(function () {
|
||||||
var wait = document.getElementById('wait');
|
var wait = document.getElementById('wait'),
|
||||||
|
href = document.getElementById('href').href;
|
||||||
var interval = setInterval(function () {
|
var interval = setInterval(function () {
|
||||||
var time = --wait.innerHTML;
|
var time = --wait.innerHTML;
|
||||||
if (time <= 0) {
|
if (time <= 0) {
|
||||||
location.href = "{$url|htmlentities}";
|
location.href = href;
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ return [
|
||||||
//允许跨域的域名,多个以,分隔
|
//允许跨域的域名,多个以,分隔
|
||||||
'cors_request_domain' => 'localhost,127.0.0.1',
|
'cors_request_domain' => 'localhost,127.0.0.1',
|
||||||
//版本号
|
//版本号
|
||||||
'version' => '1.5.2.20240906',
|
'version' => '1.5.3.20250217',
|
||||||
//API接口地址
|
//API接口地址
|
||||||
'api_url' => 'https://api.fastadmin.net',
|
'api_url' => 'https://api.fastadmin.net',
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,10 @@ return [
|
||||||
* 是否支持批量上传
|
* 是否支持批量上传
|
||||||
*/
|
*/
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
|
/**
|
||||||
|
* 上传超时时长,这里仅用于JS上传超时控制
|
||||||
|
*/
|
||||||
|
'timeout' => 60000,
|
||||||
/**
|
/**
|
||||||
* 是否支持分片上传
|
* 是否支持分片上传
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,12 @@ return [
|
||||||
'Change password successful' => '修改密码成功',
|
'Change password successful' => '修改密码成功',
|
||||||
'Password and confirm password don\'t match' => '两次输入的密码不一致',
|
'Password and confirm password don\'t match' => '两次输入的密码不一致',
|
||||||
'Captcha is incorrect' => '验证码不正确',
|
'Captcha is incorrect' => '验证码不正确',
|
||||||
|
'Please try again after 1 day' => '请于1天后再尝试登录',
|
||||||
'Logged in successful' => '登录成功',
|
'Logged in successful' => '登录成功',
|
||||||
'Logout successful' => '退出成功',
|
'Logout successful' => '退出成功',
|
||||||
'User center already closed' => '会员中心已经关闭',
|
'User center already closed' => '会员中心已经关闭',
|
||||||
'Don\'t have an account? Sign up' => '还没有账号?点击注册',
|
'Don\'t have an account? Sign up' => '还没有账号?点击注册',
|
||||||
'Already have an account? Sign in' => '已经有账号?点击登录',
|
'Already have an account? Sign in' => '已经有账号?点击登录',
|
||||||
'Operation failed' => '操作失败',
|
'Operation failed' => '操作失败',
|
||||||
'Invalid parameters' => '参数不正确',
|
'Invalid parameters' => '参数不正确',
|
||||||
'Change password failure' => '修改密码失败',
|
'Change password failure' => '修改密码失败',
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
"fastadmin-cxselect": "~1.4.0",
|
"fastadmin-cxselect": "~1.4.0",
|
||||||
"fastadmin-dragsort": "~1.0.0",
|
"fastadmin-dragsort": "~1.0.0",
|
||||||
"fastadmin-addtabs": "~1.0.8",
|
"fastadmin-addtabs": "~1.0.8",
|
||||||
"fastadmin-selectpage": "~1.0.12",
|
"fastadmin-selectpage": "^1.0.12",
|
||||||
"fastadmin-layer": "~3.5.1",
|
"fastadmin-layer": "~3.5.1",
|
||||||
"bootstrap-slider": "*"
|
"bootstrap-slider": "*"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ class Date
|
||||||
*/
|
*/
|
||||||
public static function human($remote, $local = null)
|
public static function human($remote, $local = null)
|
||||||
{
|
{
|
||||||
$time_diff = (is_null($local) || $local ? time() : $local) - $remote;
|
$time_diff = (is_null($local) ? time() : $local) - $remote;
|
||||||
$tense = $time_diff < 0 ? 'after' : 'ago';
|
$tense = $time_diff < 0 ? 'after' : 'ago';
|
||||||
$time_diff = abs($time_diff);
|
$time_diff = abs($time_diff);
|
||||||
$chunks = [
|
$chunks = [
|
||||||
|
|
@ -146,7 +146,7 @@ class Date
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return __("%d $name%s $tense", $count, ($count > 1 ? 's' : ''));
|
return __("%d $name%s $tense", [$count, ($count > 1 ? 's' : '')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class Random
|
||||||
* @param int $len 长度
|
* @param int $len 长度
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function alnum($len = 6)
|
public static function alnum(int $len = 6): string
|
||||||
{
|
{
|
||||||
return self::build('alnum', $len);
|
return self::build('alnum', $len);
|
||||||
}
|
}
|
||||||
|
|
@ -25,7 +25,7 @@ class Random
|
||||||
* @param int $len 长度
|
* @param int $len 长度
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function alpha($len = 6)
|
public static function alpha(int $len = 6): string
|
||||||
{
|
{
|
||||||
return self::build('alpha', $len);
|
return self::build('alpha', $len);
|
||||||
}
|
}
|
||||||
|
|
@ -36,7 +36,7 @@ class Random
|
||||||
* @param int $len 长度
|
* @param int $len 长度
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function numeric($len = 4)
|
public static function numeric(int $len = 4): string
|
||||||
{
|
{
|
||||||
return self::build('numeric', $len);
|
return self::build('numeric', $len);
|
||||||
}
|
}
|
||||||
|
|
@ -47,7 +47,7 @@ class Random
|
||||||
* @param int $len 长度
|
* @param int $len 长度
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function nozero($len = 4)
|
public static function nozero(int $len = 4): string
|
||||||
{
|
{
|
||||||
return self::build('nozero', $len);
|
return self::build('nozero', $len);
|
||||||
}
|
}
|
||||||
|
|
@ -58,7 +58,7 @@ class Random
|
||||||
* @param int $len 长度
|
* @param int $len 长度
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function build($type = 'alnum', $len = 8)
|
public static function build(string $type = 'alnum', int $len = 8): string
|
||||||
{
|
{
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'alpha':
|
case 'alpha':
|
||||||
|
|
@ -93,7 +93,7 @@ class Random
|
||||||
* 获取全球唯一标识
|
* 获取全球唯一标识
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function uuid()
|
public static function uuid(): string
|
||||||
{
|
{
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
|
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@ class Tree
|
||||||
'@url' => $childdata || !isset($value['@url']) ? "javascript:;" : $value['@url'],
|
'@url' => $childdata || !isset($value['@url']) ? "javascript:;" : $value['@url'],
|
||||||
'@addtabs' => $childdata || !isset($value['@url']) ? "" : (stripos($value['@url'], "?") !== false ? "&" : "?") . "ref=addtabs",
|
'@addtabs' => $childdata || !isset($value['@url']) ? "" : (stripos($value['@url'], "?") !== false ? "&" : "?") . "ref=addtabs",
|
||||||
'@caret' => ($childdata && (!isset($value['@badge']) || !$value['@badge']) ? '<i class="fa fa-angle-left"></i>' : ''),
|
'@caret' => ($childdata && (!isset($value['@badge']) || !$value['@badge']) ? '<i class="fa fa-angle-left"></i>' : ''),
|
||||||
'@badge' => isset($value['@badge']) ? $value['@badge'] : '',
|
'@badge' => $value['@badge'] ?? '',
|
||||||
'@class' => ($selected ? ' active' : '') . ($disabled ? ' disabled' : '') . ($childdata ? ' treeview' . (config('fastadmin.show_submenu') ? ' treeview-open' : '') : ''),
|
'@class' => ($selected ? ' active' : '') . ($disabled ? ' disabled' : '') . ($childdata ? ' treeview' . (config('fastadmin.show_submenu') ? ' treeview-open' : '') : ''),
|
||||||
);
|
);
|
||||||
$str .= strtr($nstr, $value);
|
$str .= strtr($nstr, $value);
|
||||||
|
|
@ -422,7 +422,7 @@ class Tree
|
||||||
{
|
{
|
||||||
$arr = [];
|
$arr = [];
|
||||||
foreach ($data as $k => $v) {
|
foreach ($data as $k => $v) {
|
||||||
$childlist = isset($v['childlist']) ? $v['childlist'] : [];
|
$childlist = $v['childlist'] ?? [];
|
||||||
unset($v['childlist']);
|
unset($v['childlist']);
|
||||||
$v[$field] = $v['spacer'] . ' ' . $v[$field];
|
$v[$field] = $v['spacer'] . ' ' . $v[$field];
|
||||||
$v['haschild'] = $childlist ? 1 : 0;
|
$v['haschild'] = $childlist ? 1 : 0;
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'cookie']
|
||||||
title: __('Operate'),
|
title: __('Operate'),
|
||||||
table: table,
|
table: table,
|
||||||
formatter: Controller.api.formatter.operate,
|
formatter: Controller.api.formatter.operate,
|
||||||
align: 'right'
|
align: 'right',
|
||||||
|
cellStyle: function (value, row, index) {
|
||||||
|
return {css: {'min-width': '158px'}};
|
||||||
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
@ -238,6 +241,27 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'cookie']
|
||||||
Layer.close(index);
|
Layer.close(index);
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
} else if (ret && ret.code === -3) {
|
||||||
|
//插件目录发现影响全局的文件
|
||||||
|
Layer.open({
|
||||||
|
content: Template("conflicttpl", ret.data),
|
||||||
|
shade: 0.8,
|
||||||
|
area: area,
|
||||||
|
title: __('Warning'),
|
||||||
|
btn: [__('Continue install'), __('Cancel')],
|
||||||
|
end: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
yes: function (index) {
|
||||||
|
up.removeFile(file);
|
||||||
|
file.force = true;
|
||||||
|
up.uploadFile(file);
|
||||||
|
Layer.close(index);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Layer.alert(ret.msg, {title: __('Warning'), icon: 0});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -480,7 +504,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'cookie']
|
||||||
//如果登录已经超时,重新提醒登录
|
//如果登录已经超时,重新提醒登录
|
||||||
if (uid && uid != ret.data.uid) {
|
if (uid && uid != ret.data.uid) {
|
||||||
Controller.api.userinfo.set(null);
|
Controller.api.userinfo.set(null);
|
||||||
$(".operate[data-name='" + name + "'] .btn-install").trigger("click");
|
$(".operate[data-name='" + name + "'] .btn-install:first").trigger("click");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
top.Fast.api.open(ret.data.payurl, __('Pay now'), {
|
top.Fast.api.open(ret.data.payurl, __('Pay now'), {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
|
||||||
table.bootstrapTable({
|
table.bootstrapTable({
|
||||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
sortName: '',
|
sortName: '',
|
||||||
escape: false,
|
escape: true,
|
||||||
columns: [
|
columns: [
|
||||||
[
|
[
|
||||||
{field: 'state', checkbox: true,},
|
{field: 'state', checkbox: true,},
|
||||||
|
|
@ -180,7 +180,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
|
||||||
var iconfunc = function () {
|
var iconfunc = function () {
|
||||||
Layer.open({
|
Layer.open({
|
||||||
type: 1,
|
type: 1,
|
||||||
area: ['99%', '98%'], //宽高
|
area: ['80%', '80%'], //宽高
|
||||||
content: Template('chooseicontpl', {iconlist: iconlist})
|
content: Template('chooseicontpl', {iconlist: iconlist})
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -192,8 +192,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
|
||||||
});
|
});
|
||||||
$(document).on('click', ".btn-search-icon", function () {
|
$(document).on('click', ".btn-search-icon", function () {
|
||||||
if (iconlist.length == 0) {
|
if (iconlist.length == 0) {
|
||||||
$.get(Config.site.cdnurl + "/assets/libs/font-awesome/less/variables.less", function (ret) {
|
$.get(Config.site.cdnurl + "/assets/libs/font-awesome/css/font-awesome.css", function (ret) {
|
||||||
var exp = /fa-var-(.*):/ig;
|
var exp = /fa-(.*):before/ig;
|
||||||
var result;
|
var result;
|
||||||
while ((result = exp.exec(ret)) != null) {
|
while ((result = exp.exec(ret)) != null) {
|
||||||
iconlist.push(result[1]);
|
iconlist.push(result[1]);
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
|
||||||
{
|
{
|
||||||
field: 'operate', title: __('Operate'), width: 85, events: {
|
field: 'operate', title: __('Operate'), width: 85, events: {
|
||||||
'click .btn-chooseone': function (e, value, row, index) {
|
'click .btn-chooseone': function (e, value, row, index) {
|
||||||
Fast.api.close({url: row.url, multiple: multiple});
|
Fast.api.close($.extend({multiple: multiple}, row));
|
||||||
},
|
},
|
||||||
}, formatter: function () {
|
}, formatter: function () {
|
||||||
return '<a href="javascript:;" class="btn btn-danger btn-chooseone btn-xs"><i class="fa fa-check"></i> ' + __('Choose') + '</a>';
|
return '<a href="javascript:;" class="btn btn-danger btn-chooseone btn-xs"><i class="fa fa-check"></i> ' + __('Choose') + '</a>';
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
pk: 'id',
|
pk: 'id',
|
||||||
sortName: 'weigh',
|
sortName: 'weigh',
|
||||||
escape: false,
|
escape: true,
|
||||||
columns: [
|
columns: [
|
||||||
[
|
[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
pk: 'id',
|
pk: 'id',
|
||||||
sortName: 'user.id',
|
sortName: 'user.id',
|
||||||
|
fixedColumns: true,
|
||||||
|
fixedRightNumber: 1,
|
||||||
columns: [
|
columns: [
|
||||||
[
|
[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@
|
||||||
} else {
|
} else {
|
||||||
key = isArray ? value : key;
|
key = isArray ? value : key;
|
||||||
}
|
}
|
||||||
optionList.push(sprintf("<option value='" + key + "' %s>" + value + "</option>", key == vObjCol.defaultValue ? 'selected' : ''));
|
optionList.push(sprintf("<option value='" + Fast.api.escape(key) + "' %s>" + Fast.api.escape(value) + "</option>", key == vObjCol.defaultValue ? 'selected' : ''));
|
||||||
});
|
});
|
||||||
return optionList;
|
return optionList;
|
||||||
};
|
};
|
||||||
|
|
@ -208,7 +208,7 @@
|
||||||
} else {
|
} else {
|
||||||
value = process ? process(obj.val()) : obj.val();
|
value = process ? process(obj.val()) : obj.val();
|
||||||
}
|
}
|
||||||
if (removeempty && (value == '' || value == null || ($.isArray(value) && value.length == 0)) && !sym.match(/null/i)) {
|
if (removeempty && (value === '' || value == null || ($.isArray(value) && value.length === 0)) && !sym.match(/null/i)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -268,7 +268,7 @@
|
||||||
return "Common search";
|
return "Common search";
|
||||||
},
|
},
|
||||||
formatCommonSubmitButton: function () {
|
formatCommonSubmitButton: function () {
|
||||||
return "Submit";
|
return "Search";
|
||||||
},
|
},
|
||||||
formatCommonResetButton: function () {
|
formatCommonResetButton: function () {
|
||||||
return "Reset";
|
return "Reset";
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
|
||||||
//绑定select元素事件
|
//绑定select元素事件
|
||||||
if ($(".selectpicker", form).length > 0) {
|
if ($(".selectpicker", form).length > 0) {
|
||||||
require(['bootstrap-select', 'bootstrap-select-lang'], function () {
|
require(['bootstrap-select', 'bootstrap-select-lang'], function () {
|
||||||
|
$.fn.selectpicker.Constructor.BootstrapVersion = '3';
|
||||||
$('.selectpicker', form).selectpicker();
|
$('.selectpicker', form).selectpicker();
|
||||||
$(form).on("reset", function () {
|
$(form).on("reset", function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|
@ -218,7 +219,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
|
||||||
};
|
};
|
||||||
var origincallback = function (start, end) {
|
var origincallback = function (start, end) {
|
||||||
$(this.element).val(start.format(this.locale.format) + " - " + end.format(this.locale.format));
|
$(this.element).val(start.format(this.locale.format) + " - " + end.format(this.locale.format));
|
||||||
$(this.element).trigger('change');
|
$(this.element).trigger('change').trigger('validate');
|
||||||
};
|
};
|
||||||
$(".datetimerange", form).each(function () {
|
$(".datetimerange", form).each(function () {
|
||||||
var callback = typeof $(this).data('callback') == 'function' ? $(this).data('callback') : origincallback;
|
var callback = typeof $(this).data('callback') == 'function' ? $(this).data('callback') : origincallback;
|
||||||
|
|
@ -226,7 +227,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
|
||||||
callback.call(picker, picker.startDate, picker.endDate);
|
callback.call(picker, picker.startDate, picker.endDate);
|
||||||
});
|
});
|
||||||
$(this).on('cancel.daterangepicker', function (ev, picker) {
|
$(this).on('cancel.daterangepicker', function (ev, picker) {
|
||||||
$(this).val('').trigger('change');
|
$(this).val('').trigger('change').trigger('validate');
|
||||||
});
|
});
|
||||||
$(this).daterangepicker($.extend(true, {}, options, $(this).data() || {}, $(this).data("daterangepicker-options") || {}));
|
$(this).daterangepicker($.extend(true, {}, options, $(this).data() || {}, $(this).data("daterangepicker-options") || {}));
|
||||||
});
|
});
|
||||||
|
|
@ -294,6 +295,9 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
|
||||||
var url = Config.upload.fullmode ? Fast.api.cdnurl(data.url) : data.url;
|
var url = Config.upload.fullmode ? Fast.api.cdnurl(data.url) : data.url;
|
||||||
$("#" + input_id).val(url).trigger("change").trigger("validate");
|
$("#" + input_id).val(url).trigger("change").trigger("validate");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 触发选择文件自定义事件
|
||||||
|
button.trigger("fa.event.selectedfile", data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -567,7 +571,9 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
var $disabledElements = form.find(':disabled').removeAttr('disabled');
|
||||||
var dataArr = form.serializeArray(), dataObj = {}, fieldName, fieldValue;
|
var dataArr = form.serializeArray(), dataObj = {}, fieldName, fieldValue;
|
||||||
|
$disabledElements.attr('disabled', 'disabled');
|
||||||
$(dataArr).each(function (i, field) {
|
$(dataArr).each(function (i, field) {
|
||||||
fieldName = field.name;
|
fieldName = field.name;
|
||||||
fieldValue = field.value;
|
fieldValue = field.value;
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
return __('Common search');
|
return __('Common search');
|
||||||
},
|
},
|
||||||
formatCommonSubmitButton: function () {
|
formatCommonSubmitButton: function () {
|
||||||
return __('Submit');
|
return __('Search');
|
||||||
},
|
},
|
||||||
formatCommonResetButton: function () {
|
formatCommonResetButton: function () {
|
||||||
return __('Reset');
|
return __('Reset');
|
||||||
|
|
@ -764,7 +764,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
suffix = /[\.]?([a-zA-Z0-9]+)$/.exec(value);
|
suffix = /[\.]?([a-zA-Z0-9]+)$/.exec(value);
|
||||||
suffix = suffix ? suffix[1] : 'file';
|
suffix = suffix ? suffix[1] : 'file';
|
||||||
url = Fast.api.fixurl("ajax/icon?suffix=" + suffix);
|
url = Fast.api.fixurl("ajax/icon?suffix=" + suffix);
|
||||||
html.push('<a href="' + value + '" target="_blank"><img src="' + url + '" class="' + classname + '"></a>');
|
html.push('<a href="' + value + '" target="_blank"><img src="' + url + '" class="' + classname + '" width="30" height="30"></a>');
|
||||||
});
|
});
|
||||||
return html.join(' ');
|
return html.join(' ');
|
||||||
},
|
},
|
||||||
|
|
@ -866,6 +866,15 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
value = Fast.api.escape(customValue);
|
value = Fast.api.escape(customValue);
|
||||||
field = this.customField;
|
field = this.customField;
|
||||||
}
|
}
|
||||||
|
if (typeof that.searchList === 'object' && typeof that.searchList.then === 'function') {
|
||||||
|
$.when(that.searchList).done(function (ret) {
|
||||||
|
if (ret.data && ret.data.searchlist && $.isArray(ret.data.searchlist)) {
|
||||||
|
that.searchList = ret.data.searchlist;
|
||||||
|
} else if (ret.constructor === Array || ret.constructor === Object) {
|
||||||
|
that.searchList = ret;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
if (typeof that.searchList === 'object' && typeof that.custom === 'undefined') {
|
if (typeof that.searchList === 'object' && typeof that.custom === 'undefined') {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var searchValues = Object.values(colorArr);
|
var searchValues = Object.values(colorArr);
|
||||||
|
|
@ -879,11 +888,11 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
|
||||||
|
|
||||||
//渲染Flag
|
//渲染Flag
|
||||||
var html = [];
|
var html = [];
|
||||||
var arr = value != '' ? value.split(',') : [];
|
var arr = $.isArray(value) ? value : value != '' ? value.split(',') : [];
|
||||||
var color, display, label;
|
var color, display, label;
|
||||||
$.each(arr, function (i, value) {
|
$.each(arr, function (i, value) {
|
||||||
value = value == null || value.length === 0 ? '' : value.toString();
|
value = value == null || value.length === 0 ? '' : value.toString();
|
||||||
if (value == '')
|
if (value === '')
|
||||||
return true;
|
return true;
|
||||||
color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
|
color = value && typeof colorArr[value] !== 'undefined' ? colorArr[value] : 'primary';
|
||||||
display = typeof that.searchList !== 'undefined' && typeof that.searchList[value] !== 'undefined' ? that.searchList[value] : __(value.charAt(0).toUpperCase() + value.slice(1));
|
display = typeof that.searchList !== 'undefined' && typeof that.searchList[value] !== 'undefined' ? that.searchList[value] : __(value.charAt(0).toUpperCase() + value.slice(1));
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/** vim: et:ts=4:sw=4:sts=4
|
/** vim: et:ts=4:sw=4:sts=4
|
||||||
* @license RequireJS 2.3.2 Copyright jQuery Foundation and other contributors.
|
* @license RequireJS 2.3.7 Copyright jQuery Foundation and other contributors.
|
||||||
* Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
|
* Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
|
||||||
*/
|
*/
|
||||||
//Not using strict: uneven strict support in browsers, #392, and causes
|
//Not using strict: uneven strict support in browsers, #392, and causes
|
||||||
|
|
@ -11,7 +11,7 @@ var requirejs, require, define;
|
||||||
(function (global, setTimeout) {
|
(function (global, setTimeout) {
|
||||||
var req, s, head, baseElement, dataMain, src,
|
var req, s, head, baseElement, dataMain, src,
|
||||||
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
||||||
version = '2.3.2',
|
version = '2.3.7',
|
||||||
commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,
|
commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,
|
||||||
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
||||||
jsSuffixRegExp = /\.js$/,
|
jsSuffixRegExp = /\.js$/,
|
||||||
|
|
@ -33,7 +33,8 @@ var requirejs, require, define;
|
||||||
contexts = {},
|
contexts = {},
|
||||||
cfg = {},
|
cfg = {},
|
||||||
globalDefQueue = [],
|
globalDefQueue = [],
|
||||||
useInteractive = false;
|
useInteractive = false,
|
||||||
|
disallowedProps = ['__proto__', 'constructor'];
|
||||||
|
|
||||||
//Could match something like ')//comment', do not lose the prefix to comment.
|
//Could match something like ')//comment', do not lose the prefix to comment.
|
||||||
function commentReplace(match, singlePrefix) {
|
function commentReplace(match, singlePrefix) {
|
||||||
|
|
@ -94,7 +95,7 @@ var requirejs, require, define;
|
||||||
function eachProp(obj, func) {
|
function eachProp(obj, func) {
|
||||||
var prop;
|
var prop;
|
||||||
for (prop in obj) {
|
for (prop in obj) {
|
||||||
if (hasProp(obj, prop)) {
|
if (hasProp(obj, prop) && disallowedProps.indexOf(prop) == -1) {
|
||||||
if (func(obj[prop], prop)) {
|
if (func(obj[prop], prop)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -165,7 +166,7 @@ var requirejs, require, define;
|
||||||
* @returns {Error}
|
* @returns {Error}
|
||||||
*/
|
*/
|
||||||
function makeError(id, msg, err, requireModules) {
|
function makeError(id, msg, err, requireModules) {
|
||||||
var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
|
var e = new Error(msg + '\nhttps://requirejs.org/docs/errors.html#' + id);
|
||||||
e.requireType = id;
|
e.requireType = id;
|
||||||
e.requireModules = requireModules;
|
e.requireModules = requireModules;
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
@ -440,7 +441,9 @@ var requirejs, require, define;
|
||||||
//Account for relative paths if there is a base name.
|
//Account for relative paths if there is a base name.
|
||||||
if (name) {
|
if (name) {
|
||||||
if (prefix) {
|
if (prefix) {
|
||||||
if (pluginModule && pluginModule.normalize) {
|
if (isNormalized) {
|
||||||
|
normalizedName = name;
|
||||||
|
} else if (pluginModule && pluginModule.normalize) {
|
||||||
//Plugin is loaded, use its normalize method.
|
//Plugin is loaded, use its normalize method.
|
||||||
normalizedName = pluginModule.normalize(name, function (name) {
|
normalizedName = pluginModule.normalize(name, function (name) {
|
||||||
return normalize(name, parentName, applyMap);
|
return normalize(name, parentName, applyMap);
|
||||||
|
|
@ -972,7 +975,8 @@ var requirejs, require, define;
|
||||||
//prefix and name should already be normalized, no need
|
//prefix and name should already be normalized, no need
|
||||||
//for applying map config again either.
|
//for applying map config again either.
|
||||||
normalizedMap = makeModuleMap(map.prefix + '!' + name,
|
normalizedMap = makeModuleMap(map.prefix + '!' + name,
|
||||||
this.map.parentMap);
|
this.map.parentMap,
|
||||||
|
true);
|
||||||
on(normalizedMap,
|
on(normalizedMap,
|
||||||
'defined', bind(this, function (value) {
|
'defined', bind(this, function (value) {
|
||||||
this.map.normalizedMap = normalizedMap;
|
this.map.normalizedMap = normalizedMap;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue