baidu_ueditor_rails5 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (277) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/javascripts/baidu_ueditor.js +1 -1
  4. data/app/assets/javascripts/ueditor/dialogs/anchor/anchor.html +40 -0
  5. data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.css +681 -0
  6. data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.html +60 -0
  7. data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.js +754 -0
  8. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif +0 -0
  9. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
  10. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
  11. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
  12. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
  13. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
  14. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
  15. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
  16. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
  17. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
  18. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
  19. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
  20. data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
  21. data/app/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.gif +0 -0
  22. data/app/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.png +0 -0
  23. data/app/assets/javascripts/ueditor/dialogs/attachment/images/bg.png +0 -0
  24. data/app/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.gif +0 -0
  25. data/app/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.png +0 -0
  26. data/app/assets/javascripts/ueditor/dialogs/attachment/images/icons.gif +0 -0
  27. data/app/assets/javascripts/ueditor/dialogs/attachment/images/icons.png +0 -0
  28. data/app/assets/javascripts/ueditor/dialogs/attachment/images/image.png +0 -0
  29. data/app/assets/javascripts/ueditor/dialogs/attachment/images/progress.png +0 -0
  30. data/app/assets/javascripts/ueditor/dialogs/attachment/images/success.gif +0 -0
  31. data/app/assets/javascripts/ueditor/dialogs/attachment/images/success.png +0 -0
  32. data/app/assets/javascripts/ueditor/dialogs/background/background.css +94 -0
  33. data/app/assets/javascripts/ueditor/dialogs/background/background.html +56 -0
  34. data/app/assets/javascripts/ueditor/dialogs/background/background.js +376 -0
  35. data/app/assets/javascripts/ueditor/dialogs/background/images/bg.png +0 -0
  36. data/app/assets/javascripts/ueditor/dialogs/background/images/success.png +0 -0
  37. data/app/assets/javascripts/ueditor/dialogs/charts/chart.config.js +65 -0
  38. data/app/assets/javascripts/ueditor/dialogs/charts/charts.css +165 -0
  39. data/app/assets/javascripts/ueditor/dialogs/charts/charts.html +89 -0
  40. data/app/assets/javascripts/ueditor/dialogs/charts/charts.js +519 -0
  41. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts0.png +0 -0
  42. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts1.png +0 -0
  43. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts2.png +0 -0
  44. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts3.png +0 -0
  45. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts4.png +0 -0
  46. data/app/assets/javascripts/ueditor/dialogs/charts/images/charts5.png +0 -0
  47. data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.css +43 -0
  48. data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.html +54 -0
  49. data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.js +186 -0
  50. data/app/assets/javascripts/ueditor/dialogs/emotion/images/0.gif +0 -0
  51. data/app/assets/javascripts/ueditor/dialogs/emotion/images/bface.gif +0 -0
  52. data/app/assets/javascripts/ueditor/dialogs/emotion/images/cface.gif +0 -0
  53. data/app/assets/javascripts/ueditor/dialogs/emotion/images/fface.gif +0 -0
  54. data/app/assets/javascripts/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
  55. data/app/assets/javascripts/ueditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
  56. data/app/assets/javascripts/ueditor/dialogs/emotion/images/tface.gif +0 -0
  57. data/app/assets/javascripts/ueditor/dialogs/emotion/images/wface.gif +0 -0
  58. data/app/assets/javascripts/ueditor/dialogs/emotion/images/yface.gif +0 -0
  59. data/app/assets/javascripts/ueditor/dialogs/gmap/gmap.html +89 -0
  60. data/app/assets/javascripts/ueditor/dialogs/help/help.css +7 -0
  61. data/app/assets/javascripts/ueditor/dialogs/help/help.html +82 -0
  62. data/app/assets/javascripts/ueditor/dialogs/help/help.js +56 -0
  63. data/app/assets/javascripts/ueditor/dialogs/image/image.css +894 -0
  64. data/app/assets/javascripts/ueditor/dialogs/image/image.html +120 -0
  65. data/app/assets/javascripts/ueditor/dialogs/image/image.js +1142 -0
  66. data/app/assets/javascripts/ueditor/dialogs/image/images/alignicon.jpg +0 -0
  67. data/app/assets/javascripts/ueditor/dialogs/image/images/bg.png +0 -0
  68. data/app/assets/javascripts/ueditor/dialogs/image/images/icons.gif +0 -0
  69. data/app/assets/javascripts/ueditor/dialogs/image/images/icons.png +0 -0
  70. data/app/assets/javascripts/ueditor/dialogs/image/images/image.png +0 -0
  71. data/app/assets/javascripts/ueditor/dialogs/image/images/progress.png +0 -0
  72. data/app/assets/javascripts/ueditor/dialogs/image/images/success.gif +0 -0
  73. data/app/assets/javascripts/ueditor/dialogs/image/images/success.png +0 -0
  74. data/app/assets/javascripts/ueditor/dialogs/insertframe/insertframe.html +98 -0
  75. data/app/assets/javascripts/ueditor/dialogs/internal.js +81 -0
  76. data/app/assets/javascripts/ueditor/dialogs/link/link.html +126 -0
  77. data/app/assets/javascripts/ueditor/dialogs/map/map.html +135 -0
  78. data/app/assets/javascripts/ueditor/dialogs/map/show.html +118 -0
  79. data/app/assets/javascripts/ueditor/dialogs/music/music.css +30 -0
  80. data/app/assets/javascripts/ueditor/dialogs/music/music.html +32 -0
  81. data/app/assets/javascripts/ueditor/dialogs/music/music.js +192 -0
  82. data/app/assets/javascripts/ueditor/dialogs/preview/preview.html +40 -0
  83. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/addimg.png +0 -0
  84. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/brush.png +0 -0
  85. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/delimg.png +0 -0
  86. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/delimgH.png +0 -0
  87. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/empty.png +0 -0
  88. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/emptyH.png +0 -0
  89. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/eraser.png +0 -0
  90. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/redo.png +0 -0
  91. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/redoH.png +0 -0
  92. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/scale.png +0 -0
  93. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/scaleH.png +0 -0
  94. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/size.png +0 -0
  95. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/undo.png +0 -0
  96. data/app/assets/javascripts/ueditor/dialogs/scrawl/images/undoH.png +0 -0
  97. data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.css +72 -0
  98. data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.html +95 -0
  99. data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.js +671 -0
  100. data/app/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.html +102 -0
  101. data/app/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.js +164 -0
  102. data/app/assets/javascripts/ueditor/dialogs/snapscreen/snapscreen.html +58 -0
  103. data/app/assets/javascripts/ueditor/dialogs/spechars/spechars.html +21 -0
  104. data/app/assets/javascripts/ueditor/dialogs/spechars/spechars.js +57 -0
  105. data/app/assets/javascripts/ueditor/dialogs/table/dragicon.png +0 -0
  106. data/app/assets/javascripts/ueditor/dialogs/table/edittable.css +84 -0
  107. data/app/assets/javascripts/ueditor/dialogs/table/edittable.html +64 -0
  108. data/app/assets/javascripts/ueditor/dialogs/table/edittable.js +237 -0
  109. data/app/assets/javascripts/ueditor/dialogs/table/edittd.html +61 -0
  110. data/app/assets/javascripts/ueditor/dialogs/table/edittip.html +33 -0
  111. data/app/assets/javascripts/ueditor/dialogs/template/config.js +42 -0
  112. data/app/assets/javascripts/ueditor/dialogs/template/images/bg.gif +0 -0
  113. data/app/assets/javascripts/ueditor/dialogs/template/images/pre0.png +0 -0
  114. data/app/assets/javascripts/ueditor/dialogs/template/images/pre1.png +0 -0
  115. data/app/assets/javascripts/ueditor/dialogs/template/images/pre2.png +0 -0
  116. data/app/assets/javascripts/ueditor/dialogs/template/images/pre3.png +0 -0
  117. data/app/assets/javascripts/ueditor/dialogs/template/images/pre4.png +0 -0
  118. data/app/assets/javascripts/ueditor/dialogs/template/template.css +18 -0
  119. data/app/assets/javascripts/ueditor/dialogs/template/template.html +26 -0
  120. data/app/assets/javascripts/ueditor/dialogs/template/template.js +53 -0
  121. data/app/assets/javascripts/ueditor/dialogs/video/images/bg.png +0 -0
  122. data/app/assets/javascripts/ueditor/dialogs/video/images/center_focus.jpg +0 -0
  123. data/app/assets/javascripts/ueditor/dialogs/video/images/file-icons.gif +0 -0
  124. data/app/assets/javascripts/ueditor/dialogs/video/images/file-icons.png +0 -0
  125. data/app/assets/javascripts/ueditor/dialogs/video/images/icons.gif +0 -0
  126. data/app/assets/javascripts/ueditor/dialogs/video/images/icons.png +0 -0
  127. data/app/assets/javascripts/ueditor/dialogs/video/images/image.png +0 -0
  128. data/app/assets/javascripts/ueditor/dialogs/video/images/left_focus.jpg +0 -0
  129. data/app/assets/javascripts/ueditor/dialogs/video/images/none_focus.jpg +0 -0
  130. data/app/assets/javascripts/ueditor/dialogs/video/images/progress.png +0 -0
  131. data/app/assets/javascripts/ueditor/dialogs/video/images/right_focus.jpg +0 -0
  132. data/app/assets/javascripts/ueditor/dialogs/video/images/success.gif +0 -0
  133. data/app/assets/javascripts/ueditor/dialogs/video/images/success.png +0 -0
  134. data/app/assets/javascripts/ueditor/dialogs/video/video.css +635 -0
  135. data/app/assets/javascripts/ueditor/dialogs/video/video.html +86 -0
  136. data/app/assets/javascripts/ueditor/dialogs/video/video.js +791 -0
  137. data/app/assets/javascripts/ueditor/dialogs/webapp/webapp.html +53 -0
  138. data/app/assets/javascripts/ueditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
  139. data/app/assets/javascripts/ueditor/dialogs/wordimage/imageUploader.swf +0 -0
  140. data/app/assets/javascripts/ueditor/dialogs/wordimage/tangram.js +1495 -0
  141. data/app/assets/javascripts/ueditor/dialogs/wordimage/wordimage.html +111 -0
  142. data/app/assets/javascripts/ueditor/dialogs/wordimage/wordimage.js +157 -0
  143. data/app/assets/javascripts/ueditor/index.html +175 -0
  144. data/app/assets/javascripts/ueditor/lang/en/en.js +684 -0
  145. data/app/assets/javascripts/ueditor/lang/en/images/addimage.png +0 -0
  146. data/app/assets/javascripts/ueditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
  147. data/app/assets/javascripts/ueditor/lang/en/images/alldeletebtnupskin.png +0 -0
  148. data/app/assets/javascripts/ueditor/lang/en/images/background.png +0 -0
  149. data/app/assets/javascripts/ueditor/lang/en/images/button.png +0 -0
  150. data/app/assets/javascripts/ueditor/lang/en/images/copy.png +0 -0
  151. data/app/assets/javascripts/ueditor/lang/en/images/deletedisable.png +0 -0
  152. data/app/assets/javascripts/ueditor/lang/en/images/deleteenable.png +0 -0
  153. data/app/assets/javascripts/ueditor/lang/en/images/listbackground.png +0 -0
  154. data/app/assets/javascripts/ueditor/lang/en/images/localimage.png +0 -0
  155. data/app/assets/javascripts/ueditor/lang/en/images/music.png +0 -0
  156. data/app/assets/javascripts/ueditor/lang/en/images/rotateleftdisable.png +0 -0
  157. data/app/assets/javascripts/ueditor/lang/en/images/rotateleftenable.png +0 -0
  158. data/app/assets/javascripts/ueditor/lang/en/images/rotaterightdisable.png +0 -0
  159. data/app/assets/javascripts/ueditor/lang/en/images/rotaterightenable.png +0 -0
  160. data/app/assets/javascripts/ueditor/lang/en/images/upload.png +0 -0
  161. data/app/assets/javascripts/ueditor/lang/zh-cn/images/copy.png +0 -0
  162. data/app/assets/javascripts/ueditor/lang/zh-cn/images/localimage.png +0 -0
  163. data/app/assets/javascripts/ueditor/lang/zh-cn/images/music.png +0 -0
  164. data/app/assets/javascripts/ueditor/lang/zh-cn/images/upload.png +0 -0
  165. data/app/assets/javascripts/ueditor/lang/zh-cn/zh-cn.js +669 -0
  166. data/app/assets/javascripts/ueditor/themes/default/css/ueditor.css +1903 -0
  167. data/app/assets/javascripts/ueditor/themes/default/css/ueditor.min.css +8 -0
  168. data/app/assets/javascripts/ueditor/themes/default/dialogbase.css +100 -0
  169. data/app/assets/javascripts/ueditor/themes/default/images/anchor.gif +0 -0
  170. data/app/assets/javascripts/ueditor/themes/default/images/arrow.png +0 -0
  171. data/app/assets/javascripts/ueditor/themes/default/images/arrow_down.png +0 -0
  172. data/app/assets/javascripts/ueditor/themes/default/images/arrow_up.png +0 -0
  173. data/app/assets/javascripts/ueditor/themes/default/images/button-bg.gif +0 -0
  174. data/app/assets/javascripts/ueditor/themes/default/images/cancelbutton.gif +0 -0
  175. data/app/assets/javascripts/ueditor/themes/default/images/charts.png +0 -0
  176. data/app/assets/javascripts/ueditor/themes/default/images/cursor_h.gif +0 -0
  177. data/app/assets/javascripts/ueditor/themes/default/images/cursor_h.png +0 -0
  178. data/app/assets/javascripts/ueditor/themes/default/images/cursor_v.gif +0 -0
  179. data/app/assets/javascripts/ueditor/themes/default/images/cursor_v.png +0 -0
  180. data/app/assets/javascripts/ueditor/themes/default/images/dialog-title-bg.png +0 -0
  181. data/app/assets/javascripts/ueditor/themes/default/images/filescan.png +0 -0
  182. data/app/assets/javascripts/ueditor/themes/default/images/highlighted.gif +0 -0
  183. data/app/assets/javascripts/ueditor/themes/default/images/icons-all.gif +0 -0
  184. data/app/assets/javascripts/ueditor/themes/default/images/icons.gif +0 -0
  185. data/app/assets/javascripts/ueditor/themes/default/images/icons.png +0 -0
  186. data/app/assets/javascripts/ueditor/themes/default/images/loaderror.png +0 -0
  187. data/app/assets/javascripts/ueditor/themes/default/images/loading.gif +0 -0
  188. data/app/assets/javascripts/ueditor/themes/default/images/lock.gif +0 -0
  189. data/app/assets/javascripts/ueditor/themes/default/images/neweditor-tab-bg.png +0 -0
  190. data/app/assets/javascripts/ueditor/themes/default/images/pagebreak.gif +0 -0
  191. data/app/assets/javascripts/ueditor/themes/default/images/scale.png +0 -0
  192. data/app/assets/javascripts/ueditor/themes/default/images/sortable.png +0 -0
  193. data/app/assets/javascripts/ueditor/themes/default/images/spacer.gif +0 -0
  194. data/app/assets/javascripts/ueditor/themes/default/images/sparator_v.png +0 -0
  195. data/app/assets/javascripts/ueditor/themes/default/images/table-cell-align.png +0 -0
  196. data/app/assets/javascripts/ueditor/themes/default/images/tangram-colorpicker.png +0 -0
  197. data/app/assets/javascripts/ueditor/themes/default/images/toolbar_bg.png +0 -0
  198. data/app/assets/javascripts/ueditor/themes/default/images/unhighlighted.gif +0 -0
  199. data/app/assets/javascripts/ueditor/themes/default/images/upload.png +0 -0
  200. data/app/assets/javascripts/ueditor/themes/default/images/videologo.gif +0 -0
  201. data/app/assets/javascripts/ueditor/themes/default/images/word.gif +0 -0
  202. data/app/assets/javascripts/ueditor/themes/default/images/wordpaste.png +0 -0
  203. data/app/assets/javascripts/ueditor/themes/iframe.css +1 -0
  204. data/app/assets/javascripts/ueditor/third-party/SyntaxHighlighter/shCore.js +3655 -0
  205. data/app/assets/javascripts/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css +1 -0
  206. data/app/assets/javascripts/ueditor/third-party/codemirror/codemirror.css +104 -0
  207. data/app/assets/javascripts/ueditor/third-party/codemirror/codemirror.js +3581 -0
  208. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/mootools-adapter.js +13 -0
  209. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/mootools-adapter.src.js +313 -0
  210. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/prototype-adapter.js +15 -0
  211. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/prototype-adapter.src.js +316 -0
  212. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/standalone-framework.js +17 -0
  213. data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/standalone-framework.src.js +583 -0
  214. data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts-more.js +50 -0
  215. data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts-more.src.js +2430 -0
  216. data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts.js +283 -0
  217. data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts.src.js +16974 -0
  218. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/annotations.js +7 -0
  219. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/annotations.src.js +401 -0
  220. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/canvas-tools.js +133 -0
  221. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/canvas-tools.src.js +3113 -0
  222. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/data.js +17 -0
  223. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/data.src.js +582 -0
  224. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/drilldown.js +11 -0
  225. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/drilldown.src.js +447 -0
  226. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/exporting.js +22 -0
  227. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/exporting.src.js +709 -0
  228. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/funnel.js +12 -0
  229. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/funnel.src.js +289 -0
  230. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.js +1 -0
  231. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js +53 -0
  232. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/map.js +27 -0
  233. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/map.src.js +1002 -0
  234. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/no-data-to-display.js +12 -0
  235. data/app/assets/javascripts/ueditor/third-party/highcharts/modules/no-data-to-display.src.js +128 -0
  236. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/dark-blue.js +254 -0
  237. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/dark-green.js +255 -0
  238. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/gray.js +257 -0
  239. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/grid.js +103 -0
  240. data/app/assets/javascripts/ueditor/third-party/highcharts/themes/skies.js +89 -0
  241. data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.js +9789 -0
  242. data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.min.js +6 -0
  243. data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.min.map +1 -0
  244. data/app/assets/javascripts/ueditor/third-party/snapscreen/UEditorSnapscreen.exe +0 -0
  245. data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.eot +0 -0
  246. data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.svg +65 -0
  247. data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.ttf +0 -0
  248. data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.woff +0 -0
  249. data/app/assets/javascripts/ueditor/third-party/video-js/video-js.css +766 -0
  250. data/app/assets/javascripts/ueditor/third-party/video-js/video-js.min.css +5 -0
  251. data/app/assets/javascripts/ueditor/third-party/video-js/video-js.swf +0 -0
  252. data/app/assets/javascripts/ueditor/third-party/video-js/video.dev.js +7108 -0
  253. data/app/assets/javascripts/ueditor/third-party/video-js/video.js +129 -0
  254. data/app/assets/javascripts/ueditor/third-party/webuploader/Uploader.swf +0 -0
  255. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.css +28 -0
  256. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.custom.js +5670 -0
  257. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.custom.min.js +2 -0
  258. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.flashonly.js +4176 -0
  259. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.flashonly.min.js +2 -0
  260. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.html5only.js +5559 -0
  261. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.html5only.min.js +2 -0
  262. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.js +6733 -0
  263. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.min.js +2 -0
  264. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.withoutimage.js +4593 -0
  265. data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.withoutimage.min.js +2 -0
  266. data/app/assets/javascripts/ueditor/third-party/xss.min.js +1 -0
  267. data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
  268. data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js +9 -0
  269. data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
  270. data/app/assets/javascripts/ueditor/ueditor.all.js +29568 -0
  271. data/app/assets/javascripts/ueditor/ueditor.all.min.js +18 -0
  272. data/app/assets/javascripts/ueditor/ueditor.config.js +497 -0
  273. data/app/assets/javascripts/ueditor/ueditor.parse.js +1022 -0
  274. data/app/assets/javascripts/ueditor/ueditor.parse.min.js +7 -0
  275. data/app/assets/javascripts/{ueditor → ueditor_custom}/preinit.js.erb +0 -0
  276. data/lib/baidu_ueditor_rails/version.rb +1 -1
  277. metadata +292 -21
@@ -0,0 +1,22 @@
1
+ /*
2
+ Highcharts JS v3.0.6 (2013-10-04)
3
+ Exporting module
4
+
5
+ (c) 2010-2013 Torstein Hønsi
6
+
7
+ License: www.highcharts.com/license
8
+ */
9
+ (function(f){var A=f.Chart,t=f.addEvent,C=f.removeEvent,k=f.createElement,n=f.discardElement,u=f.css,o=f.merge,r=f.each,p=f.extend,D=Math.max,j=document,B=window,E=f.isTouchDevice,F=f.Renderer.prototype.symbols,x=f.getOptions(),y;p(x.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"});x.navigation={menuStyle:{border:"1px solid #A0A0A0",
10
+ background:"#FFFFFF",padding:"5px 0"},menuItemStyle:{padding:"0 10px",background:"none",color:"#303030",fontSize:E?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{symbolFill:"#E0E0E0",symbolSize:14,symbolStroke:"#666",symbolStrokeWidth:3,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,theme:{fill:"white",stroke:"none"},verticalAlign:"top",width:24}};x.exporting={type:"image/png",url:"http://export.highcharts.com/",buttons:{contextButton:{menuClassName:"highcharts-contextmenu",
11
+ symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}};f.post=function(c,a){var d,b;b=k("form",{method:"post",
12
+ action:c,enctype:"multipart/form-data"},{display:"none"},j.body);for(d in a)k("input",{type:"hidden",name:d,value:a[d]},null,b);b.submit();n(b)};p(A.prototype,{getSVG:function(c){var a=this,d,b,z,h,g=o(a.options,c);if(!j.createElementNS)j.createElementNS=function(a,b){return j.createElement(b)};c=k("div",null,{position:"absolute",top:"-9999em",width:a.chartWidth+"px",height:a.chartHeight+"px"},j.body);b=a.renderTo.style.width;h=a.renderTo.style.height;b=g.exporting.sourceWidth||g.chart.width||/px$/.test(b)&&
13
+ parseInt(b,10)||600;h=g.exporting.sourceHeight||g.chart.height||/px$/.test(h)&&parseInt(h,10)||400;p(g.chart,{animation:!1,renderTo:c,forExport:!0,width:b,height:h});g.exporting.enabled=!1;g.series=[];r(a.series,function(a){z=o(a.options,{animation:!1,showCheckbox:!1,visible:a.visible});z.isInternal||g.series.push(z)});d=new f.Chart(g,a.callback);r(["xAxis","yAxis"],function(b){r(a[b],function(a,c){var g=d[b][c],f=a.getExtremes(),h=f.userMin,f=f.userMax;g&&(h!==void 0||f!==void 0)&&g.setExtremes(h,
14
+ f,!0,!1)})});b=d.container.innerHTML;g=null;d.destroy();n(c);b=b.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ href=/g," xlink:href=").replace(/\n/," ").replace(/<\/svg>.*?$/,"</svg>").replace(/&nbsp;/g," ").replace(/&shy;/g,"­").replace(/<IMG /g,"<image ").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g,
15
+ 'width="$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()});return b=b.replace(/(url\(#highcharts-[0-9]+)&quot;/g,"$1").replace(/&quot;/g,"'")},exportChart:function(c,a){var c=c||{},d=this.options.exporting,d=this.getSVG(o({chart:{borderRadius:0}},d.chartOptions,a,{exporting:{sourceWidth:c.sourceWidth||
16
+ d.sourceWidth,sourceHeight:c.sourceHeight||d.sourceHeight}})),c=o(this.options.exporting,c);f.post(c.url,{filename:c.filename||"chart",type:c.type,width:c.width||0,scale:c.scale||2,svg:d})},print:function(){var c=this,a=c.container,d=[],b=a.parentNode,f=j.body,h=f.childNodes;if(!c.isPrinting)c.isPrinting=!0,r(h,function(a,b){if(a.nodeType===1)d[b]=a.style.display,a.style.display="none"}),f.appendChild(a),B.focus(),B.print(),setTimeout(function(){b.appendChild(a);r(h,function(a,b){if(a.nodeType===
17
+ 1)a.style.display=d[b]});c.isPrinting=!1},1E3)},contextMenu:function(c,a,d,b,f,h,g){var e=this,j=e.options.navigation,q=j.menuItemStyle,l=e.chartWidth,m=e.chartHeight,o="cache-"+c,i=e[o],s=D(f,h),v,w,n;if(!i)e[o]=i=k("div",{className:c},{position:"absolute",zIndex:1E3,padding:s+"px"},e.container),v=k("div",null,p({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},j.menuStyle),i),w=function(){u(i,{display:"none"});g&&g.setState(0);e.openMenu=!1},t(i,
18
+ "mouseleave",function(){n=setTimeout(w,500)}),t(i,"mouseenter",function(){clearTimeout(n)}),t(document,"mousedown",function(a){e.pointer.inClass(a.target,c)||w()}),r(a,function(a){if(a){var b=a.separator?k("hr",null,null,v):k("div",{onmouseover:function(){u(this,j.menuItemHoverStyle)},onmouseout:function(){u(this,q)},onclick:function(){w();a.onclick.apply(e,arguments)},innerHTML:a.text||e.options.lang[a.textKey]},p({cursor:"pointer"},q),v);e.exportDivElements.push(b)}}),e.exportDivElements.push(v,
19
+ i),e.exportMenuWidth=i.offsetWidth,e.exportMenuHeight=i.offsetHeight;a={display:"block"};d+e.exportMenuWidth>l?a.right=l-d-f-s+"px":a.left=d-s+"px";b+h+e.exportMenuHeight>m&&g.alignOptions.verticalAlign!=="top"?a.bottom=m-b-s+"px":a.top=b+h-s+"px";u(i,a);e.openMenu=!0},addButton:function(c){var a=this,d=a.renderer,b=o(a.options.navigation.buttonOptions,c),j=b.onclick,h=b.menuItems,g,e,k={stroke:b.symbolStroke,fill:b.symbolFill},q=b.symbolSize||12;if(!a.btnCount)a.btnCount=0;if(!a.exportDivElements)a.exportDivElements=
20
+ [],a.exportSVGElements=[];if(b.enabled!==!1){var l=b.theme,m=l.states,n=m&&m.hover,m=m&&m.select,i;delete l.states;j?i=function(){j.apply(a,arguments)}:h&&(i=function(){a.contextMenu(e.menuClassName,h,e.translateX,e.translateY,e.width,e.height,e);e.setState(2)});b.text&&b.symbol?l.paddingLeft=f.pick(l.paddingLeft,25):b.text||p(l,{width:b.width,height:b.height,padding:0});e=d.button(b.text,0,0,i,l,n,m).attr({title:a.options.lang[b._titleKey],"stroke-linecap":"round"});e.menuClassName=c.menuClassName||
21
+ "highcharts-menu-"+a.btnCount++;b.symbol&&(g=d.symbol(b.symbol,b.symbolX-q/2,b.symbolY-q/2,q,q).attr(p(k,{"stroke-width":b.symbolStrokeWidth||1,zIndex:1})).add(e));e.add().align(p(b,{width:e.width,x:f.pick(b.x,y)}),!0,"spacingBox");y+=(e.width+b.buttonSpacing)*(b.align==="right"?-1:1);a.exportSVGElements.push(e,g)}},destroyExport:function(c){var c=c.target,a,d;for(a=0;a<c.exportSVGElements.length;a++)if(d=c.exportSVGElements[a])d.onclick=d.ontouchstart=null,c.exportSVGElements[a]=d.destroy();for(a=
22
+ 0;a<c.exportDivElements.length;a++)d=c.exportDivElements[a],C(d,"mouseleave"),c.exportDivElements[a]=d.onmouseout=d.onmouseover=d.ontouchstart=d.onclick=null,n(d)}});F.menu=function(c,a,d,b){return["M",c,a+2.5,"L",c+d,a+2.5,"M",c,a+b/2+0.5,"L",c+d,a+b/2+0.5,"M",c,a+b-1.5,"L",c+d,a+b-1.5]};A.prototype.callbacks.push(function(c){var a,d=c.options.exporting,b=d.buttons;y=0;if(d.enabled!==!1){for(a in b)c.addButton(b[a]);t(c,"destroy",c.destroyExport)}})})(Highcharts);
@@ -0,0 +1,709 @@
1
+ /**
2
+ * @license Highcharts JS v3.0.6 (2013-10-04)
3
+ * Exporting module
4
+ *
5
+ * (c) 2010-2013 Torstein Hønsi
6
+ *
7
+ * License: www.highcharts.com/license
8
+ */
9
+
10
+ // JSLint options:
11
+ /*global Highcharts, document, window, Math, setTimeout */
12
+
13
+ (function (Highcharts) { // encapsulate
14
+
15
+ // create shortcuts
16
+ var Chart = Highcharts.Chart,
17
+ addEvent = Highcharts.addEvent,
18
+ removeEvent = Highcharts.removeEvent,
19
+ createElement = Highcharts.createElement,
20
+ discardElement = Highcharts.discardElement,
21
+ css = Highcharts.css,
22
+ merge = Highcharts.merge,
23
+ each = Highcharts.each,
24
+ extend = Highcharts.extend,
25
+ math = Math,
26
+ mathMax = math.max,
27
+ doc = document,
28
+ win = window,
29
+ isTouchDevice = Highcharts.isTouchDevice,
30
+ M = 'M',
31
+ L = 'L',
32
+ DIV = 'div',
33
+ HIDDEN = 'hidden',
34
+ NONE = 'none',
35
+ PREFIX = 'highcharts-',
36
+ ABSOLUTE = 'absolute',
37
+ PX = 'px',
38
+ UNDEFINED,
39
+ symbols = Highcharts.Renderer.prototype.symbols,
40
+ defaultOptions = Highcharts.getOptions(),
41
+ buttonOffset;
42
+
43
+ // Add language
44
+ extend(defaultOptions.lang, {
45
+ printChart: 'Print chart',
46
+ downloadPNG: 'Download PNG image',
47
+ downloadJPEG: 'Download JPEG image',
48
+ downloadPDF: 'Download PDF document',
49
+ downloadSVG: 'Download SVG vector image',
50
+ contextButtonTitle: 'Chart context menu'
51
+ });
52
+
53
+ // Buttons and menus are collected in a separate config option set called 'navigation'.
54
+ // This can be extended later to add control buttons like zoom and pan right click menus.
55
+ defaultOptions.navigation = {
56
+ menuStyle: {
57
+ border: '1px solid #A0A0A0',
58
+ background: '#FFFFFF',
59
+ padding: '5px 0'
60
+ },
61
+ menuItemStyle: {
62
+ padding: '0 10px',
63
+ background: NONE,
64
+ color: '#303030',
65
+ fontSize: isTouchDevice ? '14px' : '11px'
66
+ },
67
+ menuItemHoverStyle: {
68
+ background: '#4572A5',
69
+ color: '#FFFFFF'
70
+ },
71
+
72
+ buttonOptions: {
73
+ symbolFill: '#E0E0E0',
74
+ symbolSize: 14,
75
+ symbolStroke: '#666',
76
+ symbolStrokeWidth: 3,
77
+ symbolX: 12.5,
78
+ symbolY: 10.5,
79
+ align: 'right',
80
+ buttonSpacing: 3,
81
+ height: 22,
82
+ // text: null,
83
+ theme: {
84
+ fill: 'white', // capture hover
85
+ stroke: 'none'
86
+ },
87
+ verticalAlign: 'top',
88
+ width: 24
89
+ }
90
+ };
91
+
92
+
93
+
94
+ // Add the export related options
95
+ defaultOptions.exporting = {
96
+ //enabled: true,
97
+ //filename: 'chart',
98
+ type: 'image/png',
99
+ url: 'http://export.highcharts.com/',
100
+ //width: undefined,
101
+ //scale: 2
102
+ buttons: {
103
+ contextButton: {
104
+ menuClassName: PREFIX + 'contextmenu',
105
+ //x: -10,
106
+ symbol: 'menu',
107
+ _titleKey: 'contextButtonTitle',
108
+ menuItems: [{
109
+ textKey: 'printChart',
110
+ onclick: function () {
111
+ this.print();
112
+ }
113
+ }, {
114
+ separator: true
115
+ }, {
116
+ textKey: 'downloadPNG',
117
+ onclick: function () {
118
+ this.exportChart();
119
+ }
120
+ }, {
121
+ textKey: 'downloadJPEG',
122
+ onclick: function () {
123
+ this.exportChart({
124
+ type: 'image/jpeg'
125
+ });
126
+ }
127
+ }, {
128
+ textKey: 'downloadPDF',
129
+ onclick: function () {
130
+ this.exportChart({
131
+ type: 'application/pdf'
132
+ });
133
+ }
134
+ }, {
135
+ textKey: 'downloadSVG',
136
+ onclick: function () {
137
+ this.exportChart({
138
+ type: 'image/svg+xml'
139
+ });
140
+ }
141
+ }
142
+ // Enable this block to add "View SVG" to the dropdown menu
143
+ /*
144
+ ,{
145
+
146
+ text: 'View SVG',
147
+ onclick: function () {
148
+ var svg = this.getSVG()
149
+ .replace(/</g, '\n&lt;')
150
+ .replace(/>/g, '&gt;');
151
+
152
+ doc.body.innerHTML = '<pre>' + svg + '</pre>';
153
+ }
154
+ } // */
155
+ ]
156
+ }
157
+ }
158
+ };
159
+
160
+ // Add the Highcharts.post utility
161
+ Highcharts.post = function (url, data) {
162
+ var name,
163
+ form;
164
+
165
+ // create the form
166
+ form = createElement('form', {
167
+ method: 'post',
168
+ action: url,
169
+ enctype: 'multipart/form-data'
170
+ }, {
171
+ display: NONE
172
+ }, doc.body);
173
+
174
+ // add the data
175
+ for (name in data) {
176
+ createElement('input', {
177
+ type: HIDDEN,
178
+ name: name,
179
+ value: data[name]
180
+ }, null, form);
181
+ }
182
+
183
+ // submit
184
+ form.submit();
185
+
186
+ // clean up
187
+ discardElement(form);
188
+ };
189
+
190
+ extend(Chart.prototype, {
191
+
192
+ /**
193
+ * Return an SVG representation of the chart
194
+ *
195
+ * @param additionalOptions {Object} Additional chart options for the generated SVG representation
196
+ */
197
+ getSVG: function (additionalOptions) {
198
+ var chart = this,
199
+ chartCopy,
200
+ sandbox,
201
+ svg,
202
+ seriesOptions,
203
+ sourceWidth,
204
+ sourceHeight,
205
+ cssWidth,
206
+ cssHeight,
207
+ options = merge(chart.options, additionalOptions); // copy the options and add extra options
208
+
209
+ // IE compatibility hack for generating SVG content that it doesn't really understand
210
+ if (!doc.createElementNS) {
211
+ /*jslint unparam: true*//* allow unused parameter ns in function below */
212
+ doc.createElementNS = function (ns, tagName) {
213
+ return doc.createElement(tagName);
214
+ };
215
+ /*jslint unparam: false*/
216
+ }
217
+
218
+ // create a sandbox where a new chart will be generated
219
+ sandbox = createElement(DIV, null, {
220
+ position: ABSOLUTE,
221
+ top: '-9999em',
222
+ width: chart.chartWidth + PX,
223
+ height: chart.chartHeight + PX
224
+ }, doc.body);
225
+
226
+ // get the source size
227
+ cssWidth = chart.renderTo.style.width;
228
+ cssHeight = chart.renderTo.style.height;
229
+ sourceWidth = options.exporting.sourceWidth ||
230
+ options.chart.width ||
231
+ (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
232
+ 600;
233
+ sourceHeight = options.exporting.sourceHeight ||
234
+ options.chart.height ||
235
+ (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
236
+ 400;
237
+
238
+ // override some options
239
+ extend(options.chart, {
240
+ animation: false,
241
+ renderTo: sandbox,
242
+ forExport: true,
243
+ width: sourceWidth,
244
+ height: sourceHeight
245
+ });
246
+ options.exporting.enabled = false; // hide buttons in print
247
+
248
+ // prepare for replicating the chart
249
+ options.series = [];
250
+ each(chart.series, function (serie) {
251
+ seriesOptions = merge(serie.options, {
252
+ animation: false, // turn off animation
253
+ showCheckbox: false,
254
+ visible: serie.visible
255
+ });
256
+
257
+ if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
258
+ options.series.push(seriesOptions);
259
+ }
260
+ });
261
+
262
+ // generate the chart copy
263
+ chartCopy = new Highcharts.Chart(options, chart.callback);
264
+
265
+ // reflect axis extremes in the export
266
+ each(['xAxis', 'yAxis'], function (axisType) {
267
+ each(chart[axisType], function (axis, i) {
268
+ var axisCopy = chartCopy[axisType][i],
269
+ extremes = axis.getExtremes(),
270
+ userMin = extremes.userMin,
271
+ userMax = extremes.userMax;
272
+
273
+ if (axisCopy && (userMin !== UNDEFINED || userMax !== UNDEFINED)) {
274
+ axisCopy.setExtremes(userMin, userMax, true, false);
275
+ }
276
+ });
277
+ });
278
+
279
+ // get the SVG from the container's innerHTML
280
+ svg = chartCopy.container.innerHTML;
281
+
282
+ // free up memory
283
+ options = null;
284
+ chartCopy.destroy();
285
+ discardElement(sandbox);
286
+
287
+ // sanitize
288
+ svg = svg
289
+ .replace(/zIndex="[^"]+"/g, '')
290
+ .replace(/isShadow="[^"]+"/g, '')
291
+ .replace(/symbolName="[^"]+"/g, '')
292
+ .replace(/jQuery[0-9]+="[^"]+"/g, '')
293
+ .replace(/url\([^#]+#/g, 'url(#')
294
+ .replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
295
+ .replace(/ href=/g, ' xlink:href=')
296
+ .replace(/\n/, ' ')
297
+ .replace(/<\/svg>.*?$/, '</svg>') // any HTML added to the container after the SVG (#894)
298
+ /* This fails in IE < 8
299
+ .replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
300
+ return s2 +'.'+ s3[0];
301
+ })*/
302
+
303
+ // Replace HTML entities, issue #347
304
+ .replace(/&nbsp;/g, '\u00A0') // no-break space
305
+ .replace(/&shy;/g, '\u00AD') // soft hyphen
306
+
307
+ // IE specific
308
+ .replace(/<IMG /g, '<image ')
309
+ .replace(/height=([^" ]+)/g, 'height="$1"')
310
+ .replace(/width=([^" ]+)/g, 'width="$1"')
311
+ .replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>')
312
+ .replace(/id=([^" >]+)/g, 'id="$1"')
313
+ .replace(/class=([^" >]+)/g, 'class="$1"')
314
+ .replace(/ transform /g, ' ')
315
+ .replace(/:(path|rect)/g, '$1')
316
+ .replace(/style="([^"]+)"/g, function (s) {
317
+ return s.toLowerCase();
318
+ });
319
+
320
+ // IE9 beta bugs with innerHTML. Test again with final IE9.
321
+ svg = svg.replace(/(url\(#highcharts-[0-9]+)&quot;/g, '$1')
322
+ .replace(/&quot;/g, "'");
323
+
324
+ return svg;
325
+ },
326
+
327
+ /**
328
+ * Submit the SVG representation of the chart to the server
329
+ * @param {Object} options Exporting options. Possible members are url, type and width.
330
+ * @param {Object} chartOptions Additional chart options for the SVG representation of the chart
331
+ */
332
+ exportChart: function (options, chartOptions) {
333
+ options = options || {};
334
+
335
+ var chart = this,
336
+ chartExportingOptions = chart.options.exporting,
337
+ svg = chart.getSVG(merge(
338
+ { chart: { borderRadius: 0 } },
339
+ chartExportingOptions.chartOptions,
340
+ chartOptions,
341
+ {
342
+ exporting: {
343
+ sourceWidth: options.sourceWidth || chartExportingOptions.sourceWidth,
344
+ sourceHeight: options.sourceHeight || chartExportingOptions.sourceHeight
345
+ }
346
+ }
347
+ ));
348
+
349
+ // merge the options
350
+ options = merge(chart.options.exporting, options);
351
+
352
+ // do the post
353
+ Highcharts.post(options.url, {
354
+ filename: options.filename || 'chart',
355
+ type: options.type,
356
+ width: options.width || 0, // IE8 fails to post undefined correctly, so use 0
357
+ scale: options.scale || 2,
358
+ svg: svg
359
+ });
360
+
361
+ },
362
+
363
+ /**
364
+ * Print the chart
365
+ */
366
+ print: function () {
367
+
368
+ var chart = this,
369
+ container = chart.container,
370
+ origDisplay = [],
371
+ origParent = container.parentNode,
372
+ body = doc.body,
373
+ childNodes = body.childNodes;
374
+
375
+ if (chart.isPrinting) { // block the button while in printing mode
376
+ return;
377
+ }
378
+
379
+ chart.isPrinting = true;
380
+
381
+ // hide all body content
382
+ each(childNodes, function (node, i) {
383
+ if (node.nodeType === 1) {
384
+ origDisplay[i] = node.style.display;
385
+ node.style.display = NONE;
386
+ }
387
+ });
388
+
389
+ // pull out the chart
390
+ body.appendChild(container);
391
+
392
+ // print
393
+ win.focus(); // #1510
394
+ win.print();
395
+
396
+ // allow the browser to prepare before reverting
397
+ setTimeout(function () {
398
+
399
+ // put the chart back in
400
+ origParent.appendChild(container);
401
+
402
+ // restore all body content
403
+ each(childNodes, function (node, i) {
404
+ if (node.nodeType === 1) {
405
+ node.style.display = origDisplay[i];
406
+ }
407
+ });
408
+
409
+ chart.isPrinting = false;
410
+
411
+ }, 1000);
412
+
413
+ },
414
+
415
+ /**
416
+ * Display a popup menu for choosing the export type
417
+ *
418
+ * @param {String} className An identifier for the menu
419
+ * @param {Array} items A collection with text and onclicks for the items
420
+ * @param {Number} x The x position of the opener button
421
+ * @param {Number} y The y position of the opener button
422
+ * @param {Number} width The width of the opener button
423
+ * @param {Number} height The height of the opener button
424
+ */
425
+ contextMenu: function (className, items, x, y, width, height, button) {
426
+ var chart = this,
427
+ navOptions = chart.options.navigation,
428
+ menuItemStyle = navOptions.menuItemStyle,
429
+ chartWidth = chart.chartWidth,
430
+ chartHeight = chart.chartHeight,
431
+ cacheName = 'cache-' + className,
432
+ menu = chart[cacheName],
433
+ menuPadding = mathMax(width, height), // for mouse leave detection
434
+ boxShadow = '3px 3px 10px #888',
435
+ innerMenu,
436
+ hide,
437
+ hideTimer,
438
+ menuStyle;
439
+
440
+ // create the menu only the first time
441
+ if (!menu) {
442
+
443
+ // create a HTML element above the SVG
444
+ chart[cacheName] = menu = createElement(DIV, {
445
+ className: className
446
+ }, {
447
+ position: ABSOLUTE,
448
+ zIndex: 1000,
449
+ padding: menuPadding + PX
450
+ }, chart.container);
451
+
452
+ innerMenu = createElement(DIV, null,
453
+ extend({
454
+ MozBoxShadow: boxShadow,
455
+ WebkitBoxShadow: boxShadow,
456
+ boxShadow: boxShadow
457
+ }, navOptions.menuStyle), menu);
458
+
459
+ // hide on mouse out
460
+ hide = function () {
461
+ css(menu, { display: NONE });
462
+ if (button) {
463
+ button.setState(0);
464
+ }
465
+ chart.openMenu = false;
466
+ };
467
+
468
+ // Hide the menu some time after mouse leave (#1357)
469
+ addEvent(menu, 'mouseleave', function () {
470
+ hideTimer = setTimeout(hide, 500);
471
+ });
472
+ addEvent(menu, 'mouseenter', function () {
473
+ clearTimeout(hideTimer);
474
+ });
475
+ // Hide it on clicking or touching outside the menu (#2258)
476
+ addEvent(document, 'mousedown', function (e) {
477
+ if (!chart.pointer.inClass(e.target, className)) {
478
+ hide();
479
+ }
480
+ });
481
+
482
+
483
+ // create the items
484
+ each(items, function (item) {
485
+ if (item) {
486
+ var element = item.separator ?
487
+ createElement('hr', null, null, innerMenu) :
488
+ createElement(DIV, {
489
+ onmouseover: function () {
490
+ css(this, navOptions.menuItemHoverStyle);
491
+ },
492
+ onmouseout: function () {
493
+ css(this, menuItemStyle);
494
+ },
495
+ onclick: function () {
496
+ hide();
497
+ item.onclick.apply(chart, arguments);
498
+ },
499
+ innerHTML: item.text || chart.options.lang[item.textKey]
500
+ }, extend({
501
+ cursor: 'pointer'
502
+ }, menuItemStyle), innerMenu);
503
+
504
+
505
+ // Keep references to menu divs to be able to destroy them
506
+ chart.exportDivElements.push(element);
507
+ }
508
+ });
509
+
510
+ // Keep references to menu and innerMenu div to be able to destroy them
511
+ chart.exportDivElements.push(innerMenu, menu);
512
+
513
+ chart.exportMenuWidth = menu.offsetWidth;
514
+ chart.exportMenuHeight = menu.offsetHeight;
515
+ }
516
+
517
+ menuStyle = { display: 'block' };
518
+
519
+ // if outside right, right align it
520
+ if (x + chart.exportMenuWidth > chartWidth) {
521
+ menuStyle.right = (chartWidth - x - width - menuPadding) + PX;
522
+ } else {
523
+ menuStyle.left = (x - menuPadding) + PX;
524
+ }
525
+ // if outside bottom, bottom align it
526
+ if (y + height + chart.exportMenuHeight > chartHeight && button.alignOptions.verticalAlign !== 'top') {
527
+ menuStyle.bottom = (chartHeight - y - menuPadding) + PX;
528
+ } else {
529
+ menuStyle.top = (y + height - menuPadding) + PX;
530
+ }
531
+
532
+ css(menu, menuStyle);
533
+ chart.openMenu = true;
534
+ },
535
+
536
+ /**
537
+ * Add the export button to the chart
538
+ */
539
+ addButton: function (options) {
540
+ var chart = this,
541
+ renderer = chart.renderer,
542
+ btnOptions = merge(chart.options.navigation.buttonOptions, options),
543
+ onclick = btnOptions.onclick,
544
+ menuItems = btnOptions.menuItems,
545
+ symbol,
546
+ button,
547
+ symbolAttr = {
548
+ stroke: btnOptions.symbolStroke,
549
+ fill: btnOptions.symbolFill
550
+ },
551
+ symbolSize = btnOptions.symbolSize || 12;
552
+ if (!chart.btnCount) {
553
+ chart.btnCount = 0;
554
+ }
555
+
556
+ // Keeps references to the button elements
557
+ if (!chart.exportDivElements) {
558
+ chart.exportDivElements = [];
559
+ chart.exportSVGElements = [];
560
+ }
561
+
562
+ if (btnOptions.enabled === false) {
563
+ return;
564
+ }
565
+
566
+
567
+ var attr = btnOptions.theme,
568
+ states = attr.states,
569
+ hover = states && states.hover,
570
+ select = states && states.select,
571
+ callback;
572
+
573
+ delete attr.states;
574
+
575
+ if (onclick) {
576
+ callback = function () {
577
+ onclick.apply(chart, arguments);
578
+ };
579
+
580
+ } else if (menuItems) {
581
+ callback = function () {
582
+ chart.contextMenu(
583
+ button.menuClassName,
584
+ menuItems,
585
+ button.translateX,
586
+ button.translateY,
587
+ button.width,
588
+ button.height,
589
+ button
590
+ );
591
+ button.setState(2);
592
+ };
593
+ }
594
+
595
+
596
+ if (btnOptions.text && btnOptions.symbol) {
597
+ attr.paddingLeft = Highcharts.pick(attr.paddingLeft, 25);
598
+
599
+ } else if (!btnOptions.text) {
600
+ extend(attr, {
601
+ width: btnOptions.width,
602
+ height: btnOptions.height,
603
+ padding: 0
604
+ });
605
+ }
606
+
607
+ button = renderer.button(btnOptions.text, 0, 0, callback, attr, hover, select)
608
+ .attr({
609
+ title: chart.options.lang[btnOptions._titleKey],
610
+ 'stroke-linecap': 'round'
611
+ });
612
+ button.menuClassName = options.menuClassName || PREFIX + 'menu-' + chart.btnCount++;
613
+
614
+ if (btnOptions.symbol) {
615
+ symbol = renderer.symbol(
616
+ btnOptions.symbol,
617
+ btnOptions.symbolX - (symbolSize / 2),
618
+ btnOptions.symbolY - (symbolSize / 2),
619
+ symbolSize,
620
+ symbolSize
621
+ )
622
+ .attr(extend(symbolAttr, {
623
+ 'stroke-width': btnOptions.symbolStrokeWidth || 1,
624
+ zIndex: 1
625
+ })).add(button);
626
+ }
627
+
628
+ button.add()
629
+ .align(extend(btnOptions, {
630
+ width: button.width,
631
+ x: Highcharts.pick(btnOptions.x, buttonOffset) // #1654
632
+ }), true, 'spacingBox');
633
+
634
+ buttonOffset += (button.width + btnOptions.buttonSpacing) * (btnOptions.align === 'right' ? -1 : 1);
635
+
636
+ chart.exportSVGElements.push(button, symbol);
637
+
638
+ },
639
+
640
+ /**
641
+ * Destroy the buttons.
642
+ */
643
+ destroyExport: function (e) {
644
+ var chart = e.target,
645
+ i,
646
+ elem;
647
+
648
+ // Destroy the extra buttons added
649
+ for (i = 0; i < chart.exportSVGElements.length; i++) {
650
+ elem = chart.exportSVGElements[i];
651
+
652
+ // Destroy and null the svg/vml elements
653
+ if (elem) { // #1822
654
+ elem.onclick = elem.ontouchstart = null;
655
+ chart.exportSVGElements[i] = elem.destroy();
656
+ }
657
+ }
658
+
659
+ // Destroy the divs for the menu
660
+ for (i = 0; i < chart.exportDivElements.length; i++) {
661
+ elem = chart.exportDivElements[i];
662
+
663
+ // Remove the event handler
664
+ removeEvent(elem, 'mouseleave');
665
+
666
+ // Remove inline events
667
+ chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
668
+
669
+ // Destroy the div by moving to garbage bin
670
+ discardElement(elem);
671
+ }
672
+ }
673
+ });
674
+
675
+
676
+ symbols.menu = function (x, y, width, height) {
677
+ var arr = [
678
+ M, x, y + 2.5,
679
+ L, x + width, y + 2.5,
680
+ M, x, y + height / 2 + 0.5,
681
+ L, x + width, y + height / 2 + 0.5,
682
+ M, x, y + height - 1.5,
683
+ L, x + width, y + height - 1.5
684
+ ];
685
+ return arr;
686
+ };
687
+
688
+ // Add the buttons on chart load
689
+ Chart.prototype.callbacks.push(function (chart) {
690
+ var n,
691
+ exportingOptions = chart.options.exporting,
692
+ buttons = exportingOptions.buttons;
693
+
694
+ buttonOffset = 0;
695
+
696
+ if (exportingOptions.enabled !== false) {
697
+
698
+ for (n in buttons) {
699
+ chart.addButton(buttons[n]);
700
+ }
701
+
702
+ // Destroy the export elements at chart destroy
703
+ addEvent(chart, 'destroy', chart.destroyExport);
704
+ }
705
+
706
+ });
707
+
708
+
709
+ }(Highcharts));