Compare commits

...

9 Commits

Author SHA1 Message Date
Anyon
d33c2aa8c5 Update form.html 2022-04-18 17:48:48 +08:00
Anyon
e94a4521a2 修改样式 2022-04-18 17:47:58 +08:00
Anyon
4eeda21abc Update Runtime.php 2022-04-18 17:44:52 +08:00
Anyon
8eb0af3a69 Update Runtime.php 2022-04-18 17:43:59 +08:00
Anyon
603104a64c 修改规则 2022-04-18 17:40:27 +08:00
Anyon
3ee39c6a46 修改同步样式 2022-04-18 17:12:00 +08:00
Anyon
d55253342f 修改样式 2022-04-18 17:01:02 +08:00
Anyon
6e73105af4 修改插件语言包,同步 ckeditor 2022-04-18 16:40:07 +08:00
Anyon
5530384e49 修改后台样式 2022-04-18 16:25:03 +08:00
28 changed files with 136 additions and 188 deletions

View File

@ -36,12 +36,12 @@ class Config extends Controller
'white' => '简约白0',
'red-1' => '玫瑰红1',
'blue-1' => '深空蓝1',
'black-1' => '经典黑1',
'green-1' => '小草绿1',
'black-1' => '经典黑1',
'red-2' => '玫瑰红2',
'blue-2' => '深空蓝2',
'black-2' => '经典黑2',
'green-2' => '小草绿2',
'black-2' => '经典黑2',
];
/**

View File

@ -39,7 +39,7 @@ class Runtime extends Controller
if (AdminService::instance()->isSuper()) try {
AdminService::instance()->clearCache();
SystemService::instance()->pushRuntime();
sysoplog('系统运维管理', '刷新并创建网站路由缓存');
sysoplog('系统运维管理', '刷新并创建路由缓存');
$this->success('网站缓存加速成功!', 'javascript:location.reload()');
} catch (HttpResponseException $exception) {
throw $exception;
@ -78,11 +78,11 @@ class Runtime extends Controller
{
if (AdminService::instance()->isSuper()) if (input('state')) {
SystemService::instance()->setRuntime('product');
sysoplog('系统运维管理', '开发模式切换为生产模式');
sysoplog('系统运维管理', '开发模式切换为生产模式');
$this->success('已切换为生产模式!', 'javascript:location.reload()');
} else {
SystemService::instance()->setRuntime('debug');
sysoplog('系统运维管理', '生产模式切换为开发模式');
sysoplog('系统运维管理', '生产模式切换为开发模式');
$this->success('已切换为开发模式!', 'javascript:location.reload()');
} else {
$this->error('只有超级管理员才能操作!');
@ -107,7 +107,7 @@ class Runtime extends Controller
SystemConfig::mQuery()->empty()->insertAll($newdata);
});
$this->app->cache->delete('SystemConfig');
sysoplog('系统运维管理', '清理系统参数配置成功');
sysoplog('系统运维管理', '清理系统配置参数');
$this->success('清理系统配置成功!', 'javascript:location.reload()');
} catch (HttpResponseException $exception) {
throw $exception;

View File

@ -97,8 +97,7 @@
</div>
</div>
<label class="layui-form-item block relative margin-top-10">
<span></span>
<b class="color-green">用户描述</b><span class="color-desc margin-left-5">User Remark</span>
<span class="help-label"><b>用户描述</b>User Remark</span>
<textarea placeholder="请输入用户描述" class="layui-textarea" name="describe">{$vo.describe|default=""}</textarea>
</label>
</fieldset>

View File

@ -17,10 +17,10 @@ class Slider extends Controller
* @var string[]
*/
protected $rules = [
'#' => '不跳转',
'LK' => '自定义链接',
'NL' => '新闻资讯列表',
'NS' => '新闻资讯详情',
'#' => ['name' => '不跳转'],
'LK' => ['name' => '自定义链接'],
'NL' => ['name' => '新闻资讯列表'],
'NS' => ['name' => '新闻资讯详情', 'node' => 'data/news.item/select'],
];
/**

View File

@ -54,8 +54,8 @@
</label>
<div class="inline-block margin-left-5">
<select class="layui-select" name="type[]" lay-filter="TypeSelect" data-item-rule lay-ignore>
{foreach $rules as $k=>$v}
<option value="{$k}">{$k} - {$v}</option>
{foreach $rules as $key=>$rule}
<option value="{$key}" data-node="{$rule.node|default=''}">{$key} - {$rule.name}</option>
{/foreach}
</select>
</div>
@ -78,15 +78,17 @@
/*! 跳转规则选择器 */
layui.form.on('select(TypeSelect)', function (data) {
var input = $(data.elem).parent().prev('label').find('input');
var title = data.elem.options[data.elem.selectedIndex].innerText.split(' - ').pop();
var option = data.elem.options[data.elem.options.selectedIndex];
var title = option.innerText.split(' - ').pop(), node = option.dataset.node;
window.setItemValue = function (id, name) {
input.val(data.value + '#' + (id || '0') + '#' + (name || title));
}, this.openModel = function (url) {
return $.form.modal(url, {}, title, null, true, null, '840px', '5%');
};
if (data.value === '#') return input.val('#');
if (data.value === 'LK') return /^https?:\/\//.test(input.val()) || input.val('#').focus();
if (data.value === 'NS') return this.openModel('{:url("data/news.item/select")}');
if (node.length > 0) return this.openModel('{:url("@URLTEMP")}'.replace('URLTEMP', node));
return window.setItemValue();
});

View File

@ -1,22 +0,0 @@
The MIT License (MIT)
Copyright (c) 2015 Kamlesh Kushwaha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,2 +0,0 @@
# lineheight
Ckeditor lineheight plugin repository

View File

@ -1,3 +0,0 @@
CKEDITOR.plugins.setLang('lineheight','{LANGUAGE_CODE}', {
title: '{LINE-HEIGHT}'
} );

View File

@ -1,3 +0,0 @@
CKEDITOR.plugins.setLang('lineheight','ar', {
title: 'خط الطول'
} );

View File

@ -1,3 +0,0 @@
CKEDITOR.plugins.setLang('lineheight','de', {
title: 'Zeilenhöhe'
} );

View File

@ -1,3 +1,3 @@
CKEDITOR.plugins.setLang('lineheight','en', {
title: '行间距'
} );
CKEDITOR.plugins.setLang('lineheight', 'en', {
title: 'Line Height'
});

View File

@ -1,3 +0,0 @@
CKEDITOR.plugins.setLang('lineheight','es', {
title: 'Altura de Línea'
} );

View File

@ -1,3 +0,0 @@
CKEDITOR.plugins.setLang('lineheight','fr', {
title: 'Hauteur de Ligne'
} );

View File

@ -1,3 +0,0 @@
CKEDITOR.plugins.setLang('lineheight','ko', {
title: '줄 높이'
} );

View File

@ -1,3 +0,0 @@
CKEDITOR.plugins.setLang('lineheight','af', {
title: 'linha Altura'
} );

View File

@ -0,0 +1,3 @@
CKEDITOR.plugins.setLang('lineheight', 'zh-cn', {
title: '行间距'
});

View File

@ -0,0 +1,3 @@
CKEDITOR.plugins.setLang('lineheight', 'zh-cn', {
title: '行间距'
});

View File

@ -1,81 +1,82 @@
( function() {
function addCombo( editor, comboName, styleType, lang, entries, defaultLabel, styleDefinition, order ) {
var config = editor.config,style = new CKEDITOR.style( styleDefinition );
var names = entries.split( ';' ),values = [];
var styles = {};
for ( var i = 0; i < names.length; i++ ) {
var parts = names[ i ];
if ( parts ) {
parts = parts.split( '/' );
var vars = {},name = names[ i ] = parts[ 0 ];
vars[ styleType ] = values[ i ] = parts[ 1 ] || name;
styles[ name ] = new CKEDITOR.style( styleDefinition, vars );
styles[ name ]._.definition.name = name;
} else
names.splice( i--, 1 );
}
editor.ui.addRichCombo( comboName, {
label: editor.lang.lineheight.title,
title: editor.lang.lineheight.title,
toolbar: 'styles,' + order,
allowedContent: style,
requiredContent: style,
panel: {
css: [ CKEDITOR.skin.getPath( 'editor' ) ].concat( config.contentsCss ),
multiSelect: false,
attributes: { 'aria-label': editor.lang.lineheight.title }
},
init: function() {
this.startGroup(editor.lang.lineheight.title);
for ( var i = 0; i < names.length; i++ ) {
var name = names[ i ];
this.add( name, styles[ name ].buildPreview(), name );
}
},
onClick: function( value ) {
editor.focus();
editor.fire( 'saveSnapshot' );
var style = styles[ value ];
editor[ this.getValue() == value ? 'removeStyle' : 'applyStyle' ]( style );
editor.fire( 'saveSnapshot' );
},
onRender: function() {
editor.on( 'selectionChange', function( ev ) {
var currentValue = this.getValue();
var elementPath = ev.data.path,elements = elementPath.elements;
for ( var i = 0, element; i < elements.length; i++ ) {
element = elements[ i ];
for ( var value in styles ) {
if ( styles[ value ].checkElementMatch( element, true, editor ) ) {
if ( value != currentValue )
this.setValue( value );
return;
}
}
}
this.setValue( '', defaultLabel );
}, this );
},
refresh: function() {
if ( !editor.activeFilter.check( style ) )
this.setState( CKEDITOR.TRISTATE_DISABLED );
}
} );
}
CKEDITOR.plugins.add( 'lineheight', {
requires: 'richcombo',
lang: 'ar,de,en,es,fr,ko,pt',
init: function( editor ) {
var config = editor.config;
addCombo( editor, 'lineheight', 'size', editor.lang.lineheight.title, config.line_height, editor.lang.lineheight.title, config.lineHeight_style, 40 );
}
} );
} )();
(function () {
function addCombo(editor, comboName, styleType, lang, entries, defaultLabel, styleDefinition, order) {
var config = editor.config, style = new CKEDITOR.style(styleDefinition);
var names = entries.split(';'), values = [];
var styles = {};
for (var i = 0; i < names.length; i++) {
var parts = names[i];
if (parts) {
parts = parts.split('/');
var vars = {}, name = names[i] = parts[0];
vars[styleType] = values[i] = parts[1] || name;
styles[name] = new CKEDITOR.style(styleDefinition, vars);
styles[name]._.definition.name = name;
} else
names.splice(i--, 1);
}
editor.ui.addRichCombo(comboName, {
label: editor.lang.lineheight.title,
title: editor.lang.lineheight.title,
toolbar: 'styles,' + order,
allowedContent: style,
requiredContent: style,
panel: {
css: [CKEDITOR.skin.getPath('editor')].concat(config.contentsCss),
multiSelect: false,
attributes: {'aria-label': editor.lang.lineheight.title}
},
init: function () {
this.startGroup(editor.lang.lineheight.title);
for (var i = 0; i < names.length; i++) {
var name = names[i];
this.add(name, styles[name].buildPreview(), name);
}
},
onClick: function (value) {
editor.focus();
editor.fire('saveSnapshot');
var style = styles[value];
editor[this.getValue() == value ? 'removeStyle' : 'applyStyle'](style);
editor.fire('saveSnapshot');
},
onRender: function () {
editor.on('selectionChange', function (ev) {
var currentValue = this.getValue();
var elementPath = ev.data.path, elements = elementPath.elements;
for (var i = 0, element; i < elements.length; i++) {
element = elements[i];
for (var value in styles) {
if (styles[value].checkElementMatch(element, true, editor)) {
if (value != currentValue)
this.setValue(value);
return;
}
}
}
this.setValue('', defaultLabel);
}, this);
},
refresh: function () {
if (!editor.activeFilter.check(style))
this.setState(CKEDITOR.TRISTATE_DISABLED);
}
});
}
CKEDITOR.plugins.add('lineheight', {
lang: 'en,zh,zh-cn',
requires: 'richcombo',
init: function (editor) {
var config = editor.config;
addCombo(editor, 'lineheight', 'size', editor.lang.lineheight.title, config.line_height, editor.lang.lineheight.title, config.lineHeight_style, 40);
}
});
})();
CKEDITOR.config.line_height = '1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;49;50;51;52;53;54;55;56;57;58;59;60;61;62;63;64;65;66;67;68;69;70;71;72';
CKEDITOR.config.lineHeight_style = {
element: 'span',
styles: { 'line-height': '#(size)' },
overrides: [ {
element: 'line-height', attributes: { 'size': null }
} ]
element: 'span',
styles: {'line-height': '#(size)'},
overrides: [{
element: 'line-height', attributes: {'size': null}
}]
};

View File

@ -1,30 +0,0 @@
lineheight
==========
CKEDITOR Line-height plugin documentation
----------------------------------------------
Installation Notes:
Adding plugin into the toolbar:
Using CKBuilder is a recommended solution, however, if you have plugins developed by yourself or by third parties, you can add plugins to your local installation manually by following the steps described below:
Extract the plugin .zip archive.
Copy the plugin files to the plugins folder of your CKEditor installation. Each plugin must be placed in a sub-folder that matches its "technical" name.
For example, the lineheight plugin would be installed into this folder: <CKEditor folder>/plugins/lineheight.
Check and resolve plugin dependencies. If a plugin needs others to work, you will need to add these manually as well.
Enable the plugin. Use the extraPlugins setting to add the plugin to your confiuration:
config.extraPlugins = 'lineheight';
Refer this link for configuring the toolbar: http://docs.ckeditor.com/#!/guide/dev_toolbar
Customizing the lineheight values in the dropdown
-------------------------------------------------------
In order to have custom values of line-height instead of the default, you can add following line in the config.js file:
config.line_height="1em;1.1em;1.2em;1.3em;1.4em;1.5em";
Here, "em" is the unit of line-height which you can change to "px","%" or any other allowed unit for line-height.
You can also change the numbers based on your requirements. You can have more range or low range , it all depends on your requirements.

View File

@ -86,11 +86,11 @@
}
// 通用延时动态
#defaTransition(@time:0.2s) {
transition: all @time linear;
-o-transition: all @time linear;
-moz-transition: all @time linear;
-webkit-transition: all @time linear;
#defaTransition(@time:0.2s,@type:all) {
transition: @type @time linear;
-o-transition: @type @time linear;
-moz-transition: @type @time linear;
-webkit-transition: @type @time linear;
}
// 内容主体布局

View File

@ -1,16 +1,27 @@
@charset "UTF-8";
@import "_config.less";
> .layui-layout-admin {
> .layui-side {
background-color: @leftBackColor;
background: @leftBackColor;
#leftBackColor() {
background-color: rgba(0, 0, 0, 0.6);
}
.layui-logo {
#leftBackColor();
.headtxt {
text-shadow: rgba(0, 0, 0, .5) 1px 2px 2px;
text-shadow: rgba(0, 0, 0, 0.5) 1px 2px 2px;
}
}
.layui-side-scroll {
display: flex !important;
box-sizing: border-box;
#leftBackColor();
#defaTransition(0.2s, background-color);
.layui-side-icon {
display: none;
@ -47,6 +58,7 @@
> .layui-header {
background: @headNormalBackColor;
#defaTransition(0.2s, background-color);
.layui-nav-item {
&.layui-this > a {
@ -65,9 +77,9 @@
}
}
//.help-label b {
// color: @mainActiveBack
//}
.help-label b {
color: @mainActiveBack
}
.layui-btn-group {
border-color: @mainActiveBack;

View File

@ -17,7 +17,7 @@
@leftNormalTextColor: @mainNormalText;
@leftActiveTextColor: @mainActionText;
@leftBackColor: #20222A !important;
@leftBackColor: @mainActiveBack;
@leftNormalBackColor: @mainNormalBack;
@leftActiveBackColor: #098 !important;

View File

@ -17,7 +17,7 @@
@leftNormalTextColor: @mainNormalText;
@leftActiveTextColor: @mainActionText;
@leftBackColor: #344058 !important;
@leftBackColor: @mainActiveBack;
@leftNormalBackColor: @mainNormalBack;
@leftActiveBackColor: @mainActiveBack;

View File

@ -17,7 +17,7 @@
@leftNormalTextColor: @mainNormalText;
@leftActiveTextColor: @mainActionText;
@leftBackColor: #344058 !important;
@leftBackColor: @mainActiveBack;
@leftNormalBackColor: @mainNormalBack;
@leftActiveBackColor: @mainActiveBack;

View File

@ -17,7 +17,7 @@
@leftNormalTextColor: @mainNormalText;
@leftActiveTextColor: @mainActionText;
@leftBackColor: #344058 !important;
@leftBackColor: @mainActiveBack;
@leftNormalBackColor: @mainNormalBack;
@leftActiveBackColor: @mainActiveBack;

View File

@ -1,3 +1,6 @@
@charset "UTF-8";
@import "_config.less";
> .layui-layout-admin {
> .layui-side {
width: 260px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long