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,52 @@
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
+ var id = KE.util.getParam(location.href, 'id');
34
+ KE.event.ready(function() {
35
+ KE.util.pluginLang('about', document);
36
+ KE.util.hideLoadingPage(id);
37
+ }, window, document);
38
+ </script>
39
+ </head>
40
+ <body>
41
+ <div class="main">
42
+ <ul class="table">
43
+ <li>
44
+ KindEditor <span id="lang.version"></span></span>
45
+ </li>
46
+ <li>
47
+ Copyright &copy; <a href="http://www.kindsoft.net/" target="_blank">kindsoft.net</a> All rights reserved.
48
+ </li>
49
+ </ul>
50
+ </div>
51
+ </body>
52
+ </html>
@@ -0,0 +1,74 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>Accessory</title>
6
+ <style type="text/css" rel="stylesheet">
7
+ body {
8
+ font-size:12px;
9
+ margin: 0px;
10
+ background-color:#F0F0EE;
11
+ overflow: hidden;
12
+ }
13
+ td.left1 {
14
+ font-size:12px;
15
+ width: 50px;
16
+ padding: 2px;
17
+ }
18
+ td.right1 {
19
+ font-size:12px;
20
+ padding: 2px;
21
+ }
22
+ td.left2 {
23
+ font-size:12px;
24
+ width: 35px;
25
+ padding: 2px;
26
+ }
27
+ td.right2 {
28
+ font-size:12px;
29
+ padding: 2px;
30
+ width: 50px;
31
+ }
32
+ </style>
33
+ <script type="text/javascript">
34
+ function changeType(obj) {
35
+ var url = document.getElementById('url');
36
+ var imgFile = document.getElementById('imgFile');
37
+ var trRemark = document.getElementById('trRemark');
38
+ if (obj.value == 1) {
39
+ url.style.display = 'none';
40
+ imgFile.style.display = '';
41
+ trRemark.style.display = 'none';
42
+ } else {
43
+ url.style.display = '';
44
+ imgFile.style.display = 'none';
45
+ trRemark.style.display = '';
46
+ }
47
+ }
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <form name="uploadForm" method="post" enctype="multipart/form-data" action="/kindeditor/upload">
52
+ <input type="hidden" id="editorId" name="id" value="" />
53
+ <table border="0" cellpadding="0" cellspacing="0">
54
+ <tr>
55
+ <td class="left1">
56
+ <select id="type" name="type" onchange="changeType(this);">
57
+ <option value="1" selected="selected">Upload</option>
58
+ <option value="2">Insert URL</option>
59
+ </select>
60
+ </td>
61
+ <td class="right1">
62
+ <input type="file" id="imgFile" name="imgFile" style="width:220px;" />
63
+ <input type="text" id="url" name="url" value="http://" maxlength="255" style="width:220px;display:none;" />
64
+ </td>
65
+ </tr>
66
+ <tr id="trRemark" style="display:none;">
67
+ <td class="left1" align="right">Description:</td>
68
+ <td class="right1"><input type="text" id="description" name="description" value="uploaded file" maxlength="100" style="width:220px;" /></td>
69
+ </tr>
70
+ </table>
71
+ </form>
72
+ </body>
73
+ </html>
74
+
@@ -0,0 +1,235 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Table</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
+ width:60px;
18
+ margin-right:5px;
19
+ }
20
+ .main {
21
+ margin: 0 10px;
22
+ }
23
+ .table {
24
+ list-style-image:none;
25
+ list-style-position:outside;
26
+ list-style-type:none;
27
+ margin:0;
28
+ padding:0;
29
+ display:block;
30
+ }
31
+ .table li {
32
+ padding:0;
33
+ margin-bottom:10px;
34
+ display:list-item;
35
+ line-height:1.5;
36
+ }
37
+ .table li label {
38
+ font-weight:bold;
39
+ }
40
+ .table li input {
41
+ vertical-align:middle;
42
+ }
43
+ .table li input.text {
44
+ width:50px;
45
+ }
46
+ .margin-right-10 {
47
+ margin-right:10px;
48
+ }
49
+ .color-picker {
50
+ border: 1px solid #A0A0A0;
51
+ background-color: #FFFFFF;
52
+ font-size: 12px;
53
+ width: 60px;
54
+ height: 20px;
55
+ line-height: 20px;
56
+ padding-left: 5px;
57
+ overflow: hidden;
58
+ cursor: pointer;
59
+ }
60
+ </style>
61
+ <script type="text/javascript">
62
+ var KE = parent.KindEditor;
63
+ var id = KE.util.getParam(location.href, 'id');
64
+ var mode = KE.util.getParam(location.href, 'mode');
65
+ KE.event.ready(function() {
66
+ var modeBox = KE.$('mode', document);
67
+ var rowsBox = KE.$('rows', document);
68
+ var colsBox = KE.$('cols', document);
69
+ var widthBox = KE.$('width', document);
70
+ var heightBox = KE.$('height', document);
71
+ var widthTypeBox = KE.$('widthType', document);
72
+ var heightTypeBox = KE.$('heightType', document);
73
+ var paddingBox = KE.$('padding', document);
74
+ var spacingBox = KE.$('spacing', document);
75
+ var alignBox = KE.$('align', document);
76
+ var borderBox = KE.$('border', document);
77
+ var borderColorBox = KE.$('borderColor', document);
78
+ var backgroundColorBox = KE.$('backgroundColor', document);
79
+ var lang = KE.lang.plugins.advtable;
80
+ widthTypeBox.options[0] = new Option(lang.percent, '%');
81
+ widthTypeBox.options[1] = new Option(lang.px, 'px');
82
+ heightTypeBox.options[0] = new Option(lang.percent, '%');
83
+ heightTypeBox.options[1] = new Option(lang.px, 'px');
84
+ alignBox.options[0] = new Option(lang.alignDefault, '');
85
+ alignBox.options[1] = new Option(lang.alignLeft, 'left');
86
+ alignBox.options[2] = new Option(lang.alignCenter, 'center');
87
+ alignBox.options[3] = new Option(lang.alignRight, 'right');
88
+ var rows = 3;
89
+ var cols = 2;
90
+ var width = 100;
91
+ var height = '';
92
+ var widthType = '%';
93
+ var heightType = '%';
94
+ var padding = 2;
95
+ var spacing = 0;
96
+ var align = '';
97
+ var border = 1;
98
+ var borderColor = '#000000';
99
+ var backgroundColor = '';
100
+ var table = KE.plugin.advtable.getSelectedTable(id);
101
+ if (mode === 'default' && table) mode = 'update';
102
+ if (mode === 'update') {
103
+ rows = table.rows.length;
104
+ cols = rows > 0 ? table.rows[0].cells.length : 0;
105
+ rowsBox.disabled = true;
106
+ colsBox.disabled = true;
107
+ var tableWidth = table.style.width || table.width;
108
+ var tableHeight = table.style.height || table.height;
109
+ if (tableWidth !== undefined && tableWidth.match(/^(\d+)((?:px|%)*)$/)) {
110
+ width = RegExp.$1;
111
+ widthType = RegExp.$2;
112
+ } else {
113
+ width = '';
114
+ }
115
+ if (tableHeight !== undefined && tableHeight.match(/^(\d+)((?:px|%)*)$/)) {
116
+ height = RegExp.$1;
117
+ heightType = RegExp.$2;
118
+ }
119
+ padding = table.cellPadding || '';
120
+ spacing = table.cellSpacing || '';
121
+ align = table.align || '';
122
+ border = (table.border === undefined) ? '' : table.border;
123
+ borderColor = table.getAttribute('borderColor') || '';
124
+ backgroundColor = table.style.backgroundColor || table.bgColor || '';
125
+ borderColor = KE.util.rgbToHex(borderColor).toUpperCase();
126
+ backgroundColor = KE.util.rgbToHex(backgroundColor).toUpperCase();
127
+ }
128
+ modeBox.value = mode;
129
+ rowsBox.value = rows;
130
+ colsBox.value = cols;
131
+ widthBox.value = width;
132
+ heightBox.value = height;
133
+ widthTypeBox.value = widthType;
134
+ heightTypeBox.value = heightType;
135
+ paddingBox.value = padding;
136
+ spacingBox.value = spacing;
137
+ alignBox.value = align;
138
+ borderBox.value = border;
139
+ function setColor(el, color) {
140
+ el.style.backgroundColor = color;
141
+ el.style.color = (color == '#000000') ? '#FFFFFF' : '#000000';
142
+ el.innerHTML = color;
143
+ }
144
+ setColor(borderColorBox, borderColor);
145
+ setColor(backgroundColorBox, backgroundColor);
146
+ var picker;
147
+ var currentElement;
148
+ function removePicker() {
149
+ if (picker) {
150
+ picker.remove();
151
+ picker = null;
152
+ currentElement = null;
153
+ }
154
+ }
155
+ function onclickFunc(el) {
156
+ if (picker && el === currentElement) {
157
+ removePicker();
158
+ } else {
159
+ removePicker();
160
+ var dialog = KE.g[id].dialogStack[0];
161
+ dialog.beforeHide = removePicker;
162
+ dialog.ondrag = removePicker;
163
+ var scrollPos = KE.util.getScrollPos();
164
+ var iframePos = KE.util.getElementPos(dialog.iframe);
165
+ var pos = KE.util.getElementPos(el);
166
+ picker = new KE.colorpicker({
167
+ x : iframePos.x + pos.x - scrollPos.x,
168
+ y : iframePos.y + pos.y - scrollPos.y + 22,
169
+ z : dialog.zIndex + 1,
170
+ onclick : function(color) {
171
+ setColor(el, color);
172
+ removePicker();
173
+ },
174
+ selectedColor : (el.innerHTML || '')
175
+ });
176
+ picker.create();
177
+ currentElement = el;
178
+ }
179
+ }
180
+ borderColorBox.onclick = function() {
181
+ onclickFunc(borderColorBox);
182
+ };
183
+ backgroundColorBox.onclick = function() {
184
+ onclickFunc(backgroundColorBox);
185
+ };
186
+ KE.util.pluginLang('advtable', document);
187
+ KE.util.hideLoadingPage(id);
188
+ if (mode === 'update') {
189
+ widthBox.focus();
190
+ widthBox.select();
191
+ } else {
192
+ rowsBox.focus();
193
+ rowsBox.select();
194
+ }
195
+ }, window, document);
196
+ </script>
197
+ </head>
198
+ <body>
199
+ <div class="main">
200
+ <input type="hidden" id="mode" name="mode" value="" />
201
+ <ul class="table">
202
+ <li>
203
+ <label for="rows" class="ke-inline-block"><span id="lang.cells"></span></label>
204
+ <span id="lang.rows"></span>&nbsp;<input type="text" id="rows" name="rows" value="" maxlength="4" class="ke-inline-block ke-text-input text margin-right-10" />
205
+ <span id="lang.cols"></span>&nbsp;<input type="text" id="cols" name="cols" value="" maxlength="4" class="ke-inline-block ke-text-input text" />
206
+ </li>
207
+ <li>
208
+ <label for="width" class="ke-inline-block"><span id="lang.size"></span></label>
209
+ <span id="lang.width"></span>&nbsp;<input type="text" id="width" name="width" value="" maxlength="4" class="ke-inline-block ke-text-input text" />
210
+ <select id="widthType" name="widthType" class="ke-inline-block margin-right-10"></select>
211
+ <span id="lang.height"></span>&nbsp;<input type="text" id="height" name="height" value="" maxlength="4" class="ke-inline-block ke-text-input text" />
212
+ <select id="heightType" name="heightType" class="ke-inline-block margin-right-10"></select>
213
+ </li>
214
+ <li>
215
+ <label for="padding" class="ke-inline-block"><span id="lang.space"></span></label>
216
+ <span id="lang.padding"></span>&nbsp;<input type="text" id="padding" name="padding" value="" maxlength="4" class="ke-inline-block ke-text-input text margin-right-10" />
217
+ <span id="lang.spacing"></span>&nbsp;<input type="text" id="spacing" name="spacing" value="" maxlength="4" class="ke-inline-block ke-text-input text" />
218
+ </li>
219
+ <li>
220
+ <label for="align" class="ke-inline-block"><span id="lang.align"></span></label>
221
+ <select id="align" name="align" class="ke-inline-block"></select>
222
+ </li>
223
+ <li>
224
+ <label for="border" class="ke-inline-block"><span id="lang.border"></span></label>
225
+ <span id="lang.borderWidth"></span>&nbsp;<input type="text" id="border" name="border" value="" maxlength="4" class="ke-inline-block ke-text-input text margin-right-10" />
226
+ <span id="lang.borderColor"></span>&nbsp;<span id="borderColor" class="ke-inline-block color-picker"></span>
227
+ </li>
228
+ <li>
229
+ <label for="backgroundColor" class="ke-inline-block"><span id="lang.backgroundColor"></span></label>
230
+ <span id="backgroundColor" class="ke-inline-block color-picker"></span>
231
+ </li>
232
+ </ul>
233
+ </div>
234
+ </body>
235
+ </html>
@@ -0,0 +1,201 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Cell</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
+ width:60px;
18
+ margin-right:5px;
19
+ }
20
+ .main {
21
+ margin: 0 10px;
22
+ }
23
+ .table {
24
+ list-style-image:none;
25
+ list-style-position:outside;
26
+ list-style-type:none;
27
+ margin:0;
28
+ padding:0;
29
+ display:block;
30
+ }
31
+ .table li {
32
+ padding:0;
33
+ margin-bottom:10px;
34
+ display:list-item;
35
+ line-height:1.5;
36
+ }
37
+ .table li label {
38
+ font-weight:bold;
39
+ }
40
+ .table li input {
41
+ vertical-align:middle;
42
+ }
43
+ .table li input.text {
44
+ width:50px;
45
+ }
46
+ .margin-right-10 {
47
+ margin-right:10px;
48
+ }
49
+ .color-picker {
50
+ border: 1px solid #A0A0A0;
51
+ background-color: #FFFFFF;
52
+ font-size: 12px;
53
+ width: 60px;
54
+ height: 20px;
55
+ line-height: 20px;
56
+ padding-left: 5px;
57
+ overflow: hidden;
58
+ cursor: pointer;
59
+ }
60
+ </style>
61
+ <script type="text/javascript">
62
+ var KE = parent.KindEditor;
63
+ var id = KE.util.getParam(location.href, 'id');
64
+ var mode = KE.util.getParam(location.href, 'mode');
65
+ KE.event.ready(function() {
66
+ var widthBox = KE.$('width', document);
67
+ var heightBox = KE.$('height', document);
68
+ var widthTypeBox = KE.$('widthType', document);
69
+ var heightTypeBox = KE.$('heightType', document);
70
+ var textAlignBox = KE.$('textAlign', document);
71
+ var verticalAlignBox = KE.$('verticalAlign', document);
72
+ var borderBox = KE.$('border', document);
73
+ var borderColorBox = KE.$('borderColor', document);
74
+ var backgroundColorBox = KE.$('backgroundColor', document);
75
+ var lang = KE.lang.plugins.advtable;
76
+ widthTypeBox.options[0] = new Option(lang.percent, '%');
77
+ widthTypeBox.options[1] = new Option(lang.px, 'px');
78
+ heightTypeBox.options[0] = new Option(lang.percent, '%');
79
+ heightTypeBox.options[1] = new Option(lang.px, 'px');
80
+ textAlignBox.options[0] = new Option(lang.alignDefault, '');
81
+ textAlignBox.options[1] = new Option(lang.alignLeft, 'left');
82
+ textAlignBox.options[2] = new Option(lang.alignCenter, 'center');
83
+ textAlignBox.options[3] = new Option(lang.alignRight, 'right');
84
+ verticalAlignBox.options[0] = new Option(lang.alignDefault, '');
85
+ verticalAlignBox.options[1] = new Option(lang.alignTop, 'top');
86
+ verticalAlignBox.options[2] = new Option(lang.alignMiddle, 'middle');
87
+ verticalAlignBox.options[3] = new Option(lang.alignBottom, 'bottom');
88
+ verticalAlignBox.options[4] = new Option(lang.alignBaseline, 'baseline');
89
+ var width = '';
90
+ var height = '';
91
+ var widthType = 'px';
92
+ var heightType = 'px';
93
+ var cell = KE.plugin.advtable.getSelectedCell(id);
94
+ var cellWidth = cell.style.width || cell.width || '';
95
+ var cellHeight = cell.style.height || cell.height || '';
96
+ var match;
97
+ if ((match = /^(\d+)((?:px|%)*)$/.exec(cellWidth))) {
98
+ width = match[1];
99
+ widthType = match[2];
100
+ }
101
+ if ((match = /^(\d+)((?:px|%)*)$/.exec(cellHeight))) {
102
+ height = match[1];
103
+ heightType = match[2];
104
+ }
105
+ var textAlign = cell.style.textAlign || '';
106
+ var verticalAlign = cell.style.verticalAlign || '';
107
+ var border = cell.style.borderWidth || '';
108
+ if (border) border = parseInt(border);
109
+ var borderColor = cell.style.borderColor || '';
110
+ var backgroundColor = cell.style.backgroundColor || '';
111
+ var borderColor = KE.util.rgbToHex(borderColor).toUpperCase();
112
+ var backgroundColor = KE.util.rgbToHex(backgroundColor).toUpperCase();
113
+ widthBox.value = width;
114
+ heightBox.value = height;
115
+ widthTypeBox.value = widthType;
116
+ heightTypeBox.value = heightType;
117
+ textAlignBox.value = textAlign;
118
+ verticalAlignBox.value = verticalAlign;
119
+ borderBox.value = border;
120
+ function setColor(el, color) {
121
+ el.style.backgroundColor = color;
122
+ el.style.color = (color == '#000000') ? '#FFFFFF' : '#000000';
123
+ el.innerHTML = color;
124
+ }
125
+ setColor(borderColorBox, borderColor);
126
+ setColor(backgroundColorBox, backgroundColor);
127
+ var picker;
128
+ var currentElement;
129
+ function removePicker() {
130
+ if (picker) {
131
+ picker.remove();
132
+ picker = null;
133
+ currentElement = null;
134
+ }
135
+ }
136
+ function onclickFunc(el) {
137
+ if (picker && el === currentElement) {
138
+ removePicker();
139
+ } else {
140
+ removePicker();
141
+ var dialog = KE.g[id].dialogStack[0];
142
+ dialog.beforeHide = removePicker;
143
+ dialog.ondrag = removePicker;
144
+ var scrollPos = KE.util.getScrollPos();
145
+ var iframePos = KE.util.getElementPos(dialog.iframe);
146
+ var pos = KE.util.getElementPos(el);
147
+ picker = new KE.colorpicker({
148
+ x : iframePos.x + pos.x - scrollPos.x,
149
+ y : iframePos.y + pos.y - scrollPos.y + 22,
150
+ z : dialog.zIndex + 1,
151
+ onclick : function(color) {
152
+ setColor(el, color);
153
+ removePicker();
154
+ },
155
+ selectedColor : (el.innerHTML || '')
156
+ });
157
+ picker.create();
158
+ currentElement = el;
159
+ }
160
+ }
161
+ borderColorBox.onclick = function() {
162
+ onclickFunc(borderColorBox);
163
+ };
164
+ backgroundColorBox.onclick = function() {
165
+ onclickFunc(backgroundColorBox);
166
+ };
167
+ KE.util.pluginLang('advtable', document);
168
+ KE.util.hideLoadingPage(id);
169
+ widthBox.focus();
170
+ widthBox.select();
171
+ }, window, document);
172
+ </script>
173
+ </head>
174
+ <body>
175
+ <div class="main">
176
+ <ul class="table">
177
+ <li>
178
+ <label for="width" class="ke-inline-block"><span id="lang.size"></span></label>
179
+ <span id="lang.width"></span>&nbsp;<input type="text" id="width" name="width" value="" maxlength="4" class="ke-inline-block ke-text-input text" />
180
+ <select id="widthType" name="widthType" align="absmiddle" class="ke-inline-block margin-right-10"></select>
181
+ <span id="lang.height"></span>&nbsp;<input type="text" id="height" name="height" value="" maxlength="4" class="ke-inline-block ke-text-input text" />
182
+ <select id="heightType" name="heightType" align="absmiddle" class="ke-inline-block margin-right-10"></select>
183
+ </li>
184
+ <li>
185
+ <label for="align" class="ke-inline-block"><span id="lang.align"></span></label>
186
+ <span id="lang.textAlign"></span>&nbsp;<select id="textAlign" name="textAlign" class="ke-inline-block margin-right-10"></select>
187
+ <span id="lang.verticalAlign"></span>&nbsp;<select id="verticalAlign" name="verticalAlign" class="ke-inline-block"></select>
188
+ </li>
189
+ <li>
190
+ <label for="border" class="ke-inline-block"><span id="lang.border"></span></label>
191
+ <span id="lang.borderWidth"></span>&nbsp;<input type="text" id="border" name="border" value="" maxlength="4" class="ke-inline-block ke-text-input text margin-right-10" />
192
+ <span id="lang.borderColor"></span>&nbsp;<span id="borderColor" class="ke-inline-block color-picker"></span>
193
+ </li>
194
+ <li>
195
+ <label for="backgroundColor" class="ke-inline-block"><span id="lang.backgroundColor"></span></label>
196
+ <span id="backgroundColor" class="ke-inline-block color-picker"></span>
197
+ </li>
198
+ </ul>
199
+ </div>
200
+ </body>
201
+ </html>