优化后台登录界面、完善后台附件管理、编辑器上传视频增加封面 、合并安装时执行mysql脚本

This commit is contained in:
2026-01-06 16:16:45 +08:00
parent 5e2e12e670
commit b5aa465248
29 changed files with 13663 additions and 3442 deletions
@@ -38,6 +38,31 @@ CKEDITOR.dialog.add( 'html5video', function( editor ) {
hidden: true,
filebrowser: 'info:url'
} ]
},
{
type: 'hbox',
widths: [ '365px', '110px' ],
align: 'right',
children: [ {
type: 'text',
id: 'poster',
label: editor.lang.html5video.poster,
setup: function( widget ) {
this.setValue( widget.data.poster );
},
commit: function( widget ) {
widget.setData( 'poster', this.getValue() );
}
},
{
type: 'button',
id: 'browsePoster',
style: 'display:inline-block;margin-top:14px;',
align: 'center',
label: editor.lang.common.browseServer,
hidden: true,
filebrowser: 'info:poster'
} ]
} ]
},
{
@@ -126,6 +151,20 @@ CKEDITOR.dialog.add( 'html5video', function( editor ) {
filebrowser: 'info:url',
label: editor.lang.html5video.btnUpload,
'for': [ 'Upload', 'upload' ]
},
{
type: 'file',
id: 'uploadPoster',
label: editor.lang.html5video.posterUpload,
style: 'height:40px',
size: 38
},
{
type: 'fileButton',
id: 'uploadButtonPoster',
filebrowser: 'info:poster',
label: editor.lang.html5video.btnUpload,
'for': [ 'Upload', 'uploadPoster' ]
} ]
},
{
@@ -11,5 +11,7 @@ CKEDITOR.plugins.setLang( 'html5video', 'en', {
autoplay: 'Autoplay?',
yes: 'Yes',
no: 'No',
responsive: 'Responsive width'
responsive: 'Responsive width',
poster: 'Poster image',
posterUpload: 'Upload poster image'
} );
@@ -11,5 +11,7 @@ CKEDITOR.plugins.setLang('html5video', 'zh-cn', {
autoplay: '自动播放?',
yes: '是',
no: '否',
responsive: '响应式宽度'
responsive: '响应式宽度',
poster: '封面图',
posterUpload: '上传封面图'
});
@@ -11,7 +11,7 @@ CKEDITOR.plugins.add( 'html5video', {
* - div-s with text-align,float,margin-left,margin-right inline style rules and required ckeditor-html5-video class.
* - video tags with src, controls, width and height attributes.
*/
allowedContent: 'div[data-responsive](!ckeditor-html5-video){text-align,float,margin-left,margin-right}; video[src,controls,autoplay,width, height]{max-width,height};',
allowedContent: 'div[data-responsive](!ckeditor-html5-video){text-align,float,margin-left,margin-right}; video[src,controls,autoplay,width,height,poster]{max-width,height};',
requiredContent: 'div(ckeditor-html5-video); video[src,controls];',
upcast: function( element ) {
return element.name === 'div' && element.hasClass( 'ckeditor-html5-video' );
@@ -21,6 +21,7 @@ CKEDITOR.plugins.add( 'html5video', {
var src = '';
var autoplay = '';
var align = this.element.getStyle( 'text-align' );
var poster = '';
var width = '';
var height = '';
@@ -32,6 +33,7 @@ CKEDITOR.plugins.add( 'html5video', {
width = this.element.getChild( 0 ).getAttribute( 'width' );
height = this.element.getChild( 0 ).getAttribute( 'height' );
autoplay = this.element.getChild( 0 ).getAttribute( 'autoplay' );
poster = this.element.getChild( 0 ).getAttribute( 'poster' );
responsive = this.element.getAttribute( 'data-responsive' );
}
@@ -55,7 +57,11 @@ CKEDITOR.plugins.add( 'html5video', {
if ( autoplay ) {
this.setData( 'autoplay', 'yes' );
}
if ( poster ) {
this.setData('poster', poster);
}
if ( responsive ) {
this.setData( 'responsive', responsive );
}
@@ -76,6 +82,7 @@ CKEDITOR.plugins.add( 'html5video', {
this.element.getChild( 0 ).setAttribute( 'src', this.data.src );
if (this.data.width) this.element.getChild( 0 ).setAttribute( 'width', this.data.width );
if (this.data.height) this.element.getChild( 0 ).setAttribute( 'height', this.data.height );
if (this.data.poster) this.element.getChild( 0 ).setAttribute( 'poster', this.data.poster );
if ( this.data.responsive ) {
this.element.setAttribute("data-responsive", this.data.responsive);