Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_14980201
ueditor
提交
1319d940
U
ueditor
项目概览
qq_14980201
/
ueditor
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
ueditor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1319d940
编写于
12月 26, 2012
作者:
C
campaign
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev-1.2.4' into dev-1.2.4
上级
f841b170
3638f2ff
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
1045 addition
and
822 deletion
+1045
-822
_src/plugins/contextmenu.js
_src/plugins/contextmenu.js
+19
-9
_src/plugins/table.js
_src/plugins/table.js
+885
-782
_src/ui/editorui.js
_src/ui/editorui.js
+2
-1
dialogs/table/edittable.css
dialogs/table/edittable.css
+4
-0
dialogs/table/edittable.html
dialogs/table/edittable.html
+9
-0
dialogs/table/edittable.js
dialogs/table/edittable.js
+50
-20
dialogs/table/edittd.html
dialogs/table/edittd.html
+46
-0
lang/en/en.js
lang/en/en.js
+10
-3
lang/zh-cn/zh-cn.js
lang/zh-cn/zh-cn.js
+9
-2
themes/default/_css/dialog.css
themes/default/_css/dialog.css
+11
-5
未找到文件。
_src/plugins/contextmenu.js
浏览文件 @
1319d940
...
...
@@ -153,6 +153,16 @@ UE.plugins['contextmenu'] = function () {
cmdName
:
'
averagedistributecol
'
},
'
-
'
,
{
label
:
lang
.
edittd
,
cmdName
:
'
edittd
'
,
exec
:
function
()
{
if
(
UE
.
ui
[
'
edittd
'
]
)
{
new
UE
.
ui
[
'
edittd
'
](
this
);
}
this
.
getDialog
(
'
edittd
'
).
open
();
}
},
{
label
:
lang
.
edittable
,
cmdName
:
'
edittable
'
,
...
...
@@ -171,39 +181,39 @@ UE.plugins['contextmenu'] = function () {
subMenu
:[
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
left
'
,
v
a
lign
:
'
top
'
}
value
:{
align
:
'
left
'
,
v
A
lign
:
'
top
'
}
},
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
center
'
,
v
a
lign
:
'
top
'
}
value
:{
align
:
'
center
'
,
v
A
lign
:
'
top
'
}
},
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
right
'
,
v
a
lign
:
'
top
'
}
value
:{
align
:
'
right
'
,
v
A
lign
:
'
top
'
}
},
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
left
'
,
v
a
lign
:
'
middle
'
}
value
:{
align
:
'
left
'
,
v
A
lign
:
'
middle
'
}
},
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
center
'
,
v
a
lign
:
'
middle
'
}
value
:{
align
:
'
center
'
,
v
A
lign
:
'
middle
'
}
},
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
right
'
,
v
a
lign
:
'
middle
'
}
value
:{
align
:
'
right
'
,
v
A
lign
:
'
middle
'
}
},
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
left
'
,
v
a
lign
:
'
bottom
'
}
value
:{
align
:
'
left
'
,
v
A
lign
:
'
bottom
'
}
},
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
center
'
,
v
a
lign
:
'
bottom
'
}
value
:{
align
:
'
center
'
,
v
A
lign
:
'
bottom
'
}
},
{
cmdName
:
'
cellalignment
'
,
value
:{
align
:
'
right
'
,
v
a
lign
:
'
bottom
'
}
value
:{
align
:
'
right
'
,
v
A
lign
:
'
bottom
'
}
}
]
},
...
...
_src/plugins/table.js
浏览文件 @
1319d940
此差异已折叠。
点击以展开。
_src/ui/editorui.js
浏览文件 @
1319d940
...
...
@@ -46,6 +46,7 @@
'
insertframe
'
:
'
~/dialogs/insertframe/insertframe.html
'
,
'
edittip
'
:
'
~/dialogs/table/edittip.html
'
,
'
edittable
'
:
'
~/dialogs/table/edittable.html
'
,
'
edittd
'
:
'
~/dialogs/table/edittd.html
'
,
'
webapp
'
:
'
~/dialogs/webapp/webapp.html
'
,
'
snapscreen
'
:
'
~/dialogs/snapscreen/snapscreen.html
'
,
'
scrawl
'
:
'
~/dialogs/scrawl/scrawl.html
'
,
...
...
@@ -175,7 +176,7 @@
var
dialogBtns
=
{
noOk
:[
'
searchreplace
'
,
'
help
'
,
'
spechars
'
,
'
webapp
'
],
ok
:[
'
attachment
'
,
'
anchor
'
,
'
link
'
,
'
insertimage
'
,
'
map
'
,
'
gmap
'
,
'
insertframe
'
,
'
wordimage
'
,
'
insertvideo
'
,
'
highlightcode
'
,
'
insertframe
'
,
'
edittip
'
,
'
edittable
'
,
'
scrawl
'
,
'
template
'
,
'
music
'
,
'
background
'
]
'
insertvideo
'
,
'
highlightcode
'
,
'
insertframe
'
,
'
edittip
'
,
'
edittable
'
,
'
edittd
'
,
'
scrawl
'
,
'
template
'
,
'
music
'
,
'
background
'
]
};
...
...
dialogs/table/edittable.css
浏览文件 @
1319d940
...
...
@@ -36,6 +36,10 @@
float
:
left
;
}
.section
.tone
{
width
:
80px
;
;
}
.section
.preview
{
width
:
220px
;
}
...
...
dialogs/table/edittable.html
浏览文件 @
1319d940
...
...
@@ -30,6 +30,15 @@
</li>
</ul>
</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"
/>
</li>
</ul>
</div>
</div>
<div
class=
"right"
>
<div
class=
"section"
>
...
...
dialogs/table/edittable.js
浏览文件 @
1319d940
...
...
@@ -10,6 +10,7 @@
caption
=
$G
(
"
J_caption
"
),
autoSizeContent
=
$G
(
"
J_autoSizeContent
"
),
autoSizePage
=
$G
(
"
J_autoSizePage
"
),
tone
=
$G
(
"
J_tone
"
),
preview
=
$G
(
"
J_preview
"
);
var
editTable
=
function
()
{
...
...
@@ -17,51 +18,69 @@
};
editTable
.
prototype
=
{
init
:
function
()
{
var
me
=
this
;
var
me
=
this
,
colorPiker
=
new
UE
.
ui
.
ColorPicker
({
editor
:
editor
}),
colorPop
=
new
UE
.
ui
.
Popup
({
editor
:
editor
,
content
:
colorPiker
});
title
.
checked
=
editor
.
queryCommandState
(
"
inserttitle
"
)
==
-
1
;
caption
.
checked
=
editor
.
queryCommandState
(
"
insertcaption
"
)
==
-
1
;
me
.
createTable
(
title
.
checked
,
caption
.
checked
);
me
.
setAutoSize
();
me
.
setColor
();
domUtils
.
on
(
title
,
"
click
"
,
me
.
titleHanler
);
domUtils
.
on
(
caption
,
"
click
"
,
me
.
captionHanler
);
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
()
{
tone
.
value
=
arguments
[
1
];
colorPop
.
hide
();
});
},
createTable
:
function
(
hasCaption
,
hasTitle
)
{
var
doc
=
document
,
arr
=
[];
var
arr
=
[];
arr
.
push
(
"
<table id='J_example'>
"
);
if
(
hasCaption
)
{
arr
.
push
(
"
<caption>
"
+
lang
.
captionName
+
"
</caption>
"
)
arr
.
push
(
"
<caption>
"
+
lang
.
captionName
+
"
</caption>
"
)
}
if
(
hasTitle
)
{
arr
.
push
(
"
<tr>
"
);
for
(
var
j
=
0
;
j
<
5
;
j
++
)
{
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>
"
);
for
(
var
k
=
0
;
k
<
5
;
k
++
)
{
arr
.
push
(
"
<td>
"
+
lang
.
cellsName
+
"
</td>
"
)
for
(
var
k
=
0
;
k
<
5
;
k
++
)
{
arr
.
push
(
"
<td>
"
+
lang
.
cellsName
+
"
</td>
"
)
}
arr
.
push
(
"
</tr>
"
);
}
arr
.
push
(
"
</table>
"
);
$G
(
"
J_preview
"
)
.
innerHTML
=
arr
.
join
(
""
);
preview
.
innerHTML
=
arr
.
join
(
""
);
},
titleHanler
:
function
()
{
var
example
=
$G
(
"
J_example
"
);
if
(
title
.
checked
)
{
var
row
=
document
.
createElement
(
"
tr
"
);
row
.
innerHTML
=
"
<th>
"
+
lang
.
titleName
+
"
</th><th>
"
+
lang
.
titleName
+
"
</th><th>
"
+
lang
.
titleName
+
"
</th><th>
"
+
lang
.
titleName
+
"
</th><th>
"
+
lang
.
titleName
+
"
</th>
"
;
row
.
innerHTML
=
"
<th>
"
+
lang
.
titleName
+
"
</th><th>
"
+
lang
.
titleName
+
"
</th><th>
"
+
lang
.
titleName
+
"
</th><th>
"
+
lang
.
titleName
+
"
</th><th>
"
+
lang
.
titleName
+
"
</th>
"
;
example
.
insertBefore
(
row
,
example
.
firstChild
);
}
else
{
domUtils
.
remove
(
example
.
rows
[
0
]);
...
...
@@ -89,15 +108,23 @@
});
example
.
setAttribute
(
'
width
'
,
'
100%
'
);
},
setAutoSize
:
function
(){
var
me
=
this
,
setColor
:
function
()
{
var
start
=
editor
.
selection
.
getStart
(),
color
=
domUtils
.
findParentByTagName
(
start
,
"
td
"
,
true
);
tone
.
value
=
domUtils
.
getComputedStyle
(
color
,
"
border-color
"
);
},
setAutoSize
:
function
()
{
var
me
=
this
,
start
=
editor
.
selection
.
getStart
(),
flag
=!
domUtils
.
findParentByTagName
(
start
,
"
table
"
,
true
).
width
;
if
(
flag
){
autoSizeContent
.
checked
=
flag
;
wt
=
domUtils
.
findParentByTagName
(
start
,
"
table
"
,
true
).
width
,
flag
=
!
wt
;
if
(
wt
&&
!
(
/%/
.
test
(
wt
)))
return
;
if
(
flag
)
{
autoSizeContent
.
checked
=
flag
;
me
.
autoSizeContentHanler
();
}
else
{
autoSizePage
.
checked
=
!
flag
;
}
else
{
autoSizePage
.
checked
=
!
flag
;
me
.
autoSizePageHanler
();
}
}
...
...
@@ -105,13 +132,16 @@
new
editTable
;
function
adaptByTextTable
(){
function
adaptByTextTable
()
{
editor
.
execCommand
(
"
adaptbywindow
"
);
editor
.
execCommand
(
'
adaptbytext
'
);
}
dialog
.
onok
=
function
()
{
title
.
checked
?
editor
.
execCommand
(
"
inserttitle
"
)
:
editor
.
execCommand
(
"
deletetitle
"
);
caption
.
checked
?
editor
.
execCommand
(
"
insertcaption
"
)
:
editor
.
execCommand
(
"
deletecaption
"
);
autoSizeContent
.
checked
?
adaptByTextTable
():
editor
.
execCommand
(
"
adaptbywindow
"
);
autoSizeContent
.
checked
?
adaptByTextTable
()
:
""
;
autoSizePage
.
checked
?
editor
.
execCommand
(
"
adaptbywindow
"
)
:
""
;
editor
.
execCommand
(
"
edittable
"
,
tone
.
value
);
};
})();
\ No newline at end of file
dialogs/table/edittd.html
0 → 100644
浏览文件 @
1319d940
<!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
();
});
dialog
.
onok
=
function
(){
editor
.
execCommand
(
"
edittd
"
,
tone
.
value
);
};
</script>
</body>
</html>
\ No newline at end of file
lang/en/en.js
浏览文件 @
1319d940
...
...
@@ -16,7 +16,7 @@ UE.I18N['en'] = {
'
deleterow
'
:
'
DeleteRow
'
,
'
deletecol
'
:
'
DeleteCol
'
,
'
splittorows
'
:
'
SplitToRows
'
,
'
splittocols
'
:
'
SplitToCols
'
,
'
splittocells
'
:
'
SplitToCells
'
,
'
deletecaption
'
:
'
DeleteCaption
'
,
'
inserttitle
'
:
'
InsertTitle
'
,
'
mergecells
'
:
'
MergeCells
'
,
'
deletetable
'
:
'
DeleteTable
'
,
'
cleardoc
'
:
'
Clear
'
,
'
insertparagraphbeforetable
'
:
"
InsertParagraphBeforeTable
"
,
'
fontfamily
'
:
'
FontFamily
'
,
'
fontsize
'
:
'
FontSize
'
,
'
paragraph
'
:
'
Paragraph
'
,
'
insertimage
'
:
'
Image
'
,
'
edittable
'
:
'
Edit Table
'
,
'
link
'
:
'
Link
'
,
'
fontfamily
'
:
'
FontFamily
'
,
'
fontsize
'
:
'
FontSize
'
,
'
paragraph
'
:
'
Paragraph
'
,
'
insertimage
'
:
'
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
'
,
...
...
@@ -464,11 +464,13 @@ UE.I18N['en'] = {
'
lang_tableSize
'
:
'
Automatically adjust table size
'
,
'
lang_autoSizeContent
'
:
'
Adaptive by form text
'
,
'
lang_autoSizePage
'
:
'
Page width adaptive
'
,
'
lang_example
'
:
'
Example
'
'
lang_example
'
:
'
Example
'
,
'
lang_borderStyle
'
:
'
Table Border
'
,
'
lang_color
'
:
'
Color:
'
},
captionName
:
'
Caption
'
,
titleName
:
'
Title
'
,
cellsName
:
'
conten
t
'
cellsName
:
'
tex
t
'
},
'
edittip
'
:{
'
static
'
:{
...
...
@@ -476,6 +478,11 @@ UE.I18N['en'] = {
lang_delCol
:
'
Delete entire col
'
}
},
'
edittd
'
:{
'
static
'
:{
lang_tdBkColor
:
'
Background Color:
'
}
},
wordimage
:{
'
static
'
:{
lang_resave
:
"
The re-save step
"
,
...
...
lang/zh-cn/zh-cn.js
浏览文件 @
1319d940
...
...
@@ -15,7 +15,7 @@ UE.I18N['zh-cn'] = {
'
unlink
'
:
'
取消链接
'
,
'
insertrow
'
:
'
前插入行
'
,
'
insertcol
'
:
'
前插入列
'
,
'
mergeright
'
:
'
右合并单元格
'
,
'
mergedown
'
:
'
下合并单元格
'
,
'
deleterow
'
:
'
删除行
'
,
'
deletecol
'
:
'
删除列
'
,
'
splittorows
'
:
'
拆分成行
'
,
'
splittocols
'
:
'
拆分成列
'
,
'
splittocells
'
:
'
完全拆分单元格
'
,
'
mergecells
'
:
'
合并多个单元格
'
,
'
deletetable
'
:
'
删除表格
'
,
'
cleardoc
'
:
'
清空文档
'
,
'
insertparagraphbeforetable
'
:
"
表格前插入行
"
,
'
fontfamily
'
:
'
字体
'
,
'
fontsize
'
:
'
字号
'
,
'
paragraph
'
:
'
段落格式
'
,
'
insertimage
'
:
'
图片
'
,
'
edittable
'
:
'
表格属性
'
,
'
link
'
:
'
超链接
'
,
'
fontfamily
'
:
'
字体
'
,
'
fontsize
'
:
'
字号
'
,
'
paragraph
'
:
'
段落格式
'
,
'
insertimage
'
:
'
图片
'
,
'
edittable
'
:
'
表格属性
'
,
'
edittd
'
:
'
单元格属性
'
,
'
link
'
:
'
超链接
'
,
'
emotion
'
:
'
表情
'
,
'
spechars
'
:
'
特殊字符
'
,
'
searchreplace
'
:
'
查询替换
'
,
'
map
'
:
'
Baidu地图
'
,
'
gmap
'
:
'
Google地图
'
,
'
insertvideo
'
:
'
视频
'
,
'
help
'
:
'
帮助
'
,
'
justifyleft
'
:
'
居左对齐
'
,
'
justifyright
'
:
'
居右对齐
'
,
'
justifycenter
'
:
'
居中对齐
'
,
'
justifyjustify
'
:
'
两端对齐
'
,
'
forecolor
'
:
'
字体颜色
'
,
'
backcolor
'
:
'
背景色
'
,
'
insertorderedlist
'
:
'
有序列表
'
,
...
...
@@ -447,7 +447,9 @@ UE.I18N['zh-cn'] = {
'
lang_tableSize
'
:
'
自动调整表格尺寸
'
,
'
lang_autoSizeContent
'
:
'
按表格文字自适应
'
,
'
lang_autoSizePage
'
:
'
按页面宽度自适应
'
,
'
lang_example
'
:
'
示例
'
'
lang_example
'
:
'
示例
'
,
'
lang_borderStyle
'
:
'
表格边框
'
,
'
lang_color
'
:
'
颜色:
'
},
captionName
:
'
表格名称
'
,
titleName
:
'
标题
'
,
...
...
@@ -459,6 +461,11 @@ UE.I18N['zh-cn'] = {
lang_delCol
:
'
删除整列
'
}
},
'
edittd
'
:{
'
static
'
:{
lang_tdBkColor
:
'
背景颜色:
'
}
},
'
wordimage
'
:{
'
static
'
:{
lang_resave
:
"
转存步骤
"
,
...
...
themes/default/_css/dialog.css
浏览文件 @
1319d940
...
...
@@ -259,6 +259,17 @@
height
:
265px
;
}
/*edittip-dialog*/
.edui-default
.edui-for-edittip
.edui-dialog-content
{
width
:
225px
;
height
:
60px
;
}
/*edittd-dialog*/
.edui-default
.edui-for-edittd
.edui-dialog-content
{
width
:
240px
;
height
:
50px
;
}
/*snapscreen-dialog*/
.edui-default
.edui-for-snapscreen
.edui-dialog-content
{
width
:
400px
;
...
...
@@ -269,9 +280,4 @@
.edui-default
.edui-for-music
.edui-dialog-content
{
width
:
515px
;
height
:
360px
;
}
/*edittip-dialog*/
.edui-default
.edui-for-edittip
.edui-dialog-content
{
width
:
225px
;
height
:
60px
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录