rails_kindeditor 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/README.rdoc +34 -0
  4. data/Rakefile +2 -0
  5. data/app/controllers/kindeditor/assets_controller.rb +50 -0
  6. data/app/models/kindeditor/asset.rb +14 -0
  7. data/app/models/kindeditor/file.rb +4 -0
  8. data/app/models/kindeditor/image.rb +4 -0
  9. data/app/uploaders/kindeditor/file_uploader.rb +54 -0
  10. data/app/uploaders/kindeditor/image_uploader.rb +54 -0
  11. data/config/routes.rb +7 -0
  12. data/lib/generators/rails_kindeditor/install/USAGE +9 -0
  13. data/lib/generators/rails_kindeditor/install/install_generator.rb +11 -0
  14. data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor-init.js +7 -0
  15. data/lib/generators/rails_kindeditor/install/templates/kindeditor/kindeditor.js +4688 -0
  16. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/about.html +52 -0
  17. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/accessory.html +74 -0
  18. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/advtable/advtable.html +235 -0
  19. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/advtable/cell.html +201 -0
  20. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/0.gif +0 -0
  21. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/1.gif +0 -0
  22. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/10.gif +0 -0
  23. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/100.gif +0 -0
  24. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/101.gif +0 -0
  25. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/102.gif +0 -0
  26. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/103.gif +0 -0
  27. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/104.gif +0 -0
  28. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/105.gif +0 -0
  29. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/106.gif +0 -0
  30. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/107.gif +0 -0
  31. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/108.gif +0 -0
  32. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/109.gif +0 -0
  33. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/11.gif +0 -0
  34. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/110.gif +0 -0
  35. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/111.gif +0 -0
  36. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/112.gif +0 -0
  37. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/113.gif +0 -0
  38. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/114.gif +0 -0
  39. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/115.gif +0 -0
  40. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/116.gif +0 -0
  41. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/117.gif +0 -0
  42. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/118.gif +0 -0
  43. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/119.gif +0 -0
  44. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/12.gif +0 -0
  45. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/120.gif +0 -0
  46. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/121.gif +0 -0
  47. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/122.gif +0 -0
  48. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/123.gif +0 -0
  49. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/124.gif +0 -0
  50. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/125.gif +0 -0
  51. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/126.gif +0 -0
  52. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/127.gif +0 -0
  53. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/128.gif +0 -0
  54. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/129.gif +0 -0
  55. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/13.gif +0 -0
  56. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/130.gif +0 -0
  57. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/131.gif +0 -0
  58. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/132.gif +0 -0
  59. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/133.gif +0 -0
  60. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/134.gif +0 -0
  61. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/14.gif +0 -0
  62. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/15.gif +0 -0
  63. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/16.gif +0 -0
  64. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/17.gif +0 -0
  65. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/18.gif +0 -0
  66. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/19.gif +0 -0
  67. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/2.gif +0 -0
  68. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/20.gif +0 -0
  69. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/21.gif +0 -0
  70. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/22.gif +0 -0
  71. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/23.gif +0 -0
  72. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/24.gif +0 -0
  73. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/25.gif +0 -0
  74. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/26.gif +0 -0
  75. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/27.gif +0 -0
  76. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/28.gif +0 -0
  77. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/29.gif +0 -0
  78. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/3.gif +0 -0
  79. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/30.gif +0 -0
  80. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/31.gif +0 -0
  81. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/32.gif +0 -0
  82. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/33.gif +0 -0
  83. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/34.gif +0 -0
  84. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/35.gif +0 -0
  85. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/36.gif +0 -0
  86. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/37.gif +0 -0
  87. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/38.gif +0 -0
  88. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/39.gif +0 -0
  89. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/4.gif +0 -0
  90. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/40.gif +0 -0
  91. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/41.gif +0 -0
  92. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/42.gif +0 -0
  93. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/43.gif +0 -0
  94. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/44.gif +0 -0
  95. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/45.gif +0 -0
  96. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/46.gif +0 -0
  97. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/47.gif +0 -0
  98. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/48.gif +0 -0
  99. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/49.gif +0 -0
  100. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/5.gif +0 -0
  101. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/50.gif +0 -0
  102. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/51.gif +0 -0
  103. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/52.gif +0 -0
  104. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/53.gif +0 -0
  105. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/54.gif +0 -0
  106. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/55.gif +0 -0
  107. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/56.gif +0 -0
  108. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/57.gif +0 -0
  109. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/58.gif +0 -0
  110. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/59.gif +0 -0
  111. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/6.gif +0 -0
  112. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/60.gif +0 -0
  113. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/61.gif +0 -0
  114. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/62.gif +0 -0
  115. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/63.gif +0 -0
  116. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/64.gif +0 -0
  117. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/65.gif +0 -0
  118. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/66.gif +0 -0
  119. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/67.gif +0 -0
  120. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/68.gif +0 -0
  121. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/69.gif +0 -0
  122. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/7.gif +0 -0
  123. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/70.gif +0 -0
  124. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/71.gif +0 -0
  125. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/72.gif +0 -0
  126. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/73.gif +0 -0
  127. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/74.gif +0 -0
  128. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/75.gif +0 -0
  129. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/76.gif +0 -0
  130. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/77.gif +0 -0
  131. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/78.gif +0 -0
  132. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/79.gif +0 -0
  133. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/8.gif +0 -0
  134. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/80.gif +0 -0
  135. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/81.gif +0 -0
  136. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/82.gif +0 -0
  137. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/83.gif +0 -0
  138. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/84.gif +0 -0
  139. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/85.gif +0 -0
  140. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/86.gif +0 -0
  141. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/87.gif +0 -0
  142. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/88.gif +0 -0
  143. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/89.gif +0 -0
  144. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/9.gif +0 -0
  145. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/90.gif +0 -0
  146. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/91.gif +0 -0
  147. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/92.gif +0 -0
  148. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/93.gif +0 -0
  149. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/94.gif +0 -0
  150. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/95.gif +0 -0
  151. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/96.gif +0 -0
  152. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/97.gif +0 -0
  153. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/98.gif +0 -0
  154. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/99.gif +0 -0
  155. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/emoticons/qq.gif +0 -0
  156. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.css +64 -0
  157. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.html +31 -0
  158. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/file_manager.js +221 -0
  159. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/file-16.gif +0 -0
  160. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/file-64.gif +0 -0
  161. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/folder-16.gif +0 -0
  162. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/folder-64.gif +0 -0
  163. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/file_manager/images/go-up.gif +0 -0
  164. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/flash.html +69 -0
  165. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/image.html +305 -0
  166. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/align_left.gif +0 -0
  167. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/align_right.gif +0 -0
  168. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/align_top.gif +0 -0
  169. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/image/images/refresh.gif +0 -0
  170. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/link/link.html +82 -0
  171. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/media.html +73 -0
  172. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/plainpaste.html +44 -0
  173. data/lib/generators/rails_kindeditor/install/templates/kindeditor/plugins/wordpaste.html +50 -0
  174. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/blank.gif +0 -0
  175. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/doc.gif +0 -0
  176. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/editor.css +47 -0
  177. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/flash.gif +0 -0
  178. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/loading.gif +0 -0
  179. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/media.gif +0 -0
  180. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/mp3.gif +0 -0
  181. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/pdf.gif +0 -0
  182. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/rar.gif +0 -0
  183. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/rm.gif +0 -0
  184. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/common/xls.gif +0 -0
  185. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/default/bg.gif +0 -0
  186. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/default/default.gif +0 -0
  187. data/lib/generators/rails_kindeditor/install/templates/kindeditor/skins/default.css +911 -0
  188. data/lib/generators/rails_kindeditor/migration/USAGE +13 -0
  189. data/lib/generators/rails_kindeditor/migration/migration_generator.rb +20 -0
  190. data/lib/generators/rails_kindeditor/migration/templates/migration/migration.rb +15 -0
  191. data/lib/rails_kindeditor/engine.rb +9 -0
  192. data/lib/rails_kindeditor/version.rb +3 -0
  193. data/lib/rails_kindeditor.rb +10 -0
  194. data/rails_kindeditor.gemspec +24 -0
  195. metadata +259 -0
@@ -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>&nbsp;
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>&nbsp;
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>&nbsp;
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>&nbsp;
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>&nbsp;
287
+ <span id="lang.width"></span>&nbsp;<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>&nbsp;<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>&nbsp;
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>
@@ -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>&nbsp;
77
+ <select id="linkType" name="linkType" class="ke-inline-block"></select>
78
+ </li>
79
+ </ul>
80
+ </div>
81
+ </body>
82
+ </html>