Compare commits

..

No commits in common. "d33c2aa8c51d9d4839fb3084a16f24a9fdd36533" and "3cef4f83c4c1b320a15e5d8fa6c2d39885b6abab" have entirely different histories.

28 changed files with 188 additions and 136 deletions

View File

@ -36,12 +36,12 @@ class Config extends Controller
'white' => '简约白0',
'red-1' => '玫瑰红1',
'blue-1' => '深空蓝1',
'green-1' => '小草绿1',
'black-1' => '经典黑1',
'green-1' => '小草绿1',
'red-2' => '玫瑰红2',
'blue-2' => '深空蓝2',
'green-2' => '小草绿2',
'black-2' => '经典黑2',
'green-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,7 +97,8 @@
</div>
</div>
<label class="layui-form-item block relative margin-top-10">
<span class="help-label"><b>用户描述</b>User Remark</span>
<span></span>
<b class="color-green">用户描述</b><span class="color-desc margin-left-5">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 = [
'#' => ['name' => '不跳转'],
'LK' => ['name' => '自定义链接'],
'NL' => ['name' => '新闻资讯列表'],
'NS' => ['name' => '新闻资讯详情', 'node' => 'data/news.item/select'],
'#' => '不跳转',
'LK' => '自定义链接',
'NL' => '新闻资讯列表',
'NS' => '新闻资讯详情',
];
/**

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 $key=>$rule}
<option value="{$key}" data-node="{$rule.node|default=''}">{$key} - {$rule.name}</option>
{foreach $rules as $k=>$v}
<option value="{$k}">{$k} - {$v}</option>
{/foreach}
</select>
</div>
@ -78,17 +78,15 @@
/*! 跳转规则选择器 */
layui.form.on('select(TypeSelect)', function (data) {
var input = $(data.elem).parent().prev('label').find('input');
var option = data.elem.options[data.elem.options.selectedIndex];
var title = option.innerText.split(' - ').pop(), node = option.dataset.node;
var title = data.elem.options[data.elem.selectedIndex].innerText.split(' - ').pop();
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 (node.length > 0) return this.openModel('{:url("@URLTEMP")}'.replace('URLTEMP', node));
if (data.value === 'NS') return this.openModel('{:url("data/news.item/select")}');
return window.setItemValue();
});

View File

@ -0,0 +1,22 @@
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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,82 +1,81 @@
(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);
}
});
})();
( 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 );
}
} );
} )();
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

@ -0,0 +1,30 @@
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,@type:all) {
transition: @type @time linear;
-o-transition: @type @time linear;
-moz-transition: @type @time linear;
-webkit-transition: @type @time linear;
#defaTransition(@time:0.2s) {
transition: all @time linear;
-o-transition: all @time linear;
-moz-transition: all @time linear;
-webkit-transition: all @time linear;
}
// 内容主体布局

View File

@ -1,27 +1,16 @@
@charset "UTF-8";
@import "_config.less";
> .layui-layout-admin {
> .layui-side {
background: @leftBackColor;
#leftBackColor() {
background-color: rgba(0, 0, 0, 0.6);
}
background-color: @leftBackColor;
.layui-logo {
#leftBackColor();
.headtxt {
text-shadow: rgba(0, 0, 0, 0.5) 1px 2px 2px;
text-shadow: rgba(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;
@ -58,7 +47,6 @@
> .layui-header {
background: @headNormalBackColor;
#defaTransition(0.2s, background-color);
.layui-nav-item {
&.layui-this > a {
@ -77,9 +65,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: @mainActiveBack;
@leftBackColor: #20222A !important;
@leftNormalBackColor: @mainNormalBack;
@leftActiveBackColor: #098 !important;

View File

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

View File

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

View File

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

View File

@ -1,6 +1,3 @@
@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