kindeditor 0.0.2

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