kindeditor 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +65 -0
- data/Rakefile +20 -0
- data/VERSION +1 -0
- data/init.rb +2 -0
- data/install.rb +1 -0
- data/kindeditor.gemspec +234 -0
- data/lib/generators/USAGE +8 -0
- data/lib/generators/kindeditor/install_generator.rb +56 -0
- data/lib/generators/kindeditor/templates/README +20 -0
- data/lib/generators/kindeditor/templates/app/controllers/kindeditor_controller.rb +39 -0
- data/lib/generators/kindeditor/templates/app/models/kindeditor_image.rb +13 -0
- data/lib/generators/kindeditor/templates/create_kindeditor_images.rb +15 -0
- data/lib/generators/kindeditor/templates/kindeditor/kindeditor-min.js +168 -0
- data/lib/generators/kindeditor/templates/kindeditor/kindeditor.js +4442 -0
- data/lib/generators/kindeditor/templates/kindeditor/kindeditor_config.js +5 -0
- data/lib/generators/kindeditor/templates/kindeditor/license.txt +1 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/about.html +53 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/advtable/advtable.html +233 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/0.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/1.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/10.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/100.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/101.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/102.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/103.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/104.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/105.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/106.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/107.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/108.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/109.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/11.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/110.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/111.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/112.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/113.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/114.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/115.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/116.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/117.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/118.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/119.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/12.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/120.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/121.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/122.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/123.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/124.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/125.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/126.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/127.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/128.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/129.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/13.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/130.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/131.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/132.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/133.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/134.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/14.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/15.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/16.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/17.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/18.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/19.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/2.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/20.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/21.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/22.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/23.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/24.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/25.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/26.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/27.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/28.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/29.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/3.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/30.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/31.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/32.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/33.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/34.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/35.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/36.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/37.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/38.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/39.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/4.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/40.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/41.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/42.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/43.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/44.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/45.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/46.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/47.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/48.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/49.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/5.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/50.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/51.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/52.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/53.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/54.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/55.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/56.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/57.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/58.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/59.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/6.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/60.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/61.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/62.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/63.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/64.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/65.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/66.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/67.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/68.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/69.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/7.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/70.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/71.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/72.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/73.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/74.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/75.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/76.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/77.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/78.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/79.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/8.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/80.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/81.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/82.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/83.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/84.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/85.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/86.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/87.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/88.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/89.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/9.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/90.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/91.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/92.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/93.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/94.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/95.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/96.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/97.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/98.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/99.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/emoticons/qq.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/file_manager/file_manager.css +64 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/file_manager/file_manager.html +29 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/file_manager/file_manager.js +220 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/file_manager/images/file-16.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/file_manager/images/file-64.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/file_manager/images/folder-16.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/file_manager/images/folder-64.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/file_manager/images/go-up.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/flash.html +72 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/image/image.html +268 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/image/images/align_left.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/image/images/align_right.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/image/images/align_top.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/image/images/refresh.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/link/link.html +86 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/media.html +76 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/plainpaste.html +43 -0
- data/lib/generators/kindeditor/templates/kindeditor/plugins/wordpaste.html +50 -0
- data/lib/generators/kindeditor/templates/kindeditor/skins/common/blank.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/skins/common/editor.css +47 -0
- data/lib/generators/kindeditor/templates/kindeditor/skins/common/flash.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/skins/common/loading.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/skins/common/media.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/skins/common/rm.gif +0 -0
- data/lib/generators/kindeditor/templates/kindeditor/skins/default.css +918 -0
- data/lib/generators/kindeditor/templates/kindeditor/skins/default/default.gif +0 -0
- data/lib/generators/kindeditor/templates/mongoid/kindeditor_image.rb +21 -0
- data/lib/kindeditor.rb +9 -0
- data/pkg/kindeditor-0.0.1.gem +0 -0
- data/pkg/kinkdeditor-0.0.1.gem +0 -0
- data/spec/generators/install_generaor_spec.rb +9 -0
- data/spec/kindeditor_spec.rb +7 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +11 -0
- data/uninstall.rb +1 -0
- metadata +269 -0
@@ -0,0 +1 @@
|
|
1
|
+
http://www.kindsoft.net/lgpl_license.html
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title>About</title>
|
6
|
+
<style type="text/css" rel="stylesheet">
|
7
|
+
body {
|
8
|
+
margin: 0;
|
9
|
+
font:12px/1.5 "sans serif",tahoma,verdana,helvetica;
|
10
|
+
background-color:#F0F0EE;
|
11
|
+
color:#222222;
|
12
|
+
overflow:hidden;
|
13
|
+
}
|
14
|
+
.main {
|
15
|
+
margin: 10px;
|
16
|
+
}
|
17
|
+
.table {
|
18
|
+
list-style-image:none;
|
19
|
+
list-style-position:outside;
|
20
|
+
list-style-type:none;
|
21
|
+
margin:0;
|
22
|
+
padding:0;
|
23
|
+
display:block;
|
24
|
+
}
|
25
|
+
.table li {
|
26
|
+
padding:0;
|
27
|
+
margin:0;
|
28
|
+
display:list-item;
|
29
|
+
}
|
30
|
+
</style>
|
31
|
+
<script type="text/javascript">
|
32
|
+
var KE = parent.KindEditor;
|
33
|
+
location.href.match(/\?id=([\w-]+)/i);
|
34
|
+
var id = RegExp.$1;
|
35
|
+
KE.event.ready(function() {
|
36
|
+
KE.util.pluginLang('about', document);
|
37
|
+
KE.util.hideLoadingPage(id);
|
38
|
+
}, window, document);
|
39
|
+
</script>
|
40
|
+
</head>
|
41
|
+
<body>
|
42
|
+
<div class="main">
|
43
|
+
<ul class="table">
|
44
|
+
<li>
|
45
|
+
KindEditor <span id="lang.version"></span></span>
|
46
|
+
</li>
|
47
|
+
<li>
|
48
|
+
Copyright © <a href="http://www.kindsoft.net/" target="_blank">kindsoft.net</a> All rights reserved.
|
49
|
+
</li>
|
50
|
+
</ul>
|
51
|
+
</div>
|
52
|
+
</body>
|
53
|
+
</html>
|
@@ -0,0 +1,233 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title>Table</title>
|
6
|
+
<style type="text/css" rel="stylesheet">
|
7
|
+
body {
|
8
|
+
margin: 0;
|
9
|
+
font:12px/1.5 "sans serif",tahoma,verdana,helvetica;
|
10
|
+
background-color:#F0F0EE;
|
11
|
+
color:#222222;
|
12
|
+
overflow:hidden;
|
13
|
+
}
|
14
|
+
label {
|
15
|
+
cursor:pointer;
|
16
|
+
margin-right: 20px;
|
17
|
+
}
|
18
|
+
.main {
|
19
|
+
margin: 0 10px;
|
20
|
+
}
|
21
|
+
.table {
|
22
|
+
list-style-image:none;
|
23
|
+
list-style-position:outside;
|
24
|
+
list-style-type:none;
|
25
|
+
margin:0;
|
26
|
+
padding:0;
|
27
|
+
display:block;
|
28
|
+
}
|
29
|
+
.table li {
|
30
|
+
padding:0;
|
31
|
+
margin-bottom:10px;
|
32
|
+
display:list-item;
|
33
|
+
line-height:1.5;
|
34
|
+
}
|
35
|
+
.table li label {
|
36
|
+
font-weight:bold;
|
37
|
+
}
|
38
|
+
.table li input {
|
39
|
+
vertical-align:middle;
|
40
|
+
}
|
41
|
+
.table li input.text {
|
42
|
+
width:50px;
|
43
|
+
}
|
44
|
+
.margin-right-10 {
|
45
|
+
margin-right:10px;
|
46
|
+
}
|
47
|
+
.color-picker {
|
48
|
+
border: 1px solid #A0A0A0;
|
49
|
+
background-color: #FFFFFF;
|
50
|
+
font-size: 12px;
|
51
|
+
width: 60px;
|
52
|
+
height: 20px;
|
53
|
+
line-height: 20px;
|
54
|
+
padding-left: 5px;
|
55
|
+
overflow: hidden;
|
56
|
+
display: -moz-inline-stack;
|
57
|
+
display: inline-block;
|
58
|
+
vertical-align: middle;
|
59
|
+
zoom: 1;
|
60
|
+
*display: inline;
|
61
|
+
cursor: pointer;
|
62
|
+
}
|
63
|
+
</style>
|
64
|
+
<script type="text/javascript">
|
65
|
+
var KE = parent.KindEditor;
|
66
|
+
location.href.match(/\&id=([\w-]+)/i);
|
67
|
+
var id = RegExp.$1;
|
68
|
+
location.href.match(/\?mode=([\w-]*)/i);
|
69
|
+
var mode = RegExp.$1;
|
70
|
+
KE.event.ready(function() {
|
71
|
+
var modeBox = KE.$('mode', document);
|
72
|
+
var rowsBox = KE.$('rows', document);
|
73
|
+
var colsBox = KE.$('cols', document);
|
74
|
+
var widthBox = KE.$('width', document);
|
75
|
+
var heightBox = KE.$('height', document);
|
76
|
+
var widthTypeBox = KE.$('widthType', document);
|
77
|
+
var heightTypeBox = KE.$('heightType', document);
|
78
|
+
var paddingBox = KE.$('padding', document);
|
79
|
+
var spacingBox = KE.$('spacing', document);
|
80
|
+
var alignBox = KE.$('align', document);
|
81
|
+
var borderBox = KE.$('border', document);
|
82
|
+
var borderColorBox = KE.$('borderColor', document);
|
83
|
+
var backgroundColorBox = KE.$('backgroundColor', document);
|
84
|
+
var lang = KE.lang.plugins.advtable;
|
85
|
+
widthTypeBox.options[0] = new Option(lang.percent, '%');
|
86
|
+
widthTypeBox.options[1] = new Option(lang.px, 'px');
|
87
|
+
heightTypeBox.options[0] = new Option(lang.percent, '%');
|
88
|
+
heightTypeBox.options[1] = new Option(lang.px, 'px');
|
89
|
+
alignBox.options[0] = new Option(lang.alignDefault, '');
|
90
|
+
alignBox.options[1] = new Option(lang.alignLeft, 'left');
|
91
|
+
alignBox.options[2] = new Option(lang.alignCenter, 'center');
|
92
|
+
alignBox.options[3] = new Option(lang.alignRight, 'right');
|
93
|
+
var rows = 3;
|
94
|
+
var cols = 2;
|
95
|
+
var width = 100;
|
96
|
+
var height = '';
|
97
|
+
var widthType = '%';
|
98
|
+
var heightType = '%';
|
99
|
+
var padding = 2;
|
100
|
+
var spacing = 0;
|
101
|
+
var align = '';
|
102
|
+
var border = 1;
|
103
|
+
var borderColor = '#000000';
|
104
|
+
var backgroundColor = '';
|
105
|
+
var table = KE.plugin.advtable.getSelectedTable(id);
|
106
|
+
if (mode === 'default' && table) mode = 'update';
|
107
|
+
if (mode === 'update') {
|
108
|
+
rows = table.rows.length;
|
109
|
+
cols = rows > 0 ? table.rows[0].cells.length : 0;
|
110
|
+
rowsBox.disabled = true;
|
111
|
+
colsBox.disabled = true;
|
112
|
+
var tableWidth = table.style.width || table.width;
|
113
|
+
var tableHeight = table.style.height || table.height;
|
114
|
+
if (tableWidth !== undefined && tableWidth.match(/^(\d+)((?:px|%)*)$/)) {
|
115
|
+
width = RegExp.$1;
|
116
|
+
widthType = RegExp.$2;
|
117
|
+
} else {
|
118
|
+
width = '';
|
119
|
+
}
|
120
|
+
if (tableHeight !== undefined && tableHeight.match(/^(\d+)((?:px|%)*)$/)) {
|
121
|
+
height = RegExp.$1;
|
122
|
+
heightType = RegExp.$2;
|
123
|
+
}
|
124
|
+
padding = table.cellPadding || '';
|
125
|
+
spacing = table.cellSpacing || '';
|
126
|
+
align = table.align || '';
|
127
|
+
border = (table.border === undefined) ? '' : table.border;
|
128
|
+
borderColor = table.getAttribute('borderColor') || '';
|
129
|
+
backgroundColor = table.style.backgroundColor || table.bgColor || '';
|
130
|
+
borderColor = KE.util.rgbToHex(borderColor).toUpperCase();
|
131
|
+
backgroundColor = KE.util.rgbToHex(backgroundColor).toUpperCase();
|
132
|
+
}
|
133
|
+
modeBox.value = mode;
|
134
|
+
rowsBox.value = rows;
|
135
|
+
colsBox.value = cols;
|
136
|
+
widthBox.value = width;
|
137
|
+
heightBox.value = height;
|
138
|
+
widthTypeBox.value = widthType;
|
139
|
+
heightTypeBox.value = heightType;
|
140
|
+
paddingBox.value = padding;
|
141
|
+
spacingBox.value = spacing;
|
142
|
+
alignBox.value = align;
|
143
|
+
borderBox.value = border;
|
144
|
+
function setColor(el, color) {
|
145
|
+
el.style.backgroundColor = color;
|
146
|
+
el.style.color = (color == '#000000') ? '#FFFFFF' : '#000000';
|
147
|
+
el.innerHTML = color;
|
148
|
+
}
|
149
|
+
setColor(borderColorBox, borderColor);
|
150
|
+
setColor(backgroundColorBox, backgroundColor);
|
151
|
+
var picker;
|
152
|
+
var currentElement;
|
153
|
+
function removePicker() {
|
154
|
+
if (picker) {
|
155
|
+
picker.remove();
|
156
|
+
picker = null;
|
157
|
+
currentElement = null;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
function onclickFunc(el) {
|
161
|
+
if (picker && el === currentElement) {
|
162
|
+
removePicker();
|
163
|
+
} else {
|
164
|
+
removePicker();
|
165
|
+
var dialog = KE.g[id].dialogStack[0];
|
166
|
+
dialog.beforeHide = removePicker;
|
167
|
+
dialog.ondrag = removePicker;
|
168
|
+
var scrollPos = KE.util.getScrollPos();
|
169
|
+
var iframePos = KE.util.getElementPos(dialog.iframe);
|
170
|
+
var pos = KE.util.getElementPos(el);
|
171
|
+
picker = new KE.colorpicker({
|
172
|
+
x : iframePos.x + pos.x - scrollPos.x,
|
173
|
+
y : iframePos.y + pos.y - scrollPos.y + 22,
|
174
|
+
z : dialog.zIndex + 1,
|
175
|
+
onclick : function(color) {
|
176
|
+
setColor(el, color);
|
177
|
+
removePicker();
|
178
|
+
},
|
179
|
+
selectedColor : (el.innerHTML || '')
|
180
|
+
});
|
181
|
+
picker.create();
|
182
|
+
currentElement = el;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
borderColorBox.onclick = function() {
|
186
|
+
onclickFunc(borderColorBox);
|
187
|
+
};
|
188
|
+
backgroundColorBox.onclick = function() {
|
189
|
+
onclickFunc(backgroundColorBox);
|
190
|
+
};
|
191
|
+
KE.util.pluginLang('advtable', document);
|
192
|
+
KE.util.hideLoadingPage(id);
|
193
|
+
}, window, document);
|
194
|
+
</script>
|
195
|
+
</head>
|
196
|
+
<body>
|
197
|
+
<div class="main">
|
198
|
+
<input type="hidden" id="mode" name="mode" value="" />
|
199
|
+
<ul class="table">
|
200
|
+
<li>
|
201
|
+
<label for="rows"><span id="lang.cells"></span></label>
|
202
|
+
<span id="lang.rows"></span> <input type="text" id="rows" name="rows" value="" maxlength="4" class="text margin-right-10" />
|
203
|
+
<span id="lang.cols"></span> <input type="text" id="cols" name="cols" value="" maxlength="4" class="text" />
|
204
|
+
</li>
|
205
|
+
<li>
|
206
|
+
<label for="width"><span id="lang.size"></span></label>
|
207
|
+
<span id="lang.width"></span> <input type="text" id="width" name="width" value="" maxlength="4" class="text" align="absmiddle" />
|
208
|
+
<select id="widthType" name="widthType" align="absmiddle" class="margin-right-10"></select>
|
209
|
+
<span id="lang.height"></span> <input type="text" id="height" name="height" value="" maxlength="4" class="text" align="absmiddle" />
|
210
|
+
<select id="heightType" name="heightType" align="absmiddle" class="margin-right-10"></select>
|
211
|
+
</li>
|
212
|
+
<li>
|
213
|
+
<label for="padding"><span id="lang.space"></span></label>
|
214
|
+
<span id="lang.padding"></span> <input type="text" id="padding" name="padding" value="" maxlength="4" class="text margin-right-10" />
|
215
|
+
<span id="lang.spacing"></span> <input type="text" id="spacing" name="spacing" value="" maxlength="4" class="text" />
|
216
|
+
</li>
|
217
|
+
<li>
|
218
|
+
<label for="align"><span id="lang.align"></span></label>
|
219
|
+
<select id="align" name="align"></select>
|
220
|
+
</li>
|
221
|
+
<li>
|
222
|
+
<label for="border"><span id="lang.border"></span></label>
|
223
|
+
<span id="lang.borderWidth"></span> <input type="text" id="border" name="border" value="" maxlength="4" class="text margin-right-10" />
|
224
|
+
<span id="lang.borderColor"></span> <span id="borderColor" class="color-picker"></span>
|
225
|
+
</li>
|
226
|
+
<li>
|
227
|
+
<label for="backgroundColor"><span id="lang.backgroundColor"></span></label>
|
228
|
+
<span id="backgroundColor" class="color-picker"></span>
|
229
|
+
</li>
|
230
|
+
</ul>
|
231
|
+
</div>
|
232
|
+
</body>
|
233
|
+
</html>
|