file:///opencv filestoragee/emulated/0/Download/56c2cceb375594441.jpg!thumb320

项目语言:PHP
权限:read-only(如需更高权限请先加入项目)
Index: link/link.html
===================================================================
--- link/link.html (revision 0)
+++ link/link.html (revision 3)
@@ -0,0 +1,126 @@
+&!DOCTYPE HTML PUBLIC &-//W3C//DTD HTML 4.01 Transitional//EN&
&http://www.w3.org/TR/html4/loose.dtd&&
&title&&/title&
&meta http-equiv=&Content-Type& content=&text/charset=utf-8&/&
&script type=&text/javascript& src=&../internal.js&&&/script&
&style type=&text/css&&
*{margin:0;padding:0;color: #838383;}
table{font-size: 12margin: 10line-height: 30px}
.txt{width:300height:21line-height:21border:1px solid #d7d7d7;}
&td&&label for=&text&& &var id=&lang_input_text&&&/var&&/label&&/td&
&td&&input class=&txt& id=&text& type=&text& disabled=&true&/&&/td&
&td&&label for=&href&& &var id=&lang_input_url&&&/var&&/label&&/td&
&td&&input class=&txt& id=&href& type=&text& /&&/td&
&td&&label for=&title&& &var id=&lang_input_title&&&/var&&/label&&/td&
&td&&input class=&txt& id=&title& type=&text&/&&/td&
&td colspan=&2&&
&label for=&target&&&var id=&lang_input_target&&&/var&&/label&
&input id=&target& type=&checkbox&/&
&td colspan=&2& id=&msg&&&/td&
+&script type=&text/javascript&&
var range = editor.selection.getRange(),
link = range.collapsed ? editor.queryCommandValue( &link& ) : editor.selection.getStart(),
text = $G('text'),
rangeLink = domUtils.findParentByTagName(range.getCommonAncestor(),'a',true),
link = domUtils.findParentByTagName( link, &a&, true );
url = utils.html(link.getAttribute( '_href' ) || link.getAttribute( 'href', 2 ));
if(rangeLink === link && !link.getElementsByTagName('img').length){
text.removeAttribute('disabled');
orgText = text.value = link[browser.ie ? 'innerText':'textContent'];
text.setAttribute('disabled','true');
text.value = lang.validL
if(range.collapsed){
text.removeAttribute('disabled');
text.value = '';
text.setAttribute('disabled','true');
text.value = lang.validL
$G(&title&).value = url ? link.title : &&;
$G(&href&).value = url ? url: '';
$G(&target&).checked = url && link.target == &_blank& ? true :
$focus($G(&href&));
function handleDialogOk(){
var href =$G('href').value.replace(/^\s+|\s+$/g, '');
if(!hrefStartWith(href,[&http&,&/&,&ftp://&,'#'])) {
= &http://& +
var obj = {
'href' : href,
'target' : $G(&target&).checked ? &_blank& : '_self',
'title' : $G(&title&).value.replace(/^\s+|\s+$/g, ''),
'_href':href
//修改链接内容的情况太特殊了,所以先做到这里了
//todo:情况多的时候,做到command里
if(orgText && text.value != orgText){
link[browser.ie ? 'innerText' : 'textContent'] =
obj.textValue = text.
range.selectNode(link).select()
if(range.collapsed){
obj.textValue = text.
editor.execCommand('link',utils.clearEmptyAttrs(obj) );
dialog.close();
dialog.onok = handleDialogOk;
$G('href').onkeydown = $G('title').onkeydown = function(evt){
evt = evt || window.
if (evt.keyCode == 13) {
handleDialogOk();
$G('href').onblur = function(){
if(!hrefStartWith(this.value,[&http&,&/&,&ftp://&,'#'])){
$G(&msg&).innerHTML = &&span style='color: red'&&+lang.httpPrompt+&&/span&&;
$G(&msg&).innerHTML = &&;
function hrefStartWith(href,arr){
href = href.replace(/^\s+|\s+$/g, '');
for(var i=0,ai=arr[i++];){
if(href.indexOf(ai)==0){
+&/script&
Index: searchreplace/searchreplace.html
===================================================================
--- searchreplace/searchreplace.html (revision 0)
+++ searchreplace/searchreplace.html (revision 3)
@@ -0,0 +1,102 @@
+&!DOCTYPE HTML PUBLIC &-//W3C//DTD HTML 4.01 Transitional//EN&
&http://www.w3.org/TR/html4/loose.dtd&&
&title&&/title&
&meta content=&text/ charset=utf-8& http-equiv=&Content-Type&/&
&script type=&text/javascript& src=&../internal.js&&&/script&
&style type=&text/css&&
.warpper{ position:width: 380 height: 100%; margin: 10}
.tabbody{height: 160}
.tabbody table{width:100%;border-collapse:border-spacing: 3}
.tabbody .panel{width:373height:100%;padding-left: 5position:background-color: #}
.tabbody input.int{ width:190height:21border:1px solid #d7d7d7;line-height:21}
.tabbody input.btn{padding: 0 5 text-align:line-height:24 text-decoration:height:24background:url(&../../themes/default/images/dialog-title-bg.png&) repeat-x;border:1px solid # }
+&div class=&warpper& id=&searchtab&&
&div id=&head& class=&tabhead&&
tabsrc=&find& class=&focus&&&var id=&lang_tab_search&&&/var&&/span&
tabsrc=&replace& &&var id=&lang_tab_replace&&&/var&&/span&
&div class=&tabbody&&
&div class=&panel& id=&find&&
&td width=&80&&&var id=&lang_search1&&&/var&: &/td&
&td&&input id=&findtxt& type=&text& class=&int& /&&/td&
&!--&tr&--&
&!--&td colspan=&2&&&span style=&color:red&&&var id=&lang_searchReg&&&/var&&/span&&/td&--&
&!--&/tr&--&
&td&&var id=&lang_case_sensitive1&&&/var&&/td&
&input id=&matchCase& type=&checkbox& /&
&td colspan=&2&&
&input id=&nextFindBtn& type=&button& class=&btn& /&
&input id=&preFindBtn& type=&button& class=&btn& /&
&td colspan=&2&&
&td colspan=&2&&
&span id=&search-msg& style=&color:red&&&/span&
&div class=&panel& id=&replace&&
&td width=&80&&&var id=&lang_search2&&&/var&: &/td&
&td&&input id=&findtxt1& type=&text& class=&int&
&!--&tr&--&
&!--&td colspan=&2&&&span style=&color:red&&&var id=&lang_searchReg1&&&/var&&/span&&/td&--&
&!--&/tr&--&
&td&&var id=&lang_replace&&&/var&: &/td&
&td&&input id=&replacetxt& type=&text& class=&int& /&&/td&
&td&&var id=&lang_case_sensitive2&&&/var&&/td&
&input id=&matchCase1& type=&checkbox& /&
&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 colspan=&2&&
&td colspan=&2&&
&span id=&replace-msg& style=&color:red&&&/span&
+&script type=&text/javascript& src=&searchreplace.js&&&/script&
\ No newline at end of file
Index: searchreplace/searchreplace.js
===================================================================
--- searchreplace/searchreplace.js (revision 0)
+++ searchreplace/searchreplace.js (revision 3)
@@ -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 =
+//给tab注册切换事件
+ * tab点击处理事件
+ * @param tabHeads
+ * @param tabBodys
+ * @param obj
+function clickHandler( tabHeads,tabBodys,obj ) {
//head样式更改
for ( var k = 0, len = tabHeads. k & k++ ) {
tabHeads[k].className = &&;
obj.className = &focus&;
//body显隐
var tabSrc = obj.getAttribute( &tabSrc& );
for ( var j = 0, length = tabBodys. j & j++ ) {
var body = tabBodys[j],
id = body.getAttribute( &id& );
if ( id != tabSrc ) {
body.style.zIndex = 1;
body.style.zIndex = 200;
+ * TAB切换
+ * @param tabParentId
tab的父节点ID或者对象本身
+function switchTab( tabParentId ) {
var tabElements = $G( tabParentId ).children,
tabHeads = tabElements[0].children,
tabBodys = tabElements[1].
for ( var i = 0, length = tabHeads. i & 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 :
+$G(&nextFindBtn&).onclick = function (txt, dir, mcase) {
var findtxt = $G(&findtxt&).value,
if (!findtxt) {
searchStr:findtxt,
casesensitive:getMatchCase(&matchCase&)
if (!frCommond(obj)) {
var bk = editor.selection.getRange().createBookmark();
$G('search-msg').innerHTML = lang.getE
editor.selection.getRange().moveToBookmark(bk).select();
+$G(&nextReplaceBtn&).onclick = function (txt, dir, mcase) {
var findtxt = $G(&findtxt1&).value,
if (!findtxt) {
searchStr:findtxt,
casesensitive:getMatchCase(&matchCase1&)
frCommond(obj);
+$G(&preFindBtn&).onclick = function (txt, dir, mcase) {
var findtxt = $G(&findtxt&).value,
if (!findtxt) {
searchStr:findtxt,
casesensitive:getMatchCase(&matchCase&)
if (!frCommond(obj)) {
$G('search-msg').innerHTML = lang.getS
+$G(&preReplaceBtn&).onclick = function (txt, dir, mcase) {
var findtxt = $G(&findtxt1&).value,
if (!findtxt) {
searchStr:findtxt,
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) {
if (findtxt == replacetxt || (!getMatchCase(&matchCase1&) && findtxt.toLowerCase() == replacetxt.toLowerCase())) {
searchStr:findtxt,
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) {
if (findtxt == replacetxt || (!getMatchCase(&matchCase1&) && findtxt.toLowerCase() == replacetxt.toLowerCase())) {
searchStr:findtxt,
casesensitive:getMatchCase(&matchCase1&),
replaceStr:replacetxt,
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&);
\ No newline at end of file
Index: snapscreen/snapscreen.html
===================================================================
--- snapscreen/snapscreen.html (revision 0)
+++ snapscreen/snapscreen.html (revision 3)
@@ -0,0 +1,58 @@
+&!DOCTYPE HTML&
&meta http-equiv=&Content-Type& content=&text/ charset=utf-8&/&
&title&&/title&
&script type=&text/javascript& src=&../internal.js&&&/script&
&style type=&text/css&&
*{color: #838383}
html,body {
font-size: 12
width:100%;
height:100%;
h2 { font-size: 16 margin: 20}
padding:5px 15px 0 15
height:100%;
dt,dd { margin-left: 0; padding-left: 0;}
dt a { display:
height: 30
line-height: 30
background: #EFEFEF;
border: 1px solid #CCC;
padding: 0 10
text-decoration:
dt a:hover{
background: #e0e0e0;
border-color: #999
dt a:active{
background: #
border-color: #999;
color: #666;
dd { line-height:20margin-top: 10}
span{ padding-right:4}
input{width:210height:21background: #FFF;border:1px solid #d7d7d7;padding: 0 margin: 0 }
&div class=&content&&
&h2&&var id=&lang_showMsg&&&/var&&/h2&
&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&
\ No newline at end of file
Index: video/images/progress.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/progress.png
===================================================================
--- video/images/progress.png (revision 0)
+++ video/images/progress.png (revision 3)
Property changes on: video/images/progress.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/left_focus.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/left_focus.jpg
===================================================================
--- video/images/left_focus.jpg (revision 0)
+++ video/images/left_focus.jpg (revision 3)
Property changes on: video/images/left_focus.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/bg.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/bg.png
===================================================================
--- video/images/bg.png (revision 0)
+++ video/images/bg.png (revision 3)
Property changes on: video/images/bg.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/file-icons.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/file-icons.png
===================================================================
--- video/images/file-icons.png (revision 0)
+++ video/images/file-icons.png (revision 3)
Property changes on: video/images/file-icons.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/right_focus.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/right_focus.jpg
===================================================================
--- video/images/right_focus.jpg (revision 0)
+++ video/images/right_focus.jpg (revision 3)
Property changes on: video/images/right_focus.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/success.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/success.png
===================================================================
--- video/images/success.png (revision 0)
+++ video/images/success.png (revision 3)
Property changes on: video/images/success.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/file-icons.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/file-icons.gif
===================================================================
--- video/images/file-icons.gif (revision 0)
+++ video/images/file-icons.gif (revision 3)
Property changes on: video/images/file-icons.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/success.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/success.gif
===================================================================
--- video/images/success.gif (revision 0)
+++ video/images/success.gif (revision 3)
Property changes on: video/images/success.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/none_focus.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/none_focus.jpg
===================================================================
--- video/images/none_focus.jpg (revision 0)
+++ video/images/none_focus.jpg (revision 3)
Property changes on: video/images/none_focus.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/center_focus.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/center_focus.jpg
===================================================================
--- video/images/center_focus.jpg (revision 0)
+++ video/images/center_focus.jpg (revision 3)
Property changes on: video/images/center_focus.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/icons.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/icons.png
===================================================================
--- video/images/icons.png (revision 0)
+++ video/images/icons.png (revision 3)
Property changes on: video/images/icons.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/icons.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/icons.gif
===================================================================
--- video/images/icons.gif (revision 0)
+++ video/images/icons.gif (revision 3)
Property changes on: video/images/icons.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/images/image.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: video/images/image.png
===================================================================
--- video/images/image.png (revision 0)
+++ video/images/image.png (revision 3)
Property changes on: video/images/image.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: video/video.html
===================================================================
--- video/video.html (revision 0)
+++ video/video.html (revision 3)
@@ -0,0 +1,86 @@
+&!DOCTYPE HTML PUBLIC &-//W3C//DTD HTML 4.01 Transitional//EN&
&http://www.w3.org/TR/html4/loose.dtd&&
&title&&/title&
&meta http-equiv=&Content-Type& content=&text/charset=utf-8&/&
&script type=&text/javascript& src=&../internal.js&&&/script&
&link rel=&stylesheet& type=&text/css& href=&video.css& /&
+&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 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&
&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&
&/fieldset&
&fieldset&
&legend&&var id=&lang_alignment&&&/var&&/legend&
&div id=&videoFloat&&&/div&
&/fieldset&
&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 id=&dndArea& class=&placeholder&&
&div class=&filePickerContainer&&
&div id=&filePickerReady&&&/div&
&ul class=&filelist element-invisible&&
&li id=&filePickerBlock& class=&filePickerBlock&&&/li&
&div id=&uploadVideoInfo&&
&fieldset&
&legend&&var id=&lang_upload_size&&&/var&&/legend&
&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&
&/fieldset&
&fieldset&
&legend&&var id=&lang_upload_alignment&&&/var&&/legend&
&div id=&upload_alignment&&&/div&
&/fieldset&
+&!-- 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&
\ No newline at end of file
Index: video/video.css
===================================================================
--- video/video.css (revision 0)
+++ video/video.css (revision 3)
@@ -0,0 +1,635 @@
+@charset &utf-8&;
+.wrapper{ width: 570_width:575margin: 10 zoom:1;position: relative}
+.tabbody{height: 335}
+.tabbody .panel {
height: 0;
background: #
+.tabbody .panel.focus {
width: 100%;
height: 335
+.tabbody .panel table td{vertical-align:}
+#videoUrl {
width: 490
height: 21
line-height: 21
margin: 8px 5
background: #FFF;
border: 1px solid #d7d7d7;
+#videoSearchTxt{margin-left:15background: #FFF;width:200height:21line-height:21border: 1px solid #d7d7d7;}
+#searchList{width: 570overflow:zoom:1;height: 270}
+#searchList div{float:width: 120height: 135margin: 5px 15}
+#searchList img{margin: 2px 8cursor:border: 2px solid #fff} /*不用缩略图*/
+#searchList p{margin-left: 10}
+#videoType{
height: 23
line-height: 22
border: 1px solid #d7d7d7;
+#videoSearchBtn,#videoSearchReset{
/*width: 80*/
height: 25
line-height: 25
background: #
border: 1px solid #d7d7d7;
padding: 0 5
+#preview{position:width: 420padding:0;overflow: margin-left: 10 _margin-left:5 height: 280background-color: #float: left}
+#preview .previewMsg {position:top:0;margin:0;padding:0;height:280width:100%;background-color: #666;}
+#preview .previewMsg span{display:margin: 125px auto 0text-align:font-size:18color:#}
+#preview .previewVideo {position:top:0;margin:0;padding:0;height:280width:100%;}
+.edui-video-wrapper fieldset{
border: 1px solid #
padding-left: 5
margin-bottom: 20
padding-bottom: 5
width: 115
+#videoInfo {width: 120float:margin-left: 10_margin-left:7}
+fieldset{
border: 1px solid #
padding-left: 5
margin-bottom: 20
padding-bottom: 5
width: 115
+fieldset legend{font-weight:}
+fieldset p{line-height: 30}
+fieldset input.txt{
height: 21
line-height: 21
margin: 8px 5
background: #FFF;
border: 1px solid #d7d7d7;
+label.url{font-weight:margin-left: 5color: #06c;}
+#videoFloat div{cursor:opacity: 0.5;filter: alpha(opacity = 50);margin:9_margin:5width:38height:36float:}
+#videoFloat .focus{opacity: 1;filter: alpha(opacity = 100)}
+span.view{display: inline-width: 30float:cursor:color: blue}
+/* upload video */
+.tabbody #upload.panel {
height: 0;
position: absolute !
clip: rect(1px, 1px, 1px, 1px);
background: #
+.tabbody #upload.panel.focus {
width: 100%;
height: 335
+#upload_alignment div{cursor:opacity: 0.5;filter: alpha(opacity = 50);margin:9_margin:5width:38height:36float:}
+#upload_alignment .focus{opacity: 1;filter: alpha(opacity = 100)}
+#upload_left { width:427 float: }
+#upload_left .controller { height: 30 clear: }
+#uploadVideoInfo{margin-top:10float:padding-right:8}
+#upload .queueList {
margin: 0;
+#upload p {
margin: 0;
+.element-invisible {
width: 0 !
height: 0 !
border: 0;
padding: 0;
margin: 0;
position: absolute !
clip: rect(1px, 1px, 1px, 1px);
+#upload .placeholder {
margin: 10
margin-right:0;
border: 2px dashed #e6e6e6;
*border: 0px dashed #e6e6e6;
height: 161
padding-top: 150
text-align:
width: 97%;
background: url(./images/image.png) center 70px no-
font-size: 18
*margin-left: 0;
+#upload .placeholder .webuploader-pick {
font-size: 18
background: #00b7
border-radius: 3
line-height: 44
padding: 0 30
*width: 120
display: inline-
margin: 0 auto 20
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+#upload .placeholder .webuploader-pick-hover {
background: #00a2d4;
+#filePickerContainer {
text-align:
+#upload .placeholder .flashTip {
color: #666666;
font-size: 12
width: 100%;
text-align:
bottom: 20
+#upload .placeholder .flashTip a {
color: #0785d1;
text-decoration:
+#upload .placeholder .flashTip a:hover {
text-decoration:
+#upload .placeholder.webuploader-dnd-over {
border-color: #999999;
+#upload .filelist {
list-style:
margin: 0;
padding: 0;
overflow-x:
overflow-y:
height: 285
+#upload .filelist:after {
content: '';
height: 0;
+#upload .filelist li {
width: 113
height: 113
background: url(./images/bg.png);
text-align:
margin: 15px 0 0 20
*margin: 15px 0 0 15
font-size: 12
+#upload .filelist li p.log {
+#upload .filelist li p.title {
width: 100%;
white-space:
text-overflow:
text-indent: 5
text-align:
+#upload .filelist li p.progress {
width: 100%;
bottom: 0;
z-index: 50;
margin: 0;
border-radius: 0;
background:
-webkit-box-shadow: 0 0 0;
+#upload .filelist li p.progress span {
height: 100%;
background: #1483d8 url(./images/progress.png) repeat-x;
-webit-transition: width 200
-moz-transition: width 200
-o-transition: width 200
-ms-transition: width 200
transition: width 200
-webkit-animation: progressmove 2
-moz-animation: progressmove 2
-o-animation: progressmove 2
-ms-animation: progressmove 2
animation: progressmove 2
-webkit-transform: translateZ(0);
+@-webkit-keyframes progressmove {
background-position: 0 0;
background-position: 17px 0;
+@-moz-keyframes progressmove {
background-position: 0 0;
background-position: 17px 0;
+@keyframes progressmove {
background-position: 0 0;
background-position: 17px 0;
+#upload .filelist li p.imgWrap {
z-index: 2;
line-height: 113
vertical-align:
width: 113
height: 113
-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-
-moz-transition: 200ms ease-
-o-transition: 200ms ease-
-ms-transition: 200ms ease-
transition: 200ms ease-
+#upload .filelist li p.imgWrap.notimage {
margin-top: 0;
width: 111
height: 111
border: 1px #
+#upload .filelist li p.imgWrap.notimage i.file-preview {
margin-top: 15
+#upload .filelist li img {
width: 100%;
+#upload .filelist li p.error {
background: #f43838;
bottom: 0;
height: 28
line-height: 28
width: 100%;
z-index: 100;
+#upload .filelist li .success {
bottom: 0;
height: 40
width: 100%;
z-index: 200;
background: url(./images/success.png) no-
background-image: url(./images/success.gif) \9;
+#upload .filelist li.filePickerBlock {
width: 113
height: 113
background: url(./images/image.png) no-repeat center 12
border: 1px solid #
border-radius: 0;
+#upload .filelist li.filePickerBlock div.webuploader-pick
width: 100%;
height: 100%;
margin: 0;
padding: 0;
opacity: 0;
background:
font-size: 0;
+#upload .filelist div.file-panel {
height: 0;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#;, endColorstr='#;) \0;
background: rgba(0, 0, 0, 0.5);
width: 100%;
z-index: 300;
+#upload .filelist div.file-panel span {
height: 24
text-indent: -9999
background: url(./images/icons.png) no-
background: url(./images/icons.gif) no-repeat \9;
margin: 5px 1px 1
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-user-select:
-moz-user-select:
-ms-user-select:
user-select:
+#upload .filelist div.file-panel span.rotateLeft {
background-position: 0 -24
+#upload .filelist div.file-panel span.rotateLeft:hover {
background-position: 0 0;
+#upload .filelist div.file-panel span.rotateRight {
background-position: -24px -24
+#upload .filelist div.file-panel span.rotateRight:hover {
background-position: -24px 0;
+#upload .filelist div.file-panel span.cancel {
background-position: -48px -24
+#upload .filelist div.file-panel span.cancel:hover {
background-position: -48px 0;
+#upload .statusBar {
height: 45
border-bottom: 1px solid #
margin: 0 10
padding: 0;
line-height: 45
vertical-align:
+#upload .statusBar .progress {
border: 1px solid #1483d8;
width: 198
background: #
height: 18
text-align:
line-height: 18
margin: 0 10px 0 0;
+#upload .statusBar .progress span.percentage {
height: 100%;
background: #1483d8;
+#upload .statusBar .progress span.text {
z-index: 10;
+#upload .statusBar .info {
display: inline-
font-size: 14
color: #666666;
+#upload .statusBar .btns {
line-height: 30
+#filePickerBtn {
display: inline-
+#upload .statusBar .btns .webuploader-pick,
+#upload .statusBar .btns .uploadBtn,
+#upload .statusBar .btns .uploadBtn.state-uploading,
+#upload .statusBar .btns .uploadBtn.state-paused {
background: #
border: 1px solid #
color: #565656;
padding: 0 18
display: inline-
border-radius: 3
margin-left: 10
font-size: 14
-webkit-user-select:
-moz-user-select:
-ms-user-select:
user-select:
+#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: #00b7
border-color:
+#upload .statusBar .btns .uploadBtn:hover,
+#upload .statusBar .btns .uploadBtn.state-paused:hover{
background: #00a2d4;
+#upload .statusBar .btns .uploadBtn.disabled {
pointer-events:
filter:alpha(opacity=60);
-moz-opacity:0.6;
-khtml-opacity: 0.6;
opacity: 0.6;
+/* 在线文件的文件预览图标 */
+i.file-preview {
margin: 10
height: 70
background-image: url(&./images/file-icons.png&);
background-image: url(&./images/file-icons.gif&) \9;
background-position: -140
background-repeat: no-
+i.file-preview.file-type-dir{
background-position: 0
+i.file-preview.file-type-file{
background-position: -140
+i.file-preview.file-type-filelist{
background-position: -210
+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: -280
+i.file-preview.file-type-xls,
+i.file-preview.file-type-xlsx{
background-position: -350
+i.file-preview.file-type-doc,
+i.file-preview.file-type-docx{
background-position: -420
+i.file-preview.file-type-ppt,
+i.file-preview.file-type-pptx{
background-position: -490
+i.file-preview.file-type-vsd{
background-position: -560
+i.file-preview.file-type-pdf{
background-position: -630
+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: -700
+i.file-preview.file-type-apk{
background-position: -770
+i.file-preview.file-type-exe{
background-position: -840
+i.file-preview.file-type-ipa{
background-position: -910
+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: -980
+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: -1050
+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: -140
\ No newline at end of file
Index: video/video.js
===================================================================
--- video/video.js (revision 0)
+++ video/video.js (revision 3)
@@ -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,
window.onload = function(){
$focus($G(&videoUrl&));
initTabs();
initVideo();
initUpload();
/* 初始化tab标签 */
function initTabs(){
var tabs = $G('tabHeads').
for (var i = 0; i & tabs. i++) {
domUtils.on(tabs[i], &click&, function (e) {
var j, bodyId, target = e.target || e.srcE
for (j = 0; j & tabs. j++) {
bodyId = tabs[j].getAttribute('data-content-id');
if(tabs[j] == target){
domUtils.addClass(tabs[j], 'focus');
domUtils.addClass($G(bodyId), 'focus');
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(),
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.
$G(&videoHeight&).value = img.
var align = domUtils.getComputedStyle(img,&float&),
parentAlign = domUtils.getComputedStyle(img.parentNode,&text-align&);
updateAlignButton(parentAlign===&center&?&center&:align);
if(hasUploadClass) {
isModifyUploadVideo =
createPreviewVideo(url);
* 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作
function addOkListener(){
dialog.onok = function(){
$G(&preview&).innerHTML = &&;
var currentTab =
findFocus(&tabHeads&,&tabSrc&);
switch(currentTab){
case &video&:
return insertSingle();
case &videoSearch&:
return insertSearch(&searchList&);
case &upload&:
return insertUpload();
dialog.oncancel = function(){
$G(&preview&).innerHTML = &&;
* 依据传入的align值更新按钮信息
* @param align
function updateAlignButton( align ) {
var aligns = $G( &videoFloat& ).
for ( var i = 0, ci = aligns[i++]; ) {
if ( ci.getAttribute( &name& ) == align ) {
if ( ci.className !=&focus& ) {
ci.className = &focus&;
if ( ci.className ==&focus& ) {
ci.className = &&;
* 将单个视频信息插入编辑器中
function insertSingle(){
var width = $G(&videoWidth&),
height = $G(&videoHeight&),
url=$G('videoUrl').value,
align = findFocus(&videoFloat&,&name&);
if ( !checkNum( [width, height] ) )
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=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,
for ( var i = 0, ci = tabs[i++]; ) {
if ( ci.className==&focus& ) {
property = ci.getAttribute( returnProperty );
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&);
* 检测传入的所有input框中输入的长宽是否是正数
* @param nodes input框集合,
function checkNum( nodes ) {
for ( var i = 0, ci = nodes[i++]; ) {
var value = ci.
if ( !isNumber( value ) && value) {
alert( lang.numError );
ci.value = &&;
ci.focus();
* 数字判断
* @param value
function isNumber( value ) {
return /(0|^[1-9]\d*$)/.test( value );
* 创建图片浮动选择按钮
* @param ids
function createAlignButton( ids ) {
for ( var i = 0, 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 ).
for ( var i = 0, ci = selects[i++]; ) {
domUtils.on( ci, &click&, function () {
for ( var j = 0, 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 );
url.addEventListener( &input&, function () {
createPreviewVideo( this.value );
}, false );
* 根据url生成视频预览
* @param url
function createPreviewVideo(url){
if ( !url )
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:&&' + '还有2个未上传文件'.replace(/[\d]/, count) + '&/span&');
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'
// WebUploader实例
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();
} else if (!editor.getOpt('videoActionName')) {
$('#filePickerReady').after($('&div&').html(lang.errorLoadConfig)).hide();
uploader = _this.uploader = WebUploader.create({
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.errorExceedS
case 'interrupt':
text = lang.errorI
case 'http':
text = lang.errorH
case 'not_allow_type':
text = lang.errorFileT
text = lang.errorUploadR
$info.text(text).show();
if (file.getStatus() === 'invalid') {
showError(file.statusText);
$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&');
if (browser.ie && browser.version &= 7) {
$wrap.text(lang.uploadNoPreview);
uploader.makeThumb(file, function (error, src) {
if (error || !src || (/^data:/.test(src) && browser.ie && browser.version &= 7)) {
$wrap.text(lang.uploadNoPreview);
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(),
switch (index) {
uploader.removeFile(file);
file.rotation += 90;
file.rotation -= 90;
if (supportTransition) {
deg = 'rotate(' + file.rotation + 'deg)';
$wrap.css({
'-webkit-transform': deg,
'-mos-transform': deg,
'-o-transform': deg,
'transform': deg
$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(),
$.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();
/* 可以开始上传 */
case 'ready':
$placeHolder.addClass('element-invisible');
$queue.removeClass('element-invisible');
$statusBar.removeClass('element-invisible');
$progress.hide(); $info.show();
$upload.text(lang.uploadStart);
uploader.refresh();
/* 上传中 */
case 'uploading':
$progress.show(); $info.hide();
$upload.text(lang.uploadPause);
/* 暂停上传 */
case 'paused':
$progress.show(); $info.hide();
$upload.text(lang.uploadContinue);
case 'confirm':
$progress.show(); $info.hide();
$upload.text(lang.uploadStart);
stats = uploader.getStats();
if (stats.successNum && !stats.uploadFailNum) {
setState('finish');
case 'finish':
$progress.hide(); $info.show();
if (stats.uploadFailNum) {
$upload.text(lang.uploadRetry);
$upload.text(lang.uploadStart);
updateStatus();
if (!_this.getQueueCount()) {
$upload.addClass('disabled')
$upload.removeClass('disabled')
function updateStatus() {
var text = '',
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);
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.
if (fileCount === 1) {
$placeHolder.addClass('element-invisible');
$statusBar.show();
addFile(file);
uploader.on('fileDequeued', function (file) {
fileCount--;
fileSize -= file.
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);
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);
case 'stopUpload':
setState('paused', files);
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 ] =
updateTotalProgress();
uploader.on('uploadSuccess', function (file, ret) {
var $file = $('#' + file.id);
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&');
$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')) {
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 readyF
refresh: function(){
this.uploader.refresh();
\ No newline at end of file
Index: spechars/spechars.html
===================================================================
--- spechars/spechars.html (revision 0)
+++ spechars/spechars.html (revision 3)
@@ -0,0 +1,21 @@
+&!DOCTYPE HTML PUBLIC &-//W3C//DTD HTML 4.01 Transitional//EN&
&http://www.w3.org/TR/html4/loose.dtd&&
&title&&/title&
&meta http-equiv=&Content-Type& content=&text/charset=utf-8&/&
&script type=&text/javascript& src=&../internal.js&&&/script&
&style type=&text/css&&
html,body{overflow:}
#specharsTab{width: 97%;margin: 10 zoom:1;position: relative}
.tabbody {height:447}
.tabbody span{ margin: 5px 3text-align:display:inline-width: 40height:16line-height: 16cursor: }
&div id=&specharsTab&&
&div id=&tabHeads& class=&tabhead&&&/div&&div id=&tabBodys& class=&tabbody&&&/div&
+&script type=&text/javascript& src=&spechars.js&&&/script&
\ No newline at end of file
Index: spechars/spechars.js
===================================================================
--- spechars/spechars.js (revision 0)
+++ spechars/spechars.js (revision 3)
@@ -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,ae,?,?:,?,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 = content[i++];) {
var span = document.createElement(&span&);
span.setAttribute(&tabSrc&, ci.name);
span.innerHTML = ci.
if (i == 1)span.className = &focus&;
domUtils.on(span, &click&, function () {
var tmps = $G(&tabHeads&).
for (var k = 0, sk = tmps[k++];) {
sk.className = &&;
tmps = $G(&tabBodys&).
for (var k = 0, 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.
div.style.display = (i == 1) ? && : &none&;
var cons = ci.
for (var j = 0, con = cons[j++];) {
var charSpan = document.createElement(&span&);
charSpan.innerHTML =
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(&,&);
Index: emotion/emotion.html
===================================================================
--- emotion/emotion.html (revision 0)
+++ emotion/emotion.html (revision 3)
@@ -0,0 +1,54 @@
+&!DOCTYPE HTML PUBLIC &-//W3C//DTD HTML 4.0 Transitional//EN& &
+&html xmlns=&http://www.w3.org/1999/xhtml&&
&title&&/title&
&meta http-equiv=&Content-Type& content=&text/ charset=utf-8&/&
&meta name=&robots& content=&noindex, nofollow&/&
&script type=&text/javascript& src=&../internal.js&&&/script&
&link rel=&stylesheet& type=&text/css& href=&emotion.css&&
+&div id=&tabPanel& class=&wrapper&&
&div id=&tabHeads& class=&tabhead&&
&span&&var id=&lang_input_choice&&&/var&&/span&
&span&&var id=&lang_input_Tuzki&&&/var&&/span&
&span&&var id=&lang_input_lvdouwa&&&/var&&/span&
&span&&var id=&lang_input_BOBO&&&/var&&/span&
&span&&var id=&lang_input_babyCat&&&/var&&/span&
&span&&var id=&lang_input_bubble&&&/var&&/span&
&span&&var id=&lang_input_youa&&&/var&&/span&
&div id=&tabBodys& class=&tabbody&&
&div id=&tab0&&&/div&
&div id=&tab1&&&/div&
&div id=&tab2&&&/div&
&div id=&tab3&&&/div&
&div id=&tab4&&&/div&
&div id=&tab5&&&/div&
&div id=&tab6&&&/div&
+&div id=&tabIconReview&&
&img id='faceReview' class='review' src=&../../themes/default/images/spacer.gif&/&
+&script type=&text/javascript& src=&emotion.js&&&/script&
+&script type=&text/javascript&&
var emotion = {
tabNum:7, //切换面板数量
SmilmgName:{ tab0:['j_00', 84], tab1:['t_00', 40], tab2:['w_00', 52], tab3:['B_00', 63], tab4:['C_00', 20], tab5:['i_f', 50], tab6:['y_00', 40] }, //图片前缀名
imageFolders:{ tab0:'jx2/', tab1:'tsj/', tab2:'ldw/', tab3:'bobo/', tab4:'babycat/', tab5:'face/', tab6:'youa/'}, //图片对应文件夹路径
imageCss:{tab0:'jd', tab1:'tsj', tab2:'ldw', tab3:'bb', tab4:'cat', tab5:'pp', tab6:'youa'}, //图片css类名
imageCssOffset:{tab0:35, tab1:35, tab2:35, tab3:35, tab4:35, tab5:25, tab6:35}, //图片偏移
SmileyInfor:{
tab0:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'],
tab1:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'],
tab2:['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'],
tab3:['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'],
tab4:['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'],
tab5:['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],
tab6:['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']
+&/script&
\ No newline at end of file
Index: emotion/emotion.css
===================================================================
--- emotion/emotion.css (revision 0)
+++ emotion/emotion.css (revision 3)
@@ -0,0 +1,43 @@
background:transparent url(images/jxface2.gif?v=1.1) no-re
cursor:width:35height:35display:
background:transparent url(images/fface.gif?v=1.1) no-re
cursor:width:25height:25display:
+.ldw img{
background:transparent url(images/wface.gif?v=1.1) no-re
cursor:width:35height:35display:
+.tsj img{
background:transparent url(images/tface.gif?v=1.1) no-re
cursor:width:35height:35display:
+.cat img{
background:transparent url(images/cface.gif?v=1.1) no-re
cursor:width:35height:35display:
background:transparent url(images/bface.gif?v=1.1) no-re
cursor:width:35height:35display:
+.youa img{
background:transparent url(images/yface.gif?v=1.1) no-re
cursor:width:35height:35display:
+.smileytable td {height: 37}
+#tabPanel{margin-left:5overflow:}
+#tabContent {float:background:#FFFFFF;}
+#tabContent div{display:width:480overflow:}
+#tabIconReview.show{left:17display:}
+.me

我要回帖

更多关于 storage emulated 0 的文章

 

随机推荐