@ -0,0 +1,81 @@ |
|||
(function () { |
|||
var parent = window.parent; |
|||
//dialog对象
|
|||
dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )]; |
|||
//当前打开dialog的编辑器实例
|
|||
editor = dialog.editor; |
|||
|
|||
UE = parent.UE; |
|||
|
|||
domUtils = UE.dom.domUtils; |
|||
|
|||
utils = UE.utils; |
|||
|
|||
browser = UE.browser; |
|||
|
|||
ajax = UE.ajax; |
|||
|
|||
$G = function ( id ) { |
|||
return document.getElementById( id ) |
|||
}; |
|||
//focus元素
|
|||
$focus = function ( node ) { |
|||
setTimeout( function () { |
|||
if ( browser.ie ) { |
|||
var r = node.createTextRange(); |
|||
r.collapse( false ); |
|||
r.select(); |
|||
} else { |
|||
node.focus() |
|||
} |
|||
}, 0 ) |
|||
}; |
|||
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 () { |
|||
|
|||
var langImgPath = editor.options.langPath + editor.options.lang + "/images/"; |
|||
//针对静态资源
|
|||
for ( var i in lang["static"] ) { |
|||
var dom = $G( i ); |
|||
if(!dom) continue; |
|||
var tagName = dom.tagName, |
|||
content = lang["static"][i]; |
|||
if(content.src){ |
|||
//clone
|
|||
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) |
|||
} |
|||
switch ( tagName.toLowerCase() ) { |
|||
case "var": |
|||
dom.parentNode.replaceChild( document.createTextNode( content ), dom ); |
|||
break; |
|||
case "select": |
|||
var ops = dom.options; |
|||
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] ); |
|||
} |
|||
break; |
|||
default : |
|||
domUtils.setAttributes( dom, content); |
|||
} |
|||
} |
|||
} ); |
|||
} |
|||
|
|||
|
|||
})(); |
|||
|
|||
|
After Width: | Height: | Size: 628 B |
|
After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 516 B |
|
After Width: | Height: | Size: 578 B |
|
After Width: | Height: | Size: 519 B |
|
After Width: | Height: | Size: 657 B |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 454 B |
|
After Width: | Height: | Size: 536 B |
|
After Width: | Height: | Size: 435 B |
|
After Width: | Height: | Size: 330 B |
|
After Width: | Height: | Size: 775 B |
|
After Width: | Height: | Size: 444 B |
|
After Width: | Height: | Size: 511 B |
@ -0,0 +1,72 @@ |
|||
/*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;} |
|||
/*module |
|||
*/ |
|||
.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;} |
|||
|
|||
.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%;} |
|||
/*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;} |
|||
/*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;} |
|||
|
|||
.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;} |
|||
/*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')} |
|||
|
|||
|
|||
@ -0,0 +1,95 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<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"></script> |
|||
<link rel="stylesheet" type="text/css" href="scrawl.css"> |
|||
</head> |
|||
<body> |
|||
<div class="main" id="J_wrap"> |
|||
<div class="hot"> |
|||
<div class="drawBoard border_style1"> |
|||
<canvas id="J_brushBoard" class="brushBorad" width="360" height="300"></canvas> |
|||
<div id="J_picBoard" class="picBoard" style="width: 360px;height: 300px"></div> |
|||
</div> |
|||
<div id="J_operateBar" class="operateBar"> |
|||
<span id="J_previousStep" class="previousStep"> |
|||
<em class="icon"></em> |
|||
<em class="text"><var id="lang_input_previousStep"></var></em> |
|||
</span> |
|||
<span id="J_nextStep" class="nextStep"> |
|||
<em class="icon"></em> |
|||
<em class="text"><var id="lang_input_nextsStep"></var></em> |
|||
</span> |
|||
<span id="J_clearBoard" class="clearBoard"> |
|||
<em class="icon"></em> |
|||
<em class="text"><var id="lang_input_clear"></var></em> |
|||
</span> |
|||
<span id="J_sacleBoard" class="scaleBoard"> |
|||
<em class="icon"></em> |
|||
<em class="text"><var id="lang_input_ScalePic"></var></em> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<div class="drawToolbar border_style1"> |
|||
<div id="J_colorBar" class="colorBar"></div> |
|||
<div id="J_brushBar" class="sectionBar"> |
|||
<em class="brushIcon"></em> |
|||
<a href="javascript:void(0)" class="size1">1</a> |
|||
<a href="javascript:void(0)" class="size2">3</a> |
|||
<a href="javascript:void(0)" class="size3">5</a> |
|||
<a href="javascript:void(0)" class="size4">7</a> |
|||
</div> |
|||
<div id="J_eraserBar" class="sectionBar"> |
|||
<em class="eraserIcon"></em> |
|||
<a href="javascript:void(0)" class="size1">1</a> |
|||
<a href="javascript:void(0)" class="size2">3</a> |
|||
<a href="javascript:void(0)" class="size3">5</a> |
|||
<a href="javascript:void(0)" class="size4">7</a> |
|||
</div> |
|||
<div class="sectionBar"> |
|||
<div id="J_addImg" class="addImgH"> |
|||
<em class="icon"></em> |
|||
<em class="text"><var id="lang_input_addPic"></var></em> |
|||
<form method="post" id="fileForm" enctype="multipart/form-data" class="addImgH_form" target="up"> |
|||
<input type="file" name="upfile" id="J_imgTxt" |
|||
accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"/> |
|||
</form> |
|||
<iframe name="up" style="display: none"></iframe> |
|||
</div> |
|||
</div> |
|||
<div class="sectionBar"> |
|||
<span id="J_removeImg" class="removeImg"> |
|||
<em class="icon"></em> |
|||
<em class="text"><var id="lang_input_removePic"></var></em> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div id="J_maskLayer" class="maskLayerNull"></div> |
|||
|
|||
<script type="text/javascript" src="scrawl.js"></script> |
|||
<script type="text/javascript"> |
|||
var settings = { |
|||
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 //撤销次数 |
|||
}; |
|||
|
|||
var scrawlObj = new scrawl( settings ); |
|||
scrawlObj.isCancelScrawl = false; |
|||
|
|||
dialog.onok = function () { |
|||
exec( scrawlObj ); |
|||
return false; |
|||
}; |
|||
dialog.oncancel = function () { |
|||
scrawlObj.isCancelScrawl = true; |
|||
}; |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,671 @@ |
|||
/** |
|||
* Created with JetBrains PhpStorm. |
|||
* User: xuheng |
|||
* Date: 12-5-22 |
|||
* Time: 上午11:38 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
var scrawl = function (options) { |
|||
options && this.initOptions(options); |
|||
}; |
|||
(function () { |
|||
var canvas = $G("J_brushBoard"), |
|||
context = canvas.getContext('2d'), |
|||
drawStep = [], //undo redo存储
|
|||
drawStepIndex = 0; //undo redo指针
|
|||
|
|||
scrawl.prototype = { |
|||
isScrawl:false, //是否涂鸦
|
|||
brushWidth:-1, //画笔粗细
|
|||
brushColor:"", //画笔颜色
|
|||
|
|||
initOptions:function (options) { |
|||
var me = this; |
|||
me.originalState(options);//初始页面状态
|
|||
me._buildToolbarColor(options.colorList);//动态生成颜色选择集合
|
|||
|
|||
me._addBoardListener(options.saveNum);//添加画板处理
|
|||
me._addOPerateListener(options.saveNum);//添加undo redo clearBoard处理
|
|||
me._addColorBarListener();//添加颜色选择处理
|
|||
me._addBrushBarListener();//添加画笔大小处理
|
|||
me._addEraserBarListener();//添加橡皮大小处理
|
|||
me._addAddImgListener();//添加增添背景图片处理
|
|||
me._addRemoveImgListenter();//删除背景图片处理
|
|||
me._addScalePicListenter();//添加缩放处理
|
|||
me._addClearSelectionListenter();//添加清楚选中状态处理
|
|||
|
|||
me._originalColorSelect(options.drawBrushColor);//初始化颜色选中
|
|||
me._originalBrushSelect(options.drawBrushSize);//初始化画笔选中
|
|||
me._clearSelection();//清楚选中状态
|
|||
}, |
|||
|
|||
originalState:function (options) { |
|||
var me = this; |
|||
|
|||
me.brushWidth = options.drawBrushSize;//同步画笔粗细
|
|||
me.brushColor = options.drawBrushColor;//同步画笔颜色
|
|||
|
|||
context.lineWidth = me.brushWidth;//初始画笔大小
|
|||
context.strokeStyle = me.brushColor;//初始画笔颜色
|
|||
context.fillStyle = "transparent";//初始画布背景颜色
|
|||
context.lineCap = "round";//去除锯齿
|
|||
context.fill(); |
|||
}, |
|||
_buildToolbarColor:function (colorList) { |
|||
var tmp = null, arr = []; |
|||
arr.push("<table id='J_colorList'>"); |
|||
for (var i = 0, color; color = colorList[i++];) { |
|||
if ((i - 1) % 5 == 0) { |
|||
if (i != 1) { |
|||
arr.push("</tr>"); |
|||
} |
|||
arr.push("<tr>"); |
|||
} |
|||
tmp = '#' + color; |
|||
arr.push("<td><a title='" + tmp + "' href='javascript:void(0)' style='background-color:" + tmp + "'></a></td>"); |
|||
} |
|||
arr.push("</tr></table>"); |
|||
$G("J_colorBar").innerHTML = arr.join(""); |
|||
}, |
|||
|
|||
_addBoardListener:function (saveNum) { |
|||
var me = this, |
|||
margin = 0, |
|||
startX = -1, |
|||
startY = -1, |
|||
isMouseDown = false, |
|||
isMouseMove = false, |
|||
isMouseUp = false, |
|||
buttonPress = 0, button, flag = ''; |
|||
|
|||
margin = parseInt(domUtils.getComputedStyle($G("J_wrap"), "margin-left")); |
|||
drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height)); |
|||
drawStepIndex += 1; |
|||
|
|||
domUtils.on(canvas, ["mousedown", "mousemove", "mouseup", "mouseout"], function (e) { |
|||
button = browser.webkit ? e.which : buttonPress; |
|||
switch (e.type) { |
|||
case 'mousedown': |
|||
buttonPress = 1; |
|||
flag = 1; |
|||
isMouseDown = true; |
|||
isMouseUp = false; |
|||
isMouseMove = false; |
|||
me.isScrawl = true; |
|||
startX = e.clientX - margin;//10为外边距总和
|
|||
startY = e.clientY - margin; |
|||
context.beginPath(); |
|||
break; |
|||
case 'mousemove' : |
|||
if (!flag && button == 0) { |
|||
return; |
|||
} |
|||
if (!flag && button) { |
|||
startX = e.clientX - margin;//10为外边距总和
|
|||
startY = e.clientY - margin; |
|||
context.beginPath(); |
|||
flag = 1; |
|||
} |
|||
if (isMouseUp || !isMouseDown) { |
|||
return; |
|||
} |
|||
var endX = e.clientX - margin, |
|||
endY = e.clientY - margin; |
|||
|
|||
context.moveTo(startX, startY); |
|||
context.lineTo(endX, endY); |
|||
context.stroke(); |
|||
startX = endX; |
|||
startY = endY; |
|||
isMouseMove = true; |
|||
break; |
|||
case 'mouseup': |
|||
buttonPress = 0; |
|||
if (!isMouseDown)return; |
|||
if (!isMouseMove) { |
|||
context.arc(startX, startY, context.lineWidth, 0, Math.PI * 2, false); |
|||
context.fillStyle = context.strokeStyle; |
|||
context.fill(); |
|||
} |
|||
context.closePath(); |
|||
me._saveOPerate(saveNum); |
|||
isMouseDown = false; |
|||
isMouseMove = false; |
|||
isMouseUp = true; |
|||
startX = -1; |
|||
startY = -1; |
|||
break; |
|||
case 'mouseout': |
|||
flag = ''; |
|||
buttonPress = 0; |
|||
if (button == 1) return; |
|||
context.closePath(); |
|||
break; |
|||
} |
|||
}); |
|||
}, |
|||
_addOPerateListener:function (saveNum) { |
|||
var me = this; |
|||
domUtils.on($G("J_previousStep"), "click", function () { |
|||
if (drawStepIndex > 1) { |
|||
drawStepIndex -= 1; |
|||
context.clearRect(0, 0, context.canvas.width, context.canvas.height); |
|||
context.putImageData(drawStep[drawStepIndex - 1], 0, 0); |
|||
me.btn2Highlight("J_nextStep"); |
|||
drawStepIndex == 1 && me.btn2disable("J_previousStep"); |
|||
} |
|||
}); |
|||
domUtils.on($G("J_nextStep"), "click", function () { |
|||
if (drawStepIndex > 0 && drawStepIndex < drawStep.length) { |
|||
context.clearRect(0, 0, context.canvas.width, context.canvas.height); |
|||
context.putImageData(drawStep[drawStepIndex], 0, 0); |
|||
drawStepIndex += 1; |
|||
me.btn2Highlight("J_previousStep"); |
|||
drawStepIndex == drawStep.length && me.btn2disable("J_nextStep"); |
|||
} |
|||
}); |
|||
domUtils.on($G("J_clearBoard"), "click", function () { |
|||
context.clearRect(0, 0, context.canvas.width, context.canvas.height); |
|||
drawStep = []; |
|||
me._saveOPerate(saveNum); |
|||
drawStepIndex = 1; |
|||
me.isScrawl = false; |
|||
me.btn2disable("J_previousStep"); |
|||
me.btn2disable("J_nextStep"); |
|||
me.btn2disable("J_clearBoard"); |
|||
}); |
|||
}, |
|||
_addColorBarListener:function () { |
|||
var me = this; |
|||
domUtils.on($G("J_colorBar"), "click", function (e) { |
|||
var target = me.getTarget(e), |
|||
color = target.title; |
|||
if (!!color) { |
|||
me._addColorSelect(target); |
|||
|
|||
me.brushColor = color; |
|||
context.globalCompositeOperation = "source-over"; |
|||
context.lineWidth = me.brushWidth; |
|||
context.strokeStyle = color; |
|||
} |
|||
}); |
|||
}, |
|||
_addBrushBarListener:function () { |
|||
var me = this; |
|||
domUtils.on($G("J_brushBar"), "click", function (e) { |
|||
var target = me.getTarget(e), |
|||
size = browser.ie ? target.innerText : target.text; |
|||
if (!!size) { |
|||
me._addBESelect(target); |
|||
|
|||
context.globalCompositeOperation = "source-over"; |
|||
context.lineWidth = parseInt(size); |
|||
context.strokeStyle = me.brushColor; |
|||
me.brushWidth = context.lineWidth; |
|||
} |
|||
}); |
|||
}, |
|||
_addEraserBarListener:function () { |
|||
var me = this; |
|||
domUtils.on($G("J_eraserBar"), "click", function (e) { |
|||
var target = me.getTarget(e), |
|||
size = browser.ie ? target.innerText : target.text; |
|||
if (!!size) { |
|||
me._addBESelect(target); |
|||
|
|||
context.lineWidth = parseInt(size); |
|||
context.globalCompositeOperation = "destination-out"; |
|||
context.strokeStyle = "#FFF"; |
|||
} |
|||
}); |
|||
}, |
|||
_addAddImgListener:function () { |
|||
var file = $G("J_imgTxt"); |
|||
if (!window.FileReader) { |
|||
$G("J_addImg").style.display = 'none'; |
|||
$G("J_removeImg").style.display = 'none'; |
|||
$G("J_sacleBoard").style.display = 'none'; |
|||
} |
|||
domUtils.on(file, "change", function (e) { |
|||
var frm = file.parentNode; |
|||
addMaskLayer(lang.backgroundUploading); |
|||
|
|||
var target = e.target || e.srcElement, |
|||
reader = new FileReader(); |
|||
reader.onload = function(evt){ |
|||
var target = evt.target || evt.srcElement; |
|||
ue_callback(target.result, 'SUCCESS'); |
|||
}; |
|||
reader.readAsDataURL(target.files[0]); |
|||
frm.reset(); |
|||
}); |
|||
}, |
|||
_addRemoveImgListenter:function () { |
|||
var me = this; |
|||
domUtils.on($G("J_removeImg"), "click", function () { |
|||
$G("J_picBoard").innerHTML = ""; |
|||
me.btn2disable("J_removeImg"); |
|||
me.btn2disable("J_sacleBoard"); |
|||
}); |
|||
}, |
|||
_addScalePicListenter:function () { |
|||
domUtils.on($G("J_sacleBoard"), "click", function () { |
|||
var picBoard = $G("J_picBoard"), |
|||
scaleCon = $G("J_scaleCon"), |
|||
img = picBoard.children[0]; |
|||
|
|||
if (img) { |
|||
if (!scaleCon) { |
|||
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()); |
|||
scale.startScale(img); |
|||
} else { |
|||
if (scaleCon.style.visibility == "visible") { |
|||
scaleCon.style.visibility = "hidden"; |
|||
picBoard.style.position = ""; |
|||
picBoard.style.zIndex = ""; |
|||
} else { |
|||
scaleCon.style.visibility = "visible"; |
|||
picBoard.style.cssText += "position:relative;z-index:999"; |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
_addClearSelectionListenter:function () { |
|||
var doc = document; |
|||
domUtils.on(doc, 'mousemove', function (e) { |
|||
if (browser.ie && browser.version < 11) |
|||
doc.selection.clear(); |
|||
else |
|||
window.getSelection().removeAllRanges(); |
|||
}); |
|||
}, |
|||
_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) { |
|||
var me = this; |
|||
if (drawStep.length <= saveNum) { |
|||
if(drawStepIndex<drawStep.length){ |
|||
me.btn2disable("J_nextStep"); |
|||
drawStep.splice(drawStepIndex); |
|||
} |
|||
drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height)); |
|||
drawStepIndex = drawStep.length; |
|||
} else { |
|||
drawStep.shift(); |
|||
drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height)); |
|||
drawStepIndex = drawStep.length; |
|||
} |
|||
me.btn2Highlight("J_previousStep"); |
|||
me.btn2Highlight("J_clearBoard"); |
|||
}, |
|||
|
|||
_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) { |
|||
cell.children[0].style.opacity = 1; |
|||
} |
|||
} |
|||
}, |
|||
_originalBrushSelect:function (text) { |
|||
var brushList = $G("J_brushBar").children; |
|||
for (var i = 0, ele; ele = brushList[i++];) { |
|||
if (ele.tagName.toLowerCase() == "a") { |
|||
var size = browser.ie ? ele.innerText : ele.text; |
|||
if (size.toLowerCase() == text) { |
|||
ele.style.opacity = 1; |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
_addColorSelect:function (target) { |
|||
var me = this, |
|||
colorList = $G("J_colorList").getElementsByTagName("td"), |
|||
eraserList = $G("J_eraserBar").children, |
|||
brushList = $G("J_brushBar").children; |
|||
|
|||
for (var i = 0, cell; cell = colorList[i++];) { |
|||
cell.children[0].style.opacity = 0.3; |
|||
} |
|||
for (var k = 0, ele; ele = brushList[k++];) { |
|||
if (ele.tagName.toLowerCase() == "a") { |
|||
ele.style.opacity = 0.3; |
|||
var size = browser.ie ? ele.innerText : ele.text; |
|||
if (size.toLowerCase() == this.brushWidth) { |
|||
ele.style.opacity = 1; |
|||
} |
|||
} |
|||
} |
|||
for (var j = 0, node; node = eraserList[j++];) { |
|||
if (node.tagName.toLowerCase() == "a") { |
|||
node.style.opacity = 0.3; |
|||
} |
|||
} |
|||
|
|||
target.style.opacity = 1; |
|||
target.blur(); |
|||
}, |
|||
_addBESelect:function (target) { |
|||
var brushList = $G("J_brushBar").children; |
|||
var eraserList = $G("J_eraserBar").children; |
|||
|
|||
for (var i = 0, ele; ele = brushList[i++];) { |
|||
if (ele.tagName.toLowerCase() == "a") { |
|||
ele.style.opacity = 0.3; |
|||
} |
|||
} |
|||
for (var j = 0, node; node = eraserList[j++];) { |
|||
if (node.tagName.toLowerCase() == "a") { |
|||
node.style.opacity = 0.3; |
|||
} |
|||
} |
|||
|
|||
target.style.opacity = 1; |
|||
target.blur(); |
|||
}, |
|||
getCanvasData:function () { |
|||
var picContainer = $G("J_picBoard"), |
|||
img = picContainer.children[0]; |
|||
if (img) { |
|||
var x, y; |
|||
if (img.style.position == "absolute") { |
|||
x = parseInt(img.style.left); |
|||
y = parseInt(img.style.top); |
|||
} else { |
|||
x = (picContainer.offsetWidth - img.width) / 2; |
|||
y = (picContainer.offsetHeight - img.height) / 2; |
|||
} |
|||
context.globalCompositeOperation = "destination-over"; |
|||
context.drawImage(img, x, y, img.width, img.height); |
|||
} else { |
|||
context.globalCompositeOperation = "destination-atop"; |
|||
context.fillStyle = "#fff";//重置画布背景白色
|
|||
context.fillRect(0, 0, canvas.width, canvas.height); |
|||
} |
|||
try { |
|||
return canvas.toDataURL("image/png").substring(22); |
|||
} catch (e) { |
|||
return ""; |
|||
} |
|||
}, |
|||
btn2Highlight:function (id) { |
|||
var cur = $G(id); |
|||
cur.className.indexOf("H") == -1 && (cur.className += "H"); |
|||
}, |
|||
btn2disable:function (id) { |
|||
var cur = $G(id); |
|||
cur.className.indexOf("H") != -1 && (cur.className = cur.className.replace("H", "")); |
|||
}, |
|||
getTarget:function (evt) { |
|||
return evt.target || evt.srcElement; |
|||
} |
|||
}; |
|||
})(); |
|||
|
|||
var ScaleBoy = function () { |
|||
this.dom = null; |
|||
this.scalingElement = null; |
|||
}; |
|||
(function () { |
|||
function _appendStyle() { |
|||
var doc = document, |
|||
head = doc.getElementsByTagName('head')[0], |
|||
style = doc.createElement('style'), |
|||
cssText = '.scale{visibility:hidden;cursor:move;position:absolute;left:0;top:0;width:100px;height:50px;background-color:#fff;font-size:0;line-height:0;opacity:.4;filter:Alpha(opacity=40);}' |
|||
+ '.scale span{position:absolute;left:0;top:0;width:6px;height:6px;background-color:#006DAE;}' |
|||
+ '.scale .hand0, .scale .hand7{cursor:nw-resize;}' |
|||
+ '.scale .hand1, .scale .hand6{left:50%;margin-left:-3px;cursor:n-resize;}' |
|||
+ '.scale .hand2, .scale .hand4, .scale .hand7{left:100%;margin-left:-6px;}' |
|||
+ '.scale .hand3, .scale .hand4{top:50%;margin-top:-3px;cursor:w-resize;}' |
|||
+ '.scale .hand5, .scale .hand6, .scale .hand7{margin-top:-6px;top:100%;}' |
|||
+ '.scale .hand2, .scale .hand5{cursor:ne-resize;}'; |
|||
style.type = 'text/css'; |
|||
|
|||
try { |
|||
style.appendChild(doc.createTextNode(cssText)); |
|||
} catch (e) { |
|||
style.styleSheet.cssText = cssText; |
|||
} |
|||
head.appendChild(style); |
|||
} |
|||
|
|||
function _getDom() { |
|||
var doc = document, |
|||
hand, |
|||
arr = [], |
|||
scale = doc.createElement('div'); |
|||
|
|||
scale.id = 'J_scaleCon'; |
|||
scale.className = 'scale'; |
|||
for (var i = 0; i < 8; i++) { |
|||
arr.push("<span class='hand" + i + "'></span>"); |
|||
} |
|||
scale.innerHTML = arr.join(""); |
|||
return scale; |
|||
} |
|||
|
|||
var rect = [ |
|||
//[left, top, width, height]
|
|||
[1, 1, -1, -1], |
|||
[0, 1, 0, -1], |
|||
[0, 1, 1, -1], |
|||
[1, 0, -1, 0], |
|||
[0, 0, 1, 0], |
|||
[1, 0, -1, 1], |
|||
[0, 0, 0, 1], |
|||
[0, 0, 1, 1] |
|||
]; |
|||
ScaleBoy.prototype = { |
|||
init:function () { |
|||
_appendStyle(); |
|||
var me = this, |
|||
scale = me.dom = _getDom(); |
|||
|
|||
me.scaleMousemove.fp = me; |
|||
domUtils.on(scale, 'mousedown', function (e) { |
|||
var target = e.target || e.srcElement; |
|||
me.start = {x:e.clientX, y:e.clientY}; |
|||
if (target.className.indexOf('hand') != -1) { |
|||
me.dir = target.className.replace('hand', ''); |
|||
} |
|||
domUtils.on(document.body, 'mousemove', me.scaleMousemove); |
|||
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; |
|||
}); |
|||
domUtils.on(document.body, 'mouseup', function (e) { |
|||
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}}); |
|||
} |
|||
delete me.start; |
|||
delete me.moved; |
|||
delete me.dir; |
|||
} |
|||
}); |
|||
return scale; |
|||
}, |
|||
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) { |
|||
var cur = this.scalingElement, |
|||
pos = objStyle.position, |
|||
size = objStyle.size; |
|||
if (pos) { |
|||
typeof pos.x != 'undefined' && (cur.style.left = pos.x); |
|||
typeof pos.y != 'undefined' && (cur.style.top = pos.y); |
|||
} |
|||
if (size) { |
|||
size.w && (cur.style.width = size.w); |
|||
size.h && (cur.style.height = size.h); |
|||
} |
|||
}, |
|||
updateStyleByDir:function (dir, offset) { |
|||
var me = this, |
|||
dom = me.dom, tmp; |
|||
|
|||
rect['def'] = [1, 1, 0, 0]; |
|||
if (rect[dir][0] != 0) { |
|||
tmp = parseInt(dom.style.left) + offset.x; |
|||
dom.style.left = me._validScaledProp('left', tmp) + 'px'; |
|||
} |
|||
if (rect[dir][1] != 0) { |
|||
tmp = parseInt(dom.style.top) + offset.y; |
|||
dom.style.top = me._validScaledProp('top', tmp) + 'px'; |
|||
} |
|||
if (rect[dir][2] != 0) { |
|||
tmp = dom.clientWidth + rect[dir][2] * offset.x; |
|||
dom.style.width = me._validScaledProp('width', tmp) + 'px'; |
|||
} |
|||
if (rect[dir][3] != 0) { |
|||
tmp = dom.clientHeight + rect[dir][3] * offset.y; |
|||
dom.style.height = me._validScaledProp('height', tmp) + 'px'; |
|||
} |
|||
if (dir === 'def') { |
|||
me.updateScaledElement({position:{x:dom.style.left, y:dom.style.top}}); |
|||
} |
|||
}, |
|||
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}; |
|||
|
|||
me.updateStyleByDir(dir, offset); |
|||
arguments.callee.fp.start = {x:e.clientX, y:e.clientY}; |
|||
arguments.callee.fp.moved = 1; |
|||
}, |
|||
_validScaledProp:function (prop, value) { |
|||
var ele = this.dom, |
|||
wrap = $G("J_picBoard"); |
|||
|
|||
value = isNaN(value) ? 0 : value; |
|||
switch (prop) { |
|||
case 'left': |
|||
return value < 0 ? 0 : (value + ele.clientWidth) > wrap.clientWidth ? wrap.clientWidth - ele.clientWidth : value; |
|||
case 'top': |
|||
return value < 0 ? 0 : (value + ele.clientHeight) > wrap.clientHeight ? wrap.clientHeight - ele.clientHeight : value; |
|||
case 'width': |
|||
return value <= 0 ? 1 : (value + ele.offsetLeft) > wrap.clientWidth ? wrap.clientWidth - ele.offsetLeft : value; |
|||
case 'height': |
|||
return value <= 0 ? 1 : (value + ele.offsetTop) > wrap.clientHeight ? wrap.clientHeight - ele.offsetTop : value; |
|||
} |
|||
} |
|||
}; |
|||
})(); |
|||
|
|||
//后台回调
|
|||
function ue_callback(url, state) { |
|||
var doc = document, |
|||
picBorard = $G("J_picBoard"), |
|||
img = doc.createElement("img"); |
|||
|
|||
//图片缩放
|
|||
function scale(img, max, oWidth, oHeight) { |
|||
var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oHeight; |
|||
if (ow > max || oh > max) { |
|||
if (ow >= oh) { |
|||
if (width = ow - max) { |
|||
percent = (width / ow).toFixed(2); |
|||
img.height = oh - oh * percent; |
|||
img.width = max; |
|||
} |
|||
} else { |
|||
if (height = oh - max) { |
|||
percent = (height / oh).toFixed(2); |
|||
img.width = ow - ow * percent; |
|||
img.height = max; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
//移除遮罩层
|
|||
removeMaskLayer(); |
|||
//状态响应
|
|||
if (state == "SUCCESS") { |
|||
picBorard.innerHTML = ""; |
|||
img.onload = function () { |
|||
scale(this, 300); |
|||
picBorard.appendChild(img); |
|||
|
|||
var obj = new scrawl(); |
|||
obj.btn2Highlight("J_removeImg"); |
|||
//trace 2457
|
|||
obj.btn2Highlight("J_sacleBoard"); |
|||
}; |
|||
img.src = url; |
|||
} else { |
|||
alert(state); |
|||
} |
|||
} |
|||
//去掉遮罩层
|
|||
function removeMaskLayer() { |
|||
var maskLayer = $G("J_maskLayer"); |
|||
maskLayer.className = "maskLayerNull"; |
|||
maskLayer.innerHTML = ""; |
|||
dialog.buttons[0].setDisabled(false); |
|||
} |
|||
//添加遮罩层
|
|||
function addMaskLayer(html) { |
|||
var maskLayer = $G("J_maskLayer"); |
|||
dialog.buttons[0].setDisabled(true); |
|||
maskLayer.className = "maskLayer"; |
|||
maskLayer.innerHTML = html; |
|||
} |
|||
//执行确认按钮方法
|
|||
function exec(scrawlObj) { |
|||
if (scrawlObj.isScrawl) { |
|||
addMaskLayer(lang.scrawlUpLoading); |
|||
var base64 = scrawlObj.getCanvasData(); |
|||
if (!!base64) { |
|||
var options = { |
|||
timeout:100000, |
|||
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 || ''; |
|||
imgObj.title = responseObj.title || ''; |
|||
editor.execCommand("insertImage", imgObj); |
|||
dialog.close(); |
|||
} else { |
|||
alert(responseObj.state); |
|||
} |
|||
|
|||
} |
|||
}, |
|||
onerror:function () { |
|||
alert(lang.imageError); |
|||
dialog.close(); |
|||
} |
|||
}; |
|||
options[editor.getOpt('scrawlFieldName')] = base64; |
|||
|
|||
var actionUrl = editor.getActionUrl(editor.getOpt('scrawlActionName')), |
|||
params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', |
|||
url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + params); |
|||
ajax.request(url, options); |
|||
} |
|||
} else { |
|||
addMaskLayer(lang.noScarwl + " <input type='button' value='" + lang.continueBtn + "' onclick='removeMaskLayer()'/>"); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,102 @@ |
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|||
"http://www.w3.org/TR/html4/loose.dtd"> |
|||
<html> |
|||
<head> |
|||
<title></title> |
|||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> |
|||
<script type="text/javascript" src="../internal.js"></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;} |
|||
.tabbody .panel{width:373px;height:100%;padding-left: 5px;position: absolute;background-color: #fff;} |
|||
.tabbody input.int{ width:190px;height:21px;border:1px solid #d7d7d7;line-height:21px;} |
|||
.tabbody input.btn{padding: 0 5px; text-align:center;line-height:24px; text-decoration: none;height:24px;background:url("../../themes/default/images/dialog-title-bg.png") repeat-x;border:1px solid #ccc; } |
|||
</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> |
|||
</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> |
|||
</tr> |
|||
<!--<tr>--> |
|||
|
|||
<!--<td colspan="2"><span style="color:red"><var id="lang_searchReg"></var></span></td>--> |
|||
<!--</tr>--> |
|||
<tr> |
|||
<td><var id="lang_case_sensitive1"></var></td> |
|||
<td> |
|||
<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" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td colspan="2"> |
|||
|
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td colspan="2"> |
|||
<span id="search-msg" style="color:red"></span> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
<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> |
|||
</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> |
|||
</tr> |
|||
<tr> |
|||
<td><var id="lang_case_sensitive2"></var></td> |
|||
<td> |
|||
<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" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td colspan="2"> |
|||
|
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td colspan="2"> |
|||
<span id="replace-msg" style="color:red"></span> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script type="text/javascript" src="searchreplace.js"></script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,164 @@ |
|||
/** |
|||
* Created with JetBrains PhpStorm. |
|||
* User: xuheng |
|||
* Date: 12-9-26 |
|||
* Time: 下午12:29 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
|
|||
//清空上次查选的痕迹
|
|||
editor.firstForSR = 0; |
|||
editor.currentRangeForSR = null; |
|||
//给tab注册切换事件
|
|||
/** |
|||
* tab点击处理事件 |
|||
* @param tabHeads |
|||
* @param tabBodys |
|||
* @param obj |
|||
*/ |
|||
function clickHandler( tabHeads,tabBodys,obj ) { |
|||
//head样式更改
|
|||
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 body = tabBodys[j], |
|||
id = body.getAttribute( "id" ); |
|||
if ( id != tabSrc ) { |
|||
body.style.zIndex = 1; |
|||
} else { |
|||
body.style.zIndex = 200; |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
/** |
|||
* TAB切换 |
|||
* @param tabParentId tab的父节点ID或者对象本身 |
|||
*/ |
|||
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++ ) { |
|||
var head = tabHeads[i]; |
|||
if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head ); |
|||
head.onclick = function () { |
|||
clickHandler(tabHeads,tabBodys,this); |
|||
} |
|||
} |
|||
} |
|||
$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; |
|||
if (!findtxt) { |
|||
return false; |
|||
} |
|||
obj = { |
|||
searchStr:findtxt, |
|||
dir:1, |
|||
casesensitive:getMatchCase("matchCase") |
|||
}; |
|||
if (!frCommond(obj)) { |
|||
var bk = editor.selection.getRange().createBookmark(); |
|||
$G('search-msg').innerHTML = lang.getEnd; |
|||
editor.selection.getRange().moveToBookmark(bk).select(); |
|||
|
|||
|
|||
} |
|||
}; |
|||
$G("nextReplaceBtn").onclick = function (txt, dir, mcase) { |
|||
var findtxt = $G("findtxt1").value, obj; |
|||
if (!findtxt) { |
|||
return false; |
|||
} |
|||
obj = { |
|||
searchStr:findtxt, |
|||
dir:1, |
|||
casesensitive:getMatchCase("matchCase1") |
|||
}; |
|||
frCommond(obj); |
|||
}; |
|||
$G("preFindBtn").onclick = function (txt, dir, mcase) { |
|||
var findtxt = $G("findtxt").value, obj; |
|||
if (!findtxt) { |
|||
return false; |
|||
} |
|||
obj = { |
|||
searchStr:findtxt, |
|||
dir:-1, |
|||
casesensitive:getMatchCase("matchCase") |
|||
}; |
|||
if (!frCommond(obj)) { |
|||
$G('search-msg').innerHTML = lang.getStart; |
|||
} |
|||
}; |
|||
$G("preReplaceBtn").onclick = function (txt, dir, mcase) { |
|||
var findtxt = $G("findtxt1").value, obj; |
|||
if (!findtxt) { |
|||
return false; |
|||
} |
|||
obj = { |
|||
searchStr:findtxt, |
|||
dir:-1, |
|||
casesensitive:getMatchCase("matchCase1") |
|||
}; |
|||
frCommond(obj); |
|||
}; |
|||
//替换
|
|||
$G("repalceBtn").onclick = function () { |
|||
var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj, |
|||
replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, ""); |
|||
if (!findtxt) { |
|||
return false; |
|||
} |
|||
if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) { |
|||
return false; |
|||
} |
|||
obj = { |
|||
searchStr:findtxt, |
|||
dir:1, |
|||
casesensitive:getMatchCase("matchCase1"), |
|||
replaceStr:replacetxt |
|||
}; |
|||
frCommond(obj); |
|||
}; |
|||
//全部替换
|
|||
$G("repalceAllBtn").onclick = function () { |
|||
var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj, |
|||
replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, ""); |
|||
if (!findtxt) { |
|||
return false; |
|||
} |
|||
if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) { |
|||
return false; |
|||
} |
|||
obj = { |
|||
searchStr:findtxt, |
|||
casesensitive:getMatchCase("matchCase1"), |
|||
replaceStr:replacetxt, |
|||
all:true |
|||
}; |
|||
var num = frCommond(obj); |
|||
if (num) { |
|||
$G('replace-msg').innerHTML = lang.countMsg.replace("{#count}", num); |
|||
} |
|||
}; |
|||
//执行
|
|||
var frCommond = function (obj) { |
|||
return editor.execCommand("searchreplace", obj); |
|||
}; |
|||
switchTab("searchtab"); |
|||
@ -0,0 +1,58 @@ |
|||
<!DOCTYPE HTML> |
|||
<html> |
|||
<head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
|||
<title></title> |
|||
<script type="text/javascript" src="../internal.js"></script> |
|||
<style type="text/css"> |
|||
*{color: #838383} |
|||
html,body { |
|||
font-size: 12px; |
|||
width:100%; |
|||
height:100%; |
|||
overflow: hidden; |
|||
margin:0px; |
|||
padding:0px; |
|||
} |
|||
h2 { font-size: 16px; margin: 20px auto;} |
|||
.content{ |
|||
padding:5px 15px 0 15px; |
|||
height:100%; |
|||
} |
|||
dt,dd { margin-left: 0; padding-left: 0;} |
|||
dt a { display: block; |
|||
height: 30px; |
|||
line-height: 30px; |
|||
width: 55px; |
|||
background: #EFEFEF; |
|||
border: 1px solid #CCC; |
|||
padding: 0 10px; |
|||
text-decoration: none; |
|||
} |
|||
dt a:hover{ |
|||
background: #e0e0e0; |
|||
border-color: #999 |
|||
} |
|||
dt a:active{ |
|||
background: #ccc; |
|||
border-color: #999; |
|||
color: #666; |
|||
} |
|||
dd { line-height:20px;margin-top: 10px;} |
|||
span{ padding-right:4px;} |
|||
input{width:210px;height:21px;background: #FFF;border:1px solid #d7d7d7;padding: 0px; margin: 0px; } |
|||
|
|||
|
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div class="content"> |
|||
<h2><var id="lang_showMsg"></var></h2> |
|||
<dl> |
|||
<dt><a href="../../third-party/snapscreen/UEditorSnapscreen.exe" target="_blank" id="downlink"><var id="lang_download"></var></a></dt> |
|||
<dd><var id="lang_step1"></var></dd> |
|||
<dd><var id="lang_step2"></var></dd> |
|||
</dl> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,21 @@ |
|||
<!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"></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; } |
|||
</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"></script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,57 @@ |
|||
/** |
|||
* Created with JetBrains PhpStorm. |
|||
* User: xuheng |
|||
* Date: 12-9-26 |
|||
* Time: 下午1:09 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
var charsContent = [ |
|||
{ name:"tsfh", title:lang.tsfh, content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")}, |
|||
{ 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"; |
|||
domUtils.on(span, "click", function () { |
|||
var tmps = $G("tabHeads").children; |
|||
for (var k = 0, sk; sk = tmps[k++];) { |
|||
sk.className = ""; |
|||
} |
|||
tmps = $G("tabBodys").children; |
|||
for (var k = 0, sk; sk = tmps[k++];) { |
|||
sk.style.display = "none"; |
|||
} |
|||
this.className = "focus"; |
|||
$G(this.getAttribute("tabSrc")).style.display = ""; |
|||
}); |
|||
$G("tabHeads").appendChild(span); |
|||
domUtils.insertAfter(span, document.createTextNode("\n")); |
|||
var div = document.createElement("div"); |
|||
div.id = ci.name; |
|||
div.style.display = (i == 1) ? "" : "none"; |
|||
var cons = ci.content; |
|||
for (var j = 0, con; con = cons[j++];) { |
|||
var charSpan = document.createElement("span"); |
|||
charSpan.innerHTML = con; |
|||
domUtils.on(charSpan, "click", function () { |
|||
editor.execCommand("insertHTML", this.innerHTML); |
|||
dialog.close(); |
|||
}); |
|||
div.appendChild(charSpan); |
|||
} |
|||
$G("tabBodys").appendChild(div); |
|||
} |
|||
})(charsContent); |
|||
function toArray(str) { |
|||
return str.split(","); |
|||
} |
|||
|
After Width: | Height: | Size: 304 B |
@ -0,0 +1,84 @@ |
|||
body{ |
|||
overflow: hidden; |
|||
width: 540px; |
|||
} |
|||
.wrapper { |
|||
margin: 10px auto 0; |
|||
font-size: 12px; |
|||
overflow: hidden; |
|||
width: 520px; |
|||
height: 315px; |
|||
} |
|||
|
|||
.clear { |
|||
clear: both; |
|||
} |
|||
|
|||
.wrapper .left { |
|||
float: left; |
|||
margin-left: 10px;; |
|||
} |
|||
|
|||
.wrapper .right { |
|||
float: right; |
|||
border-left: 2px dotted #EDEDED; |
|||
padding-left: 15px; |
|||
} |
|||
|
|||
.section { |
|||
margin-bottom: 15px; |
|||
width: 240px; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.section h3 { |
|||
font-weight: bold; |
|||
padding: 5px 0; |
|||
margin-bottom: 10px; |
|||
border-bottom: 1px solid #EDEDED; |
|||
font-size: 12px; |
|||
} |
|||
|
|||
.section ul { |
|||
list-style: none; |
|||
overflow: hidden; |
|||
clear: both; |
|||
|
|||
} |
|||
|
|||
.section li { |
|||
float: left; |
|||
width: 120px;; |
|||
} |
|||
|
|||
.section .tone { |
|||
width: 80px;; |
|||
} |
|||
|
|||
.section .preview { |
|||
width: 220px; |
|||
} |
|||
|
|||
.section .preview table { |
|||
text-align: center; |
|||
vertical-align: middle; |
|||
color: #666; |
|||
} |
|||
|
|||
.section .preview caption { |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.section .preview td { |
|||
border-width: 1px; |
|||
border-style: solid; |
|||
height: 22px; |
|||
} |
|||
|
|||
.section .preview th { |
|||
border-style: solid; |
|||
border-color: #DDD; |
|||
border-width: 2px 1px 1px 1px; |
|||
height: 22px; |
|||
background-color: #F7F7F7; |
|||
} |
|||
@ -0,0 +1,64 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<title></title> |
|||
<script type="text/javascript" src="../internal.js"></script> |
|||
<link rel="stylesheet" type="text/css" href="edittable.css"> |
|||
</head> |
|||
<body> |
|||
<div class="wrapper"> |
|||
<div class="left"> |
|||
<div class="section"> |
|||
<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> |
|||
</li> |
|||
<li> |
|||
<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> |
|||
</li> |
|||
<li> |
|||
<label onselectstart="return false"><input type="checkbox" id="J_sorttable" name="style"/><var id="lang_orderbycontent"></var></label> |
|||
</li> |
|||
</ul> |
|||
<div class="clear"></div> |
|||
</div> |
|||
<div class="section"> |
|||
<h3><var id="lang_tableSize"></var></h3> |
|||
<ul> |
|||
<li> |
|||
<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> |
|||
</li> |
|||
</ul> |
|||
<div class="clear"></div> |
|||
</div> |
|||
<div class="section"> |
|||
<h3><var id="lang_borderStyle"></var></h3> |
|||
<ul> |
|||
<li> |
|||
<span><var id="lang_color"></var></span> |
|||
<input type="text" class="tone" id="J_tone" readonly='readonly' /> |
|||
</li> |
|||
</ul> |
|||
<div class="clear"></div> |
|||
</div> |
|||
</div> |
|||
<div class="right"> |
|||
<div class="section"> |
|||
<h3><var id="lang_example"></var></h3> |
|||
<div class="preview" id="J_preview"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script type="text/javascript" src="edittable.js"></script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,237 @@ |
|||
/** |
|||
* Created with JetBrains PhpStorm. |
|||
* User: xuheng |
|||
* Date: 12-12-19 |
|||
* Time: 下午4:55 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
(function () { |
|||
var title = $G("J_title"), |
|||
titleCol = $G("J_titleCol"), |
|||
caption = $G("J_caption"), |
|||
sorttable = $G("J_sorttable"), |
|||
autoSizeContent = $G("J_autoSizeContent"), |
|||
autoSizePage = $G("J_autoSizePage"), |
|||
tone = $G("J_tone"), |
|||
me, |
|||
preview = $G("J_preview"); |
|||
|
|||
var editTable = function () { |
|||
me = this; |
|||
me.init(); |
|||
}; |
|||
editTable.prototype = { |
|||
init:function () { |
|||
var colorPiker = new UE.ui.ColorPicker({ |
|||
editor:editor |
|||
}), |
|||
colorPop = new UE.ui.Popup({ |
|||
editor:editor, |
|||
content:colorPiker |
|||
}); |
|||
|
|||
title.checked = editor.queryCommandState("inserttitle") == -1; |
|||
titleCol.checked = editor.queryCommandState("inserttitlecol") == -1; |
|||
caption.checked = editor.queryCommandState("insertcaption") == -1; |
|||
sorttable.checked = editor.queryCommandState("enablesort") == 1; |
|||
|
|||
var enablesortState = editor.queryCommandState("enablesort"), |
|||
disablesortState = editor.queryCommandState("disablesort"); |
|||
|
|||
sorttable.checked = !!(enablesortState < 0 && disablesortState >=0); |
|||
sorttable.disabled = !!(enablesortState < 0 && disablesortState < 0); |
|||
sorttable.title = enablesortState < 0 && disablesortState < 0 ? lang.errorMsg:''; |
|||
|
|||
me.createTable(title.checked, titleCol.checked, caption.checked); |
|||
me.setAutoSize(); |
|||
me.setColor(me.getColor()); |
|||
|
|||
domUtils.on(title, "click", me.titleHanler); |
|||
domUtils.on(titleCol, "click", me.titleColHanler); |
|||
domUtils.on(caption, "click", me.captionHanler); |
|||
domUtils.on(sorttable, "click", me.sorttableHanler); |
|||
domUtils.on(autoSizeContent, "click", me.autoSizeContentHanler); |
|||
domUtils.on(autoSizePage, "click", me.autoSizePageHanler); |
|||
|
|||
domUtils.on(tone, "click", function () { |
|||
colorPop.showAnchor(tone); |
|||
}); |
|||
domUtils.on(document, 'mousedown', function () { |
|||
colorPop.hide(); |
|||
}); |
|||
colorPiker.addListener("pickcolor", function () { |
|||
me.setColor(arguments[1]); |
|||
colorPop.hide(); |
|||
}); |
|||
colorPiker.addListener("picknocolor", function () { |
|||
me.setColor(""); |
|||
colorPop.hide(); |
|||
}); |
|||
}, |
|||
|
|||
createTable:function (hasTitle, hasTitleCol, hasCaption) { |
|||
var arr = [], |
|||
sortSpan = '<span>^</span>'; |
|||
arr.push("<table id='J_example'>"); |
|||
if (hasCaption) { |
|||
arr.push("<caption>" + lang.captionName + "</caption>") |
|||
} |
|||
if (hasTitle) { |
|||
arr.push("<tr>"); |
|||
if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>"); } |
|||
for (var j = 0; j < 5; j++) { |
|||
arr.push("<th>" + lang.titleName + "</th>"); |
|||
} |
|||
arr.push("</tr>"); |
|||
} |
|||
for (var i = 0; i < 6; i++) { |
|||
arr.push("<tr>"); |
|||
if(hasTitleCol) { arr.push("<th>" + lang.titleName + "</th>") } |
|||
for (var k = 0; k < 5; k++) { |
|||
arr.push("<td>" + lang.cellsName + "</td>") |
|||
} |
|||
arr.push("</tr>"); |
|||
} |
|||
arr.push("</table>"); |
|||
preview.innerHTML = arr.join(""); |
|||
this.updateSortSpan(); |
|||
}, |
|||
titleHanler:function () { |
|||
var example = $G("J_example"), |
|||
frg=document.createDocumentFragment(), |
|||
color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"), |
|||
colCount = example.rows[0].children.length; |
|||
|
|||
if (title.checked) { |
|||
example.insertRow(0); |
|||
for (var i = 0, node; i < colCount; i++) { |
|||
node = document.createElement("th"); |
|||
node.innerHTML = lang.titleName; |
|||
frg.appendChild(node); |
|||
} |
|||
example.rows[0].appendChild(frg); |
|||
|
|||
} else { |
|||
domUtils.remove(example.rows[0]); |
|||
} |
|||
me.setColor(color); |
|||
me.updateSortSpan(); |
|||
}, |
|||
titleColHanler:function () { |
|||
var example = $G("J_example"), |
|||
color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"), |
|||
colArr = example.rows, |
|||
colCount = colArr.length; |
|||
|
|||
if (titleCol.checked) { |
|||
for (var i = 0, node; i < colCount; i++) { |
|||
node = document.createElement("th"); |
|||
node.innerHTML = lang.titleName; |
|||
colArr[i].insertBefore(node, colArr[i].children[0]); |
|||
} |
|||
} else { |
|||
for (var i = 0; i < colCount; i++) { |
|||
domUtils.remove(colArr[i].children[0]); |
|||
} |
|||
} |
|||
me.setColor(color); |
|||
me.updateSortSpan(); |
|||
}, |
|||
captionHanler:function () { |
|||
var example = $G("J_example"); |
|||
if (caption.checked) { |
|||
var row = document.createElement('caption'); |
|||
row.innerHTML = lang.captionName; |
|||
example.insertBefore(row, example.firstChild); |
|||
} else { |
|||
domUtils.remove(domUtils.getElementsByTagName(example, 'caption')[0]); |
|||
} |
|||
}, |
|||
sorttableHanler:function(){ |
|||
me.updateSortSpan(); |
|||
}, |
|||
autoSizeContentHanler:function () { |
|||
var example = $G("J_example"); |
|||
example.removeAttribute("width"); |
|||
}, |
|||
autoSizePageHanler:function () { |
|||
var example = $G("J_example"); |
|||
var tds = example.getElementsByTagName(example, "td"); |
|||
utils.each(tds, function (td) { |
|||
td.removeAttribute("width"); |
|||
}); |
|||
example.setAttribute('width', '100%'); |
|||
}, |
|||
updateSortSpan: function(){ |
|||
var example = $G("J_example"), |
|||
row = example.rows[0]; |
|||
|
|||
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){ |
|||
var span = document.createElement("span"); |
|||
span.innerHTML = "^"; |
|||
cell.appendChild(span); |
|||
}); |
|||
} |
|||
}, |
|||
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) { |
|||
var example = $G("J_example"), |
|||
arr = domUtils.getElementsByTagName(example, "td").concat( |
|||
domUtils.getElementsByTagName(example, "th"), |
|||
domUtils.getElementsByTagName(example, "caption") |
|||
); |
|||
|
|||
tone.value = color; |
|||
utils.each(arr, function (node) { |
|||
node.style.borderColor = color; |
|||
}); |
|||
|
|||
}, |
|||
setAutoSize:function () { |
|||
var me = this; |
|||
autoSizePage.checked = true; |
|||
me.autoSizePageHanler(); |
|||
} |
|||
}; |
|||
|
|||
new editTable; |
|||
|
|||
dialog.onok = function () { |
|||
editor.__hasEnterExecCommand = true; |
|||
|
|||
var checks = { |
|||
title:"inserttitle deletetitle", |
|||
titleCol:"inserttitlecol deletetitlecol", |
|||
caption:"insertcaption deletecaption", |
|||
sorttable:"enablesort disablesort" |
|||
}; |
|||
editor.fireEvent('saveScene'); |
|||
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]); |
|||
} |
|||
} |
|||
|
|||
editor.execCommand("edittable", tone.value); |
|||
autoSizeContent.checked ?editor.execCommand('adaptbytext') : ""; |
|||
autoSizePage.checked ? editor.execCommand("adaptbywindow") : ""; |
|||
editor.fireEvent('saveScene'); |
|||
|
|||
editor.__hasEnterExecCommand = false; |
|||
}; |
|||
})(); |
|||
@ -0,0 +1,61 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<title></title> |
|||
<script type="text/javascript" src="../internal.js"></script> |
|||
<style type="text/css"> |
|||
.section { |
|||
text-align: center; |
|||
margin-top: 10px; |
|||
} |
|||
.section input { |
|||
margin-left: 5px; |
|||
width: 70px; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div class="section"> |
|||
<span><var id="lang_tdBkColor"></var></span> |
|||
<input type="text" id="J_tone"/> |
|||
</div> |
|||
<script type="text/javascript"> |
|||
var tone = $G("J_tone"), |
|||
colorPiker = new UE.ui.ColorPicker({ |
|||
editor:editor |
|||
}), |
|||
colorPop = new UE.ui.Popup({ |
|||
editor:editor, |
|||
content:colorPiker |
|||
}); |
|||
domUtils.on(tone, "click", function () { |
|||
colorPop.showAnchor(tone); |
|||
}); |
|||
domUtils.on(document, 'mousedown', function () { |
|||
colorPop.hide(); |
|||
}); |
|||
colorPiker.addListener("pickcolor", function () { |
|||
tone.value = arguments[1]; |
|||
colorPop.hide(); |
|||
}); |
|||
colorPiker.addListener("picknocolor", function () { |
|||
tone.value=""; |
|||
colorPop.hide(); |
|||
}); |
|||
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)){ |
|||
tone.value = color |
|||
} |
|||
|
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,33 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<title>表格删除提示</title> |
|||
<script type="text/javascript" src="../internal.js"></script> |
|||
<style type="text/css"> |
|||
.section { |
|||
width: 200px; |
|||
margin: 10px auto 0; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.item { |
|||
text-align: center; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div class="section"> |
|||
<div class="item"> |
|||
<label><input type="radio" id="J_delRow" name="cmd" checked/><var id="lang_delRow"></var></label> |
|||
</div> |
|||
<div class="item"> |
|||
<label><input type="radio" id="J_delCol" name="cmd"/><var id="lang_delCol"></var></label> |
|||
</div> |
|||
</div> |
|||
<script type="text/javascript"> |
|||
dialog.onok = function () { |
|||
$G("J_delRow").checked ? editor.execCommand("deleterow") : editor.execCommand("deletecol"); |
|||
}; |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,41 @@ |
|||
/** |
|||
* Created with JetBrains PhpStorm. |
|||
* User: xuheng |
|||
* Date: 12-8-8 |
|||
* Time: 下午2:00 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
var templates = [ |
|||
{ |
|||
"pre":"begincheck.png", |
|||
'title':lang.blank, |
|||
'preHtml':'<p class="ue_t">1、材料不齐全,请补充:<BR/>(1)<BR/>(2)<BR/>(3)<BR/>2、材料填写有误,请修订:<BR/>(1)<BR/>(2)<BR/>(3)<BR/></p>', |
|||
"html":'<p class="ue_t">1、材料不齐全,请补充:<BR/>(1)<BR/>(2)<BR/>(3)<BR/>2、材料填写有误,请修订:<BR/>(1)<BR/>(2)<BR/>(3)<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":"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>' |
|||
} |
|||
]; |
|||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 84 B |
|
After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 291 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 485 B |
|
After Width: | Height: | Size: 393 B |
@ -0,0 +1,18 @@ |
|||
.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; } |
|||
@ -0,0 +1,26 @@ |
|||
<!DOCTYPE HTML> |
|||
<html> |
|||
<head> |
|||
<title></title> |
|||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> |
|||
<script type="text/javascript" src="../internal.js"></script> |
|||
<link rel="stylesheet" type="text/css" href="template.css"> |
|||
</head> |
|||
<body> |
|||
<div class="wrap"> |
|||
<div class="left"> |
|||
<div class="top"> |
|||
<label><var id="lang_template_clear"></var>:<input id="issave" type="checkbox"></label> |
|||
</div> |
|||
<div class="bottom border_style1" id="preview"></div> |
|||
</div> |
|||
<fieldset class="right border_style1"> |
|||
<legend><var id="lang_template_select"></var></legend> |
|||
<div class="pre" id="preitem"></div> |
|||
</fieldset> |
|||
<div class="clear"></div> |
|||
</div> |
|||
<script type="text/javascript" src="config.js"></script> |
|||
<script type="text/javascript" src="template.js"></script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,53 @@ |
|||
/** |
|||
* Created with JetBrains PhpStorm. |
|||
* User: xuheng |
|||
* Date: 12-8-8 |
|||
* Time: 下午2:09 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
(function () { |
|||
var me = editor, |
|||
preview = $G( "preview" ), |
|||
preitem = $G( "preitem" ), |
|||
tmps = templates, |
|||
currentTmp; |
|||
var initPre = function () { |
|||
var str = ""; |
|||
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 tmp = tmps[n - 1]; |
|||
currentTmp = tmp; |
|||
clearItem(); |
|||
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" |
|||
} ); |
|||
} |
|||
}; |
|||
dialog.onok = function () { |
|||
if ( !$G( "issave" ).checked ){ |
|||
me.execCommand( "cleardoc" ); |
|||
} |
|||
var obj = { |
|||
html:currentTmp && currentTmp.html |
|||
}; |
|||
me.execCommand( "template", obj ); |
|||
}; |
|||
initPre(); |
|||
window.pre = pre; |
|||
pre(2) |
|||
|
|||
})(); |
|||
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 453 B |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 445 B |
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,635 @@ |
|||
@charset "utf-8"; |
|||
.wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative} |
|||
.tabbody{height: 335px;} |
|||
.tabbody .panel { |
|||
position: absolute; |
|||
width: 0; |
|||
height: 0; |
|||
background: #fff; |
|||
overflow: hidden; |
|||
display: none; |
|||
} |
|||
.tabbody .panel.focus { |
|||
width: 100%; |
|||
height: 335px; |
|||
display: block; |
|||
} |
|||
|
|||
.tabbody .panel table td{vertical-align: middle;} |
|||
#videoUrl { |
|||
width: 490px; |
|||
height: 21px; |
|||
line-height: 21px; |
|||
margin: 8px 5px; |
|||
background: #FFF; |
|||
border: 1px solid #d7d7d7; |
|||
} |
|||
#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{ |
|||
/*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 .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; |
|||
padding-bottom: 5px; |
|||
width: 115px; |
|||
} |
|||
|
|||
#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{ |
|||
width: 65px; |
|||
height: 21px; |
|||
line-height: 21px; |
|||
margin: 8px 5px; |
|||
background: #FFF; |
|||
border: 1px solid #d7d7d7; |
|||
} |
|||
label.url{font-weight: bold;margin-left: 5px;color: #06c;} |
|||
#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 */ |
|||
.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; } |
|||
#uploadVideoInfo{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; |
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
<!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"></script> |
|||
<link rel="stylesheet" type="text/css" href="video.css" /> |
|||
</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" 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"></td></tr></table> |
|||
<div id="preview"></div> |
|||
<div id="videoInfo"> |
|||
<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> |
|||
</table> |
|||
</fieldset> |
|||
<fieldset> |
|||
<legend><var id="lang_alignment"></var></legend> |
|||
<div id="videoFloat"></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="uploadVideoInfo"> |
|||
<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> |
|||
</table> |
|||
</fieldset> |
|||
<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.min.js"></script> |
|||
|
|||
<!-- webuploader --> |
|||
<script type="text/javascript" src="../../third-party/webuploader/webuploader.min.js"></script> |
|||
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css"> |
|||
|
|||
<!-- video --> |
|||
<script type="text/javascript" src="video.js"></script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,789 @@ |
|||
/** |
|||
* Created by JetBrains PhpStorm. |
|||
* User: taoqili |
|||
* Date: 12-2-20 |
|||
* Time: 上午11:19 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
|
|||
(function(){ |
|||
|
|||
var video = {}, |
|||
uploadVideoList = [], |
|||
isModifyUploadVideo = false, |
|||
uploadFile; |
|||
|
|||
window.onload = function(){ |
|||
$focus($G("videoUrl")); |
|||
initTabs(); |
|||
initVideo(); |
|||
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'); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
|
|||
function initVideo(){ |
|||
createAlignButton( ["videoFloat", "upload_alignment"] ); |
|||
addUrlChangeListener($G("videoUrl")); |
|||
addOkListener(); |
|||
|
|||
//编辑视频时初始化相关信息
|
|||
(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) { |
|||
$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); |
|||
} |
|||
if(hasUploadClass) { |
|||
isModifyUploadVideo = true; |
|||
} |
|||
} |
|||
createPreviewVideo(url); |
|||
})(); |
|||
} |
|||
|
|||
/** |
|||
* 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作 |
|||
*/ |
|||
function addOkListener(){ |
|||
dialog.onok = function(){ |
|||
$G("preview").innerHTML = ""; |
|||
var currentTab = findFocus("tabHeads","tabSrc"); |
|||
switch(currentTab){ |
|||
case "video": |
|||
return insertSingle(); |
|||
break; |
|||
case "videoSearch": |
|||
return insertSearch("searchList"); |
|||
break; |
|||
case "upload": |
|||
return insertUpload(); |
|||
break; |
|||
} |
|||
}; |
|||
dialog.oncancel = function(){ |
|||
$G("preview").innerHTML = ""; |
|||
}; |
|||
} |
|||
|
|||
/** |
|||
* 依据传入的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" ) { |
|||
ci.className = "focus"; |
|||
} |
|||
} else { |
|||
if ( ci.className =="focus" ) { |
|||
ci.className = ""; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 将单个视频信息插入编辑器中 |
|||
*/ |
|||
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; |
|||
editor.execCommand('insertvideo', { |
|||
url: convert_url(url), |
|||
width: width.value, |
|||
height: height.value, |
|||
align: align |
|||
}, 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")){ |
|||
videoObjs.push({ |
|||
url:img.getAttribute("ue_video_url"), |
|||
width:420, |
|||
height:280, |
|||
align:"none" |
|||
}); |
|||
} |
|||
} |
|||
editor.execCommand('insertvideo',videoObjs); |
|||
} |
|||
|
|||
/** |
|||
* 找到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; |
|||
} |
|||
function convert_url(url){ |
|||
if ( !url ) return ''; |
|||
url = utils.trim(url) |
|||
.replace(/v\.youku\.com\/v_show\/id_([\w\-=]+)\.html/i, 'player.youku.com/player.php/sid/$1/v.swf') |
|||
.replace(/(www\.)?youtube\.com\/watch\?v=([\w\-]+)/i, "www.youtube.com/v/$2") |
|||
.replace(/youtu.be\/(\w+)$/i, "www.youtube.com/v/$1") |
|||
.replace(/v\.ku6\.com\/.+\/([\w\.]+)\.html.*$/i, "player.ku6.com/refer/$1/v.swf") |
|||
.replace(/www\.56\.com\/u\d+\/v_([\w\-]+)\.html/i, "player.56.com/v_$1.swf") |
|||
.replace(/www.56.com\/w\d+\/play_album\-aid\-\d+_vid\-([^.]+)\.html/i, "player.56.com/v_$1.swf") |
|||
.replace(/v\.pps\.tv\/play_([\w]+)\.html.*$/i, "player.pps.tv/player/sid/$1/v.swf") |
|||
.replace(/www\.letv\.com\/ptv\/vplay\/([\d]+)\.html.*$/i, "i7.imgs.letv.com/player/swfPlayer.swf?id=$1&autoplay=0") |
|||
.replace(/www\.tudou\.com\/programs\/view\/([\w\-]+)\/?/i, "www.tudou.com/v/$1") |
|||
.replace(/v\.qq\.com\/cover\/[\w]+\/[\w]+\/([\w]+)\.html/i, "static.video.qq.com/TPout.swf?vid=$1") |
|||
.replace(/v\.qq\.com\/.+[\?\&]vid=([^&]+).*$/i, "static.video.qq.com/TPout.swf?vid=$1") |
|||
.replace(/my\.tv\.sohu\.com\/[\w]+\/[\d]+\/([\d]+)\.shtml.*$/i, "share.vrs.sohu.com/my/v.swf&id=$1"); |
|||
|
|||
return url; |
|||
} |
|||
|
|||
/** |
|||
* 检测传入的所有input框中输入的长宽是否是正数 |
|||
* @param nodes input框集合, |
|||
*/ |
|||
function checkNum( nodes ) { |
|||
for ( var i = 0, ci; ci = nodes[i++]; ) { |
|||
var value = ci.value; |
|||
if ( !isNumber( value ) && value) { |
|||
alert( lang.numError ); |
|||
ci.value = ""; |
|||
ci.focus(); |
|||
return false; |
|||
} |
|||
} |
|||
return true; |
|||
} |
|||
|
|||
/** |
|||
* 数字判断 |
|||
* @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 () { |
|||
createPreviewVideo( this.value ); |
|||
} |
|||
} else { |
|||
url.addEventListener( "input", function () { |
|||
createPreviewVideo( this.value ); |
|||
}, false ); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 根据url生成视频预览 |
|||
* @param url |
|||
*/ |
|||
function createPreviewVideo(url){ |
|||
if ( !url )return; |
|||
|
|||
var conUrl = convert_url(url); |
|||
|
|||
$G("preview").innerHTML = '<div class="previewMsg"><span>'+lang.urlError+'</span></div>'+ |
|||
'<embed class="previewVideo" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"' + |
|||
' src="' + conUrl + '"' + |
|||
' width="' + 420 + '"' + |
|||
' height="' + 280 + '"' + |
|||
' wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true" >' + |
|||
'</embed>'; |
|||
} |
|||
|
|||
|
|||
/* 插入上传视频 */ |
|||
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) { |
|||
var file = uploadVideoList[key]; |
|||
videoObjs.push({ |
|||
url: uploadDir + file.url, |
|||
width:width, |
|||
height:height, |
|||
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('insertvideo', videoObjs, '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('videoActionName')), |
|||
fileMaxSize = editor.getOpt('videoMaxSize'), |
|||
acceptExtensions = (editor.getOpt('videoAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');; |
|||
|
|||
if (!WebUploader.Uploader.support()) { |
|||
$('#filePickerReady').after($('<div>').html(lang.errorNotSupport)).hide(); |
|||
return; |
|||
} else if (!editor.getOpt('videoActionName')) { |
|||
$('#filePickerReady').after($('<div>').html(lang.errorLoadConfig)).hide(); |
|||
return; |
|||
} |
|||
|
|||
uploader = _this.uploader = WebUploader.create({ |
|||
pick: { |
|||
id: '#filePickerReady', |
|||
label: lang.uploadSelectFile |
|||
}, |
|||
swf: '../../third-party/webuploader/Uploader.swf', |
|||
server: actionUrl, |
|||
fileVal: editor.getOpt('videoFieldName'), |
|||
duplicate: true, |
|||
fileSingleSizeLimit: fileMaxSize, |
|||
compress: false |
|||
}); |
|||
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参数
|
|||
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); |
|||
if (json.state == 'SUCCESS') { |
|||
uploadVideoList.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, file) { |
|||
if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') { |
|||
addFile(file); |
|||
} |
|||
}); |
|||
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(); |
|||
} |
|||
}; |
|||
|
|||
})(); |
|||
@ -0,0 +1,111 @@ |
|||
<!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"></script> |
|||
<style type="text/css"> |
|||
.wrapper{width: 600px;padding: 10px;height: 352px;overflow: hidden;position: relative;border-bottom: 1px solid #d7d7d7} |
|||
.localPath input{float: left;width: 350px;line-height: 20px;height: 20px;} |
|||
#clipboard{float:left;width: 70px;height: 30px; } |
|||
.description{ color: #0066cc; margin-top: 2px; width: 450px; height: 45px;float: left;line-height: 22px} |
|||
#upload{width: 100px;height: 30px;float: right; margin:10px 2px 0 0;cursor: pointer;} |
|||
#msg{ width: 140px; height: 30px; line-height:25px;float: left;color: red} |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div class="wrapper"> |
|||
<div class="localPath"> |
|||
<input id="localPath" type="text" readonly /> |
|||
<div id="clipboard"></div> |
|||
<div id="msg"></div> |
|||
</div> |
|||
<div id="flashContainer"></div> |
|||
<div> |
|||
<div id="upload" style="display: none" ><img id="uploadBtn"></div> |
|||
<div class="description"> |
|||
<span style="color: red"><var id="lang_resave"></var>: </span><var id="lang_step"></var> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script type="text/javascript" src="tangram.js"></script> |
|||
<script type="text/javascript" src="wordimage.js"></script> |
|||
<script type="text/javascript"> |
|||
editor.setOpt({ |
|||
wordImageFieldName:"upfile", |
|||
compressSide:0, |
|||
maxImageSideLength:900 |
|||
}); |
|||
|
|||
//全局变量 |
|||
var imageUrls = [], //用于保存从服务器返回的图片信息数组 |
|||
selectedImageCount = 0, //当前已选择的但未上传的图片数量 |
|||
optImageUrl = editor.getActionUrl(editor.getOpt('imageActionName')), |
|||
optImageFieldName = editor.getOpt('imageFieldName'), |
|||
optImageCompressBorder = editor.getOpt('imageCompressEnable') ? editor.getOpt('imageCompressBorder'):null, |
|||
maxSize = editor.getOpt('imageMaxSize') / 1024, |
|||
extension = editor.getOpt('imageAllowFiles').join(';').replace(/\./g, '*.'); |
|||
|
|||
/* 添加额外的GET参数 */ |
|||
var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', |
|||
urlWidthParams = optImageUrl + (optImageUrl.indexOf('?') == -1 ? '?':'&') + params; |
|||
|
|||
utils.domReady(function(){ |
|||
//创建Flash相关的参数集合 |
|||
var flashOptions = { |
|||
container:"flashContainer", //flash容器id |
|||
url:urlWidthParams, // 上传处理页面的url地址 |
|||
ext:editor.queryCommandValue('serverParam') || {}, //可向服务器提交的自定义参数列表 |
|||
fileType:'{"description":"'+lang.fileType+'", "extension":"' + extension + '"}', //上传文件格式限制 |
|||
flashUrl:'imageUploader.swf', //上传用的flash组件地址 |
|||
width:600, //flash的宽度 |
|||
height:272, //flash的高度 |
|||
gridWidth:120, // 每一个预览图片所占的宽度 |
|||
gridHeight:120, // 每一个预览图片所占的高度 |
|||
picWidth:100, // 单张预览图片的宽度 |
|||
picHeight:100, // 单张预览图片的高度 |
|||
uploadDataFieldName: optImageFieldName, // POST请求中图片数据的key |
|||
picDescFieldName:'pictitle', // POST请求中图片描述的key |
|||
maxSize: maxSize, // 文件的最大体积,单位M |
|||
compressSize:1, // 上传前如果图片体积超过该值,会先压缩,单位M |
|||
maxNum:32, // 单次最大可上传多少个文件 |
|||
compressSide: 0, //等比压缩的基准,0为按照最长边,1为按照宽度,2为按照高度 |
|||
compressLength: optImageCompressBorder //能接受的最大边长,超过该值Flash会自动等比压缩 |
|||
}; |
|||
//回调函数集合,支持传递函数名的字符串、函数句柄以及函数本身三种类型 |
|||
var callbacks={ |
|||
selectFileCallback: function(selectFiles){ // 选择文件的回调 |
|||
selectedImageCount += selectFiles.length; |
|||
if(selectedImageCount) baidu.g("upload").style.display = ""; |
|||
dialog.buttons[0].setDisabled(true); //初始化时置灰确定按钮 |
|||
}, |
|||
deleteFileCallback: function(delFiles){ // 删除文件的回调 |
|||
selectedImageCount -= delFiles.length; |
|||
if (!selectedImageCount) { |
|||
baidu.g("upload").style.display = "none"; |
|||
dialog.buttons[0].setDisabled(false); //没有选择图片时重新点亮按钮 |
|||
} |
|||
}, |
|||
uploadCompleteCallback: function(data){ // 单个文件上传完成的回调 |
|||
try{var info = eval("(" + data.info + ")"); |
|||
info && imageUrls.push(info); |
|||
selectedImageCount--; |
|||
}catch(e){} |
|||
}, |
|||
uploadErrorCallback: function (data){ // 单个文件上传失败的回调, |
|||
console && console.log(data); |
|||
}, |
|||
allCompleteCallback: function(){ // 全部上传完成时的回调 |
|||
dialog.buttons[0].setDisabled(false); //上传完毕后点亮按钮 |
|||
} |
|||
//exceedFileCallback: 'exceedFileCallback', // 文件超出限制的最大体积时的回调 |
|||
//startUploadCallback: startUploadCallback // 开始上传某个文件时的回调 |
|||
}; |
|||
wordImage.init(flashOptions,callbacks); |
|||
}); |
|||
|
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,157 @@ |
|||
/** |
|||
* Created by JetBrains PhpStorm. |
|||
* User: taoqili |
|||
* Date: 12-1-30 |
|||
* Time: 下午12:50 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
|
|||
|
|||
|
|||
var wordImage = {}; |
|||
//(function(){
|
|||
var g = baidu.g, |
|||
flashObj,flashContainer; |
|||
|
|||
wordImage.init = function(opt, callbacks) { |
|||
showLocalPath("localPath"); |
|||
//createCopyButton("clipboard","localPath");
|
|||
createFlashUploader(opt, callbacks); |
|||
addUploadListener(); |
|||
addOkListener(); |
|||
}; |
|||
|
|||
function hideFlash(){ |
|||
flashObj = null; |
|||
flashContainer.innerHTML = ""; |
|||
} |
|||
function addOkListener() { |
|||
dialog.onok = function() { |
|||
if (!imageUrls.length) return; |
|||
var urlPrefix = editor.getOpt('imageUrlPrefix'), |
|||
images = domUtils.getElementsByTagName(editor.document,"img"); |
|||
editor.fireEvent('saveScene'); |
|||
for (var i = 0,img; img = images[i++];) { |
|||
var src = img.getAttribute("word_img"); |
|||
if (!src) continue; |
|||
for (var j = 0,url; url = imageUrls[j++];) { |
|||
if (src.indexOf(url.original.replace(" ","")) != -1) { |
|||
img.src = urlPrefix + url.url; |
|||
img.setAttribute("_src", urlPrefix + url.url); //同时修改"_src"属性
|
|||
img.setAttribute("title",url.title); |
|||
domUtils.removeAttributes(img, ["word_img","style","width","height"]); |
|||
editor.fireEvent("selectionchange"); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
editor.fireEvent('saveScene'); |
|||
hideFlash(); |
|||
}; |
|||
dialog.oncancel = function(){ |
|||
hideFlash(); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 绑定开始上传事件 |
|||
*/ |
|||
function addUploadListener() { |
|||
g("upload").onclick = function () { |
|||
flashObj.upload(); |
|||
this.style.display = "none"; |
|||
}; |
|||
} |
|||
|
|||
function showLocalPath(id) { |
|||
//单张编辑
|
|||
var img = editor.selection.getRange().getClosedNode(); |
|||
var images = editor.execCommand('wordimage'); |
|||
if(images.length==1 || img && img.tagName == 'IMG'){ |
|||
g(id).value = images[0]; |
|||
return; |
|||
} |
|||
var path = images[0]; |
|||
var leftSlashIndex = path.lastIndexOf("/")||0, //不同版本的doc和浏览器都可能影响到这个符号,故直接判断两种
|
|||
rightSlashIndex = path.lastIndexOf("\\")||0, |
|||
separater = leftSlashIndex > rightSlashIndex ? "/":"\\" ; |
|||
|
|||
path = path.substring(0, path.lastIndexOf(separater)+1); |
|||
g(id).value = path; |
|||
} |
|||
|
|||
function createFlashUploader(opt, callbacks) { |
|||
//由于lang.flashI18n是静态属性,不可以直接进行修改,否则会影响到后续内容
|
|||
var i18n = utils.extend({},lang.flashI18n); |
|||
//处理图片资源地址的编码,补全等问题
|
|||
for(var i in i18n){ |
|||
if(!(i in {"lang":1,"uploadingTF":1,"imageTF":1,"textEncoding":1}) && i18n[i]){ |
|||
i18n[i] = encodeURIComponent(editor.options.langPath + editor.options.lang + "/images/" + i18n[i]); |
|||
} |
|||
} |
|||
opt = utils.extend(opt,i18n,false); |
|||
var option = { |
|||
createOptions:{ |
|||
id:'flash', |
|||
url:opt.flashUrl, |
|||
width:opt.width, |
|||
height:opt.height, |
|||
errorMessage:lang.flashError, |
|||
wmode:browser.safari ? 'transparent' : 'window', |
|||
ver:'10.0.0', |
|||
vars:opt, |
|||
container:opt.container |
|||
} |
|||
}; |
|||
|
|||
option = extendProperty(callbacks, option); |
|||
flashObj = new baidu.flash.imageUploader(option); |
|||
flashContainer = $G(opt.container); |
|||
} |
|||
|
|||
function extendProperty(fromObj, toObj) { |
|||
for (var i in fromObj) { |
|||
if (!toObj[i]) { |
|||
toObj[i] = fromObj[i]; |
|||
} |
|||
} |
|||
return toObj; |
|||
} |
|||
|
|||
//})();
|
|||
|
|||
function getPasteData(id) { |
|||
baidu.g("msg").innerHTML = lang.copySuccess + "</br>"; |
|||
setTimeout(function() { |
|||
baidu.g("msg").innerHTML = ""; |
|||
}, 5000); |
|||
return baidu.g(id).value; |
|||
} |
|||
|
|||
function createCopyButton(id, dataFrom) { |
|||
baidu.swf.create({ |
|||
id:"copyFlash", |
|||
url:"fClipboard_ueditor.swf", |
|||
width:"58", |
|||
height:"25", |
|||
errorMessage:"", |
|||
bgColor:"#CBCBCB", |
|||
wmode:"transparent", |
|||
ver:"10.0.0", |
|||
vars:{ |
|||
tid:dataFrom |
|||
} |
|||
}, id |
|||
); |
|||
|
|||
var clipboard = baidu.swf.getMovie("copyFlash"); |
|||
var clipinterval = setInterval(function() { |
|||
if (clipboard && clipboard.flashInit) { |
|||
clearInterval(clipinterval); |
|||
clipboard.setHandCursor(true); |
|||
clipboard.setContentFuncName("getPasteData"); |
|||
//clipboard.setMEFuncName("mouseEventHandler");
|
|||
} |
|||
}, 500); |
|||
} |
|||
createCopyButton("clipboard", "localPath"); |
|||
@ -0,0 +1,684 @@ |
|||
/** |
|||
* Created with JetBrains PhpStorm. |
|||
* User: taoqili |
|||
* Date: 12-6-12 |
|||
* Time: 下午6:57 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
UE.I18N['en'] = { |
|||
'labelMap':{ |
|||
'anchor':'Anchor', 'undo':'Undo', 'redo':'Redo', 'bold':'Bold', 'indent':'Indent', 'snapscreen':'SnapScreen', |
|||
'italic':'Italic', 'underline':'Underline', 'strikethrough':'Strikethrough', 'subscript':'SubScript','fontborder':'text border', |
|||
'superscript':'SuperScript', 'formatmatch':'Format Match', 'source':'Source', 'blockquote':'BlockQuote', |
|||
'pasteplain':'PastePlain', 'selectall':'SelectAll', 'print':'Print', 'preview':'Preview', |
|||
'horizontal':'Horizontal', 'removeformat':'RemoveFormat', 'time':'Time', 'date':'Date', |
|||
'unlink':'Unlink', 'insertrow':'InsertRow', 'insertcol':'InsertCol', 'mergeright':'MergeRight', 'mergedown':'MergeDown', |
|||
'deleterow':'DeleteRow', 'deletecol':'DeleteCol', 'splittorows':'SplitToRows','insertcode':'insert code', |
|||
'splittocols':'SplitToCols', 'splittocells':'SplitToCells','deletecaption':'DeleteCaption','inserttitle':'InsertTitle', |
|||
'mergecells':'MergeCells', 'deletetable':'DeleteTable', 'cleardoc':'Clear', 'insertparagraphbeforetable':"InsertParagraphBeforeTable", |
|||
'fontfamily':'FontFamily', 'fontsize':'FontSize', 'paragraph':'Paragraph','simpleupload':'Single Image','insertimage':'Multi Image','edittable':'Edit Table', 'edittd':'Edit Td','link':'Link', |
|||
'emotion':'Emotion', 'spechars':'Spechars', 'searchreplace':'SearchReplace', 'map':'BaiduMap', 'gmap':'GoogleMap', |
|||
'insertvideo':'Video', 'help':'Help', 'justifyleft':'JustifyLeft', 'justifyright':'JustifyRight', 'justifycenter':'JustifyCenter', |
|||
'justifyjustify':'Justify', 'forecolor':'FontColor', 'backcolor':'BackColor', 'insertorderedlist':'OL', |
|||
'insertunorderedlist':'UL', 'fullscreen':'FullScreen', 'directionalityltr':'EnterFromLeft', 'directionalityrtl':'EnterFromRight', |
|||
'rowspacingtop':'RowSpacingTop', 'rowspacingbottom':'RowSpacingBottom', 'pagebreak':'PageBreak', 'insertframe':'Iframe', 'imagenone':'Default', |
|||
'imageleft':'ImageLeft', 'imageright':'ImageRight', 'attachment':'Attachment', 'imagecenter':'ImageCenter', 'wordimage':'WordImage', |
|||
'lineheight':'LineHeight','edittip':'EditTip','customstyle':'CustomStyle', 'scrawl':'Scrawl', 'autotypeset':'AutoTypeset', |
|||
'webapp':'WebAPP', 'touppercase':'UpperCase', 'tolowercase':'LowerCase','template':'Template','background':'Background','inserttable':'InsertTable', |
|||
'music':'Music', 'charts': 'charts','drafts': 'Load from Drafts' |
|||
}, |
|||
'insertorderedlist':{ |
|||
'num':'1,2,3...', |
|||
'num1':'1),2),3)...', |
|||
'num2':'(1),(2),(3)...', |
|||
'cn':'一,二,三....', |
|||
'cn1':'一),二),三)....', |
|||
'cn2':'(一),(二),(三)....', |
|||
'decimal':'1,2,3...', |
|||
'lower-alpha':'a,b,c...', |
|||
'lower-roman':'i,ii,iii...', |
|||
'upper-alpha':'A,B,C...', |
|||
'upper-roman':'I,II,III...' |
|||
}, |
|||
'insertunorderedlist':{ |
|||
'circle':'○ Circle', |
|||
'disc':'● Circle dot', |
|||
'square':'■ Rectangle ', |
|||
'dash' :'- Dash', |
|||
'dot' : '。dot' |
|||
}, |
|||
'paragraph':{'p':'Paragraph', 'h1':'Title 1', 'h2':'Title 2', 'h3':'Title 3', 'h4':'Title 4', 'h5':'Title 5', 'h6':'Title 6'}, |
|||
'fontfamily':{ |
|||
'songti':'Sim Sun', |
|||
'kaiti':'Sim Kai', |
|||
'heiti':'Sim Hei', |
|||
'lishu':'Sim Li', |
|||
'yahei': 'Microsoft YaHei', |
|||
'andaleMono':'Andale Mono', |
|||
'arial': 'Arial', |
|||
'arialBlack':'Arial Black', |
|||
'comicSansMs':'Comic Sans MS', |
|||
'impact':'Impact', |
|||
'timesNewRoman':'Times New Roman' |
|||
}, |
|||
'customstyle':{ |
|||
'tc':'Title center', |
|||
'tl':'Title left', |
|||
'im':'Important', |
|||
'hi':'Highlight' |
|||
}, |
|||
'autoupload': { |
|||
'exceedSizeError': 'File Size Exceed', |
|||
'exceedTypeError': 'File Type Not Allow', |
|||
'jsonEncodeError': 'Server Return Format Error', |
|||
'loading':"loading...", |
|||
'loadError':"load error", |
|||
'errorLoadConfig': 'Server config not loaded, upload can not work.', |
|||
}, |
|||
'simpleupload':{ |
|||
'exceedSizeError': 'File Size Exceed', |
|||
'exceedTypeError': 'File Type Not Allow', |
|||
'jsonEncodeError': 'Server Return Format Error', |
|||
'loading':"loading...", |
|||
'loadError':"load error", |
|||
'errorLoadConfig': 'Server config not loaded, upload can not work.', |
|||
}, |
|||
'elementPathTip':"Path", |
|||
'wordCountTip':"Word Count", |
|||
'wordCountMsg':'{#count} characters entered,{#leave} left. ', |
|||
'wordOverFlowMsg':'<span style="color:red;">The number of characters has exceeded allowable maximum values, the server may refuse to save!</span>', |
|||
'ok':"OK", |
|||
'cancel':"Cancel", |
|||
'closeDialog':"closeDialog", |
|||
'tableDrag':"You must import the file uiUtils.js before drag! ", |
|||
'autofloatMsg':"The plugin AutoFloat depends on EditorUI!", |
|||
'loadconfigError': 'Get server config error.', |
|||
'loadconfigFormatError': 'Server config format error.', |
|||
'loadconfigHttpError': 'Get server config http error.', |
|||
'snapScreen_plugin':{ |
|||
'browserMsg':"Only IE supported!", |
|||
'callBackErrorMsg':"The callback data is wrong,please check the config!", |
|||
'uploadErrorMsg':"Upload error,please check your server environment! " |
|||
}, |
|||
'insertcode':{ |
|||
'as3':'ActionScript 3', |
|||
'bash':'Bash/Shell', |
|||
'cpp':'C/C++', |
|||
'css':'CSS', |
|||
'cf':'ColdFusion', |
|||
'c#':'C#', |
|||
'delphi':'Delphi', |
|||
'diff':'Diff', |
|||
'erlang':'Erlang', |
|||
'groovy':'Groovy', |
|||
'html':'HTML', |
|||
'java':'Java', |
|||
'jfx':'JavaFX', |
|||
'js':'JavaScript', |
|||
'pl':'Perl', |
|||
'php':'PHP', |
|||
'plain':'Plain Text', |
|||
'ps':'PowerShell', |
|||
'python':'Python', |
|||
'ruby':'Ruby', |
|||
'scala':'Scala', |
|||
'sql':'SQL', |
|||
'vb':'Visual Basic', |
|||
'xml':'XML' |
|||
}, |
|||
'confirmClear':"Do you confirm to clear the Document?", |
|||
'contextMenu':{ |
|||
'delete':"Delete", |
|||
'selectall':"Select all", |
|||
'deletecode':"Delete Code", |
|||
'cleardoc':"Clear Document", |
|||
'confirmclear':"Do you confirm to clear the Document?", |
|||
'unlink':"Unlink", |
|||
'paragraph':"Paragraph", |
|||
'edittable':"Table property", |
|||
'aligncell':'Align cell', |
|||
'aligntable':'Table alignment', |
|||
'tableleft':'Left float', |
|||
'tablecenter':'Center', |
|||
'tableright':'Right float', |
|||
'aligntd':'Cell alignment', |
|||
'edittd':"Cell property", |
|||
'setbordervisible':'set table edge visible', |
|||
'table':"Table", |
|||
'justifyleft':'Justify Left', |
|||
'justifyright':'Justify Right', |
|||
'justifycenter':'Justify Center', |
|||
'justifyjustify':'Default', |
|||
'deletetable':"Delete table", |
|||
'insertparagraphbefore':"InsertedBeforeLine", |
|||
'insertparagraphafter':'InsertedAfterLine', |
|||
'inserttable':'Insert table', |
|||
'insertcaption':'Insert caption', |
|||
'deletecaption':'Delete Caption', |
|||
'inserttitle':'Insert Title', |
|||
'deletetitle':'Delete Title', |
|||
'inserttitlecol':'Insert Title Col', |
|||
'deletetitlecol':'Delete Title Col', |
|||
'averageDiseRow':'AverageDise Row', |
|||
'averageDisCol':'AverageDis Col', |
|||
'deleterow':"Delete row", |
|||
'deletecol':"Delete col", |
|||
'insertrow':"Insert row", |
|||
'insertcol':"Insert col", |
|||
'insertrownext':'Insert Row Next', |
|||
'insertcolnext':'Insert Col Next', |
|||
'mergeright':"Merge right", |
|||
'mergeleft':"Merge left", |
|||
'mergedown':"Merge down", |
|||
'mergecells':"Merge cells", |
|||
'splittocells':"Split to cells", |
|||
'splittocols':"Split to Cols", |
|||
'splittorows':"Split to Rows", |
|||
'tablesort':'Table sorting', |
|||
'enablesort':'Sorting Enable', |
|||
'disablesort':'Sorting Disable', |
|||
'reversecurrent':'Reverse current', |
|||
'orderbyasc':'Order By ASCII', |
|||
'reversebyasc':'Reverse By ASCII', |
|||
'orderbynum':'Order By Num', |
|||
'reversebynum':'Reverse By Num', |
|||
'borderbk':'Border shading', |
|||
'setcolor':'interlaced color', |
|||
'unsetcolor':'Cancel interlacedcolor', |
|||
'setbackground':'Background interlaced', |
|||
'unsetbackground':'Cancel Bk interlaced', |
|||
'redandblue':'Blue and red', |
|||
'threecolorgradient':'Three-color gradient', |
|||
'copy':"Copy(Ctrl + c)", |
|||
'copymsg':"Browser does not support. Please use 'Ctrl + c' instead!", |
|||
'paste':"Paste(Ctrl + v)", |
|||
'pastemsg':"Browser does not support. Please use 'Ctrl + v' instead!" |
|||
}, |
|||
'copymsg': "Browser does not support. Please use 'Ctrl + c' instead!", |
|||
'pastemsg': "Browser does not support. Please use 'Ctrl + v' instead!", |
|||
'anthorMsg':"Link", |
|||
'clearColor':'Clear', |
|||
'standardColor':'Standard color', |
|||
'themeColor':'Theme color', |
|||
'property':'Property', |
|||
'default':'Default', |
|||
'modify':'Modify', |
|||
'justifyleft':'Justify Left', |
|||
'justifyright':'Justify Right', |
|||
'justifycenter':'Justify Center', |
|||
'justify':'Default', |
|||
'clear':'Clear', |
|||
'anchorMsg':'Anchor', |
|||
'delete':'Delete', |
|||
'clickToUpload':"Click to upload", |
|||
'unset':'Language hasn\'t been set!', |
|||
't_row':'row', |
|||
't_col':'col', |
|||
'pasteOpt':'Paste Option', |
|||
'pasteSourceFormat':"Keep Source Formatting", |
|||
'tagFormat':'Keep tag', |
|||
'pasteTextFormat':'Keep Text only', |
|||
'more':'More', |
|||
'autoTypeSet':{ |
|||
'mergeLine':"Merge empty line", |
|||
'delLine':"Del empty line", |
|||
'removeFormat':"Remove format", |
|||
'indent':"Indent", |
|||
'alignment':"Alignment", |
|||
'imageFloat':"Image float", |
|||
'removeFontsize':"Remove font size", |
|||
'removeFontFamily':"Remove fontFamily", |
|||
'removeHtml':"Remove redundant HTML code", |
|||
'pasteFilter':"Paste filter", |
|||
'run':"Done", |
|||
'symbol':'Symbol Conversion', |
|||
'bdc2sb':'Full-width to Half-width', |
|||
'tobdc':'Half-width to Full-width' |
|||
}, |
|||
|
|||
'background':{ |
|||
'static':{ |
|||
'lang_background_normal':'Normal', |
|||
'lang_background_local':'Online', |
|||
'lang_background_set':'Background Set', |
|||
'lang_background_none':'No Background', |
|||
'lang_background_colored':'Colored Background', |
|||
'lang_background_color':'Color Set', |
|||
'lang_background_netimg':'Net-Image', |
|||
'lang_background_align':'Align Type', |
|||
'lang_background_position':'Position', |
|||
'repeatType':{'options':["Center", "Repeat-x", "Repeat-y", "Tile","Custom"]} |
|||
}, |
|||
'noUploadImage':"No pictures has been uploaded!", |
|||
'toggleSelect':'Change the active state by click!\n Image Size: ' |
|||
}, |
|||
//===============dialog i18N=======================
|
|||
'insertimage':{ |
|||
'static':{ |
|||
'lang_tab_remote':"Insert", |
|||
'lang_tab_upload':"Local", |
|||
'lang_tab_online':"Manager", |
|||
'lang_tab_search':"Search", |
|||
'lang_input_url':"Address:", |
|||
'lang_input_size':"Size:", |
|||
'lang_input_width':"Width", |
|||
'lang_input_height':"Height", |
|||
'lang_input_border':"Border:", |
|||
'lang_input_vhspace':"Margins:", |
|||
'lang_input_title':"Title:", |
|||
'lang_input_align':'Image Float Style:', |
|||
'lang_imgLoading':"Loading...", |
|||
'lang_start_upload':"Start Upload", |
|||
'lock':{'title':"Lock rate"}, |
|||
'searchType':{'title':"ImageType", 'options':["News", "Wallpaper", "emotions", "photo"]}, |
|||
'searchTxt':{'value':"Enter the search keyword!"}, |
|||
'searchBtn':{'value':"Search"}, |
|||
'searchReset':{'value':"Clear"}, |
|||
'noneAlign':{'title':'None Float'}, |
|||
'leftAlign':{'title':'Left Float'}, |
|||
'rightAlign':{'title':'Right Float'}, |
|||
'centerAlign':{'title':'Center In A Line'} |
|||
}, |
|||
'uploadSelectFile':'Select File', |
|||
'uploadAddFile':'Add File', |
|||
'uploadStart':'Start Upload', |
|||
'uploadPause':'Pause Upload', |
|||
'uploadContinue':'Continue Upload', |
|||
'uploadRetry':'Retry Upload', |
|||
'uploadDelete':'Delete', |
|||
'uploadTurnLeft':'Turn Left', |
|||
'uploadTurnRight':'Turn Right', |
|||
'uploadPreview':'Doing Preview', |
|||
'uploadNoPreview':'Can Not Preview', |
|||
'updateStatusReady': 'Selected _ pictures, total _KB.', |
|||
'updateStatusConfirm': '_ uploaded successfully and _ upload failed', |
|||
'updateStatusFinish': 'Total _ pictures (_KB), _ uploaded successfully', |
|||
'updateStatusError': ' and _ upload failed', |
|||
'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', |
|||
'errorLoadConfig': 'Server config not loaded, upload can not work.', |
|||
'errorExceedSize':'File Size Exceed', |
|||
'errorFileType':'File Type Not Allow', |
|||
'errorInterrupt':'File Upload Interrupted', |
|||
'errorUploadRetry':'Upload Error, Please Retry.', |
|||
'errorHttp':'Http Error', |
|||
'errorServerUpload':'Server Result Error.', |
|||
'remoteLockError':"Cannot Lock the Proportion between width and height", |
|||
'numError':"Please enter the correct Num. e.g 123,400", |
|||
'imageUrlError':"The image format may be wrong!", |
|||
'imageLoadError':"Error,please check the network or URL!", |
|||
'searchRemind':"Enter the search keyword!", |
|||
'searchLoading':"Image is loading,please wait...", |
|||
'searchRetry':" Sorry,can't find the image,please try again!" |
|||
}, |
|||
'attachment':{ |
|||
'static':{ |
|||
'lang_tab_upload': 'Upload', |
|||
'lang_tab_online': 'Online', |
|||
'lang_start_upload':"Start upload", |
|||
'lang_drop_remind':"You can drop files here, a single maximum of 300 files" |
|||
}, |
|||
'uploadSelectFile':'Select File', |
|||
'uploadAddFile':'Add File', |
|||
'uploadStart':'Start Upload', |
|||
'uploadPause':'Pause Upload', |
|||
'uploadContinue':'Continue Upload', |
|||
'uploadRetry':'Retry Upload', |
|||
'uploadDelete':'Delete', |
|||
'uploadTurnLeft':'Turn Left', |
|||
'uploadTurnRight':'Turn Right', |
|||
'uploadPreview':'Doing Preview', |
|||
'updateStatusReady': 'Selected _ files, total _KB.', |
|||
'updateStatusConfirm': '_ uploaded successfully and _ upload failed', |
|||
'updateStatusFinish': 'Total _ files (_KB), _ uploaded successfully', |
|||
'updateStatusError': ' and _ upload failed', |
|||
'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', |
|||
'errorLoadConfig': 'Server config not loaded, upload can not work.', |
|||
'errorExceedSize':'File Size Exceed', |
|||
'errorFileType':'File Type Not Allow', |
|||
'errorInterrupt':'File Upload Interrupted', |
|||
'errorUploadRetry':'Upload Error, Please Retry.', |
|||
'errorHttp':'Http Error', |
|||
'errorServerUpload':'Server Result Error.' |
|||
}, |
|||
|
|||
'insertvideo':{ |
|||
'static':{ |
|||
'lang_tab_insertV':"Video", |
|||
'lang_tab_searchV':"Search", |
|||
'lang_tab_uploadV':"Upload", |
|||
'lang_video_url':" URL ", |
|||
'lang_video_size':"Video Size", |
|||
'lang_videoW':"Width", |
|||
'lang_videoH':"Height", |
|||
'lang_alignment':"Alignment", |
|||
'videoSearchTxt':{'value':"Enter the search keyword!"}, |
|||
'videoType':{'options':["All", "Hot", "Entertainment", "Funny", "Sports", "Science", "variety"]}, |
|||
'videoSearchBtn':{'value':"Search in Baidu"}, |
|||
'videoSearchReset':{'value':"Clear result"}, |
|||
|
|||
'lang_input_fileStatus':' No file uploaded!', |
|||
'startUpload':{'style':"background:url(upload.png) no-repeat;"}, |
|||
|
|||
'lang_upload_size':"Video Size", |
|||
'lang_upload_width':"Width", |
|||
'lang_upload_height':"Height", |
|||
'lang_upload_alignment':"Alignment", |
|||
'lang_format_advice':"Recommends mp4 format." |
|||
}, |
|||
'numError':"Please enter the correct Num. e.g 123,400", |
|||
'floatLeft':"Float left", |
|||
'floatRight':"Float right", |
|||
'default':"Default", |
|||
'block':"Display in block", |
|||
'urlError':"The video url format may be wrong!", |
|||
'loading':" The video is loading, please wait…", |
|||
'clickToSelect':"Click to select", |
|||
'goToSource':'Visit source video ', |
|||
'noVideo':" Sorry,can't find the video,please try again!", |
|||
|
|||
'browseFiles':'Open files', |
|||
'uploadSuccess':'Upload Successful!', |
|||
'delSuccessFile':'Remove from the success of the queue', |
|||
'delFailSaveFile':'Remove the save failed file', |
|||
'statusPrompt':' file(s) uploaded! ', |
|||
'flashVersionError':'The current Flash version is too low, please update FlashPlayer,then try again!', |
|||
'flashLoadingError':'The Flash failed loading! Please check the path or network state', |
|||
'fileUploadReady':'Wait for uploading...', |
|||
'delUploadQueue':'Remove from the uploading queue ', |
|||
'limitPrompt1':'Can not choose more than single', |
|||
'limitPrompt2':'file(s)!Please choose again!', |
|||
'delFailFile':'Remove failure file', |
|||
'fileSizeLimit':'File size exceeds the limit!', |
|||
'emptyFile':'Can not upload an empty file!', |
|||
'fileTypeError':'File type error!', |
|||
'unknownError':'Unknown error!', |
|||
'fileUploading':'Uploading,please wait...', |
|||
'cancelUpload':'Cancel upload', |
|||
'netError':'Network error', |
|||
'failUpload':'Upload failed', |
|||
'serverIOError':'Server IO error!', |
|||
'noAuthority':'No Permission!', |
|||
'fileNumLimit':'Upload limit to the number', |
|||
'failCheck':'Authentication fails, the upload is skipped!', |
|||
'fileCanceling':'Cancel, please wait...', |
|||
'stopUploading':'Upload has stopped...', |
|||
|
|||
'uploadSelectFile':'Select File', |
|||
'uploadAddFile':'Add File', |
|||
'uploadStart':'Start Upload', |
|||
'uploadPause':'Pause Upload', |
|||
'uploadContinue':'Continue Upload', |
|||
'uploadRetry':'Retry Upload', |
|||
'uploadDelete':'Delete', |
|||
'uploadTurnLeft':'Turn Left', |
|||
'uploadTurnRight':'Turn Right', |
|||
'uploadPreview':'Doing Preview', |
|||
'updateStatusReady': 'Selected _ files, total _KB.', |
|||
'updateStatusConfirm': '_ uploaded successfully and _ upload failed', |
|||
'updateStatusFinish': 'Total _ files (_KB), _ uploaded successfully', |
|||
'updateStatusError': ' and _ upload failed', |
|||
'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', |
|||
'errorLoadConfig': 'Server config not loaded, upload can not work.', |
|||
'errorExceedSize':'File Size Exceed', |
|||
'errorFileType':'File Type Not Allow', |
|||
'errorInterrupt':'File Upload Interrupted', |
|||
'errorUploadRetry':'Upload Error, Please Retry.', |
|||
'errorHttp':'Http Error', |
|||
'errorServerUpload':'Server Result Error.' |
|||
}, |
|||
'webapp':{ |
|||
'tip1':"This function provided by Baidu APP,please apply for baidu APPKey webmaster first!", |
|||
'tip2':"And then open the file ueditor.config.js to set it! ", |
|||
'applyFor':"APPLY FOR", |
|||
'anthorApi':"Baidu API" |
|||
}, |
|||
'template':{ |
|||
'static':{ |
|||
'lang_template_bkcolor':'Background Color', |
|||
'lang_template_clear' : 'Keep Content', |
|||
'lang_template_select':'Select Template' |
|||
}, |
|||
'blank':"Blank", |
|||
'blog':"Blog", |
|||
'resume':"Resume", |
|||
'richText':"Rich Text", |
|||
'scrPapers':"Scientific Papers" |
|||
}, |
|||
scrawl:{ |
|||
'static':{ |
|||
'lang_input_previousStep':"Previous", |
|||
'lang_input_nextsStep':"Next", |
|||
'lang_input_clear':'Clear', |
|||
'lang_input_addPic':'AddImage', |
|||
'lang_input_ScalePic':'ScaleImage', |
|||
'lang_input_removePic':'RemoveImage', |
|||
'J_imgTxt':{title:'Add background image'} |
|||
}, |
|||
'noScarwl':"No paint, a white paper...", |
|||
'scrawlUpLoading':"Image is uploading, please wait...", |
|||
'continueBtn':"Try again", |
|||
'imageError':"Image failed to load!", |
|||
'backgroundUploading':'Image is uploading,please wait...' |
|||
}, |
|||
'music':{ |
|||
'static':{ |
|||
'lang_input_tips':"Input singer/song/album, search you interested in music!", |
|||
'J_searchBtn':{value:'Search songs'} |
|||
}, |
|||
'emptyTxt':'Not search to the relevant music results, please change a keyword try.', |
|||
'chapter':'Songs', |
|||
'singer':'Singer', |
|||
'special':'Album', |
|||
'listenTest':'Audition' |
|||
}, |
|||
anchor:{ |
|||
'static':{ |
|||
'lang_input_anchorName':'Anchor Name:' |
|||
} |
|||
}, |
|||
'charts':{ |
|||
'static':{ |
|||
'lang_data_source':'Data source:', |
|||
'lang_chart_format': 'Chart format:', |
|||
'lang_data_align': 'Align', |
|||
'lang_chart_align_same': 'Consistent with the X-axis Y-axis', |
|||
'lang_chart_align_reverse': 'X-axis Y-axis opposite', |
|||
'lang_chart_title': 'Title', |
|||
'lang_chart_main_title': 'main title:', |
|||
'lang_chart_sub_title': 'sub title:', |
|||
'lang_chart_x_title': 'X-axis title:', |
|||
'lang_chart_y_title': 'Y-axis title:', |
|||
'lang_chart_tip': 'Prompt', |
|||
'lang_cahrt_tip_prefix': 'prefix:', |
|||
'lang_cahrt_tip_description': '仅饼图有效, 当鼠标移动到饼图中相应的块上时,提示框内的文字的前缀', |
|||
'lang_chart_data_unit': 'Unit', |
|||
'lang_chart_data_unit_title': 'unit:', |
|||
'lang_chart_data_unit_description': '显示在每个数据点上的数据的单位, 比如: 温度的单位 ℃', |
|||
'lang_chart_type': 'Chart type:', |
|||
'lang_prev_btn': 'Previous', |
|||
'lang_next_btn': 'Next' |
|||
} |
|||
}, |
|||
emotion:{ |
|||
'static':{ |
|||
'lang_input_choice':'Choice', |
|||
'lang_input_Tuzki':'Tuzki', |
|||
'lang_input_lvdouwa':'LvDouWa', |
|||
'lang_input_BOBO':'BOBO', |
|||
'lang_input_babyCat':'BabyCat', |
|||
'lang_input_bubble':'Bubble', |
|||
'lang_input_youa':'YouA' |
|||
} |
|||
}, |
|||
gmap:{ |
|||
'static':{ |
|||
'lang_input_address':'Address:', |
|||
'lang_input_search':'Search', |
|||
'address':{value:"Beijing"} |
|||
}, |
|||
searchError:'Unable to locate the address!' |
|||
}, |
|||
help:{ |
|||
'static':{ |
|||
'lang_input_about':'About', |
|||
'lang_input_shortcuts':'Shortcuts', |
|||
'lang_input_introduction':"UEditor is developed by Baidu Co.ltd. It is lightweight, customizable , focusing on user experience and etc. , UEditor is based on open source BSD license , allowing free use and redistribution.", |
|||
'lang_Txt_shortcuts':'Shortcuts', |
|||
'lang_Txt_func':'Function', |
|||
'lang_Txt_bold':'Bold', |
|||
'lang_Txt_copy':'Copy', |
|||
'lang_Txt_cut':'Cut', |
|||
'lang_Txt_Paste':'Paste', |
|||
'lang_Txt_undo':'Undo', |
|||
'lang_Txt_redo':'Redo', |
|||
'lang_Txt_italic':'Italic', |
|||
'lang_Txt_underline':'Underline', |
|||
'lang_Txt_selectAll':'Select All', |
|||
'lang_Txt_visualEnter':'Submit', |
|||
'lang_Txt_fullscreen':'Fullscreen' |
|||
} |
|||
}, |
|||
insertframe:{ |
|||
'static':{ |
|||
'lang_input_address':'Address:', |
|||
'lang_input_width':'Width:', |
|||
'lang_input_height':'height:', |
|||
'lang_input_isScroll':'Enable scrollbars:', |
|||
'lang_input_frameborder':'Show frame border:', |
|||
'lang_input_alignMode':'Alignment:', |
|||
'align':{title:"Alignment", options:["Default", "Left", "Right", "Center"]} |
|||
}, |
|||
'enterAddress':'Please enter an address!' |
|||
}, |
|||
link:{ |
|||
'static':{ |
|||
'lang_input_text':'Text:', |
|||
'lang_input_url':'URL:', |
|||
'lang_input_title':'Title:', |
|||
'lang_input_target':'open in new window:' |
|||
}, |
|||
'validLink':'Supports only effective when a link is selected', |
|||
'httpPrompt':'The hyperlink you enter should start with "http|https|ftp://"!' |
|||
}, |
|||
map:{ |
|||
'static':{ |
|||
lang_city:"City", |
|||
lang_address:"Address", |
|||
city:{value:"Beijing"}, |
|||
lang_search:"Search", |
|||
lang_dynamicmap:"Dynamic map" |
|||
}, |
|||
cityMsg:"Please enter the city name!", |
|||
errorMsg:"Can't find the place!" |
|||
}, |
|||
searchreplace:{ |
|||
'static':{ |
|||
lang_tab_search:"Search", |
|||
lang_tab_replace:"Replace", |
|||
lang_search1:"Search", |
|||
lang_search2:"Search", |
|||
lang_replace:"Replace", |
|||
lang_searchReg:'Support regular expression ,which starts and ends with a slash ,for example "/expression/"', |
|||
lang_searchReg1:'Support regular expression ,which starts and ends with a slash ,for example "/expression/"', |
|||
lang_case_sensitive1:"Case sense", |
|||
lang_case_sensitive2:"Case sense", |
|||
nextFindBtn:{value:"Next"}, |
|||
preFindBtn:{value:"Preview"}, |
|||
nextReplaceBtn:{value:"Next"}, |
|||
preReplaceBtn:{value:"Preview"}, |
|||
repalceBtn:{value:"Replace"}, |
|||
repalceAllBtn:{value:"Replace all"} |
|||
}, |
|||
getEnd:"Has the search to the bottom!", |
|||
getStart:"Has the search to the top!", |
|||
countMsg:"Altogether replaced {#count} character(s)!" |
|||
}, |
|||
snapscreen:{ |
|||
'static':{ |
|||
lang_showMsg:"You should install the UEditor screenshots program first!", |
|||
lang_download:"Download!", |
|||
lang_step1:"Step1:Download the program and then run it", |
|||
lang_step2:"Step2:After complete install,try to click the button again" |
|||
} |
|||
}, |
|||
spechars:{ |
|||
'static':{}, |
|||
tsfh:"Special", |
|||
lmsz:"Roman", |
|||
szfh:"Numeral", |
|||
rwfh:"Japanese", |
|||
xlzm:"The Greek", |
|||
ewzm:"Russian", |
|||
pyzm:"Phonetic", |
|||
yyyb:"English", |
|||
zyzf:"Others" |
|||
}, |
|||
'edittable':{ |
|||
'static':{ |
|||
'lang_tableStyle':'Table style', |
|||
'lang_insertCaption':'Add table header row', |
|||
'lang_insertTitle':'Add table title row', |
|||
'lang_insertTitleCol':'Add table title col', |
|||
'lang_tableSize':'Automatically adjust table size', |
|||
'lang_autoSizeContent':'Adaptive by form text', |
|||
'lang_orderbycontent':"Table of contents sortable", |
|||
'lang_autoSizePage':'Page width adaptive', |
|||
'lang_example':'Example', |
|||
'lang_borderStyle':'Table Border', |
|||
'lang_color':'Color:' |
|||
}, |
|||
captionName:'Caption', |
|||
titleName:'Title', |
|||
cellsName:'text', |
|||
errorMsg:'There are merged cells, can not sort.' |
|||
}, |
|||
'edittip':{ |
|||
'static':{ |
|||
lang_delRow:'Delete entire row', |
|||
lang_delCol:'Delete entire col' |
|||
} |
|||
}, |
|||
'edittd':{ |
|||
'static':{ |
|||
lang_tdBkColor:'Background Color:' |
|||
} |
|||
}, |
|||
'formula':{ |
|||
'static':{ |
|||
} |
|||
}, |
|||
wordimage:{ |
|||
'static':{ |
|||
lang_resave:"The re-save step", |
|||
uploadBtn:{src:"upload.png", alt:"Upload"}, |
|||
clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"}, |
|||
lang_step:" 1. Click top button to copy the url and then open the dialog to paste it. 2. Open after choose photos uploaded process." |
|||
}, |
|||
fileType:"Image", |
|||
flashError:"Flash initialization failed!", |
|||
netError:"Network error! Please try again!", |
|||
copySuccess:"URL has been copied!", |
|||
|
|||
'flashI18n':{ |
|||
lang:encodeURI( '{"UploadingState":"totalNum: ${a},uploadComplete: ${b}", "BeforeUpload":"waitingNum: ${a}", "ExceedSize":"Size exceed${a}", "ErrorInPreview":"Preview failed", "DefaultDescription":"Description", "LoadingImage":"Loading..."}' ), |
|||
uploadingTF:encodeURI( '{"font":"Arial", "size":12, "color":"0x000", "bold":"true", "italic":"false", "underline":"false"}' ), |
|||
imageTF:encodeURI( '{"font":"Arial", "size":11, "color":"red", "bold":"false", "italic":"false", "underline":"false"}' ), |
|||
textEncoding:"utf-8", |
|||
addImageSkinURL:"addImage.png", |
|||
allDeleteBtnUpSkinURL:"allDeleteBtnUpSkin.png", |
|||
allDeleteBtnHoverSkinURL:"allDeleteBtnHoverSkin.png", |
|||
rotateLeftBtnEnableSkinURL:"rotateLeftEnable.png", |
|||
rotateLeftBtnDisableSkinURL:"rotateLeftDisable.png", |
|||
rotateRightBtnEnableSkinURL:"rotateRightEnable.png", |
|||
rotateRightBtnDisableSkinURL:"rotateRightDisable.png", |
|||
deleteBtnEnableSkinURL:"deleteEnable.png", |
|||
deleteBtnDisableSkinURL:"deleteDisable.png", |
|||
backgroundURL:'', |
|||
listBackgroundURL:'', |
|||
buttonURL:'button.png' |
|||
} |
|||
}, |
|||
'autosave': { |
|||
'success':'Local conservation success' |
|||
} |
|||
}; |
|||
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 743 B |
|
After Width: | Height: | Size: 743 B |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 649 B |
|
After Width: | Height: | Size: 664 B |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 719 B |
|
After Width: | Height: | Size: 952 B |
|
After Width: | Height: | Size: 754 B |
|
After Width: | Height: | Size: 1007 B |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
@ -0,0 +1,669 @@ |
|||
/** |
|||
* Created with JetBrains PhpStorm. |
|||
* User: taoqili |
|||
* Date: 12-6-12 |
|||
* Time: 下午5:02 |
|||
* To change this template use File | Settings | File Templates. |
|||
*/ |
|||
UE.I18N['zh-cn'] = { |
|||
'labelMap':{ |
|||
'anchor':'锚点', 'undo':'撤销', 'redo':'重做', 'bold':'加粗', 'indent':'首行缩进', 'snapscreen':'截图', |
|||
'italic':'斜体', 'underline':'下划线', 'strikethrough':'删除线', 'subscript':'下标','fontborder':'字符边框', |
|||
'superscript':'上标', 'formatmatch':'格式刷', 'source':'源代码', 'blockquote':'引用', |
|||
'pasteplain':'纯文本粘贴模式', 'selectall':'全选', 'print':'打印', 'preview':'预览', |
|||
'horizontal':'分隔线', 'removeformat':'清除格式', 'time':'时间', 'date':'日期', |
|||
'unlink':'取消链接', 'insertrow':'前插入行', 'insertcol':'前插入列', 'mergeright':'右合并单元格', 'mergedown':'下合并单元格', |
|||
'deleterow':'删除行', 'deletecol':'删除列', 'splittorows':'拆分成行', |
|||
'splittocols':'拆分成列', 'splittocells':'完全拆分单元格','deletecaption':'删除表格标题','inserttitle':'插入标题', |
|||
'mergecells':'合并多个单元格', 'deletetable':'删除表格', 'cleardoc':'清空文档','insertparagraphbeforetable':"表格前插入行",'insertcode':'代码语言', |
|||
'fontfamily':'字体', 'fontsize':'字号', 'paragraph':'段落格式', 'simpleupload':'单图上传', 'insertimage':'多图上传','edittable':'表格属性','edittd':'单元格属性', 'link':'超链接', |
|||
'emotion':'表情', 'spechars':'特殊字符', 'searchreplace':'查询替换', 'map':'Baidu地图', 'gmap':'Google地图', |
|||
'insertvideo':'视频', 'help':'帮助', 'justifyleft':'居左对齐', 'justifyright':'居右对齐', 'justifycenter':'居中对齐', |
|||
'justifyjustify':'两端对齐', 'forecolor':'字体颜色', 'backcolor':'背景色', 'insertorderedlist':'有序列表', |
|||
'insertunorderedlist':'无序列表', 'fullscreen':'全屏', 'directionalityltr':'从左向右输入', 'directionalityrtl':'从右向左输入', |
|||
'rowspacingtop':'段前距', 'rowspacingbottom':'段后距', 'pagebreak':'分页', 'insertframe':'插入Iframe', 'imagenone':'默认', |
|||
'imageleft':'左浮动', 'imageright':'右浮动', 'attachment':'附件', 'imagecenter':'居中', 'wordimage':'图片转存', |
|||
'lineheight':'行间距','edittip' :'编辑提示','customstyle':'自定义标题', 'autotypeset':'自动排版', |
|||
'webapp':'百度应用','touppercase':'字母大写', 'tolowercase':'字母小写','background':'背景','template':'模板','scrawl':'涂鸦', |
|||
'music':'音乐','inserttable':'插入表格','drafts': '从草稿箱加载', 'charts': '图表' |
|||
}, |
|||
'insertorderedlist':{ |
|||
'num':'1,2,3...', |
|||
'num1':'1),2),3)...', |
|||
'num2':'(1),(2),(3)...', |
|||
'cn':'一,二,三....', |
|||
'cn1':'一),二),三)....', |
|||
'cn2':'(一),(二),(三)....', |
|||
'decimal':'1,2,3...', |
|||
'lower-alpha':'a,b,c...', |
|||
'lower-roman':'i,ii,iii...', |
|||
'upper-alpha':'A,B,C...', |
|||
'upper-roman':'I,II,III...' |
|||
}, |
|||
'insertunorderedlist':{ |
|||
'circle':'○ 大圆圈', |
|||
'disc':'● 小黑点', |
|||
'square':'■ 小方块 ', |
|||
'dash' :'— 破折号', |
|||
'dot':' 。 小圆圈' |
|||
}, |
|||
'paragraph':{'p':'段落', 'h1':'标题 1', 'h2':'标题 2', 'h3':'标题 3', 'h4':'标题 4', 'h5':'标题 5', 'h6':'标题 6'}, |
|||
'fontfamily':{ |
|||
'songti':'宋体', |
|||
'kaiti':'楷体', |
|||
'heiti':'黑体', |
|||
'lishu':'隶书', |
|||
'yahei':'微软雅黑', |
|||
'andaleMono':'andale mono', |
|||
'arial': 'arial', |
|||
'arialBlack':'arial black', |
|||
'comicSansMs':'comic sans ms', |
|||
'impact':'impact', |
|||
'timesNewRoman':'times new roman' |
|||
}, |
|||
'customstyle':{ |
|||
'tc':'标题居中', |
|||
'tl':'标题居左', |
|||
'im':'强调', |
|||
'hi':'明显强调' |
|||
}, |
|||
'autoupload': { |
|||
'exceedSizeError': '文件大小超出限制', |
|||
'exceedTypeError': '文件格式不允许', |
|||
'jsonEncodeError': '服务器返回格式错误', |
|||
'loading':"正在上传...", |
|||
'loadError':"上传错误", |
|||
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!' |
|||
}, |
|||
'simpleupload':{ |
|||
'exceedSizeError': '文件大小超出限制', |
|||
'exceedTypeError': '文件格式不允许', |
|||
'jsonEncodeError': '服务器返回格式错误', |
|||
'loading':"正在上传...", |
|||
'loadError':"上传错误", |
|||
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!' |
|||
}, |
|||
'elementPathTip':"元素路径", |
|||
'wordCountTip':"字数统计", |
|||
'wordCountMsg':'当前已输入{#count}个字符, 您还可以输入{#leave}个字符。 ', |
|||
'wordOverFlowMsg':'<span style="color:red;">字数超出最大允许值,服务器可能拒绝保存!</span>', |
|||
'ok':"确认", |
|||
'cancel':"取消", |
|||
'closeDialog':"关闭对话框", |
|||
'tableDrag':"表格拖动必须引入uiUtils.js文件!", |
|||
'autofloatMsg':"工具栏浮动依赖编辑器UI,您首先需要引入UI文件!", |
|||
'loadconfigError': '获取后台配置项请求出错,上传功能将不能正常使用!', |
|||
'loadconfigFormatError': '后台配置项返回格式出错,上传功能将不能正常使用!', |
|||
'loadconfigHttpError': '请求后台配置项http错误,上传功能将不能正常使用!', |
|||
'snapScreen_plugin':{ |
|||
'browserMsg':"仅支持IE浏览器!", |
|||
'callBackErrorMsg':"服务器返回数据有误,请检查配置项之后重试。", |
|||
'uploadErrorMsg':"截图上传失败,请检查服务器端环境! " |
|||
}, |
|||
'insertcode':{ |
|||
'as3':'ActionScript 3', |
|||
'bash':'Bash/Shell', |
|||
'cpp':'C/C++', |
|||
'css':'CSS', |
|||
'cf':'ColdFusion', |
|||
'c#':'C#', |
|||
'delphi':'Delphi', |
|||
'diff':'Diff', |
|||
'erlang':'Erlang', |
|||
'groovy':'Groovy', |
|||
'html':'HTML', |
|||
'java':'Java', |
|||
'jfx':'JavaFX', |
|||
'js':'JavaScript', |
|||
'pl':'Perl', |
|||
'php':'PHP', |
|||
'plain':'Plain Text', |
|||
'ps':'PowerShell', |
|||
'python':'Python', |
|||
'ruby':'Ruby', |
|||
'scala':'Scala', |
|||
'sql':'SQL', |
|||
'vb':'Visual Basic', |
|||
'xml':'XML' |
|||
}, |
|||
'confirmClear':"确定清空当前文档么?", |
|||
'contextMenu':{ |
|||
'delete':"删除", |
|||
'selectall':"全选", |
|||
'deletecode':"删除代码", |
|||
'cleardoc':"清空文档", |
|||
'confirmclear':"确定清空当前文档么?", |
|||
'unlink':"删除超链接", |
|||
'paragraph':"段落格式", |
|||
'edittable':"表格属性", |
|||
'aligntd':"单元格对齐方式", |
|||
'aligntable':'表格对齐方式', |
|||
'tableleft':'左浮动', |
|||
'tablecenter':'居中显示', |
|||
'tableright':'右浮动', |
|||
'edittd':"单元格属性", |
|||
'setbordervisible':'设置表格边线可见', |
|||
'justifyleft':'左对齐', |
|||
'justifyright':'右对齐', |
|||
'justifycenter':'居中对齐', |
|||
'justifyjustify':'两端对齐', |
|||
'table':"表格", |
|||
'inserttable':'插入表格', |
|||
'deletetable':"删除表格", |
|||
'insertparagraphbefore':"前插入段落", |
|||
'insertparagraphafter':'后插入段落', |
|||
'deleterow':"删除当前行", |
|||
'deletecol':"删除当前列", |
|||
'insertrow':"前插入行", |
|||
'insertcol':"左插入列", |
|||
'insertrownext':'后插入行', |
|||
'insertcolnext':'右插入列', |
|||
'insertcaption':'插入表格名称', |
|||
'deletecaption':'删除表格名称', |
|||
'inserttitle':'插入表格标题行', |
|||
'deletetitle':'删除表格标题行', |
|||
'inserttitlecol':'插入表格标题列', |
|||
'deletetitlecol':'删除表格标题列', |
|||
'averageDiseRow':'平均分布各行', |
|||
'averageDisCol':'平均分布各列', |
|||
'mergeright':"向右合并", |
|||
'mergeleft':"向左合并", |
|||
'mergedown':"向下合并", |
|||
'mergecells':"合并单元格", |
|||
'splittocells':"完全拆分单元格", |
|||
'splittocols':"拆分成列", |
|||
'splittorows':"拆分成行", |
|||
'tablesort':'表格排序', |
|||
'enablesort':'设置表格可排序', |
|||
'disablesort':'取消表格可排序', |
|||
'reversecurrent':'逆序当前', |
|||
'orderbyasc':'按ASCII字符升序', |
|||
'reversebyasc':'按ASCII字符降序', |
|||
'orderbynum':'按数值大小升序', |
|||
'reversebynum':'按数值大小降序', |
|||
'borderbk':'边框底纹', |
|||
'setcolor':'表格隔行变色', |
|||
'unsetcolor':'取消表格隔行变色', |
|||
'setbackground':'选区背景隔行', |
|||
'unsetbackground':'取消选区背景', |
|||
'redandblue':'红蓝相间', |
|||
'threecolorgradient':'三色渐变', |
|||
'copy':"复制(Ctrl + c)", |
|||
'copymsg': "浏览器不支持,请使用 'Ctrl + c'", |
|||
'paste':"粘贴(Ctrl + v)", |
|||
'pastemsg': "浏览器不支持,请使用 'Ctrl + v'" |
|||
}, |
|||
'copymsg': "浏览器不支持,请使用 'Ctrl + c'", |
|||
'pastemsg': "浏览器不支持,请使用 'Ctrl + v'", |
|||
'anthorMsg':"链接", |
|||
'clearColor':'清空颜色', |
|||
'standardColor':'标准颜色', |
|||
'themeColor':'主题颜色', |
|||
'property':'属性', |
|||
'default':'默认', |
|||
'modify':'修改', |
|||
'justifyleft':'左对齐', |
|||
'justifyright':'右对齐', |
|||
'justifycenter':'居中', |
|||
'justify':'默认', |
|||
'clear':'清除', |
|||
'anchorMsg':'锚点', |
|||
'delete':'删除', |
|||
'clickToUpload':"点击上传", |
|||
'unset':'尚未设置语言文件', |
|||
't_row':'行', |
|||
't_col':'列', |
|||
'more':'更多', |
|||
'pasteOpt':'粘贴选项', |
|||
'pasteSourceFormat':"保留源格式", |
|||
'tagFormat':'只保留标签', |
|||
'pasteTextFormat':'只保留文本', |
|||
'autoTypeSet':{ |
|||
'mergeLine':"合并空行", |
|||
'delLine':"清除空行", |
|||
'removeFormat':"清除格式", |
|||
'indent':"首行缩进", |
|||
'alignment':"对齐方式", |
|||
'imageFloat':"图片浮动", |
|||
'removeFontsize':"清除字号", |
|||
'removeFontFamily':"清除字体", |
|||
'removeHtml':"清除冗余HTML代码", |
|||
'pasteFilter':"粘贴过滤", |
|||
'run':"执行", |
|||
'symbol':'符号转换', |
|||
'bdc2sb':'全角转半角', |
|||
'tobdc':'半角转全角' |
|||
}, |
|||
|
|||
'background':{ |
|||
'static':{ |
|||
'lang_background_normal':'背景设置', |
|||
'lang_background_local':'在线图片', |
|||
'lang_background_set':'选项', |
|||
'lang_background_none':'无背景色', |
|||
'lang_background_colored':'有背景色', |
|||
'lang_background_color':'颜色设置', |
|||
'lang_background_netimg':'网络图片', |
|||
'lang_background_align':'对齐方式', |
|||
'lang_background_position':'精确定位', |
|||
'repeatType':{'options':["居中", "横向重复", "纵向重复", "平铺","自定义"]} |
|||
|
|||
}, |
|||
'noUploadImage':"当前未上传过任何图片!", |
|||
'toggleSelect':"单击可切换选中状态\n原图尺寸: " |
|||
}, |
|||
//===============dialog i18N=======================
|
|||
'insertimage':{ |
|||
'static':{ |
|||
'lang_tab_remote':"插入图片", //节点
|
|||
'lang_tab_upload':"本地上传", |
|||
'lang_tab_online':"本地图片", |
|||
'lang_tab_search':"图片搜索", |
|||
'lang_input_url':"地 址:", |
|||
'lang_input_size':"大 小:", |
|||
'lang_input_width':"宽度", |
|||
'lang_input_height':"高度", |
|||
'lang_input_border':"边 框:", |
|||
'lang_input_vhspace':"边 距:", |
|||
'lang_input_title':"描 述:", |
|||
'lang_input_align':'图片浮动方式:', |
|||
'lang_imgLoading':" 图片加载中……", |
|||
'lang_start_upload':"开始上传", |
|||
'lock':{'title':"锁定宽高比例"}, //属性
|
|||
'searchType':{'title':"图片类型", 'options':["新闻", "壁纸", "表情", "头像"]}, //select的option
|
|||
'searchTxt':{'value':"请输入搜索关键词"}, |
|||
'searchBtn':{'value':"百度一下"}, |
|||
'searchReset':{'value':"清空搜索"}, |
|||
'noneAlign':{'title':'无浮动'}, |
|||
'leftAlign':{'title':'左浮动'}, |
|||
'rightAlign':{'title':'右浮动'}, |
|||
'centerAlign':{'title':'居中独占一行'} |
|||
}, |
|||
'uploadSelectFile':'点击选择图片', |
|||
'uploadAddFile':'继续添加', |
|||
'uploadStart':'开始上传', |
|||
'uploadPause':'暂停上传', |
|||
'uploadContinue':'继续上传', |
|||
'uploadRetry':'重试上传', |
|||
'uploadDelete':'删除', |
|||
'uploadTurnLeft':'向左旋转', |
|||
'uploadTurnRight':'向右旋转', |
|||
'uploadPreview':'预览中', |
|||
'uploadNoPreview':'不能预览', |
|||
'updateStatusReady': '选中_张图片,共_KB。', |
|||
'updateStatusConfirm': '已成功上传_张照片,_张照片上传失败', |
|||
'updateStatusFinish': '共_张(_KB),_张上传成功', |
|||
'updateStatusError': ',_张上传失败。', |
|||
'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', |
|||
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', |
|||
'errorExceedSize':'文件大小超出', |
|||
'errorFileType':'文件格式不允许', |
|||
'errorInterrupt':'文件传输中断', |
|||
'errorUploadRetry':'上传失败,请重试', |
|||
'errorHttp':'http请求错误', |
|||
'errorServerUpload':'服务器返回出错', |
|||
'remoteLockError':"宽高不正确,不能所定比例", |
|||
'numError':"请输入正确的长度或者宽度值!例如:123,400", |
|||
'imageUrlError':"不允许的图片格式或者图片域!", |
|||
'imageLoadError':"图片加载失败!请检查链接地址或网络状态!", |
|||
'searchRemind':"请输入搜索关键词", |
|||
'searchLoading':"图片加载中,请稍后……", |
|||
'searchRetry':" :( ,抱歉,没有找到图片!请重试一次!" |
|||
}, |
|||
'attachment':{ |
|||
'static':{ |
|||
'lang_tab_upload': '上传附件', |
|||
'lang_tab_online': '在线附件', |
|||
'lang_start_upload':"开始上传", |
|||
'lang_drop_remind':"可以将文件拖到这里,单次最多可选100个文件" |
|||
}, |
|||
'uploadSelectFile':'点击选择文件', |
|||
'uploadAddFile':'继续添加', |
|||
'uploadStart':'开始上传', |
|||
'uploadPause':'暂停上传', |
|||
'uploadContinue':'继续上传', |
|||
'uploadRetry':'重试上传', |
|||
'uploadDelete':'删除', |
|||
'uploadTurnLeft':'向左旋转', |
|||
'uploadTurnRight':'向右旋转', |
|||
'uploadPreview':'预览中', |
|||
'updateStatusReady': '选中_个文件,共_KB。', |
|||
'updateStatusConfirm': '已成功上传_个文件,_个文件上传失败', |
|||
'updateStatusFinish': '共_个(_KB),_个上传成功', |
|||
'updateStatusError': ',_张上传失败。', |
|||
'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', |
|||
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', |
|||
'errorExceedSize':'文件大小超出', |
|||
'errorFileType':'文件格式不允许', |
|||
'errorInterrupt':'文件传输中断', |
|||
'errorUploadRetry':'上传失败,请重试', |
|||
'errorHttp':'http请求错误', |
|||
'errorServerUpload':'服务器返回出错' |
|||
}, |
|||
'insertvideo':{ |
|||
'static':{ |
|||
'lang_tab_insertV':"插入视频", |
|||
'lang_tab_searchV':"搜索视频", |
|||
'lang_tab_uploadV':"上传视频", |
|||
'lang_video_url':"视频网址", |
|||
'lang_video_size':"视频尺寸", |
|||
'lang_videoW':"宽度", |
|||
'lang_videoH':"高度", |
|||
'lang_alignment':"对齐方式", |
|||
'videoSearchTxt':{'value':"请输入搜索关键字!"}, |
|||
'videoType':{'options':["全部", "热门", "娱乐", "搞笑", "体育", "科技", "综艺"]}, |
|||
'videoSearchBtn':{'value':"百度一下"}, |
|||
'videoSearchReset':{'value':"清空结果"}, |
|||
|
|||
'lang_input_fileStatus':' 当前未上传文件', |
|||
'startUpload':{'style':"background:url(upload.png) no-repeat;"}, |
|||
|
|||
'lang_upload_size':"视频尺寸", |
|||
'lang_upload_width':"宽度", |
|||
'lang_upload_height':"高度", |
|||
'lang_upload_alignment':"对齐方式", |
|||
'lang_format_advice':"建议使用mp4格式." |
|||
|
|||
}, |
|||
'numError':"请输入正确的数值,如123,400", |
|||
'floatLeft':"左浮动", |
|||
'floatRight':"右浮动", |
|||
'"default"':"默认", |
|||
'block':"独占一行", |
|||
'urlError':"输入的视频地址有误,请检查后再试!", |
|||
'loading':" 视频加载中,请等待……", |
|||
'clickToSelect':"点击选中", |
|||
'goToSource':'访问源视频', |
|||
'noVideo':" 抱歉,找不到对应的视频,请重试!", |
|||
|
|||
'browseFiles':'浏览文件', |
|||
'uploadSuccess':'上传成功!', |
|||
'delSuccessFile':'从成功队列中移除', |
|||
'delFailSaveFile':'移除保存失败文件', |
|||
'statusPrompt':' 个文件已上传! ', |
|||
'flashVersionError':'当前Flash版本过低,请更新FlashPlayer后重试!', |
|||
'flashLoadingError':'Flash加载失败!请检查路径或网络状态', |
|||
'fileUploadReady':'等待上传……', |
|||
'delUploadQueue':'从上传队列中移除', |
|||
'limitPrompt1':'单次不能选择超过', |
|||
'limitPrompt2':'个文件!请重新选择!', |
|||
'delFailFile':'移除失败文件', |
|||
'fileSizeLimit':'文件大小超出限制!', |
|||
'emptyFile':'空文件无法上传!', |
|||
'fileTypeError':'文件类型不允许!', |
|||
'unknownError':'未知错误!', |
|||
'fileUploading':'上传中,请等待……', |
|||
'cancelUpload':'取消上传', |
|||
'netError':'网络错误', |
|||
'failUpload':'上传失败!', |
|||
'serverIOError':'服务器IO错误!', |
|||
'noAuthority':'无权限!', |
|||
'fileNumLimit':'上传个数限制', |
|||
'failCheck':'验证失败,本次上传被跳过!', |
|||
'fileCanceling':'取消中,请等待……', |
|||
'stopUploading':'上传已停止……', |
|||
|
|||
'uploadSelectFile':'点击选择文件', |
|||
'uploadAddFile':'继续添加', |
|||
'uploadStart':'开始上传', |
|||
'uploadPause':'暂停上传', |
|||
'uploadContinue':'继续上传', |
|||
'uploadRetry':'重试上传', |
|||
'uploadDelete':'删除', |
|||
'uploadTurnLeft':'向左旋转', |
|||
'uploadTurnRight':'向右旋转', |
|||
'uploadPreview':'预览中', |
|||
'updateStatusReady': '选中_个文件,共_KB。', |
|||
'updateStatusConfirm': '成功上传_个,_个失败', |
|||
'updateStatusFinish': '共_个(_KB),_个成功上传', |
|||
'updateStatusError': ',_张上传失败。', |
|||
'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', |
|||
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', |
|||
'errorExceedSize':'文件大小超出', |
|||
'errorFileType':'文件格式不允许', |
|||
'errorInterrupt':'文件传输中断', |
|||
'errorUploadRetry':'上传失败,请重试', |
|||
'errorHttp':'http请求错误', |
|||
'errorServerUpload':'服务器返回出错' |
|||
}, |
|||
'webapp':{ |
|||
'tip1':"本功能由百度APP提供,如看到此页面,请各位站长首先申请百度APPKey!", |
|||
'tip2':"申请完成之后请至ueditor.config.js中配置获得的appkey! ", |
|||
'applyFor':"点此申请", |
|||
'anthorApi':"百度API" |
|||
}, |
|||
'template':{ |
|||
'static':{ |
|||
'lang_template_bkcolor':'背景颜色', |
|||
'lang_template_clear' : '保留原有内容', |
|||
'lang_template_select' : '选择模板' |
|||
}, |
|||
'blank':"空白文档", |
|||
'blog':"博客文章", |
|||
'resume':"个人简历", |
|||
'richText':"图文混排", |
|||
'sciPapers':"科技论文" |
|||
|
|||
|
|||
}, |
|||
'scrawl':{ |
|||
'static':{ |
|||
'lang_input_previousStep':"上一步", |
|||
'lang_input_nextsStep':"下一步", |
|||
'lang_input_clear':'清空', |
|||
'lang_input_addPic':'添加背景', |
|||
'lang_input_ScalePic':'缩放背景', |
|||
'lang_input_removePic':'删除背景', |
|||
'J_imgTxt':{title:'添加背景图片'} |
|||
}, |
|||
'noScarwl':"尚未作画,白纸一张~", |
|||
'scrawlUpLoading':"涂鸦上传中,别急哦~", |
|||
'continueBtn':"继续", |
|||
'imageError':"糟糕,图片读取失败了!", |
|||
'backgroundUploading':'背景图片上传中,别急哦~' |
|||
}, |
|||
'music':{ |
|||
'static':{ |
|||
'lang_input_tips':"输入歌手/歌曲/专辑,搜索您感兴趣的音乐!", |
|||
'J_searchBtn':{value:'搜索歌曲'} |
|||
}, |
|||
'emptyTxt':'未搜索到相关音乐结果,请换一个关键词试试。', |
|||
'chapter':'歌曲', |
|||
'singer':'歌手', |
|||
'special':'专辑', |
|||
'listenTest':'试听' |
|||
}, |
|||
'anchor':{ |
|||
'static':{ |
|||
'lang_input_anchorName':'锚点名字:' |
|||
} |
|||
}, |
|||
'charts':{ |
|||
'static':{ |
|||
'lang_data_source':'数据源:', |
|||
'lang_chart_format': '图表格式:', |
|||
'lang_data_align': '数据对齐方式', |
|||
'lang_chart_align_same': '数据源与图表X轴Y轴一致', |
|||
'lang_chart_align_reverse': '数据源与图表X轴Y轴相反', |
|||
'lang_chart_title': '图表标题', |
|||
'lang_chart_main_title': '主标题:', |
|||
'lang_chart_sub_title': '子标题:', |
|||
'lang_chart_x_title': 'X轴标题:', |
|||
'lang_chart_y_title': 'Y轴标题:', |
|||
'lang_chart_tip': '提示文字', |
|||
'lang_cahrt_tip_prefix': '提示文字前缀:', |
|||
'lang_cahrt_tip_description': '仅饼图有效, 当鼠标移动到饼图中相应的块上时,提示框内的文字的前缀', |
|||
'lang_chart_data_unit': '数据单位', |
|||
'lang_chart_data_unit_title': '单位:', |
|||
'lang_chart_data_unit_description': '显示在每个数据点上的数据的单位, 比如: 温度的单位 ℃', |
|||
'lang_chart_type': '图表类型:', |
|||
'lang_prev_btn': '上一个', |
|||
'lang_next_btn': '下一个' |
|||
} |
|||
}, |
|||
'emotion':{ |
|||
'static':{ |
|||
'lang_input_choice':'精选', |
|||
'lang_input_Tuzki':'兔斯基', |
|||
'lang_input_BOBO':'BOBO', |
|||
'lang_input_lvdouwa':'绿豆蛙', |
|||
'lang_input_babyCat':'baby猫', |
|||
'lang_input_bubble':'泡泡', |
|||
'lang_input_youa':'有啊' |
|||
} |
|||
}, |
|||
'gmap':{ |
|||
'static':{ |
|||
'lang_input_address':'地址', |
|||
'lang_input_search':'搜索', |
|||
'address':{value:"北京"} |
|||
}, |
|||
searchError:'无法定位到该地址!' |
|||
}, |
|||
'help':{ |
|||
'static':{ |
|||
'lang_input_about':'关于UEditor', |
|||
'lang_input_shortcuts':'快捷键', |
|||
'lang_input_introduction':'UEditor是由百度web前端研发部开发的所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点。开源基于BSD协议,允许自由使用和修改代码。', |
|||
'lang_Txt_shortcuts':'快捷键', |
|||
'lang_Txt_func':'功能', |
|||
'lang_Txt_bold':'给选中字设置为加粗', |
|||
'lang_Txt_copy':'复制选中内容', |
|||
'lang_Txt_cut':'剪切选中内容', |
|||
'lang_Txt_Paste':'粘贴', |
|||
'lang_Txt_undo':'重新执行上次操作', |
|||
'lang_Txt_redo':'撤销上一次操作', |
|||
'lang_Txt_italic':'给选中字设置为斜体', |
|||
'lang_Txt_underline':'给选中字加下划线', |
|||
'lang_Txt_selectAll':'全部选中', |
|||
'lang_Txt_visualEnter':'软回车', |
|||
'lang_Txt_fullscreen':'全屏' |
|||
} |
|||
}, |
|||
'insertframe':{ |
|||
'static':{ |
|||
'lang_input_address':'地址:', |
|||
'lang_input_width':'宽度:', |
|||
'lang_input_height':'高度:', |
|||
'lang_input_isScroll':'允许滚动条:', |
|||
'lang_input_frameborder':'显示框架边框:', |
|||
'lang_input_alignMode':'对齐方式:', |
|||
'align':{title:"对齐方式", options:["默认", "左对齐", "右对齐", "居中"]} |
|||
}, |
|||
'enterAddress':'请输入地址!' |
|||
}, |
|||
'link':{ |
|||
'static':{ |
|||
'lang_input_text':'文本内容:', |
|||
'lang_input_url':'链接地址:', |
|||
'lang_input_title':'标题:', |
|||
'lang_input_target':'是否在新窗口打开:' |
|||
}, |
|||
'validLink':'只支持选中一个链接时生效', |
|||
'httpPrompt':'您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀' |
|||
}, |
|||
'map':{ |
|||
'static':{ |
|||
lang_city:"城市", |
|||
lang_address:"地址", |
|||
city:{value:"北京"}, |
|||
lang_search:"搜索", |
|||
lang_dynamicmap:"插入动态地图" |
|||
}, |
|||
cityMsg:"请选择城市", |
|||
errorMsg:"抱歉,找不到该位置!" |
|||
}, |
|||
'searchreplace':{ |
|||
'static':{ |
|||
lang_tab_search:"查找", |
|||
lang_tab_replace:"替换", |
|||
lang_search1:"查找", |
|||
lang_search2:"查找", |
|||
lang_replace:"替换", |
|||
lang_searchReg:'支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”', |
|||
lang_searchReg1:'支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”', |
|||
lang_case_sensitive1:"区分大小写", |
|||
lang_case_sensitive2:"区分大小写", |
|||
nextFindBtn:{value:"下一个"}, |
|||
preFindBtn:{value:"上一个"}, |
|||
nextReplaceBtn:{value:"下一个"}, |
|||
preReplaceBtn:{value:"上一个"}, |
|||
repalceBtn:{value:"替换"}, |
|||
repalceAllBtn:{value:"全部替换"} |
|||
}, |
|||
getEnd:"已经搜索到文章末尾!", |
|||
getStart:"已经搜索到文章头部", |
|||
countMsg:"总共替换了{#count}处!" |
|||
}, |
|||
'snapscreen':{ |
|||
'static':{ |
|||
lang_showMsg:"截图功能需要首先安装UEditor截图插件! ", |
|||
lang_download:"点此下载", |
|||
lang_step1:"第一步,下载UEditor截图插件并运行安装。", |
|||
lang_step2:"第二步,插件安装完成后即可使用,如不生效,请重启浏览器后再试!" |
|||
} |
|||
}, |
|||
'spechars':{ |
|||
'static':{}, |
|||
tsfh:"特殊字符", |
|||
lmsz:"罗马字符", |
|||
szfh:"数学字符", |
|||
rwfh:"日文字符", |
|||
xlzm:"希腊字母", |
|||
ewzm:"俄文字符", |
|||
pyzm:"拼音字母", |
|||
yyyb:"英语音标", |
|||
zyzf:"其他" |
|||
}, |
|||
'edittable':{ |
|||
'static':{ |
|||
'lang_tableStyle':'表格样式', |
|||
'lang_insertCaption':'添加表格名称行', |
|||
'lang_insertTitle':'添加表格标题行', |
|||
'lang_insertTitleCol':'添加表格标题列', |
|||
'lang_orderbycontent':"使表格内容可排序", |
|||
'lang_tableSize':'自动调整表格尺寸', |
|||
'lang_autoSizeContent':'按表格文字自适应', |
|||
'lang_autoSizePage':'按页面宽度自适应', |
|||
'lang_example':'示例', |
|||
'lang_borderStyle':'表格边框', |
|||
'lang_color':'颜色:' |
|||
}, |
|||
captionName:'表格名称', |
|||
titleName:'标题', |
|||
cellsName:'内容', |
|||
errorMsg:'有合并单元格,不可排序' |
|||
}, |
|||
'edittip':{ |
|||
'static':{ |
|||
lang_delRow:'删除整行', |
|||
lang_delCol:'删除整列' |
|||
} |
|||
}, |
|||
'edittd':{ |
|||
'static':{ |
|||
lang_tdBkColor:'背景颜色:' |
|||
} |
|||
}, |
|||
'formula':{ |
|||
'static':{ |
|||
} |
|||
}, |
|||
'wordimage':{ |
|||
'static':{ |
|||
lang_resave:"转存步骤", |
|||
uploadBtn:{src:"upload.png",alt:"上传"}, |
|||
clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"}, |
|||
lang_step:"1、点击顶部复制按钮,将地址复制到剪贴板;2、点击添加照片按钮,在弹出的对话框中使用Ctrl+V粘贴地址;3、点击打开后选择图片上传流程。" |
|||
}, |
|||
'fileType':"图片", |
|||
'flashError':"FLASH初始化失败,请检查FLASH插件是否正确安装!", |
|||
'netError':"网络连接错误,请重试!", |
|||
'copySuccess':"图片地址已经复制!", |
|||
'flashI18n':{} //留空默认中文
|
|||
}, |
|||
'autosave': { |
|||
'saving':'保存中...', |
|||
'success':'本地保存成功' |
|||
} |
|||
}; |
|||