ueditor.rails 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +32 -0
  4. data/app/assets/javascripts/default.config.js +382 -0
  5. data/app/assets/javascripts/ueditor.js +2 -0
  6. data/lib/tasks/ueditor_on_rails_tasks.rake +4 -0
  7. data/lib/ueditor.rails.rb +17 -0
  8. data/lib/ueditor/engine.rb +23 -0
  9. data/lib/ueditor/helpers/form_builder.rb +11 -0
  10. data/lib/ueditor/helpers/form_helper.rb +13 -0
  11. data/lib/ueditor/helpers/js_helper.rb +13 -0
  12. data/lib/ueditor/helpers/view_helper.rb +13 -0
  13. data/lib/ueditor/hooks/simple_form.rb +16 -0
  14. data/lib/ueditor/version.rb +3 -0
  15. data/test/dummy/README.rdoc +28 -0
  16. data/test/dummy/Rakefile +6 -0
  17. data/test/dummy/app/assets/javascripts/application.js +14 -0
  18. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  19. data/test/dummy/app/controllers/application_controller.rb +5 -0
  20. data/test/dummy/app/controllers/dummy_controller.rb +18 -0
  21. data/test/dummy/app/helpers/application_helper.rb +2 -0
  22. data/test/dummy/app/models/dummy_model.rb +5 -0
  23. data/test/dummy/app/views/dummy/new.html.erb +22 -0
  24. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  25. data/test/dummy/bin/bundle +3 -0
  26. data/test/dummy/bin/rails +4 -0
  27. data/test/dummy/bin/rake +4 -0
  28. data/test/dummy/config.ru +4 -0
  29. data/test/dummy/config/application.rb +28 -0
  30. data/test/dummy/config/boot.rb +5 -0
  31. data/test/dummy/config/database.yml +25 -0
  32. data/test/dummy/config/environment.rb +5 -0
  33. data/test/dummy/config/environments/development.rb +34 -0
  34. data/test/dummy/config/environments/production.rb +80 -0
  35. data/test/dummy/config/environments/test.rb +39 -0
  36. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  37. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  38. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  39. data/test/dummy/config/initializers/inflections.rb +16 -0
  40. data/test/dummy/config/initializers/mime_types.rb +4 -0
  41. data/test/dummy/config/initializers/session_store.rb +3 -0
  42. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  43. data/test/dummy/config/locales/en.yml +23 -0
  44. data/test/dummy/config/routes.rb +4 -0
  45. data/test/dummy/config/secrets.yml +22 -0
  46. data/test/dummy/log/development.log +51 -0
  47. data/test/dummy/public/404.html +67 -0
  48. data/test/dummy/public/422.html +67 -0
  49. data/test/dummy/public/500.html +66 -0
  50. data/test/dummy/public/favicon.ico +0 -0
  51. data/test/dummy/tmp/cache/assets/development/sprockets/029530186b2a67ade6e57e578c85b454 +0 -0
  52. data/test/dummy/tmp/cache/assets/development/sprockets/02b56f18dcd4ddec585a02528773c04b +0 -0
  53. data/test/dummy/tmp/cache/assets/development/sprockets/07898ec696d976eeafb61ef6bb48e097 +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/0ab8e71a1cbfab4ba97406936b8424d8 +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/0d7c51218669ae27b1bb2d8ff9c9c1f9 +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/0f941886593d207e4ec1f3aba81f3189 +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/19694ecb6829b547affeb420f6c4f4ba +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/24fd9e383d10c56ae5bf72ce4e8d57d5 +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/2a3155304ce0d3a6b8245de3b211a442 +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/2ef8e8b9d212c49500f1cbb6ab432078 +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/2f6f08f80fb713b72a4c53eca782d352 +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/46de6851f078c896ce0a451fe8e67691 +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/4d359ff4c9c3e425adcf7471f456dd80 +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/63be665b75f7410b31ece33884eb8eef +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/7bd63ec22736e590f74f2614ba885123 +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/8165d0bcd2b5c04b4a98f4f0cbabef64 +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/8f07cc0565a08f28c45bc04f78ed9feb +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/9239aabeb118940064b039f4afb8f328 +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/92e3cf1ee6169034b72859923497867a +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/98ba4a17ce612c2782d52cb7f2a2beb9 +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/a38c0bac61b2d1e331de0057548aba0f +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/b0df046a48e07ba1cd75447c9732874b +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/b7d95afb3c2e49e813b301d797917b8c +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/bc3d8cda22ec9e1bf2cbe1f02cc13438 +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/bd22193b7c008abf93a7640553ee8b24 +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/c846ab366c3537979e0c1f64aa2c7e23 +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/ccf39b0f3aeafc89430db44186a59037 +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/ce2d1d6840444ec16109eb6d2cf8c224 +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/da3d050a8e457e6eb47cf56f3342fbd5 +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/db1e6b0095d2d333b72e73bdf3c40965 +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/e357c8a9ad97f42187ce017e3bf4a3ce +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/e37eb86c730315ed8a58688351abf8f9 +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/fa046bb067616da9d14862739bf2c67c +0 -0
  90. data/test/test_helper.rb +15 -0
  91. data/test/ueditor_on_rails_test.rb +7 -0
  92. data/vendor/assets/javascripts/ueditor/dialogs/anchor/anchor.html +40 -0
  93. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.css +681 -0
  94. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.html +60 -0
  95. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.js +754 -0
  96. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif +0 -0
  97. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
  98. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
  99. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
  100. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
  101. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
  102. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
  103. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
  104. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
  105. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
  106. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
  107. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
  108. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
  109. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.gif +0 -0
  110. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.png +0 -0
  111. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/bg.png +0 -0
  112. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.gif +0 -0
  113. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.png +0 -0
  114. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/icons.gif +0 -0
  115. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/icons.png +0 -0
  116. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/image.png +0 -0
  117. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/progress.png +0 -0
  118. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/success.gif +0 -0
  119. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/success.png +0 -0
  120. data/vendor/assets/javascripts/ueditor/dialogs/background/background.css +94 -0
  121. data/vendor/assets/javascripts/ueditor/dialogs/background/background.html +56 -0
  122. data/vendor/assets/javascripts/ueditor/dialogs/background/background.js +376 -0
  123. data/vendor/assets/javascripts/ueditor/dialogs/background/images/bg.png +0 -0
  124. data/vendor/assets/javascripts/ueditor/dialogs/background/images/success.png +0 -0
  125. data/vendor/assets/javascripts/ueditor/dialogs/charts/chart.config.js +65 -0
  126. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.css +165 -0
  127. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.html +89 -0
  128. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.js +519 -0
  129. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts0.png +0 -0
  130. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts1.png +0 -0
  131. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts2.png +0 -0
  132. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts3.png +0 -0
  133. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts4.png +0 -0
  134. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts5.png +0 -0
  135. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.css +43 -0
  136. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.html +54 -0
  137. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.js +186 -0
  138. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/0.gif +0 -0
  139. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/bface.gif +0 -0
  140. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/cface.gif +0 -0
  141. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/fface.gif +0 -0
  142. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
  143. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
  144. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/tface.gif +0 -0
  145. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/wface.gif +0 -0
  146. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/yface.gif +0 -0
  147. data/vendor/assets/javascripts/ueditor/dialogs/gmap/gmap.html +89 -0
  148. data/vendor/assets/javascripts/ueditor/dialogs/help/help.css +7 -0
  149. data/vendor/assets/javascripts/ueditor/dialogs/help/help.html +82 -0
  150. data/vendor/assets/javascripts/ueditor/dialogs/help/help.js +56 -0
  151. data/vendor/assets/javascripts/ueditor/dialogs/image/image.css +894 -0
  152. data/vendor/assets/javascripts/ueditor/dialogs/image/image.html +120 -0
  153. data/vendor/assets/javascripts/ueditor/dialogs/image/image.js +1139 -0
  154. data/vendor/assets/javascripts/ueditor/dialogs/image/images/alignicon.jpg +0 -0
  155. data/vendor/assets/javascripts/ueditor/dialogs/image/images/bg.png +0 -0
  156. data/vendor/assets/javascripts/ueditor/dialogs/image/images/icons.gif +0 -0
  157. data/vendor/assets/javascripts/ueditor/dialogs/image/images/icons.png +0 -0
  158. data/vendor/assets/javascripts/ueditor/dialogs/image/images/image.png +0 -0
  159. data/vendor/assets/javascripts/ueditor/dialogs/image/images/progress.png +0 -0
  160. data/vendor/assets/javascripts/ueditor/dialogs/image/images/success.gif +0 -0
  161. data/vendor/assets/javascripts/ueditor/dialogs/image/images/success.png +0 -0
  162. data/vendor/assets/javascripts/ueditor/dialogs/insertframe/insertframe.html +98 -0
  163. data/vendor/assets/javascripts/ueditor/dialogs/internal.js +81 -0
  164. data/vendor/assets/javascripts/ueditor/dialogs/link/link.html +126 -0
  165. data/vendor/assets/javascripts/ueditor/dialogs/map/map.html +135 -0
  166. data/vendor/assets/javascripts/ueditor/dialogs/map/show.html +118 -0
  167. data/vendor/assets/javascripts/ueditor/dialogs/music/music.css +30 -0
  168. data/vendor/assets/javascripts/ueditor/dialogs/music/music.html +32 -0
  169. data/vendor/assets/javascripts/ueditor/dialogs/music/music.js +192 -0
  170. data/vendor/assets/javascripts/ueditor/dialogs/preview/preview.html +40 -0
  171. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/addimg.png +0 -0
  172. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/brush.png +0 -0
  173. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/delimg.png +0 -0
  174. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/delimgH.png +0 -0
  175. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/empty.png +0 -0
  176. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/emptyH.png +0 -0
  177. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/eraser.png +0 -0
  178. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/redo.png +0 -0
  179. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/redoH.png +0 -0
  180. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/scale.png +0 -0
  181. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/scaleH.png +0 -0
  182. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/size.png +0 -0
  183. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/undo.png +0 -0
  184. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/undoH.png +0 -0
  185. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.css +72 -0
  186. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.html +95 -0
  187. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.js +671 -0
  188. data/vendor/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.html +102 -0
  189. data/vendor/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.js +164 -0
  190. data/vendor/assets/javascripts/ueditor/dialogs/snapscreen/snapscreen.html +58 -0
  191. data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.html +21 -0
  192. data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.js +57 -0
  193. data/vendor/assets/javascripts/ueditor/dialogs/table/dragicon.png +0 -0
  194. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.css +84 -0
  195. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.html +64 -0
  196. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.js +237 -0
  197. data/vendor/assets/javascripts/ueditor/dialogs/table/edittd.html +61 -0
  198. data/vendor/assets/javascripts/ueditor/dialogs/table/edittip.html +33 -0
  199. data/vendor/assets/javascripts/ueditor/dialogs/template/config.js +42 -0
  200. data/vendor/assets/javascripts/ueditor/dialogs/template/images/bg.gif +0 -0
  201. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre0.png +0 -0
  202. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre1.png +0 -0
  203. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre2.png +0 -0
  204. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre3.png +0 -0
  205. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre4.png +0 -0
  206. data/vendor/assets/javascripts/ueditor/dialogs/template/template.css +18 -0
  207. data/vendor/assets/javascripts/ueditor/dialogs/template/template.html +26 -0
  208. data/vendor/assets/javascripts/ueditor/dialogs/template/template.js +53 -0
  209. data/vendor/assets/javascripts/ueditor/dialogs/video/images/bg.png +0 -0
  210. data/vendor/assets/javascripts/ueditor/dialogs/video/images/center_focus.jpg +0 -0
  211. data/vendor/assets/javascripts/ueditor/dialogs/video/images/file-icons.gif +0 -0
  212. data/vendor/assets/javascripts/ueditor/dialogs/video/images/file-icons.png +0 -0
  213. data/vendor/assets/javascripts/ueditor/dialogs/video/images/icons.gif +0 -0
  214. data/vendor/assets/javascripts/ueditor/dialogs/video/images/icons.png +0 -0
  215. data/vendor/assets/javascripts/ueditor/dialogs/video/images/image.png +0 -0
  216. data/vendor/assets/javascripts/ueditor/dialogs/video/images/left_focus.jpg +0 -0
  217. data/vendor/assets/javascripts/ueditor/dialogs/video/images/none_focus.jpg +0 -0
  218. data/vendor/assets/javascripts/ueditor/dialogs/video/images/progress.png +0 -0
  219. data/vendor/assets/javascripts/ueditor/dialogs/video/images/right_focus.jpg +0 -0
  220. data/vendor/assets/javascripts/ueditor/dialogs/video/images/success.gif +0 -0
  221. data/vendor/assets/javascripts/ueditor/dialogs/video/images/success.png +0 -0
  222. data/vendor/assets/javascripts/ueditor/dialogs/video/video.css +635 -0
  223. data/vendor/assets/javascripts/ueditor/dialogs/video/video.html +86 -0
  224. data/vendor/assets/javascripts/ueditor/dialogs/video/video.js +789 -0
  225. data/vendor/assets/javascripts/ueditor/dialogs/webapp/webapp.html +53 -0
  226. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
  227. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/imageUploader.swf +0 -0
  228. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/tangram.js +1495 -0
  229. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/wordimage.html +111 -0
  230. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/wordimage.js +157 -0
  231. data/vendor/assets/javascripts/ueditor/index.html +175 -0
  232. data/vendor/assets/javascripts/ueditor/lang/en/en.js +684 -0
  233. data/vendor/assets/javascripts/ueditor/lang/en/images/addimage.png +0 -0
  234. data/vendor/assets/javascripts/ueditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
  235. data/vendor/assets/javascripts/ueditor/lang/en/images/alldeletebtnupskin.png +0 -0
  236. data/vendor/assets/javascripts/ueditor/lang/en/images/background.png +0 -0
  237. data/vendor/assets/javascripts/ueditor/lang/en/images/button.png +0 -0
  238. data/vendor/assets/javascripts/ueditor/lang/en/images/copy.png +0 -0
  239. data/vendor/assets/javascripts/ueditor/lang/en/images/deletedisable.png +0 -0
  240. data/vendor/assets/javascripts/ueditor/lang/en/images/deleteenable.png +0 -0
  241. data/vendor/assets/javascripts/ueditor/lang/en/images/listbackground.png +0 -0
  242. data/vendor/assets/javascripts/ueditor/lang/en/images/localimage.png +0 -0
  243. data/vendor/assets/javascripts/ueditor/lang/en/images/music.png +0 -0
  244. data/vendor/assets/javascripts/ueditor/lang/en/images/rotateleftdisable.png +0 -0
  245. data/vendor/assets/javascripts/ueditor/lang/en/images/rotateleftenable.png +0 -0
  246. data/vendor/assets/javascripts/ueditor/lang/en/images/rotaterightdisable.png +0 -0
  247. data/vendor/assets/javascripts/ueditor/lang/en/images/rotaterightenable.png +0 -0
  248. data/vendor/assets/javascripts/ueditor/lang/en/images/upload.png +0 -0
  249. data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/copy.png +0 -0
  250. data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/localimage.png +0 -0
  251. data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/music.png +0 -0
  252. data/vendor/assets/javascripts/ueditor/lang/zh-cn/images/upload.png +0 -0
  253. data/vendor/assets/javascripts/ueditor/lang/zh-cn/zh-cn.js +669 -0
  254. data/vendor/assets/javascripts/ueditor/themes/default/css/ueditor.css +1903 -0
  255. data/vendor/assets/javascripts/ueditor/themes/default/css/ueditor.min.css +8 -0
  256. data/vendor/assets/javascripts/ueditor/themes/default/dialogbase.css +100 -0
  257. data/vendor/assets/javascripts/ueditor/themes/default/images/anchor.gif +0 -0
  258. data/vendor/assets/javascripts/ueditor/themes/default/images/arrow.png +0 -0
  259. data/vendor/assets/javascripts/ueditor/themes/default/images/arrow_down.png +0 -0
  260. data/vendor/assets/javascripts/ueditor/themes/default/images/arrow_up.png +0 -0
  261. data/vendor/assets/javascripts/ueditor/themes/default/images/button-bg.gif +0 -0
  262. data/vendor/assets/javascripts/ueditor/themes/default/images/cancelbutton.gif +0 -0
  263. data/vendor/assets/javascripts/ueditor/themes/default/images/charts.png +0 -0
  264. data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_h.gif +0 -0
  265. data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_h.png +0 -0
  266. data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_v.gif +0 -0
  267. data/vendor/assets/javascripts/ueditor/themes/default/images/cursor_v.png +0 -0
  268. data/vendor/assets/javascripts/ueditor/themes/default/images/dialog-title-bg.png +0 -0
  269. data/vendor/assets/javascripts/ueditor/themes/default/images/filescan.png +0 -0
  270. data/vendor/assets/javascripts/ueditor/themes/default/images/highlighted.gif +0 -0
  271. data/vendor/assets/javascripts/ueditor/themes/default/images/icons-all.gif +0 -0
  272. data/vendor/assets/javascripts/ueditor/themes/default/images/icons.gif +0 -0
  273. data/vendor/assets/javascripts/ueditor/themes/default/images/icons.png +0 -0
  274. data/vendor/assets/javascripts/ueditor/themes/default/images/loaderror.png +0 -0
  275. data/vendor/assets/javascripts/ueditor/themes/default/images/loading.gif +0 -0
  276. data/vendor/assets/javascripts/ueditor/themes/default/images/lock.gif +0 -0
  277. data/vendor/assets/javascripts/ueditor/themes/default/images/neweditor-tab-bg.png +0 -0
  278. data/vendor/assets/javascripts/ueditor/themes/default/images/pagebreak.gif +0 -0
  279. data/vendor/assets/javascripts/ueditor/themes/default/images/scale.png +0 -0
  280. data/vendor/assets/javascripts/ueditor/themes/default/images/sortable.png +0 -0
  281. data/vendor/assets/javascripts/ueditor/themes/default/images/spacer.gif +0 -0
  282. data/vendor/assets/javascripts/ueditor/themes/default/images/sparator_v.png +0 -0
  283. data/vendor/assets/javascripts/ueditor/themes/default/images/table-cell-align.png +0 -0
  284. data/vendor/assets/javascripts/ueditor/themes/default/images/tangram-colorpicker.png +0 -0
  285. data/vendor/assets/javascripts/ueditor/themes/default/images/toolbar_bg.png +0 -0
  286. data/vendor/assets/javascripts/ueditor/themes/default/images/unhighlighted.gif +0 -0
  287. data/vendor/assets/javascripts/ueditor/themes/default/images/upload.png +0 -0
  288. data/vendor/assets/javascripts/ueditor/themes/default/images/videologo.gif +0 -0
  289. data/vendor/assets/javascripts/ueditor/themes/default/images/word.gif +0 -0
  290. data/vendor/assets/javascripts/ueditor/themes/default/images/wordpaste.png +0 -0
  291. data/vendor/assets/javascripts/ueditor/themes/iframe.css +1 -0
  292. data/vendor/assets/javascripts/ueditor/third-party/codemirror/codemirror.css +104 -0
  293. data/vendor/assets/javascripts/ueditor/third-party/codemirror/codemirror.js +3581 -0
  294. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
  295. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js +9 -0
  296. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
  297. data/vendor/assets/javascripts/ueditor/ueditor.all.js +29429 -0
  298. data/vendor/assets/javascripts/ueditor/ueditor.all.min.js +709 -0
  299. data/vendor/assets/javascripts/ueditor/ueditor.config.js +413 -0
  300. data/vendor/assets/javascripts/ueditor/ueditor.parse.js +1022 -0
  301. data/vendor/assets/javascripts/ueditor/ueditor.parse.min.js +28 -0
  302. metadata +464 -0
@@ -0,0 +1,118 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+ <head>
5
+ <meta charset="utf-8"/>
6
+ <meta name="keywords" content="百度地图,百度地图API,百度地图自定义工具,百度地图所见即所得工具"/>
7
+ <meta name="description" content="百度地图API自定义地图,帮助用户在可视化操作下生成百度地图"/>
8
+ <title>百度地图API自定义地图</title>
9
+ <!--引用百度地图API-->
10
+ <style type="text/css">
11
+ html, body {
12
+ margin: 0;
13
+ padding: 0;
14
+ overflow: hidden;
15
+ }
16
+ </style>
17
+ <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
18
+ </head>
19
+
20
+ <body onload="initMap();">
21
+ <!--百度地图容器-->
22
+ <div style="width:697px;height:550px;border:#ccc solid 1px;" id="dituContent"></div>
23
+ </body>
24
+ <script type="text/javascript">
25
+ function getParam(name) {
26
+ return location.href.match(new RegExp('[?#&]' + name + '=([^?#&]+)', 'i')) ? RegExp.$1 : '';
27
+ }
28
+ var map, marker;
29
+ var centerParam = getParam('center');
30
+ var zoomParam = getParam('zoom');
31
+ var widthParam = getParam('width');
32
+ var heightParam = getParam('height');
33
+ var markersParam = getParam('markers');
34
+ var markerStylesParam = getParam('markerStyles');
35
+
36
+ //创建和初始化地图函数:
37
+ function initMap() {
38
+ // [FF]切换模式后报错
39
+ if (!window.BMap) {
40
+ return;
41
+ }
42
+ var dituContent = document.getElementById('dituContent');
43
+ dituContent.style.width = widthParam + 'px';
44
+ dituContent.style.height = heightParam + 'px';
45
+
46
+ createMap();//创建地图
47
+ setMapEvent();//设置地图事件
48
+ addMapControl();//向地图添加控件
49
+
50
+ // 创建标注
51
+ var markersArr = markersParam.split(',');
52
+ var point = new BMap.Point(markersArr[0], markersArr[1]);
53
+ marker = new BMap.Marker(point);
54
+ marker.enableDragging();
55
+ map.addOverlay(marker); // 将标注添加到地图中
56
+
57
+ if(parent.editor && parent.document.body.contentEditable=="true") { //在编辑状态下
58
+ setMapListener();//地图改变修改外层的iframe标签src属性
59
+ }
60
+ }
61
+
62
+ //创建地图函数:
63
+ function createMap() {
64
+ map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
65
+ var centerArr = centerParam.split(',');
66
+ var point = new BMap.Point(parseFloat(centerArr[0]), parseFloat(centerArr[1]));//定义一个中心点坐标
67
+ map.centerAndZoom(point, parseInt(zoomParam));//设定地图的中心点和坐标并将地图显示在地图容器中
68
+ }
69
+
70
+ //地图事件设置函数:
71
+ function setMapEvent() {
72
+ map.enableDragging();//启用地图拖拽事件,默认启用(可不写)
73
+ map.enableScrollWheelZoom();//启用地图滚轮放大缩小
74
+ map.enableDoubleClickZoom();//启用鼠标双击放大,默认启用(可不写)
75
+ map.enableKeyboard();//启用键盘上下左右键移动地图
76
+ }
77
+
78
+ //地图控件添加函数:
79
+ function addMapControl() {
80
+ //向地图中添加缩放控件
81
+ var ctrl_nav = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE});
82
+ map.addControl(ctrl_nav);
83
+ //向地图中添加缩略图控件
84
+ var ctrl_ove = new BMap.OverviewMapControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 1});
85
+ map.addControl(ctrl_ove);
86
+ //向地图中添加比例尺控件
87
+ var ctrl_sca = new BMap.ScaleControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT});
88
+ map.addControl(ctrl_sca);
89
+ }
90
+
91
+ function setMapListener() {
92
+ var editor = parent.editor, containerIframe,
93
+ iframes = parent.document.getElementsByTagName('iframe');
94
+ for (var key in iframes) {
95
+ if (iframes[key].contentWindow == window) {
96
+ containerIframe = iframes[key];
97
+ break;
98
+ }
99
+ }
100
+ if (containerIframe) {
101
+ map.addEventListener('moveend', mapListenerHandler);
102
+ map.addEventListener('zoomend', mapListenerHandler);
103
+ marker.addEventListener('dragend', mapListenerHandler);
104
+ }
105
+
106
+ function mapListenerHandler() {
107
+ var zoom = map.getZoom(),
108
+ center = map.getCenter(),
109
+ marker = window.marker.getPoint();
110
+ containerIframe.src = containerIframe.src.
111
+ replace(new RegExp('([?#&])center=([^?#&]+)', 'i'), '$1center=' + center.lng + ',' + center.lat).
112
+ replace(new RegExp('([?#&])markers=([^?#&]+)', 'i'), '$1markers=' + marker.lng + ',' + marker.lat).
113
+ replace(new RegExp('([?#&])zoom=([^?#&]+)', 'i'), '$1zoom=' + zoom);
114
+ editor.fireEvent('saveScene');
115
+ }
116
+ }
117
+ </script>
118
+ </html>
@@ -0,0 +1,30 @@
1
+ .wrapper{margin: 5px 10px;}
2
+
3
+ .searchBar{height:30px;padding:7px 0 3px;text-align:center;}
4
+ .searchBtn{font-size:13px;height:24px;}
5
+
6
+ .resultBar{width:460px;margin:5px auto;border: 1px solid #CCC;border-radius: 5px;box-shadow: 2px 2px 5px #D3D6DA;overflow: hidden;}
7
+
8
+ .listPanel{overflow: hidden;}
9
+ .panelon{display:block;}
10
+ .paneloff{display:none}
11
+
12
+ .page{width:220px;margin:20px auto;overflow: hidden;}
13
+ .pageon{float:right;width:24px;line-height:24px;height:24px;margin-right: 5px;background: none;border: none;color: #000;font-weight: bold;text-align:center}
14
+ .pageoff{float:right;width:24px;line-height:24px;height:24px;cursor:pointer;background-color: #fff;
15
+ border: 1px solid #E7ECF0;color: #2D64B3;margin-right: 5px;text-decoration: none;text-align:center;}
16
+
17
+ .m-box{width:460px;}
18
+ .m-m{float: left;line-height: 20px;height: 20px;}
19
+ .m-h{height:24px;line-height:24px;padding-left: 46px;background-color:#FAFAFA;border-bottom: 1px solid #DAD8D8;font-weight: bold;font-size: 12px;color: #333;}
20
+ .m-l{float:left;width:40px; }
21
+ .m-t{float:left;width:140px;}
22
+ .m-s{float:left;width:110px;}
23
+ .m-z{float:left;width:100px;}
24
+ .m-try-t{float: left;width: 60px;;}
25
+
26
+ .m-try{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/try_music.gif') no-repeat ;}
27
+ .m-trying{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/stop_music.gif') no-repeat ;}
28
+
29
+ .loading{width:95px;height:7px;font-size:7px;margin:60px auto;background:url(http://static.tieba.baidu.com/tb/editor/images/loading.gif) no-repeat}
30
+ .empty{width:300px;height:40px;padding:2px;margin:50px auto;line-height:40px; color:#006699;text-align:center;}
@@ -0,0 +1,32 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
5
+ <title>插入音乐</title>
6
+ <script type="text/javascript" src="../internal.js"></script>
7
+ <link rel="stylesheet" type="text/css" href="music.css">
8
+ </head>
9
+ <body>
10
+ <div class="wrapper">
11
+ <div class="searchBar">
12
+ <input id="J_searchName" type="text"/>
13
+ <input type="button" class="searchBtn" id="J_searchBtn">
14
+ </div>
15
+ <div class="resultBar" id="J_resultBar">
16
+ <div class="loading" style="display:none"></div>
17
+ <div class="empty"><var id="lang_input_tips"></var></div>
18
+ </div>
19
+ <div id="J_preview"></div>
20
+ </div>
21
+ <script type="text/javascript" src="music.js"></script>
22
+ <script type="text/javascript">
23
+ var music = new Music;
24
+ dialog.onok = function () {
25
+ music.exec();
26
+ };
27
+ dialog.oncancel = function () {
28
+ $G('J_preview').innerHTML = "";
29
+ };
30
+ </script>
31
+ </body>
32
+ </html>
@@ -0,0 +1,192 @@
1
+ function Music() {
2
+ this.init();
3
+ }
4
+ (function () {
5
+ var pages = [],
6
+ panels = [],
7
+ selectedItem = null;
8
+ Music.prototype = {
9
+ total:70,
10
+ pageSize:10,
11
+ dataUrl:"http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.common",
12
+ playerUrl:"http://box.baidu.com/widget/flash/bdspacesong.swf",
13
+
14
+ init:function () {
15
+ var me = this;
16
+ domUtils.on($G("J_searchName"), "keyup", function (event) {
17
+ var e = window.event || event;
18
+ if (e.keyCode == 13) {
19
+ me.dosearch();
20
+ }
21
+ });
22
+ domUtils.on($G("J_searchBtn"), "click", function () {
23
+ me.dosearch();
24
+ });
25
+ },
26
+ callback:function (data) {
27
+ var me = this;
28
+ me.data = data.song_list;
29
+ setTimeout(function () {
30
+ $G('J_resultBar').innerHTML = me._renderTemplate(data.song_list);
31
+ }, 300);
32
+ },
33
+ dosearch:function () {
34
+ var me = this;
35
+ selectedItem = null;
36
+ var key = $G('J_searchName').value;
37
+ if (utils.trim(key) == "")return false;
38
+ key = encodeURIComponent(key);
39
+ me._sent(key);
40
+ },
41
+ doselect:function (i) {
42
+ var me = this;
43
+ if (typeof i == 'object') {
44
+ selectedItem = i;
45
+ } else if (typeof i == 'number') {
46
+ selectedItem = me.data[i];
47
+ }
48
+ },
49
+ onpageclick:function (id) {
50
+ var me = this;
51
+ for (var i = 0; i < pages.length; i++) {
52
+ $G(pages[i]).className = 'pageoff';
53
+ $G(panels[i]).className = 'paneloff';
54
+ }
55
+ $G('page' + id).className = 'pageon';
56
+ $G('panel' + id).className = 'panelon';
57
+ },
58
+ listenTest:function (elem) {
59
+ var me = this,
60
+ view = $G('J_preview'),
61
+ is_play_action = (elem.className == 'm-try'),
62
+ old_trying = me._getTryingElem();
63
+
64
+ if (old_trying) {
65
+ old_trying.className = 'm-try';
66
+ view.innerHTML = '';
67
+ }
68
+ if (is_play_action) {
69
+ elem.className = 'm-trying';
70
+ view.innerHTML = me._buildMusicHtml(me._getUrl(true));
71
+ }
72
+ },
73
+ _sent:function (param) {
74
+ var me = this;
75
+ $G('J_resultBar').innerHTML = '<div class="loading"></div>';
76
+
77
+ utils.loadFile(document, {
78
+ src:me.dataUrl + '&query=' + param + '&page_size=' + me.total + '&callback=music.callback&.r=' + Math.random(),
79
+ tag:"script",
80
+ type:"text/javascript",
81
+ defer:"defer"
82
+ });
83
+ },
84
+ _removeHtml:function (str) {
85
+ var reg = /<\s*\/?\s*[^>]*\s*>/gi;
86
+ return str.replace(reg, "");
87
+ },
88
+ _getUrl:function (isTryListen) {
89
+ var me = this;
90
+ var param = 'from=tiebasongwidget&url=&name=' + encodeURIComponent(me._removeHtml(selectedItem.title)) + '&artist='
91
+ + encodeURIComponent(me._removeHtml(selectedItem.author)) + '&extra='
92
+ + encodeURIComponent(me._removeHtml(selectedItem.album_title))
93
+ + '&autoPlay='+isTryListen+'' + '&loop=true';
94
+ return me.playerUrl + "?" + param;
95
+ },
96
+ _getTryingElem:function () {
97
+ var s = $G('J_listPanel').getElementsByTagName('span');
98
+
99
+ for (var i = 0; i < s.length; i++) {
100
+ if (s[i].className == 'm-trying')
101
+ return s[i];
102
+ }
103
+ return null;
104
+ },
105
+ _buildMusicHtml:function (playerUrl) {
106
+ var html = '<embed class="BDE_try_Music" allowfullscreen="false" pluginspage="http://www.macromedia.com/go/getflashplayer"';
107
+ html += ' src="' + playerUrl + '"';
108
+ html += ' width="1" height="1" style="position:absolute;left:-2000px;"';
109
+ html += ' type="application/x-shockwave-flash" wmode="transparent" play="true" loop="false"';
110
+ html += ' menu="false" allowscriptaccess="never" scale="noborder">';
111
+ return html;
112
+ },
113
+ _byteLength:function (str) {
114
+ return str.replace(/[^\u0000-\u007f]/g, "\u0061\u0061").length;
115
+ },
116
+ _getMaxText:function (s) {
117
+ var me = this;
118
+ s = me._removeHtml(s);
119
+ if (me._byteLength(s) > 12)
120
+ return s.substring(0, 5) + '...';
121
+ if (!s) s = "&nbsp;";
122
+ return s;
123
+ },
124
+ _rebuildData:function (data) {
125
+ var me = this,
126
+ newData = [],
127
+ d = me.pageSize,
128
+ itembox;
129
+ for (var i = 0; i < data.length; i++) {
130
+ if ((i + d) % d == 0) {
131
+ itembox = [];
132
+ newData.push(itembox)
133
+ }
134
+ itembox.push(data[i]);
135
+ }
136
+ return newData;
137
+ },
138
+ _renderTemplate:function (data) {
139
+ var me = this;
140
+ if (data.length == 0)return '<div class="empty">' + lang.emptyTxt + '</div>';
141
+ data = me._rebuildData(data);
142
+ var s = [], p = [], t = [];
143
+ s.push('<div id="J_listPanel" class="listPanel">');
144
+ p.push('<div class="page">');
145
+ for (var i = 0, tmpList; tmpList = data[i++];) {
146
+ panels.push('panel' + i);
147
+ pages.push('page' + i);
148
+ if (i == 1) {
149
+ s.push('<div id="panel' + i + '" class="panelon">');
150
+ if (data.length != 1) {
151
+ t.push('<div id="page' + i + '" onclick="music.onpageclick(' + i + ')" class="pageon">' + (i ) + '</div>');
152
+ }
153
+ } else {
154
+ s.push('<div id="panel' + i + '" class="paneloff">');
155
+ t.push('<div id="page' + i + '" onclick="music.onpageclick(' + i + ')" class="pageoff">' + (i ) + '</div>');
156
+ }
157
+ s.push('<div class="m-box">');
158
+ s.push('<div class="m-h"><span class="m-t">' + lang.chapter + '</span><span class="m-s">' + lang.singer
159
+ + '</span><span class="m-z">' + lang.special + '</span><span class="m-try-t">' + lang.listenTest + '</span></div>');
160
+ for (var j = 0, tmpObj; tmpObj = tmpList[j++];) {
161
+ s.push('<label for="radio-' + i + '-' + j + '" class="m-m">');
162
+ s.push('<input type="radio" id="radio-' + i + '-' + j + '" name="musicId" class="m-l" onclick="music.doselect(' + (me.pageSize * (i-1) + (j-1)) + ')"/>');
163
+ s.push('<span class="m-t">' + me._getMaxText(tmpObj.title) + '</span>');
164
+ s.push('<span class="m-s">' + me._getMaxText(tmpObj.author) + '</span>');
165
+ s.push('<span class="m-z">' + me._getMaxText(tmpObj.album_title) + '</span>');
166
+ s.push('<span class="m-try" onclick="music.doselect(' + (me.pageSize * (i-1) + (j-1)) + ');music.listenTest(this)"></span>');
167
+ s.push('</label>');
168
+ }
169
+ s.push('</div>');
170
+ s.push('</div>');
171
+ }
172
+ t.reverse();
173
+ p.push(t.join(''));
174
+ s.push('</div>');
175
+ p.push('</div>');
176
+ return s.join('') + p.join('');
177
+ },
178
+ exec:function () {
179
+ var me = this;
180
+ if (selectedItem == null) return;
181
+ $G('J_preview').innerHTML = "";
182
+ editor.execCommand('music', {
183
+ url:me._getUrl(false),
184
+ width:400,
185
+ height:95
186
+ });
187
+ }
188
+ };
189
+ })();
190
+
191
+
192
+
@@ -0,0 +1,40 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
+ "http://www.w3.org/TR/html4/loose.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <style>
7
+ html,body{
8
+ height:100%;
9
+ width:100%;
10
+ padding:0;
11
+ margin:0;
12
+ }
13
+ #preview{
14
+ width:100%;
15
+ height:100%;
16
+ padding:0;
17
+ margin:0;
18
+ }
19
+ #preview *{font-family:sans-serif;font-size:16px;}
20
+ </style>
21
+ <script type="text/javascript" src="../internal.js"></script>
22
+ <script src="../../ueditor.parse.js"></script>
23
+ <title></title>
24
+ </head>
25
+ <body class="view">
26
+ <div id="preview" style="margin:8px">
27
+
28
+ </div>
29
+ </body>
30
+ <script>
31
+ document.getElementById('preview').innerHTML = editor.getContent();
32
+ uParse('#preview',{
33
+ rootPath : '../../',
34
+ chartContainerHeight:500
35
+ })
36
+ dialog.oncancel = function(){
37
+ document.getElementById('preview').innerHTML = '';
38
+ }
39
+ </script>
40
+ </html>