rails_kindeditor 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.rdoc +34 -0
- data/Rakefile +2 -0
- data/app/controllers/kindeditor/assets_controller.rb +50 -0
- data/app/models/kindeditor/asset.rb +14 -0
- data/app/models/kindeditor/file.rb +4 -0
- data/app/models/kindeditor/image.rb +4 -0
- data/app/uploaders/kindeditor/file_uploader.rb +54 -0
- data/app/uploaders/kindeditor/image_uploader.rb +54 -0
- data/config/routes.rb +7 -0
- data/lib/generators/rails_kindeditor/install/USAGE +9 -0
- data/lib/generators/rails_kindeditor/install/install_generator.rb +11 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor-init.js +7 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor.js +4688 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/about.html +52 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/accessory.html +74 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/advtable/advtable.html +235 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/advtable/cell.html +201 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/0.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/1.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/10.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/100.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/101.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/102.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/103.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/104.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/105.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/106.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/107.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/108.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/109.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/11.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/110.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/111.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/112.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/113.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/114.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/115.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/116.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/117.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/118.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/119.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/12.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/120.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/121.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/122.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/123.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/124.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/125.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/126.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/127.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/128.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/129.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/13.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/130.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/131.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/132.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/133.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/134.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/14.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/15.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/16.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/17.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/18.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/19.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/2.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/20.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/21.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/22.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/23.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/24.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/25.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/26.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/27.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/28.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/29.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/3.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/30.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/31.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/32.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/33.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/34.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/35.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/36.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/37.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/38.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/39.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/4.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/40.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/41.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/42.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/43.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/44.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/45.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/46.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/47.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/48.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/49.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/5.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/50.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/51.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/52.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/53.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/54.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/55.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/56.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/57.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/58.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/59.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/6.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/60.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/61.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/62.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/63.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/64.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/65.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/66.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/67.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/68.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/69.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/7.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/70.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/71.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/72.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/73.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/74.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/75.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/76.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/77.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/78.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/79.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/8.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/80.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/81.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/82.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/83.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/84.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/85.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/86.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/87.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/88.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/89.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/9.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/90.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/91.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/92.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/93.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/94.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/95.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/96.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/97.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/98.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/99.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/qq.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.css +64 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.html +31 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.js +221 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/file-16.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/file-64.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/folder-16.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/folder-64.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/go-up.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/flash.html +69 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/image.html +305 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/align_left.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/align_right.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/align_top.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/refresh.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/link/link.html +82 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/media.html +73 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/plainpaste.html +44 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/wordpaste.html +50 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/blank.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/doc.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/editor.css +47 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/flash.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/loading.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/media.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/mp3.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/pdf.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/rar.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/rm.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/xls.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/default/bg.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/default/default.gif +0 -0
- data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/default.css +911 -0
- data/lib/generators/rails_kindeditor/migration/USAGE +13 -0
- data/lib/generators/rails_kindeditor/migration/migration_generator.rb +20 -0
- data/lib/generators/rails_kindeditor/migration/templates/migration/migration.rb +15 -0
- data/lib/rails_kindeditor/engine.rb +9 -0
- data/lib/rails_kindeditor/version.rb +3 -0
- data/lib/rails_kindeditor.rb +10 -0
- data/rails_kindeditor.gemspec +24 -0
- metadata +259 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,69 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title>Flash</title>
|
6
|
+
<link href="../skins/default.css" rel="stylesheet" />
|
7
|
+
<style type="text/css" rel="stylesheet">
|
8
|
+
body {
|
9
|
+
margin: 0;
|
10
|
+
font:12px/1.5 "sans serif",tahoma,verdana,helvetica;
|
11
|
+
background-color:#F0F0EE;
|
12
|
+
color:#222222;
|
13
|
+
overflow:hidden;
|
14
|
+
}
|
15
|
+
label {
|
16
|
+
cursor:pointer;
|
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
|
+
</style>
|
39
|
+
<script type="text/javascript">
|
40
|
+
var KE = parent.KindEditor;
|
41
|
+
var id = KE.util.getParam(location.href, 'id');
|
42
|
+
KE.event.ready(function() {
|
43
|
+
var urlBox = KE.$('url', document);
|
44
|
+
KE.util.pluginLang('flash', document);
|
45
|
+
KE.util.hideLoadingPage(id);
|
46
|
+
urlBox.focus();
|
47
|
+
urlBox.select();
|
48
|
+
}, window, document);
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
<body>
|
52
|
+
<div class="main">
|
53
|
+
<ul class="table">
|
54
|
+
<li>
|
55
|
+
<label for="url" class="ke-inline-block"><span id="lang.url"></span></label>
|
56
|
+
<input type="text" id="url" name="url" value="http://" maxlength="255" class="ke-inline-block ke-text-input" style="width:90%;" />
|
57
|
+
</li>
|
58
|
+
<li>
|
59
|
+
<label for="width" class="ke-inline-block"><span id="lang.width"></span></label>
|
60
|
+
<input type="text" id="width" name="width" value="550" maxlength="4" class="ke-inline-block ke-text-input" style="width:50px;text-align:right;" /> px
|
61
|
+
</li>
|
62
|
+
<li>
|
63
|
+
<label for="height" class="ke-inline-block"><span id="lang.height"></span></label>
|
64
|
+
<input type="text" id="height" name="height" value="400" maxlength="4" class="ke-inline-block ke-text-input" style="width:50px;text-align:right;" /> px
|
65
|
+
</li>
|
66
|
+
</ul>
|
67
|
+
</div>
|
68
|
+
</body>
|
69
|
+
</html>
|
@@ -0,0 +1,305 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title>Image</title>
|
6
|
+
<link href="../../skins/default.css" rel="stylesheet" />
|
7
|
+
<style type="text/css" rel="stylesheet">
|
8
|
+
body {
|
9
|
+
margin: 0;
|
10
|
+
font:12px/1.5 "sans serif",tahoma,verdana,helvetica;
|
11
|
+
background-color:#F0F0EE;
|
12
|
+
color:#222222;
|
13
|
+
overflow:hidden;
|
14
|
+
}
|
15
|
+
form {
|
16
|
+
margin:0;
|
17
|
+
}
|
18
|
+
label {
|
19
|
+
cursor:pointer;
|
20
|
+
}
|
21
|
+
#resetBtn {
|
22
|
+
margin-left:10px;
|
23
|
+
cursor:pointer;
|
24
|
+
}
|
25
|
+
.main {
|
26
|
+
padding: 0 10px;
|
27
|
+
}
|
28
|
+
.clearfix:after {
|
29
|
+
content: ".";
|
30
|
+
display: block;
|
31
|
+
height: 0;
|
32
|
+
clear: both;
|
33
|
+
visibility: hidden;
|
34
|
+
}
|
35
|
+
.tab-navi {
|
36
|
+
width:98%;
|
37
|
+
border-bottom:1px solid #A0A0A0;
|
38
|
+
padding-left:5px;
|
39
|
+
margin-bottom:10px;
|
40
|
+
|
41
|
+
}
|
42
|
+
.tab-navi ul {
|
43
|
+
list-style-image:none;
|
44
|
+
list-style-position:outside;
|
45
|
+
list-style-type:none;
|
46
|
+
margin:0;
|
47
|
+
padding:0;
|
48
|
+
}
|
49
|
+
.tab-navi li {
|
50
|
+
position: relative;
|
51
|
+
border: 1px solid #A0A0A0;
|
52
|
+
background-color: #E0E0E0;
|
53
|
+
margin: 0 2px -1px 0;
|
54
|
+
padding: 0 20px;
|
55
|
+
float: left;
|
56
|
+
line-height: 25px;
|
57
|
+
text-align: center;
|
58
|
+
color: #555555;
|
59
|
+
cursor: pointer;
|
60
|
+
}
|
61
|
+
.tab-navi li.selected {
|
62
|
+
background-color: #F0F0EE;
|
63
|
+
border-bottom: 1px solid #F0F0EE;
|
64
|
+
color: #000000;
|
65
|
+
cursor: default;
|
66
|
+
}
|
67
|
+
.tab-navi li.on {
|
68
|
+
background-color: #F0F0EE;
|
69
|
+
color: #000000;
|
70
|
+
}
|
71
|
+
.table {
|
72
|
+
list-style-image:none;
|
73
|
+
list-style-position:outside;
|
74
|
+
list-style-type:none;
|
75
|
+
margin:0;
|
76
|
+
padding:0;
|
77
|
+
display:block;
|
78
|
+
}
|
79
|
+
.table li {
|
80
|
+
padding:0;
|
81
|
+
margin:0;
|
82
|
+
margin-bottom:10px;
|
83
|
+
display:list-item;
|
84
|
+
}
|
85
|
+
.table li label {
|
86
|
+
font-weight:bold;
|
87
|
+
}
|
88
|
+
.upload {
|
89
|
+
position: relative;
|
90
|
+
overflow: hidden;
|
91
|
+
}
|
92
|
+
input.url {
|
93
|
+
width: 200px;
|
94
|
+
}
|
95
|
+
#imgFile {
|
96
|
+
position: absolute;
|
97
|
+
top: 0;
|
98
|
+
right: 0;
|
99
|
+
width: 70px;
|
100
|
+
height: 25px;
|
101
|
+
z-index: 811212;
|
102
|
+
border: 0 none;
|
103
|
+
opacity:0;
|
104
|
+
filter:alpha(opacity=0);
|
105
|
+
}
|
106
|
+
</style>
|
107
|
+
<script type="text/javascript">
|
108
|
+
var KE = parent.KindEditor;
|
109
|
+
var id = KE.util.getParam(location.href, 'id');
|
110
|
+
var fileManager = null;
|
111
|
+
var allowUpload = (typeof KE.g[id].allowUpload == 'undefined') ? true : KE.g[id].allowUpload;
|
112
|
+
var allowFileManager = (typeof KE.g[id].allowFileManager == 'undefined') ? false : KE.g[id].allowFileManager;
|
113
|
+
var referMethod = (typeof KE.g[id].referMethod == 'undefined') ? '' : KE.g[id].referMethod;
|
114
|
+
var imageUploadJson = (typeof KE.g[id].imageUploadJson == 'undefined') ? '../../php/upload_json.php' : KE.g[id].imageUploadJson;
|
115
|
+
var imageTabDefault = 0;
|
116
|
+
var lang = KE.lang.plugins.image;
|
117
|
+
KE.event.ready(function() {
|
118
|
+
var typeBox = KE.$('type', document);
|
119
|
+
var urlBox = KE.$('url', document);
|
120
|
+
var localUrlBox = KE.$('localUrl', document);
|
121
|
+
var viewServerBox = KE.$('viewServer', document);
|
122
|
+
var viewLocalBox = KE.$('viewLocal', document);
|
123
|
+
var alignElements = document.getElementsByName('align');
|
124
|
+
var fileBox = KE.$('imgFile', document);
|
125
|
+
var widthBox = KE.$('imgWidth', document);
|
126
|
+
var heightBox = KE.$('imgHeight', document);
|
127
|
+
var titleBox = KE.$('imgTitle', document);
|
128
|
+
var resetBtn = KE.$('resetBtn', document);
|
129
|
+
var tabNavi = KE.$('tabNavi', document);
|
130
|
+
var defaultImg = KE.$('defaultImg', document);
|
131
|
+
var leftImg = KE.$('leftImg', document);
|
132
|
+
var rightImg = KE.$('rightImg', document);
|
133
|
+
var liList = tabNavi.getElementsByTagName('li');
|
134
|
+
var selectTab = function(num) {
|
135
|
+
if (num == 1) resetBtn.style.display = 'none';
|
136
|
+
else resetBtn.style.display = '';
|
137
|
+
widthBox.value = '';
|
138
|
+
heightBox.value = '';
|
139
|
+
titleBox.value = '';
|
140
|
+
alignElements[0].checked = true;
|
141
|
+
for (var i = 0, len = liList.length; i < len; i++) {
|
142
|
+
var li = liList[i];
|
143
|
+
if (i === num) {
|
144
|
+
li.className = 'selected';
|
145
|
+
li.onclick = null;
|
146
|
+
if (KE.browser.IE) {
|
147
|
+
KE.util.focus(id);
|
148
|
+
KE.util.select(id);
|
149
|
+
}
|
150
|
+
} else {
|
151
|
+
if (allowUpload) {
|
152
|
+
li.className = '';
|
153
|
+
li.onmouseover = function() { KE.addClass(this, 'on'); };
|
154
|
+
li.onmouseout = function() { KE.removeClass(this, 'on'); };
|
155
|
+
li.onclick = (function (i) {
|
156
|
+
return function() {
|
157
|
+
if (!fileManager) selectTab(i);
|
158
|
+
};
|
159
|
+
})(i);
|
160
|
+
} else {
|
161
|
+
li.parentNode.removeChild(li);
|
162
|
+
}
|
163
|
+
}
|
164
|
+
KE.$('tab' + (i + 1), document).style.display = 'none';
|
165
|
+
}
|
166
|
+
typeBox.value = num + 1;
|
167
|
+
KE.$('tab' + (num + 1), document).style.display = '';
|
168
|
+
}
|
169
|
+
selectTab(imageTabDefault);
|
170
|
+
var imgNode = KE.plugin['image'].getSelectedNode(id);
|
171
|
+
if (imgNode) {
|
172
|
+
var tempDiv = KE.$$('div', KE.g[id].iframeDoc);
|
173
|
+
tempDiv.appendChild(imgNode.cloneNode(false));
|
174
|
+
var imgHtml = tempDiv.innerHTML;
|
175
|
+
var src = imgNode.src;
|
176
|
+
if (imgHtml.match(/kesrc="([^"]+)"/i)) src = RegExp.$1;
|
177
|
+
urlBox.value = src;
|
178
|
+
widthBox.value = imgNode.width;
|
179
|
+
heightBox.value = imgNode.height;
|
180
|
+
titleBox.value = (typeof imgNode.alt != 'undefined') ? imgNode.alt : imgNode.title;
|
181
|
+
for (var i = 0, len = alignElements.length; i < len; i++) {
|
182
|
+
if (alignElements[i].value == imgNode.align) {
|
183
|
+
alignElements[i].checked = true;
|
184
|
+
break;
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
if (allowFileManager) {
|
189
|
+
KE.event.add(viewServerBox, 'click', function () {
|
190
|
+
if (fileManager) return false;
|
191
|
+
fileManager = new KE.dialog({
|
192
|
+
id : id,
|
193
|
+
cmd : 'file_manager',
|
194
|
+
file : 'file_manager/file_manager.html',
|
195
|
+
width : 500,
|
196
|
+
height : 400,
|
197
|
+
loadingMode : true,
|
198
|
+
title : KE.lang.fileManager,
|
199
|
+
noButton : KE.lang.no,
|
200
|
+
afterHide : function() {
|
201
|
+
fileManager = null;
|
202
|
+
}
|
203
|
+
});
|
204
|
+
fileManager.show();
|
205
|
+
});
|
206
|
+
} else {
|
207
|
+
viewServerBox.style.display = 'none';
|
208
|
+
urlBox.style.width = '300px';
|
209
|
+
}
|
210
|
+
KE.event.add(fileBox, 'change', function() {
|
211
|
+
localUrlBox.value = fileBox.value;
|
212
|
+
});
|
213
|
+
KE.$('uploadForm', document).action = imageUploadJson;
|
214
|
+
KE.$('referMethod', document).value = referMethod;
|
215
|
+
var alignIds = ['default', 'left', 'right'];
|
216
|
+
for (var i = 0, len = alignIds.length; i < len; i++) {
|
217
|
+
KE.event.add(KE.$(alignIds[i] + 'Img', document), 'click', (function(i) {
|
218
|
+
return function() {
|
219
|
+
KE.$(alignIds[i] + 'Chk', document).checked = true;
|
220
|
+
};
|
221
|
+
})(i));
|
222
|
+
}
|
223
|
+
KE.event.add(resetBtn, 'click', function() {
|
224
|
+
var g = KE.g[id];
|
225
|
+
var img = KE.$$('img', g.iframeDoc);
|
226
|
+
img.src = urlBox.value;
|
227
|
+
img.style.position = 'absolute';
|
228
|
+
img.style.visibility = 'hidden';
|
229
|
+
img.style.top = '0px';
|
230
|
+
img.style.left = '1000px';
|
231
|
+
g.iframeDoc.body.appendChild(img);
|
232
|
+
widthBox.value = img.width;
|
233
|
+
heightBox.value = img.height;
|
234
|
+
g.iframeDoc.body.removeChild(img);
|
235
|
+
});
|
236
|
+
KE.util.pluginLang('image', document);
|
237
|
+
resetBtn.alt = resetBtn.title = lang.resetSize;
|
238
|
+
defaultImg.alt = defaultImg.title = lang.defaultAlign;
|
239
|
+
leftImg.alt = leftImg.title = lang.leftAlign;
|
240
|
+
rightImg.alt = rightImg.title = lang.rightAlign;
|
241
|
+
viewServerBox.value = lang.viewServer;
|
242
|
+
viewLocalBox.value = lang.viewServer;
|
243
|
+
KE.util.hideLoadingPage(id);
|
244
|
+
if (imageTabDefault == 0) {
|
245
|
+
urlBox.focus();
|
246
|
+
urlBox.select();
|
247
|
+
}
|
248
|
+
}, window, document);
|
249
|
+
</script>
|
250
|
+
</head>
|
251
|
+
<body>
|
252
|
+
<div class="main">
|
253
|
+
<div id="tabNavi" class="tab-navi">
|
254
|
+
<ul class="clearfix">
|
255
|
+
<li><span id="lang.remoteImage"></span></li>
|
256
|
+
<li><span id="lang.localImage"></span></li>
|
257
|
+
</ul>
|
258
|
+
</div>
|
259
|
+
<iframe name="uploadIframe" id="uploadIframe" style="display:none;"></iframe>
|
260
|
+
<input type="hidden" id="type" name="type" value="" />
|
261
|
+
<form id="uploadForm" name="uploadForm" method="post" enctype="multipart/form-data" target="uploadIframe">
|
262
|
+
<input type="hidden" id="editorId" name="id" value="" />
|
263
|
+
<input type="hidden" id="referMethod" name="referMethod" value="" />
|
264
|
+
<input type="hidden" name="imgBorder" value="0" />
|
265
|
+
<ul class="table">
|
266
|
+
<li style="height:30px;">
|
267
|
+
<div id="tab1" style="display:none;">
|
268
|
+
<label for="url" class="ke-inline-block"><span id="lang.remoteUrl"></span></label>
|
269
|
+
<input type="text" id="url" name="url" value="http://" maxlength="255" class="ke-inline-block ke-text-input url" />
|
270
|
+
<span class="ke-button-common ke-button-outer btn">
|
271
|
+
<input type="button" class="ke-button-common ke-button" id="viewServer" value="" />
|
272
|
+
</span>
|
273
|
+
</div>
|
274
|
+
<div id="tab2" style="display:none;">
|
275
|
+
<label for="imgFile" class="ke-inline-block"><span id="lang.localUrl"></span></label>
|
276
|
+
<span class="ke-inline-block upload">
|
277
|
+
<input type="text" id="localUrl" length="255" class="ke-inline-block ke-text-input url" tabindex="-1" readonly="true" />
|
278
|
+
<span class="ke-button-common ke-button-outer btn">
|
279
|
+
<input type="button" class="ke-button-common ke-button" id="viewLocal" value="" tabindex="-1" />
|
280
|
+
</span>
|
281
|
+
<input type="file" id="imgFile" name="imgFile" />
|
282
|
+
</span>
|
283
|
+
</div>
|
284
|
+
</li>
|
285
|
+
<li>
|
286
|
+
<label for="imgWidth" class="ke-inline-block"><span id="lang.size"></span></label>
|
287
|
+
<span id="lang.width"></span> <input type="text" id="imgWidth" name="imgWidth" value="" maxlength="4" class="ke-inline-block ke-text-input" style="width:50px;text-align:right;" />
|
288
|
+
<span id="lang.height"></span> <input type="text" id="imgHeight" name="imgHeight" value="" maxlength="4" class="ke-inline-block ke-text-input" style="width:50px;text-align:right;" />
|
289
|
+
<img class="ke-inline-block" src="./images/refresh.gif" width="16" height="16" id="resetBtn" alt="" />
|
290
|
+
</li>
|
291
|
+
<li>
|
292
|
+
<label class="ke-inline-block"><span id="lang.align"></span></label>
|
293
|
+
<input class="ke-inline-block" type="radio" id="defaultChk" name="align" value="" checked="checked" /> <img class="ke-inline-block" id="defaultImg" src="./images/align_top.gif" width="23" height="25" border="0" alt="" />
|
294
|
+
<input class="ke-inline-block" type="radio" id="leftChk" name="align" value="left" /> <img class="ke-inline-block" id="leftImg" src="./images/align_left.gif" width="23" height="25" border="0" alt="" />
|
295
|
+
<input class="ke-inline-block" type="radio" id="rightChk" name="align" value="right" /> <img class="ke-inline-block" id="rightImg" src="./images/align_right.gif" width="23" height="25" border="0" alt="" />
|
296
|
+
</li>
|
297
|
+
<li>
|
298
|
+
<label for="imgTitle" class="ke-inline-block"><span id="lang.imgTitle"></span></label>
|
299
|
+
<input type="text" id="imgTitle" name="imgTitle" value="" maxlength="255" class="ke-inline-block ke-text-input" style="width:95%;" />
|
300
|
+
</li>
|
301
|
+
</ul>
|
302
|
+
</form>
|
303
|
+
</div>
|
304
|
+
</body>
|
305
|
+
</html>
|
Binary file
|
Binary file
|
data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/align_top.gif
ADDED
Binary file
|
data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/refresh.gif
ADDED
Binary file
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<title>Link</title>
|
6
|
+
<link href="../../skins/default.css" rel="stylesheet" />
|
7
|
+
<style type="text/css" rel="stylesheet">
|
8
|
+
body {
|
9
|
+
margin: 0;
|
10
|
+
font:12px/1.5 "sans serif",tahoma,verdana,helvetica;
|
11
|
+
background-color:#F0F0EE;
|
12
|
+
color:#333;
|
13
|
+
overflow:hidden;
|
14
|
+
}
|
15
|
+
label {
|
16
|
+
cursor:pointer;
|
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
|
+
</style>
|
39
|
+
<script type="text/javascript">
|
40
|
+
var KE = parent.KindEditor;
|
41
|
+
var id = KE.util.getParam(location.href, 'id');
|
42
|
+
KE.event.ready(function() {
|
43
|
+
var hyperLink = KE.$('hyperLink', document);
|
44
|
+
var linkType = KE.$('linkType', document);
|
45
|
+
linkType.options[0] = new Option(KE.lang.plugins.link.newWindow, '_blank');
|
46
|
+
linkType.options[1] = new Option(KE.lang.plugins.link.selfWindow, '');
|
47
|
+
var linkNode = KE.plugin['link'].getSelectedNode(id);
|
48
|
+
if (linkNode) {
|
49
|
+
var tempDiv = KE.$$('div', KE.g[id].iframeDoc);
|
50
|
+
tempDiv.appendChild(linkNode.cloneNode(false));
|
51
|
+
var linkHtml = tempDiv.innerHTML;
|
52
|
+
var src = linkNode.href;
|
53
|
+
if (linkHtml.match(/kesrc="([^"]+)"/i)) src = RegExp.$1;
|
54
|
+
var target = linkNode.target;
|
55
|
+
hyperLink.value = KE.util.unescape(src);
|
56
|
+
linkType.value = target == '_blank' ? target : '';
|
57
|
+
var range = KE.g[id].keRange;
|
58
|
+
range.selectTextNode(linkNode);
|
59
|
+
KE.g[id].keSel.addRange(range);
|
60
|
+
}
|
61
|
+
KE.util.pluginLang('link', document);
|
62
|
+
KE.util.hideLoadingPage(id);
|
63
|
+
hyperLink.focus();
|
64
|
+
hyperLink.select();
|
65
|
+
}, window, document);
|
66
|
+
</script>
|
67
|
+
</head>
|
68
|
+
<body>
|
69
|
+
<div class="main">
|
70
|
+
<ul class="table">
|
71
|
+
<li>
|
72
|
+
<label for="hyperLink" class="ke-inline-block"><span id="lang.url"></span></label>
|
73
|
+
<input type="text" id="hyperLink" name="hyperLink" value="http://" class="ke-inline-block ke-text-input" style="width:90%;" />
|
74
|
+
</li>
|
75
|
+
<li>
|
76
|
+
<label for="linkType" class="ke-inline-block"><span id="lang.linkType"></span></label>
|
77
|
+
<select id="linkType" name="linkType" class="ke-inline-block"></select>
|
78
|
+
</li>
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
</body>
|
82
|
+
</html>
|