fix 代码生成-父级菜单选择,更新ueditor-plus版本
@ -1,40 +1,62 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
*{color: #838383;margin: 0;padding: 0}
|
||||
html,body {font-size: 12px;overflow: hidden; }
|
||||
.content{padding:5px 0 0 15px;}
|
||||
input{margin-left:4px;box-sizing:border-box;width:210px;height:30px;line-height:30px;border:1px solid #d7d7d7;border-radius:3px;padding:0 5px;outline:none;}
|
||||
* {
|
||||
color: #838383;
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
html, body {
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 5px 0 0 15px;
|
||||
}
|
||||
|
||||
input {
|
||||
margin-left: 4px;
|
||||
box-sizing: border-box;
|
||||
width: 210px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border: 1px solid #d7d7d7;
|
||||
border-radius: 3px;
|
||||
padding: 0 5px;
|
||||
outline: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<span><var id="lang_input_anchorName"></var></span><input id="anchorName" value="" />
|
||||
</div>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript">
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<span><var id="lang_input_anchorName"></var></span><input id="anchorName" value=""/>
|
||||
</div>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<script type="text/javascript">
|
||||
var anchorInput = $G('anchorName'),
|
||||
node = editor.selection.getRange().getClosedNode();
|
||||
if(node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))){
|
||||
if (node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))) {
|
||||
anchorInput.value = node;
|
||||
}
|
||||
anchorInput.onkeydown = function(evt){
|
||||
anchorInput.onkeydown = function (evt) {
|
||||
evt = evt || window.event;
|
||||
if(evt.keyCode == 13){
|
||||
if (evt.keyCode == 13) {
|
||||
editor.execCommand('anchor', anchorInput.value);
|
||||
dialog.close();
|
||||
domUtils.preventDefault(evt)
|
||||
}
|
||||
};
|
||||
dialog.onok = function (){
|
||||
dialog.onok = function () {
|
||||
editor.execCommand('anchor', anchorInput.value);
|
||||
dialog.close();
|
||||
};
|
||||
$focus(anchorInput);
|
||||
</script>
|
||||
</body>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -13,8 +13,9 @@
|
||||
|
||||
/*tab样式框大小*/
|
||||
.tabhead {
|
||||
float:left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.tabbody {
|
||||
width: 100%;
|
||||
height: 346px;
|
||||
@ -89,7 +90,7 @@
|
||||
color: #cccccc;
|
||||
font-size: 18px;
|
||||
position: relative;
|
||||
top:0;
|
||||
top: 0;
|
||||
*top: 10px;
|
||||
}
|
||||
|
||||
@ -273,12 +274,14 @@
|
||||
-ms-transition: 200ms ease-out;
|
||||
transition: 200ms ease-out;
|
||||
}
|
||||
|
||||
#upload .filelist li p.imgWrap.notimage {
|
||||
margin-top: 0;
|
||||
width: 111px;
|
||||
height: 111px;
|
||||
border: 1px #eeeeee solid;
|
||||
}
|
||||
|
||||
#upload .filelist li p.imgWrap.notimage i.file-preview {
|
||||
margin-top: 15px;
|
||||
}
|
||||
@ -297,7 +300,7 @@
|
||||
line-height: 28px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
display:none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#upload .filelist li .success {
|
||||
@ -319,6 +322,7 @@
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#upload .filelist li.filePickerBlock div.webuploader-pick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -352,7 +356,7 @@
|
||||
background: url(./images/icons.gif) no-repeat \9;
|
||||
margin: 5px 1px 1px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
@ -360,7 +364,7 @@
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateLeft {
|
||||
display:none;
|
||||
display: none;
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
|
||||
@ -369,7 +373,7 @@
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateRight {
|
||||
display:none;
|
||||
display: none;
|
||||
background-position: -24px -24px;
|
||||
}
|
||||
|
||||
@ -408,6 +412,7 @@
|
||||
color: #6dbfff;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress span.percentage {
|
||||
width: 0;
|
||||
height: 100%;
|
||||
@ -416,6 +421,7 @@
|
||||
background: #1483d8;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress span.text {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
@ -438,6 +444,7 @@
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .webuploader-pick,
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading,
|
||||
@ -457,6 +464,7 @@
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .webuploader-pick-hover,
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading:hover,
|
||||
@ -465,45 +473,48 @@
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused{
|
||||
#upload .statusBar .btns .uploadBtn.state-paused {
|
||||
background: #00b7ee;
|
||||
color: #fff;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover{
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover {
|
||||
background: #00a2d4;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn.disabled {
|
||||
pointer-events: none;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
filter: alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
-khtml-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 图片管理样式 */
|
||||
#online {
|
||||
width: 100%;
|
||||
height: 336px;
|
||||
padding: 10px 0 0 0;
|
||||
}
|
||||
#online #fileList{
|
||||
|
||||
#online #fileList {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#online ul {
|
||||
display: block;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#online li {
|
||||
float: left;
|
||||
display: block;
|
||||
@ -518,18 +529,21 @@
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#online li.clearFloat {
|
||||
float: none;
|
||||
clear: both;
|
||||
display: block;
|
||||
width:0;
|
||||
height:0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#online li img {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#online li div.file-wrapper {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
@ -539,7 +553,8 @@
|
||||
border: 1px solid #eee;
|
||||
background: url("./images/bg.png") repeat;
|
||||
}
|
||||
#online li div span.file-title{
|
||||
|
||||
#online li div span.file-title {
|
||||
display: block;
|
||||
padding: 0 3px;
|
||||
margin: 3px 0 0 0;
|
||||
@ -553,6 +568,7 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#online li .icon {
|
||||
cursor: pointer;
|
||||
width: 113px;
|
||||
@ -564,16 +580,19 @@
|
||||
border: 0;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#online li .icon:hover {
|
||||
width: 107px;
|
||||
height: 107px;
|
||||
border: 3px solid #1094fa;
|
||||
}
|
||||
|
||||
#online li.selected .icon {
|
||||
background-image: url(images/success.png);
|
||||
background-image: url(images/success.gif) \9;
|
||||
background-position: 75px 75px;
|
||||
}
|
||||
|
||||
#online li.selected .icon:hover {
|
||||
width: 107px;
|
||||
height: 107px;
|
||||
@ -593,41 +612,51 @@ i.file-preview {
|
||||
background-position: -140px center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
i.file-preview.file-type-dir{
|
||||
|
||||
i.file-preview.file-type-dir {
|
||||
background-position: 0 center;
|
||||
}
|
||||
i.file-preview.file-type-file{
|
||||
|
||||
i.file-preview.file-type-file {
|
||||
background-position: -140px center;
|
||||
}
|
||||
i.file-preview.file-type-filelist{
|
||||
|
||||
i.file-preview.file-type-filelist {
|
||||
background-position: -210px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-zip,
|
||||
i.file-preview.file-type-rar,
|
||||
i.file-preview.file-type-7z,
|
||||
i.file-preview.file-type-tar,
|
||||
i.file-preview.file-type-gz,
|
||||
i.file-preview.file-type-bz2{
|
||||
i.file-preview.file-type-bz2 {
|
||||
background-position: -280px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-xls,
|
||||
i.file-preview.file-type-xlsx{
|
||||
i.file-preview.file-type-xlsx {
|
||||
background-position: -350px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-doc,
|
||||
i.file-preview.file-type-docx{
|
||||
i.file-preview.file-type-docx {
|
||||
background-position: -420px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-ppt,
|
||||
i.file-preview.file-type-pptx{
|
||||
i.file-preview.file-type-pptx {
|
||||
background-position: -490px center;
|
||||
}
|
||||
i.file-preview.file-type-vsd{
|
||||
|
||||
i.file-preview.file-type-vsd {
|
||||
background-position: -560px center;
|
||||
}
|
||||
i.file-preview.file-type-pdf{
|
||||
|
||||
i.file-preview.file-type-pdf {
|
||||
background-position: -630px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-txt,
|
||||
i.file-preview.file-type-md,
|
||||
i.file-preview.file-type-json,
|
||||
@ -638,18 +667,22 @@ i.file-preview.file-type-js,
|
||||
i.file-preview.file-type-css,
|
||||
i.file-preview.file-type-php,
|
||||
i.file-preview.file-type-jsp,
|
||||
i.file-preview.file-type-asp{
|
||||
i.file-preview.file-type-asp {
|
||||
background-position: -700px center;
|
||||
}
|
||||
i.file-preview.file-type-apk{
|
||||
|
||||
i.file-preview.file-type-apk {
|
||||
background-position: -770px center;
|
||||
}
|
||||
i.file-preview.file-type-exe{
|
||||
|
||||
i.file-preview.file-type-exe {
|
||||
background-position: -840px center;
|
||||
}
|
||||
i.file-preview.file-type-ipa{
|
||||
|
||||
i.file-preview.file-type-ipa {
|
||||
background-position: -910px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-mp4,
|
||||
i.file-preview.file-type-swf,
|
||||
i.file-preview.file-type-mkv,
|
||||
@ -661,21 +694,23 @@ i.file-preview.file-type-mpeg,
|
||||
i.file-preview.file-type-ogv,
|
||||
i.file-preview.file-type-webm,
|
||||
i.file-preview.file-type-rm,
|
||||
i.file-preview.file-type-rmvb{
|
||||
i.file-preview.file-type-rmvb {
|
||||
background-position: -980px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-ogg,
|
||||
i.file-preview.file-type-wav,
|
||||
i.file-preview.file-type-wmv,
|
||||
i.file-preview.file-type-mid,
|
||||
i.file-preview.file-type-mp3{
|
||||
i.file-preview.file-type-mp3 {
|
||||
background-position: -1050px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-jpg,
|
||||
i.file-preview.file-type-jpeg,
|
||||
i.file-preview.file-type-gif,
|
||||
i.file-preview.file-type-bmp,
|
||||
i.file-preview.file-type-png,
|
||||
i.file-preview.file-type-psd{
|
||||
i.file-preview.file-type-psd {
|
||||
background-position: -140px center;
|
||||
}
|
||||
|
@ -3,21 +3,21 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ueditor图片对话框</title>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
|
||||
<!-- jquery -->
|
||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.js?20220503"></script>
|
||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.js?628072e7"></script>
|
||||
|
||||
<!-- webuploader -->
|
||||
<script src="../../third-party/webuploader/webuploader.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css?20220503">
|
||||
<script src="../../third-party/webuploader/webuploader.js?21e72664"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css?0057c5c7">
|
||||
|
||||
<!-- attachment dialog -->
|
||||
<link rel="stylesheet" href="attachment.css?20220503" type="text/css" />
|
||||
<link rel="stylesheet" href="attachment.css?e8f09700" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="wrapper">
|
||||
<div id="tabhead" class="tabhead">
|
||||
<span class="tab focus" data-content-id="upload"><var id="lang_tab_upload"></var></span>
|
||||
<span class="tab" data-content-id="online"><var id="lang_tab_online"></var></span>
|
||||
@ -30,7 +30,8 @@
|
||||
<div class="progress">
|
||||
<span class="text">0%</span>
|
||||
<span class="percentage"></span>
|
||||
</div><div class="info"></div>
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="btns">
|
||||
<div id="filePickerBtn"></div>
|
||||
<div class="uploadBtn"><var id="lang_start_upload"></var></div>
|
||||
@ -53,8 +54,8 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="attachment.js?20220503"></script>
|
||||
</div>
|
||||
<script type="text/javascript" src="attachment.js?30c88b65"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/* 初始化tabbody */
|
||||
function setTabFocus(id) {
|
||||
if(!id) return;
|
||||
if (!id) return;
|
||||
var i, bodyId, tabs = $G('tabhead').children;
|
||||
for (i = 0; i < tabs.length; i++) {
|
||||
bodyId = tabs[i].getAttribute('data-content-id')
|
||||
@ -88,6 +88,7 @@
|
||||
this.$wrap = target.constructor == String ? $('#' + target) : $(target);
|
||||
this.init();
|
||||
}
|
||||
|
||||
UploadFile.prototype = {
|
||||
init: function () {
|
||||
this.fileList = [];
|
||||
@ -145,7 +146,8 @@
|
||||
uploader,
|
||||
actionUrl = editor.getActionUrl(editor.getOpt('fileActionName')),
|
||||
fileMaxSize = editor.getOpt('fileMaxSize'),
|
||||
acceptExtensions = (editor.getOpt('fileAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');;
|
||||
acceptExtensions = (editor.getOpt('fileAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');
|
||||
;
|
||||
|
||||
if (!WebUploader.Uploader.support()) {
|
||||
$('#filePickerReady').after($('<div>').html(lang.errorNotSupport)).hide();
|
||||
@ -155,7 +157,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
uploader = _this.uploader = WebUploader.create({
|
||||
var uploaderOption = {
|
||||
pick: {
|
||||
id: '#filePickerReady',
|
||||
label: lang.uploadSelectFile
|
||||
@ -165,8 +167,29 @@
|
||||
fileVal: editor.getOpt('fileFieldName'),
|
||||
duplicate: true,
|
||||
fileSingleSizeLimit: fileMaxSize,
|
||||
headers: editor.getOpt('serverHeaders') || {},
|
||||
compress: false
|
||||
};
|
||||
if(editor.getOpt('uploadServiceEnable')) {
|
||||
uploaderOption.customUpload = function (file, callback) {
|
||||
editor.getOpt('uploadServiceUpload')('attachment', file, {
|
||||
success: function( res ) {
|
||||
callback.onSuccess(file, {_raw:JSON.stringify(res)});
|
||||
},
|
||||
error: function( err ) {
|
||||
callback.onError(file, err);
|
||||
},
|
||||
progress: function( percent ) {
|
||||
callback.onProgress(file, percent);
|
||||
}
|
||||
}, {
|
||||
from: 'attachment'
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
uploader = _this.uploader = WebUploader.create(uploaderOption);
|
||||
uploader.addButton({
|
||||
id: '#filePickerBlock'
|
||||
});
|
||||
@ -218,7 +241,7 @@
|
||||
showError(file.statusText);
|
||||
} else {
|
||||
$wrap.text(lang.uploadPreview);
|
||||
if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) {
|
||||
if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|' + file.ext.toLowerCase() + '|') == -1) {
|
||||
$wrap.empty().addClass('notimage').append('<i class="file-preview file-type-' + file.ext.toLowerCase() + '"></i>' +
|
||||
'<span class="file-title" title="' + file.name + '">' + file.name + '</span>');
|
||||
} else {
|
||||
@ -238,7 +261,7 @@
|
||||
}, thumbnailWidth, thumbnailHeight);
|
||||
}
|
||||
}
|
||||
percentages[ file.id ] = [ file.size, 0 ];
|
||||
percentages[file.id] = [file.size, 0];
|
||||
file.rotation = 0;
|
||||
|
||||
/* 检查文件格式 */
|
||||
@ -258,11 +281,11 @@
|
||||
// 成功
|
||||
if (cur === 'error' || cur === 'invalid') {
|
||||
showError(file.statusText);
|
||||
percentages[ file.id ][ 1 ] = 1;
|
||||
percentages[file.id][1] = 1;
|
||||
} else if (cur === 'interrupt') {
|
||||
showError('interrupt');
|
||||
} else if (cur === 'queued') {
|
||||
percentages[ file.id ][ 1 ] = 0;
|
||||
percentages[file.id][1] = 0;
|
||||
} else if (cur === 'progress') {
|
||||
$info.hide();
|
||||
$prgress.css('display', 'block');
|
||||
@ -315,7 +338,7 @@
|
||||
// 负责view的销毁
|
||||
function removeFile(file) {
|
||||
var $li = $('#' + file.id);
|
||||
delete percentages[ file.id ];
|
||||
delete percentages[file.id];
|
||||
updateTotalProgress();
|
||||
$li.off().find('.file-panel').off().end().remove();
|
||||
}
|
||||
@ -327,8 +350,8 @@
|
||||
percent;
|
||||
|
||||
$.each(percentages, function (k, v) {
|
||||
total += v[ 0 ];
|
||||
loaded += v[ 0 ] * v[ 1 ];
|
||||
total += v[0];
|
||||
loaded += v[0] * v[1];
|
||||
});
|
||||
|
||||
percent = total ? loaded / total : 0;
|
||||
@ -354,7 +377,8 @@
|
||||
$queue.addClass('element-invisible');
|
||||
$statusBar.addClass('element-invisible');
|
||||
$placeHolder.removeClass('element-invisible');
|
||||
$progress.hide(); $info.hide();
|
||||
$progress.hide();
|
||||
$info.hide();
|
||||
uploader.refresh();
|
||||
break;
|
||||
|
||||
@ -363,25 +387,29 @@
|
||||
$placeHolder.addClass('element-invisible');
|
||||
$queue.removeClass('element-invisible');
|
||||
$statusBar.removeClass('element-invisible');
|
||||
$progress.hide(); $info.show();
|
||||
$progress.hide();
|
||||
$info.show();
|
||||
$upload.text(lang.uploadStart);
|
||||
uploader.refresh();
|
||||
break;
|
||||
|
||||
/* 上传中 */
|
||||
case 'uploading':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadPause);
|
||||
break;
|
||||
|
||||
/* 暂停上传 */
|
||||
case 'paused':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadContinue);
|
||||
break;
|
||||
|
||||
case 'confirm':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadStart);
|
||||
|
||||
stats = uploader.getStats();
|
||||
@ -392,7 +420,8 @@
|
||||
break;
|
||||
|
||||
case 'finish':
|
||||
$progress.hide(); $info.show();
|
||||
$progress.hide();
|
||||
$info.show();
|
||||
if (stats.uploadFailNum) {
|
||||
$upload.text(lang.uploadRetry);
|
||||
} else {
|
||||
@ -426,9 +455,7 @@
|
||||
}
|
||||
} else {
|
||||
stats = uploader.getStats();
|
||||
text = lang.updateStatusFinish.replace('_', fileCount).
|
||||
replace('_KB', WebUploader.formatSize(fileSize)).
|
||||
replace('_', stats.successNum);
|
||||
text = lang.updateStatusFinish.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)).replace('_', stats.successNum);
|
||||
|
||||
if (stats.uploadFailNum) {
|
||||
text += lang.updateStatusError.replace('_', stats.uploadFailNum);
|
||||
@ -477,7 +504,7 @@
|
||||
case 'startUpload':
|
||||
/* 添加额外的GET参数 */
|
||||
var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params);
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?' : '&') + 'encode=utf-8&' + params);
|
||||
uploader.option('server', url);
|
||||
setState('uploading', files);
|
||||
break;
|
||||
@ -499,7 +526,7 @@
|
||||
$percent = $li.find('.progress span');
|
||||
|
||||
$percent.css('width', percentage * 100 + '%');
|
||||
percentages[ file.id ][ 1 ] = percentage;
|
||||
percentages[file.id][1] = percentage;
|
||||
updateTotalProgress();
|
||||
});
|
||||
|
||||
@ -508,9 +535,15 @@
|
||||
try {
|
||||
var responseText = (ret._raw || ret),
|
||||
json = utils.str2json(responseText);
|
||||
json = editor.getOpt('serverResponsePrepare')(json);
|
||||
if (json.state == 'SUCCESS') {
|
||||
_this.fileList.push(json);
|
||||
$file.append('<span class="success"></span>');
|
||||
// 触发上传附件事件
|
||||
editor.fireEvent("uploadsuccess", {
|
||||
res: json,
|
||||
type: 'file'
|
||||
});
|
||||
} else {
|
||||
$file.find('.error').text(json.state).show();
|
||||
}
|
||||
@ -521,9 +554,11 @@
|
||||
|
||||
uploader.on('uploadError', function (file, code) {
|
||||
});
|
||||
uploader.on('error', function (code, file) {
|
||||
if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') {
|
||||
addFile(file);
|
||||
uploader.on('error', function (code, param1, param2) {
|
||||
if (code === 'F_EXCEED_SIZE') {
|
||||
editor.getOpt('tipError')(lang.errorExceedSize + ' ' + (param1 / 1024 / 1024).toFixed(1) + 'MB');
|
||||
} else {
|
||||
console.log('error', code, param1, param2);
|
||||
}
|
||||
});
|
||||
uploader.on('uploadComplete', function (file, ret) {
|
||||
@ -548,7 +583,7 @@
|
||||
},
|
||||
getQueueCount: function () {
|
||||
var file, i, status, readyFile = 0, files = this.uploader.getFiles();
|
||||
for (i = 0; file = files[i++]; ) {
|
||||
for (i = 0; file = files[i++];) {
|
||||
status = file.getStatus();
|
||||
if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
|
||||
}
|
||||
@ -575,6 +610,7 @@
|
||||
this.container = utils.isString(target) ? document.getElementById(target) : target;
|
||||
this.init();
|
||||
}
|
||||
|
||||
OnlineFile.prototype = {
|
||||
init: function () {
|
||||
this.initContainer();
|
||||
@ -598,7 +634,7 @@
|
||||
var _this = this;
|
||||
|
||||
/* 滚动拉取图片 */
|
||||
domUtils.on($G('fileList'), 'scroll', function(e){
|
||||
domUtils.on($G('fileList'), 'scroll', function (e) {
|
||||
var panel = this;
|
||||
if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
|
||||
_this.getFileData();
|
||||
@ -634,7 +670,7 @@
|
||||
getFileData: function () {
|
||||
var _this = this;
|
||||
|
||||
if(!_this.listEnd && !this.isLoadingData) {
|
||||
if (!_this.listEnd && !this.isLoadingData) {
|
||||
this.isLoadingData = true;
|
||||
ajax.request(editor.getActionUrl(editor.getOpt('fileManagerActionName')), {
|
||||
timeout: 100000,
|
||||
@ -642,6 +678,7 @@
|
||||
start: this.listIndex,
|
||||
size: this.listSize
|
||||
}, editor.queryCommandValue('serverparam')),
|
||||
headers: editor.options.serverHeaders || {},
|
||||
method: 'get',
|
||||
onsuccess: function (r) {
|
||||
try {
|
||||
@ -649,13 +686,13 @@
|
||||
if (json.state == 'SUCCESS') {
|
||||
_this.pushData(json.list);
|
||||
_this.listIndex = parseInt(json.start) + parseInt(json.list.length);
|
||||
if(_this.listIndex >= json.total) {
|
||||
if (_this.listIndex >= json.total) {
|
||||
_this.listEnd = true;
|
||||
}
|
||||
_this.isLoadingData = false;
|
||||
}
|
||||
} catch (e) {
|
||||
if(r.responseText.indexOf('ue_separate_ue') != -1) {
|
||||
if (r.responseText.indexOf('ue_separate_ue') != -1) {
|
||||
var list = r.responseText.split(r.responseText);
|
||||
_this.pushData(list);
|
||||
_this.listIndex = parseInt(list.length);
|
||||
@ -675,24 +712,24 @@
|
||||
var i, item, img, filetype, preview, icon, _this = this,
|
||||
urlPrefix = editor.getOpt('fileManagerUrlPrefix');
|
||||
for (i = 0; i < list.length; i++) {
|
||||
if(list[i] && list[i].url) {
|
||||
if (list[i] && list[i].url) {
|
||||
item = document.createElement('li');
|
||||
icon = document.createElement('span');
|
||||
filetype = list[i].url.substr(list[i].url.lastIndexOf('.') + 1);
|
||||
|
||||
if ( "png|jpg|jpeg|gif|bmp".indexOf(filetype) != -1 ) {
|
||||
if ("png|jpg|jpeg|gif|bmp".indexOf(filetype) != -1) {
|
||||
preview = document.createElement('img');
|
||||
domUtils.on(preview, 'load', (function(image){
|
||||
return function(){
|
||||
domUtils.on(preview, 'load', (function (image) {
|
||||
return function () {
|
||||
_this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
|
||||
};
|
||||
})(preview));
|
||||
preview.width = 113;
|
||||
preview.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
|
||||
preview.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=' : '&noCache=') + (+new Date()).toString(36));
|
||||
} else {
|
||||
var ic = document.createElement('i'),
|
||||
textSpan = document.createElement('span');
|
||||
textSpan.innerHTML = list[i].url.substr(list[i].url.lastIndexOf('/') + 1);
|
||||
textSpan.innerHTML = list[i].original || list[i].url.substr(list[i].url.lastIndexOf('/') + 1);
|
||||
preview = document.createElement('div');
|
||||
preview.appendChild(ic);
|
||||
preview.appendChild(textSpan);
|
||||
|
Before Width: | Height: | Size: 923 B |
Before Width: | Height: | Size: 841 B |
Before Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 949 B |
Before Width: | Height: | Size: 950 B |
Before Width: | Height: | Size: 986 B |
Before Width: | Height: | Size: 1001 B |
Before Width: | Height: | Size: 996 B |
Before Width: | Height: | Size: 1001 B |
Before Width: | Height: | Size: 1009 B |
Before Width: | Height: | Size: 1007 B |
Before Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 1005 B |
818
public/js/ueditor/dialogs/audio/audio.css
Normal file
@ -0,0 +1,818 @@
|
||||
@charset "utf-8";
|
||||
.wrapper {
|
||||
width: 570px;
|
||||
_width: 575px;
|
||||
margin: 10px auto;
|
||||
zoom: 1;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.tabbody {
|
||||
height: 355px;
|
||||
}
|
||||
|
||||
.tabbody .panel {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabbody .panel.focus {
|
||||
width: 100%;
|
||||
height: 355px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tabbody .panel table td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#audioUrl {
|
||||
width: 380px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
margin: 8px 5px;
|
||||
background: #FFF;
|
||||
border: 1px solid #d7d7d7;
|
||||
outline: none;
|
||||
border-radius: 3px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#audioSelect {
|
||||
width: 100px;
|
||||
display: inline-block;
|
||||
background: #FFF;
|
||||
border: 1px solid #EEE;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#audioSearchTxt {
|
||||
margin-left: 15px;
|
||||
background: #FFF;
|
||||
width: 200px;
|
||||
height: 21px;
|
||||
line-height: 21px;
|
||||
border: 1px solid #d7d7d7;
|
||||
}
|
||||
|
||||
#searchList {
|
||||
width: 570px;
|
||||
overflow: auto;
|
||||
zoom: 1;
|
||||
height: 270px;
|
||||
}
|
||||
|
||||
#searchList div {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 135px;
|
||||
margin: 5px 15px;
|
||||
}
|
||||
|
||||
#searchList img {
|
||||
margin: 2px 8px;
|
||||
cursor: pointer;
|
||||
border: 2px solid #fff
|
||||
}
|
||||
|
||||
/*不用缩略图*/
|
||||
#searchList p {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#audioType {
|
||||
width: 65px;
|
||||
height: 23px;
|
||||
line-height: 22px;
|
||||
border: 1px solid #d7d7d7;
|
||||
}
|
||||
|
||||
#audioSearchBtn, #audioSearchReset {
|
||||
/*width: 80px;*/
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
background: #eee;
|
||||
border: 1px solid #d7d7d7;
|
||||
cursor: pointer;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
|
||||
#preview {
|
||||
position: relative;
|
||||
width: 420px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
margin-left: 10px;
|
||||
_margin-left: 5px;
|
||||
height: 280px;
|
||||
background-color: #ddd;
|
||||
float: left
|
||||
}
|
||||
|
||||
#preview .previewMsg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 280px;
|
||||
width: 100%;
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
#preview .previewMsg span {
|
||||
display: block;
|
||||
margin: 125px auto 0 auto;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#preview .previewaudio {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 280px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edui-audio-wrapper fieldset {
|
||||
border: 1px solid #ddd;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 5px;
|
||||
width: 115px;
|
||||
}
|
||||
|
||||
#audioInfo {
|
||||
width: 120px;
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
_margin-left: 7px;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #ddd;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 5px;
|
||||
width: 115px;
|
||||
}
|
||||
|
||||
fieldset legend {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
fieldset p {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
fieldset input.txt {
|
||||
width: 65px;
|
||||
height: 21px;
|
||||
line-height: 21px;
|
||||
margin: 8px 5px;
|
||||
background: #FFF;
|
||||
border: 1px solid #d7d7d7;
|
||||
}
|
||||
|
||||
label.url {
|
||||
font-weight: bold;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#audioFloat div {
|
||||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
margin: 9px;
|
||||
_margin: 5px;
|
||||
width: 38px;
|
||||
height: 36px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#audioFloat .focus {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100)
|
||||
}
|
||||
|
||||
span.view {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
color: blue
|
||||
}
|
||||
|
||||
|
||||
/* upload audio */
|
||||
.tabbody #upload.panel {
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
position: absolute !important;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
background: #fff;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tabbody #upload.panel.focus {
|
||||
width: 100%;
|
||||
height: 335px;
|
||||
display: block;
|
||||
clip: auto;
|
||||
}
|
||||
|
||||
#upload_alignment div {
|
||||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
margin: 9px;
|
||||
_margin: 5px;
|
||||
width: 38px;
|
||||
height: 36px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#upload_alignment .focus {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100)
|
||||
}
|
||||
|
||||
#upload_left {
|
||||
width: 427px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#upload_left .controller {
|
||||
height: 30px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#uploadaudioInfo {
|
||||
margin-top: 10px;
|
||||
float: right;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#upload .queueList {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#upload p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.element-invisible {
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
position: absolute !important;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
}
|
||||
|
||||
#upload .placeholder {
|
||||
margin: 10px;
|
||||
margin-right: 0;
|
||||
border: 2px dashed #e6e6e6;
|
||||
*border: 0px dashed #e6e6e6;
|
||||
height: 161px;
|
||||
padding-top: 150px;
|
||||
text-align: center;
|
||||
width: 97%;
|
||||
float: left;
|
||||
background: url(./images/image.png) center 70px no-repeat;
|
||||
color: #cccccc;
|
||||
font-size: 18px;
|
||||
position: relative;
|
||||
top: 0;
|
||||
*margin-left: 0;
|
||||
*left: 10px;
|
||||
}
|
||||
|
||||
#upload .placeholder .webuploader-pick {
|
||||
font-size: 18px;
|
||||
background: #00b7ee;
|
||||
border-radius: 3px;
|
||||
line-height: 44px;
|
||||
padding: 0 30px;
|
||||
*width: 120px;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
margin: 0 auto 20px auto;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
#upload .placeholder .webuploader-pick-hover {
|
||||
background: #00a2d4;
|
||||
}
|
||||
|
||||
|
||||
#filePickerContainer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#upload .placeholder .flashTip {
|
||||
color: #666666;
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
bottom: 20px;
|
||||
}
|
||||
|
||||
#upload .placeholder .flashTip a {
|
||||
color: #0785d1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#upload .placeholder .flashTip a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#upload .placeholder.webuploader-dnd-over {
|
||||
border-color: #999999;
|
||||
}
|
||||
|
||||
#upload .filelist {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
height: 285px;
|
||||
}
|
||||
|
||||
#upload .filelist:after {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#upload .filelist li {
|
||||
width: 113px;
|
||||
height: 113px;
|
||||
background: url(./images/bg.png);
|
||||
text-align: center;
|
||||
margin: 15px 0 0 20px;
|
||||
*margin: 15px 0 0 15px;
|
||||
position: relative;
|
||||
display: block;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#upload .filelist li p.log {
|
||||
position: relative;
|
||||
top: -45px;
|
||||
}
|
||||
|
||||
#upload .filelist li p.title {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
top: 5px;
|
||||
text-indent: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#upload .filelist li p.progress {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 8px;
|
||||
overflow: hidden;
|
||||
z-index: 50;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
background: none;
|
||||
-webkit-box-shadow: 0 0 0;
|
||||
}
|
||||
|
||||
#upload .filelist li p.progress span {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
height: 100%;
|
||||
background: #1483d8 url(./images/progress.png) repeat-x;
|
||||
|
||||
-webit-transition: width 200ms linear;
|
||||
-moz-transition: width 200ms linear;
|
||||
-o-transition: width 200ms linear;
|
||||
-ms-transition: width 200ms linear;
|
||||
transition: width 200ms linear;
|
||||
|
||||
-webkit-animation: progressmove 2s linear infinite;
|
||||
-moz-animation: progressmove 2s linear infinite;
|
||||
-o-animation: progressmove 2s linear infinite;
|
||||
-ms-animation: progressmove 2s linear infinite;
|
||||
animation: progressmove 2s linear infinite;
|
||||
|
||||
-webkit-transform: translateZ(0);
|
||||
}
|
||||
|
||||
@-webkit-keyframes progressmove {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 17px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes progressmove {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 17px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progressmove {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
100% {
|
||||
background-position: 17px 0;
|
||||
}
|
||||
}
|
||||
|
||||
#upload .filelist li p.imgWrap {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
line-height: 113px;
|
||||
vertical-align: middle;
|
||||
overflow: hidden;
|
||||
width: 113px;
|
||||
height: 113px;
|
||||
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
-moz-transform-origin: 50% 50%;
|
||||
-o-transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
transform-origin: 50% 50%;
|
||||
|
||||
-webit-transition: 200ms ease-out;
|
||||
-moz-transition: 200ms ease-out;
|
||||
-o-transition: 200ms ease-out;
|
||||
-ms-transition: 200ms ease-out;
|
||||
transition: 200ms ease-out;
|
||||
}
|
||||
|
||||
#upload .filelist li p.imgWrap.notimage {
|
||||
margin-top: 0;
|
||||
width: 111px;
|
||||
height: 111px;
|
||||
border: 1px #eeeeee solid;
|
||||
}
|
||||
|
||||
#upload .filelist li p.imgWrap.notimage i.file-preview {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
#upload .filelist li img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#upload .filelist li p.error {
|
||||
background: #f43838;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#upload .filelist li .success {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 40px;
|
||||
width: 100%;
|
||||
z-index: 200;
|
||||
background: url(./images/success.png) no-repeat right bottom;
|
||||
background-image: url(./images/success.gif) \9;
|
||||
}
|
||||
|
||||
#upload .filelist li.filePickerBlock {
|
||||
width: 113px;
|
||||
height: 113px;
|
||||
background: url(./images/image.png) no-repeat center 12px;
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#upload .filelist li.filePickerBlock div.webuploader-pick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
opacity: 0;
|
||||
background: none;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel {
|
||||
position: absolute;
|
||||
height: 0;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
z-index: 300;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline;
|
||||
float: right;
|
||||
text-indent: -9999px;
|
||||
overflow: hidden;
|
||||
background: url(./images/icons.png) no-repeat;
|
||||
background: url(./images/icons.gif) no-repeat \9;
|
||||
margin: 5px 1px 1px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateLeft {
|
||||
display: none;
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateLeft:hover {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateRight {
|
||||
display: none;
|
||||
background-position: -24px -24px;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateRight:hover {
|
||||
background-position: -24px 0;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.cancel {
|
||||
background-position: -48px -24px;
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.cancel:hover {
|
||||
background-position: -48px 0;
|
||||
}
|
||||
|
||||
#upload .statusBar {
|
||||
height: 45px;
|
||||
border-bottom: 1px solid #dadada;
|
||||
margin: 0 10px;
|
||||
padding: 0;
|
||||
line-height: 45px;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress {
|
||||
border: 1px solid #1483d8;
|
||||
width: 198px;
|
||||
background: #fff;
|
||||
height: 18px;
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
display: none;
|
||||
text-align: center;
|
||||
line-height: 18px;
|
||||
color: #6dbfff;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress span.percentage {
|
||||
width: 0;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: #1483d8;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress span.text {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#upload .statusBar .info {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
right: 0;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
#filePickerBtn {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .webuploader-pick,
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused {
|
||||
background: #ffffff;
|
||||
border: 1px solid #cfcfcf;
|
||||
color: #565656;
|
||||
padding: 0 18px;
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
float: left;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .webuploader-pick-hover,
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused {
|
||||
background: #00b7ee;
|
||||
color: #fff;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover {
|
||||
background: #00a2d4;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn.disabled {
|
||||
pointer-events: none;
|
||||
filter: alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
-khtml-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
/* 在线文件的文件预览图标 */
|
||||
i.file-preview {
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background-image: url("./images/file-icons.png");
|
||||
background-image: url("./images/file-icons.gif") \9;
|
||||
background-position: -140px center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-dir {
|
||||
background-position: 0 center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-file {
|
||||
background-position: -140px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-filelist {
|
||||
background-position: -210px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-zip,
|
||||
i.file-preview.file-type-rar,
|
||||
i.file-preview.file-type-7z,
|
||||
i.file-preview.file-type-tar,
|
||||
i.file-preview.file-type-gz,
|
||||
i.file-preview.file-type-bz2 {
|
||||
background-position: -280px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-xls,
|
||||
i.file-preview.file-type-xlsx {
|
||||
background-position: -350px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-doc,
|
||||
i.file-preview.file-type-docx {
|
||||
background-position: -420px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-ppt,
|
||||
i.file-preview.file-type-pptx {
|
||||
background-position: -490px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-vsd {
|
||||
background-position: -560px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-pdf {
|
||||
background-position: -630px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-txt,
|
||||
i.file-preview.file-type-md,
|
||||
i.file-preview.file-type-json,
|
||||
i.file-preview.file-type-htm,
|
||||
i.file-preview.file-type-xml,
|
||||
i.file-preview.file-type-html,
|
||||
i.file-preview.file-type-js,
|
||||
i.file-preview.file-type-css,
|
||||
i.file-preview.file-type-php,
|
||||
i.file-preview.file-type-jsp,
|
||||
i.file-preview.file-type-asp {
|
||||
background-position: -700px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-apk {
|
||||
background-position: -770px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-exe {
|
||||
background-position: -840px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-ipa {
|
||||
background-position: -910px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-mp4,
|
||||
i.file-preview.file-type-swf,
|
||||
i.file-preview.file-type-mkv,
|
||||
i.file-preview.file-type-avi,
|
||||
i.file-preview.file-type-flv,
|
||||
i.file-preview.file-type-mov,
|
||||
i.file-preview.file-type-mpg,
|
||||
i.file-preview.file-type-mpeg,
|
||||
i.file-preview.file-type-ogv,
|
||||
i.file-preview.file-type-webm,
|
||||
i.file-preview.file-type-rm,
|
||||
i.file-preview.file-type-rmvb {
|
||||
background-position: -980px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-ogg,
|
||||
i.file-preview.file-type-wav,
|
||||
i.file-preview.file-type-wmv,
|
||||
i.file-preview.file-type-mid,
|
||||
i.file-preview.file-type-mp3 {
|
||||
background-position: -1050px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-jpg,
|
||||
i.file-preview.file-type-jpeg,
|
||||
i.file-preview.file-type-gif,
|
||||
i.file-preview.file-type-bmp,
|
||||
i.file-preview.file-type-png,
|
||||
i.file-preview.file-type-psd {
|
||||
background-position: -140px center;
|
||||
}
|
83
public/js/ueditor/dialogs/audio/audio.html
Normal file
@ -0,0 +1,83 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" type="text/css" href="audio.css?c75591bc"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div id="audioTab">
|
||||
<div id="tabHeads" class="tabhead">
|
||||
<span tabSrc="audio" class="focus" data-content-id="audio"><var id="lang_tab_insertV"></var></span>
|
||||
<span tabSrc="upload" style="display:none;" data-content-id="upload"><var
|
||||
id="lang_tab_uploadV"></var></span>
|
||||
</div>
|
||||
<div id="tabBodys" class="tabbody">
|
||||
<div id="audio" class="panel focus">
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="audioUrl" class="url"><var id="lang_audio_url"></var></label></td>
|
||||
<td><input id="audioUrl" type="text"><a href="javascript:;" id="audioSelect"
|
||||
style="display:none;">选择音频</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding:0 5px 5px 5px;color:#999;">
|
||||
外链音频支持MP3格式
|
||||
</div>
|
||||
<div id="preview"></div>
|
||||
<div id="audioInfo">
|
||||
<fieldset>
|
||||
<legend><var id="lang_alignment"></var></legend>
|
||||
<div id="audioFloat"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div id="upload" class="panel">
|
||||
<div id="upload_left">
|
||||
<div id="queueList" class="queueList">
|
||||
<div class="statusBar element-invisible">
|
||||
<div class="progress">
|
||||
<span class="text">0%</span>
|
||||
<span class="percentage"></span>
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="btns">
|
||||
<div id="filePickerBtn"></div>
|
||||
<div class="uploadBtn"><var id="lang_start_upload"></var></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dndArea" class="placeholder">
|
||||
<div class="filePickerContainer">
|
||||
<div id="filePickerReady"></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="filelist element-invisible">
|
||||
<li id="filePickerBlock" class="filePickerBlock"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="uploadaudioInfo">
|
||||
<fieldset>
|
||||
<legend><var id="lang_upload_alignment"></var></legend>
|
||||
<div id="upload_alignment"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- jquery -->
|
||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.js?628072e7"></script>
|
||||
|
||||
<!-- webuploader -->
|
||||
<script type="text/javascript" src="../../third-party/webuploader/webuploader.js?21e72664"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css?0057c5c7">
|
||||
|
||||
<!-- audio -->
|
||||
<script type="text/javascript" src="audio.js?2d786af4"></script>
|
||||
</body>
|
||||
</html>
|
805
public/js/ueditor/dialogs/audio/audio.js
Normal file
@ -0,0 +1,805 @@
|
||||
/**
|
||||
* Created by JetBrains PhpStorm.
|
||||
* User: taoqili
|
||||
* Date: 12-2-20
|
||||
* Time: 上午11:19
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
||||
var audio = {},
|
||||
uploadaudioList = [],
|
||||
isModifyUploadaudio = false,
|
||||
uploadFile;
|
||||
var editorOpt = {};
|
||||
|
||||
window.onload = function () {
|
||||
editorOpt = editor.getOpt('audioConfig');
|
||||
$focus($G("audioUrl"));
|
||||
initTabs();
|
||||
initAudio();
|
||||
initUpload();
|
||||
};
|
||||
|
||||
/* 初始化tab标签 */
|
||||
function initTabs() {
|
||||
var tabs = $G('tabHeads').children;
|
||||
for (var i = 0; i < tabs.length; i++) {
|
||||
domUtils.on(tabs[i], "click", function (e) {
|
||||
var j, bodyId, target = e.target || e.srcElement;
|
||||
for (j = 0; j < tabs.length; j++) {
|
||||
bodyId = tabs[j].getAttribute('data-content-id');
|
||||
if (tabs[j] == target) {
|
||||
domUtils.addClass(tabs[j], 'focus');
|
||||
domUtils.addClass($G(bodyId), 'focus');
|
||||
} else {
|
||||
domUtils.removeClasses(tabs[j], 'focus');
|
||||
domUtils.removeClasses($G(bodyId), 'focus');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!editorOpt.disableUpload) {
|
||||
$G('tabHeads').querySelector('[data-content-id="upload"]').style.display = 'inline-block';
|
||||
}
|
||||
if (!!editorOpt.selectCallback) {
|
||||
$G('audioSelect').style.display = 'inline-block';
|
||||
domUtils.on($G('audioSelect'), "click", function (e) {
|
||||
editorOpt.selectCallback(editor, function (info) {
|
||||
if (info) {
|
||||
$G('audioUrl').value = info.path;
|
||||
createPreview(info.path);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initAudio() {
|
||||
createAlignButton(["audioFloat", "upload_alignment"]);
|
||||
addUrlChangeListener($G("audioUrl"));
|
||||
addOkListener();
|
||||
|
||||
//编辑视频时初始化相关信息
|
||||
(function () {
|
||||
var img = editor.selection.getRange().getClosedNode(), url;
|
||||
if (img && img.className) {
|
||||
var hasFakedClass = (img.className == "edui-faked-audio"),
|
||||
hasUploadClass = img.className.indexOf("edui-upload-audio") != -1;
|
||||
if (hasFakedClass || hasUploadClass) {
|
||||
$G("audioUrl").value = url = img.getAttribute("_url");
|
||||
var align = domUtils.getComputedStyle(img, "float"),
|
||||
parentAlign = domUtils.getComputedStyle(img.parentNode, "text-align");
|
||||
updateAlignButton(parentAlign === "center" ? "center" : align);
|
||||
}
|
||||
if (hasUploadClass) {
|
||||
isModifyUploadaudio = true;
|
||||
}
|
||||
}
|
||||
createPreview(url);
|
||||
})();
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作
|
||||
*/
|
||||
function addOkListener() {
|
||||
dialog.onok = function () {
|
||||
$G("preview").innerHTML = "";
|
||||
var currentTab = findFocus("tabHeads", "tabSrc");
|
||||
switch (currentTab) {
|
||||
case "audio":
|
||||
return insertSingle();
|
||||
break;
|
||||
// case "audioSearch":
|
||||
// return insertSearch("searchList");
|
||||
// break;
|
||||
case "upload":
|
||||
return insertUpload();
|
||||
break;
|
||||
}
|
||||
};
|
||||
dialog.oncancel = function () {
|
||||
$G("preview").innerHTML = "";
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 依据传入的align值更新按钮信息
|
||||
* @param align
|
||||
*/
|
||||
function updateAlignButton(align) {
|
||||
var aligns = $G("audioFloat").children;
|
||||
for (var i = 0, ci; ci = aligns[i++];) {
|
||||
if (ci.getAttribute("name") == align) {
|
||||
if (ci.className != "focus") {
|
||||
ci.className = "focus";
|
||||
}
|
||||
} else {
|
||||
if (ci.className == "focus") {
|
||||
ci.className = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将单个视频信息插入编辑器中
|
||||
*/
|
||||
function insertSingle() {
|
||||
var url = $G('audioUrl').value,
|
||||
align = findFocus("audioFloat", "name");
|
||||
if (!url) return false;
|
||||
editor.execCommand('insertaudio', {
|
||||
url: url,
|
||||
}, isModifyUploadaudio ? 'upload' : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将元素id下的所有代表视频的图片插入编辑器中
|
||||
* @param id
|
||||
*/
|
||||
function insertSearch(id) {
|
||||
var imgs = domUtils.getElementsByTagName($G(id), "img"),
|
||||
audioObjs = [];
|
||||
for (var i = 0, img; img = imgs[i++];) {
|
||||
if (img.getAttribute("selected")) {
|
||||
audioObjs.push({
|
||||
url: img.getAttribute("ue_audio_url"),
|
||||
width: 420,
|
||||
height: 280,
|
||||
align: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
editor.execCommand('insertaudio', audioObjs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 找到id下具有focus类的节点并返回该节点下的某个属性
|
||||
* @param id
|
||||
* @param returnProperty
|
||||
*/
|
||||
function findFocus(id, returnProperty) {
|
||||
var tabs = $G(id).children,
|
||||
property;
|
||||
for (var i = 0, ci; ci = tabs[i++];) {
|
||||
if (ci.className == "focus") {
|
||||
property = ci.getAttribute(returnProperty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return property;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数字判断
|
||||
* @param value
|
||||
*/
|
||||
function isNumber(value) {
|
||||
return /(0|^[1-9]\d*$)/.test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建图片浮动选择按钮
|
||||
* @param ids
|
||||
*/
|
||||
function createAlignButton(ids) {
|
||||
for (var i = 0, ci; ci = ids[i++];) {
|
||||
var floatContainer = $G(ci),
|
||||
nameMaps = {
|
||||
"none": lang['default'],
|
||||
"left": lang.floatLeft,
|
||||
"right": lang.floatRight,
|
||||
"center": lang.block
|
||||
};
|
||||
for (var j in nameMaps) {
|
||||
var div = document.createElement("div");
|
||||
div.setAttribute("name", j);
|
||||
if (j == "none") div.className = "focus";
|
||||
div.style.cssText = "background:url(images/" + j + "_focus.jpg);";
|
||||
div.setAttribute("title", nameMaps[j]);
|
||||
floatContainer.appendChild(div);
|
||||
}
|
||||
switchSelect(ci);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择切换
|
||||
* @param selectParentId
|
||||
*/
|
||||
function switchSelect(selectParentId) {
|
||||
var selects = $G(selectParentId).children;
|
||||
for (var i = 0, ci; ci = selects[i++];) {
|
||||
domUtils.on(ci, "click", function () {
|
||||
for (var j = 0, cj; cj = selects[j++];) {
|
||||
cj.className = "";
|
||||
cj.removeAttribute && cj.removeAttribute("class");
|
||||
}
|
||||
this.className = "focus";
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 监听url改变事件
|
||||
* @param url
|
||||
*/
|
||||
function addUrlChangeListener(url) {
|
||||
if (browser.ie) {
|
||||
url.onpropertychange = function () {
|
||||
createPreview(this.value);
|
||||
}
|
||||
} else {
|
||||
url.addEventListener("input", function () {
|
||||
createPreview(this.value);
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
|
||||
function createAudioHtml(url, param) {
|
||||
param = param || {};
|
||||
var str = [
|
||||
"<audio",
|
||||
(param.id ? ' id="' + param.id + '"' : ""),
|
||||
(param.cls ? ' class="' + param.cls + '"' : ''),
|
||||
' controls >',
|
||||
'<source src="' + url + '" type="audio/mpeg' + '" />',
|
||||
'</audio>',
|
||||
];
|
||||
return str.join('');
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据url生成视频预览
|
||||
* @param url
|
||||
*/
|
||||
function createPreview(url) {
|
||||
if (!url) {
|
||||
return;
|
||||
}
|
||||
|
||||
$G("preview").innerHTML = '<div class="previewMsg"><span>' + lang.urlError + '</span></div>' +
|
||||
'<div style="position: absolute; inset: 0; background: #FFF; text-align: center; display: flex; justify-items: center; align-items: center;">' +
|
||||
'<div style="text-align:center;flex-grow:1;">' + createAudioHtml(url) + '</div>'
|
||||
+ '</div>';
|
||||
}
|
||||
|
||||
|
||||
/* 插入上传视频 */
|
||||
function insertUpload() {
|
||||
var audioObjs = [],
|
||||
uploadDir = editor.getOpt('audioUrlPrefix'),
|
||||
align = findFocus("upload_alignment", "name") || 'none';
|
||||
for (var key in uploadaudioList) {
|
||||
var file = uploadaudioList[key];
|
||||
audioObjs.push({
|
||||
url: uploadDir + file.url,
|
||||
align: align
|
||||
});
|
||||
}
|
||||
|
||||
var count = uploadFile.getQueueCount();
|
||||
if (count) {
|
||||
$('.info', '#queueList').html('<span style="color:red;">' + '还有2个未上传文件'.replace(/[\d]/, count) + '</span>');
|
||||
return false;
|
||||
} else {
|
||||
editor.execCommand('insertaudio', audioObjs, 'upload');
|
||||
}
|
||||
}
|
||||
|
||||
/*初始化上传标签*/
|
||||
function initUpload() {
|
||||
uploadFile = new UploadFile('queueList');
|
||||
}
|
||||
|
||||
|
||||
/* 上传附件 */
|
||||
function UploadFile(target) {
|
||||
this.$wrap = target.constructor == String ? $('#' + target) : $(target);
|
||||
this.init();
|
||||
}
|
||||
|
||||
UploadFile.prototype = {
|
||||
init: function () {
|
||||
this.fileList = [];
|
||||
this.initContainer();
|
||||
this.initUploader();
|
||||
},
|
||||
initContainer: function () {
|
||||
this.$queue = this.$wrap.find('.filelist');
|
||||
},
|
||||
/* 初始化容器 */
|
||||
initUploader: function () {
|
||||
var _this = this,
|
||||
$ = jQuery, // just in case. Make sure it's not an other libaray.
|
||||
$wrap = _this.$wrap,
|
||||
// 图片容器
|
||||
$queue = $wrap.find('.filelist'),
|
||||
// 状态栏,包括进度和控制按钮
|
||||
$statusBar = $wrap.find('.statusBar'),
|
||||
// 文件总体选择信息。
|
||||
$info = $statusBar.find('.info'),
|
||||
// 上传按钮
|
||||
$upload = $wrap.find('.uploadBtn'),
|
||||
// 上传按钮
|
||||
$filePickerBtn = $wrap.find('.filePickerBtn'),
|
||||
// 上传按钮
|
||||
$filePickerBlock = $wrap.find('.filePickerBlock'),
|
||||
// 没选择文件之前的内容。
|
||||
$placeHolder = $wrap.find('.placeholder'),
|
||||
// 总体进度条
|
||||
$progress = $statusBar.find('.progress').hide(),
|
||||
// 添加的文件数量
|
||||
fileCount = 0,
|
||||
// 添加的文件总大小
|
||||
fileSize = 0,
|
||||
// 优化retina, 在retina下这个值是2
|
||||
ratio = window.devicePixelRatio || 1,
|
||||
// 缩略图大小
|
||||
thumbnailWidth = 113 * ratio,
|
||||
thumbnailHeight = 113 * ratio,
|
||||
// 可能有pedding, ready, uploading, confirm, done.
|
||||
state = '',
|
||||
// 所有文件的进度信息,key为file id
|
||||
percentages = {},
|
||||
supportTransition = (function () {
|
||||
var s = document.createElement('p').style,
|
||||
r = 'transition' in s ||
|
||||
'WebkitTransition' in s ||
|
||||
'MozTransition' in s ||
|
||||
'msTransition' in s ||
|
||||
'OTransition' in s;
|
||||
s = null;
|
||||
return r;
|
||||
})(),
|
||||
// WebUploader实例
|
||||
uploader,
|
||||
actionUrl = editor.getActionUrl(editor.getOpt('audioActionName')),
|
||||
fileMaxSize = editor.getOpt('audioMaxSize'),
|
||||
acceptExtensions = (editor.getOpt('audioAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');
|
||||
;
|
||||
|
||||
if (!WebUploader.Uploader.support()) {
|
||||
$('#filePickerReady').after($('<div>').html(lang.errorNotSupport)).hide();
|
||||
return;
|
||||
} else if (!editor.getOpt('audioActionName')) {
|
||||
$('#filePickerReady').after($('<div>').html(lang.errorLoadConfig)).hide();
|
||||
return;
|
||||
}
|
||||
|
||||
var uploaderOption = {
|
||||
pick: {
|
||||
id: '#filePickerReady',
|
||||
label: lang.uploadSelectFile
|
||||
},
|
||||
swf: '../../third-party/webuploader/Uploader.swf',
|
||||
server: actionUrl,
|
||||
fileVal: editor.getOpt('audioFieldName'),
|
||||
duplicate: true,
|
||||
fileSingleSizeLimit: fileMaxSize,
|
||||
headers: editor.getOpt('serverHeaders') || {},
|
||||
compress: false
|
||||
};
|
||||
|
||||
if(editor.getOpt('uploadServiceEnable')) {
|
||||
uploaderOption.customUpload = function (file, callback) {
|
||||
editor.getOpt('uploadServiceUpload')('audio', file, {
|
||||
success: function( res ) {
|
||||
callback.onSuccess(file, {_raw:JSON.stringify(res)});
|
||||
},
|
||||
error: function( err ) {
|
||||
callback.onError(file, err);
|
||||
},
|
||||
progress: function( percent ) {
|
||||
callback.onProgress(file, percent);
|
||||
}
|
||||
}, {
|
||||
from: 'audio'
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
uploader = _this.uploader = WebUploader.create(uploaderOption);
|
||||
uploader.addButton({
|
||||
id: '#filePickerBlock'
|
||||
});
|
||||
uploader.addButton({
|
||||
id: '#filePickerBtn',
|
||||
label: lang.uploadAddFile
|
||||
});
|
||||
|
||||
setState('pedding');
|
||||
|
||||
// 当有文件添加进来时执行,负责view的创建
|
||||
function addFile(file) {
|
||||
var $li = $('<li id="' + file.id + '">' +
|
||||
'<p class="title">' + file.name + '</p>' +
|
||||
'<p class="imgWrap"></p>' +
|
||||
'<p class="progress"><span></span></p>' +
|
||||
'</li>'),
|
||||
|
||||
$btns = $('<div class="file-panel">' +
|
||||
'<span class="cancel">' + lang.uploadDelete + '</span>' +
|
||||
'<span class="rotateRight">' + lang.uploadTurnRight + '</span>' +
|
||||
'<span class="rotateLeft">' + lang.uploadTurnLeft + '</span></div>').appendTo($li),
|
||||
$prgress = $li.find('p.progress span'),
|
||||
$wrap = $li.find('p.imgWrap'),
|
||||
$info = $('<p class="error"></p>').hide().appendTo($li),
|
||||
|
||||
showError = function (code) {
|
||||
switch (code) {
|
||||
case 'exceed_size':
|
||||
text = lang.errorExceedSize;
|
||||
break;
|
||||
case 'interrupt':
|
||||
text = lang.errorInterrupt;
|
||||
break;
|
||||
case 'http':
|
||||
text = lang.errorHttp;
|
||||
break;
|
||||
case 'not_allow_type':
|
||||
text = lang.errorFileType;
|
||||
break;
|
||||
default:
|
||||
text = lang.errorUploadRetry;
|
||||
break;
|
||||
}
|
||||
$info.text(text).show();
|
||||
};
|
||||
|
||||
if (file.getStatus() === 'invalid') {
|
||||
showError(file.statusText);
|
||||
} else {
|
||||
$wrap.text(lang.uploadPreview);
|
||||
if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|' + file.ext.toLowerCase() + '|') == -1) {
|
||||
$wrap.empty().addClass('notimage').append('<i class="file-preview file-type-' + file.ext.toLowerCase() + '"></i>' +
|
||||
'<span class="file-title">' + file.name + '</span>');
|
||||
} else {
|
||||
if (browser.ie && browser.version <= 7) {
|
||||
$wrap.text(lang.uploadNoPreview);
|
||||
} else {
|
||||
uploader.makeThumb(file, function (error, src) {
|
||||
if (error || !src || (/^data:/.test(src) && browser.ie && browser.version <= 7)) {
|
||||
$wrap.text(lang.uploadNoPreview);
|
||||
} else {
|
||||
var $img = $('<img src="' + src + '">');
|
||||
$wrap.empty().append($img);
|
||||
$img.on('error', function () {
|
||||
$wrap.text(lang.uploadNoPreview);
|
||||
});
|
||||
}
|
||||
}, thumbnailWidth, thumbnailHeight);
|
||||
}
|
||||
}
|
||||
percentages[file.id] = [file.size, 0];
|
||||
file.rotation = 0;
|
||||
|
||||
/* 检查文件格式 */
|
||||
if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) {
|
||||
showError('not_allow_type');
|
||||
uploader.removeFile(file);
|
||||
}
|
||||
}
|
||||
|
||||
file.on('statuschange', function (cur, prev) {
|
||||
if (prev === 'progress') {
|
||||
$prgress.hide().width(0);
|
||||
} else if (prev === 'queued') {
|
||||
$li.off('mouseenter mouseleave');
|
||||
$btns.remove();
|
||||
}
|
||||
// 成功
|
||||
if (cur === 'error' || cur === 'invalid') {
|
||||
showError(file.statusText);
|
||||
percentages[file.id][1] = 1;
|
||||
} else if (cur === 'interrupt') {
|
||||
showError('interrupt');
|
||||
} else if (cur === 'queued') {
|
||||
percentages[file.id][1] = 0;
|
||||
} else if (cur === 'progress') {
|
||||
$info.hide();
|
||||
$prgress.css('display', 'block');
|
||||
} else if (cur === 'complete') {
|
||||
}
|
||||
|
||||
$li.removeClass('state-' + prev).addClass('state-' + cur);
|
||||
});
|
||||
|
||||
$li.on('mouseenter', function () {
|
||||
$btns.stop().animate({height: 30});
|
||||
});
|
||||
$li.on('mouseleave', function () {
|
||||
$btns.stop().animate({height: 0});
|
||||
});
|
||||
|
||||
$btns.on('click', 'span', function () {
|
||||
var index = $(this).index(),
|
||||
deg;
|
||||
|
||||
switch (index) {
|
||||
case 0:
|
||||
uploader.removeFile(file);
|
||||
return;
|
||||
case 1:
|
||||
file.rotation += 90;
|
||||
break;
|
||||
case 2:
|
||||
file.rotation -= 90;
|
||||
break;
|
||||
}
|
||||
|
||||
if (supportTransition) {
|
||||
deg = 'rotate(' + file.rotation + 'deg)';
|
||||
$wrap.css({
|
||||
'-webkit-transform': deg,
|
||||
'-mos-transform': deg,
|
||||
'-o-transform': deg,
|
||||
'transform': deg
|
||||
});
|
||||
} else {
|
||||
$wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$li.insertBefore($filePickerBlock);
|
||||
}
|
||||
|
||||
// 负责view的销毁
|
||||
function removeFile(file) {
|
||||
var $li = $('#' + file.id);
|
||||
delete percentages[file.id];
|
||||
updateTotalProgress();
|
||||
$li.off().find('.file-panel').off().end().remove();
|
||||
}
|
||||
|
||||
function updateTotalProgress() {
|
||||
var loaded = 0,
|
||||
total = 0,
|
||||
spans = $progress.children(),
|
||||
percent;
|
||||
|
||||
$.each(percentages, function (k, v) {
|
||||
total += v[0];
|
||||
loaded += v[0] * v[1];
|
||||
});
|
||||
|
||||
percent = total ? loaded / total : 0;
|
||||
|
||||
spans.eq(0).text(Math.round(percent * 100) + '%');
|
||||
spans.eq(1).css('width', Math.round(percent * 100) + '%');
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
function setState(val, files) {
|
||||
|
||||
if (val != state) {
|
||||
|
||||
var stats = uploader.getStats();
|
||||
|
||||
$upload.removeClass('state-' + state);
|
||||
$upload.addClass('state-' + val);
|
||||
|
||||
switch (val) {
|
||||
|
||||
/* 未选择文件 */
|
||||
case 'pedding':
|
||||
$queue.addClass('element-invisible');
|
||||
$statusBar.addClass('element-invisible');
|
||||
$placeHolder.removeClass('element-invisible');
|
||||
$progress.hide();
|
||||
$info.hide();
|
||||
uploader.refresh();
|
||||
break;
|
||||
|
||||
/* 可以开始上传 */
|
||||
case 'ready':
|
||||
$placeHolder.addClass('element-invisible');
|
||||
$queue.removeClass('element-invisible');
|
||||
$statusBar.removeClass('element-invisible');
|
||||
$progress.hide();
|
||||
$info.show();
|
||||
$upload.text(lang.uploadStart);
|
||||
uploader.refresh();
|
||||
break;
|
||||
|
||||
/* 上传中 */
|
||||
case 'uploading':
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadPause);
|
||||
break;
|
||||
|
||||
/* 暂停上传 */
|
||||
case 'paused':
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadContinue);
|
||||
break;
|
||||
|
||||
case 'confirm':
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadStart);
|
||||
|
||||
stats = uploader.getStats();
|
||||
if (stats.successNum && !stats.uploadFailNum) {
|
||||
setState('finish');
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'finish':
|
||||
$progress.hide();
|
||||
$info.show();
|
||||
if (stats.uploadFailNum) {
|
||||
$upload.text(lang.uploadRetry);
|
||||
} else {
|
||||
$upload.text(lang.uploadStart);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
state = val;
|
||||
updateStatus();
|
||||
|
||||
}
|
||||
|
||||
if (!_this.getQueueCount()) {
|
||||
$upload.addClass('disabled')
|
||||
} else {
|
||||
$upload.removeClass('disabled')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function updateStatus() {
|
||||
var text = '', stats;
|
||||
|
||||
if (state === 'ready') {
|
||||
text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize));
|
||||
} else if (state === 'confirm') {
|
||||
stats = uploader.getStats();
|
||||
if (stats.uploadFailNum) {
|
||||
text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum);
|
||||
}
|
||||
} else {
|
||||
stats = uploader.getStats();
|
||||
text = lang.updateStatusFinish.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)).replace('_', stats.successNum);
|
||||
|
||||
if (stats.uploadFailNum) {
|
||||
text += lang.updateStatusError.replace('_', stats.uploadFailNum);
|
||||
}
|
||||
}
|
||||
|
||||
$info.html(text);
|
||||
}
|
||||
|
||||
uploader.on('fileQueued', function (file) {
|
||||
fileCount++;
|
||||
fileSize += file.size;
|
||||
|
||||
if (fileCount === 1) {
|
||||
$placeHolder.addClass('element-invisible');
|
||||
$statusBar.show();
|
||||
}
|
||||
|
||||
addFile(file);
|
||||
});
|
||||
|
||||
uploader.on('fileDequeued', function (file) {
|
||||
fileCount--;
|
||||
fileSize -= file.size;
|
||||
|
||||
removeFile(file);
|
||||
updateTotalProgress();
|
||||
});
|
||||
|
||||
uploader.on('filesQueued', function (file) {
|
||||
if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) {
|
||||
setState('ready');
|
||||
}
|
||||
updateTotalProgress();
|
||||
});
|
||||
|
||||
uploader.on('all', function (type, files) {
|
||||
switch (type) {
|
||||
case 'uploadFinished':
|
||||
setState('confirm', files);
|
||||
break;
|
||||
case 'startUpload':
|
||||
/* 添加额外的GET参数 */
|
||||
var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?' : '&') + 'encode=utf-8&' + params);
|
||||
uploader.option('server', url);
|
||||
setState('uploading', files);
|
||||
break;
|
||||
case 'stopUpload':
|
||||
setState('paused', files);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
uploader.on('uploadBeforeSend', function (file, data, header) {
|
||||
//这里可以通过data对象添加POST参数
|
||||
if (actionUrl.toLowerCase().indexOf('jsp') != -1) {
|
||||
header['X_Requested_With'] = 'XMLHttpRequest';
|
||||
}
|
||||
});
|
||||
|
||||
uploader.on('uploadProgress', function (file, percentage) {
|
||||
var $li = $('#' + file.id),
|
||||
$percent = $li.find('.progress span');
|
||||
|
||||
$percent.css('width', percentage * 100 + '%');
|
||||
percentages[file.id][1] = percentage;
|
||||
updateTotalProgress();
|
||||
});
|
||||
|
||||
uploader.on('uploadSuccess', function (file, ret) {
|
||||
var $file = $('#' + file.id);
|
||||
try {
|
||||
var responseText = (ret._raw || ret),
|
||||
json = utils.str2json(responseText);
|
||||
json = editor.getOpt('serverResponsePrepare')(json);
|
||||
if (json.state == 'SUCCESS') {
|
||||
uploadaudioList.push({
|
||||
'url': json.url,
|
||||
'type': json.type,
|
||||
'original': json.original
|
||||
});
|
||||
$file.append('<span class="success"></span>');
|
||||
} else {
|
||||
$file.find('.error').text(json.state).show();
|
||||
}
|
||||
} catch (e) {
|
||||
$file.find('.error').text(lang.errorServerUpload).show();
|
||||
}
|
||||
});
|
||||
|
||||
uploader.on('uploadError', function (file, code) {
|
||||
});
|
||||
uploader.on('error', function (code, param1, param2) {
|
||||
if (code === 'F_EXCEED_SIZE') {
|
||||
editor.getOpt('tipError')(lang.errorExceedSize + ' ' + (param1 / 1024 / 1024).toFixed(1) + 'MB');
|
||||
} else {
|
||||
console.log('error', code, param1, param2);
|
||||
}
|
||||
});
|
||||
uploader.on('uploadComplete', function (file, ret) {
|
||||
});
|
||||
|
||||
$upload.on('click', function () {
|
||||
if ($(this).hasClass('disabled')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (state === 'ready') {
|
||||
uploader.upload();
|
||||
} else if (state === 'paused') {
|
||||
uploader.upload();
|
||||
} else if (state === 'uploading') {
|
||||
uploader.stop();
|
||||
}
|
||||
});
|
||||
|
||||
$upload.addClass('state-' + state);
|
||||
updateTotalProgress();
|
||||
},
|
||||
getQueueCount: function () {
|
||||
var file, i, status, readyFile = 0, files = this.uploader.getFiles();
|
||||
for (i = 0; file = files[i++];) {
|
||||
status = file.getStatus();
|
||||
if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
|
||||
}
|
||||
return readyFile;
|
||||
},
|
||||
refresh: function () {
|
||||
this.uploader.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
BIN
public/js/ueditor/dialogs/audio/images/bg.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
public/js/ueditor/dialogs/audio/images/center_focus.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/js/ueditor/dialogs/audio/images/file-icons.gif
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
public/js/ueditor/dialogs/audio/images/file-icons.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
public/js/ueditor/dialogs/audio/images/icons.gif
Normal file
After Width: | Height: | Size: 453 B |
BIN
public/js/ueditor/dialogs/audio/images/icons.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
public/js/ueditor/dialogs/audio/images/image.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
public/js/ueditor/dialogs/audio/images/left_focus.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/js/ueditor/dialogs/audio/images/none_focus.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/js/ueditor/dialogs/audio/images/progress.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
public/js/ueditor/dialogs/audio/images/right_focus.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/js/ueditor/dialogs/audio/images/success.gif
Normal file
After Width: | Height: | Size: 445 B |
BIN
public/js/ueditor/dialogs/audio/images/success.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
@ -1,28 +1,118 @@
|
||||
.wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative}
|
||||
.tabbody{height:225px;}
|
||||
.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;}
|
||||
.tabbody .focus { display: block;}
|
||||
.wrapper {
|
||||
width: 424px;
|
||||
margin: 10px auto;
|
||||
zoom: 1;
|
||||
position: relative
|
||||
}
|
||||
|
||||
body{font-size: 12px;color: #888;overflow: hidden;}
|
||||
input,label{vertical-align:middle}
|
||||
.clear{clear: both;}
|
||||
.pl{padding-left: 18px;padding-left: 23px\9;}
|
||||
.tabbody {
|
||||
height: 225px;
|
||||
}
|
||||
|
||||
#imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;}
|
||||
#imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;}
|
||||
#imageList img {cursor: pointer;border: 2px solid white;}
|
||||
.tabbody .panel {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;}
|
||||
.content div{margin: 10px 0 10px 5px;}
|
||||
.content .iptradio{margin: 0px 5px 5px 0px;}
|
||||
.txt{width:280px;}
|
||||
.tabbody .focus {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wrapcolor{height: 19px;}
|
||||
div.color{float: left;margin: 0;}
|
||||
#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;}
|
||||
div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
|
||||
#custom input{height: 15px;min-height: 15px;width:20px;}
|
||||
#repeatType{width:100px;}
|
||||
body {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
input, label {
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.pl {
|
||||
padding-left: 18px;
|
||||
padding-left: 23px \9;
|
||||
}
|
||||
|
||||
#imageList {
|
||||
width: 420px;
|
||||
height: 215px;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#imageList div {
|
||||
float: left;
|
||||
width: 100px;
|
||||
height: 95px;
|
||||
margin: 5px 10px;
|
||||
}
|
||||
|
||||
#imageList img {
|
||||
cursor: pointer;
|
||||
border: 2px solid white;
|
||||
}
|
||||
|
||||
.bgarea {
|
||||
margin: 10px;
|
||||
padding: 5px;
|
||||
height: 84%;
|
||||
border: 1px solid #A8A297;
|
||||
}
|
||||
|
||||
.content div {
|
||||
margin: 10px 0 10px 5px;
|
||||
}
|
||||
|
||||
.content .iptradio {
|
||||
margin: 0px 5px 5px 0px;
|
||||
}
|
||||
|
||||
.txt {
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
.wrapcolor {
|
||||
height: 19px;
|
||||
}
|
||||
|
||||
div.color {
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#colorPicker {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border: 1px solid #CCC;
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
box-shadow: 2px 2px 5px #D3D6DA;
|
||||
margin: 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.alignment, #custom {
|
||||
margin-left: 23px;
|
||||
margin-left: 28px \9;
|
||||
}
|
||||
|
||||
#custom input {
|
||||
height: 15px;
|
||||
min-height: 15px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#repeatType {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
|
||||
/* 图片管理样式 */
|
||||
@ -30,17 +120,20 @@ div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
|
||||
width: 100%;
|
||||
height: 225px;
|
||||
}
|
||||
#imgManager #imageList{
|
||||
|
||||
#imgManager #imageList {
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#imgManager ul {
|
||||
display: block;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#imgManager li {
|
||||
float: left;
|
||||
display: block;
|
||||
@ -54,18 +147,21 @@ div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#imgManager li.clearFloat {
|
||||
float: none;
|
||||
clear: both;
|
||||
display: block;
|
||||
width:0;
|
||||
height:0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#imgManager li img {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#imgManager li .icon {
|
||||
cursor: pointer;
|
||||
width: 113px;
|
||||
@ -77,15 +173,18 @@ div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
|
||||
border: 0;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#imgManager li .icon:hover {
|
||||
width: 107px;
|
||||
height: 107px;
|
||||
border: 3px solid #1094fa;
|
||||
}
|
||||
|
||||
#imgManager li.selected .icon {
|
||||
background-image: url(images/success.png);
|
||||
background-position: 75px 75px;
|
||||
}
|
||||
|
||||
#imgManager li.selected .icon:hover {
|
||||
width: 107px;
|
||||
height: 107px;
|
||||
|
@ -2,11 +2,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="background.css?20220503">
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" type="text/css" href="background.css?da860c7a">
|
||||
</head>
|
||||
<body>
|
||||
<div id="bg_container" class="wrapper">
|
||||
<div id="bg_container" class="wrapper">
|
||||
<div id="tabHeads" class="tabhead">
|
||||
<span class="focus" data-content-id="normal"><var id="lang_background_normal"></var></span>
|
||||
</div>
|
||||
@ -16,8 +16,10 @@
|
||||
<legend><var id="lang_background_set"></var></legend>
|
||||
<div class="content">
|
||||
<div>
|
||||
<label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none" checked="checked"><var id="lang_background_none"></var></label>
|
||||
<label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var id="lang_background_colored"></var></label>
|
||||
<label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none"
|
||||
checked="checked"><var id="lang_background_none"></var></label>
|
||||
<label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var
|
||||
id="lang_background_colored"></var></label>
|
||||
</div>
|
||||
<div class="wrapcolor pl">
|
||||
<div class="color">
|
||||
@ -38,15 +40,20 @@
|
||||
<option value="self"></option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="custom" >
|
||||
<var id="lang_background_position"></var>:x:<input type="text" size="1" id="x" maxlength="4" value="0">px y:<input type="text" size="1" id="y" maxlength="4" value="0">px
|
||||
<div id="custom">
|
||||
<var id="lang_background_position"></var>:x:<input type="text" size="1" id="x" maxlength="4"
|
||||
value="0">px y:<input type="text"
|
||||
size="1"
|
||||
id="y"
|
||||
maxlength="4"
|
||||
value="0">px
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="background.js?20220503"></script>
|
||||
</div>
|
||||
<script type="text/javascript" src="background.js?dd36acd0"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -9,17 +9,17 @@
|
||||
};
|
||||
|
||||
/* 初始化tab标签 */
|
||||
function initTabs(){
|
||||
function initTabs() {
|
||||
var tabs = $G('tabHeads').children;
|
||||
for (var i = 0; i < tabs.length; i++) {
|
||||
domUtils.on(tabs[i], "click", function (e) {
|
||||
var target = e.target || e.srcElement;
|
||||
for (var j = 0; j < tabs.length; j++) {
|
||||
if(tabs[j] == target){
|
||||
if (tabs[j] == target) {
|
||||
tabs[j].className = "focus";
|
||||
var contentId = tabs[j].getAttribute('data-content-id');
|
||||
$G(contentId).style.display = "block";
|
||||
}else {
|
||||
} else {
|
||||
tabs[j].className = "";
|
||||
$G(tabs[j].getAttribute('data-content-id')).style.display = "none";
|
||||
}
|
||||
@ -29,7 +29,7 @@
|
||||
}
|
||||
|
||||
/* 初始化颜色设置 */
|
||||
function initColorSelector () {
|
||||
function initColorSelector() {
|
||||
var obj = editor.queryCommandValue('background');
|
||||
if (obj) {
|
||||
var color = obj['background-color'],
|
||||
@ -40,10 +40,10 @@
|
||||
x = parseInt(pos[0]) || 0,
|
||||
y = parseInt(pos[1]) || 0;
|
||||
|
||||
if(repeat == 'no-repeat' && (x || y)) repeat = 'self';
|
||||
if (repeat == 'no-repeat' && (x || y)) repeat = 'self';
|
||||
|
||||
image = image.match(/url[\s]*\(([^\)]*)\)/);
|
||||
image = image ? image[1]:'';
|
||||
image = image ? image[1] : '';
|
||||
updateFormState('colored', color, image, repeat, x, y);
|
||||
} else {
|
||||
updateFormState();
|
||||
@ -55,10 +55,10 @@
|
||||
}
|
||||
domUtils.on($G('nocolorRadio'), 'click', updateBackground);
|
||||
domUtils.on($G('coloredRadio'), 'click', updateHandler);
|
||||
domUtils.on($G('url'), 'keyup', function(){
|
||||
if($G('url').value && $G('alignment').style.display == "none") {
|
||||
utils.each($G('repeatType').children, function(item){
|
||||
item.selected = ('repeat' == item.getAttribute('value') ? 'selected':false);
|
||||
domUtils.on($G('url'), 'keyup', function () {
|
||||
if ($G('url').value && $G('alignment').style.display == "none") {
|
||||
utils.each($G('repeatType').children, function (item) {
|
||||
item.selected = ('repeat' == item.getAttribute('value') ? 'selected' : false);
|
||||
});
|
||||
}
|
||||
updateHandler();
|
||||
@ -110,44 +110,44 @@
|
||||
}
|
||||
|
||||
/* 更新背景色设置面板 */
|
||||
function updateFormState (radio, color, url, align, x, y) {
|
||||
function updateFormState(radio, color, url, align, x, y) {
|
||||
var nocolorRadio = $G('nocolorRadio'),
|
||||
coloredRadio = $G('coloredRadio');
|
||||
|
||||
if(radio) {
|
||||
nocolorRadio.checked = (radio == 'colored' ? false:'checked');
|
||||
coloredRadio.checked = (radio == 'colored' ? 'checked':false);
|
||||
if (radio) {
|
||||
nocolorRadio.checked = (radio == 'colored' ? false : 'checked');
|
||||
coloredRadio.checked = (radio == 'colored' ? 'checked' : false);
|
||||
}
|
||||
if(color) {
|
||||
if (color) {
|
||||
domUtils.setStyle($G("colorPicker"), "background-color", color);
|
||||
}
|
||||
|
||||
if(url && /^\//.test(url)) {
|
||||
if (url && /^\//.test(url)) {
|
||||
var a = document.createElement('a');
|
||||
a.href = url;
|
||||
browser.ie && (a.href = a.href);
|
||||
url = browser.ie ? a.href:(a.protocol + '//' + a.host + a.pathname + a.search + a.hash);
|
||||
url = browser.ie ? a.href : (a.protocol + '//' + a.host + a.pathname + a.search + a.hash);
|
||||
}
|
||||
|
||||
if(url || url === '') {
|
||||
if (url || url === '') {
|
||||
$G('url').value = url;
|
||||
}
|
||||
if(align) {
|
||||
utils.each($G('repeatType').children, function(item){
|
||||
item.selected = (align == item.getAttribute('value') ? 'selected':false);
|
||||
if (align) {
|
||||
utils.each($G('repeatType').children, function (item) {
|
||||
item.selected = (align == item.getAttribute('value') ? 'selected' : false);
|
||||
});
|
||||
}
|
||||
if(x || y) {
|
||||
if (x || y) {
|
||||
$G('x').value = parseInt(x) || 0;
|
||||
$G('y').value = parseInt(y) || 0;
|
||||
}
|
||||
|
||||
$G('alignment').style.display = coloredRadio.checked && $G('url').value ? '':'none';
|
||||
$G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '':'none';
|
||||
$G('alignment').style.display = coloredRadio.checked && $G('url').value ? '' : 'none';
|
||||
$G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '' : 'none';
|
||||
}
|
||||
|
||||
/* 更新背景颜色 */
|
||||
function updateBackground () {
|
||||
function updateBackground() {
|
||||
if ($G('coloredRadio').checked) {
|
||||
var color = domUtils.getStyle($G("colorPicker"), "background-color"),
|
||||
bgimg = $G("url").value,
|
||||
@ -177,6 +177,7 @@
|
||||
this.container = utils.isString(target) ? document.getElementById(target) : target;
|
||||
this.init();
|
||||
}
|
||||
|
||||
OnlineImage.prototype = {
|
||||
init: function () {
|
||||
this.reset();
|
||||
@ -200,7 +201,7 @@
|
||||
var _this = this;
|
||||
|
||||
/* 滚动拉取图片 */
|
||||
domUtils.on($G('imageList'), 'scroll', function(e){
|
||||
domUtils.on($G('imageList'), 'scroll', function (e) {
|
||||
var panel = this;
|
||||
if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
|
||||
_this.getImageData();
|
||||
@ -239,7 +240,7 @@
|
||||
this.getImageData();
|
||||
},
|
||||
/* 重置界面 */
|
||||
reset: function() {
|
||||
reset: function () {
|
||||
this.initContainer();
|
||||
this.initData();
|
||||
},
|
||||
@ -247,31 +248,32 @@
|
||||
getImageData: function () {
|
||||
var _this = this;
|
||||
|
||||
if(!_this.listEnd && !this.isLoadingData) {
|
||||
if (!_this.listEnd && !this.isLoadingData) {
|
||||
this.isLoadingData = true;
|
||||
var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')),
|
||||
isJsonp = utils.isCrossDomainUrl(url);
|
||||
ajax.request(url, {
|
||||
'timeout': 100000,
|
||||
'dataType': isJsonp ? 'jsonp':'',
|
||||
'dataType': isJsonp ? 'jsonp' : '',
|
||||
'data': utils.extend({
|
||||
start: this.listIndex,
|
||||
size: this.listSize
|
||||
}, editor.queryCommandValue('serverparam')),
|
||||
'headers': editor.options.serverHeaders || {},
|
||||
'method': 'get',
|
||||
'onsuccess': function (r) {
|
||||
try {
|
||||
var json = isJsonp ? r:eval('(' + r.responseText + ')');
|
||||
var json = isJsonp ? r : eval('(' + r.responseText + ')');
|
||||
if (json.state == 'SUCCESS') {
|
||||
_this.pushData(json.list);
|
||||
_this.listIndex = parseInt(json.start) + parseInt(json.list.length);
|
||||
if(_this.listIndex >= json.total) {
|
||||
if (_this.listIndex >= json.total) {
|
||||
_this.listEnd = true;
|
||||
}
|
||||
_this.isLoadingData = false;
|
||||
}
|
||||
} catch (e) {
|
||||
if(r.responseText.indexOf('ue_separate_ue') != -1) {
|
||||
if (r.responseText.indexOf('ue_separate_ue') != -1) {
|
||||
var list = r.responseText.split(r.responseText);
|
||||
_this.pushData(list);
|
||||
_this.listIndex = parseInt(list.length);
|
||||
@ -291,18 +293,18 @@
|
||||
var i, item, img, icon, _this = this,
|
||||
urlPrefix = editor.getOpt('imageManagerUrlPrefix');
|
||||
for (i = 0; i < list.length; i++) {
|
||||
if(list[i] && list[i].url) {
|
||||
if (list[i] && list[i].url) {
|
||||
item = document.createElement('li');
|
||||
img = document.createElement('img');
|
||||
icon = document.createElement('span');
|
||||
|
||||
domUtils.on(img, 'load', (function(image){
|
||||
return function(){
|
||||
domUtils.on(img, 'load', (function (image) {
|
||||
return function () {
|
||||
_this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
|
||||
}
|
||||
})(img));
|
||||
img.width = 113;
|
||||
img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
|
||||
img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=' : '&noCache=') + (+new Date()).toString(36));
|
||||
img.setAttribute('_src', urlPrefix + list[i].url);
|
||||
domUtils.addClass(icon, 'icon');
|
||||
|
||||
|
176
public/js/ueditor/dialogs/contentimport/contentimport.html
Normal file
@ -0,0 +1,176 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<style type="text/css">
|
||||
.wrapper {
|
||||
width: 600px;
|
||||
padding: 10px;
|
||||
height: 352px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border-bottom: 1px solid #d7d7d7;
|
||||
}
|
||||
|
||||
.wrapper .file-upload {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.wrapper .file-upload .file-tip {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
padding-left: 10px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.wrapper .file-manual {
|
||||
background: #EEE;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
.wrapper .file-manual .title {
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
.wrapper .file-manual .body {
|
||||
}
|
||||
|
||||
.wrapper .file-manual .body li {
|
||||
list-style: disc;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.wrapper .upload-button {
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #EEE;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
line-height: 28px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.wrapper .upload-button .text {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.wrapper .upload-button input {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wrapper .file-result {
|
||||
border: 1px solid #333;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
top: 50px;
|
||||
background: #FFF;
|
||||
bottom: 10px;
|
||||
overflow: auto;
|
||||
display: none;
|
||||
}
|
||||
.wrapper .file-input{
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
top: 50px;
|
||||
background: #EEE;
|
||||
bottom: 10px;
|
||||
border-radius: 5px;
|
||||
display:none;
|
||||
}
|
||||
.wrapper .file-input textarea{
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
border: none;
|
||||
resize: none;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
outline: none;
|
||||
top: 30px;
|
||||
}
|
||||
.wrapper .file-input .tool{
|
||||
text-align: right;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.wrapper .file-input .tool a{
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
background: #FFF;
|
||||
padding: 0 10px;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="file-upload">
|
||||
<div class="upload-button">
|
||||
<div class="text">选择本地文件</div>
|
||||
<input type="file" id="contentImport"/>
|
||||
</div>
|
||||
<div class="upload-button">
|
||||
<div class="text" onclick="$('.file-input').show();">粘贴Markdown</div>
|
||||
</div>
|
||||
<div class="file-tip"></div>
|
||||
</div>
|
||||
<div class="file-manual">
|
||||
<div class="title">
|
||||
支持文档格式
|
||||
</div>
|
||||
<div class="body">
|
||||
<ul>
|
||||
<li><b>Word</b>:docx</li>
|
||||
<li><b>Markdown</b>:md</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-result"></div>
|
||||
<div class="file-input">
|
||||
<textarea id="fileInputContent"></textarea>
|
||||
<div class="tool">
|
||||
<a href="javascript:;" id="fileInputConfirm">
|
||||
确定
|
||||
</a>
|
||||
<a href="javascript:;" onclick="$(this).closest('.file-input').hide();">
|
||||
关闭
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../third-party/jquery-1.10.2.js?628072e7"></script>
|
||||
<script src="mammoth.browser.min.js?bfaf513f"></script>
|
||||
<script src="showdown.min.js?b4bef047"></script>
|
||||
<script type="text/javascript" src="contentimport.js?5760833a"></script>
|
||||
<script type="text/javascript">
|
||||
utils.domReady(function () {
|
||||
var options = {};
|
||||
var callbacks = {};
|
||||
contentImport.init(options, callbacks);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
91
public/js/ueditor/dialogs/contentimport/contentimport.js
Normal file
@ -0,0 +1,91 @@
|
||||
var contentImport = {};
|
||||
var g = $G;
|
||||
|
||||
contentImport.data = {
|
||||
result: null,
|
||||
};
|
||||
contentImport.init = function (opt, callbacks) {
|
||||
addUploadButtonListener();
|
||||
addOkListener();
|
||||
};
|
||||
|
||||
function processWord(file) {
|
||||
$('.file-tip').html('正在转换Word文件,请稍后...');
|
||||
$('.file-result').html('').hide();
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (loadEvent) {
|
||||
mammoth.convertToHtml({
|
||||
arrayBuffer: loadEvent.target.result
|
||||
})
|
||||
.then(function displayResult(result) {
|
||||
$('.file-tip').html('转换成功');
|
||||
contentImport.data.result = result.value;
|
||||
$('.file-result').html(result.value).show();
|
||||
}, function (error) {
|
||||
$('.file-tip').html('Word文件转换失败:' + error);
|
||||
});
|
||||
};
|
||||
reader.onerror = function (loadEvent) {
|
||||
$('.file-tip').html('Word文件转换失败:' + loadEvent);
|
||||
};
|
||||
reader.readAsArrayBuffer(file);
|
||||
}
|
||||
|
||||
function processMarkdown( markdown ){
|
||||
var converter = new showdown.Converter();
|
||||
var html = converter.makeHtml(markdown);
|
||||
$('.file-tip').html('转换成功');
|
||||
contentImport.data.result = html;
|
||||
$('.file-result').html(html).show();
|
||||
}
|
||||
|
||||
function processMarkdownFile(file) {
|
||||
$('.file-tip').html('正在转换Markdown文件,请稍后...');
|
||||
$('.file-result').html('').hide();
|
||||
var reader = new FileReader();
|
||||
reader.onload = function (loadEvent) {
|
||||
processMarkdown( loadEvent.target.result );
|
||||
};
|
||||
reader.onerror = function (loadEvent) {
|
||||
$('.file-tip').html('Markdown文件转换失败:' + loadEvent);
|
||||
};
|
||||
reader.readAsText(file, "UTF-8");
|
||||
}
|
||||
|
||||
function addUploadButtonListener() {
|
||||
g('contentImport').addEventListener('change', function () {
|
||||
const file = this.files[0];
|
||||
const fileName = file.name;
|
||||
const fileExt = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
|
||||
switch (fileExt) {
|
||||
case 'docx':
|
||||
case 'doc':
|
||||
processWord(file);
|
||||
break;
|
||||
case 'md':
|
||||
processMarkdownFile(file);
|
||||
break;
|
||||
default:
|
||||
$('.file-tip').html('不支持的文件格式:' + fileExt);
|
||||
break;
|
||||
}
|
||||
});
|
||||
g('fileInputConfirm').addEventListener('click', function () {
|
||||
processMarkdown( g('fileInputContent').value );
|
||||
$('.file-input').hide();
|
||||
});
|
||||
}
|
||||
|
||||
function addOkListener() {
|
||||
dialog.onok = function () {
|
||||
if (!contentImport.data.result) {
|
||||
alert('请先上传文件识别内容');
|
||||
return false;
|
||||
}
|
||||
editor.fireEvent('saveScene');
|
||||
editor.execCommand("inserthtml", contentImport.data.result);
|
||||
editor.fireEvent('saveScene');
|
||||
};
|
||||
dialog.oncancel = function () {
|
||||
};
|
||||
}
|
21
public/js/ueditor/dialogs/contentimport/mammoth.browser.min.js
vendored
Normal file
3
public/js/ueditor/dialogs/contentimport/showdown.min.js
vendored
Normal file
@ -1,43 +1,129 @@
|
||||
.jd img{
|
||||
background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor:pointer;width:35px;height:35px;display:block;
|
||||
}
|
||||
.pp img{
|
||||
background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor:pointer;width:25px;height:25px;display:block;
|
||||
}
|
||||
.ldw img{
|
||||
background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor:pointer;width:35px;height:35px;display:block;
|
||||
}
|
||||
.tsj img{
|
||||
background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor:pointer;width:35px;height:35px;display:block;
|
||||
}
|
||||
.cat img{
|
||||
background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor:pointer;width:35px;height:35px;display:block;
|
||||
}
|
||||
.bb img{
|
||||
background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor:pointer;width:35px;height:35px;display:block;
|
||||
}
|
||||
.youa img{
|
||||
background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor:pointer;width:35px;height:35px;display:block;
|
||||
.jd img {
|
||||
background: transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.smileytable td {height: 37px;}
|
||||
#tabPanel{margin-left:5px;overflow: hidden;}
|
||||
#tabContent {float:left;background:#FFFFFF;}
|
||||
#tabContent div{display: none;width:480px;overflow:hidden;}
|
||||
#tabIconReview.show{left:17px;display:block;}
|
||||
.menuFocus{background:#ACCD3C;}
|
||||
.menuDefault{background:#FFFFFF;}
|
||||
#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;}
|
||||
img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;}
|
||||
.pp img {
|
||||
background: transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;}
|
||||
.tabbody table{width: 100%;}
|
||||
.tabbody td{border:1px solid #BAC498;}
|
||||
.tabbody td span{display: block;zoom:1;padding:0 4px;}
|
||||
.ldw img {
|
||||
background: transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tsj img {
|
||||
background: transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cat img {
|
||||
background: transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.bb img {
|
||||
background: transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.youa img {
|
||||
background: transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.smileytable td {
|
||||
height: 37px;
|
||||
}
|
||||
|
||||
#tabPanel {
|
||||
margin-left: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tabContent {
|
||||
float: left;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
#tabContent div {
|
||||
display: none;
|
||||
width: 480px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tabIconReview.show {
|
||||
left: 17px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menuFocus {
|
||||
background: #ACCD3C;
|
||||
}
|
||||
|
||||
.menuDefault {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
#tabIconReview {
|
||||
position: absolute;
|
||||
left: 406px;
|
||||
left: 398px \9;
|
||||
top: 41px;
|
||||
z-index: 65533;
|
||||
width: 90px;
|
||||
height: 76px;
|
||||
}
|
||||
|
||||
img.review {
|
||||
width: 90px;
|
||||
height: 76px;
|
||||
border: 2px solid #9cb945;
|
||||
background: #FFFFFF;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.wrapper .tabbody {
|
||||
position: relative;
|
||||
float: left;
|
||||
clear: both;
|
||||
padding: 10px;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.tabbody table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tabbody td {
|
||||
border: 1px solid #BAC498;
|
||||
}
|
||||
|
||||
.tabbody td span {
|
||||
display: block;
|
||||
zoom: 1;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
@ -4,8 +4,8 @@
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta name="robots" content="noindex, nofollow"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="emotion.css?20220503">
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" type="text/css" href="emotion.css?d5b42328">
|
||||
</head>
|
||||
<body>
|
||||
<div id="tabPanel" class="wrapper">
|
||||
@ -31,22 +31,38 @@
|
||||
<div id="tabIconReview">
|
||||
<img id='faceReview' class='review' src="../../themes/default/images/spacer.gif"/>
|
||||
</div>
|
||||
<script type="text/javascript" src="emotion.js?20220503"></script>
|
||||
<script type="text/javascript" src="emotion.js?61027075"></script>
|
||||
<script type="text/javascript">
|
||||
var emotion = {
|
||||
tabNum:7, //切换面板数量
|
||||
SmilmgName:{ tab0:['j_00', 84], tab1:['t_00', 40], tab2:['w_00', 52], tab3:['B_00', 63], tab4:['C_00', 20], tab5:['i_f', 50], tab6:['y_00', 40] }, //图片前缀名
|
||||
imageFolders:{ tab0:'jx2/', tab1:'tsj/', tab2:'ldw/', tab3:'bobo/', tab4:'babycat/', tab5:'face/', tab6:'youa/'}, //图片对应文件夹路径
|
||||
imageCss:{tab0:'jd', tab1:'tsj', tab2:'ldw', tab3:'bb', tab4:'cat', tab5:'pp', tab6:'youa'}, //图片css类名
|
||||
imageCssOffset:{tab0:35, tab1:35, tab2:35, tab3:35, tab4:35, tab5:25, tab6:35}, //图片偏移
|
||||
SmileyInfor:{
|
||||
tab0:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'],
|
||||
tab1:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'],
|
||||
tab2:['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'],
|
||||
tab3:['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'],
|
||||
tab4:['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'],
|
||||
tab5:['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],
|
||||
tab6:['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']
|
||||
tabNum: 7, //切换面板数量
|
||||
SmilmgName: {
|
||||
tab0: ['j_00', 84],
|
||||
tab1: ['t_00', 40],
|
||||
tab2: ['w_00', 52],
|
||||
tab3: ['B_00', 63],
|
||||
tab4: ['C_00', 20],
|
||||
tab5: ['i_f', 50],
|
||||
tab6: ['y_00', 40]
|
||||
}, //图片前缀名
|
||||
imageFolders: {
|
||||
tab0: 'jx2/',
|
||||
tab1: 'tsj/',
|
||||
tab2: 'ldw/',
|
||||
tab3: 'bobo/',
|
||||
tab4: 'babycat/',
|
||||
tab5: 'face/',
|
||||
tab6: 'youa/'
|
||||
}, //图片对应文件夹路径
|
||||
imageCss: {tab0: 'jd', tab1: 'tsj', tab2: 'ldw', tab3: 'bb', tab4: 'cat', tab5: 'pp', tab6: 'youa'}, //图片css类名
|
||||
imageCssOffset: {tab0: 35, tab1: 35, tab2: 35, tab3: 35, tab4: 35, tab5: 25, tab6: 35}, //图片偏移
|
||||
SmileyInfor: {
|
||||
tab0: ['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'],
|
||||
tab1: ['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'],
|
||||
tab2: ['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'],
|
||||
tab3: ['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'],
|
||||
tab4: ['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'],
|
||||
tab5: ['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],
|
||||
tab6: ['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,73 +1,73 @@
|
||||
window.onload = function () {
|
||||
editor.setOpt({
|
||||
emotionLocalization:false
|
||||
emotionLocalization: false
|
||||
});
|
||||
|
||||
emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/";
|
||||
emotion.SmileyBox = createTabList( emotion.tabNum );
|
||||
emotion.tabExist = createArr( emotion.tabNum );
|
||||
emotion.SmileyBox = createTabList(emotion.tabNum);
|
||||
emotion.tabExist = createArr(emotion.tabNum);
|
||||
|
||||
initImgName();
|
||||
initEvtHandler( "tabHeads" );
|
||||
initEvtHandler("tabHeads");
|
||||
};
|
||||
|
||||
function initImgName() {
|
||||
for ( var pro in emotion.SmilmgName ) {
|
||||
for (var pro in emotion.SmilmgName) {
|
||||
var tempName = emotion.SmilmgName[pro],
|
||||
tempBox = emotion.SmileyBox[pro],
|
||||
tempStr = "";
|
||||
|
||||
if ( tempBox.length ) return;
|
||||
for ( var i = 1; i <= tempName[1]; i++ ) {
|
||||
if (tempBox.length) return;
|
||||
for (var i = 1; i <= tempName[1]; i++) {
|
||||
tempStr = tempName[0];
|
||||
if ( i < 10 ) tempStr = tempStr + '0';
|
||||
if (i < 10) tempStr = tempStr + '0';
|
||||
tempStr = tempStr + i + '.gif';
|
||||
tempBox.push( tempStr );
|
||||
tempBox.push(tempStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initEvtHandler( conId ) {
|
||||
var tabHeads = $G( conId );
|
||||
for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) {
|
||||
function initEvtHandler(conId) {
|
||||
var tabHeads = $G(conId);
|
||||
for (var i = 0, j = 0; i < tabHeads.childNodes.length; i++) {
|
||||
var tabObj = tabHeads.childNodes[i];
|
||||
if ( tabObj.nodeType == 1 ) {
|
||||
domUtils.on( tabObj, "click", (function ( index ) {
|
||||
if (tabObj.nodeType == 1) {
|
||||
domUtils.on(tabObj, "click", (function (index) {
|
||||
return function () {
|
||||
switchTab( index );
|
||||
switchTab(index);
|
||||
};
|
||||
})( j ) );
|
||||
})(j));
|
||||
j++;
|
||||
}
|
||||
}
|
||||
switchTab( 0 );
|
||||
$G( "tabIconReview" ).style.display = 'none';
|
||||
switchTab(0);
|
||||
$G("tabIconReview").style.display = 'none';
|
||||
}
|
||||
|
||||
function InsertSmiley( url, evt ) {
|
||||
function InsertSmiley(url, evt) {
|
||||
var obj = {
|
||||
src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
|
||||
src: editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
|
||||
};
|
||||
obj._src = obj.src;
|
||||
editor.execCommand( 'insertimage', obj );
|
||||
if ( !evt.ctrlKey ) {
|
||||
editor.execCommand('insertimage', obj);
|
||||
if (!evt.ctrlKey) {
|
||||
dialog.popup.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function switchTab( index ) {
|
||||
function switchTab(index) {
|
||||
|
||||
autoHeight( index );
|
||||
if ( emotion.tabExist[index] == 0 ) {
|
||||
autoHeight(index);
|
||||
if (emotion.tabExist[index] == 0) {
|
||||
emotion.tabExist[index] = 1;
|
||||
createTab( 'tab' + index );
|
||||
createTab('tab' + index);
|
||||
}
|
||||
//获取呈现元素句柄数组
|
||||
var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ),
|
||||
tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ),
|
||||
var tabHeads = $G("tabHeads").getElementsByTagName("span"),
|
||||
tabBodys = $G("tabBodys").getElementsByTagName("div"),
|
||||
i = 0, L = tabHeads.length;
|
||||
//隐藏所有呈现元素
|
||||
for ( ; i < L; i++ ) {
|
||||
for (; i < L; i++) {
|
||||
tabHeads[i].className = "";
|
||||
tabBodys[i].style.display = "none";
|
||||
}
|
||||
@ -76,10 +76,10 @@ function switchTab( index ) {
|
||||
tabBodys[index].style.display = "block";
|
||||
}
|
||||
|
||||
function autoHeight( index ) {
|
||||
var iframe = dialog.getDom( "iframe" ),
|
||||
function autoHeight(index) {
|
||||
var iframe = dialog.getDom("iframe"),
|
||||
parent = iframe.parentNode.parentNode;
|
||||
switch ( index ) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
iframe.style.height = "380px";
|
||||
parent.style.height = "392px";
|
||||
@ -114,9 +114,9 @@ function autoHeight( index ) {
|
||||
}
|
||||
|
||||
|
||||
function createTab( tabName ) {
|
||||
function createTab(tabName) {
|
||||
var faceVersion = "?v=1.1", //版本号
|
||||
tab = $G( tabName ), //获取将要生成的Div句柄
|
||||
tab = $G(tabName), //获取将要生成的Div句柄
|
||||
imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
|
||||
positionLine = 11 / 2, //中间数
|
||||
iWidth = iHeight = 35, //图片长宽
|
||||
@ -127,58 +127,58 @@ function createTab( tabName ) {
|
||||
i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
|
||||
sUrl, realUrl, posflag, offset, infor;
|
||||
|
||||
for ( ; i < imgNum; ) {
|
||||
textHTML.push( '<tr>' );
|
||||
for ( var j = 0; j < imgColNum; j++, i++ ) {
|
||||
for (; i < imgNum;) {
|
||||
textHTML.push('<tr>');
|
||||
for (var j = 0; j < imgColNum; j++, i++) {
|
||||
faceImage = emotion.SmileyBox[tabName][i];
|
||||
if ( faceImage ) {
|
||||
if (faceImage) {
|
||||
sUrl = imagePath + faceImage + faceVersion;
|
||||
realUrl = imagePath + faceImage;
|
||||
posflag = j < positionLine ? 0 : 1;
|
||||
offset = cssOffset * i * (-1) - 1;
|
||||
infor = emotion.SmileyInfor[tabName][i];
|
||||
|
||||
textHTML.push( '<td class="' + tableCss + '" border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center" bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace( /'/g, "\\'" ) + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">' );
|
||||
textHTML.push( '<span>' );
|
||||
textHTML.push( '<img style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' );
|
||||
textHTML.push( '</span>' );
|
||||
textHTML.push('<td class="' + tableCss + '" border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center" bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace(/'/g, "\\'") + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">');
|
||||
textHTML.push('<span>');
|
||||
textHTML.push('<img style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>');
|
||||
textHTML.push('</span>');
|
||||
} else {
|
||||
textHTML.push( '<td width="' + iColWidth + '%" bgcolor="#FFFFFF">' );
|
||||
textHTML.push('<td width="' + iColWidth + '%" bgcolor="#FFFFFF">');
|
||||
}
|
||||
textHTML.push( '</td>' );
|
||||
textHTML.push('</td>');
|
||||
}
|
||||
textHTML.push( '</tr>' );
|
||||
textHTML.push('</tr>');
|
||||
}
|
||||
textHTML.push( '</table>' );
|
||||
textHTML = textHTML.join( "" );
|
||||
textHTML.push('</table>');
|
||||
textHTML = textHTML.join("");
|
||||
tab.innerHTML = textHTML;
|
||||
}
|
||||
|
||||
function over( td, srcPath, posFlag ) {
|
||||
function over(td, srcPath, posFlag) {
|
||||
td.style.backgroundColor = "#ACCD3C";
|
||||
$G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")";
|
||||
if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show";
|
||||
$G( "tabIconReview" ).style.display = 'block';
|
||||
$G('faceReview').style.backgroundImage = "url(" + srcPath + ")";
|
||||
if (posFlag == 1) $G("tabIconReview").className = "show";
|
||||
$G("tabIconReview").style.display = 'block';
|
||||
}
|
||||
|
||||
function out( td ) {
|
||||
function out(td) {
|
||||
td.style.backgroundColor = "transparent";
|
||||
var tabIconRevew = $G( "tabIconReview" );
|
||||
var tabIconRevew = $G("tabIconReview");
|
||||
tabIconRevew.className = "";
|
||||
tabIconRevew.style.display = 'none';
|
||||
}
|
||||
|
||||
function createTabList( tabNum ) {
|
||||
function createTabList(tabNum) {
|
||||
var obj = {};
|
||||
for ( var i = 0; i < tabNum; i++ ) {
|
||||
for (var i = 0; i < tabNum; i++) {
|
||||
obj["tab" + i] = [];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function createArr( tabNum ) {
|
||||
function createArr(tabNum) {
|
||||
var arr = [];
|
||||
for ( var i = 0; i < tabNum; i++ ) {
|
||||
for (var i = 0; i < tabNum; i++) {
|
||||
arr[i] = 0;
|
||||
}
|
||||
return arr;
|
||||
|
@ -3,12 +3,12 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<style type="text/css">
|
||||
.wrapper {
|
||||
width: 600px;
|
||||
padding: 10px;
|
||||
height: 352px;
|
||||
box-sizing: border-box;
|
||||
width: 800px;
|
||||
height: 390px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border-bottom: 1px solid #d7d7d7
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
.editor-wrap {
|
||||
display: flex;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.editor-wrap #editor {
|
||||
@ -29,7 +30,7 @@
|
||||
}
|
||||
|
||||
.input-tip {
|
||||
margin-top: 10px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.input-tip a {
|
||||
@ -39,9 +40,9 @@
|
||||
.editor-preview {
|
||||
background: #FFF;
|
||||
border-radius: 3px;
|
||||
margin-top: 10px;
|
||||
border: 1px solid #EEE;
|
||||
display:none;
|
||||
display: none;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.editor-preview .title {
|
||||
@ -54,13 +55,22 @@
|
||||
}
|
||||
|
||||
.editor-preview .body .image {
|
||||
max-width:100%;
|
||||
max-height:100px;
|
||||
max-width: 100%;
|
||||
max-height: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
|
||||
<div id="modeLive" style="display:none;">
|
||||
<iframe id="liveEditor"
|
||||
frameborder="0"
|
||||
style="width:800px;height:390px;border: 0;outline: none;"
|
||||
></iframe>
|
||||
</div>
|
||||
|
||||
<div id="modePlain" style="display:none;">
|
||||
<div class="editor-wrap">
|
||||
<textarea id="editor"></textarea>
|
||||
</div>
|
||||
@ -70,13 +80,15 @@
|
||||
<div class="editor-preview" id="preview">
|
||||
<div class="title">预览</div>
|
||||
<div class="body">
|
||||
<img class="image" id="previewImage" />
|
||||
<img class="image" id="previewImage"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="../../third-party/jquery-1.10.2.js?20220503"></script>
|
||||
<script type="text/javascript" src="../../third-party/clipboard/clipboard.js?20220503"></script>
|
||||
<script type="text/javascript" src="formula.js?20220903"></script>
|
||||
<script src="../../third-party/jquery-1.10.2.js?628072e7"></script>
|
||||
<script type="text/javascript" src="../../third-party/clipboard/clipboard.js?555edf0a"></script>
|
||||
<script type="text/javascript" src="formula.js?8fdd0a42"></script>
|
||||
<script type="text/javascript">
|
||||
utils.domReady(function () {
|
||||
Formula.init();
|
||||
|
@ -17,55 +17,131 @@ function preg_quote(str, delimiter) {
|
||||
return (str + '').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&');
|
||||
}
|
||||
|
||||
function loadScript(url, cb) {
|
||||
var script;
|
||||
script = document.createElement('script');
|
||||
script.src = url;
|
||||
script.onload = function () {
|
||||
cb && cb({isNew: true})
|
||||
};
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
}
|
||||
|
||||
var Formula = {
|
||||
mode: 'plain',
|
||||
latexeasy: null,
|
||||
init: function () {
|
||||
// console.log('Formula.init')
|
||||
Formula.initValue();
|
||||
Formula.initMode();
|
||||
Formula.initEvent();
|
||||
Formula.initSubmit();
|
||||
},
|
||||
render: function () {
|
||||
var content = $.trim($('#editor').val());
|
||||
if (!content) {
|
||||
$('#preview').hide();
|
||||
renderPlain: function () {
|
||||
var $preview = $('#preview');
|
||||
var value = $('#editor').val();
|
||||
if (!value) {
|
||||
$preview.hide();
|
||||
return;
|
||||
}
|
||||
content = encodeURIComponent(content);
|
||||
value = encodeURIComponent(value);
|
||||
var formulaConfig = editor.getOpt('formulaConfig');
|
||||
var src = formulaConfig.imageUrlTemplate.replace(/\{\}/, content);
|
||||
var src = formulaConfig.imageUrlTemplate.replace(/\{\}/, value);
|
||||
$('#previewImage').attr('src', src);
|
||||
$('#preview').show();
|
||||
$preview.show();
|
||||
},
|
||||
initValue: function () {
|
||||
setValuePlain: function (value) {
|
||||
$('#editor').val(value);
|
||||
Formula.renderPlain();
|
||||
},
|
||||
setValueLive: function (value) {
|
||||
if (!Formula.latexeasy) {
|
||||
setTimeout(function () {
|
||||
Formula.setValueLive(value);
|
||||
}, 100);
|
||||
return;
|
||||
}
|
||||
Formula.latexeasy.call('set.latex', {latex: value});
|
||||
},
|
||||
initMode: function () {
|
||||
var formulaConfig = editor.getOpt('formulaConfig');
|
||||
if ('live' === formulaConfig.editorMode) {
|
||||
$('#liveEditor').attr('src', formulaConfig.editorLiveServer + '/editor');
|
||||
$('#modeLive').show();
|
||||
Formula.mode = 'live';
|
||||
} else {
|
||||
$('#modePlain').show();
|
||||
Formula.mode = 'plain';
|
||||
}
|
||||
var img = editor.selection.getRange().getClosedNode();
|
||||
if (img && img.getAttribute('data-formula-image') !== null) {
|
||||
var value = img.getAttribute('data-formula-image');
|
||||
if (value) {
|
||||
$('#editor').val(decodeURIComponent(value));
|
||||
Formula.render();
|
||||
Formula.setValue(decodeURIComponent(value));
|
||||
}
|
||||
}
|
||||
},
|
||||
setValue: function (value) {
|
||||
switch (Formula.mode) {
|
||||
case 'plain':
|
||||
Formula.setValuePlain(value);
|
||||
break;
|
||||
case 'live':
|
||||
Formula.setValueLive(value);
|
||||
break;
|
||||
}
|
||||
},
|
||||
getValue: function (cb) {
|
||||
switch (Formula.mode) {
|
||||
case 'plain':
|
||||
cb($.trim($('#editor').val()));
|
||||
break;
|
||||
case 'live':
|
||||
Formula.latexeasy.call('get.latex', {}, function (data) {
|
||||
cb(data.latex);
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
initEvent: function () {
|
||||
var changeTimer = null;
|
||||
var changeTimer = null, le;
|
||||
switch (Formula.mode) {
|
||||
case 'plain':
|
||||
// console.log('Formula.initEvent');
|
||||
$('#editor').on('change keypress', function () {
|
||||
changeTimer && clearTimeout(changeTimer);
|
||||
changeTimer = setTimeout(function () {
|
||||
Formula.render();
|
||||
Formula.renderPlain();
|
||||
}, 1000);
|
||||
});
|
||||
$('#inputDemo').on('click', function () {
|
||||
$('#editor').val('f(a) = \\frac{1}{2\\pi i} \\oint\\frac{f(z)}{z-a}dz');
|
||||
Formula.render();
|
||||
Formula.renderPlain();
|
||||
});
|
||||
break;
|
||||
case 'live':
|
||||
var formulaConfig = editor.getOpt('formulaConfig');
|
||||
loadScript(formulaConfig.editorLiveServer + '/vendor/LatexEasyEditor/editor/sdk.js', function () {
|
||||
le = new window.LatexEasy(document.getElementById('liveEditor'));
|
||||
le.on('ready', function () {
|
||||
Formula.latexeasy = le;
|
||||
});
|
||||
le.init();
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
initSubmit: function () {
|
||||
dialog.onok = function () {
|
||||
editor.execCommand('formula', $.trim($('#editor').val()));
|
||||
dialog.onclose = function (t, ok) {
|
||||
if (!ok) {
|
||||
return true;
|
||||
}
|
||||
// console.log('onclose', t, ok);
|
||||
Formula.getValue(function (value) {
|
||||
editor.execCommand('formula', value);
|
||||
editor.fireEvent('saveScene');
|
||||
};
|
||||
dialog.oncancel = function () {
|
||||
dialog.close(false);
|
||||
});
|
||||
return false;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -1,7 +1,37 @@
|
||||
.wrapper{width: 370px;margin: 10px auto;zoom: 1;}
|
||||
.tabbody{height: 360px;}
|
||||
.tabbody .panel{width:100%;height: 360px;position: absolute;background: #fff;}
|
||||
.tabbody .panel h1{font-size:26px;margin: 5px 0 0 5px;}
|
||||
.tabbody .panel p{font-size:12px;margin: 5px 0 0 5px;}
|
||||
.tabbody table{width:90%;line-height: 20px;margin: 5px 0 0 5px;;}
|
||||
.tabbody table thead{font-weight: bold;line-height: 25px;}
|
||||
.wrapper {
|
||||
width: 370px;
|
||||
margin: 10px auto;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.tabbody {
|
||||
height: 360px;
|
||||
}
|
||||
|
||||
.tabbody .panel {
|
||||
width: 100%;
|
||||
height: 360px;
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.tabbody .panel h1 {
|
||||
font-size: 26px;
|
||||
margin: 5px 0 0 5px;
|
||||
}
|
||||
|
||||
.tabbody .panel p {
|
||||
font-size: 12px;
|
||||
margin: 5px 0 0 5px;
|
||||
}
|
||||
|
||||
.tabbody table {
|
||||
width: 90%;
|
||||
line-height: 20px;
|
||||
margin: 5px 0 0 5px;;
|
||||
}
|
||||
|
||||
.tabbody table thead {
|
||||
font-weight: bold;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
@ -4,8 +4,8 @@
|
||||
<head>
|
||||
<title>帮助</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="help.css?20220503">
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" type="text/css" href="help.css?81231bdb">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper" id="helptab">
|
||||
@ -77,6 +77,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="help.js?20220503"></script>
|
||||
<script type="text/javascript" src="help.js?0a6823d2"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -11,21 +11,21 @@
|
||||
* @param tabBodys
|
||||
* @param obj
|
||||
*/
|
||||
function clickHandler( tabHeads,tabBodys,obj ) {
|
||||
function clickHandler(tabHeads, tabBodys, obj) {
|
||||
//head样式更改
|
||||
for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
|
||||
for (var k = 0, len = tabHeads.length; k < len; k++) {
|
||||
tabHeads[k].className = "";
|
||||
}
|
||||
obj.className = "focus";
|
||||
//body显隐
|
||||
var tabSrc = obj.getAttribute( "tabSrc" );
|
||||
for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
|
||||
var tabSrc = obj.getAttribute("tabSrc");
|
||||
for (var j = 0, length = tabBodys.length; j < length; j++) {
|
||||
var body = tabBodys[j],
|
||||
id = body.getAttribute( "id" );
|
||||
body.onclick = function(){
|
||||
id = body.getAttribute("id");
|
||||
body.onclick = function () {
|
||||
this.style.zoom = 1;
|
||||
};
|
||||
if ( id != tabSrc ) {
|
||||
if (id != tabSrc) {
|
||||
body.style.zIndex = 1;
|
||||
} else {
|
||||
body.style.zIndex = 200;
|
||||
@ -38,19 +38,20 @@ function clickHandler( tabHeads,tabBodys,obj ) {
|
||||
* TAB切换
|
||||
* @param tabParentId tab的父节点ID或者对象本身
|
||||
*/
|
||||
function switchTab( tabParentId ) {
|
||||
var tabElements = $G( tabParentId ).children,
|
||||
function switchTab(tabParentId) {
|
||||
var tabElements = $G(tabParentId).children,
|
||||
tabHeads = tabElements[0].children,
|
||||
tabBodys = tabElements[1].children;
|
||||
|
||||
for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
|
||||
for (var i = 0, length = tabHeads.length; i < length; i++) {
|
||||
var head = tabHeads[i];
|
||||
if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
|
||||
if (head.className === "focus") clickHandler(tabHeads, tabBodys, head);
|
||||
head.onclick = function () {
|
||||
clickHandler(tabHeads,tabBodys,this);
|
||||
clickHandler(tabHeads, tabBodys, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switchTab("helptab");
|
||||
|
||||
document.getElementById('version').innerHTML = parent.UE.version;
|
@ -13,8 +13,9 @@
|
||||
|
||||
/*tab样式框大小*/
|
||||
.tabhead {
|
||||
float:left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.tabbody {
|
||||
width: 100%;
|
||||
height: 346px;
|
||||
@ -38,25 +39,26 @@
|
||||
}
|
||||
|
||||
/* 图片对齐方式 */
|
||||
.alignBar{
|
||||
float:right;
|
||||
.alignBar {
|
||||
float: right;
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.alignBar .algnLabel{
|
||||
float:left;
|
||||
.alignBar .algnLabel {
|
||||
float: left;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.alignBar #alignIcon{
|
||||
zoom:1;
|
||||
.alignBar #alignIcon {
|
||||
zoom: 1;
|
||||
_display: inline;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
.alignBar #alignIcon span{
|
||||
|
||||
.alignBar #alignIcon span {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
@ -66,75 +68,85 @@
|
||||
margin-left: 3px;
|
||||
background-image: url(./images/alignicon.jpg);
|
||||
}
|
||||
.alignBar #alignIcon .none-align{
|
||||
|
||||
.alignBar #alignIcon .none-align {
|
||||
background-position: 0 -18px;
|
||||
}
|
||||
.alignBar #alignIcon .left-align{
|
||||
|
||||
.alignBar #alignIcon .left-align {
|
||||
background-position: -20px -18px;
|
||||
}
|
||||
.alignBar #alignIcon .right-align{
|
||||
|
||||
.alignBar #alignIcon .right-align {
|
||||
background-position: -40px -18px;
|
||||
}
|
||||
.alignBar #alignIcon .center-align{
|
||||
|
||||
.alignBar #alignIcon .center-align {
|
||||
background-position: -60px -18px;
|
||||
}
|
||||
.alignBar #alignIcon .none-align.focus{
|
||||
|
||||
.alignBar #alignIcon .none-align.focus {
|
||||
background-position: 0 0;
|
||||
}
|
||||
.alignBar #alignIcon .left-align.focus{
|
||||
|
||||
.alignBar #alignIcon .left-align.focus {
|
||||
background-position: -20px 0;
|
||||
}
|
||||
.alignBar #alignIcon .right-align.focus{
|
||||
|
||||
.alignBar #alignIcon .right-align.focus {
|
||||
background-position: -40px 0;
|
||||
}
|
||||
.alignBar #alignIcon .center-align.focus{
|
||||
|
||||
.alignBar #alignIcon .center-align.focus {
|
||||
background-position: -60px 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* 远程图片样式 */
|
||||
#remote {
|
||||
z-index: 200;
|
||||
}
|
||||
|
||||
#remote .top{
|
||||
#remote .top {
|
||||
width: 100%;
|
||||
margin-top: 25px;
|
||||
}
|
||||
#remote .left{
|
||||
|
||||
#remote .left {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 300px;
|
||||
height:10px;
|
||||
height: 10px;
|
||||
}
|
||||
#remote .right{
|
||||
|
||||
#remote .right {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 300px;
|
||||
height:10px;
|
||||
height: 10px;
|
||||
}
|
||||
#remote .row{
|
||||
|
||||
#remote .row {
|
||||
margin-left: 20px;
|
||||
clear: both;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
#remote .row label{
|
||||
#remote .row label {
|
||||
text-align: center;
|
||||
width: 50px;
|
||||
zoom:1;
|
||||
zoom: 1;
|
||||
_display: inline;
|
||||
display:inline-block;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#remote .row label.algnLabel{
|
||||
|
||||
#remote .row label.algnLabel {
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
#remote input.text{
|
||||
#remote input.text {
|
||||
width: 150px;
|
||||
padding: 3px 6px;
|
||||
font-size: 14px;
|
||||
@ -149,14 +161,17 @@
|
||||
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
}
|
||||
|
||||
#remote input.text:focus {
|
||||
outline: 0;
|
||||
}
|
||||
#remote #url{
|
||||
|
||||
#remote #url {
|
||||
width: 400px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
#remote #imageSelect{
|
||||
|
||||
#remote #imageSelect {
|
||||
width: 100px;
|
||||
display: inline-block;
|
||||
background: #FFF;
|
||||
@ -168,33 +183,38 @@
|
||||
border-radius: 3px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#remote #width,
|
||||
#remote #height{
|
||||
#remote #height {
|
||||
width: 30px;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
text-align:center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#remote #border,
|
||||
#remote #vhSpace,
|
||||
#remote #title{
|
||||
#remote #title {
|
||||
width: 180px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
#remote #lock{
|
||||
display:inline-block;
|
||||
|
||||
#remote #lock {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#remote #lockicon{
|
||||
|
||||
#remote #lockicon {
|
||||
zoom: 1;
|
||||
_display:inline;
|
||||
_display: inline;
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: url("../../themes/default/images/lock.gif") -13px -13px no-repeat;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#remote #preview{
|
||||
|
||||
#remote #preview {
|
||||
clear: both;
|
||||
width: 260px;
|
||||
height: 240px;
|
||||
@ -256,7 +276,7 @@
|
||||
color: #cccccc;
|
||||
font-size: 18px;
|
||||
position: relative;
|
||||
top:0;
|
||||
top: 0;
|
||||
*top: 10px;
|
||||
}
|
||||
|
||||
@ -456,7 +476,7 @@
|
||||
line-height: 28px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
display:none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#upload .filelist li .success {
|
||||
@ -478,6 +498,7 @@
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#upload .filelist li.filePickerBlock div.webuploader-pick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -511,7 +532,7 @@
|
||||
background: url(./images/icons.gif) no-repeat \9;
|
||||
margin: 5px 1px 1px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
@ -519,7 +540,7 @@
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateLeft {
|
||||
display:none;
|
||||
display: none;
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
|
||||
@ -528,7 +549,7 @@
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateRight {
|
||||
display:none;
|
||||
display: none;
|
||||
background-position: -24px -24px;
|
||||
}
|
||||
|
||||
@ -567,6 +588,7 @@
|
||||
color: #6dbfff;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress span.percentage {
|
||||
width: 0;
|
||||
height: 100%;
|
||||
@ -575,6 +597,7 @@
|
||||
background: #1483d8;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress span.text {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
@ -597,6 +620,7 @@
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .webuploader-pick,
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading,
|
||||
@ -616,6 +640,7 @@
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .webuploader-pick-hover,
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading:hover,
|
||||
@ -624,45 +649,48 @@
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused{
|
||||
#upload .statusBar .btns .uploadBtn.state-paused {
|
||||
background: #00b7ee;
|
||||
color: #fff;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover{
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover {
|
||||
background: #00a2d4;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn.disabled {
|
||||
pointer-events: none;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
filter: alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
-khtml-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 图片管理样式 */
|
||||
#online {
|
||||
width: 100%;
|
||||
height: 336px;
|
||||
padding: 10px 0 0 0;
|
||||
}
|
||||
#online #imageList{
|
||||
|
||||
#online #imageList {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#online ul {
|
||||
display: block;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#online li {
|
||||
float: left;
|
||||
display: block;
|
||||
@ -677,18 +705,21 @@
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#online li.clearFloat {
|
||||
float: none;
|
||||
clear: both;
|
||||
display: block;
|
||||
width:0;
|
||||
height:0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#online li img {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#online li .icon {
|
||||
cursor: pointer;
|
||||
width: 113px;
|
||||
@ -700,16 +731,19 @@
|
||||
border: 0;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#online li .icon:hover {
|
||||
width: 107px;
|
||||
height: 107px;
|
||||
border: 3px solid #1094fa;
|
||||
}
|
||||
|
||||
#online li.selected .icon {
|
||||
background-image: url(images/success.png);
|
||||
background-image: url(images/success.gif)\9;
|
||||
background-image: url(images/success.gif) \9;
|
||||
background-position: 75px 75px;
|
||||
}
|
||||
|
||||
#online li.selected .icon:hover {
|
||||
width: 107px;
|
||||
height: 107px;
|
||||
|
@ -3,21 +3,21 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ueditor图片对话框</title>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
|
||||
<!-- jquery -->
|
||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.js?20220503"></script>
|
||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.js?628072e7"></script>
|
||||
|
||||
<!-- webuploader -->
|
||||
<script src="../../third-party/webuploader/webuploader.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css?20220503">
|
||||
<script src="../../third-party/webuploader/webuploader.js?21e72664"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css?0057c5c7">
|
||||
|
||||
<!-- image dialog -->
|
||||
<link rel="stylesheet" href="image.css?20220503" type="text/css" />
|
||||
<link rel="stylesheet" href="image.css?fc461d7b" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="wrapper">
|
||||
<div id="tabhead" class="tabhead">
|
||||
<span class="tab focus" data-content-id="remote"><var id="lang_tab_remote"></var></span>
|
||||
<span style="display:none;" class="tab" data-content-id="upload"><var id="lang_tab_upload"></var></span>
|
||||
@ -47,7 +47,8 @@
|
||||
<div class="left">
|
||||
<div class="row">
|
||||
<label><var id="lang_input_size"></var></label>
|
||||
<span><var id="lang_input_width"> </var><input class="text" type="text" id="width"/>px </span>
|
||||
<span><var id="lang_input_width"> </var><input class="text" type="text"
|
||||
id="width"/>px </span>
|
||||
<span><var id="lang_input_height"> </var><input class="text" type="text" id="height"/>px </span>
|
||||
<span><input id="lock" type="checkbox" disabled="disabled"><span id="lockicon"></span></span>
|
||||
</div>
|
||||
@ -64,7 +65,9 @@
|
||||
<span><input class="text" type="text" id="title"/></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right"><div id="preview"></div></div>
|
||||
<div class="right">
|
||||
<div id="preview"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 上传图片 -->
|
||||
@ -74,7 +77,8 @@
|
||||
<div class="progress">
|
||||
<span class="text">0%</span>
|
||||
<span class="percentage"></span>
|
||||
</div><div class="info"></div>
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="btns">
|
||||
<div id="filePickerBtn"></div>
|
||||
<div class="uploadBtn"><var id="lang_start_upload"></var></div>
|
||||
@ -99,21 +103,23 @@
|
||||
<!-- 搜索图片 -->
|
||||
<div id="search" class="panel">
|
||||
<div class="searchBar">
|
||||
<input id="searchTxt" class="searchTxt text" type="text" />
|
||||
<input id="searchTxt" class="searchTxt text" type="text"/>
|
||||
<select id="searchType" class="searchType">
|
||||
<option value="&s=4&z=0"></option>
|
||||
<option value="&s=1&z=19"></option>
|
||||
<option value="&s=2&z=0"></option>
|
||||
<option value="&s=3&z=0"></option>
|
||||
</select>
|
||||
<input id="searchReset" type="button" />
|
||||
<input id="searchBtn" type="button" />
|
||||
<input id="searchReset" type="button"/>
|
||||
<input id="searchBtn" type="button"/>
|
||||
</div>
|
||||
<div id="searchList" class="searchList">
|
||||
<ul id="searchListUl"></ul>
|
||||
</div>
|
||||
<div id="searchList" class="searchList"><ul id="searchListUl"></ul></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="image.js?20220503"></script>
|
||||
</div>
|
||||
<script type="text/javascript" src="image.js?6a7f39bf"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -27,26 +27,26 @@
|
||||
setTabFocus(target.getAttribute('data-content-id'));
|
||||
});
|
||||
}
|
||||
if(!editorOpt.disableUpload){
|
||||
if (!editorOpt.disableUpload) {
|
||||
$G('tabhead').querySelector('[data-content-id="upload"]').style.display = 'inline-block';
|
||||
}
|
||||
if(!editorOpt.disableOnline){
|
||||
if (!editorOpt.disableOnline) {
|
||||
$G('tabhead').querySelector('[data-content-id="online"]').style.display = 'inline-block';
|
||||
}
|
||||
if(!!editorOpt.selectCallback){
|
||||
if (!!editorOpt.selectCallback) {
|
||||
$G('imageSelect').style.display = 'inline-block';
|
||||
domUtils.on($G('imageSelect'), "click", function (e) {
|
||||
editorOpt.selectCallback(editor,function(info){
|
||||
if(info){
|
||||
editorOpt.selectCallback(editor, function (info) {
|
||||
if (info) {
|
||||
$G('url').value = info.path;
|
||||
$G('title').value = info.name;
|
||||
var img = new Image();
|
||||
img.onload = function(){
|
||||
img.onload = function () {
|
||||
$G('width').value = img.width;
|
||||
$G('height').value = img.height;
|
||||
remoteImage.setPreview();
|
||||
};
|
||||
img.onerror = function(){
|
||||
img.onerror = function () {
|
||||
remoteImage.setPreview();
|
||||
};
|
||||
img.src = info.path;
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
/* 初始化tabbody */
|
||||
function setTabFocus(id) {
|
||||
if(!id) return;
|
||||
if (!id) return;
|
||||
var i, bodyId, tabs = $G('tabhead').children;
|
||||
for (i = 0; i < tabs.length; i++) {
|
||||
bodyId = tabs[i].getAttribute('data-content-id');
|
||||
@ -121,7 +121,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
if(list) {
|
||||
if (list) {
|
||||
editor.execCommand('insertimage', list);
|
||||
remote && editor.fireEvent("catchRemoteImage");
|
||||
}
|
||||
@ -130,22 +130,22 @@
|
||||
|
||||
|
||||
/* 初始化对其方式的点击事件 */
|
||||
function initAlign(){
|
||||
function initAlign() {
|
||||
/* 点击align图标 */
|
||||
domUtils.on($G("alignIcon"), 'click', function(e){
|
||||
domUtils.on($G("alignIcon"), 'click', function (e) {
|
||||
var target = e.target || e.srcElement;
|
||||
if(target.className && target.className.indexOf('-align') != -1) {
|
||||
if (target.className && target.className.indexOf('-align') != -1) {
|
||||
setAlign(target.getAttribute('data-align'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* 设置对齐方式 */
|
||||
function setAlign(align){
|
||||
function setAlign(align) {
|
||||
align = align || 'none';
|
||||
var aligns = $G("alignIcon").children;
|
||||
for(i = 0; i < aligns.length; i++){
|
||||
if(aligns[i].getAttribute('data-align') == align) {
|
||||
for (i = 0; i < aligns.length; i++) {
|
||||
if (aligns[i].getAttribute('data-align') == align) {
|
||||
domUtils.addClass(aligns[i], 'focus');
|
||||
$G("align").value = aligns[i].getAttribute('data-align');
|
||||
} else {
|
||||
@ -153,10 +153,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 获取对齐方式 */
|
||||
function getAlign(){
|
||||
function getAlign() {
|
||||
var align = $G("align").value || 'none';
|
||||
return align == 'none' ? '':align;
|
||||
return align == 'none' ? '' : align;
|
||||
}
|
||||
|
||||
|
||||
@ -165,6 +166,7 @@
|
||||
this.container = utils.isString(target) ? document.getElementById(target) : target;
|
||||
this.init();
|
||||
}
|
||||
|
||||
RemoteImage.prototype = {
|
||||
init: function () {
|
||||
this.initContainer();
|
||||
@ -194,38 +196,38 @@
|
||||
domUtils.on($G("border"), 'keyup', updatePreview);
|
||||
domUtils.on($G("title"), 'keyup', updatePreview);
|
||||
|
||||
domUtils.on($G("width"), 'keyup', function(){
|
||||
if(locker.checked) {
|
||||
var proportion =locker.getAttribute('data-proportion');
|
||||
domUtils.on($G("width"), 'keyup', function () {
|
||||
if (locker.checked) {
|
||||
var proportion = locker.getAttribute('data-proportion');
|
||||
$G('height').value = Math.round(this.value / proportion);
|
||||
} else {
|
||||
_this.updateLocker();
|
||||
}
|
||||
updatePreview();
|
||||
});
|
||||
domUtils.on($G("height"), 'keyup', function(){
|
||||
if(locker.checked) {
|
||||
var proportion =locker.getAttribute('data-proportion');
|
||||
domUtils.on($G("height"), 'keyup', function () {
|
||||
if (locker.checked) {
|
||||
var proportion = locker.getAttribute('data-proportion');
|
||||
$G('width').value = Math.round(this.value * proportion);
|
||||
} else {
|
||||
_this.updateLocker();
|
||||
}
|
||||
updatePreview();
|
||||
});
|
||||
domUtils.on($G("lock"), 'change', function(){
|
||||
var proportion = parseInt($G("width").value) /parseInt($G("height").value);
|
||||
domUtils.on($G("lock"), 'change', function () {
|
||||
var proportion = parseInt($G("width").value) / parseInt($G("height").value);
|
||||
locker.setAttribute('data-proportion', proportion);
|
||||
});
|
||||
|
||||
function updatePreview(){
|
||||
function updatePreview() {
|
||||
_this.setPreview();
|
||||
}
|
||||
},
|
||||
updateLocker: function(){
|
||||
updateLocker: function () {
|
||||
var width = $G('width').value,
|
||||
height = $G('height').value,
|
||||
locker = $G('lock');
|
||||
if(width && height && width == parseInt(width) && height == parseInt(height)) {
|
||||
if (width && height && width == parseInt(width) && height == parseInt(height)) {
|
||||
locker.disabled = false;
|
||||
locker.title = '';
|
||||
} else {
|
||||
@ -234,7 +236,7 @@
|
||||
locker.title = lang.remoteLockError;
|
||||
}
|
||||
},
|
||||
setImage: function(img){
|
||||
setImage: function (img) {
|
||||
/* 不是正常的图片 */
|
||||
if (!img.tagName || img.tagName.toLowerCase() != 'img' && !img.getAttribute("src") || !img.src) return;
|
||||
|
||||
@ -244,7 +246,7 @@
|
||||
|
||||
/* 防止onchange事件循环调用 */
|
||||
if (src !== $G("url").value) $G("url").value = src;
|
||||
if(src) {
|
||||
if (src) {
|
||||
/* 设置表单内容 */
|
||||
$G("width").value = img.width || '';
|
||||
$G("height").value = img.height || '';
|
||||
@ -256,14 +258,14 @@
|
||||
this.updateLocker();
|
||||
}
|
||||
},
|
||||
getData: function(){
|
||||
getData: function () {
|
||||
var data = {};
|
||||
for(var k in this.dom){
|
||||
for (var k in this.dom) {
|
||||
data[k] = this.dom[k].value;
|
||||
}
|
||||
return data;
|
||||
},
|
||||
setPreview: function(){
|
||||
setPreview: function () {
|
||||
var url = $G('url').value,
|
||||
ow = $G('width').value,
|
||||
oh = $G('height').value,
|
||||
@ -273,58 +275,58 @@
|
||||
width,
|
||||
height;
|
||||
|
||||
width = ((!ow || !oh) ? preview.offsetWidth:Math.min(ow, preview.offsetWidth));
|
||||
width = width+(border*2) > preview.offsetWidth ? width:(preview.offsetWidth - (border*2));
|
||||
height = (!ow || !oh) ? '':width*oh/ow;
|
||||
width = ((!ow || !oh) ? preview.offsetWidth : Math.min(ow, preview.offsetWidth));
|
||||
width = width + (border * 2) > preview.offsetWidth ? width : (preview.offsetWidth - (border * 2));
|
||||
height = (!ow || !oh) ? '' : width * oh / ow;
|
||||
|
||||
if(url) {
|
||||
if (url) {
|
||||
preview.innerHTML = '<img src="' + url + '" width="' + width + '" height="' + height + '" border="' + border + 'px solid #000" title="' + title + '" />';
|
||||
}
|
||||
},
|
||||
getInsertList: function () {
|
||||
var data = this.getData();
|
||||
if(data['url']) {
|
||||
if (data['url']) {
|
||||
var img = {
|
||||
src: data['url'],
|
||||
_src: data['url'],
|
||||
}
|
||||
img._propertyDelete = []
|
||||
img.style = []
|
||||
if(data['width']){
|
||||
if (data['width']) {
|
||||
img.width = data['width'];
|
||||
img.style.push('width:'+data['width']+'px');
|
||||
}else{
|
||||
img.style.push('width:' + data['width'] + 'px');
|
||||
} else {
|
||||
img._propertyDelete.push('width');
|
||||
}
|
||||
if(data['height']){
|
||||
if (data['height']) {
|
||||
img.height = data['height'];
|
||||
img.style.push('height:'+data['height']+'px');
|
||||
}else{
|
||||
img.style.push('height:' + data['height'] + 'px');
|
||||
} else {
|
||||
img._propertyDelete.push('height');
|
||||
}
|
||||
if(data['border']){
|
||||
if (data['border']) {
|
||||
img.border = data['border'];
|
||||
}else{
|
||||
} else {
|
||||
img._propertyDelete.push('border');
|
||||
}
|
||||
if(data['align']){
|
||||
if (data['align']) {
|
||||
img.floatStyle = data['align'];
|
||||
}else{
|
||||
} else {
|
||||
img._propertyDelete.push('floatStyle');
|
||||
}
|
||||
if(data['vhSpace']){
|
||||
if (data['vhSpace']) {
|
||||
img.vspace = data['vhSpace'];
|
||||
}else{
|
||||
} else {
|
||||
img._propertyDelete.push('vspace');
|
||||
}
|
||||
if(data['title']){
|
||||
if (data['title']) {
|
||||
img.alt = data['title'];
|
||||
}else{
|
||||
} else {
|
||||
img._propertyDelete.push('alt');
|
||||
}
|
||||
if(img.style.length> 0){
|
||||
if (img.style.length > 0) {
|
||||
img.style = img.style.join(';');
|
||||
}else{
|
||||
} else {
|
||||
img._propertyDelete.push('style');
|
||||
}
|
||||
return [img];
|
||||
@ -335,12 +337,12 @@
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* 上传图片 */
|
||||
function UploadImage(target) {
|
||||
this.$wrap = target.constructor == String ? $('#' + target) : $(target);
|
||||
this.init();
|
||||
}
|
||||
|
||||
UploadImage.prototype = {
|
||||
init: function () {
|
||||
this.imageList = [];
|
||||
@ -409,7 +411,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
uploader = _this.uploader = WebUploader.create({
|
||||
var uploaderOption = {
|
||||
pick: {
|
||||
id: '#filePickerReady',
|
||||
label: lang.uploadSelectFile
|
||||
@ -425,19 +427,32 @@
|
||||
duplicate: true,
|
||||
fileSingleSizeLimit: imageMaxSize, // 默认 2 M
|
||||
threads: 1,
|
||||
headers: editor.getOpt('serverHeaders') || {},
|
||||
compress: editor.getOpt('imageCompressEnable') ? {
|
||||
width: imageCompressBorder,
|
||||
height: imageCompressBorder,
|
||||
// 图片质量,只有type为`image/jpeg`的时候才有效。
|
||||
quality: 90,
|
||||
// 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false.
|
||||
allowMagnify: false,
|
||||
// 是否允许裁剪。
|
||||
crop: false,
|
||||
// 是否保留头部meta信息。
|
||||
preserveHeaders: true
|
||||
}:false
|
||||
enable: editor.getOpt('imageCompressEnable'),
|
||||
maxWidthOrHeight: imageCompressBorder,
|
||||
maxSize: imageMaxSize,
|
||||
} : false
|
||||
};
|
||||
if(editor.getOpt('uploadServiceEnable')) {
|
||||
uploaderOption.customUpload = function (file, callback) {
|
||||
editor.getOpt('uploadServiceUpload')('image', file, {
|
||||
success: function( res ) {
|
||||
callback.onSuccess(file, {_raw:JSON.stringify(res)});
|
||||
},
|
||||
error: function( err ) {
|
||||
callback.onError(file, err);
|
||||
},
|
||||
progress: function( percent ) {
|
||||
callback.onProgress(file, percent);
|
||||
}
|
||||
}, {
|
||||
from: 'image'
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
uploader = _this.uploader = WebUploader.create(uploaderOption);
|
||||
uploader.addButton({
|
||||
id: '#filePickerBlock'
|
||||
});
|
||||
@ -504,7 +519,7 @@
|
||||
}
|
||||
}, thumbnailWidth, thumbnailHeight);
|
||||
}
|
||||
percentages[ file.id ] = [ file.size, 0 ];
|
||||
percentages[file.id] = [file.size, 0];
|
||||
file.rotation = 0;
|
||||
|
||||
/* 检查文件格式 */
|
||||
@ -524,11 +539,11 @@
|
||||
// 成功
|
||||
if (cur === 'error' || cur === 'invalid') {
|
||||
showError(file.statusText);
|
||||
percentages[ file.id ][ 1 ] = 1;
|
||||
percentages[file.id][1] = 1;
|
||||
} else if (cur === 'interrupt') {
|
||||
showError('interrupt');
|
||||
} else if (cur === 'queued') {
|
||||
percentages[ file.id ][ 1 ] = 0;
|
||||
percentages[file.id][1] = 0;
|
||||
} else if (cur === 'progress') {
|
||||
$info.hide();
|
||||
$prgress.css('display', 'block');
|
||||
@ -581,7 +596,7 @@
|
||||
// 负责view的销毁
|
||||
function removeFile(file) {
|
||||
var $li = $('#' + file.id);
|
||||
delete percentages[ file.id ];
|
||||
delete percentages[file.id];
|
||||
updateTotalProgress();
|
||||
$li.off().find('.file-panel').off().end().remove();
|
||||
}
|
||||
@ -593,8 +608,8 @@
|
||||
percent;
|
||||
|
||||
$.each(percentages, function (k, v) {
|
||||
total += v[ 0 ];
|
||||
loaded += v[ 0 ] * v[ 1 ];
|
||||
total += v[0];
|
||||
loaded += v[0] * v[1];
|
||||
});
|
||||
|
||||
percent = total ? loaded / total : 0;
|
||||
@ -606,7 +621,7 @@
|
||||
|
||||
function setState(val, files) {
|
||||
|
||||
if (val != state) {
|
||||
if (val !== state) {
|
||||
|
||||
var stats = uploader.getStats();
|
||||
|
||||
@ -620,7 +635,8 @@
|
||||
$queue.addClass('element-invisible');
|
||||
$statusBar.addClass('element-invisible');
|
||||
$placeHolder.removeClass('element-invisible');
|
||||
$progress.hide(); $info.hide();
|
||||
$progress.hide();
|
||||
$info.hide();
|
||||
uploader.refresh();
|
||||
break;
|
||||
|
||||
@ -629,25 +645,29 @@
|
||||
$placeHolder.addClass('element-invisible');
|
||||
$queue.removeClass('element-invisible');
|
||||
$statusBar.removeClass('element-invisible');
|
||||
$progress.hide(); $info.show();
|
||||
$progress.hide();
|
||||
$info.show();
|
||||
$upload.text(lang.uploadStart);
|
||||
uploader.refresh();
|
||||
break;
|
||||
|
||||
/* 上传中 */
|
||||
case 'uploading':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadPause);
|
||||
break;
|
||||
|
||||
/* 暂停上传 */
|
||||
case 'paused':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadContinue);
|
||||
break;
|
||||
|
||||
case 'confirm':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadStart);
|
||||
|
||||
stats = uploader.getStats();
|
||||
@ -658,7 +678,8 @@
|
||||
break;
|
||||
|
||||
case 'finish':
|
||||
$progress.hide(); $info.show();
|
||||
$progress.hide();
|
||||
$info.show();
|
||||
if (stats.uploadFailNum) {
|
||||
$upload.text(lang.uploadRetry);
|
||||
} else {
|
||||
@ -692,9 +713,7 @@
|
||||
}
|
||||
} else {
|
||||
stats = uploader.getStats();
|
||||
text = lang.updateStatusFinish.replace('_', fileCount).
|
||||
replace('_KB', WebUploader.formatSize(fileSize)).
|
||||
replace('_', stats.successNum);
|
||||
text = lang.updateStatusFinish.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)).replace('_', stats.successNum);
|
||||
|
||||
if (stats.uploadFailNum) {
|
||||
text += lang.updateStatusError.replace('_', stats.uploadFailNum);
|
||||
@ -741,7 +760,7 @@
|
||||
case 'startUpload':
|
||||
/* 添加额外的GET参数 */
|
||||
var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params);
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?' : '&') + 'encode=utf-8&' + params);
|
||||
uploader.option('server', url);
|
||||
setState('uploading', files);
|
||||
break;
|
||||
@ -763,7 +782,7 @@
|
||||
$percent = $li.find('.progress span');
|
||||
|
||||
$percent.css('width', percentage * 100 + '%');
|
||||
percentages[ file.id ][ 1 ] = percentage;
|
||||
percentages[file.id][1] = percentage;
|
||||
updateTotalProgress();
|
||||
});
|
||||
|
||||
@ -772,9 +791,15 @@
|
||||
try {
|
||||
var responseText = (ret._raw || ret),
|
||||
json = utils.str2json(responseText);
|
||||
json = editor.options.serverResponsePrepare(json);
|
||||
if (json.state == 'SUCCESS') {
|
||||
_this.imageList.push(json);
|
||||
$file.append('<span class="success"></span>');
|
||||
// 触发上传图片事件
|
||||
editor.fireEvent("uploadsuccess", {
|
||||
res: json,
|
||||
type: 'image'
|
||||
});
|
||||
} else {
|
||||
$file.find('.error').text(json.state).show();
|
||||
}
|
||||
@ -785,9 +810,11 @@
|
||||
|
||||
uploader.on('uploadError', function (file, code) {
|
||||
});
|
||||
uploader.on('error', function (code, file) {
|
||||
if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') {
|
||||
addFile(file);
|
||||
uploader.on('error', function (code, param1, param2) {
|
||||
if (code === 'F_EXCEED_SIZE') {
|
||||
editor.getOpt('tipError')(lang.errorExceedSize + ' ' + (param1 / 1024 / 1024).toFixed(1) + 'MB');
|
||||
} else {
|
||||
console.log('error', code, param1, param2);
|
||||
}
|
||||
});
|
||||
uploader.on('uploadComplete', function (file, ret) {
|
||||
@ -812,7 +839,7 @@
|
||||
},
|
||||
getQueueCount: function () {
|
||||
var file, i, status, readyFile = 0, files = this.uploader.getFiles();
|
||||
for (i = 0; file = files[i++]; ) {
|
||||
for (i = 0; file = files[i++];) {
|
||||
status = file.getStatus();
|
||||
if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
|
||||
}
|
||||
@ -844,6 +871,7 @@
|
||||
this.container = utils.isString(target) ? document.getElementById(target) : target;
|
||||
this.init();
|
||||
}
|
||||
|
||||
OnlineImage.prototype = {
|
||||
init: function () {
|
||||
this.reset();
|
||||
@ -866,7 +894,7 @@
|
||||
var _this = this;
|
||||
|
||||
/* 滚动拉取图片 */
|
||||
domUtils.on($G('imageList'), 'scroll', function(e){
|
||||
domUtils.on($G('imageList'), 'scroll', function (e) {
|
||||
var panel = this;
|
||||
if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
|
||||
_this.getImageData();
|
||||
@ -899,7 +927,7 @@
|
||||
this.getImageData();
|
||||
},
|
||||
/* 重置界面 */
|
||||
reset: function() {
|
||||
reset: function () {
|
||||
this.initContainer();
|
||||
this.initData();
|
||||
},
|
||||
@ -907,13 +935,14 @@
|
||||
getImageData: function () {
|
||||
var _this = this;
|
||||
|
||||
if(!_this.listEnd && !this.isLoadingData) {
|
||||
if (!_this.listEnd && !this.isLoadingData) {
|
||||
this.isLoadingData = true;
|
||||
var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')),
|
||||
isJsonp = utils.isCrossDomainUrl(url);
|
||||
ajax.request(url, {
|
||||
'timeout': 100000,
|
||||
'dataType': isJsonp ? 'jsonp':'',
|
||||
'dataType': isJsonp ? 'jsonp' : '',
|
||||
'headers': editor.options.serverHeaders || {},
|
||||
'data': utils.extend({
|
||||
start: this.listIndex,
|
||||
size: this.listSize
|
||||
@ -921,17 +950,18 @@
|
||||
'method': 'get',
|
||||
'onsuccess': function (r) {
|
||||
try {
|
||||
var json = isJsonp ? r:eval('(' + r.responseText + ')');
|
||||
if (json.state == 'SUCCESS') {
|
||||
var json = isJsonp ? r : eval('(' + r.responseText + ')');
|
||||
json = editor.options.serverResponsePrepare(json);
|
||||
if (json.state === 'SUCCESS') {
|
||||
_this.pushData(json.list);
|
||||
_this.listIndex = parseInt(json.start) + parseInt(json.list.length);
|
||||
if(_this.listIndex >= json.total) {
|
||||
if (_this.listIndex >= json.total) {
|
||||
_this.listEnd = true;
|
||||
}
|
||||
_this.isLoadingData = false;
|
||||
}
|
||||
} catch (e) {
|
||||
if(r.responseText.indexOf('ue_separate_ue') != -1) {
|
||||
if (r.responseText.indexOf('ue_separate_ue') != -1) {
|
||||
var list = r.responseText.split(r.responseText);
|
||||
_this.pushData(list);
|
||||
_this.listIndex = parseInt(list.length);
|
||||
@ -951,18 +981,18 @@
|
||||
var i, item, img, icon, _this = this,
|
||||
urlPrefix = editor.getOpt('imageManagerUrlPrefix');
|
||||
for (i = 0; i < list.length; i++) {
|
||||
if(list[i] && list[i].url) {
|
||||
if (list[i] && list[i].url) {
|
||||
item = document.createElement('li');
|
||||
img = document.createElement('img');
|
||||
icon = document.createElement('span');
|
||||
|
||||
domUtils.on(img, 'load', (function(image){
|
||||
return function(){
|
||||
domUtils.on(img, 'load', (function (image) {
|
||||
return function () {
|
||||
_this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
|
||||
}
|
||||
})(img));
|
||||
img.width = 113;
|
||||
img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
|
||||
img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=' : '&noCache=') + (+new Date()).toString(36));
|
||||
img.setAttribute('_src', urlPrefix + list[i].url);
|
||||
domUtils.addClass(icon, 'icon');
|
||||
|
||||
|
@ -3,14 +3,42 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" href="../../themes/default/dialog.css?963f161c">
|
||||
<style type="text/css">
|
||||
.warp {width: 320px;height: 200px;margin-left:5px;padding: 20px 0 0 15px;position: relative;}
|
||||
#url {width: 290px; margin-bottom: 2px; margin-left: -6px; margin-left: -2px\9;*margin-left:0;_margin-left:0; }
|
||||
.format span{display: inline-block; width: 58px;text-align:left; zoom:1;}
|
||||
table td{padding:5px 0;}
|
||||
input[type="text"]{height:30px;border:1px solid #EEE;border-radius:3px;padding:0 5px;line-height:2px;outline:none;}
|
||||
#align{width: 65px;height: 23px;line-height: 22px;}
|
||||
.warp {
|
||||
width: 320px;
|
||||
height: 200px;
|
||||
margin-left: 5px;
|
||||
padding: 20px 0 0 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#url {
|
||||
width: 290px;
|
||||
margin-bottom: 2px;
|
||||
margin-left: -6px;
|
||||
margin-left: -2px \9;
|
||||
*margin-left: 0;
|
||||
_margin-left: 0;
|
||||
}
|
||||
|
||||
.format span {
|
||||
display: inline-block;
|
||||
width: 58px;
|
||||
text-align: left;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
table td {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
#align {
|
||||
width: 65px;
|
||||
height: 23px;
|
||||
line-height: 22px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -23,15 +51,21 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="format"><span><var id="lang_input_width"></var></span><input style="width:200px" type="text" id="width"/> px</td>
|
||||
<td colspan="2" class="format"><span><var id="lang_input_width"></var></span><input style="width:200px"
|
||||
type="text" id="width"/>
|
||||
px
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="format"><span><var id="lang_input_height"></var></span><input style="width:200px" type="text" id="height"/> px</td>
|
||||
<td colspan="2" class="format"><span><var id="lang_input_height"></var></span><input style="width:200px"
|
||||
type="text"
|
||||
id="height"/> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span><var id="lang_input_isScroll"></var></span><input type="checkbox" id="scroll"/> </td>
|
||||
<td><span><var id="lang_input_frameborder"></var></span><input type="checkbox" id="frameborder"/> </td>
|
||||
<td><span><var id="lang_input_isScroll"></var></span><input type="checkbox" id="scroll"/></td>
|
||||
<td><span><var id="lang_input_frameborder"></var></span><input type="checkbox" id="frameborder"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -47,16 +81,17 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var iframe = editor._iframe;
|
||||
if(iframe){
|
||||
$G("url").value = iframe.getAttribute("src")||"";
|
||||
$G("width").value = iframe.getAttribute("width")||iframe.style.width.replace("px","")||"";
|
||||
$G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px","") ||"";
|
||||
if (iframe) {
|
||||
$G("url").value = iframe.getAttribute("src") || "";
|
||||
$G("width").value = iframe.getAttribute("width") || iframe.style.width.replace("px", "") || "";
|
||||
$G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px", "") || "";
|
||||
$G("scroll").checked = (iframe.getAttribute("scrolling") == "yes") ? true : false;
|
||||
$G("frameborder").checked = (iframe.getAttribute("frameborder") == "1") ? true : false;
|
||||
$G("align").value = iframe.align ? iframe.align : "";
|
||||
}
|
||||
function queding(){
|
||||
var url = $G("url").value.replace(/^\s*|\s*$/ig,""),
|
||||
|
||||
function queding() {
|
||||
var url = $G("url").value.replace(/^\s*|\s*$/ig, ""),
|
||||
width = $G("width").value,
|
||||
height = $G("height").value,
|
||||
scroll = $G("scroll"),
|
||||
@ -64,35 +99,36 @@
|
||||
float = $G("align").value,
|
||||
newIframe = editor.document.createElement("iframe"),
|
||||
div;
|
||||
if(!url){
|
||||
if (!url) {
|
||||
alert(lang.enterAddress);
|
||||
return false;
|
||||
}
|
||||
newIframe.setAttribute("src",/http:\/\/|https:\/\//ig.test(url) ? url : "http://"+url);
|
||||
/^[1-9]+[.]?\d*$/g.test( width ) ? newIframe.setAttribute("width",width) : "";
|
||||
/^[1-9]+[.]?\d*$/g.test( height ) ? newIframe.setAttribute("height",height) : "";
|
||||
scroll.checked ? newIframe.setAttribute("scrolling","yes") : newIframe.setAttribute("scrolling","no");
|
||||
frameborder.checked ? newIframe.setAttribute("frameborder","1",0) : newIframe.setAttribute("frameborder","0",0);
|
||||
float ? newIframe.setAttribute("align",float) : newIframe.setAttribute("align","");
|
||||
if(iframe){
|
||||
iframe.parentNode.insertBefore(newIframe,iframe);
|
||||
newIframe.setAttribute("src", /http:\/\/|https:\/\//ig.test(url) ? url : "http://" + url);
|
||||
/^[1-9]+[.]?\d*$/g.test(width) ? newIframe.setAttribute("width", width) : "";
|
||||
/^[1-9]+[.]?\d*$/g.test(height) ? newIframe.setAttribute("height", height) : "";
|
||||
scroll.checked ? newIframe.setAttribute("scrolling", "yes") : newIframe.setAttribute("scrolling", "no");
|
||||
frameborder.checked ? newIframe.setAttribute("frameborder", "1", 0) : newIframe.setAttribute("frameborder", "0", 0);
|
||||
float ? newIframe.setAttribute("align", float) : newIframe.setAttribute("align", "");
|
||||
if (iframe) {
|
||||
iframe.parentNode.insertBefore(newIframe, iframe);
|
||||
domUtils.remove(iframe);
|
||||
}else{
|
||||
} else {
|
||||
div = editor.document.createElement("div");
|
||||
div.appendChild(newIframe);
|
||||
editor.execCommand("inserthtml",div.innerHTML);
|
||||
editor.execCommand("inserthtml", div.innerHTML);
|
||||
}
|
||||
editor._iframe = null;
|
||||
dialog.close();
|
||||
}
|
||||
|
||||
dialog.onok = queding;
|
||||
$G("url").onkeydown = function(evt){
|
||||
$G("url").onkeydown = function (evt) {
|
||||
evt = evt || event;
|
||||
if(evt.keyCode == 13){
|
||||
if (evt.keyCode == 13) {
|
||||
queding();
|
||||
}
|
||||
};
|
||||
$focus($G( "url" ));
|
||||
$focus($G("url"));
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
var parent = window.parent;
|
||||
//dialog对象
|
||||
dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )];
|
||||
dialog = parent.$EDITORUI[window.frameElement.id.replace(/_iframe$/, '')];
|
||||
//当前打开dialog的编辑器实例
|
||||
editor = dialog.editor;
|
||||
|
||||
@ -15,65 +15,65 @@
|
||||
|
||||
ajax = UE.ajax;
|
||||
|
||||
$G = function ( id ) {
|
||||
return document.getElementById( id )
|
||||
$G = function (id) {
|
||||
return document.getElementById(id)
|
||||
};
|
||||
//focus元素
|
||||
$focus = function ( node ) {
|
||||
setTimeout( function () {
|
||||
if ( browser.ie ) {
|
||||
$focus = function (node) {
|
||||
setTimeout(function () {
|
||||
if (browser.ie) {
|
||||
var r = node.createTextRange();
|
||||
r.collapse( false );
|
||||
r.collapse(false);
|
||||
r.select();
|
||||
} else {
|
||||
node.focus()
|
||||
}
|
||||
}, 0 )
|
||||
}, 0)
|
||||
};
|
||||
utils.loadFile(document,{
|
||||
href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(),
|
||||
tag:"link",
|
||||
type:"text/css",
|
||||
rel:"stylesheet"
|
||||
utils.loadFile(document, {
|
||||
href: editor.options.themePath + editor.options.theme + "/dialogbase.css?cache=" + Math.random(),
|
||||
tag: "link",
|
||||
type: "text/css",
|
||||
rel: "stylesheet"
|
||||
});
|
||||
lang = editor.getLang(dialog.className.split( "-" )[2]);
|
||||
if(lang){
|
||||
domUtils.on(window,'load',function () {
|
||||
lang = editor.getLang(dialog.className.split("-")[2]);
|
||||
if (lang) {
|
||||
domUtils.on(window, 'load', function () {
|
||||
|
||||
var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
|
||||
//针对静态资源
|
||||
for ( var i in lang["static"] ) {
|
||||
var dom = $G( i );
|
||||
if(!dom) continue;
|
||||
for (var i in lang["static"]) {
|
||||
var dom = $G(i);
|
||||
if (!dom) continue;
|
||||
var tagName = dom.tagName,
|
||||
content = lang["static"][i];
|
||||
if(content.src){
|
||||
if (content.src) {
|
||||
//clone
|
||||
content = utils.extend({},content,false);
|
||||
content = utils.extend({}, content, false);
|
||||
content.src = langImgPath + content.src;
|
||||
}
|
||||
if(content.style){
|
||||
content = utils.extend({},content,false);
|
||||
content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath)
|
||||
if (content.style) {
|
||||
content = utils.extend({}, content, false);
|
||||
content.style = content.style.replace(/url\s*\(/g, "url(" + langImgPath)
|
||||
}
|
||||
switch ( tagName.toLowerCase() ) {
|
||||
switch (tagName.toLowerCase()) {
|
||||
case "var":
|
||||
dom.parentNode.replaceChild( document.createTextNode( content ), dom );
|
||||
dom.parentNode.replaceChild(document.createTextNode(content), dom);
|
||||
break;
|
||||
case "select":
|
||||
var ops = dom.options;
|
||||
for ( var j = 0, oj; oj = ops[j]; ) {
|
||||
for (var j = 0, oj; oj = ops[j];) {
|
||||
oj.innerHTML = content.options[j++];
|
||||
}
|
||||
for ( var p in content ) {
|
||||
p != "options" && dom.setAttribute( p, content[p] );
|
||||
for (var p in content) {
|
||||
p != "options" && dom.setAttribute(p, content[p]);
|
||||
}
|
||||
break;
|
||||
default :
|
||||
domUtils.setAttributes( dom, content);
|
||||
domUtils.setAttributes(dom, content);
|
||||
}
|
||||
}
|
||||
} );
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,15 +4,35 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<style type="text/css">
|
||||
*{margin:0;padding:0;color: #838383;}
|
||||
table{font-size: 12px;margin: 10px;line-height:36px;width:100%;}
|
||||
.txt{box-sizing:border-box;width:90%;height:30px;line-height:30px;border:1px solid #d7d7d7;border-radius:3px;padding:0 5px;outline:none;}
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #838383;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 12px;
|
||||
margin: 10px;
|
||||
line-height: 36px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.txt {
|
||||
box-sizing: border-box;
|
||||
width: 90%;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border: 1px solid #d7d7d7;
|
||||
border-radius: 3px;
|
||||
padding: 0 5px;
|
||||
outline: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="padding:10px;">
|
||||
<div style="padding:10px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="text"> <var id="lang_input_text"></var></label></td>
|
||||
@ -20,7 +40,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="href"> <var id="lang_input_url"></var></label></td>
|
||||
<td><input class="txt" id="href" type="text" /></td>
|
||||
<td><input class="txt" id="href" type="text"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="title"> <var id="lang_input_title"></var></label></td>
|
||||
@ -36,92 +56,93 @@
|
||||
<td colspan="2" id="msg"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
editor.setOpt('allowLinkProtocols', ['http:', 'https:', '#', '/', 'ftp:', 'mailto:', 'tel:']);
|
||||
var allowLinkProtocols = editor.getOpt('allowLinkProtocols');
|
||||
|
||||
var range = editor.selection.getRange(),
|
||||
link = range.collapsed ? editor.queryCommandValue( "link" ) : editor.selection.getStart(),
|
||||
link = range.collapsed ? editor.queryCommandValue("link") : editor.selection.getStart(),
|
||||
url,
|
||||
text = $G('text'),
|
||||
rangeLink = domUtils.findParentByTagName(range.getCommonAncestor(),'a',true),
|
||||
rangeLink = domUtils.findParentByTagName(range.getCommonAncestor(), 'a', true),
|
||||
orgText;
|
||||
|
||||
link = domUtils.findParentByTagName( link, "a", true );
|
||||
link = domUtils.findParentByTagName(link, "a", true);
|
||||
|
||||
if(link){
|
||||
url = utils.html(link.getAttribute( '_href' ) || link.getAttribute( 'href', 2 ));
|
||||
if (link) {
|
||||
url = utils.html(link.getAttribute('_href') || link.getAttribute('href', 2));
|
||||
|
||||
if(rangeLink === link && !link.getElementsByTagName('img').length){
|
||||
if (rangeLink === link && !link.getElementsByTagName('img').length) {
|
||||
text.removeAttribute('disabled');
|
||||
orgText = text.value = link[browser.ie ? 'innerText':'textContent'];
|
||||
}else{
|
||||
text.setAttribute('disabled','true');
|
||||
orgText = text.value = link[browser.ie ? 'innerText' : 'textContent'];
|
||||
} else {
|
||||
text.setAttribute('disabled', 'true');
|
||||
text.value = lang.validLink;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(range.collapsed){
|
||||
} else {
|
||||
if (range.collapsed) {
|
||||
text.removeAttribute('disabled');
|
||||
text.value = '';
|
||||
}else{
|
||||
text.setAttribute('disabled','true');
|
||||
} else {
|
||||
text.setAttribute('disabled', 'true');
|
||||
text.value = lang.validLink;
|
||||
}
|
||||
|
||||
}
|
||||
$G("title").value = url ? link.title : "";
|
||||
$G("href").value = url ? url: '';
|
||||
$G("href").value = url ? url : '';
|
||||
$G("target").checked = url && link.target == "_blank" ? true : false;
|
||||
$focus($G("href"));
|
||||
|
||||
function handleDialogOk(){
|
||||
var href =$G('href').value.replace(/^\s+|\s+$/g, '');
|
||||
if(href){
|
||||
if(!hrefStartWith(href, allowLinkProtocols)) {
|
||||
function handleDialogOk() {
|
||||
var href = $G('href').value.replace(/^\s+|\s+$/g, '');
|
||||
if (href) {
|
||||
if (!hrefStartWith(href, allowLinkProtocols)) {
|
||||
href = "http://" + href;
|
||||
}
|
||||
var obj = {
|
||||
'href' : href,
|
||||
'target' : $G("target").checked ? "_blank" : '_self',
|
||||
'title' : $G("title").value.replace(/^\s+|\s+$/g, ''),
|
||||
'_href':href
|
||||
'href': href,
|
||||
'target': $G("target").checked ? "_blank" : '_self',
|
||||
'title': $G("title").value.replace(/^\s+|\s+$/g, ''),
|
||||
'_href': href
|
||||
};
|
||||
//修改链接内容的情况太特殊了,所以先做到这里了
|
||||
//todo:情况多的时候,做到command里
|
||||
if(orgText && text.value != orgText){
|
||||
if (orgText && text.value != orgText) {
|
||||
link[browser.ie ? 'innerText' : 'textContent'] = obj.textValue = text.value;
|
||||
range.selectNode(link).select()
|
||||
}
|
||||
if(range.collapsed){
|
||||
if (range.collapsed) {
|
||||
obj.textValue = text.value;
|
||||
}
|
||||
editor.execCommand('link',utils.clearEmptyAttrs(obj) );
|
||||
editor.execCommand('link', utils.clearEmptyAttrs(obj));
|
||||
dialog.close();
|
||||
}
|
||||
}
|
||||
|
||||
dialog.onok = handleDialogOk;
|
||||
$G('href').onkeydown = $G('title').onkeydown = function(evt){
|
||||
$G('href').onkeydown = $G('title').onkeydown = function (evt) {
|
||||
evt = evt || window.event;
|
||||
if (evt.keyCode == 13) {
|
||||
handleDialogOk();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
$G('href').onblur = function(){
|
||||
if(!hrefStartWith(this.value, allowLinkProtocols)){
|
||||
$G("msg").innerHTML = "<span style='color: red'>"+lang.httpPrompt+"</span>";
|
||||
}else{
|
||||
$G('href').onblur = function () {
|
||||
if (!hrefStartWith(this.value, allowLinkProtocols)) {
|
||||
$G("msg").innerHTML = "<span style='color: red'>" + lang.httpPrompt + "</span>";
|
||||
} else {
|
||||
$G("msg").innerHTML = "";
|
||||
}
|
||||
};
|
||||
|
||||
function hrefStartWith(href,arr){
|
||||
function hrefStartWith(href, arr) {
|
||||
href = href.replace(/^\s+|\s+$/g, '');
|
||||
for(var i=0,ai;ai=arr[i++];){
|
||||
if(href.indexOf(ai)==0){
|
||||
for (var i = 0, ai; ai = arr[i++];) {
|
||||
if (href.indexOf(ai) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1,40 +1,45 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<style>
|
||||
html,body{
|
||||
height:100%;
|
||||
width:100%;
|
||||
padding:0;
|
||||
margin:0;
|
||||
html, body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
#preview{
|
||||
width:100%;
|
||||
height:100%;
|
||||
padding:0;
|
||||
margin:0;
|
||||
}
|
||||
#preview *{font-family:sans-serif;font-size:16px;}
|
||||
</style>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script src="../../ueditor.parse.js?20220503"></script>
|
||||
<title></title>
|
||||
</head>
|
||||
<body class="view">
|
||||
<div id="preview" style="margin:8px">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
#preview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#preview * {
|
||||
font-family: sans-serif;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<script src="../../ueditor.parse.js?8e3d12c6"></script>
|
||||
<title></title>
|
||||
</head>
|
||||
<body class="view">
|
||||
<div id="preview" style="margin:8px">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
document.getElementById('preview').innerHTML = editor.getContent();
|
||||
uParse('#preview',{
|
||||
rootPath : '../../',
|
||||
chartContainerHeight:500
|
||||
uParse('#preview', {
|
||||
rootPath: '../../',
|
||||
chartContainerHeight: 500
|
||||
})
|
||||
dialog.oncancel = function(){
|
||||
dialog.oncancel = function () {
|
||||
document.getElementById('preview').innerHTML = '';
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
</html>
|
||||
|
@ -1,72 +1,324 @@
|
||||
/*common
|
||||
*/
|
||||
body{margin: 0;}
|
||||
table{width:100%;}
|
||||
table td{padding:2px 4px;vertical-align: middle;}
|
||||
a{text-decoration: none;}
|
||||
em{font-style: normal;}
|
||||
.border_style1{border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table td {
|
||||
padding: 2px 4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.border_style1 {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
box-shadow: 2px 2px 5px #d3d6da;
|
||||
}
|
||||
|
||||
/*module
|
||||
*/
|
||||
.main{margin: 8px;overflow: hidden;}
|
||||
.main {
|
||||
margin: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hot{float:left;height:335px;}
|
||||
.drawBoard{position: relative; cursor: crosshair;}
|
||||
.brushBorad{position: absolute;left:0;top:0;z-index: 998;}
|
||||
.picBoard{border: none;text-align: center;line-height: 300px;cursor: default;}
|
||||
.operateBar{margin-top:10px;font-size:12px;text-align: center;}
|
||||
.operateBar span{margin-left: 10px;}
|
||||
.hot {
|
||||
float: left;
|
||||
height: 335px;
|
||||
}
|
||||
|
||||
.drawToolbar{float:right;width:110px;height:300px;overflow: hidden;}
|
||||
.colorBar{margin-top:10px;font-size: 12px;text-align: center;}
|
||||
.colorBar a{display:block;width: 10px;height: 10px;border:1px solid #1006F1;border-radius: 3px; box-shadow:2px 2px 5px #d3d6da;opacity: 0.3}
|
||||
.sectionBar{margin-top:15px;font-size: 12px;text-align: center;}
|
||||
.sectionBar a{display:inline-block;width:10px;height:12px;color: #888;text-indent: -999px;opacity: 0.3}
|
||||
.size1{background: url('images/size.png') 1px center no-repeat ;}
|
||||
.size2{background: url('images/size.png') -10px center no-repeat;}
|
||||
.size3{background: url('images/size.png') -22px center no-repeat;}
|
||||
.size4{background: url('images/size.png') -35px center no-repeat;}
|
||||
.drawBoard {
|
||||
position: relative;
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.brushBorad {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
.picBoard {
|
||||
border: none;
|
||||
text-align: center;
|
||||
line-height: 300px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.operateBar {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.operateBar span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.drawToolbar {
|
||||
float: right;
|
||||
width: 110px;
|
||||
height: 300px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.colorBar {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.colorBar a {
|
||||
display: block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border: 1px solid #1006F1;
|
||||
border-radius: 3px;
|
||||
box-shadow: 2px 2px 5px #d3d6da;
|
||||
opacity: 0.3
|
||||
}
|
||||
|
||||
.sectionBar {
|
||||
margin-top: 15px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sectionBar a {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 12px;
|
||||
color: #888;
|
||||
text-indent: -999px;
|
||||
opacity: 0.3
|
||||
}
|
||||
|
||||
.size1 {
|
||||
background: url('images/size.png') 1px center no-repeat;
|
||||
}
|
||||
|
||||
.size2 {
|
||||
background: url('images/size.png') -10px center no-repeat;
|
||||
}
|
||||
|
||||
.size3 {
|
||||
background: url('images/size.png') -22px center no-repeat;
|
||||
}
|
||||
|
||||
.size4 {
|
||||
background: url('images/size.png') -35px center no-repeat;
|
||||
}
|
||||
|
||||
.addImgH {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.addImgH_form {
|
||||
position: absolute;
|
||||
left: 18px;
|
||||
top: -1px;
|
||||
width: 75px;
|
||||
height: 21px;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.addImgH_form input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.addImgH{position: relative;}
|
||||
.addImgH_form{position: absolute;left: 18px;top: -1px;width: 75px;height: 21px;opacity: 0;cursor: pointer;}
|
||||
.addImgH_form input{width: 100%;}
|
||||
/*scrawl遮罩层
|
||||
*/
|
||||
.maskLayerNull{display: none;}
|
||||
.maskLayer{position: absolute;top:0;left:0;width: 100%; height: 100%;opacity: 0.7;
|
||||
background-color: #fff;text-align:center;font-weight:bold;line-height:300px;z-index: 1000;}
|
||||
.maskLayerNull {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.maskLayer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.7;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
line-height: 300px;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
/*btn state
|
||||
*/
|
||||
.previousStepH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/undoH.png');cursor: pointer;}
|
||||
.previousStepH .text{color:#888;cursor:pointer;}
|
||||
.previousStep .icon{display: inline-block;width:16px;height:16px;background-image: url('images/undo.png');cursor:default;}
|
||||
.previousStep .text{color:#ccc;cursor:default;}
|
||||
.previousStepH .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/undoH.png');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nextStepH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/redoH.png');cursor: pointer;}
|
||||
.nextStepH .text{color:#888;cursor:pointer;}
|
||||
.nextStep .icon{display: inline-block;width:16px;height:16px;background-image: url('images/redo.png');cursor:default;}
|
||||
.nextStep .text{color:#ccc;cursor:default;}
|
||||
.previousStepH .text {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clearBoardH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/emptyH.png');cursor: pointer;}
|
||||
.clearBoardH .text{color:#888;cursor:pointer;}
|
||||
.clearBoard .icon{display: inline-block;width:16px;height:16px;background-image: url('images/empty.png');cursor:default;}
|
||||
.clearBoard .text{color:#ccc;cursor:default;}
|
||||
.previousStep .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/undo.png');
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.scaleBoardH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/scaleH.png');cursor: pointer;}
|
||||
.scaleBoardH .text{color:#888;cursor:pointer;}
|
||||
.scaleBoard .icon{display: inline-block;width:16px;height:16px;background-image: url('images/scale.png');cursor:default;}
|
||||
.scaleBoard .text{color:#ccc;cursor:default;}
|
||||
.previousStep .text {
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.removeImgH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/delimgH.png');cursor: pointer;}
|
||||
.removeImgH .text{color:#888;cursor:pointer;}
|
||||
.removeImg .icon{display: inline-block;width:16px;height:16px;background-image: url('images/delimg.png');cursor:default;}
|
||||
.removeImg .text{color:#ccc;cursor:default;}
|
||||
.nextStepH .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/redoH.png');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nextStepH .text {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nextStep .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/redo.png');
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.nextStep .text {
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.clearBoardH .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/emptyH.png');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clearBoardH .text {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clearBoard .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/empty.png');
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.clearBoard .text {
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.scaleBoardH .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/scaleH.png');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.scaleBoardH .text {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.scaleBoard .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/scale.png');
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.scaleBoard .text {
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.removeImgH .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/delimgH.png');
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.removeImgH .text {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.removeImg .icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/delimg.png');
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.removeImg .text {
|
||||
color: #ccc;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.addImgH .icon {
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/addimg.png')
|
||||
}
|
||||
|
||||
.addImgH .text {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.addImgH .icon{vertical-align:top;display: inline-block;width:16px;height:16px;background-image: url('images/addimg.png')}
|
||||
.addImgH .text{color:#888;cursor:pointer;}
|
||||
/*icon
|
||||
*/
|
||||
.brushIcon{display: inline-block;width:16px;height:16px;background-image: url('images/brush.png')}
|
||||
.eraserIcon{display: inline-block;width:16px;height:16px;background-image: url('images/eraser.png')}
|
||||
.brushIcon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/brush.png')
|
||||
}
|
||||
|
||||
.eraserIcon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url('images/eraser.png')
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta name="robots" content="noindex, nofollow"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="scrawl.css?20220503">
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" type="text/css" href="scrawl.css?5bdd07f3">
|
||||
</head>
|
||||
<body>
|
||||
<div class="main" id="J_wrap">
|
||||
@ -70,21 +70,21 @@
|
||||
</div>
|
||||
<div id="J_maskLayer" class="maskLayerNull"></div>
|
||||
|
||||
<script type="text/javascript" src="scrawl.js?20220503"></script>
|
||||
<script type="text/javascript" src="scrawl.js?e3d28a2b"></script>
|
||||
<script type="text/javascript">
|
||||
var settings = {
|
||||
drawBrushSize:3, //画笔初始大小
|
||||
drawBrushColor:"#4bacc6", //画笔初始颜色
|
||||
colorList:['c00000', 'ff0000', 'ffc000', 'ffff00', '92d050', '00b050', '00b0f0', '0070c0', '002060', '7030a0', 'ffffff',
|
||||
drawBrushSize: 3, //画笔初始大小
|
||||
drawBrushColor: "#4bacc6", //画笔初始颜色
|
||||
colorList: ['c00000', 'ff0000', 'ffc000', 'ffff00', '92d050', '00b050', '00b0f0', '0070c0', '002060', '7030a0', 'ffffff',
|
||||
'000000', 'eeece1', '1f497d', '4f81bd', 'c0504d', '9bbb59', '8064a2', '4bacc6', 'f79646'], //画笔选择颜色
|
||||
saveNum:10 //撤销次数
|
||||
saveNum: 10 //撤销次数
|
||||
};
|
||||
|
||||
var scrawlObj = new scrawl( settings );
|
||||
var scrawlObj = new scrawl(settings);
|
||||
scrawlObj.isCancelScrawl = false;
|
||||
|
||||
dialog.onok = function () {
|
||||
exec( scrawlObj );
|
||||
exec(scrawlObj);
|
||||
return false;
|
||||
};
|
||||
dialog.oncancel = function () {
|
||||
|
@ -15,11 +15,11 @@ var scrawl = function (options) {
|
||||
drawStepIndex = 0; //undo redo指针
|
||||
|
||||
scrawl.prototype = {
|
||||
isScrawl:false, //是否涂鸦
|
||||
brushWidth:-1, //画笔粗细
|
||||
brushColor:"", //画笔颜色
|
||||
isScrawl: false, //是否涂鸦
|
||||
brushWidth: -1, //画笔粗细
|
||||
brushColor: "", //画笔颜色
|
||||
|
||||
initOptions:function (options) {
|
||||
initOptions: function (options) {
|
||||
var me = this;
|
||||
me.originalState(options);//初始页面状态
|
||||
me._buildToolbarColor(options.colorList);//动态生成颜色选择集合
|
||||
@ -39,7 +39,7 @@ var scrawl = function (options) {
|
||||
me._clearSelection();//清楚选中状态
|
||||
},
|
||||
|
||||
originalState:function (options) {
|
||||
originalState: function (options) {
|
||||
var me = this;
|
||||
|
||||
me.brushWidth = options.drawBrushSize;//同步画笔粗细
|
||||
@ -51,7 +51,7 @@ var scrawl = function (options) {
|
||||
context.lineCap = "round";//去除锯齿
|
||||
context.fill();
|
||||
},
|
||||
_buildToolbarColor:function (colorList) {
|
||||
_buildToolbarColor: function (colorList) {
|
||||
var tmp = null, arr = [];
|
||||
arr.push("<table id='J_colorList'>");
|
||||
for (var i = 0, color; color = colorList[i++];) {
|
||||
@ -68,7 +68,7 @@ var scrawl = function (options) {
|
||||
$G("J_colorBar").innerHTML = arr.join("");
|
||||
},
|
||||
|
||||
_addBoardListener:function (saveNum) {
|
||||
_addBoardListener: function (saveNum) {
|
||||
var me = this,
|
||||
margin = 0,
|
||||
startX = -1,
|
||||
@ -121,7 +121,7 @@ var scrawl = function (options) {
|
||||
break;
|
||||
case 'mouseup':
|
||||
buttonPress = 0;
|
||||
if (!isMouseDown)return;
|
||||
if (!isMouseDown) return;
|
||||
if (!isMouseMove) {
|
||||
context.arc(startX, startY, context.lineWidth, 0, Math.PI * 2, false);
|
||||
context.fillStyle = context.strokeStyle;
|
||||
@ -144,7 +144,7 @@ var scrawl = function (options) {
|
||||
}
|
||||
});
|
||||
},
|
||||
_addOPerateListener:function (saveNum) {
|
||||
_addOPerateListener: function (saveNum) {
|
||||
var me = this;
|
||||
domUtils.on($G("J_previousStep"), "click", function () {
|
||||
if (drawStepIndex > 1) {
|
||||
@ -175,7 +175,7 @@ var scrawl = function (options) {
|
||||
me.btn2disable("J_clearBoard");
|
||||
});
|
||||
},
|
||||
_addColorBarListener:function () {
|
||||
_addColorBarListener: function () {
|
||||
var me = this;
|
||||
domUtils.on($G("J_colorBar"), "click", function (e) {
|
||||
var target = me.getTarget(e),
|
||||
@ -190,7 +190,7 @@ var scrawl = function (options) {
|
||||
}
|
||||
});
|
||||
},
|
||||
_addBrushBarListener:function () {
|
||||
_addBrushBarListener: function () {
|
||||
var me = this;
|
||||
domUtils.on($G("J_brushBar"), "click", function (e) {
|
||||
var target = me.getTarget(e),
|
||||
@ -205,7 +205,7 @@ var scrawl = function (options) {
|
||||
}
|
||||
});
|
||||
},
|
||||
_addEraserBarListener:function () {
|
||||
_addEraserBarListener: function () {
|
||||
var me = this;
|
||||
domUtils.on($G("J_eraserBar"), "click", function (e) {
|
||||
var target = me.getTarget(e),
|
||||
@ -219,7 +219,7 @@ var scrawl = function (options) {
|
||||
}
|
||||
});
|
||||
},
|
||||
_addAddImgListener:function () {
|
||||
_addAddImgListener: function () {
|
||||
var file = $G("J_imgTxt");
|
||||
if (!window.FileReader) {
|
||||
$G("J_addImg").style.display = 'none';
|
||||
@ -232,7 +232,7 @@ var scrawl = function (options) {
|
||||
|
||||
var target = e.target || e.srcElement,
|
||||
reader = new FileReader();
|
||||
reader.onload = function(evt){
|
||||
reader.onload = function (evt) {
|
||||
var target = evt.target || evt.srcElement;
|
||||
ue_callback(target.result, 'SUCCESS');
|
||||
};
|
||||
@ -240,7 +240,7 @@ var scrawl = function (options) {
|
||||
frm.reset();
|
||||
});
|
||||
},
|
||||
_addRemoveImgListenter:function () {
|
||||
_addRemoveImgListenter: function () {
|
||||
var me = this;
|
||||
domUtils.on($G("J_removeImg"), "click", function () {
|
||||
$G("J_picBoard").innerHTML = "";
|
||||
@ -248,7 +248,7 @@ var scrawl = function (options) {
|
||||
me.btn2disable("J_sacleBoard");
|
||||
});
|
||||
},
|
||||
_addScalePicListenter:function () {
|
||||
_addScalePicListenter: function () {
|
||||
domUtils.on($G("J_sacleBoard"), "click", function () {
|
||||
var picBoard = $G("J_picBoard"),
|
||||
scaleCon = $G("J_scaleCon"),
|
||||
@ -256,7 +256,7 @@ var scrawl = function (options) {
|
||||
|
||||
if (img) {
|
||||
if (!scaleCon) {
|
||||
picBoard.style.cssText = "position:relative;z-index:999;"+picBoard.style.cssText;
|
||||
picBoard.style.cssText = "position:relative;z-index:999;" + picBoard.style.cssText;
|
||||
img.style.cssText = "position: absolute;top:" + (canvas.height - img.height) / 2 + "px;left:" + (canvas.width - img.width) / 2 + "px;";
|
||||
var scale = new ScaleBoy();
|
||||
picBoard.appendChild(scale.init());
|
||||
@ -274,7 +274,7 @@ var scrawl = function (options) {
|
||||
}
|
||||
});
|
||||
},
|
||||
_addClearSelectionListenter:function () {
|
||||
_addClearSelectionListenter: function () {
|
||||
var doc = document;
|
||||
domUtils.on(doc, 'mousemove', function (e) {
|
||||
if (browser.ie && browser.version < 11)
|
||||
@ -283,17 +283,17 @@ var scrawl = function (options) {
|
||||
window.getSelection().removeAllRanges();
|
||||
});
|
||||
},
|
||||
_clearSelection:function () {
|
||||
_clearSelection: function () {
|
||||
var list = ["J_operateBar", "J_colorBar", "J_brushBar", "J_eraserBar", "J_picBoard"];
|
||||
for (var i = 0, group; group = list[i++];) {
|
||||
domUtils.unSelectable($G(group));
|
||||
}
|
||||
},
|
||||
|
||||
_saveOPerate:function (saveNum) {
|
||||
_saveOPerate: function (saveNum) {
|
||||
var me = this;
|
||||
if (drawStep.length <= saveNum) {
|
||||
if(drawStepIndex<drawStep.length){
|
||||
if (drawStepIndex < drawStep.length) {
|
||||
me.btn2disable("J_nextStep");
|
||||
drawStep.splice(drawStepIndex);
|
||||
}
|
||||
@ -308,7 +308,7 @@ var scrawl = function (options) {
|
||||
me.btn2Highlight("J_clearBoard");
|
||||
},
|
||||
|
||||
_originalColorSelect:function (title) {
|
||||
_originalColorSelect: function (title) {
|
||||
var colorList = $G("J_colorList").getElementsByTagName("td");
|
||||
for (var j = 0, cell; cell = colorList[j++];) {
|
||||
if (cell.children[0].title.toLowerCase() == title) {
|
||||
@ -316,7 +316,7 @@ var scrawl = function (options) {
|
||||
}
|
||||
}
|
||||
},
|
||||
_originalBrushSelect:function (text) {
|
||||
_originalBrushSelect: function (text) {
|
||||
var brushList = $G("J_brushBar").children;
|
||||
for (var i = 0, ele; ele = brushList[i++];) {
|
||||
if (ele.tagName.toLowerCase() == "a") {
|
||||
@ -327,7 +327,7 @@ var scrawl = function (options) {
|
||||
}
|
||||
}
|
||||
},
|
||||
_addColorSelect:function (target) {
|
||||
_addColorSelect: function (target) {
|
||||
var me = this,
|
||||
colorList = $G("J_colorList").getElementsByTagName("td"),
|
||||
eraserList = $G("J_eraserBar").children,
|
||||
@ -354,7 +354,7 @@ var scrawl = function (options) {
|
||||
target.style.opacity = 1;
|
||||
target.blur();
|
||||
},
|
||||
_addBESelect:function (target) {
|
||||
_addBESelect: function (target) {
|
||||
var brushList = $G("J_brushBar").children;
|
||||
var eraserList = $G("J_eraserBar").children;
|
||||
|
||||
@ -372,7 +372,7 @@ var scrawl = function (options) {
|
||||
target.style.opacity = 1;
|
||||
target.blur();
|
||||
},
|
||||
getCanvasData:function () {
|
||||
getCanvasData: function () {
|
||||
var picContainer = $G("J_picBoard"),
|
||||
img = picContainer.children[0];
|
||||
if (img) {
|
||||
@ -397,15 +397,15 @@ var scrawl = function (options) {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
btn2Highlight:function (id) {
|
||||
btn2Highlight: function (id) {
|
||||
var cur = $G(id);
|
||||
cur.className.indexOf("H") == -1 && (cur.className += "H");
|
||||
},
|
||||
btn2disable:function (id) {
|
||||
btn2disable: function (id) {
|
||||
var cur = $G(id);
|
||||
cur.className.indexOf("H") != -1 && (cur.className = cur.className.replace("H", ""));
|
||||
},
|
||||
getTarget:function (evt) {
|
||||
getTarget: function (evt) {
|
||||
return evt.target || evt.srcElement;
|
||||
}
|
||||
};
|
||||
@ -465,7 +465,7 @@ var ScaleBoy = function () {
|
||||
[0, 0, 1, 1]
|
||||
];
|
||||
ScaleBoy.prototype = {
|
||||
init:function () {
|
||||
init: function () {
|
||||
_appendStyle();
|
||||
var me = this,
|
||||
scale = me.dom = _getDom();
|
||||
@ -473,7 +473,7 @@ var ScaleBoy = function () {
|
||||
me.scaleMousemove.fp = me;
|
||||
domUtils.on(scale, 'mousedown', function (e) {
|
||||
var target = e.target || e.srcElement;
|
||||
me.start = {x:e.clientX, y:e.clientY};
|
||||
me.start = {x: e.clientX, y: e.clientY};
|
||||
if (target.className.indexOf('hand') != -1) {
|
||||
me.dir = target.className.replace('hand', '');
|
||||
}
|
||||
@ -484,7 +484,10 @@ var ScaleBoy = function () {
|
||||
if (me.start) {
|
||||
domUtils.un(document.body, 'mousemove', me.scaleMousemove);
|
||||
if (me.moved) {
|
||||
me.updateScaledElement({position:{x:scale.style.left, y:scale.style.top}, size:{w:scale.style.width, h:scale.style.height}});
|
||||
me.updateScaledElement({
|
||||
position: {x: scale.style.left, y: scale.style.top},
|
||||
size: {w: scale.style.width, h: scale.style.height}
|
||||
});
|
||||
}
|
||||
delete me.start;
|
||||
delete me.moved;
|
||||
@ -493,13 +496,13 @@ var ScaleBoy = function () {
|
||||
});
|
||||
return scale;
|
||||
},
|
||||
startScale:function (objElement) {
|
||||
startScale: function (objElement) {
|
||||
var me = this, Idom = me.dom;
|
||||
|
||||
Idom.style.cssText = 'visibility:visible;top:' + objElement.style.top + ';left:' + objElement.style.left + ';width:' + objElement.offsetWidth + 'px;height:' + objElement.offsetHeight + 'px;';
|
||||
me.scalingElement = objElement;
|
||||
},
|
||||
updateScaledElement:function (objStyle) {
|
||||
updateScaledElement: function (objStyle) {
|
||||
var cur = this.scalingElement,
|
||||
pos = objStyle.position,
|
||||
size = objStyle.size;
|
||||
@ -512,7 +515,7 @@ var ScaleBoy = function () {
|
||||
size.h && (cur.style.height = size.h);
|
||||
}
|
||||
},
|
||||
updateStyleByDir:function (dir, offset) {
|
||||
updateStyleByDir: function (dir, offset) {
|
||||
var me = this,
|
||||
dom = me.dom, tmp;
|
||||
|
||||
@ -534,20 +537,20 @@ var ScaleBoy = function () {
|
||||
dom.style.height = me._validScaledProp('height', tmp) + 'px';
|
||||
}
|
||||
if (dir === 'def') {
|
||||
me.updateScaledElement({position:{x:dom.style.left, y:dom.style.top}});
|
||||
me.updateScaledElement({position: {x: dom.style.left, y: dom.style.top}});
|
||||
}
|
||||
},
|
||||
scaleMousemove:function (e) {
|
||||
scaleMousemove: function (e) {
|
||||
var me = arguments.callee.fp,
|
||||
start = me.start,
|
||||
dir = me.dir || 'def',
|
||||
offset = {x:e.clientX - start.x, y:e.clientY - start.y};
|
||||
offset = {x: e.clientX - start.x, y: e.clientY - start.y};
|
||||
|
||||
me.updateStyleByDir(dir, offset);
|
||||
arguments.callee.fp.start = {x:e.clientX, y:e.clientY};
|
||||
arguments.callee.fp.start = {x: e.clientX, y: e.clientY};
|
||||
arguments.callee.fp.moved = 1;
|
||||
},
|
||||
_validScaledProp:function (prop, value) {
|
||||
_validScaledProp: function (prop, value) {
|
||||
var ele = this.dom,
|
||||
wrap = $G("J_picBoard");
|
||||
|
||||
@ -611,6 +614,7 @@ function ue_callback(url, state) {
|
||||
alert(state);
|
||||
}
|
||||
}
|
||||
|
||||
//去掉遮罩层
|
||||
function removeMaskLayer() {
|
||||
var maskLayer = $G("J_maskLayer");
|
||||
@ -618,6 +622,7 @@ function removeMaskLayer() {
|
||||
maskLayer.innerHTML = "";
|
||||
dialog.buttons[0].setDisabled(false);
|
||||
}
|
||||
|
||||
//添加遮罩层
|
||||
function addMaskLayer(html) {
|
||||
var maskLayer = $G("J_maskLayer");
|
||||
@ -625,33 +630,65 @@ function addMaskLayer(html) {
|
||||
maskLayer.className = "maskLayer";
|
||||
maskLayer.innerHTML = html;
|
||||
}
|
||||
|
||||
//执行确认按钮方法
|
||||
function exec(scrawlObj) {
|
||||
if (scrawlObj.isScrawl) {
|
||||
addMaskLayer(lang.scrawlUpLoading);
|
||||
var base64 = scrawlObj.getCanvasData();
|
||||
if (!!base64) {
|
||||
|
||||
var successHandler = function (res) {
|
||||
var imgObj = {},
|
||||
url = editor.options.scrawlUrlPrefix + res.url;
|
||||
imgObj.src = url;
|
||||
imgObj._src = url;
|
||||
imgObj.alt = res.original || '';
|
||||
editor.execCommand("insertImage", imgObj);
|
||||
dialog.close();
|
||||
// 触发上传涂鸦事件
|
||||
editor.fireEvent("uploadsuccess", {
|
||||
res: res,
|
||||
type: 'scrawl'
|
||||
});
|
||||
};
|
||||
|
||||
if(editor.getOpt('uploadServiceEnable')) {
|
||||
var file = utils.base64toBlob(base64, 'image/png');
|
||||
editor.getOpt('uploadServiceUpload')('image', file, {
|
||||
success: function( res ) {
|
||||
if (!scrawlObj.isCancelScrawl) {
|
||||
successHandler(res);
|
||||
}
|
||||
},
|
||||
error: function( err ) {
|
||||
alert(lang.imageError + ' : '+err);
|
||||
dialog.close();
|
||||
},
|
||||
progress: function( percent ) {
|
||||
|
||||
}
|
||||
}, {
|
||||
from: 'scrawl'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var options = {
|
||||
timeout:100000,
|
||||
onsuccess:function (xhr) {
|
||||
timeout: 100000,
|
||||
headers: editor.options.serverHeaders || {},
|
||||
onsuccess: function (xhr) {
|
||||
if (!scrawlObj.isCancelScrawl) {
|
||||
var responseObj;
|
||||
responseObj = eval("(" + xhr.responseText + ")");
|
||||
if (responseObj.state == "SUCCESS") {
|
||||
var imgObj = {},
|
||||
url = editor.options.scrawlUrlPrefix + responseObj.url;
|
||||
imgObj.src = url;
|
||||
imgObj._src = url;
|
||||
imgObj.alt = responseObj.original || '';
|
||||
editor.execCommand("insertImage", imgObj);
|
||||
dialog.close();
|
||||
if (responseObj.state === "SUCCESS") {
|
||||
successHandler(responseObj);
|
||||
} else {
|
||||
alert(responseObj.state);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
onerror:function () {
|
||||
onerror: function () {
|
||||
alert(lang.imageError);
|
||||
dialog.close();
|
||||
}
|
||||
@ -660,7 +697,7 @@ function exec(scrawlObj) {
|
||||
|
||||
var actionUrl = editor.getActionUrl(editor.getOpt('scrawlActionName')),
|
||||
params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + params);
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?' : '&') + params);
|
||||
ajax.request(url, options);
|
||||
}
|
||||
} else {
|
||||
|
@ -4,20 +4,46 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<style type="text/css">
|
||||
.warpper{ position:relative;width: 380px; height: 100%; margin: 10px auto;}
|
||||
.tabbody{height: 160px;}
|
||||
.tabbody table{width:100%;border-collapse: separate;border-spacing: 3px;line-height:36px;}
|
||||
.tabbody .panel{width:373px;height:100%;padding-left: 5px;position: absolute;background-color: #fff;}
|
||||
.tabbody input.int{ width: 190px;
|
||||
.warpper {
|
||||
position: relative;
|
||||
width: 380px;
|
||||
height: 100%;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.tabbody {
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.tabbody table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 3px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.tabbody .panel {
|
||||
width: 373px;
|
||||
height: 100%;
|
||||
padding-left: 5px;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.tabbody input.int {
|
||||
width: 190px;
|
||||
height: 30px;
|
||||
border: 1px solid #d7d7d7;
|
||||
line-height: 21px;
|
||||
border-radius: 3px;
|
||||
outline: none;
|
||||
padding: 0 5px; }
|
||||
.tabbody input.btn{ text-align: center;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.tabbody input.btn {
|
||||
text-align: center;
|
||||
line-height: 28px;
|
||||
text-decoration: none;
|
||||
height: 30px;
|
||||
@ -26,21 +52,22 @@
|
||||
border-radius: 3px;
|
||||
padding: 0 5px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;}
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="warpper" id="searchtab">
|
||||
<div id="head" class="tabhead">
|
||||
<span tabsrc="find" class="focus"><var id="lang_tab_search"></var></span>
|
||||
<span tabsrc="replace" ><var id="lang_tab_replace"></var></span>
|
||||
<span tabsrc="replace"><var id="lang_tab_replace"></var></span>
|
||||
</div>
|
||||
<div class="tabbody">
|
||||
<div class="panel" id="find">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="80"><var id="lang_search1"></var>: </td>
|
||||
<td><input id="findtxt" type="text" class="int" /></td>
|
||||
<td width="80"><var id="lang_search1"></var>:</td>
|
||||
<td><input id="findtxt" type="text" class="int"/></td>
|
||||
</tr>
|
||||
<!--<tr>-->
|
||||
|
||||
@ -49,13 +76,13 @@
|
||||
<tr>
|
||||
<td><var id="lang_case_sensitive1"></var></td>
|
||||
<td>
|
||||
<input id="matchCase" type="checkbox" />
|
||||
<input id="matchCase" type="checkbox"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="nextFindBtn" type="button" class="btn" />
|
||||
<input id="preFindBtn" type="button" class="btn" />
|
||||
<input id="nextFindBtn" type="button" class="btn"/>
|
||||
<input id="preFindBtn" type="button" class="btn"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -73,29 +100,29 @@
|
||||
<div class="panel" id="replace">
|
||||
<table>
|
||||
<tr>
|
||||
<td width="80"><var id="lang_search2"></var>: </td>
|
||||
<td><input id="findtxt1" type="text" class="int" /></td>
|
||||
<td width="80"><var id="lang_search2"></var>:</td>
|
||||
<td><input id="findtxt1" type="text" class="int"/></td>
|
||||
</tr>
|
||||
<!--<tr>-->
|
||||
|
||||
<!--<td colspan="2"><span style="color:red"><var id="lang_searchReg1"></var></span></td>-->
|
||||
<!--</tr>-->
|
||||
<tr>
|
||||
<td><var id="lang_replace"></var>: </td>
|
||||
<td><input id="replacetxt" type="text" class="int" /></td>
|
||||
<td><var id="lang_replace"></var>:</td>
|
||||
<td><input id="replacetxt" type="text" class="int"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><var id="lang_case_sensitive2"></var></td>
|
||||
<td>
|
||||
<input id="matchCase1" type="checkbox" />
|
||||
<input id="matchCase1" type="checkbox"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="nextReplaceBtn" type="button" class="btn" />
|
||||
<input id="preReplaceBtn" type="button" class="btn" />
|
||||
<input id="repalceBtn" type="button" class="btn" />
|
||||
<input id="repalceAllBtn" type="button" class="btn" />
|
||||
<input id="nextReplaceBtn" type="button" class="btn"/>
|
||||
<input id="preReplaceBtn" type="button" class="btn"/>
|
||||
<input id="repalceBtn" type="button" class="btn"/>
|
||||
<input id="repalceAllBtn" type="button" class="btn"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -112,6 +139,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="searchreplace.js?20220503"></script>
|
||||
<script type="text/javascript" src="searchreplace.js?2c3cf2d3"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -9,6 +9,7 @@
|
||||
//清空上次查选的痕迹
|
||||
editor.firstForSR = 0;
|
||||
editor.currentRangeForSR = null;
|
||||
|
||||
//给tab注册切换事件
|
||||
/**
|
||||
* tab点击处理事件
|
||||
@ -16,18 +17,18 @@ editor.currentRangeForSR = null;
|
||||
* @param tabBodys
|
||||
* @param obj
|
||||
*/
|
||||
function clickHandler( tabHeads,tabBodys,obj ) {
|
||||
function clickHandler(tabHeads, tabBodys, obj) {
|
||||
//head样式更改
|
||||
for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
|
||||
for (var k = 0, len = tabHeads.length; k < len; k++) {
|
||||
tabHeads[k].className = "";
|
||||
}
|
||||
obj.className = "focus";
|
||||
//body显隐
|
||||
var tabSrc = obj.getAttribute( "tabSrc" );
|
||||
for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
|
||||
var tabSrc = obj.getAttribute("tabSrc");
|
||||
for (var j = 0, length = tabBodys.length; j < length; j++) {
|
||||
var body = tabBodys[j],
|
||||
id = body.getAttribute( "id" );
|
||||
if ( id != tabSrc ) {
|
||||
id = body.getAttribute("id");
|
||||
if (id != tabSrc) {
|
||||
body.style.zIndex = 1;
|
||||
} else {
|
||||
body.style.zIndex = 200;
|
||||
@ -40,27 +41,30 @@ function clickHandler( tabHeads,tabBodys,obj ) {
|
||||
* TAB切换
|
||||
* @param tabParentId tab的父节点ID或者对象本身
|
||||
*/
|
||||
function switchTab( tabParentId ) {
|
||||
var tabElements = $G( tabParentId ).children,
|
||||
function switchTab(tabParentId) {
|
||||
var tabElements = $G(tabParentId).children,
|
||||
tabHeads = tabElements[0].children,
|
||||
tabBodys = tabElements[1].children;
|
||||
|
||||
for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
|
||||
for (var i = 0, length = tabHeads.length; i < length; i++) {
|
||||
var head = tabHeads[i];
|
||||
if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
|
||||
if (head.className === "focus") clickHandler(tabHeads, tabBodys, head);
|
||||
head.onclick = function () {
|
||||
clickHandler(tabHeads,tabBodys,this);
|
||||
clickHandler(tabHeads, tabBodys, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
$G('searchtab').onmousedown = function(){
|
||||
|
||||
$G('searchtab').onmousedown = function () {
|
||||
$G('search-msg').innerHTML = '';
|
||||
$G('replace-msg').innerHTML = ''
|
||||
}
|
||||
|
||||
//是否区分大小写
|
||||
function getMatchCase(id) {
|
||||
return $G(id).checked ? true : false;
|
||||
}
|
||||
|
||||
//查找
|
||||
$G("nextFindBtn").onclick = function (txt, dir, mcase) {
|
||||
var findtxt = $G("findtxt").value, obj;
|
||||
@ -68,9 +72,9 @@ $G("nextFindBtn").onclick = function (txt, dir, mcase) {
|
||||
return false;
|
||||
}
|
||||
obj = {
|
||||
searchStr:findtxt,
|
||||
dir:1,
|
||||
casesensitive:getMatchCase("matchCase")
|
||||
searchStr: findtxt,
|
||||
dir: 1,
|
||||
casesensitive: getMatchCase("matchCase")
|
||||
};
|
||||
if (!frCommond(obj)) {
|
||||
var bk = editor.selection.getRange().createBookmark();
|
||||
@ -86,9 +90,9 @@ $G("nextReplaceBtn").onclick = function (txt, dir, mcase) {
|
||||
return false;
|
||||
}
|
||||
obj = {
|
||||
searchStr:findtxt,
|
||||
dir:1,
|
||||
casesensitive:getMatchCase("matchCase1")
|
||||
searchStr: findtxt,
|
||||
dir: 1,
|
||||
casesensitive: getMatchCase("matchCase1")
|
||||
};
|
||||
frCommond(obj);
|
||||
};
|
||||
@ -98,9 +102,9 @@ $G("preFindBtn").onclick = function (txt, dir, mcase) {
|
||||
return false;
|
||||
}
|
||||
obj = {
|
||||
searchStr:findtxt,
|
||||
dir:-1,
|
||||
casesensitive:getMatchCase("matchCase")
|
||||
searchStr: findtxt,
|
||||
dir: -1,
|
||||
casesensitive: getMatchCase("matchCase")
|
||||
};
|
||||
if (!frCommond(obj)) {
|
||||
$G('search-msg').innerHTML = lang.getStart;
|
||||
@ -112,9 +116,9 @@ $G("preReplaceBtn").onclick = function (txt, dir, mcase) {
|
||||
return false;
|
||||
}
|
||||
obj = {
|
||||
searchStr:findtxt,
|
||||
dir:-1,
|
||||
casesensitive:getMatchCase("matchCase1")
|
||||
searchStr: findtxt,
|
||||
dir: -1,
|
||||
casesensitive: getMatchCase("matchCase1")
|
||||
};
|
||||
frCommond(obj);
|
||||
};
|
||||
@ -130,10 +134,10 @@ $G("repalceBtn").onclick = function () {
|
||||
return false;
|
||||
}
|
||||
obj = {
|
||||
searchStr:findtxt,
|
||||
dir:1,
|
||||
casesensitive:getMatchCase("matchCase1"),
|
||||
replaceStr:replacetxt
|
||||
searchStr: findtxt,
|
||||
dir: 1,
|
||||
casesensitive: getMatchCase("matchCase1"),
|
||||
replaceStr: replacetxt
|
||||
};
|
||||
frCommond(obj);
|
||||
};
|
||||
@ -148,10 +152,10 @@ $G("repalceAllBtn").onclick = function () {
|
||||
return false;
|
||||
}
|
||||
obj = {
|
||||
searchStr:findtxt,
|
||||
casesensitive:getMatchCase("matchCase1"),
|
||||
replaceStr:replacetxt,
|
||||
all:true
|
||||
searchStr: findtxt,
|
||||
casesensitive: getMatchCase("matchCase1"),
|
||||
replaceStr: replacetxt,
|
||||
all: true
|
||||
};
|
||||
var num = frCommond(obj);
|
||||
if (num) {
|
||||
@ -165,6 +169,6 @@ var frCommond = function (obj) {
|
||||
switchTab("searchtab");
|
||||
|
||||
|
||||
dialog.onclose = function(){
|
||||
dialog.onclose = function () {
|
||||
editor.trigger('clearLastSearchResult')
|
||||
};
|
@ -4,18 +4,39 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<style type="text/css">
|
||||
html,body{overflow:hidden;}
|
||||
#specharsTab{width: 97%;margin: 10px auto; zoom:1;position: relative}
|
||||
.tabbody {height:447px;}
|
||||
.tabbody span{ margin: 5px 3px;text-align: center;display:inline-block;width: 40px;height:16px;line-height: 16px;cursor: pointer; }
|
||||
html, body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#specharsTab {
|
||||
width: 97%;
|
||||
margin: 10px auto;
|
||||
zoom: 1;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.tabbody {
|
||||
height: 447px;
|
||||
}
|
||||
|
||||
.tabbody span {
|
||||
margin: 5px 3px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="specharsTab">
|
||||
<div id="tabHeads" class="tabhead"></div><div id="tabBodys" class="tabbody"></div>
|
||||
</div>
|
||||
<script type="text/javascript" src="spechars.js?20220503"></script>
|
||||
<div id="specharsTab">
|
||||
<div id="tabHeads" class="tabhead"></div>
|
||||
<div id="tabBodys" class="tabbody"></div>
|
||||
</div>
|
||||
<script type="text/javascript" src="spechars.js?f474d0a8"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -6,22 +6,50 @@
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
var charsContent = [
|
||||
{ name:"tsfh", title:lang.tsfh, content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,<2C>,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")},
|
||||
{ name:"lmsz", title:lang.lmsz, content:toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")},
|
||||
{ name:"szfh", title:lang.szfh, content:toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")},
|
||||
{ name:"rwfh", title:lang.rwfh, content:toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")},
|
||||
{ name:"xlzm", title:lang.xlzm, content:toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")},
|
||||
{ name:"ewzm", title:lang.ewzm, content:toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")},
|
||||
{ name:"pyzm", title:lang.pyzm, content:toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")},
|
||||
{ name:"yyyb", title:lang.yyyb, content:toArray("i:,i,e,æ,ʌ,ə:,ə,u:,u,ɔ:,ɔ,a:,ei,ai,ɔi,əu,au,iə,εə,uə,p,t,k,b,d,g,f,s,ʃ,θ,h,v,z,ʒ,ð,tʃ,tr,ts,dʒ,dr,dz,m,n,ŋ,l,r,w,j,")},
|
||||
{ name:"zyzf", title:lang.zyzf, content:toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")}
|
||||
{
|
||||
name: "tsfh",
|
||||
title: lang.tsfh,
|
||||
content: toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,<2C>,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")
|
||||
},
|
||||
{name: "lmsz", title: lang.lmsz, content: toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")},
|
||||
{
|
||||
name: "szfh",
|
||||
title: lang.szfh,
|
||||
content: toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")
|
||||
},
|
||||
{
|
||||
name: "rwfh",
|
||||
title: lang.rwfh,
|
||||
content: toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")
|
||||
},
|
||||
{
|
||||
name: "xlzm",
|
||||
title: lang.xlzm,
|
||||
content: toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")
|
||||
},
|
||||
{
|
||||
name: "ewzm",
|
||||
title: lang.ewzm,
|
||||
content: toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")
|
||||
},
|
||||
{name: "pyzm", title: lang.pyzm, content: toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")},
|
||||
{
|
||||
name: "yyyb",
|
||||
title: lang.yyyb,
|
||||
content: toArray("i:,i,e,æ,ʌ,ə:,ə,u:,u,ɔ:,ɔ,a:,ei,ai,ɔi,əu,au,iə,εə,uə,p,t,k,b,d,g,f,s,ʃ,θ,h,v,z,ʒ,ð,tʃ,tr,ts,dʒ,dr,dz,m,n,ŋ,l,r,w,j,")
|
||||
},
|
||||
{
|
||||
name: "zyzf",
|
||||
title: lang.zyzf,
|
||||
content: toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")
|
||||
}
|
||||
];
|
||||
(function createTab(content) {
|
||||
for (var i = 0, ci; ci = content[i++];) {
|
||||
var span = document.createElement("span");
|
||||
span.setAttribute("tabSrc", ci.name);
|
||||
span.innerHTML = ci.title;
|
||||
if (i == 1)span.className = "focus";
|
||||
if (i == 1) span.className = "focus";
|
||||
domUtils.on(span, "click", function () {
|
||||
var tmps = $G("tabHeads").children;
|
||||
for (var k = 0, sk; sk = tmps[k++];) {
|
||||
@ -52,6 +80,7 @@ var charsContent = [
|
||||
$G("tabBodys").appendChild(div);
|
||||
}
|
||||
})(charsContent);
|
||||
|
||||
function toArray(str) {
|
||||
return str.split(",");
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
body{
|
||||
body {
|
||||
overflow: hidden;
|
||||
width: 540px;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
margin: 10px auto 0;
|
||||
font-size: 12px;
|
||||
|
@ -2,8 +2,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="edittable.css?20220503">
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" type="text/css" href="edittable.css?effbbe30">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
@ -12,18 +12,22 @@
|
||||
<h3><var id="lang_tableStyle"></var></h3>
|
||||
<ul>
|
||||
<li>
|
||||
<label onselectstart="return false"><input type="checkbox" id="J_title" name="style"/><var id="lang_insertTitle"></var></label>
|
||||
<label onselectstart="return false"><input type="checkbox" id="J_title" name="style"/><var
|
||||
id="lang_insertTitle"></var></label>
|
||||
</li>
|
||||
<li>
|
||||
<label onselectstart="return false"><input type="checkbox" id="J_titleCol" name="style"/><var id="lang_insertTitleCol"></var></label>
|
||||
<label onselectstart="return false"><input type="checkbox" id="J_titleCol" name="style"/><var
|
||||
id="lang_insertTitleCol"></var></label>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>
|
||||
<label onselectstart="return false"><input type="checkbox" id="J_caption" name="style"/><var id="lang_insertCaption"></var></label>
|
||||
<label onselectstart="return false"><input type="checkbox" id="J_caption" name="style"/><var
|
||||
id="lang_insertCaption"></var></label>
|
||||
</li>
|
||||
<li>
|
||||
<label onselectstart="return false"><input type="checkbox" id="J_sorttable" name="style"/><var id="lang_orderbycontent"></var></label>
|
||||
<label onselectstart="return false"><input type="checkbox" id="J_sorttable" name="style"/><var
|
||||
id="lang_orderbycontent"></var></label>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
@ -35,7 +39,8 @@
|
||||
<label><input type="radio" id="J_autoSizeContent" name="size"/><var id="lang_autoSizeContent"></var></label>
|
||||
</li>
|
||||
<li>
|
||||
<label><input type="radio" id="J_autoSizePage" name="size"/><var id="lang_autoSizePage"></var></label>
|
||||
<label><input type="radio" id="J_autoSizePage" name="size"/><var
|
||||
id="lang_autoSizePage"></var></label>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
@ -45,7 +50,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<span><var id="lang_color"></var></span>
|
||||
<input type="text" class="tone" id="J_tone" readonly='readonly' />
|
||||
<input type="text" class="tone" id="J_tone" readonly='readonly'/>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
@ -59,6 +64,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="edittable.js?20220503"></script>
|
||||
<script type="text/javascript" src="edittable.js?6b7a0dd4"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -21,13 +21,13 @@
|
||||
me.init();
|
||||
};
|
||||
editTable.prototype = {
|
||||
init:function () {
|
||||
init: function () {
|
||||
var colorPiker = new UE.ui.ColorPicker({
|
||||
editor:editor
|
||||
editor: editor
|
||||
}),
|
||||
colorPop = new UE.ui.Popup({
|
||||
editor:editor,
|
||||
content:colorPiker
|
||||
editor: editor,
|
||||
content: colorPiker
|
||||
});
|
||||
|
||||
title.checked = editor.queryCommandState("inserttitle") == -1;
|
||||
@ -38,9 +38,9 @@
|
||||
var enablesortState = editor.queryCommandState("enablesort"),
|
||||
disablesortState = editor.queryCommandState("disablesort");
|
||||
|
||||
sorttable.checked = !!(enablesortState < 0 && disablesortState >=0);
|
||||
sorttable.checked = !!(enablesortState < 0 && disablesortState >= 0);
|
||||
sorttable.disabled = !!(enablesortState < 0 && disablesortState < 0);
|
||||
sorttable.title = enablesortState < 0 && disablesortState < 0 ? lang.errorMsg:'';
|
||||
sorttable.title = enablesortState < 0 && disablesortState < 0 ? lang.errorMsg : '';
|
||||
|
||||
me.createTable(title.checked, titleCol.checked, caption.checked);
|
||||
me.setAutoSize();
|
||||
@ -69,7 +69,7 @@
|
||||
});
|
||||
},
|
||||
|
||||
createTable:function (hasTitle, hasTitleCol, hasCaption) {
|
||||
createTable: function (hasTitle, hasTitleCol, hasCaption) {
|
||||
var arr = [],
|
||||
sortSpan = '<span>^</span>';
|
||||
arr.push("<table id='J_example'>");
|
||||
@ -78,7 +78,9 @@
|
||||
}
|
||||
if (hasTitle) {
|
||||
arr.push("<tr>");
|
||||
if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>"); }
|
||||
if (hasTitleCol) {
|
||||
arr.push("<th>" + lang.titleName + "</th>");
|
||||
}
|
||||
for (var j = 0; j < 5; j++) {
|
||||
arr.push("<th>" + lang.titleName + "</th>");
|
||||
}
|
||||
@ -86,7 +88,9 @@
|
||||
}
|
||||
for (var i = 0; i < 6; i++) {
|
||||
arr.push("<tr>");
|
||||
if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>") }
|
||||
if (hasTitleCol) {
|
||||
arr.push("<th>" + lang.titleName + "</th>")
|
||||
}
|
||||
for (var k = 0; k < 5; k++) {
|
||||
arr.push("<td>" + lang.cellsName + "</td>")
|
||||
}
|
||||
@ -96,9 +100,9 @@
|
||||
preview.innerHTML = arr.join("");
|
||||
this.updateSortSpan();
|
||||
},
|
||||
titleHanler:function () {
|
||||
titleHanler: function () {
|
||||
var example = $G("J_example"),
|
||||
frg=document.createDocumentFragment(),
|
||||
frg = document.createDocumentFragment(),
|
||||
color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"),
|
||||
colCount = example.rows[0].children.length;
|
||||
|
||||
@ -117,7 +121,7 @@
|
||||
me.setColor(color);
|
||||
me.updateSortSpan();
|
||||
},
|
||||
titleColHanler:function () {
|
||||
titleColHanler: function () {
|
||||
var example = $G("J_example"),
|
||||
color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"),
|
||||
colArr = example.rows,
|
||||
@ -137,7 +141,7 @@
|
||||
me.setColor(color);
|
||||
me.updateSortSpan();
|
||||
},
|
||||
captionHanler:function () {
|
||||
captionHanler: function () {
|
||||
var example = $G("J_example");
|
||||
if (caption.checked) {
|
||||
var row = document.createElement('caption');
|
||||
@ -147,14 +151,14 @@
|
||||
domUtils.remove(domUtils.getElementsByTagName(example, 'caption')[0]);
|
||||
}
|
||||
},
|
||||
sorttableHanler:function(){
|
||||
sorttableHanler: function () {
|
||||
me.updateSortSpan();
|
||||
},
|
||||
autoSizeContentHanler:function () {
|
||||
autoSizeContentHanler: function () {
|
||||
var example = $G("J_example");
|
||||
example.removeAttribute("width");
|
||||
},
|
||||
autoSizePageHanler:function () {
|
||||
autoSizePageHanler: function () {
|
||||
var example = $G("J_example");
|
||||
var tds = example.getElementsByTagName(example, "td");
|
||||
utils.each(tds, function (td) {
|
||||
@ -162,30 +166,30 @@
|
||||
});
|
||||
example.setAttribute('width', '100%');
|
||||
},
|
||||
updateSortSpan: function(){
|
||||
updateSortSpan: function () {
|
||||
var example = $G("J_example"),
|
||||
row = example.rows[0];
|
||||
|
||||
var spans = domUtils.getElementsByTagName(example,"span");
|
||||
utils.each(spans,function(span){
|
||||
var spans = domUtils.getElementsByTagName(example, "span");
|
||||
utils.each(spans, function (span) {
|
||||
span.parentNode.removeChild(span);
|
||||
});
|
||||
if (sorttable.checked) {
|
||||
utils.each(row.cells, function(cell, i){
|
||||
utils.each(row.cells, function (cell, i) {
|
||||
var span = document.createElement("span");
|
||||
span.innerHTML = "^";
|
||||
cell.appendChild(span);
|
||||
});
|
||||
}
|
||||
},
|
||||
getColor:function () {
|
||||
getColor: function () {
|
||||
var start = editor.selection.getStart(), color,
|
||||
cell = domUtils.findParentByTagName(start, ["td", "th", "caption"], true);
|
||||
color = cell && domUtils.getComputedStyle(cell, "border-color");
|
||||
if (!color) color = "#DDDDDD";
|
||||
return color;
|
||||
},
|
||||
setColor:function (color) {
|
||||
setColor: function (color) {
|
||||
var example = $G("J_example"),
|
||||
arr = domUtils.getElementsByTagName(example, "td").concat(
|
||||
domUtils.getElementsByTagName(example, "th"),
|
||||
@ -198,7 +202,7 @@
|
||||
});
|
||||
|
||||
},
|
||||
setAutoSize:function () {
|
||||
setAutoSize: function () {
|
||||
var me = this;
|
||||
autoSizePage.checked = true;
|
||||
me.autoSizePageHanler();
|
||||
@ -211,24 +215,24 @@
|
||||
editor.__hasEnterExecCommand = true;
|
||||
|
||||
var checks = {
|
||||
title:"inserttitle deletetitle",
|
||||
titleCol:"inserttitlecol deletetitlecol",
|
||||
caption:"insertcaption deletecaption",
|
||||
sorttable:"enablesort disablesort"
|
||||
title: "inserttitle deletetitle",
|
||||
titleCol: "inserttitlecol deletetitlecol",
|
||||
caption: "insertcaption deletecaption",
|
||||
sorttable: "enablesort disablesort"
|
||||
};
|
||||
editor.fireEvent('saveScene');
|
||||
for(var i in checks){
|
||||
for (var i in checks) {
|
||||
var cmds = checks[i].split(" "),
|
||||
input = $G("J_" + i);
|
||||
if(input["checked"]){
|
||||
editor.queryCommandState(cmds[0])!=-1 &&editor.execCommand(cmds[0]);
|
||||
}else{
|
||||
editor.queryCommandState(cmds[1])!=-1 &&editor.execCommand(cmds[1]);
|
||||
if (input["checked"]) {
|
||||
editor.queryCommandState(cmds[0]) != -1 && editor.execCommand(cmds[0]);
|
||||
} else {
|
||||
editor.queryCommandState(cmds[1]) != -1 && editor.execCommand(cmds[1]);
|
||||
}
|
||||
}
|
||||
|
||||
editor.execCommand("edittable", tone.value);
|
||||
autoSizeContent.checked ?editor.execCommand('adaptbytext') : "";
|
||||
autoSizeContent.checked ? editor.execCommand('adaptbytext') : "";
|
||||
autoSizePage.checked ? editor.execCommand("adaptbywindow") : "";
|
||||
editor.fireEvent('saveScene');
|
||||
|
||||
|
@ -2,12 +2,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<style type="text/css">
|
||||
.section {
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.section input {
|
||||
margin-left: 5px;
|
||||
width: 70px;
|
||||
@ -22,11 +23,11 @@
|
||||
<script type="text/javascript">
|
||||
var tone = $G("J_tone"),
|
||||
colorPiker = new UE.ui.ColorPicker({
|
||||
editor:editor
|
||||
editor: editor
|
||||
}),
|
||||
colorPop = new UE.ui.Popup({
|
||||
editor:editor,
|
||||
content:colorPiker
|
||||
editor: editor,
|
||||
content: colorPiker
|
||||
});
|
||||
domUtils.on(tone, "click", function () {
|
||||
colorPop.showAnchor(tone);
|
||||
@ -39,18 +40,18 @@
|
||||
colorPop.hide();
|
||||
});
|
||||
colorPiker.addListener("picknocolor", function () {
|
||||
tone.value="";
|
||||
tone.value = "";
|
||||
colorPop.hide();
|
||||
});
|
||||
dialog.onok=function(){
|
||||
editor.execCommand("edittd",tone.value);
|
||||
dialog.onok = function () {
|
||||
editor.execCommand("edittd", tone.value);
|
||||
};
|
||||
|
||||
var start = editor.selection.getStart(),
|
||||
cell = start && domUtils.findParentByTagName(start, ["td", "th"], true);
|
||||
if(cell){
|
||||
var color = domUtils.getComputedStyle(cell,'background-color');
|
||||
if(/^#/.test(color)){
|
||||
if (cell) {
|
||||
var color = domUtils.getComputedStyle(cell, 'background-color');
|
||||
if (/^#/.test(color)) {
|
||||
tone.value = color
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>表格删除提示</title>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<style type="text/css">
|
||||
.section {
|
||||
width: 200px;
|
||||
|
@ -7,36 +7,36 @@
|
||||
*/
|
||||
var templates = [
|
||||
{
|
||||
"pre":"pre0.png",
|
||||
'title':lang.blank,
|
||||
'preHtml':'<p class="ue_t"> 欢迎使用UEditor!</p>',
|
||||
"html":'<p class="ue_t">欢迎使用UEditor!</p>'
|
||||
"pre": "pre0.png",
|
||||
'title': lang.blank,
|
||||
'preHtml': '<p class="ue_t"> 欢迎使用UEditor!</p>',
|
||||
"html": '<p class="ue_t">欢迎使用UEditor!</p>'
|
||||
|
||||
},
|
||||
{
|
||||
"pre":"pre1.png",
|
||||
'title':lang.blog,
|
||||
'preHtml':'<h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;"><span style="color:#c0504d;">深入理解Range</span></h1><p style="text-align:center;"><strong class=" ">UEditor二次开发</strong></p><h3><span class=" " style="font-family:幼圆">什么是Range</span></h3><p style="text-indent:2em;">对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 </p><br /><h3><span class=" " style="font-family:幼圆">Range能干什么</span></h3><p style="text-indent:2em;">在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。</p>',
|
||||
"html":'<h1 class="ue_t" label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;"><span style="color:#c0504d;">[键入文档标题]</span></h1><p style="text-align:center;"><strong class="ue_t">[键入文档副标题]</strong></p><h3><span class="ue_t" style="font-family:幼圆">[标题 1]</span></h3><p class="ue_t" style="text-indent:2em;">对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。</p><h3><span class="ue_t" style="font-family:幼圆">[标题 2]</span></h3><p class="ue_t" style="text-indent:2em;">在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。 您还可以使用“开始”选项卡上的其他控件来直接设置文本格式。大多数控件都允许您选择是使用当前主题外观,还是使用某种直接指定的格式。 </p><h3><span class="ue_t" style="font-family:幼圆">[标题 3]</span></h3><p class="ue_t">对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。</p><p class="ue_t"><br /></p>'
|
||||
"pre": "pre1.png",
|
||||
'title': lang.blog,
|
||||
'preHtml': '<h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;"><span style="color:#c0504d;">深入理解Range</span></h1><p style="text-align:center;"><strong class=" ">UEditor二次开发</strong></p><h3><span class=" " style="font-family:幼圆">什么是Range</span></h3><p style="text-indent:2em;">对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 </p><br /><h3><span class=" " style="font-family:幼圆">Range能干什么</span></h3><p style="text-indent:2em;">在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。</p>',
|
||||
"html": '<h1 class="ue_t" label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;"><span style="color:#c0504d;">[键入文档标题]</span></h1><p style="text-align:center;"><strong class="ue_t">[键入文档副标题]</strong></p><h3><span class="ue_t" style="font-family:幼圆">[标题 1]</span></h3><p class="ue_t" style="text-indent:2em;">对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。</p><h3><span class="ue_t" style="font-family:幼圆">[标题 2]</span></h3><p class="ue_t" style="text-indent:2em;">在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。 您还可以使用“开始”选项卡上的其他控件来直接设置文本格式。大多数控件都允许您选择是使用当前主题外观,还是使用某种直接指定的格式。 </p><h3><span class="ue_t" style="font-family:幼圆">[标题 3]</span></h3><p class="ue_t">对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。</p><p class="ue_t"><br /></p>'
|
||||
|
||||
},
|
||||
{
|
||||
"pre":"pre2.png",
|
||||
'title':lang.resume,
|
||||
'preHtml':'<h1 label="Title left" name="tl" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;margin:0px 0px 10px;"><span style="color:#e36c09;" class=" ">WEB前端开发简历</span></h1><table width="100%" border="1" bordercolor="#95B3D7" style="border-collapse:collapse;"><tbody><tr><td width="100" style="text-align:center;"><p><span style="background-color:transparent;">插</span><br /></p><p>入</p><p>照</p><p>片</p></td><td><p><span style="background-color:transparent;"> 联系电话:</span><span class="ue_t" style="background-color:transparent;">[键入您的电话]</span><br /></p><p><span style="background-color:transparent;"> 电子邮件:</span><span class="ue_t" style="background-color:transparent;">[键入您的电子邮件地址]</span><br /></p><p><span style="background-color:transparent;"> 家庭住址:</span><span class="ue_t" style="background-color:transparent;">[键入您的地址]</span><br /></p></td></tr></tbody></table><h3><span style="color:#E36C09;font-size:20px;">目标职位</span></h3><p style="text-indent:2em;" class=" ">WEB前端研发工程师</p><h3><span style="color:#e36c09;font-size:20px;">学历</span></h3><p><span style="display:none;line-height:0px;" id="_baidu_bookmark_start_26"></span></p><ol style="list-style-type:decimal;"><li><p><span class="ue_t">[起止时间]</span> <span class="ue_t">[学校名称] </span> <span class="ue_t">[所学专业]</span> <span class="ue_t">[所获学位]</span></p></li></ol><h3><span style="color:#e36c09;font-size:20px;" class="ue_t">工作经验</span></h3><p><br /></p>',
|
||||
"html":'<h1 label="Title left" name="tl" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;margin:0px 0px 10px;"><span style="color:#e36c09;" class="ue_t">[此处键入简历标题]</span></h1><p><span style="color:#e36c09;"><br /></span></p><table width="100%" border="1" bordercolor="#95B3D7" style="border-collapse:collapse;"><tbody><tr><td width="200" style="text-align:center;" class="ue_t">【此处插入照片】</td><td><p><br /></p><p> 联系电话:<span class="ue_t">[键入您的电话]</span></p><p><br /></p><p> 电子邮件:<span class="ue_t">[键入您的电子邮件地址]</span></p><p><br /></p><p> 家庭住址:<span class="ue_t">[键入您的地址]</span></p><p><br /></p></td></tr></tbody></table><h3><span style="color:#e36c09;font-size:20px;">目标职位</span></h3><p style="text-indent:2em;" class="ue_t">[此处键入您的期望职位]</p><h3><span style="color:#e36c09;font-size:20px;">学历</span></h3><p><span style="display:none;line-height:0px;" id="_baidu_bookmark_start_26"></span></p><ol style="list-style-type:decimal;"><li><p><span class="ue_t">[键入起止时间]</span> <span class="ue_t">[键入学校名称] </span> <span class="ue_t">[键入所学专业]</span> <span class="ue_t">[键入所获学位]</span></p></li><li><p><span class="ue_t">[键入起止时间]</span> <span class="ue_t">[键入学校名称]</span> <span class="ue_t">[键入所学专业]</span> <span class="ue_t">[键入所获学位]</span></p></li></ol><h3><span style="color:#e36c09;font-size:20px;" class="ue_t">工作经验</span></h3><ol style="list-style-type:decimal;"><li><p><span class="ue_t">[键入起止时间]</span> <span class="ue_t">[键入公司名称]</span> <span class="ue_t">[键入职位名称]</span> </p></li><ol style="list-style-type:lower-alpha;"><li><p><span class="ue_t">[键入负责项目]</span> <span class="ue_t">[键入项目简介]</span></p></li><li><p><span class="ue_t">[键入负责项目]</span> <span class="ue_t">[键入项目简介]</span></p></li></ol><li><p><span class="ue_t">[键入起止时间]</span> <span class="ue_t">[键入公司名称]</span> <span class="ue_t">[键入职位名称]</span> </p></li><ol style="list-style-type:lower-alpha;"><li><p><span class="ue_t">[键入负责项目]</span> <span class="ue_t">[键入项目简介]</span></p></li></ol></ol><p><span style="color:#e36c09;font-size:20px;">掌握技能</span></p><p style="text-indent:2em;"> <span class="ue_t">[这里可以键入您所掌握的技能]</span><br /></p>'
|
||||
"pre": "pre2.png",
|
||||
'title': lang.resume,
|
||||
'preHtml': '<h1 label="Title left" name="tl" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;margin:0px 0px 10px;"><span style="color:#e36c09;" class=" ">WEB前端开发简历</span></h1><table width="100%" border="1" bordercolor="#95B3D7" style="border-collapse:collapse;"><tbody><tr><td width="100" style="text-align:center;"><p><span style="background-color:transparent;">插</span><br /></p><p>入</p><p>照</p><p>片</p></td><td><p><span style="background-color:transparent;"> 联系电话:</span><span class="ue_t" style="background-color:transparent;">[键入您的电话]</span><br /></p><p><span style="background-color:transparent;"> 电子邮件:</span><span class="ue_t" style="background-color:transparent;">[键入您的电子邮件地址]</span><br /></p><p><span style="background-color:transparent;"> 家庭住址:</span><span class="ue_t" style="background-color:transparent;">[键入您的地址]</span><br /></p></td></tr></tbody></table><h3><span style="color:#E36C09;font-size:20px;">目标职位</span></h3><p style="text-indent:2em;" class=" ">WEB前端研发工程师</p><h3><span style="color:#e36c09;font-size:20px;">学历</span></h3><p><span style="display:none;line-height:0px;" id="_baidu_bookmark_start_26"></span></p><ol style="list-style-type:decimal;"><li><p><span class="ue_t">[起止时间]</span> <span class="ue_t">[学校名称] </span> <span class="ue_t">[所学专业]</span> <span class="ue_t">[所获学位]</span></p></li></ol><h3><span style="color:#e36c09;font-size:20px;" class="ue_t">工作经验</span></h3><p><br /></p>',
|
||||
"html": '<h1 label="Title left" name="tl" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;margin:0px 0px 10px;"><span style="color:#e36c09;" class="ue_t">[此处键入简历标题]</span></h1><p><span style="color:#e36c09;"><br /></span></p><table width="100%" border="1" bordercolor="#95B3D7" style="border-collapse:collapse;"><tbody><tr><td width="200" style="text-align:center;" class="ue_t">【此处插入照片】</td><td><p><br /></p><p> 联系电话:<span class="ue_t">[键入您的电话]</span></p><p><br /></p><p> 电子邮件:<span class="ue_t">[键入您的电子邮件地址]</span></p><p><br /></p><p> 家庭住址:<span class="ue_t">[键入您的地址]</span></p><p><br /></p></td></tr></tbody></table><h3><span style="color:#e36c09;font-size:20px;">目标职位</span></h3><p style="text-indent:2em;" class="ue_t">[此处键入您的期望职位]</p><h3><span style="color:#e36c09;font-size:20px;">学历</span></h3><p><span style="display:none;line-height:0px;" id="_baidu_bookmark_start_26"></span></p><ol style="list-style-type:decimal;"><li><p><span class="ue_t">[键入起止时间]</span> <span class="ue_t">[键入学校名称] </span> <span class="ue_t">[键入所学专业]</span> <span class="ue_t">[键入所获学位]</span></p></li><li><p><span class="ue_t">[键入起止时间]</span> <span class="ue_t">[键入学校名称]</span> <span class="ue_t">[键入所学专业]</span> <span class="ue_t">[键入所获学位]</span></p></li></ol><h3><span style="color:#e36c09;font-size:20px;" class="ue_t">工作经验</span></h3><ol style="list-style-type:decimal;"><li><p><span class="ue_t">[键入起止时间]</span> <span class="ue_t">[键入公司名称]</span> <span class="ue_t">[键入职位名称]</span> </p></li><ol style="list-style-type:lower-alpha;"><li><p><span class="ue_t">[键入负责项目]</span> <span class="ue_t">[键入项目简介]</span></p></li><li><p><span class="ue_t">[键入负责项目]</span> <span class="ue_t">[键入项目简介]</span></p></li></ol><li><p><span class="ue_t">[键入起止时间]</span> <span class="ue_t">[键入公司名称]</span> <span class="ue_t">[键入职位名称]</span> </p></li><ol style="list-style-type:lower-alpha;"><li><p><span class="ue_t">[键入负责项目]</span> <span class="ue_t">[键入项目简介]</span></p></li></ol></ol><p><span style="color:#e36c09;font-size:20px;">掌握技能</span></p><p style="text-indent:2em;"> <span class="ue_t">[这里可以键入您所掌握的技能]</span><br /></p>'
|
||||
|
||||
},
|
||||
{
|
||||
"pre":"pre3.png",
|
||||
'title':lang.richText,
|
||||
'preHtml':'<h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;" class="ue_t">[此处键入文章标题]</h1><p><img src="http://img.baidu.com/hi/youa/y_0034.gif" width="150" height="100" border="0" hspace="0" vspace="0" style="width:150px;height:100px;float:left;" />图文混排方法</p><p>图片居左,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文</p><p><br /></p><p><img src="http://img.baidu.com/hi/youa/y_0040.gif" width="100" height="100" border="0" hspace="0" vspace="0" style="width:100px;height:100px;float:right;" /></p><p>还有没有什么其他的环绕方式呢?这里是居右环绕</p><p><br /></p><p>欢迎大家多多尝试,为UEditor提供更多高质量模板!</p>',
|
||||
"html":'<p><br /></p><h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;" class="ue_t">[此处键入文章标题]</h1><p><img src="http://img.baidu.com/hi/youa/y_0034.gif" width="300" height="200" border="0" hspace="0" vspace="0" style="width:300px;height:200px;float:left;" />图文混排方法</p><p>1. 图片居左,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文本</p><p><br /></p><p>2. 图片居右,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居右对齐,然后即可在左边输入多行文本</p><p><br /></p><p>3. 图片居中环绕排版</p><p>方法:亲,这个真心没有办法。。。</p><p><br /></p><p><br /></p><p><img src="http://img.baidu.com/hi/youa/y_0040.gif" width="300" height="300" border="0" hspace="0" vspace="0" style="width:300px;height:300px;float:right;" /></p><p>还有没有什么其他的环绕方式呢?这里是居右环绕</p><p><br /></p><p>欢迎大家多多尝试,为UEditor提供更多高质量模板!</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p><br /></p>'
|
||||
"pre": "pre3.png",
|
||||
'title': lang.richText,
|
||||
'preHtml': '<h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;" class="ue_t">[此处键入文章标题]</h1><p><img src="http://img.baidu.com/hi/youa/y_0034.gif" width="150" height="100" border="0" hspace="0" vspace="0" style="width:150px;height:100px;float:left;" />图文混排方法</p><p>图片居左,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文</p><p><br /></p><p><img src="http://img.baidu.com/hi/youa/y_0040.gif" width="100" height="100" border="0" hspace="0" vspace="0" style="width:100px;height:100px;float:right;" /></p><p>还有没有什么其他的环绕方式呢?这里是居右环绕</p><p><br /></p><p>欢迎大家多多尝试,为UEditor提供更多高质量模板!</p>',
|
||||
"html": '<p><br /></p><h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;" class="ue_t">[此处键入文章标题]</h1><p><img src="http://img.baidu.com/hi/youa/y_0034.gif" width="300" height="200" border="0" hspace="0" vspace="0" style="width:300px;height:200px;float:left;" />图文混排方法</p><p>1. 图片居左,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文本</p><p><br /></p><p>2. 图片居右,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居右对齐,然后即可在左边输入多行文本</p><p><br /></p><p>3. 图片居中环绕排版</p><p>方法:亲,这个真心没有办法。。。</p><p><br /></p><p><br /></p><p><img src="http://img.baidu.com/hi/youa/y_0040.gif" width="300" height="300" border="0" hspace="0" vspace="0" style="width:300px;height:300px;float:right;" /></p><p>还有没有什么其他的环绕方式呢?这里是居右环绕</p><p><br /></p><p>欢迎大家多多尝试,为UEditor提供更多高质量模板!</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p><br /></p>'
|
||||
},
|
||||
{
|
||||
"pre":"pre4.png",
|
||||
'title':lang.sciPapers,
|
||||
'preHtml':'<h2 style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;margin:0px 0px 10px;text-align:center;" class="ue_t">[键入文章标题]</h2><p><strong><span style="font-size:12px;">摘要</span></strong><span style="font-size:12px;" class="ue_t">:这里可以输入很长很长很长很长很长很长很长很长很差的摘要</span></p><p style="line-height:1.5em;"><strong>标题 1</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">这里可以输入很多内容,可以图文混排,可以有列表等。</span></p><p style="line-height:1.5em;"><strong>标题 2</strong></p><ol style="list-style-type:lower-alpha;"><li><p class="ue_t">列表 1</p></li><li><p class="ue_t">列表 2</p></li><ol style="list-style-type:lower-roman;"><li><p class="ue_t">多级列表 1</p></li><li><p class="ue_t">多级列表 2</p></li></ol><li><p class="ue_t">列表 3<br /></p></li></ol><p style="line-height:1.5em;"><strong>标题 3</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">来个文字图文混排的</span></p><p style="text-indent:2em;"><br /></p>',
|
||||
'html':'<h2 style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;margin:0px 0px 10px;text-align:center;" class="ue_t">[键入文章标题]</h2><p><strong><span style="font-size:12px;">摘要</span></strong><span style="font-size:12px;" class="ue_t">:这里可以输入很长很长很长很长很长很长很长很长很差的摘要</span></p><p style="line-height:1.5em;"><strong>标题 1</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">这里可以输入很多内容,可以图文混排,可以有列表等。</span></p><p style="line-height:1.5em;"><strong>标题 2</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">来个列表瞅瞅:</span></p><ol style="list-style-type:lower-alpha;"><li><p class="ue_t">列表 1</p></li><li><p class="ue_t">列表 2</p></li><ol style="list-style-type:lower-roman;"><li><p class="ue_t">多级列表 1</p></li><li><p class="ue_t">多级列表 2</p></li></ol><li><p class="ue_t">列表 3<br /></p></li></ol><p style="line-height:1.5em;"><strong>标题 3</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">来个文字图文混排的</span></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">这里可以多行</span></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">右边是图片</span></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">绝对没有问题的,不信你也可以试试看</span></p><p><br /></p>'
|
||||
"pre": "pre4.png",
|
||||
'title': lang.sciPapers,
|
||||
'preHtml': '<h2 style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;margin:0px 0px 10px;text-align:center;" class="ue_t">[键入文章标题]</h2><p><strong><span style="font-size:12px;">摘要</span></strong><span style="font-size:12px;" class="ue_t">:这里可以输入很长很长很长很长很长很长很长很长很差的摘要</span></p><p style="line-height:1.5em;"><strong>标题 1</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">这里可以输入很多内容,可以图文混排,可以有列表等。</span></p><p style="line-height:1.5em;"><strong>标题 2</strong></p><ol style="list-style-type:lower-alpha;"><li><p class="ue_t">列表 1</p></li><li><p class="ue_t">列表 2</p></li><ol style="list-style-type:lower-roman;"><li><p class="ue_t">多级列表 1</p></li><li><p class="ue_t">多级列表 2</p></li></ol><li><p class="ue_t">列表 3<br /></p></li></ol><p style="line-height:1.5em;"><strong>标题 3</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">来个文字图文混排的</span></p><p style="text-indent:2em;"><br /></p>',
|
||||
'html': '<h2 style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;margin:0px 0px 10px;text-align:center;" class="ue_t">[键入文章标题]</h2><p><strong><span style="font-size:12px;">摘要</span></strong><span style="font-size:12px;" class="ue_t">:这里可以输入很长很长很长很长很长很长很长很长很差的摘要</span></p><p style="line-height:1.5em;"><strong>标题 1</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">这里可以输入很多内容,可以图文混排,可以有列表等。</span></p><p style="line-height:1.5em;"><strong>标题 2</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">来个列表瞅瞅:</span></p><ol style="list-style-type:lower-alpha;"><li><p class="ue_t">列表 1</p></li><li><p class="ue_t">列表 2</p></li><ol style="list-style-type:lower-roman;"><li><p class="ue_t">多级列表 1</p></li><li><p class="ue_t">多级列表 2</p></li></ol><li><p class="ue_t">列表 3<br /></p></li></ol><p style="line-height:1.5em;"><strong>标题 3</strong></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">来个文字图文混排的</span></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">这里可以多行</span></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">右边是图片</span></p><p style="text-indent:2em;"><span style="font-size:14px;" class="ue_t">绝对没有问题的,不信你也可以试试看</span></p><p><br /></p>'
|
||||
}
|
||||
];
|
@ -1,18 +1,99 @@
|
||||
.wrap{ padding: 5px;font-size: 14px;}
|
||||
.left{width:425px;float: left;}
|
||||
.right{width:160px;border: 1px solid #ccc;float: right;padding: 5px;margin-right: 5px;}
|
||||
.right .pre{height: 332px;overflow-y: auto;}
|
||||
.right .preitem{border: white 1px solid;margin: 5px 0;padding: 2px 0;}
|
||||
.right .preitem:hover{background-color: lemonChiffon;cursor: pointer;border: #ccc 1px solid;}
|
||||
.right .preitem img{display: block;margin: 0 auto;width:100px;}
|
||||
.clear{clear: both;}
|
||||
.top{height:26px;line-height: 26px;padding: 5px;}
|
||||
.bottom{height:320px;width:100%;margin: 0 auto;}
|
||||
.transparent{ background: url("images/bg.gif") repeat;}
|
||||
.bottom table tr td{border:1px dashed #ccc;}
|
||||
#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;}
|
||||
.border_style1{padding:2px;border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;}
|
||||
p{margin: 5px 0}
|
||||
table{clear:both;margin-bottom:10px;border-collapse:collapse;word-break:break-all;}
|
||||
li{clear:both}
|
||||
ol{padding-left:40px; }
|
||||
.wrap {
|
||||
padding: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.left {
|
||||
width: 425px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 160px;
|
||||
border: 1px solid #ccc;
|
||||
float: right;
|
||||
padding: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.right .pre {
|
||||
height: 332px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.right .preitem {
|
||||
border: white 1px solid;
|
||||
margin: 5px 0;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.right .preitem:hover {
|
||||
background-color: lemonChiffon;
|
||||
cursor: pointer;
|
||||
border: #ccc 1px solid;
|
||||
}
|
||||
|
||||
.right .preitem img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.top {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
height: 320px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.transparent {
|
||||
background: url("images/bg.gif") repeat;
|
||||
}
|
||||
|
||||
.bottom table tr td {
|
||||
border: 1px dashed #ccc;
|
||||
}
|
||||
|
||||
#colorPicker {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border: 1px solid #CCC;
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
box-shadow: 2px 2px 5px #D3D6DA;
|
||||
}
|
||||
|
||||
.border_style1 {
|
||||
padding: 2px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
box-shadow: 2px 2px 5px #d3d6da;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 5px 0
|
||||
}
|
||||
|
||||
table {
|
||||
clear: both;
|
||||
margin-bottom: 10px;
|
||||
border-collapse: collapse;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
li {
|
||||
clear: both
|
||||
}
|
||||
|
||||
ol {
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="template.css?20220503">
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" type="text/css" href="template.css?18a023c1">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<div class="wrap">
|
||||
<div class="left">
|
||||
<div class="top">
|
||||
<label><var id="lang_template_clear"></var>:<input id="issave" type="checkbox"></label>
|
||||
@ -19,8 +19,8 @@
|
||||
<div class="pre" id="preitem"></div>
|
||||
</fieldset>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<script type="text/javascript" src="config.js?20220503"></script>
|
||||
<script type="text/javascript" src="template.js?20220503"></script>
|
||||
</div>
|
||||
<script type="text/javascript" src="config.js?9434a730"></script>
|
||||
<script type="text/javascript" src="template.js?2d269423"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -7,44 +7,44 @@
|
||||
*/
|
||||
(function () {
|
||||
var me = editor,
|
||||
preview = $G( "preview" ),
|
||||
preitem = $G( "preitem" ),
|
||||
preview = $G("preview"),
|
||||
preitem = $G("preitem"),
|
||||
tmps = templates,
|
||||
currentTmp;
|
||||
var initPre = function () {
|
||||
var str = "";
|
||||
for ( var i = 0, tmp; tmp = tmps[i++]; ) {
|
||||
for (var i = 0, tmp; tmp = tmps[i++];) {
|
||||
str += '<div class="preitem" onclick="pre(' + i + ')"><img src="' + "images/" + tmp.pre + '" ' + (tmp.title ? "alt=" + tmp.title + " title=" + tmp.title + "" : "") + '></div>';
|
||||
}
|
||||
preitem.innerHTML = str;
|
||||
};
|
||||
var pre = function ( n ) {
|
||||
var pre = function (n) {
|
||||
var tmp = tmps[n - 1];
|
||||
currentTmp = tmp;
|
||||
clearItem();
|
||||
domUtils.setStyles( preitem.childNodes[n - 1], {
|
||||
"background-color":"lemonChiffon",
|
||||
"border":"#ccc 1px solid"
|
||||
} );
|
||||
domUtils.setStyles(preitem.childNodes[n - 1], {
|
||||
"background-color": "lemonChiffon",
|
||||
"border": "#ccc 1px solid"
|
||||
});
|
||||
preview.innerHTML = tmp.preHtml ? tmp.preHtml : "";
|
||||
};
|
||||
var clearItem = function () {
|
||||
var items = preitem.children;
|
||||
for ( var i = 0, item; item = items[i++]; ) {
|
||||
domUtils.setStyles( item, {
|
||||
"background-color":"",
|
||||
"border":"white 1px solid"
|
||||
} );
|
||||
for (var i = 0, item; item = items[i++];) {
|
||||
domUtils.setStyles(item, {
|
||||
"background-color": "",
|
||||
"border": "white 1px solid"
|
||||
});
|
||||
}
|
||||
};
|
||||
dialog.onok = function () {
|
||||
if ( !$G( "issave" ).checked ){
|
||||
me.execCommand( "cleardoc" );
|
||||
if (!$G("issave").checked) {
|
||||
me.execCommand("cleardoc");
|
||||
}
|
||||
var obj = {
|
||||
html:currentTmp && currentTmp.html
|
||||
html: currentTmp && currentTmp.html
|
||||
};
|
||||
me.execCommand( "template", obj );
|
||||
me.execCommand("template", obj);
|
||||
};
|
||||
initPre();
|
||||
window.pre = pre;
|
||||
|
@ -1,6 +1,16 @@
|
||||
@charset "utf-8";
|
||||
.wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative}
|
||||
.tabbody{height: 355px;}
|
||||
.wrapper {
|
||||
width: 570px;
|
||||
_width: 575px;
|
||||
margin: 10px auto;
|
||||
zoom: 1;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.tabbody {
|
||||
height: 355px;
|
||||
}
|
||||
|
||||
.tabbody .panel {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
@ -9,13 +19,17 @@
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabbody .panel.focus {
|
||||
width: 100%;
|
||||
height: 355px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tabbody .panel table td{vertical-align: middle;}
|
||||
.tabbody .panel table td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#videoUrl {
|
||||
width: 380px;
|
||||
height: 26px;
|
||||
@ -24,10 +38,11 @@
|
||||
background: #FFF;
|
||||
border: 1px solid #d7d7d7;
|
||||
outline: none;
|
||||
border-radius:3px;
|
||||
padding:0 5px;
|
||||
border-radius: 3px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
#videoSelect{
|
||||
|
||||
#videoSelect {
|
||||
width: 100px;
|
||||
display: inline-block;
|
||||
background: #FFF;
|
||||
@ -39,18 +54,49 @@
|
||||
border-radius: 3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#videoSearchTxt{margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;}
|
||||
#searchList{width: 570px;overflow: auto;zoom:1;height: 270px;}
|
||||
#searchList div{float: left;width: 120px;height: 135px;margin: 5px 15px;}
|
||||
#searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/
|
||||
#searchList p{margin-left: 10px;}
|
||||
#videoType{
|
||||
|
||||
#videoSearchTxt {
|
||||
margin-left: 15px;
|
||||
background: #FFF;
|
||||
width: 200px;
|
||||
height: 21px;
|
||||
line-height: 21px;
|
||||
border: 1px solid #d7d7d7;
|
||||
}
|
||||
|
||||
#searchList {
|
||||
width: 570px;
|
||||
overflow: auto;
|
||||
zoom: 1;
|
||||
height: 270px;
|
||||
}
|
||||
|
||||
#searchList div {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 135px;
|
||||
margin: 5px 15px;
|
||||
}
|
||||
|
||||
#searchList img {
|
||||
margin: 2px 8px;
|
||||
cursor: pointer;
|
||||
border: 2px solid #fff
|
||||
}
|
||||
|
||||
/*不用缩略图*/
|
||||
#searchList p {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#videoType {
|
||||
width: 65px;
|
||||
height: 23px;
|
||||
line-height: 22px;
|
||||
border: 1px solid #d7d7d7;
|
||||
}
|
||||
#videoSearchBtn,#videoSearchReset{
|
||||
|
||||
#videoSearchBtn, #videoSearchReset {
|
||||
/*width: 80px;*/
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
@ -61,12 +107,46 @@
|
||||
}
|
||||
|
||||
|
||||
#preview {
|
||||
position: relative;
|
||||
width: 420px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
margin-left: 10px;
|
||||
_margin-left: 5px;
|
||||
height: 280px;
|
||||
background-color: #ddd;
|
||||
float: left
|
||||
}
|
||||
|
||||
#preview{position: relative;width: 420px;padding:0;overflow: hidden; margin-left: 10px; _margin-left:5px; height: 280px;background-color: #ddd;float: left}
|
||||
#preview .previewMsg {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;background-color: #666;}
|
||||
#preview .previewMsg span{display:block;margin: 125px auto 0 auto;text-align:center;font-size:18px;color:#fff;}
|
||||
#preview .previewVideo {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;}
|
||||
.edui-video-wrapper fieldset{
|
||||
#preview .previewMsg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 280px;
|
||||
width: 100%;
|
||||
background-color: #666;
|
||||
}
|
||||
|
||||
#preview .previewMsg span {
|
||||
display: block;
|
||||
margin: 125px auto 0 auto;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#preview .previewVideo {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 280px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edui-video-wrapper fieldset {
|
||||
border: 1px solid #ddd;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 20px;
|
||||
@ -74,17 +154,30 @@
|
||||
width: 115px;
|
||||
}
|
||||
|
||||
#videoInfo {width: 120px;float: left;margin-left: 10px;_margin-left:7px;}
|
||||
fieldset{
|
||||
#videoInfo {
|
||||
width: 120px;
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
_margin-left: 7px;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #ddd;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 5px;
|
||||
width: 115px;
|
||||
}
|
||||
fieldset legend{font-weight: bold;}
|
||||
fieldset p{line-height: 30px;}
|
||||
fieldset input.txt{
|
||||
|
||||
fieldset legend {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
fieldset p {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
fieldset input.txt {
|
||||
width: 65px;
|
||||
height: 21px;
|
||||
line-height: 21px;
|
||||
@ -92,12 +185,35 @@ fieldset input.txt{
|
||||
background: #FFF;
|
||||
border: 1px solid #d7d7d7;
|
||||
}
|
||||
label.url{font-weight: bold;margin-left: 5px;}
|
||||
#videoFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;}
|
||||
#videoFloat .focus{opacity: 1;filter: alpha(opacity = 100)}
|
||||
span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue}
|
||||
|
||||
label.url {
|
||||
font-weight: bold;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#videoFloat div {
|
||||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
margin: 9px;
|
||||
_margin: 5px;
|
||||
width: 38px;
|
||||
height: 36px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#videoFloat .focus {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100)
|
||||
}
|
||||
|
||||
span.view {
|
||||
display: inline-block;
|
||||
width: 30px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
color: blue
|
||||
}
|
||||
|
||||
|
||||
/* upload video */
|
||||
@ -110,17 +226,45 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
background: #fff;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tabbody #upload.panel.focus {
|
||||
width: 100%;
|
||||
height: 335px;
|
||||
display: block;
|
||||
clip: auto;
|
||||
}
|
||||
#upload_alignment div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;}
|
||||
#upload_alignment .focus{opacity: 1;filter: alpha(opacity = 100)}
|
||||
#upload_left { width:427px; float:left; }
|
||||
#upload_left .controller { height: 30px; clear: both; }
|
||||
#uploadVideoInfo{margin-top:10px;float:right;padding-right:8px;}
|
||||
|
||||
#upload_alignment div {
|
||||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
margin: 9px;
|
||||
_margin: 5px;
|
||||
width: 38px;
|
||||
height: 36px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#upload_alignment .focus {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100)
|
||||
}
|
||||
|
||||
#upload_left {
|
||||
width: 427px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#upload_left .controller {
|
||||
height: 30px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#uploadVideoInfo {
|
||||
margin-top: 10px;
|
||||
float: right;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#upload .queueList {
|
||||
margin: 0;
|
||||
@ -143,7 +287,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
|
||||
#upload .placeholder {
|
||||
margin: 10px;
|
||||
margin-right:0;
|
||||
margin-right: 0;
|
||||
border: 2px dashed #e6e6e6;
|
||||
*border: 0px dashed #e6e6e6;
|
||||
height: 161px;
|
||||
@ -155,7 +299,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
color: #cccccc;
|
||||
font-size: 18px;
|
||||
position: relative;
|
||||
top:0;
|
||||
top: 0;
|
||||
*margin-left: 0;
|
||||
*left: 10px;
|
||||
}
|
||||
@ -340,12 +484,14 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
-ms-transition: 200ms ease-out;
|
||||
transition: 200ms ease-out;
|
||||
}
|
||||
|
||||
#upload .filelist li p.imgWrap.notimage {
|
||||
margin-top: 0;
|
||||
width: 111px;
|
||||
height: 111px;
|
||||
border: 1px #eeeeee solid;
|
||||
}
|
||||
|
||||
#upload .filelist li p.imgWrap.notimage i.file-preview {
|
||||
margin-top: 15px;
|
||||
}
|
||||
@ -364,7 +510,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
line-height: 28px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
display:none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#upload .filelist li .success {
|
||||
@ -386,6 +532,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#upload .filelist li.filePickerBlock div.webuploader-pick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -419,7 +566,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
background: url(./images/icons.gif) no-repeat \9;
|
||||
margin: 5px 1px 1px;
|
||||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
@ -427,7 +574,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateLeft {
|
||||
display:none;
|
||||
display: none;
|
||||
background-position: 0 -24px;
|
||||
}
|
||||
|
||||
@ -436,7 +583,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
}
|
||||
|
||||
#upload .filelist div.file-panel span.rotateRight {
|
||||
display:none;
|
||||
display: none;
|
||||
background-position: -24px -24px;
|
||||
}
|
||||
|
||||
@ -475,6 +622,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
color: #6dbfff;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress span.percentage {
|
||||
width: 0;
|
||||
height: 100%;
|
||||
@ -483,6 +631,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
background: #1483d8;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#upload .statusBar .progress span.text {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
@ -505,6 +654,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .webuploader-pick,
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading,
|
||||
@ -524,6 +674,7 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .webuploader-pick-hover,
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-uploading:hover,
|
||||
@ -532,20 +683,21 @@ span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color:
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused{
|
||||
#upload .statusBar .btns .uploadBtn.state-paused {
|
||||
background: #00b7ee;
|
||||
color: #fff;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn:hover,
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover{
|
||||
#upload .statusBar .btns .uploadBtn.state-paused:hover {
|
||||
background: #00a2d4;
|
||||
}
|
||||
|
||||
#upload .statusBar .btns .uploadBtn.disabled {
|
||||
pointer-events: none;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
filter: alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
-khtml-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
@ -562,41 +714,51 @@ i.file-preview {
|
||||
background-position: -140px center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
i.file-preview.file-type-dir{
|
||||
|
||||
i.file-preview.file-type-dir {
|
||||
background-position: 0 center;
|
||||
}
|
||||
i.file-preview.file-type-file{
|
||||
|
||||
i.file-preview.file-type-file {
|
||||
background-position: -140px center;
|
||||
}
|
||||
i.file-preview.file-type-filelist{
|
||||
|
||||
i.file-preview.file-type-filelist {
|
||||
background-position: -210px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-zip,
|
||||
i.file-preview.file-type-rar,
|
||||
i.file-preview.file-type-7z,
|
||||
i.file-preview.file-type-tar,
|
||||
i.file-preview.file-type-gz,
|
||||
i.file-preview.file-type-bz2{
|
||||
i.file-preview.file-type-bz2 {
|
||||
background-position: -280px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-xls,
|
||||
i.file-preview.file-type-xlsx{
|
||||
i.file-preview.file-type-xlsx {
|
||||
background-position: -350px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-doc,
|
||||
i.file-preview.file-type-docx{
|
||||
i.file-preview.file-type-docx {
|
||||
background-position: -420px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-ppt,
|
||||
i.file-preview.file-type-pptx{
|
||||
i.file-preview.file-type-pptx {
|
||||
background-position: -490px center;
|
||||
}
|
||||
i.file-preview.file-type-vsd{
|
||||
|
||||
i.file-preview.file-type-vsd {
|
||||
background-position: -560px center;
|
||||
}
|
||||
i.file-preview.file-type-pdf{
|
||||
|
||||
i.file-preview.file-type-pdf {
|
||||
background-position: -630px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-txt,
|
||||
i.file-preview.file-type-md,
|
||||
i.file-preview.file-type-json,
|
||||
@ -607,18 +769,22 @@ i.file-preview.file-type-js,
|
||||
i.file-preview.file-type-css,
|
||||
i.file-preview.file-type-php,
|
||||
i.file-preview.file-type-jsp,
|
||||
i.file-preview.file-type-asp{
|
||||
i.file-preview.file-type-asp {
|
||||
background-position: -700px center;
|
||||
}
|
||||
i.file-preview.file-type-apk{
|
||||
|
||||
i.file-preview.file-type-apk {
|
||||
background-position: -770px center;
|
||||
}
|
||||
i.file-preview.file-type-exe{
|
||||
|
||||
i.file-preview.file-type-exe {
|
||||
background-position: -840px center;
|
||||
}
|
||||
i.file-preview.file-type-ipa{
|
||||
|
||||
i.file-preview.file-type-ipa {
|
||||
background-position: -910px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-mp4,
|
||||
i.file-preview.file-type-swf,
|
||||
i.file-preview.file-type-mkv,
|
||||
@ -630,21 +796,23 @@ i.file-preview.file-type-mpeg,
|
||||
i.file-preview.file-type-ogv,
|
||||
i.file-preview.file-type-webm,
|
||||
i.file-preview.file-type-rm,
|
||||
i.file-preview.file-type-rmvb{
|
||||
i.file-preview.file-type-rmvb {
|
||||
background-position: -980px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-ogg,
|
||||
i.file-preview.file-type-wav,
|
||||
i.file-preview.file-type-wmv,
|
||||
i.file-preview.file-type-mid,
|
||||
i.file-preview.file-type-mp3{
|
||||
i.file-preview.file-type-mp3 {
|
||||
background-position: -1050px center;
|
||||
}
|
||||
|
||||
i.file-preview.file-type-jpg,
|
||||
i.file-preview.file-type-jpeg,
|
||||
i.file-preview.file-type-gif,
|
||||
i.file-preview.file-type-bmp,
|
||||
i.file-preview.file-type-png,
|
||||
i.file-preview.file-type-psd{
|
||||
i.file-preview.file-type-psd {
|
||||
background-position: -140px center;
|
||||
}
|
||||
|
@ -4,19 +4,26 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="video.css?20220503" />
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<link rel="stylesheet" type="text/css" href="video.css?3ce050b9"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div id="videoTab">
|
||||
<div id="tabHeads" class="tabhead">
|
||||
<span tabSrc="video" class="focus" data-content-id="video"><var id="lang_tab_insertV"></var></span>
|
||||
<span tabSrc="upload" style="display:none;" data-content-id="upload"><var id="lang_tab_uploadV"></var></span>
|
||||
<span tabSrc="upload" style="display:none;" data-content-id="upload"><var
|
||||
id="lang_tab_uploadV"></var></span>
|
||||
</div>
|
||||
<div id="tabBodys" class="tabbody">
|
||||
<div id="video" class="panel focus">
|
||||
<table><tr><td><label for="videoUrl" class="url"><var id="lang_video_url"></var></label></td><td><input id="videoUrl" type="text"><a href="javascript:;" id="videoSelect" style="display:none;">选择视频</a> </td></tr></table>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="videoUrl" class="url"><var id="lang_video_url"></var></label></td>
|
||||
<td><input id="videoUrl" type="text"><a href="javascript:;" id="videoSelect"
|
||||
style="display:none;">选择视频</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding:0 5px 5px 5px;color:#999;">
|
||||
外链视频支持:优酷、腾讯视频、哔哩哔哩
|
||||
</div>
|
||||
@ -25,8 +32,14 @@
|
||||
<fieldset>
|
||||
<legend><var id="lang_video_size"></var></legend>
|
||||
<table>
|
||||
<tr><td><label for="videoWidth"><var id="lang_videoW"></var></label></td><td><input class="txt" id="videoWidth" type="text"/></td></tr>
|
||||
<tr><td><label for="videoHeight"><var id="lang_videoH"></var></label></td><td><input class="txt" id="videoHeight" type="text"/></td></tr>
|
||||
<tr>
|
||||
<td><label for="videoWidth"><var id="lang_videoW"></var></label></td>
|
||||
<td><input class="txt" id="videoWidth" type="text"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="videoHeight"><var id="lang_videoH"></var></label></td>
|
||||
<td><input class="txt" id="videoHeight" type="text"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@ -42,7 +55,8 @@
|
||||
<div class="progress">
|
||||
<span class="text">0%</span>
|
||||
<span class="percentage"></span>
|
||||
</div><div class="info"></div>
|
||||
</div>
|
||||
<div class="info"></div>
|
||||
<div class="btns">
|
||||
<div id="filePickerBtn"></div>
|
||||
<div class="uploadBtn"><var id="lang_start_upload"></var></div>
|
||||
@ -62,8 +76,14 @@
|
||||
<fieldset>
|
||||
<legend><var id="lang_upload_size"></var></legend>
|
||||
<table>
|
||||
<tr><td><label><var id="lang_upload_width"></var></label></td><td><input class="txt" id="upload_width" type="text"/></td></tr>
|
||||
<tr><td><label><var id="lang_upload_height"></var></label></td><td><input class="txt" id="upload_height" type="text"/></td></tr>
|
||||
<tr>
|
||||
<td><label><var id="lang_upload_width"></var></label></td>
|
||||
<td><input class="txt" id="upload_width" type="text"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label><var id="lang_upload_height"></var></label></td>
|
||||
<td><input class="txt" id="upload_height" type="text"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@ -77,13 +97,13 @@
|
||||
</div>
|
||||
|
||||
<!-- jquery -->
|
||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.js?20220503"></script>
|
||||
<script type="text/javascript" src="../../third-party/jquery-1.10.2.js?628072e7"></script>
|
||||
|
||||
<!-- webuploader -->
|
||||
<script type="text/javascript" src="../../third-party/webuploader/webuploader.js?20220503"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css?20220503">
|
||||
<script type="text/javascript" src="../../third-party/webuploader/webuploader.js?21e72664"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css?0057c5c7">
|
||||
|
||||
<!-- video -->
|
||||
<script type="text/javascript" src="video.js?20220503"></script>
|
||||
<script type="text/javascript" src="video.js?101f4d14"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -6,7 +6,7 @@
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
|
||||
(function(){
|
||||
(function () {
|
||||
|
||||
var video = {},
|
||||
uploadVideoList = [],
|
||||
@ -14,7 +14,7 @@
|
||||
uploadFile;
|
||||
var editorOpt = {};
|
||||
|
||||
window.onload = function(){
|
||||
window.onload = function () {
|
||||
editorOpt = editor.getOpt('videoConfig');
|
||||
$focus($G("videoUrl"));
|
||||
initTabs();
|
||||
@ -23,31 +23,31 @@
|
||||
};
|
||||
|
||||
/* 初始化tab标签 */
|
||||
function initTabs(){
|
||||
function initTabs() {
|
||||
var tabs = $G('tabHeads').children;
|
||||
for (var i = 0; i < tabs.length; i++) {
|
||||
domUtils.on(tabs[i], "click", function (e) {
|
||||
var j, bodyId, target = e.target || e.srcElement;
|
||||
for (j = 0; j < tabs.length; j++) {
|
||||
bodyId = tabs[j].getAttribute('data-content-id');
|
||||
if(tabs[j] == target){
|
||||
if (tabs[j] == target) {
|
||||
domUtils.addClass(tabs[j], 'focus');
|
||||
domUtils.addClass($G(bodyId), 'focus');
|
||||
}else {
|
||||
} else {
|
||||
domUtils.removeClasses(tabs[j], 'focus');
|
||||
domUtils.removeClasses($G(bodyId), 'focus');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if(!editorOpt.disableUpload){
|
||||
if (!editorOpt.disableUpload) {
|
||||
$G('tabHeads').querySelector('[data-content-id="upload"]').style.display = 'inline-block';
|
||||
}
|
||||
if(!!editorOpt.selectCallback){
|
||||
if (!!editorOpt.selectCallback) {
|
||||
$G('videoSelect').style.display = 'inline-block';
|
||||
domUtils.on($G('videoSelect'), "click", function (e) {
|
||||
editorOpt.selectCallback(editor,function(info){
|
||||
if(info){
|
||||
editorOpt.selectCallback(editor, function (info) {
|
||||
if (info) {
|
||||
$G('videoUrl').value = info.path;
|
||||
createPreviewVideo(info.path);
|
||||
}
|
||||
@ -56,26 +56,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
function initVideo(){
|
||||
createAlignButton( ["videoFloat", "upload_alignment"] );
|
||||
function initVideo() {
|
||||
createAlignButton(["videoFloat", "upload_alignment"]);
|
||||
addUrlChangeListener($G("videoUrl"));
|
||||
addOkListener();
|
||||
|
||||
//编辑视频时初始化相关信息
|
||||
(function(){
|
||||
var img = editor.selection.getRange().getClosedNode(),url;
|
||||
if(img && img.className){
|
||||
(function () {
|
||||
var img = editor.selection.getRange().getClosedNode(), url;
|
||||
if (img && img.className) {
|
||||
var hasFakedClass = (img.className == "edui-faked-video"),
|
||||
hasUploadClass = img.className.indexOf("edui-upload-video")!=-1;
|
||||
if(hasFakedClass || hasUploadClass) {
|
||||
hasUploadClass = img.className.indexOf("edui-upload-video") != -1;
|
||||
if (hasFakedClass || hasUploadClass) {
|
||||
$G("videoUrl").value = url = img.getAttribute("_url");
|
||||
$G("videoWidth").value = img.width;
|
||||
$G("videoHeight").value = img.height;
|
||||
var align = domUtils.getComputedStyle(img,"float"),
|
||||
parentAlign = domUtils.getComputedStyle(img.parentNode,"text-align");
|
||||
updateAlignButton(parentAlign==="center"?"center":align);
|
||||
var align = domUtils.getComputedStyle(img, "float"),
|
||||
parentAlign = domUtils.getComputedStyle(img.parentNode, "text-align");
|
||||
updateAlignButton(parentAlign === "center" ? "center" : align);
|
||||
}
|
||||
if(hasUploadClass) {
|
||||
if (hasUploadClass) {
|
||||
isModifyUploadVideo = true;
|
||||
}
|
||||
}
|
||||
@ -86,11 +86,11 @@
|
||||
/**
|
||||
* 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作
|
||||
*/
|
||||
function addOkListener(){
|
||||
dialog.onok = function(){
|
||||
function addOkListener() {
|
||||
dialog.onok = function () {
|
||||
$G("preview").innerHTML = "";
|
||||
var currentTab = findFocus("tabHeads","tabSrc");
|
||||
switch(currentTab){
|
||||
var currentTab = findFocus("tabHeads", "tabSrc");
|
||||
switch (currentTab) {
|
||||
case "video":
|
||||
return insertSingle();
|
||||
break;
|
||||
@ -102,7 +102,7 @@
|
||||
break;
|
||||
}
|
||||
};
|
||||
dialog.oncancel = function(){
|
||||
dialog.oncancel = function () {
|
||||
$G("preview").innerHTML = "";
|
||||
};
|
||||
}
|
||||
@ -111,15 +111,15 @@
|
||||
* 依据传入的align值更新按钮信息
|
||||
* @param align
|
||||
*/
|
||||
function updateAlignButton( align ) {
|
||||
var aligns = $G( "videoFloat" ).children;
|
||||
for ( var i = 0, ci; ci = aligns[i++]; ) {
|
||||
if ( ci.getAttribute( "name" ) == align ) {
|
||||
if ( ci.className !="focus" ) {
|
||||
function updateAlignButton(align) {
|
||||
var aligns = $G("videoFloat").children;
|
||||
for (var i = 0, ci; ci = aligns[i++];) {
|
||||
if (ci.getAttribute("name") == align) {
|
||||
if (ci.className != "focus") {
|
||||
ci.className = "focus";
|
||||
}
|
||||
} else {
|
||||
if ( ci.className =="focus" ) {
|
||||
if (ci.className == "focus") {
|
||||
ci.className = "";
|
||||
}
|
||||
}
|
||||
@ -129,39 +129,39 @@
|
||||
/**
|
||||
* 将单个视频信息插入编辑器中
|
||||
*/
|
||||
function insertSingle(){
|
||||
function insertSingle() {
|
||||
var width = $G("videoWidth"),
|
||||
height = $G("videoHeight"),
|
||||
url=$G('videoUrl').value,
|
||||
align = findFocus("videoFloat","name");
|
||||
if(!url) return false;
|
||||
if ( !checkNum( [width, height] ) ) return false;
|
||||
url = $G('videoUrl').value,
|
||||
align = findFocus("videoFloat", "name");
|
||||
if (!url) return false;
|
||||
if (!checkNum([width, height])) return false;
|
||||
editor.execCommand('insertvideo', {
|
||||
url: convert_url(url),
|
||||
width: width.value,
|
||||
height: height.value,
|
||||
align: align
|
||||
}, isModifyUploadVideo ? 'upload':null);
|
||||
}, isModifyUploadVideo ? 'upload' : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将元素id下的所有代表视频的图片插入编辑器中
|
||||
* @param id
|
||||
*/
|
||||
function insertSearch(id){
|
||||
var imgs = domUtils.getElementsByTagName($G(id),"img"),
|
||||
videoObjs=[];
|
||||
for(var i=0,img; img=imgs[i++];){
|
||||
if(img.getAttribute("selected")){
|
||||
function insertSearch(id) {
|
||||
var imgs = domUtils.getElementsByTagName($G(id), "img"),
|
||||
videoObjs = [];
|
||||
for (var i = 0, img; img = imgs[i++];) {
|
||||
if (img.getAttribute("selected")) {
|
||||
videoObjs.push({
|
||||
url:img.getAttribute("ue_video_url"),
|
||||
width:420,
|
||||
height:280,
|
||||
align:"none"
|
||||
url: img.getAttribute("ue_video_url"),
|
||||
width: 420,
|
||||
height: 280,
|
||||
align: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
editor.execCommand('insertvideo',videoObjs);
|
||||
editor.execCommand('insertvideo', videoObjs);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -169,18 +169,19 @@
|
||||
* @param id
|
||||
* @param returnProperty
|
||||
*/
|
||||
function findFocus( id, returnProperty ) {
|
||||
var tabs = $G( id ).children,
|
||||
function findFocus(id, returnProperty) {
|
||||
var tabs = $G(id).children,
|
||||
property;
|
||||
for ( var i = 0, ci; ci = tabs[i++]; ) {
|
||||
if ( ci.className=="focus" ) {
|
||||
property = ci.getAttribute( returnProperty );
|
||||
for (var i = 0, ci; ci = tabs[i++];) {
|
||||
if (ci.className == "focus") {
|
||||
property = ci.getAttribute(returnProperty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return property;
|
||||
}
|
||||
function convert_url(url){
|
||||
|
||||
function convert_url(url) {
|
||||
if (!url) return '';
|
||||
url = utils.trim(url)
|
||||
.replace(/v\.youku\.com\/v_show\/id_([\w\-=]+)\.html/i, 'player.youku.com/embed/$1')
|
||||
@ -209,11 +210,11 @@
|
||||
* 检测传入的所有input框中输入的长宽是否是正数
|
||||
* @param nodes input框集合,
|
||||
*/
|
||||
function checkNum( nodes ) {
|
||||
for ( var i = 0, ci; ci = nodes[i++]; ) {
|
||||
function checkNum(nodes) {
|
||||
for (var i = 0, ci; ci = nodes[i++];) {
|
||||
var value = ci.value;
|
||||
if ( !isNumber( value ) && value) {
|
||||
alert( lang.numError );
|
||||
if (!isNumber(value) && value) {
|
||||
alert(lang.numError);
|
||||
ci.value = "";
|
||||
ci.focus();
|
||||
return false;
|
||||
@ -226,27 +227,32 @@
|
||||
* 数字判断
|
||||
* @param value
|
||||
*/
|
||||
function isNumber( value ) {
|
||||
return /(0|^[1-9]\d*$)/.test( value );
|
||||
function isNumber(value) {
|
||||
return /(0|^[1-9]\d*$)/.test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建图片浮动选择按钮
|
||||
* @param ids
|
||||
*/
|
||||
function createAlignButton( ids ) {
|
||||
for ( var i = 0, ci; ci = ids[i++]; ) {
|
||||
var floatContainer = $G( ci ),
|
||||
nameMaps = {"none":lang['default'], "left":lang.floatLeft, "right":lang.floatRight, "center":lang.block};
|
||||
for ( var j in nameMaps ) {
|
||||
var div = document.createElement( "div" );
|
||||
div.setAttribute( "name", j );
|
||||
if ( j == "none" ) div.className="focus";
|
||||
function createAlignButton(ids) {
|
||||
for (var i = 0, ci; ci = ids[i++];) {
|
||||
var floatContainer = $G(ci),
|
||||
nameMaps = {
|
||||
"none": lang['default'],
|
||||
"left": lang.floatLeft,
|
||||
"right": lang.floatRight,
|
||||
"center": lang.block
|
||||
};
|
||||
for (var j in nameMaps) {
|
||||
var div = document.createElement("div");
|
||||
div.setAttribute("name", j);
|
||||
if (j == "none") div.className = "focus";
|
||||
div.style.cssText = "background:url(images/" + j + "_focus.jpg);";
|
||||
div.setAttribute( "title", nameMaps[j] );
|
||||
floatContainer.appendChild( div );
|
||||
div.setAttribute("title", nameMaps[j]);
|
||||
floatContainer.appendChild(div);
|
||||
}
|
||||
switchSelect( ci );
|
||||
switchSelect(ci);
|
||||
}
|
||||
}
|
||||
|
||||
@ -254,16 +260,16 @@
|
||||
* 选择切换
|
||||
* @param selectParentId
|
||||
*/
|
||||
function switchSelect( selectParentId ) {
|
||||
var selects = $G( selectParentId ).children;
|
||||
for ( var i = 0, ci; ci = selects[i++]; ) {
|
||||
domUtils.on( ci, "click", function () {
|
||||
for ( var j = 0, cj; cj = selects[j++]; ) {
|
||||
function switchSelect(selectParentId) {
|
||||
var selects = $G(selectParentId).children;
|
||||
for (var i = 0, ci; ci = selects[i++];) {
|
||||
domUtils.on(ci, "click", function () {
|
||||
for (var j = 0, cj; cj = selects[j++];) {
|
||||
cj.className = "";
|
||||
cj.removeAttribute && cj.removeAttribute( "class" );
|
||||
cj.removeAttribute && cj.removeAttribute("class");
|
||||
}
|
||||
this.className = "focus";
|
||||
} )
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,15 +277,15 @@
|
||||
* 监听url改变事件
|
||||
* @param url
|
||||
*/
|
||||
function addUrlChangeListener(url){
|
||||
function addUrlChangeListener(url) {
|
||||
if (browser.ie) {
|
||||
url.onpropertychange = function () {
|
||||
createPreviewVideo( this.value );
|
||||
createPreviewVideo(this.value);
|
||||
}
|
||||
} else {
|
||||
url.addEventListener( "input", function () {
|
||||
createPreviewVideo( this.value );
|
||||
}, false );
|
||||
url.addEventListener("input", function () {
|
||||
createPreviewVideo(this.value);
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,8 +293,8 @@
|
||||
* 根据url生成视频预览
|
||||
* @param url
|
||||
*/
|
||||
function createPreviewVideo(url){
|
||||
if (!url)return;
|
||||
function createPreviewVideo(url) {
|
||||
if (!url) return;
|
||||
|
||||
var conUrl = convert_url(url);
|
||||
|
||||
@ -313,19 +319,19 @@
|
||||
|
||||
|
||||
/* 插入上传视频 */
|
||||
function insertUpload(){
|
||||
var videoObjs=[],
|
||||
function insertUpload() {
|
||||
var videoObjs = [],
|
||||
uploadDir = editor.getOpt('videoUrlPrefix'),
|
||||
width = $G('upload_width').value || 420,
|
||||
height = $G('upload_height').value || 280,
|
||||
align = findFocus("upload_alignment","name") || 'none';
|
||||
for(var key in uploadVideoList) {
|
||||
align = findFocus("upload_alignment", "name") || 'none';
|
||||
for (var key in uploadVideoList) {
|
||||
var file = uploadVideoList[key];
|
||||
videoObjs.push({
|
||||
url: uploadDir + file.url,
|
||||
width:width,
|
||||
height:height,
|
||||
align:align
|
||||
width: width,
|
||||
height: height,
|
||||
align: align
|
||||
});
|
||||
}
|
||||
|
||||
@ -339,7 +345,7 @@
|
||||
}
|
||||
|
||||
/*初始化上传标签*/
|
||||
function initUpload(){
|
||||
function initUpload() {
|
||||
uploadFile = new UploadFile('queueList');
|
||||
}
|
||||
|
||||
@ -349,6 +355,7 @@
|
||||
this.$wrap = target.constructor == String ? $('#' + target) : $(target);
|
||||
this.init();
|
||||
}
|
||||
|
||||
UploadFile.prototype = {
|
||||
init: function () {
|
||||
this.fileList = [];
|
||||
@ -406,7 +413,8 @@
|
||||
uploader,
|
||||
actionUrl = editor.getActionUrl(editor.getOpt('videoActionName')),
|
||||
fileMaxSize = editor.getOpt('videoMaxSize'),
|
||||
acceptExtensions = (editor.getOpt('videoAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');;
|
||||
acceptExtensions = (editor.getOpt('videoAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');
|
||||
;
|
||||
|
||||
if (!WebUploader.Uploader.support()) {
|
||||
$('#filePickerReady').after($('<div>').html(lang.errorNotSupport)).hide();
|
||||
@ -416,7 +424,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
uploader = _this.uploader = WebUploader.create({
|
||||
var uploaderOption = {
|
||||
pick: {
|
||||
id: '#filePickerReady',
|
||||
label: lang.uploadSelectFile
|
||||
@ -426,8 +434,28 @@
|
||||
fileVal: editor.getOpt('videoFieldName'),
|
||||
duplicate: true,
|
||||
fileSingleSizeLimit: fileMaxSize,
|
||||
headers: editor.getOpt('serverHeaders') || {},
|
||||
compress: false
|
||||
};
|
||||
if(editor.getOpt('uploadServiceEnable')) {
|
||||
uploaderOption.customUpload = function (file, callback) {
|
||||
editor.getOpt('uploadServiceUpload')('video', file, {
|
||||
success: function( res ) {
|
||||
callback.onSuccess(file, {_raw:JSON.stringify(res)});
|
||||
},
|
||||
error: function( err ) {
|
||||
callback.onError(file, err);
|
||||
},
|
||||
progress: function( percent ) {
|
||||
callback.onProgress(file, percent);
|
||||
}
|
||||
}, {
|
||||
from: 'video'
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
uploader = _this.uploader = WebUploader.create(uploaderOption);
|
||||
uploader.addButton({
|
||||
id: '#filePickerBlock'
|
||||
});
|
||||
@ -479,7 +507,7 @@
|
||||
showError(file.statusText);
|
||||
} else {
|
||||
$wrap.text(lang.uploadPreview);
|
||||
if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) {
|
||||
if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|' + file.ext.toLowerCase() + '|') == -1) {
|
||||
$wrap.empty().addClass('notimage').append('<i class="file-preview file-type-' + file.ext.toLowerCase() + '"></i>' +
|
||||
'<span class="file-title">' + file.name + '</span>');
|
||||
} else {
|
||||
@ -499,7 +527,7 @@
|
||||
}, thumbnailWidth, thumbnailHeight);
|
||||
}
|
||||
}
|
||||
percentages[ file.id ] = [ file.size, 0 ];
|
||||
percentages[file.id] = [file.size, 0];
|
||||
file.rotation = 0;
|
||||
|
||||
/* 检查文件格式 */
|
||||
@ -519,11 +547,11 @@
|
||||
// 成功
|
||||
if (cur === 'error' || cur === 'invalid') {
|
||||
showError(file.statusText);
|
||||
percentages[ file.id ][ 1 ] = 1;
|
||||
percentages[file.id][1] = 1;
|
||||
} else if (cur === 'interrupt') {
|
||||
showError('interrupt');
|
||||
} else if (cur === 'queued') {
|
||||
percentages[ file.id ][ 1 ] = 0;
|
||||
percentages[file.id][1] = 0;
|
||||
} else if (cur === 'progress') {
|
||||
$info.hide();
|
||||
$prgress.css('display', 'block');
|
||||
@ -576,7 +604,7 @@
|
||||
// 负责view的销毁
|
||||
function removeFile(file) {
|
||||
var $li = $('#' + file.id);
|
||||
delete percentages[ file.id ];
|
||||
delete percentages[file.id];
|
||||
updateTotalProgress();
|
||||
$li.off().find('.file-panel').off().end().remove();
|
||||
}
|
||||
@ -588,8 +616,8 @@
|
||||
percent;
|
||||
|
||||
$.each(percentages, function (k, v) {
|
||||
total += v[ 0 ];
|
||||
loaded += v[ 0 ] * v[ 1 ];
|
||||
total += v[0];
|
||||
loaded += v[0] * v[1];
|
||||
});
|
||||
|
||||
percent = total ? loaded / total : 0;
|
||||
@ -615,7 +643,8 @@
|
||||
$queue.addClass('element-invisible');
|
||||
$statusBar.addClass('element-invisible');
|
||||
$placeHolder.removeClass('element-invisible');
|
||||
$progress.hide(); $info.hide();
|
||||
$progress.hide();
|
||||
$info.hide();
|
||||
uploader.refresh();
|
||||
break;
|
||||
|
||||
@ -624,25 +653,29 @@
|
||||
$placeHolder.addClass('element-invisible');
|
||||
$queue.removeClass('element-invisible');
|
||||
$statusBar.removeClass('element-invisible');
|
||||
$progress.hide(); $info.show();
|
||||
$progress.hide();
|
||||
$info.show();
|
||||
$upload.text(lang.uploadStart);
|
||||
uploader.refresh();
|
||||
break;
|
||||
|
||||
/* 上传中 */
|
||||
case 'uploading':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadPause);
|
||||
break;
|
||||
|
||||
/* 暂停上传 */
|
||||
case 'paused':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadContinue);
|
||||
break;
|
||||
|
||||
case 'confirm':
|
||||
$progress.show(); $info.hide();
|
||||
$progress.show();
|
||||
$info.hide();
|
||||
$upload.text(lang.uploadStart);
|
||||
|
||||
stats = uploader.getStats();
|
||||
@ -653,7 +686,8 @@
|
||||
break;
|
||||
|
||||
case 'finish':
|
||||
$progress.hide(); $info.show();
|
||||
$progress.hide();
|
||||
$info.show();
|
||||
if (stats.uploadFailNum) {
|
||||
$upload.text(lang.uploadRetry);
|
||||
} else {
|
||||
@ -687,9 +721,7 @@
|
||||
}
|
||||
} else {
|
||||
stats = uploader.getStats();
|
||||
text = lang.updateStatusFinish.replace('_', fileCount).
|
||||
replace('_KB', WebUploader.formatSize(fileSize)).
|
||||
replace('_', stats.successNum);
|
||||
text = lang.updateStatusFinish.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)).replace('_', stats.successNum);
|
||||
|
||||
if (stats.uploadFailNum) {
|
||||
text += lang.updateStatusError.replace('_', stats.uploadFailNum);
|
||||
@ -734,7 +766,7 @@
|
||||
case 'startUpload':
|
||||
/* 添加额外的GET参数 */
|
||||
var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params);
|
||||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?' : '&') + 'encode=utf-8&' + params);
|
||||
uploader.option('server', url);
|
||||
setState('uploading', files);
|
||||
break;
|
||||
@ -756,7 +788,7 @@
|
||||
$percent = $li.find('.progress span');
|
||||
|
||||
$percent.css('width', percentage * 100 + '%');
|
||||
percentages[ file.id ][ 1 ] = percentage;
|
||||
percentages[file.id][1] = percentage;
|
||||
updateTotalProgress();
|
||||
});
|
||||
|
||||
@ -765,13 +797,19 @@
|
||||
try {
|
||||
var responseText = (ret._raw || ret),
|
||||
json = utils.str2json(responseText);
|
||||
json = editor.getOpt('serverResponsePrepare')(json);
|
||||
if (json.state == 'SUCCESS') {
|
||||
uploadVideoList.push({
|
||||
'url': json.url,
|
||||
'type': json.type,
|
||||
'original':json.original
|
||||
'original': json.original
|
||||
});
|
||||
$file.append('<span class="success"></span>');
|
||||
// 触发上传视频事件
|
||||
editor.fireEvent("uploadsuccess", {
|
||||
res: json,
|
||||
type: 'video'
|
||||
});
|
||||
} else {
|
||||
$file.find('.error').text(json.state).show();
|
||||
}
|
||||
@ -782,9 +820,11 @@
|
||||
|
||||
uploader.on('uploadError', function (file, code) {
|
||||
});
|
||||
uploader.on('error', function (code, file) {
|
||||
if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') {
|
||||
addFile(file);
|
||||
uploader.on('error', function (code, param1, param2) {
|
||||
if (code === 'F_EXCEED_SIZE') {
|
||||
editor.getOpt('tipError')(lang.errorExceedSize + ' ' + (param1 / 1024 / 1024).toFixed(1) + 'MB');
|
||||
} else {
|
||||
console.log('error', code, param1, param2);
|
||||
}
|
||||
});
|
||||
uploader.on('uploadComplete', function (file, ret) {
|
||||
@ -809,13 +849,13 @@
|
||||
},
|
||||
getQueueCount: function () {
|
||||
var file, i, status, readyFile = 0, files = this.uploader.getFiles();
|
||||
for (i = 0; file = files[i++]; ) {
|
||||
for (i = 0; file = files[i++];) {
|
||||
status = file.getStatus();
|
||||
if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
|
||||
}
|
||||
return readyFile;
|
||||
},
|
||||
refresh: function(){
|
||||
refresh: function () {
|
||||
this.uploader.refresh();
|
||||
}
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?20220503"></script>
|
||||
<script type="text/javascript" src="../internal.js?aea0c61c"></script>
|
||||
<style type="text/css">
|
||||
.wrapper {
|
||||
width: 600px;
|
||||
@ -105,7 +105,7 @@
|
||||
<div class="action">
|
||||
<div class="save-from-local">
|
||||
<div>本地选择保存</div>
|
||||
<input type="file" id="saveFile"/>
|
||||
<input type="file" id="saveFile" multiple=true/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -129,10 +129,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../third-party/jquery-1.10.2.js?20220503"></script>
|
||||
<script src="../../third-party/webuploader/webuploader.js?20220503"></script>
|
||||
<script type="text/javascript" src="../../third-party/clipboard/clipboard.js?20220503"></script>
|
||||
<script type="text/javascript" src="wordimage.js?20220903"></script>
|
||||
<script src="../../third-party/jquery-1.10.2.js?628072e7"></script>
|
||||
<script src="../../third-party/webuploader/webuploader.js?21e72664"></script>
|
||||
<script type="text/javascript" src="../../third-party/clipboard/clipboard.js?555edf0a"></script>
|
||||
<script type="text/javascript" src="wordimage.js?f4efe813"></script>
|
||||
<script type="text/javascript">
|
||||
editor.setOpt({
|
||||
wordImageFieldName: "upfile",
|
||||
@ -183,6 +183,7 @@
|
||||
} : false
|
||||
});
|
||||
uploader.on('uploadSuccess', function (file, res) {
|
||||
res = editor.getOpt('serverResponsePrepare')(res);
|
||||
if ('state' in res) {
|
||||
if (res.state === 'SUCCESS') {
|
||||
if (res.url) {
|
||||
@ -191,19 +192,24 @@
|
||||
url: res.url,
|
||||
title: '',
|
||||
});
|
||||
if ($('#fileUrl').val().indexOf(file.name) >= 0) {
|
||||
$('#fileUrl').val(res.url);
|
||||
$('.image-tip').html('<span style="color:#139213;">图片' + imageUrls.length + '(' + file.name + ')' + '转存成功</span>');
|
||||
} else {
|
||||
$('.image-tip').html('上传失败:' + JSON.stringify(res))
|
||||
}
|
||||
// 触发上传附件事件
|
||||
editor.fireEvent("uploadsuccess", {
|
||||
res: res,
|
||||
type: 'image'
|
||||
});
|
||||
} else {
|
||||
$('.image-tip').html('上传失败:' + JSON.stringify(res))
|
||||
}
|
||||
} else {
|
||||
$('.image-tip').html('上传失败:' + JSON.stringify(res))
|
||||
}
|
||||
});
|
||||
uploader.on('uploadFinished', function () {
|
||||
$('.image-tip').html('<span style="color:#139213;">转存成功,请提交确认</span>');
|
||||
}
|
||||
} else {
|
||||
$('.image-tip').html('上传失败:' + JSON.stringify(res))
|
||||
}
|
||||
} else {
|
||||
$('.image-tip').html('上传失败:' + JSON.stringify(res))
|
||||
}
|
||||
} else {
|
||||
$('.image-tip').html('上传失败:' + JSON.stringify(res))
|
||||
}
|
||||
});
|
||||
utils.domReady(function () {
|
||||
var options = {};
|
||||
|
@ -17,13 +17,8 @@ wordImage.init = function (opt, callbacks) {
|
||||
|
||||
function addUploadButtonListener() {
|
||||
g('saveFile').addEventListener('change', function () {
|
||||
if (this.files.length !== 1) {
|
||||
alert('请选择1个文件')
|
||||
return;
|
||||
}
|
||||
$('.image-tip').html('正在转存,请稍后...');
|
||||
var file = this.files[0];
|
||||
uploader.addFile(file);
|
||||
uploader.addFile(this.files);
|
||||
uploader.upload();
|
||||
});
|
||||
}
|
||||
@ -75,6 +70,13 @@ function showLocalPath(id) {
|
||||
|
||||
path = path.substring(0, path.lastIndexOf(separater) + 1);
|
||||
g(id).value = path;
|
||||
//增提醒用户选择哪些文件
|
||||
var names = [];
|
||||
for (var i = 0, len = images.length; i < len; i++) {
|
||||
var img = images[i];
|
||||
names.push(img.substring(img.lastIndexOf(separater) + 1, img.length));
|
||||
}
|
||||
$('.image-tip').html('<span style="color:#ff0000;">请选择:' + names.join("、") + "共" + images.length + '个文件</span>');
|
||||
}
|
||||
|
||||
function createCopyButton(id, dataFrom) {
|
||||
@ -82,6 +84,7 @@ function createCopyButton(id, dataFrom) {
|
||||
if (url.startsWith("file:////")) {
|
||||
url = url.substring(8);
|
||||
}
|
||||
url = decodeURI(url);
|
||||
g(id).setAttribute("data-clipboard-text", url);
|
||||
var clipboard = new Clipboard('[data-clipboard-text]')
|
||||
clipboard.on('success', function (e) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="ueditor.all.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="lang/zh-cn/zh-cn.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="lang/zh-cn/zh-cn.js?7a537435"></script>
|
||||
<script src="./plugins/demo/demo.js"></script>
|
||||
<script>
|
||||
// window.UEDITOR_CONFIG.toolbars[0].push('undo');
|
||||
@ -15,10 +15,15 @@
|
||||
<script>var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?5f8b495b287894a451c761c963e6e34a";
|
||||
hm.src = "https://hm.baidu.com/hm.js?f84f35a44b5cc5c0b10c3fabdf0f322b";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();</script>
|
||||
<style>
|
||||
:root {
|
||||
/*--ueditor-top-offset: 20px;*/
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="./style.css"/>
|
||||
</head>
|
||||
<body class="demo-editor-page">
|
||||
@ -71,11 +76,13 @@
|
||||
公式支持
|
||||
</h2>
|
||||
<p>
|
||||
<img src="https://latex.codecogs.com/svg.image?f(a)%20%3D%20%5Cfrac%7B1%7D%7B2%5Cpi%20i%7D%20%5Coint%5Cfrac%7Bf(z)%7D%7Bz-a%7Ddz" data-formula-image="f(a)%20%3D%20%5Cfrac%7B1%7D%7B2%5Cpi%20i%7D%20%5Coint%5Cfrac%7Bf(z)%7D%7Bz-a%7Ddz"/>
|
||||
<img src="https://r.latexeasy.com/image.svg?%5Cint%20%5Cfrac%7B1%7D%7Bx%7D%20dx%20%3D%20%5Cln%20%5Cleft%7C%20x%20%5Cright%7C%20%2B%20C"
|
||||
data-formula-image="%5Cint%20%5Cfrac%7B1%7D%7Bx%7D%20dx%20%3D%20%5Cln%20%5Cleft%7C%20x%20%5Cright%7C%20%2B%20C"/>
|
||||
</p>
|
||||
<p>
|
||||
<br/>
|
||||
</p>
|
||||
|
||||
</script>
|
||||
</div>
|
||||
<div id="btns" style="margin-top:20px;">
|
||||
@ -101,18 +108,27 @@
|
||||
<button onclick="UE.getEditor('editor')">创建编辑器</button>
|
||||
<button onclick="UE.getEditor('editor').destroy()">销毁编辑器</button>
|
||||
<button onclick="alert( UE.getEditor('editor').execCommand('get_auto_save_content') )">草稿箱-获取</button>
|
||||
<button onclick="UE.getEditor('editor').execCommand('clear_auto_save_content'); alert('已清空草稿箱')">草稿箱-清空</button>
|
||||
<button onclick="UE.getEditor('editor').execCommand('set_auto_save_content'); alert('已保存')">草稿箱-立即保存</button>
|
||||
<button onclick="UE.getEditor('editor').execCommand('clear_auto_save_content'); alert('已清空草稿箱')">草稿箱-清空
|
||||
</button>
|
||||
<button onclick="UE.getEditor('editor').execCommand('set_auto_save_content'); alert('已保存')">草稿箱-立即保存
|
||||
</button>
|
||||
<button onclick="UE.getEditor('editor').execCommand('auto_save_restore')">草稿箱-恢复到编辑器</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var ue = UE.getEditor('editor');
|
||||
var ue = UE.getEditor('editor',{
|
||||
// autoHeightEnabled: false,
|
||||
});
|
||||
ue.on('contentchange', function () {
|
||||
// console.log('contentchange', ue.getContent());
|
||||
});
|
||||
|
||||
function isFocus(e) {
|
||||
alert(UE.getEditor('editor').isFocus());
|
||||
UE.dom.domUtils.preventDefault(e)
|
||||
}
|
||||
|
||||
function setBlur(e) {
|
||||
UE.getEditor('editor').blur();
|
||||
UE.dom.domUtils.preventDefault(e)
|
||||
|
17
public/js/ueditor/themes/default/dialog.css
Normal file
@ -0,0 +1,17 @@
|
||||
input[type="text"] {
|
||||
height: 30px;
|
||||
border: 1px solid #EEE;
|
||||
border-radius: 3px;
|
||||
padding: 0 5px;
|
||||
line-height: 2px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
select {
|
||||
height: 30px;
|
||||
border: 1px solid #EEE;
|
||||
border-radius: 3px;
|
||||
padding: 0 5px;
|
||||
line-height: 2px;
|
||||
outline: none;
|
||||
}
|
12
public/js/ueditor/themes/default/exts/ai.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#FF9B13"/>
|
||||
<stop offset="100%" stop-color="#FF7807"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#FDDBB1" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF" d="M56.253 59.538l-11.282-10.91 7.527-4.642 8.493 8.122-4.738 7.43zm-6.295 5.292c-2.57 3.863-4.618 9.912-4.618 9.912l-21.827 7.253 13.152-13.752c.384.238.834.382 1.319.382a2.515 2.515 0 1 0-2.515-2.516c0 .281.056.545.141.797L22.987 81.312c1.547-6.646 5.86-22.411 5.86-22.411s6.403-1.881 10.077-3.88c3.451-1.877 4.904-3.678 4.904-3.678l9.809 9.808s-2.14 1.366-3.679 3.679z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF" d="M25.481 12.259a1.184 1.184 0 0 1-1.187-1.174c0-.645.534-1.173 1.187-1.173.652 0 1.186.528 1.186 1.173 0 .646-.534 1.174-1.186 1.174zm-5.645 11.125h-.158c-.692 1.124-1.859 1.74-3.283 1.74-2.067 0-3.599-1.212-3.599-3.138 0-1.887 1.404-2.972 3.886-3.119l3.075-.185v-.958c0-1.301-.82-2.014-2.413-2.014-1.275 0-2.165.479-2.402 1.31h-1.721c.227-1.692 1.908-2.806 4.183-2.806 2.601 0 4.054 1.32 4.054 3.51v7.214h-1.622v-1.554zm-.079-3.344l-2.867.186c-1.622.108-2.334.665-2.334 1.721 0 1.075.92 1.701 2.156 1.701 1.75 0 3.045-1.134 3.045-2.64v-.968zm6.574 4.898H24.63V14.4h1.701v10.538z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
12
public/js/ueditor/themes/default/exts/apk.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#7CBD38"/>
|
||||
<stop offset="100%" stop-color="#58A31B"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#C3DFA4" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF" d="M60.994 80.99c-1.661 0-3.008-1.491-3.008-3.329V64.345c0-1.838 1.347-3.329 3.008-3.329s3.008 1.49 3.008 3.329v13.316c0 1.838-1.347 3.329-3.008 3.329zm-8.359.025H29.013V63.006H56.01v18.009h-3.375zm3.375-21H29.013c0-4.436 2.183-8.357 5.529-10.794l-1.735-2.98a.837.837 0 0 1 .309-1.143.849.849 0 0 1 1.154.306l1.691 2.906a13.5 13.5 0 0 1 6.55-1.687c2.379 0 4.61.614 6.551 1.685l1.689-2.902a.843.843 0 0 1 1.152-.308.832.832 0 0 1 .311 1.145l-1.733 2.978c3.346 2.437 5.529 6.358 5.529 10.794zm-18.561-8.37c-.933 0-1.687.748-1.687 1.674a1.68 1.68 0 0 0 1.687 1.674 1.68 1.68 0 0 0 1.688-1.674 1.68 1.68 0 0 0-1.688-1.674zm10.124 0c-.933 0-1.687.748-1.687 1.674a1.68 1.68 0 0 0 1.687 1.674 1.68 1.68 0 0 0 1.688-1.674c0-.926-.754-1.674-1.688-1.674zM23.997 80.99c-1.66 0-3.008-1.491-3.008-3.329V64.345c0-1.838 1.348-3.329 3.008-3.329 1.661 0 3.009 1.49 3.009 3.329v13.316c0 1.838-1.348 3.329-3.009 3.329z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF" d="M46.368 25.167h-2.166l-3.995-4.938-1.018.939v3.999h-1.701V10.443h1.701v8.789h.158l4.628-4.604h2.086l-4.588 4.516 4.895 6.023zm-16.115.185c-1.523 0-2.749-.655-3.332-1.769h-.159v5.103h-1.7V14.628h1.621v1.759h.158c.683-1.212 1.958-1.945 3.412-1.945 2.719 0 4.48 2.141 4.48 5.455 0 3.295-1.77 5.455-4.48 5.455zm-.395-9.395c-1.929 0-3.145 1.516-3.145 3.94 0 2.415 1.216 3.94 3.135 3.94 1.958 0 3.124-1.476 3.124-3.94s-1.166-3.94-3.114-3.94zm-9.551 7.655h-.158c-.692 1.124-1.859 1.74-3.283 1.74-2.067 0-3.599-1.212-3.599-3.138 0-1.887 1.404-2.972 3.886-3.119l3.075-.185v-.958c0-1.301-.82-2.014-2.413-2.014-1.275 0-2.165.479-2.403 1.31h-1.72c.227-1.692 1.908-2.806 4.183-2.806 2.6 0 4.054 1.32 4.054 3.51v7.215h-1.622v-1.555zm-.079-3.343l-2.867.185c-1.622.108-2.334.665-2.334 1.721 0 1.075.919 1.701 2.156 1.701 1.75 0 3.045-1.134 3.045-2.64v-.967z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
12
public/js/ueditor/themes/default/exts/chm.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#98BCCD"/>
|
||||
<stop offset="100%" stop-color="#76A1B7"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#BEEAFF" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF" d="M63.794 62.015H20.225c-.668 0-1.21-.56-1.21-1.251v-2.502c0-.691.542-1.252 1.21-1.252h43.569c.668 0 1.21.561 1.21 1.252v2.502c0 .691-.542 1.251-1.21 1.251zm0-15.015H20.225c-.668 0-1.21-.56-1.21-1.251v-2.503c0-.691.542-1.251 1.21-1.251h43.569c.668 0 1.21.56 1.21 1.251v2.503c0 .691-.542 1.251-1.21 1.251zM20.187 70.994h43.62c.661 0 1.197.56 1.197 1.251v2.502c0 .691-.536 1.252-1.197 1.252h-43.62c-.661 0-1.197-.561-1.197-1.252v-2.502c0-.691.536-1.251 1.197-1.251z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF" d="M50.047 25.167v-6.893c0-1.554-.742-2.317-2.245-2.317-1.483 0-2.472 1.095-2.472 2.435v6.775h-1.701V18.01c0-1.251-.88-2.053-2.225-2.053-1.394 0-2.472 1.193-2.472 2.679v6.531h-1.701V14.628h1.622v1.662h.158c.485-1.174 1.553-1.848 2.976-1.848 1.444 0 2.453.753 2.947 1.848h.159c.573-1.115 1.789-1.848 3.263-1.848 2.175 0 3.392 1.232 3.392 3.441v7.284h-1.701zm-17.609-6.414c0-1.867-.85-2.796-2.462-2.796-1.909 0-2.957 1.193-2.957 2.972v6.238h-1.701V10.443h1.701v5.847h.159c.534-1.164 1.651-1.848 3.283-1.848 2.254 0 3.678 1.427 3.678 3.901v6.824h-1.701v-6.414zm-14.187 5.084c1.433 0 2.432-.655 2.749-1.848h1.72c-.306 1.936-1.898 3.363-4.46 3.363-2.986 0-4.894-2.141-4.894-5.494 0-3.285 1.898-5.416 4.885-5.416 2.59 0 4.173 1.535 4.469 3.412H21c-.277-1.046-1.217-1.897-2.749-1.897-1.919 0-3.125 1.516-3.125 3.901 0 2.434 1.226 3.979 3.125 3.979z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
12
public/js/ueditor/themes/default/exts/css.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#C1917F"/>
|
||||
<stop offset="100%" stop-color="#A76D5A"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#D4957F" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF" d="M64.796 63.83l-.039.064a1.31 1.31 0 0 1-.362.388c-.118.179-.264.34-.46.45l-11.639 6.512a1.254 1.254 0 0 1-1.756-.552 1.426 1.426 0 0 1 .571-1.855l10.122-5.663-9.212-6.032a1.37 1.37 0 0 1-.402-1.851l.039-.064a1.27 1.27 0 0 1 1.787-.417l10.948 7.169c.605.396.785 1.225.403 1.851zM38.238 74.999l6.083-23.994h2.433l-6.083 23.994h-2.433zm-5.541-3.755l-11.64-6.512a1.357 1.357 0 0 1-.46-.45 1.32 1.32 0 0 1-.361-.388l-.039-.064a1.37 1.37 0 0 1 .402-1.851l10.949-7.169a1.27 1.27 0 0 1 1.787.417l.039.064c.382.626.202 1.455-.403 1.851l-9.211 6.032 10.121 5.663c.643.359.899 1.19.572 1.855a1.254 1.254 0 0 1-1.756.552z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF" d="M39.087 15.869c-1.266 0-2.255.636-2.255 1.574 0 .724.593 1.173 1.849 1.476l1.642.392c2.007.479 2.976 1.339 2.976 2.854 0 1.887-1.849 3.187-4.272 3.187-2.373 0-4.004-1.124-4.192-2.874h1.75c.287.89 1.137 1.457 2.502 1.457 1.434 0 2.462-.675 2.462-1.643 0-.723-.554-1.212-1.691-1.486l-1.829-.44c-1.998-.479-2.908-1.329-2.908-2.854 0-1.75 1.711-3.07 3.976-3.07 2.234 0 3.787 1.095 4.014 2.825H41.43c-.227-.84-1.058-1.398-2.343-1.398zm-10.995 3.05l1.642.392c2.007.479 2.976 1.339 2.976 2.854 0 1.887-1.849 3.187-4.272 3.187-2.373 0-4.005-1.124-4.192-2.874h1.75c.287.89 1.137 1.457 2.502 1.457 1.434 0 2.462-.675 2.462-1.643 0-.723-.554-1.212-1.691-1.486l-1.829-.44c-1.998-.479-2.908-1.329-2.908-2.854 0-1.75 1.711-3.07 3.976-3.07 2.234 0 3.787 1.095 4.014 2.825h-1.681c-.227-.84-1.058-1.398-2.343-1.398-1.266 0-2.255.636-2.255 1.574 0 .724.593 1.173 1.849 1.476zm-10.281 4.918c1.433 0 2.432-.655 2.749-1.848h1.72c-.306 1.936-1.898 3.363-4.46 3.363-2.986 0-4.894-2.141-4.894-5.494 0-3.285 1.898-5.416 4.885-5.416 2.59 0 4.173 1.535 4.469 3.412h-1.72c-.277-1.046-1.217-1.897-2.749-1.897-1.919 0-3.125 1.516-3.125 3.901 0 2.434 1.226 3.979 3.125 3.979z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
22
public/js/ueditor/themes/default/exts/doc.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="85" height="100" viewBox="0 0 85 100">
|
||||
<defs>
|
||||
<linearGradient id="doc-a" x1="50%" x2="50%" y1="0%" y2="100%">
|
||||
<stop offset="0%" stop-color="#1D70CA"/>
|
||||
<stop offset="100%" stop-color="#41A5EE"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="url(#doc-a)"
|
||||
d="M6,0 L62.3333333,0 L62.3333333,0 L85,22.8571429 L85,94 C85,97.3137085 82.3137085,100 79,100 L6,100 C2.6862915,100 4.05812251e-16,97.3137085 0,94 L0,6 C-4.05812251e-16,2.6862915 2.6862915,6.08718376e-16 6,0 Z"/>
|
||||
<path fill="#FFF"
|
||||
d="M62.3333333,0 L85,22.5352113 L68.3333333,22.5352113 C65.0196248,22.5352113 62.3333333,19.8489198 62.3333333,16.5352113 L62.3333333,0 L62.3333333,0 Z"
|
||||
opacity=".5"/>
|
||||
<rect width="42.5" height="42.254" y="30.986" fill="#1B61CA" rx="2"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="33.803" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="45.07" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="56.338" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="67.606" fill="#FFF" opacity=".5"/>
|
||||
<path fill="#FFF" fill-rule="nonzero"
|
||||
d="M25.7935088,62.8642557 C27.1407465,65.0073347 30.3730311,64.6213304 31.1777196,62.2212652 L36.8443863,45.3198567 C37.3710779,43.7489455 36.5245707,42.0485025 34.9536595,41.5218109 C33.3827483,40.9951193 31.6823053,41.8416265 31.1556137,43.4125377 L27.5023119,54.3088809 L23.7898245,48.4033499 C22.6135444,46.5322167 19.8864556,46.5322167 18.7101755,48.4033499 L14.9976881,54.3088809 L11.3443863,43.4125377 C10.8176947,41.8416265 9.11725166,40.9951193 7.54634048,41.5218109 C5.97542929,42.0485025 5.12892207,43.7489455 5.65561368,45.3198567 L11.3222804,62.2212652 C12.1269689,64.6213304 15.3592535,65.0073347 16.7064912,62.8642557 L21.25,55.6368017 L25.7935088,62.8642557 Z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
22
public/js/ueditor/themes/default/exts/docx.svg
Normal file
@ -0,0 +1,22 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="85" height="100" viewBox="0 0 85 100">
|
||||
<defs>
|
||||
<linearGradient id="doc-a" x1="50%" x2="50%" y1="0%" y2="100%">
|
||||
<stop offset="0%" stop-color="#1D70CA"/>
|
||||
<stop offset="100%" stop-color="#41A5EE"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="url(#doc-a)"
|
||||
d="M6,0 L62.3333333,0 L62.3333333,0 L85,22.8571429 L85,94 C85,97.3137085 82.3137085,100 79,100 L6,100 C2.6862915,100 4.05812251e-16,97.3137085 0,94 L0,6 C-4.05812251e-16,2.6862915 2.6862915,6.08718376e-16 6,0 Z"/>
|
||||
<path fill="#FFF"
|
||||
d="M62.3333333,0 L85,22.5352113 L68.3333333,22.5352113 C65.0196248,22.5352113 62.3333333,19.8489198 62.3333333,16.5352113 L62.3333333,0 L62.3333333,0 Z"
|
||||
opacity=".5"/>
|
||||
<rect width="42.5" height="42.254" y="30.986" fill="#1B61CA" rx="2"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="33.803" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="45.07" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="56.338" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="67.606" fill="#FFF" opacity=".5"/>
|
||||
<path fill="#FFF" fill-rule="nonzero"
|
||||
d="M25.7935088,62.8642557 C27.1407465,65.0073347 30.3730311,64.6213304 31.1777196,62.2212652 L36.8443863,45.3198567 C37.3710779,43.7489455 36.5245707,42.0485025 34.9536595,41.5218109 C33.3827483,40.9951193 31.6823053,41.8416265 31.1556137,43.4125377 L27.5023119,54.3088809 L23.7898245,48.4033499 C22.6135444,46.5322167 19.8864556,46.5322167 18.7101755,48.4033499 L14.9976881,54.3088809 L11.3443863,43.4125377 C10.8176947,41.8416265 9.11725166,40.9951193 7.54634048,41.5218109 C5.97542929,42.0485025 5.12892207,43.7489455 5.65561368,45.3198567 L11.3222804,62.2212652 C12.1269689,64.6213304 15.3592535,65.0073347 16.7064912,62.8642557 L21.25,55.6368017 L25.7935088,62.8642557 Z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
16
public/js/ueditor/themes/default/exts/dwg.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100" viewBox="0 0 84 100">
|
||||
<defs>
|
||||
<linearGradient id="dwg-a" x1="50%" x2="50%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#98BCCD"/>
|
||||
<stop offset="100%" stop-color="#76A1B7"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="url(#dwg-a)" d="M83.3333333,20.8333333 L83.3333333,93.75 C83.3333333,97.2017797 80.535113,100 77.0833333,100 L6.25,100 C2.79822031,100 0,97.2017797 0,93.75 L0,6.25 C0,2.79822031 2.79822031,0 6.25,0 L62.5,0 L83.3333333,20.8333333 Z"/>
|
||||
<path fill="#FFF" d="M50,45.8333333 C51.1505932,45.8333333 52.0833333,46.7660734 52.0833333,47.9166667 L52.0833333,66.6663333 L54.1666667,66.6666667 C55.3172599,66.6666667 56.25,67.5994068 56.25,68.75 L56.2493333,70.8326667 L60.4166667,70.8333333 C61.5672599,70.8333333 62.5,71.7660734 62.5,72.9166667 C62.5,74.0672599 61.5672599,75 60.4166667,75 L56.2493333,74.9996667 L56.25,77.0833333 C56.25,78.2339266 55.3172599,79.1666667 54.1666667,79.1666667 L52.0833333,79.1663333 L52.0833333,85.4166667 C52.0833333,86.5672599 51.1505932,87.5 50,87.5 C48.8494068,87.5 47.9166667,86.5672599 47.9166667,85.4166667 L47.9163333,79.1663333 L45.8333333,79.1666667 C44.6827401,79.1666667 43.75,78.2339266 43.75,77.0833333 L43.7493333,74.9996667 L22.9166667,75 C21.7660734,75 20.8333333,74.0672599 20.8333333,72.9166667 C20.8333333,71.7660734 21.7660734,70.8333333 22.9166667,70.8333333 L43.7493333,70.8326667 L43.75,68.75 C43.75,67.5994068 44.6827401,66.6666667 45.8333333,66.6666667 L47.9163333,66.6663333 L47.9166667,47.9166667 C47.9166667,46.7660734 48.8494068,45.8333333 50,45.8333333 Z" opacity=".6"/>
|
||||
<path fill="#BEEAFF" d="M83.3333333,20.8333333 L66.6666667,20.8333333 C64.3654802,20.8333333 62.5,18.9678531 62.5,16.6666667 L62.5,0 L83.3333333,20.8333333 Z"/>
|
||||
<text fill="#FFF" font-family="Helvetica" font-size="22.917">
|
||||
<tspan x="10.417" y="27.167">dwg</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
3
public/js/ueditor/themes/default/exts/folder.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="94">
|
||||
<path fill-rule="evenodd" fill="#FDC94A" d="M90 94H10C4.477 94 0 89.523 0 84V26.571c-.001-.061-.01-.12-.01-.181V6.62c0-3.765 3.732-6.633 8.334-6.633h30.213c2.302 0 4.752 1.415 5.494 3.213L45.599 7H90c5.523 0 10 4.477 10 10v67c0 5.523-4.477 10-10 10z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 327 B |
14
public/js/ueditor/themes/default/exts/gif.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#4D9CFC"/>
|
||||
<stop offset="100%" stop-color="#2B79FA"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#A6CAFD" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF"
|
||||
d="M43.583 59.101s.974-5.495 5.008-9.477c4.033-3.982 9.598-4.944 9.598-4.944s-.974 5.494-5.008 9.477c-4.033 3.982-9.598 4.944-9.598 4.944zm-4.676-10.909c0-5.632 3.246-10.197 3.246-10.197s3.246 4.565 3.246 10.197c0 5.632-3.246 10.198-3.246 10.198s-3.246-4.566-3.246-10.198zm-8.041 5.64c-4.074-3.999-5.058-9.517-5.058-9.517s5.621.967 9.695 4.966 5.059 9.516 5.059 9.516-5.621-.966-9.696-4.965zm8.934 6.452s-4.667 3.242-10.412 3.258c-5.745.017-10.392-3.198-10.392-3.198s4.666-3.241 10.411-3.258c5.745-.016 10.393 3.198 10.393 3.198zm.762 1.598s-.985 5.518-5.059 9.517c-4.074 3.999-9.695 4.965-9.695 4.965s.984-5.517 5.058-9.517c4.075-3.999 9.696-4.965 9.696-4.965zm4.686 10.844c-.017 5.673-3.3 10.28-3.3 10.28s-3.256-4.588-3.239-10.261c.017-5.672 3.3-10.279 3.3-10.279s3.256 4.588 3.239 10.26zm-.903-12.172s4.624-3.205 10.328-3.205 10.328 3.205 10.328 3.205-4.624 3.205-10.328 3.205-10.328-3.205-10.328-3.205zm8.836 6.552c4.034 3.982 5.008 9.477 5.008 9.477s-5.565-.962-9.598-4.945c-4.034-3.982-5.008-9.477-5.008-9.477s5.565.962 9.598 4.945z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF"
|
||||
d="M34.558 12.182c-1.018 0-1.592.509-1.592 1.692v.977h2.443v1.408h-2.443v9.131h-1.701v-9.131h-1.77v-1.408h1.77v-1.026c0-2.161 1.138-3.06 3.194-3.06.337 0 .633.029 1.049.098v1.407a5.22 5.22 0 0 0-.95-.088zm-8.093.528a1.184 1.184 0 0 1-1.187-1.173c0-.645.534-1.173 1.187-1.173s1.187.528 1.187 1.173-.534 1.173-1.187 1.173zm-8.827 16.728c-2.571 0-4.213-1.144-4.47-2.884h1.8c.188.86 1.137 1.417 2.67 1.417 1.908 0 3.046-.929 3.046-2.483v-2.073h-.159c-.672 1.164-1.878 1.819-3.342 1.819-2.759 0-4.47-2.112-4.47-5.27 0-3.157 1.731-5.298 4.47-5.298 1.493 0 2.808.723 3.422 1.857h.158v-1.672h1.622v10.725c0 2.356-1.84 3.862-4.747 3.862zm-.079-13.257c-1.978 0-3.085 1.486-3.085 3.783 0 2.298 1.107 3.784 3.085 3.784s3.164-1.486 3.164-3.784c0-2.297-1.196-3.783-3.164-3.783zm9.756 9.209h-1.7V14.851h1.7V25.39z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
12
public/js/ueditor/themes/default/exts/html.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#C1917F"/>
|
||||
<stop offset="100%" stop-color="#A76D5A"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#D4957F" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF" d="M64.796 63.83l-.04.064c-.096.159-.22.288-.361.388-.118.179-.264.34-.46.45l-11.639 6.512a1.254 1.254 0 0 1-1.756-.552 1.426 1.426 0 0 1 .571-1.855l10.122-5.663-9.212-6.032a1.37 1.37 0 0 1-.402-1.851l.039-.064a1.27 1.27 0 0 1 1.787-.417l10.948 7.169c.605.396.785 1.225.403 1.851zM38.238 74.999l6.083-23.994h2.433l-6.083 23.994h-2.433zm-5.541-3.755l-11.64-6.512a1.357 1.357 0 0 1-.46-.45 1.32 1.32 0 0 1-.361-.388l-.039-.064a1.37 1.37 0 0 1 .402-1.851l10.949-7.169a1.268 1.268 0 0 1 1.786.417l.04.064c.382.626.202 1.455-.403 1.851l-9.211 6.032 10.121 5.663c.643.359.899 1.19.572 1.855a1.254 1.254 0 0 1-1.756.552z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF" d="M50.521 25.167V10.443h1.701v14.724h-1.701zm-4.885-6.893c0-1.554-.742-2.317-2.245-2.317-1.483 0-2.472 1.095-2.472 2.435v6.775h-1.701V18.01c0-1.251-.88-2.053-2.225-2.053-1.394 0-2.472 1.193-2.472 2.679v6.531H32.82V14.628h1.622v1.662h.158c.485-1.174 1.553-1.848 2.977-1.848 1.443 0 2.452.753 2.946 1.848h.159c.573-1.115 1.789-1.848 3.263-1.848 2.175 0 3.392 1.232 3.392 3.441v7.284h-1.701v-6.893zm-19.453 4.155v-6.394h-1.721v-1.407h1.721V11.9h1.701v2.728h2.373v1.407h-2.373v5.964c0 1.242.475 1.77 1.582 1.77.307 0 .475-.01.791-.04v1.418a5.721 5.721 0 0 1-.999.098c-2.195 0-3.075-.802-3.075-2.816zm-5.505-3.676c0-1.867-.85-2.796-2.462-2.796-1.909 0-2.957 1.193-2.957 2.972v6.238h-1.701V10.443h1.701v5.847h.158c.534-1.164 1.652-1.848 3.284-1.848 2.254 0 3.678 1.427 3.678 3.901v6.824h-1.701v-6.414z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
14
public/js/ueditor/themes/default/exts/jpeg.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#4D9CFC"/>
|
||||
<stop offset="100%" stop-color="#2B79FA"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#A6CAFD" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF"
|
||||
d="M43.583 59.101s.974-5.495 5.008-9.477c4.033-3.982 9.598-4.944 9.598-4.944s-.974 5.494-5.008 9.477c-4.033 3.982-9.598 4.944-9.598 4.944zm-4.676-10.909c0-5.632 3.246-10.197 3.246-10.197s3.246 4.565 3.246 10.197c0 5.632-3.246 10.198-3.246 10.198s-3.246-4.566-3.246-10.198zm-8.041 5.64c-4.074-3.999-5.058-9.517-5.058-9.517s5.621.967 9.695 4.966 5.059 9.516 5.059 9.516-5.621-.966-9.696-4.965zm8.934 6.452s-4.667 3.242-10.412 3.258c-5.745.017-10.392-3.198-10.392-3.198s4.666-3.241 10.411-3.258c5.745-.016 10.393 3.198 10.393 3.198zm.762 1.598s-.985 5.518-5.059 9.517c-4.074 3.999-9.695 4.965-9.695 4.965s.984-5.517 5.058-9.517c4.075-3.999 9.696-4.965 9.696-4.965zm4.686 10.844c-.017 5.673-3.3 10.28-3.3 10.28s-3.256-4.588-3.239-10.261c.017-5.672 3.3-10.279 3.3-10.279s3.256 4.588 3.239 10.26zm-.903-12.172s4.624-3.205 10.328-3.205 10.329 3.205 10.329 3.205-4.625 3.205-10.329 3.205c-5.704 0-10.328-3.205-10.328-3.205zm8.836 6.552c4.034 3.982 5.008 9.477 5.008 9.477s-5.565-.962-9.598-4.945c-4.034-3.982-5.008-9.477-5.008-9.477s5.565.962 9.598 4.945z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF"
|
||||
d="M48.501 29.438c-2.571 0-4.212-1.144-4.47-2.884h1.8c.188.86 1.137 1.417 2.67 1.417 1.909 0 3.046-.929 3.046-2.483v-2.073h-.158c-.673 1.164-1.879 1.819-3.343 1.819-2.759 0-4.47-2.112-4.47-5.27 0-3.157 1.731-5.298 4.47-5.298 1.493 0 2.809.723 3.422 1.857h.158v-1.672h1.622v10.725c0 2.356-1.84 3.862-4.747 3.862zm-.079-13.257c-1.978 0-3.085 1.486-3.085 3.783 0 2.298 1.107 3.784 3.085 3.784s3.164-1.486 3.164-3.784c0-2.297-1.196-3.783-3.164-3.783zm-14.633 4.507c.09 2.082 1.266 3.402 3.076 3.402 1.374 0 2.304-.499 2.749-1.427h1.701c-.514 1.808-2.156 2.913-4.49 2.913-2.956 0-4.806-2.112-4.806-5.445 0-3.315 1.879-5.465 4.806-5.465 2.878 0 4.628 2.023 4.628 5.298v.646h-7.664v.078zm5.874-1.437c-.039-1.868-1.167-3.099-2.857-3.099-1.701 0-2.888 1.231-3.017 3.099h5.874zm-14.246 6.325c-1.522 0-2.749-.655-3.332-1.77h-.158v5.104h-1.701V14.851h1.622v1.76h.158c.682-1.212 1.958-1.945 3.411-1.945 2.72 0 4.48 2.141 4.48 5.455 0 3.294-1.77 5.455-4.48 5.455zm-.395-9.395c-1.928 0-3.145 1.515-3.145 3.94 0 2.415 1.217 3.94 3.135 3.94 1.958 0 3.125-1.477 3.125-3.94 0-2.464-1.167-3.94-3.115-3.94zm-8.885-3.471a1.183 1.183 0 0 1-1.186-1.173c0-.645.534-1.173 1.186-1.173.653 0 1.187.528 1.187 1.173s-.534 1.173-1.187 1.173zm-.85 2.141h1.701v11.057c0 2.171-1.029 3.099-3.264 3.099h-.296V27.57h.257c1.206 0 1.602-.469 1.602-1.632V14.851z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
14
public/js/ueditor/themes/default/exts/jpg.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#4D9CFC"/>
|
||||
<stop offset="100%" stop-color="#2B79FA"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#A6CAFD" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF"
|
||||
d="M43.583 59.101s.974-5.495 5.008-9.477c4.033-3.982 9.598-4.944 9.598-4.944s-.974 5.494-5.008 9.477c-4.033 3.982-9.598 4.944-9.598 4.944zm-4.676-10.909c0-5.632 3.246-10.197 3.246-10.197s3.246 4.565 3.246 10.197c0 5.632-3.246 10.198-3.246 10.198s-3.246-4.566-3.246-10.198zm-8.041 5.64c-4.074-3.999-5.058-9.517-5.058-9.517s5.621.967 9.695 4.966 5.059 9.516 5.059 9.516-5.621-.966-9.696-4.965zm8.934 6.452s-4.667 3.242-10.412 3.258c-5.745.017-10.392-3.198-10.392-3.198s4.666-3.241 10.411-3.258c5.745-.016 10.393 3.198 10.393 3.198zm.762 1.598s-.985 5.518-5.059 9.517c-4.074 3.999-9.695 4.965-9.695 4.965s.984-5.517 5.058-9.517c4.075-3.999 9.696-4.965 9.696-4.965zm4.686 10.844c-.017 5.673-3.3 10.28-3.3 10.28s-3.256-4.588-3.239-10.261c.017-5.672 3.3-10.279 3.3-10.279s3.256 4.588 3.239 10.26zm-.903-12.172s4.624-3.205 10.328-3.205 10.329 3.205 10.329 3.205-4.625 3.205-10.329 3.205c-5.704 0-10.328-3.205-10.328-3.205zm8.836 6.552c4.034 3.982 5.008 9.477 5.008 9.477s-5.565-.962-9.598-4.945c-4.034-3.982-5.008-9.477-5.008-9.477s5.565.962 9.598 4.945z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF"
|
||||
d="M36.944 29.438c-2.571 0-4.213-1.144-4.47-2.884h1.8c.188.86 1.137 1.417 2.67 1.417 1.908 0 3.046-.929 3.046-2.483v-2.073h-.159c-.672 1.164-1.878 1.819-3.342 1.819-2.759 0-4.47-2.112-4.47-5.27 0-3.157 1.731-5.298 4.47-5.298 1.493 0 2.808.723 3.422 1.857h.158v-1.672h1.622v10.725c0 2.356-1.84 3.862-4.747 3.862zm-.079-13.257c-1.978 0-3.085 1.486-3.085 3.783 0 2.298 1.107 3.784 3.085 3.784s3.164-1.486 3.164-3.784c0-2.297-1.196-3.783-3.164-3.783zm-11.448 9.395c-1.522 0-2.749-.655-3.332-1.77h-.158v5.104h-1.701V14.851h1.622v1.76h.158c.682-1.212 1.958-1.945 3.411-1.945 2.72 0 4.48 2.141 4.48 5.455 0 3.294-1.77 5.455-4.48 5.455zm-.395-9.395c-1.928 0-3.145 1.515-3.145 3.94 0 2.415 1.217 3.94 3.135 3.94 1.958 0 3.125-1.477 3.125-3.94 0-2.464-1.167-3.94-3.115-3.94zm-8.885-3.471a1.183 1.183 0 0 1-1.186-1.173c0-.645.534-1.173 1.186-1.173.653 0 1.187.528 1.187 1.173s-.534 1.173-1.187 1.173zm-.85 2.141h1.701v11.057c0 2.171-1.029 3.099-3.263 3.099h-.297V27.57h.257c1.206 0 1.602-.469 1.602-1.632V14.851z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
12
public/js/ueditor/themes/default/exts/log.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#98BCCD"/>
|
||||
<stop offset="100%" stop-color="#76A1B7"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#BEEAFF" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF" d="M63.794 62.015H20.225c-.668 0-1.21-.56-1.21-1.251v-2.502c0-.691.542-1.252 1.21-1.252h43.569c.668 0 1.21.561 1.21 1.252v2.502c0 .691-.542 1.251-1.21 1.251zm0-15.015H20.225c-.668 0-1.21-.56-1.21-1.251v-2.503c0-.691.542-1.251 1.21-1.251h43.569c.668 0 1.21.56 1.21 1.251v2.503c0 .691-.542 1.251-1.21 1.251zM20.187 70.994h43.62c.661 0 1.197.56 1.197 1.251v2.502c0 .691-.536 1.252-1.197 1.252h-43.62c-.661 0-1.198-.561-1.198-1.252v-2.502c0-.691.537-1.251 1.198-1.251z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF" d="M34.339 29.214c-2.571 0-4.212-1.144-4.469-2.884h1.799c.188.86 1.138 1.417 2.67 1.417 1.909 0 3.046-.928 3.046-2.483v-2.072h-.158c-.673 1.163-1.879 1.818-3.343 1.818-2.759 0-4.469-2.112-4.469-5.269 0-3.158 1.73-5.299 4.469-5.299 1.494 0 2.809.723 3.422 1.857h.158v-1.671h1.622v10.724c0 2.356-1.839 3.862-4.747 3.862zm-.079-13.257c-1.978 0-3.085 1.486-3.085 3.784 0 2.297 1.107 3.783 3.085 3.783s3.165-1.486 3.165-3.783c0-2.298-1.197-3.784-3.165-3.784zm-11.883 9.395c-3.036 0-4.914-2.072-4.914-5.455 0-3.392 1.878-5.455 4.914-5.455 3.036 0 4.915 2.063 4.915 5.455 0 3.383-1.879 5.455-4.915 5.455zm0-9.395c-2.017 0-3.154 1.437-3.154 3.94 0 2.493 1.137 3.94 3.154 3.94s3.155-1.447 3.155-3.94c0-2.503-1.138-3.94-3.155-3.94zm-9.379-5.514h1.701v14.724h-1.701V10.443z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
14
public/js/ueditor/themes/default/exts/mp3.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#F45F5F"/>
|
||||
<stop offset="100%" stop-color="#EE3C3C"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#FF8578" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF"
|
||||
d="M19.162 81.782c2.206 2.801 6.763 2.983 10.179.41 1.389-1.048 2.351-2.392 2.884-3.802.307-.595.508-1.921.508-2.885V54.858l24.579-6.073V60.93c0 4.015-2.404 4.916-3.516 5.121-.097.011-.192.034-.289.052l-.124.014.018.006a8.981 8.981 0 0 0-3.829 1.667c-3.415 2.574-4.397 6.93-2.191 9.731 2.206 2.801 6.763 2.986 10.179.413 1.728-1.304 2.828-3.064 3.211-4.847.133-.433.228-.686.228-1.226V42.712c0-1.592-2.059-4.131-3.687-3.644l-25.808 6.073c-1.628.485-2.458 2.052-2.458 3.644v17.003c0 4.022-2.413 4.322-3.522 4.524-.056.008-.112.026-.171.034a3.291 3.291 0 0 1-.239.032l.032.014a9.021 9.021 0 0 0-3.793 1.659c-3.415 2.574-4.394 6.93-2.191 9.731z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF"
|
||||
d="M49.544 17.707v.157c1.938.244 3.115 1.574 3.115 3.5 0 2.326-2.205 4.135-5.024 4.135-2.897 0-4.895-1.594-5.023-4.008h1.721c.158 1.505 1.443 2.473 3.283 2.473 1.878 0 3.213-1.105 3.213-2.649 0-1.633-1.255-2.65-3.283-2.65h-1.809V17.16h1.73c1.622 0 2.769-1.037 2.769-2.503 0-1.437-1.098-2.395-2.739-2.395-1.642 0-2.719.899-2.868 2.415h-1.73c.178-2.445 1.948-3.95 4.667-3.95 2.492 0 4.48 1.642 4.48 3.695 0 1.682-.94 2.914-2.502 3.285zm-13.851 7.645c-1.522 0-2.749-.655-3.332-1.769h-.158v5.103h-1.701V14.628h1.622v1.759h.158c.682-1.212 1.958-1.945 3.411-1.945 2.72 0 4.48 2.141 4.48 5.455 0 3.295-1.77 5.455-4.48 5.455zm-.395-9.395c-1.928 0-3.145 1.516-3.145 3.94 0 2.415 1.217 3.94 3.135 3.94 1.958 0 3.125-1.476 3.125-3.94s-1.167-3.94-3.115-3.94zm-9.583 2.317c0-1.554-.741-2.317-2.244-2.317-1.484 0-2.473 1.095-2.473 2.435v6.775h-1.701V18.01c0-1.251-.88-2.053-2.224-2.053-1.395 0-2.473 1.193-2.473 2.679v6.531h-1.7V14.628h1.621v1.662h.158c.485-1.174 1.553-1.848 2.977-1.848 1.444 0 2.452.753 2.947 1.848h.158c.574-1.115 1.79-1.848 3.263-1.848 2.176 0 3.392 1.232 3.392 3.441v7.284h-1.701v-6.893z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
12
public/js/ueditor/themes/default/exts/mp4.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#9E9EEE"/>
|
||||
<stop offset="100%" stop-color="#7D7CE5"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#D9DEFA" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF"
|
||||
d="M60.077 53.243v2.924h-1.741v-2.924h-6.952V51.64c1.276-2.239 3.541-5.778 6.112-9.581h2.581v9.61h2.027v1.574h-2.027zm-1.731-9.551h-.119c-1.463 2.102-3.322 5.015-5.023 7.87v.117h5.142v-7.987zm-13.653 12.66c-1.522 0-2.749-.655-3.332-1.769h-.158v5.103h-1.701V45.628h1.622v1.759h.158c.682-1.212 1.958-1.945 3.411-1.945 2.72 0 4.48 2.141 4.48 5.455 0 3.295-1.77 5.455-4.48 5.455zm-.395-9.395c-1.928 0-3.145 1.516-3.145 3.94 0 2.415 1.217 3.94 3.135 3.94 1.958 0 3.125-1.476 3.125-3.94s-1.167-3.94-3.115-3.94zm-9.583 2.317c0-1.554-.741-2.317-2.244-2.317-1.484 0-2.473 1.095-2.473 2.435v6.775h-1.701V49.01c0-1.251-.88-2.053-2.224-2.053-1.395 0-2.473 1.193-2.473 2.679v6.531h-1.7V45.628h1.621v1.662h.158c.485-1.174 1.553-1.848 2.977-1.848 1.444 0 2.452.753 2.947 1.848h.158c.574-1.115 1.79-1.848 3.263-1.848 2.176 0 3.392 1.232 3.392 3.441v7.284h-1.701v-6.893z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
14
public/js/ueditor/themes/default/exts/pdf.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#F45F5F"/>
|
||||
<stop offset="100%" stop-color="#EE3C3C"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#FF8578" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF"
|
||||
d="M64.422 71.822c-.27.962-.943.686-1.482 1.237-.27-.275-.808.274-1.348 0-2.964.274-8.084-1.649-11.991-3.847-5.39.687-11.184 2.747-16.439 3.847-4.581 8.653-7.815 11.538-10.779 11.95-.27-.275-1.212 0-1.482-.55l-1.078-.412c-.674-.962-1.078-1.099-.674-2.197.405-1.924 2.964-5.083 7.007-7.281.404-.412 2.56-1.373 2.56-1.51l1.212-.551c1.078-2.059 2.426-4.395 3.773-7.142l.135-.137 4.042-8.791.404-.824c-1.751-6.869-2.425-11.264-1.751-14.973.538-.549 1.212-1.923 2.829-1.511l.674-.137c1.212.275 2.021.824 2.425 1.923l.135.275c0 .549.135.275.135.961.404 2.473-1.078 11.264-1.078 11.127 0 .549-.135.549-.135 1.098 1.078 3.435 3.369 7.555 6.063 9.478.944 1.236 2.291 1.511 3.369 2.611 2.695-.825 5.12-.276 7.276-.688 3.233.412 4.985.412 6.063 1.51v-.136c.269.549.674.824.674 1.373 0 .961.269 2.885-.539 3.297zm-37.054 3.984c-2.748 2.8-4.972 5.08-5.469 6.845-.018.005-.037.018-.055.022v.138c.012-.052.04-.108.055-.16 1.602-.453 3.351-2.917 6.682-7.807-.674.412-.808.962-1.213.962zm12.397-35.303c-.27-.274-.404 3.573-.404 3.298 0 1.648.538 4.532.808 6.18.673-1.373 1.077-2.609 1.077-4.944 0-1.923-.404-4.945-1.481-4.534zm5.793 25.962c-2.156-2.197-4.312-4.121-5.659-7.417-.674 2.198-1.751 4.67-3.503 7.829-.808 1.236-1.213 2.747-2.021 3.572v.137c3.638-1.511 7.546-2.061 12.126-3.572-.134.138-.673-.549-.943-.549zM61.997 68.8c-1.617 0-2.021-.687-3.773-.275-.674-.412-2.021 0-2.964 0 2.829 1.373 4.85 1.649 6.602 2.06.27-.274 1.482.276 1.482-.411v.137c.404-.413.404-.825-1.347-1.511z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF"
|
||||
d="M41.658 11.959c-1.018 0-1.592.508-1.592 1.691v.978h2.443v1.407h-2.443v9.132h-1.701v-9.132h-1.77v-1.407h1.77v-1.027c0-2.16 1.138-3.06 3.194-3.06.337 0 .633.03 1.049.098v1.408a5.133 5.133 0 0 0-.95-.088zm-8.916 11.526h-.158c-.672 1.173-1.938 1.867-3.411 1.867-2.73 0-4.48-2.141-4.48-5.455 0-3.304 1.77-5.455 4.48-5.455 1.483 0 2.739.694 3.342 1.848h.148v-5.847h1.701v14.724h-1.622v-1.682zm-3.174-7.528c-1.938 0-3.115 1.486-3.115 3.94 0 2.464 1.167 3.94 3.115 3.94 1.938 0 3.135-1.506 3.135-3.94 0-2.415-1.206-3.94-3.135-3.94zm-11.477 9.395c-1.523 0-2.749-.655-3.332-1.769H14.6v5.103h-1.7V14.628h1.621v1.759h.158c.683-1.212 1.958-1.945 3.412-1.945 2.719 0 4.48 2.141 4.48 5.455 0 3.295-1.77 5.455-4.48 5.455zm-.395-9.395c-1.929 0-3.145 1.516-3.145 3.94 0 2.415 1.216 3.94 3.135 3.94 1.958 0 3.124-1.476 3.124-3.94s-1.166-3.94-3.114-3.94z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
14
public/js/ueditor/themes/default/exts/png.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="84" height="100">
|
||||
<defs>
|
||||
<linearGradient id="a" x1="0%" x2="0%" y1="100%" y2="0%">
|
||||
<stop offset="0%" stop-color="#4D9CFC"/>
|
||||
<stop offset="100%" stop-color="#2B79FA"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path fill-rule="evenodd" fill="url(#a)" d="M84 22v74a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h58l22 22z"/>
|
||||
<path fill-rule="evenodd" fill="#A6CAFD" d="M84 22H66a4 4 0 0 1-4-4V0l22 22z"/>
|
||||
<path fill-rule="evenodd" opacity=".6" fill="#FFF"
|
||||
d="M43.583 59.101s.974-5.495 5.008-9.477c4.033-3.982 9.598-4.944 9.598-4.944s-.974 5.494-5.008 9.477c-4.033 3.982-9.598 4.944-9.598 4.944zm-4.675-10.909c0-5.632 3.245-10.197 3.245-10.197s3.246 4.565 3.246 10.197c0 5.632-3.246 10.198-3.246 10.198s-3.245-4.566-3.245-10.198zm-8.042 5.64c-4.074-3.999-5.058-9.517-5.058-9.517s5.621.967 9.695 4.966c4.075 3.999 5.059 9.516 5.059 9.516s-5.621-.966-9.696-4.965zm8.934 6.452s-4.667 3.242-10.412 3.258c-5.745.017-10.392-3.198-10.392-3.198s4.666-3.241 10.411-3.258c5.745-.016 10.393 3.198 10.393 3.198zm.762 1.598s-.984 5.518-5.059 9.517c-4.074 3.999-9.695 4.965-9.695 4.965s.984-5.517 5.058-9.517c4.075-3.999 9.696-4.965 9.696-4.965zm4.686 10.844c-.017 5.673-3.3 10.28-3.3 10.28s-3.256-4.588-3.239-10.261c.017-5.672 3.3-10.279 3.3-10.279s3.256 4.588 3.239 10.26zm-.903-12.172s4.624-3.205 10.328-3.205 10.329 3.205 10.329 3.205-4.625 3.205-10.329 3.205c-5.704 0-10.328-3.205-10.328-3.205zm8.836 6.552c4.034 3.982 5.008 9.477 5.008 9.477s-5.565-.962-9.598-4.945c-4.034-3.982-5.008-9.477-5.008-9.477s5.565.962 9.598 4.945z"/>
|
||||
<path fill-rule="evenodd" fill="#FFF"
|
||||
d="M41.77 29.438c-2.571 0-4.213-1.144-4.47-2.884h1.8c.188.86 1.137 1.417 2.67 1.417 1.908 0 3.045-.929 3.045-2.483v-2.073h-.158c-.672 1.164-1.879 1.819-3.342 1.819-2.759 0-4.47-2.112-4.47-5.27 0-3.157 1.731-5.298 4.47-5.298 1.493 0 2.808.723 3.421 1.857h.158v-1.672h1.622v10.725c0 2.356-1.839 3.862-4.746 3.862zm-.08-13.257c-1.977 0-3.085 1.486-3.085 3.783 0 2.298 1.108 3.784 3.085 3.784 1.978 0 3.165-1.486 3.165-3.784 0-2.297-1.197-3.783-3.165-3.783zm-9.104 2.796c0-1.897-.811-2.796-2.512-2.796s-2.798 1.124-2.798 2.972v6.237h-1.701V14.851h1.622v1.662h.158c.534-1.163 1.572-1.847 3.204-1.847 2.393 0 3.728 1.398 3.728 3.9v6.824h-1.701v-6.413zm-14.147 6.599c-1.523 0-2.749-.655-3.333-1.77h-.158v5.104h-1.701V14.851h1.622v1.76h.158c.683-1.212 1.958-1.945 3.412-1.945 2.719 0 4.479 2.141 4.479 5.455 0 3.294-1.77 5.455-4.479 5.455zm-.396-9.395c-1.928 0-3.144 1.515-3.144 3.94 0 2.415 1.216 3.94 3.134 3.94 1.958 0 3.125-1.477 3.125-3.94 0-2.464-1.167-3.94-3.115-3.94z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
24
public/js/ueditor/themes/default/exts/ppt.svg
Normal file
@ -0,0 +1,24 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="85" height="100" viewBox="0 0 85 100">
|
||||
<defs>
|
||||
<linearGradient id="ppt-a" x1="50%" x2="50%" y1="0%" y2="100%">
|
||||
<stop offset="0%" stop-color="#E86D36"/>
|
||||
<stop offset="100%" stop-color="#FA9B70"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="url(#ppt-a)"
|
||||
d="M6,0 L62.3333333,0 L62.3333333,0 L85,22.8571429 L85,94 C85,97.3137085 82.3137085,100 79,100 L6,100 C2.6862915,100 4.05812251e-16,97.3137085 0,94 L0,6 C-4.05812251e-16,2.6862915 2.6862915,6.08718376e-16 6,0 Z"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="33.803" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="45.07" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="56.338" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="67.606" fill="#FFF" opacity=".5"/>
|
||||
<path fill="#FFF"
|
||||
d="M62.3333333,0 L85,22.5352113 L68.3333333,22.5352113 C65.0196248,22.5352113 62.3333333,19.8489198 62.3333333,16.5352113 L62.3333333,0 L62.3333333,0 Z"
|
||||
opacity=".5"/>
|
||||
<rect width="42.5" height="42.254" y="30.986" fill="#E96123" rx="2"/>
|
||||
<path fill="#FFF" fill-rule="nonzero"
|
||||
d="M11.1666667,40.8450704 C11.1666667,39.1882162 12.5098124,37.8450704 14.1666667,37.8450704 L25.5328638,37.8450704 C30.3011815,37.8450704 34.1666667,41.7105556 34.1666667,46.4788732 C34.1666667,51.2471909 30.3011815,55.1126761 25.5328638,55.1126761 L14.1666667,55.1126761 C12.5098124,55.1126761 11.1666667,53.7695303 11.1666667,52.1126761 L11.1666667,40.8450704 Z M17.1666667,49.1126761 L25.5328638,49.1126761 C26.987473,49.1126761 28.1666667,47.9334824 28.1666667,46.4788732 C28.1666667,45.0242641 26.987473,43.8450704 25.5328638,43.8450704 L17.1666667,43.8450704 L17.1666667,49.1126761 Z"/>
|
||||
<path stroke="#FFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="6"
|
||||
d="M14.1666667,40.8450704 L14.1666667,63.3802817"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
24
public/js/ueditor/themes/default/exts/pptx.svg
Normal file
@ -0,0 +1,24 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="85" height="100" viewBox="0 0 85 100">
|
||||
<defs>
|
||||
<linearGradient id="ppt-a" x1="50%" x2="50%" y1="0%" y2="100%">
|
||||
<stop offset="0%" stop-color="#E86D36"/>
|
||||
<stop offset="100%" stop-color="#FA9B70"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<path fill="url(#ppt-a)"
|
||||
d="M6,0 L62.3333333,0 L62.3333333,0 L85,22.8571429 L85,94 C85,97.3137085 82.3137085,100 79,100 L6,100 C2.6862915,100 4.05812251e-16,97.3137085 0,94 L0,6 C-4.05812251e-16,2.6862915 2.6862915,6.08718376e-16 6,0 Z"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="33.803" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="45.07" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="56.338" fill="#FFF" opacity=".5"/>
|
||||
<rect width="22.667" height="2.817" x="51" y="67.606" fill="#FFF" opacity=".5"/>
|
||||
<path fill="#FFF"
|
||||
d="M62.3333333,0 L85,22.5352113 L68.3333333,22.5352113 C65.0196248,22.5352113 62.3333333,19.8489198 62.3333333,16.5352113 L62.3333333,0 L62.3333333,0 Z"
|
||||
opacity=".5"/>
|
||||
<rect width="42.5" height="42.254" y="30.986" fill="#E96123" rx="2"/>
|
||||
<path fill="#FFF" fill-rule="nonzero"
|
||||
d="M11.1666667,40.8450704 C11.1666667,39.1882162 12.5098124,37.8450704 14.1666667,37.8450704 L25.5328638,37.8450704 C30.3011815,37.8450704 34.1666667,41.7105556 34.1666667,46.4788732 C34.1666667,51.2471909 30.3011815,55.1126761 25.5328638,55.1126761 L14.1666667,55.1126761 C12.5098124,55.1126761 11.1666667,53.7695303 11.1666667,52.1126761 L11.1666667,40.8450704 Z M17.1666667,49.1126761 L25.5328638,49.1126761 C26.987473,49.1126761 28.1666667,47.9334824 28.1666667,46.4788732 C28.1666667,45.0242641 26.987473,43.8450704 25.5328638,43.8450704 L17.1666667,43.8450704 L17.1666667,49.1126761 Z"/>
|
||||
<path stroke="#FFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="6"
|
||||
d="M14.1666667,40.8450704 L14.1666667,63.3802817"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |