Skip to content

Commit 79d7726

Browse files
committed
Merge remote-tracking branch 'origin/V4.0' into V5
2 parents ab247de + c698b86 commit 79d7726

File tree

10 files changed

+54
-38
lines changed

10 files changed

+54
-38
lines changed

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/dialogs/image/image.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@
9191
background-position: -60px 0;
9292
}
9393

94-
95-
96-
9794
/* 远程图片样式 */
9895
#remote {
9996
z-index: 200;
@@ -703,4 +700,4 @@
703700
height: 107px;
704701
border: 3px solid #1094fa;
705702
background-position: 72px 72px;
706-
}
703+
}

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/dialogs/image/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
height = (!ow || !oh) ? '':width*oh/ow;
263263

264264
if(url) {
265-
preview.innerHTML = '<img src="' + url + '" width="' + width + '" height="' + height + '" border="' + border + 'px solid #000" title="' + title + '" />';
265+
preview.innerHTML = '<img src="' + url + '" width="' + width + '" height="' + height + '" border="' + border + 'px solid #000" alt="' + title + '" />';
266266
}
267267
},
268268
getInsertList: function () {

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/dialogs/video/video.css

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
@charset "utf-8";
22
.wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative}
3-
.tabbody{height: 365px;}
3+
.tabhead {
4+
float:left;
5+
}
6+
.tabbody{height: 365px;clear:both;}
47
.tabbody .panel {
58
position: absolute;
69
width: 0;
@@ -16,6 +19,19 @@
1619
}
1720

1821
.tabbody .panel table td{vertical-align: middle;}
22+
23+
.alignBar{
24+
float:right;
25+
margin-top: 5px;
26+
position: relative;
27+
}
28+
29+
.alignBar .algnLabel{
30+
float:left;
31+
height: 20px;
32+
line-height: 20px;
33+
}
34+
1935
#videoUrl,#posterUrl {
2036
width: 440px;
2137
height: 21px;
@@ -64,9 +80,6 @@ label.url{font-weight: bold;margin-left: 5px;color: #06c;}
6480
#videoFloat .focus{opacity: 1;filter: alpha(opacity = 100)}
6581
span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue}
6682

67-
68-
69-
7083
/* upload video */
7184
.tabbody .upload.panel {
7285
width: 100%;

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/dialogs/video/video.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
<span tabSrc="uploadImage" data-content-id="uploadImage"><var id="lang_tab_uploadI"></var></span>
1818
<span tabSrc="onlineImage" data-content-id="onlineImage"><var id="lang_tab_onlineImage"></var></span>
1919
</div>
20+
<div class="alignBar">
21+
<label class="algnLabel"><var id="lang_input_autoplay"></var></label>
22+
<input id="autoplay" name="autoplay" type="checkbox" value="autoplay"/>
23+
</div>
2024
<div id="tabBodys" class="tabbody">
2125
<div id="video" class="panel focus">
2226
<table>

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/dialogs/video/video.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@
7777
/* 初始化视频标签 */
7878
function initVideo(){
7979
createAlignButton( ["videoFloat", "upload_alignment"] );
80-
addUrlChangeListener($G("videoUrl"), $G("posterUrl"));
80+
addUrlChangeListener($G("videoUrl"), $G("posterUrl"), $G("autoplay"));
8181
addOkListener();
8282

8383
//编辑视频时初始化相关信息
8484
(function(){
85-
var img = editor.selection.getRange().getClosedNode(),url,poster;
85+
var img = editor.selection.getRange().getClosedNode(),url,poster,autoplay;
8686
if(img && img.className){
8787
var hasFakedClass = (img.className == "edui-faked-video"),
8888
hasUploadClass = img.className.indexOf("edui-upload-video")!=-1;
@@ -91,6 +91,7 @@
9191
$G("posterUrl").value = poster = img.getAttribute("poster");
9292
$G("videoWidth").value = img.width;
9393
$G("videoHeight").value = img.height;
94+
$G("autoplay").checked = autoplay = img.getAttribute("autoplay")||false;
9495
var align = domUtils.getComputedStyle(img,"float"),
9596
parentAlign = domUtils.getComputedStyle(img.parentNode,"text-align");
9697
updateAlignButton(parentAlign==="center"?"center":align);
@@ -99,7 +100,7 @@
99100
isModifyUploadVideo = false;
100101
}
101102
}
102-
createPreviewVideo(url,poster);
103+
createPreviewVideo(url,poster,autoplay);
103104
})();
104105
}
105106

@@ -158,17 +159,19 @@
158159
function insertSingle(){
159160
var width = $G("videoWidth"),
160161
height = $G("videoHeight"),
161-
url=$G('videoUrl').value,
162+
url = $G('videoUrl').value,
162163
align = findFocus("videoFloat","name"),
163-
poster = $G('posterUrl').value;
164+
poster = $G('posterUrl').value,
165+
autoplay = $G('autoplay').checked ;
164166
if(!url) return false;
165167
if ( !checkNum( [width, height] ) ) return false;
166168
editor.execCommand('insertvideo', {
167169
url: convert_url(url),
168170
width: width.value,
169171
height: height.value,
170172
align: align,
171-
poster : poster
173+
poster : poster,
174+
autoplay : autoplay
172175
}, isModifyUploadVideo ? 'upload':null);
173176
}
174177

@@ -179,6 +182,7 @@
179182
width = parseInt($G('upload_width').value, 10) || 600,
180183
height = parseInt($G('upload_height').value, 10) || 480,
181184
align = findFocus("upload_alignment","name") || 'center',
185+
autoplay = $G('autoplay').checked,
182186
poster = $G('posterUrl').value;
183187
var imageList=[];
184188

@@ -219,8 +223,10 @@
219223
width:width,
220224
height:height,
221225
align:align,
222-
poster:poster
226+
poster:poster,
227+
autoplay:autoplay
223228
});
229+
autoplay=false;
224230
}
225231

226232
if (uploadFile && uploadFile.getQueueCount()) {
@@ -325,30 +331,24 @@
325331
* @param url
326332
* @param poster
327333
*/
328-
function addUrlChangeListener(url, poster){
329-
if (browser.ie) {
330-
url.onpropertychange = function () {
331-
createPreviewVideo( this.value, poster.value );
332-
}
333-
poster.onpropertychange = function () {
334-
createPreviewVideo( url.value, this.value);
335-
}
336-
} else {
337-
url.addEventListener( "input", function () {
338-
createPreviewVideo( this.value, poster.value );
339-
}, false );
340-
poster.addEventListener( "input", function () {
341-
createPreviewVideo( url.value, this.value );
342-
}, false );
343-
}
334+
function addUrlChangeListener(url, poster, autoplay){
335+
url.addEventListener( "input", function () {
336+
createPreviewVideo( this.value, poster.value, autoplay.checked );
337+
}, false );
338+
poster.addEventListener( "input", function () {
339+
createPreviewVideo( url.value, this.value, autoplay.checked );
340+
}, false );
341+
autoplay.addEventListener( "change", function () {
342+
createPreviewVideo( url.value, poster.value, this.checked);
343+
}, false );
344344
}
345345

346346
/**
347347
* 根据url生成视频预览
348348
* @param url
349349
* @param poster
350350
*/
351-
function createPreviewVideo(url, poster){
351+
function createPreviewVideo(url, poster , autoplay){
352352
if ( !url )return;
353353

354354
var conUrl = convert_url(url);
@@ -358,7 +358,7 @@
358358
var ext = url.substr(url.lastIndexOf('.') + 1);
359359
if(ext == 'ogv') ext = 'ogg';
360360
$G("preview").innerHTML = '<div class="previewMsg"><span>'+lang.urlError+'</span></div>'+
361-
'<video class="previewVideo video-js" controls preload="none" ' + (poster ? ' poster="' + poster + '"': '') +
361+
'<video class="previewVideo video-js" controls preload="none" ' + (poster ? ' poster="' + poster + '"': '') + (autoplay ? ' autoplay="' + autoplay + '"': '') +
362362
' src="' + conUrl + '"' +
363363
' width="' + 420 + '"' +
364364
' height="' + 280 + '">' +

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/lang/en/en.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ UE.I18N['en'] = {
357357
'lang_videoW':"Width",
358358
'lang_videoH':"Height",
359359
'lang_alignment':"Alignment",
360-
360+
'lang_input_autoplay':"Auto play",
361361
'lang_input_fileStatus':' No file uploaded!',
362362
'startUpload':{'style':"background:url(upload.png) no-repeat;"},
363363
'lang_videoLoading':" Loading...",

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/lang/ja-jp/ja-jp.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ UE.I18N['ja-jp'] = {
351351
'lang_videoW':"幅",
352352
'lang_videoH':"高さ",
353353
'lang_alignment':"配置",
354+
'lang_input_autoplay':"オートプレイ",
354355
'lang_input_fileStatus':' ファイルをアップロードしていません',
355356
'startUpload':{'style':"background:url(upload.png) no-repeat;"},
356357
'lang_videoLoading':" ビデオの読み込み...",

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/lang/zh-cn/zh-cn.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ UE.I18N['zh-cn'] = {
356356
'lang_videoW':"宽度",
357357
'lang_videoH':"高度",
358358
'lang_alignment':"对齐方式",
359+
'lang_input_autoplay':"自动播放",
359360
'lang_input_fileStatus':' 当前未上传文件',
360361
'startUpload':{'style':"background:url(upload.png) no-repeat;"},
361362
'lang_videoLoading':" 视频加载中……",

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/ueditor.all.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

publiccms-parent/publiccms/src/main/webapp/resource/plugins/ueditor/ueditor.parse.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)