ueditor.rails 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/config.mindpin.default.coffee +59 -0
  3. data/app/assets/javascripts/ueditor.js +3 -2
  4. data/app/assets/stylesheets/ueditor/themes/mindpin/css/ueditor.css +1945 -0
  5. data/app/assets/stylesheets/ueditor/themes/mindpin/dialogbase.css +100 -0
  6. data/app/assets/stylesheets/ueditor/themes/mindpin/images/anchor.gif +0 -0
  7. data/app/assets/stylesheets/ueditor/themes/mindpin/images/arrow.png +0 -0
  8. data/app/assets/stylesheets/ueditor/themes/mindpin/images/arrow_down.png +0 -0
  9. data/app/assets/stylesheets/ueditor/themes/mindpin/images/arrow_up.png +0 -0
  10. data/app/assets/stylesheets/ueditor/themes/mindpin/images/button-bg.gif +0 -0
  11. data/app/assets/stylesheets/ueditor/themes/mindpin/images/cancelbutton.gif +0 -0
  12. data/app/assets/stylesheets/ueditor/themes/mindpin/images/charts.png +0 -0
  13. data/app/assets/stylesheets/ueditor/themes/mindpin/images/cursor_h.gif +0 -0
  14. data/app/assets/stylesheets/ueditor/themes/mindpin/images/cursor_h.png +0 -0
  15. data/app/assets/stylesheets/ueditor/themes/mindpin/images/cursor_v.gif +0 -0
  16. data/app/assets/stylesheets/ueditor/themes/mindpin/images/cursor_v.png +0 -0
  17. data/app/assets/stylesheets/ueditor/themes/mindpin/images/dialog-title-bg.png +0 -0
  18. data/{vendor/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.png → app/assets/stylesheets/ueditor/themes/mindpin/images/filescan.png} +0 -0
  19. data/app/assets/stylesheets/ueditor/themes/mindpin/images/highlighted.gif +0 -0
  20. data/app/assets/stylesheets/ueditor/themes/mindpin/images/icons-all.gif +0 -0
  21. data/app/assets/stylesheets/ueditor/themes/mindpin/images/icons.gif +0 -0
  22. data/app/assets/stylesheets/ueditor/themes/mindpin/images/icons.png +0 -0
  23. data/{vendor/assets/javascripts/ueditor/dialogs/attachment/images/bg.png → app/assets/stylesheets/ueditor/themes/mindpin/images/loaderror.png} +0 -0
  24. data/app/assets/stylesheets/ueditor/themes/mindpin/images/loading.gif +0 -0
  25. data/{vendor/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.gif → app/assets/stylesheets/ueditor/themes/mindpin/images/lock.gif} +0 -0
  26. data/{vendor/assets/javascripts/ueditor/dialogs/emotion → app/assets/stylesheets/ueditor/themes/mindpin}/images/neweditor-tab-bg.png +0 -0
  27. data/app/assets/stylesheets/ueditor/themes/mindpin/images/pagebreak.gif +0 -0
  28. data/app/assets/stylesheets/ueditor/themes/mindpin/images/scale.png +0 -0
  29. data/{vendor/assets/javascripts/ueditor/dialogs/video/images/bg.png → app/assets/stylesheets/ueditor/themes/mindpin/images/sortable.png} +0 -0
  30. data/app/assets/stylesheets/ueditor/themes/mindpin/images/spacer.gif +0 -0
  31. data/app/assets/stylesheets/ueditor/themes/mindpin/images/sparator_v.png +0 -0
  32. data/app/assets/stylesheets/ueditor/themes/mindpin/images/table-cell-align.png +0 -0
  33. data/app/assets/stylesheets/ueditor/themes/mindpin/images/tangram-colorpicker.png +0 -0
  34. data/app/assets/stylesheets/ueditor/themes/mindpin/images/toolbar_bg.png +0 -0
  35. data/app/assets/stylesheets/ueditor/themes/mindpin/images/unhighlighted.gif +0 -0
  36. data/app/assets/stylesheets/ueditor/themes/mindpin/images/upload.png +0 -0
  37. data/app/assets/stylesheets/ueditor/themes/mindpin/images/videologo.gif +0 -0
  38. data/{vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif → app/assets/stylesheets/ueditor/themes/mindpin/images/word.gif} +0 -0
  39. data/app/assets/stylesheets/ueditor/themes/mindpin/images/wordpaste.png +0 -0
  40. data/lib/ueditor/version.rb +1 -1
  41. data/test/dummy/log/development.log +105 -0
  42. data/test/dummy/tmp/cache/assets/development/sprockets/02b56f18dcd4ddec585a02528773c04b +0 -0
  43. data/test/dummy/tmp/cache/assets/development/sprockets/067a099f2392ac9d679fb27d72421548 +0 -0
  44. data/test/dummy/tmp/cache/assets/development/sprockets/07898ec696d976eeafb61ef6bb48e097 +0 -0
  45. data/test/dummy/tmp/cache/assets/development/sprockets/19694ecb6829b547affeb420f6c4f4ba +0 -0
  46. data/test/dummy/tmp/cache/assets/development/sprockets/22b4a109d4f3136884f5b96c0dafe5c4 +0 -0
  47. data/test/dummy/tmp/cache/assets/development/sprockets/2e810e09180be475ce270590eb6d79bf +0 -0
  48. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  49. data/test/dummy/tmp/cache/assets/development/sprockets/31b24023d7695b6c40fbe8b2d903e8db +0 -0
  50. data/test/dummy/tmp/cache/assets/development/sprockets/32e4b0cbcc7942738eb80e9c571e09ad +0 -0
  51. data/test/dummy/tmp/cache/assets/development/sprockets/3e6fbffe890d9471ace4284a35cf833e +0 -0
  52. data/test/dummy/tmp/cache/assets/development/sprockets/50a23c1131cabc18af0d7ce21df229ea +0 -0
  53. data/test/dummy/tmp/cache/assets/development/sprockets/792425c63374a4c75ca043ceeb960991 +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/8165d0bcd2b5c04b4a98f4f0cbabef64 +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/9bf28bcb944fe3baabaabb97036a4d6c +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/9df06b25c7118a2446ff210358a7150a +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/a0a5d0da6dc7907299fb15adbabc87e5 +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/d3a9a64bc190424c032a25d0b7ee0ed1 +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/eb17dc3da27134989a88ec01caa61d78 +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/ef01c1c9fa9a8ace471702975febabf5 +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/fa046bb067616da9d14862739bf2c67c +0 -0
  64. data/vendor/assets/javascripts/ueditor/index.html +0 -19
  65. data/vendor/assets/javascripts/ueditor/themes/iframe.css +0 -1
  66. data/vendor/assets/javascripts/ueditor/ueditor.all.js +2854 -12684
  67. data/vendor/assets/javascripts/ueditor/ueditor.all.min.js +10 -709
  68. data/vendor/assets/javascripts/ueditor/ueditor.config.js +2 -147
  69. data/vendor/assets/javascripts/ueditor/ueditor.parse.js +11 -602
  70. data/vendor/assets/javascripts/ueditor/ueditor.parse.min.js +1 -28
  71. metadata +82 -161
  72. data/app/assets/javascripts/default.config.js +0 -381
  73. data/vendor/assets/javascripts/ueditor/dialogs/anchor/anchor.html +0 -40
  74. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.css +0 -681
  75. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.html +0 -60
  76. data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.js +0 -754
  77. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
  78. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
  79. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
  80. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
  81. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
  82. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
  83. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
  84. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
  85. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
  86. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
  87. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
  88. data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
  89. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.gif +0 -0
  90. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.png +0 -0
  91. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/icons.gif +0 -0
  92. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/icons.png +0 -0
  93. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/image.png +0 -0
  94. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/progress.png +0 -0
  95. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/success.gif +0 -0
  96. data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/success.png +0 -0
  97. data/vendor/assets/javascripts/ueditor/dialogs/background/background.css +0 -94
  98. data/vendor/assets/javascripts/ueditor/dialogs/background/background.html +0 -56
  99. data/vendor/assets/javascripts/ueditor/dialogs/background/background.js +0 -376
  100. data/vendor/assets/javascripts/ueditor/dialogs/background/images/bg.png +0 -0
  101. data/vendor/assets/javascripts/ueditor/dialogs/background/images/success.png +0 -0
  102. data/vendor/assets/javascripts/ueditor/dialogs/charts/chart.config.js +0 -65
  103. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.css +0 -165
  104. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.html +0 -89
  105. data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.js +0 -519
  106. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts0.png +0 -0
  107. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts1.png +0 -0
  108. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts2.png +0 -0
  109. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts3.png +0 -0
  110. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts4.png +0 -0
  111. data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts5.png +0 -0
  112. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.css +0 -43
  113. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.html +0 -54
  114. data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.js +0 -186
  115. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/0.gif +0 -0
  116. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/bface.gif +0 -0
  117. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/cface.gif +0 -0
  118. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/fface.gif +0 -0
  119. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
  120. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/tface.gif +0 -0
  121. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/wface.gif +0 -0
  122. data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/yface.gif +0 -0
  123. data/vendor/assets/javascripts/ueditor/dialogs/gmap/gmap.html +0 -89
  124. data/vendor/assets/javascripts/ueditor/dialogs/help/help.css +0 -7
  125. data/vendor/assets/javascripts/ueditor/dialogs/help/help.html +0 -82
  126. data/vendor/assets/javascripts/ueditor/dialogs/help/help.js +0 -56
  127. data/vendor/assets/javascripts/ueditor/dialogs/image/image.css +0 -894
  128. data/vendor/assets/javascripts/ueditor/dialogs/image/image.html +0 -120
  129. data/vendor/assets/javascripts/ueditor/dialogs/image/image.js +0 -1139
  130. data/vendor/assets/javascripts/ueditor/dialogs/image/images/alignicon.jpg +0 -0
  131. data/vendor/assets/javascripts/ueditor/dialogs/image/images/bg.png +0 -0
  132. data/vendor/assets/javascripts/ueditor/dialogs/image/images/icons.gif +0 -0
  133. data/vendor/assets/javascripts/ueditor/dialogs/image/images/icons.png +0 -0
  134. data/vendor/assets/javascripts/ueditor/dialogs/image/images/image.png +0 -0
  135. data/vendor/assets/javascripts/ueditor/dialogs/image/images/progress.png +0 -0
  136. data/vendor/assets/javascripts/ueditor/dialogs/image/images/success.gif +0 -0
  137. data/vendor/assets/javascripts/ueditor/dialogs/image/images/success.png +0 -0
  138. data/vendor/assets/javascripts/ueditor/dialogs/insertframe/insertframe.html +0 -98
  139. data/vendor/assets/javascripts/ueditor/dialogs/map/map.html +0 -135
  140. data/vendor/assets/javascripts/ueditor/dialogs/map/show.html +0 -118
  141. data/vendor/assets/javascripts/ueditor/dialogs/music/music.css +0 -30
  142. data/vendor/assets/javascripts/ueditor/dialogs/music/music.html +0 -32
  143. data/vendor/assets/javascripts/ueditor/dialogs/music/music.js +0 -192
  144. data/vendor/assets/javascripts/ueditor/dialogs/preview/preview.html +0 -40
  145. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/addimg.png +0 -0
  146. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/brush.png +0 -0
  147. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/delimg.png +0 -0
  148. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/delimgH.png +0 -0
  149. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/empty.png +0 -0
  150. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/emptyH.png +0 -0
  151. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/eraser.png +0 -0
  152. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/redo.png +0 -0
  153. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/redoH.png +0 -0
  154. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/scale.png +0 -0
  155. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/scaleH.png +0 -0
  156. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/size.png +0 -0
  157. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/undo.png +0 -0
  158. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/undoH.png +0 -0
  159. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.css +0 -72
  160. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.html +0 -95
  161. data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.js +0 -671
  162. data/vendor/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.html +0 -102
  163. data/vendor/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.js +0 -164
  164. data/vendor/assets/javascripts/ueditor/dialogs/snapscreen/snapscreen.html +0 -58
  165. data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.html +0 -21
  166. data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.js +0 -57
  167. data/vendor/assets/javascripts/ueditor/dialogs/table/dragicon.png +0 -0
  168. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.css +0 -84
  169. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.html +0 -64
  170. data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.js +0 -237
  171. data/vendor/assets/javascripts/ueditor/dialogs/table/edittd.html +0 -61
  172. data/vendor/assets/javascripts/ueditor/dialogs/table/edittip.html +0 -33
  173. data/vendor/assets/javascripts/ueditor/dialogs/template/config.js +0 -42
  174. data/vendor/assets/javascripts/ueditor/dialogs/template/images/bg.gif +0 -0
  175. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre0.png +0 -0
  176. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre1.png +0 -0
  177. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre2.png +0 -0
  178. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre3.png +0 -0
  179. data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre4.png +0 -0
  180. data/vendor/assets/javascripts/ueditor/dialogs/template/template.css +0 -18
  181. data/vendor/assets/javascripts/ueditor/dialogs/template/template.html +0 -26
  182. data/vendor/assets/javascripts/ueditor/dialogs/template/template.js +0 -53
  183. data/vendor/assets/javascripts/ueditor/dialogs/video/images/center_focus.jpg +0 -0
  184. data/vendor/assets/javascripts/ueditor/dialogs/video/images/file-icons.gif +0 -0
  185. data/vendor/assets/javascripts/ueditor/dialogs/video/images/file-icons.png +0 -0
  186. data/vendor/assets/javascripts/ueditor/dialogs/video/images/icons.gif +0 -0
  187. data/vendor/assets/javascripts/ueditor/dialogs/video/images/icons.png +0 -0
  188. data/vendor/assets/javascripts/ueditor/dialogs/video/images/image.png +0 -0
  189. data/vendor/assets/javascripts/ueditor/dialogs/video/images/left_focus.jpg +0 -0
  190. data/vendor/assets/javascripts/ueditor/dialogs/video/images/none_focus.jpg +0 -0
  191. data/vendor/assets/javascripts/ueditor/dialogs/video/images/progress.png +0 -0
  192. data/vendor/assets/javascripts/ueditor/dialogs/video/images/right_focus.jpg +0 -0
  193. data/vendor/assets/javascripts/ueditor/dialogs/video/images/success.gif +0 -0
  194. data/vendor/assets/javascripts/ueditor/dialogs/video/images/success.png +0 -0
  195. data/vendor/assets/javascripts/ueditor/dialogs/video/video.css +0 -635
  196. data/vendor/assets/javascripts/ueditor/dialogs/video/video.html +0 -86
  197. data/vendor/assets/javascripts/ueditor/dialogs/video/video.js +0 -789
  198. data/vendor/assets/javascripts/ueditor/dialogs/webapp/webapp.html +0 -53
  199. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
  200. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/imageUploader.swf +0 -0
  201. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/tangram.js +0 -1495
  202. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/wordimage.html +0 -111
  203. data/vendor/assets/javascripts/ueditor/dialogs/wordimage/wordimage.js +0 -157
  204. data/vendor/assets/javascripts/ueditor/lang/en/en.js +0 -684
  205. data/vendor/assets/javascripts/ueditor/lang/en/images/addimage.png +0 -0
  206. data/vendor/assets/javascripts/ueditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
  207. data/vendor/assets/javascripts/ueditor/lang/en/images/alldeletebtnupskin.png +0 -0
  208. data/vendor/assets/javascripts/ueditor/lang/en/images/background.png +0 -0
  209. data/vendor/assets/javascripts/ueditor/lang/en/images/button.png +0 -0
  210. data/vendor/assets/javascripts/ueditor/lang/en/images/copy.png +0 -0
  211. data/vendor/assets/javascripts/ueditor/lang/en/images/deletedisable.png +0 -0
  212. data/vendor/assets/javascripts/ueditor/lang/en/images/deleteenable.png +0 -0
  213. data/vendor/assets/javascripts/ueditor/lang/en/images/listbackground.png +0 -0
  214. data/vendor/assets/javascripts/ueditor/lang/en/images/localimage.png +0 -0
  215. data/vendor/assets/javascripts/ueditor/lang/en/images/music.png +0 -0
  216. data/vendor/assets/javascripts/ueditor/lang/en/images/rotateleftdisable.png +0 -0
  217. data/vendor/assets/javascripts/ueditor/lang/en/images/rotateleftenable.png +0 -0
  218. data/vendor/assets/javascripts/ueditor/lang/en/images/rotaterightdisable.png +0 -0
  219. data/vendor/assets/javascripts/ueditor/lang/en/images/rotaterightenable.png +0 -0
  220. data/vendor/assets/javascripts/ueditor/lang/en/images/upload.png +0 -0
  221. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.js +0 -1256
  222. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js +0 -9
  223. data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
@@ -1,65 +0,0 @@
1
- /*
2
- * 图表配置文件
3
- * */
4
-
5
-
6
- //不同类型的配置
7
- var typeConfig = [
8
- {
9
- chart: {
10
- type: 'line'
11
- },
12
- plotOptions: {
13
- line: {
14
- dataLabels: {
15
- enabled: false
16
- },
17
- enableMouseTracking: true
18
- }
19
- }
20
- }, {
21
- chart: {
22
- type: 'line'
23
- },
24
- plotOptions: {
25
- line: {
26
- dataLabels: {
27
- enabled: true
28
- },
29
- enableMouseTracking: false
30
- }
31
- }
32
- }, {
33
- chart: {
34
- type: 'area'
35
- }
36
- }, {
37
- chart: {
38
- type: 'bar'
39
- }
40
- }, {
41
- chart: {
42
- type: 'column'
43
- }
44
- }, {
45
- chart: {
46
- plotBackgroundColor: null,
47
- plotBorderWidth: null,
48
- plotShadow: false
49
- },
50
- plotOptions: {
51
- pie: {
52
- allowPointSelect: true,
53
- cursor: 'pointer',
54
- dataLabels: {
55
- enabled: true,
56
- color: '#000000',
57
- connectorColor: '#000000',
58
- formatter: function() {
59
- return '<b>'+ this.point.name +'</b>: '+ ( Math.round( this.point.percentage*100 ) / 100 ) +' %';
60
- }
61
- }
62
- }
63
- }
64
- }
65
- ];
@@ -1,165 +0,0 @@
1
- html, body {
2
- width: 100%;
3
- height: 100%;
4
- margin: 0;
5
- padding: 0;
6
- overflow-x: hidden;
7
- }
8
-
9
- .main {
10
- width: 100%;
11
- overflow: hidden;
12
- }
13
-
14
- .table-view {
15
- height: 100%;
16
- float: left;
17
- margin: 20px;
18
- width: 40%;
19
- }
20
-
21
- .table-view .table-container {
22
- width: 100%;
23
- margin-bottom: 50px;
24
- overflow: scroll;
25
- }
26
-
27
- .table-view th {
28
- padding: 5px 10px;
29
- background-color: #F7F7F7;
30
- }
31
-
32
- .table-view td {
33
- width: 50px;
34
- text-align: center;
35
- padding:0;
36
- }
37
-
38
- .table-container input {
39
- width: 40px;
40
- padding: 5px;
41
- border: none;
42
- outline: none;
43
- }
44
-
45
- .table-view caption {
46
- font-size: 18px;
47
- text-align: left;
48
- }
49
-
50
- .charts-view {
51
- /*margin-left: 49%!important;*/
52
- width: 50%;
53
- margin-left: 49%;
54
- height: 400px;
55
- }
56
-
57
- .charts-container {
58
- border-left: 1px solid #c3c3c3;
59
- }
60
-
61
- .charts-format fieldset {
62
- padding-left: 20px;
63
- margin-bottom: 50px;
64
- }
65
-
66
- .charts-format legend {
67
- padding-left: 10px;
68
- padding-right: 10px;
69
- }
70
-
71
- .format-item-container {
72
- padding: 20px;
73
- }
74
-
75
- .format-item-container label {
76
- display: block;
77
- margin: 10px 0;
78
- }
79
-
80
- .charts-format .data-item {
81
- border: 1px solid black;
82
- outline: none;
83
- padding: 2px 3px;
84
- }
85
-
86
- /* 图表类型 */
87
-
88
- .charts-type {
89
- margin-top: 50px;
90
- height: 300px;
91
- }
92
-
93
- .scroll-view {
94
- border: 1px solid #c3c3c3;
95
- border-left: none;
96
- border-right: none;
97
- overflow: hidden;
98
- }
99
-
100
- .scroll-container {
101
- margin: 20px;
102
- width: 100%;
103
- overflow: hidden;
104
- }
105
-
106
- .scroll-bed {
107
- width: 10000px;
108
- _margin-top: 20px;
109
- -webkit-transition: margin-left .5s ease;
110
- -moz-transition: margin-left .5s ease;
111
- transition: margin-left .5s ease;
112
- }
113
-
114
- .view-box {
115
- display: inline-block;
116
- *display: inline;
117
- *zoom: 1;
118
- margin-right: 20px;
119
- border: 2px solid white;
120
- line-height: 0;
121
- overflow: hidden;
122
- cursor: pointer;
123
- }
124
-
125
- .view-box img {
126
- border: 1px solid #cecece;
127
- }
128
-
129
- .view-box.selected {
130
- border-color: #7274A7;
131
- }
132
-
133
- .button-container {
134
- margin-bottom: 20px;
135
- text-align: center;
136
- }
137
-
138
- .button-container a {
139
- display: inline-block;
140
- width: 100px;
141
- height: 25px;
142
- line-height: 25px;
143
- border: 1px solid #c2ccd1;
144
- margin-right: 30px;
145
- text-decoration: none;
146
- color: black;
147
- -webkit-border-radius: 2px;
148
- -moz-border-radius: 2px;
149
- border-radius: 2px;
150
- }
151
-
152
- .button-container a:HOVER {
153
- background: #fcfcfc;
154
- }
155
-
156
- .button-container a:ACTIVE {
157
- border-top-color: #c2ccd1;
158
- box-shadow:inset 0 5px 4px -4px rgba(49, 49, 64, 0.1);
159
- }
160
-
161
- .edui-charts-not-data {
162
- height: 100px;
163
- line-height: 100px;
164
- text-align: center;
165
- }
@@ -1,89 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>chart</title>
5
- <meta chartset="utf-8">
6
- <link rel="stylesheet" type="text/css" href="charts.css">
7
- <script type="text/javascript" src="../internal.js"></script>
8
- </head>
9
- <body>
10
- <div class="main">
11
- <div class="table-view">
12
- <h3><var id="lang_data_source"></var></h3>
13
- <div id="tableContainer" class="table-container"></div>
14
- <h3><var id="lang_chart_format"></var></h3>
15
- <form name="data-form">
16
- <div class="charts-format">
17
- <fieldset>
18
- <legend><var id="lang_data_align"></var></legend>
19
- <div class="format-item-container">
20
- <label>
21
- <input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="1" checked="checked">
22
- <var id="lang_chart_align_same"></var>
23
- </label>
24
- <label>
25
- <input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="-1">
26
- <var id="lang_chart_align_reverse"></var>
27
- </label>
28
- <br>
29
- </div>
30
- </fieldset>
31
- <fieldset>
32
- <legend><var id="lang_chart_title"></var></legend>
33
- <div class="format-item-container">
34
- <label>
35
- <var id="lang_chart_main_title"></var><input type="text" name="title" class="data-item">
36
- </label>
37
- <label>
38
- <var id="lang_chart_sub_title"></var><input type="text" name="sub-title" class="data-item not-pie-item">
39
- </label>
40
- <label>
41
- <var id="lang_chart_x_title"></var><input type="text" name="x-title" class="data-item not-pie-item">
42
- </label>
43
- <label>
44
- <var id="lang_chart_y_title"></var><input type="text" name="y-title" class="data-item not-pie-item">
45
- </label>
46
- </div>
47
- </fieldset>
48
- <fieldset>
49
- <legend><var id="lang_chart_tip"></var></legend>
50
- <div class="format-item-container">
51
- <label>
52
- <var id="lang_cahrt_tip_prefix"></var>
53
- <input type="text" id="tipInput" name="tip" class="data-item" disabled="disabled">
54
- </label>
55
- <p><var id="lang_cahrt_tip_description"></var></p>
56
- </div>
57
- </fieldset>
58
- <fieldset>
59
- <legend><var id="lang_chart_data_unit"></var></legend>
60
- <div class="format-item-container">
61
- <label><var id="lang_chart_data_unit_title"></var><input type="text" name="unit" class="data-item"></label>
62
- <p><var id="lang_chart_data_unit_description"></var></p>
63
- </div>
64
- </fieldset>
65
- </div>
66
- </form>
67
- </div>
68
- <div class="charts-view">
69
- <div id="chartsContainer" class="charts-container"></div>
70
- <div id="chartsType" class="charts-type">
71
- <h3><var id="lang_chart_type"></var></h3>
72
- <div class="scroll-view">
73
- <div class="scroll-container">
74
- <div id="scrollBed" class="scroll-bed"></div>
75
- </div>
76
- <div id="buttonContainer" class="button-container">
77
- <a href="#" data-title="prev"><var id="lang_prev_btn"></var></a>
78
- <a href="#" data-title="next"><var id="lang_next_btn"></var></a>
79
- </div>
80
- </div>
81
- </div>
82
- </div>
83
- </div>
84
- <script src="../../third-party/jquery-1.10.2.min.js"></script>
85
- <script src="../../third-party/highcharts/highcharts.js"></script>
86
- <script src="chart.config.js"></script>
87
- <script src="charts.js"></script>
88
- </body>
89
- </html>
@@ -1,519 +0,0 @@
1
- /*
2
- * 图片转换对话框脚本
3
- **/
4
-
5
- var tableData = [],
6
- //编辑器页面table
7
- editorTable = null,
8
- chartsConfig = window.typeConfig,
9
- resizeTimer = null,
10
- //初始默认图表类型
11
- currentChartType = 0;
12
-
13
- window.onload = function () {
14
-
15
- editorTable = domUtils.findParentByTagName( editor.selection.getRange().startContainer, 'table', true);
16
-
17
- //未找到表格, 显示错误页面
18
- if ( !editorTable ) {
19
- document.body.innerHTML = "<div class='edui-charts-not-data'>未找到数据</div>";
20
- return;
21
- }
22
-
23
- //初始化图表类型选择
24
- initChartsTypeView();
25
- renderTable( editorTable );
26
- initEvent();
27
- initUserConfig( editorTable.getAttribute( "data-chart" ) );
28
- $( "#scrollBed .view-box:eq("+ currentChartType +")" ).trigger( "click" );
29
- updateViewType( currentChartType );
30
-
31
- dialog.addListener( "resize", function () {
32
-
33
- if ( resizeTimer != null ) {
34
- window.clearTimeout( resizeTimer );
35
- }
36
-
37
- resizeTimer = window.setTimeout( function () {
38
-
39
- resizeTimer = null;
40
-
41
- renderCharts();
42
-
43
- }, 500 );
44
-
45
- } );
46
-
47
- };
48
-
49
- function initChartsTypeView () {
50
-
51
- var contents = [];
52
-
53
- for ( var i = 0, len = chartsConfig.length; i<len; i++ ) {
54
-
55
- contents.push( '<div class="view-box" data-chart-type="'+ i +'"><img width="300" src="images/charts'+ i +'.png"></div>' );
56
-
57
- }
58
-
59
- $( "#scrollBed" ).html( contents.join( "" ) );
60
-
61
- }
62
-
63
- //渲染table, 以便用户修改数据
64
- function renderTable ( table ) {
65
-
66
- var tableHtml = [];
67
-
68
- //构造数据
69
- for ( var i = 0, row; row = table.rows[ i ]; i++ ) {
70
-
71
- tableData[ i ] = [];
72
- tableHtml[ i ] = [];
73
-
74
- for ( var j = 0, cell; cell = row.cells[ j ]; j++ ) {
75
-
76
- var value = getCellValue( cell );
77
-
78
- if ( i > 0 && j > 0 ) {
79
- value = +value;
80
- }
81
-
82
- if ( i === 0 || j === 0 ) {
83
- tableHtml[ i ].push( '<th>'+ value +'</th>' );
84
- } else {
85
- tableHtml[ i ].push( '<td><input type="text" class="data-item" value="'+ value +'"></td>' );
86
- }
87
-
88
- tableData[ i ][ j ] = value;
89
-
90
- }
91
-
92
- tableHtml[ i ] = tableHtml[ i ].join( "" );
93
-
94
- }
95
-
96
- //draw 表格
97
- $( "#tableContainer" ).html( '<table id="showTable" border="1"><tbody><tr>'+ tableHtml.join( "</tr><tr>" ) +'</tr></tbody></table>' );
98
-
99
- }
100
-
101
- /*
102
- * 根据表格已有的图表属性初始化当前图表属性
103
- */
104
- function initUserConfig ( config ) {
105
-
106
- var parsedConfig = {};
107
-
108
- if ( !config ) {
109
- return;
110
- }
111
-
112
- config = config.split( ";" );
113
-
114
- $.each( config, function ( index, item ) {
115
-
116
- item = item.split( ":" );
117
- parsedConfig[ item[ 0 ] ] = item[ 1 ];
118
-
119
- } );
120
-
121
- setUserConfig( parsedConfig );
122
-
123
- }
124
-
125
- function initEvent () {
126
-
127
- var cacheValue = null,
128
- //图表类型数
129
- typeViewCount = chartsConfig.length- 1,
130
- $chartsTypeViewBox = $( '#scrollBed .view-box' );
131
-
132
- $( ".charts-format" ).delegate( ".format-ctrl", "change", function () {
133
-
134
- renderCharts();
135
-
136
- } )
137
-
138
- $( ".table-view" ).delegate( ".data-item", "focus", function () {
139
-
140
- cacheValue = this.value;
141
-
142
- } ).delegate( ".data-item", "blur", function () {
143
-
144
- if ( this.value !== cacheValue ) {
145
- renderCharts();
146
- }
147
-
148
- cacheValue = null;
149
-
150
- } );
151
-
152
- $( "#buttonContainer" ).delegate( "a", "click", function (e) {
153
-
154
- e.preventDefault();
155
-
156
- if ( this.getAttribute( "data-title" ) === 'prev' ) {
157
-
158
- if ( currentChartType > 0 ) {
159
- currentChartType--;
160
- updateViewType( currentChartType );
161
- }
162
-
163
- } else {
164
-
165
- if ( currentChartType < typeViewCount ) {
166
- currentChartType++;
167
- updateViewType( currentChartType );
168
- }
169
-
170
- }
171
-
172
- } );
173
-
174
- //图表类型变化
175
- $( '#scrollBed' ).delegate( ".view-box", "click", function (e) {
176
-
177
- var index = $( this ).attr( "data-chart-type" );
178
- $chartsTypeViewBox.removeClass( "selected" );
179
- $( $chartsTypeViewBox[ index ] ).addClass( "selected" );
180
-
181
- currentChartType = index | 0;
182
-
183
- //饼图, 禁用部分配置
184
- if ( currentChartType === chartsConfig.length - 1 ) {
185
-
186
- disableNotPieConfig();
187
-
188
- //启用完整配置
189
- } else {
190
-
191
- enableNotPieConfig();
192
-
193
- }
194
-
195
- renderCharts();
196
-
197
- } );
198
-
199
- }
200
-
201
- function renderCharts () {
202
-
203
- var data = collectData();
204
-
205
- $('#chartsContainer').highcharts( $.extend( {}, chartsConfig[ currentChartType ], {
206
-
207
- credits: {
208
- enabled: false
209
- },
210
- exporting: {
211
- enabled: false
212
- },
213
- title: {
214
- text: data.title,
215
- x: -20 //center
216
- },
217
- subtitle: {
218
- text: data.subTitle,
219
- x: -20
220
- },
221
- xAxis: {
222
- title: {
223
- text: data.xTitle
224
- },
225
- categories: data.categories
226
- },
227
- yAxis: {
228
- title: {
229
- text: data.yTitle
230
- },
231
- plotLines: [{
232
- value: 0,
233
- width: 1,
234
- color: '#808080'
235
- }]
236
- },
237
- tooltip: {
238
- enabled: true,
239
- valueSuffix: data.suffix
240
- },
241
- legend: {
242
- layout: 'vertical',
243
- align: 'right',
244
- verticalAlign: 'middle',
245
- borderWidth: 1
246
- },
247
- series: data.series
248
-
249
- } ));
250
-
251
- }
252
-
253
- function updateViewType ( index ) {
254
-
255
- $( "#scrollBed" ).css( 'marginLeft', -index*324+'px' );
256
-
257
- }
258
-
259
- function collectData () {
260
-
261
- var form = document.forms[ 'data-form' ],
262
- data = null;
263
-
264
- if ( currentChartType !== chartsConfig.length - 1 ) {
265
-
266
- data = getSeriesAndCategories();
267
- $.extend( data, getUserConfig() );
268
-
269
- //饼图数据格式
270
- } else {
271
- data = getSeriesForPieChart();
272
- data.title = form[ 'title' ].value;
273
- data.suffix = form[ 'unit' ].value;
274
- }
275
-
276
- return data;
277
-
278
- }
279
-
280
- /**
281
- * 获取用户配置信息
282
- */
283
- function getUserConfig () {
284
-
285
- var form = document.forms[ 'data-form' ],
286
- info = {
287
- title: form[ 'title' ].value,
288
- subTitle: form[ 'sub-title' ].value,
289
- xTitle: form[ 'x-title' ].value,
290
- yTitle: form[ 'y-title' ].value,
291
- suffix: form[ 'unit' ].value,
292
- //数据对齐方式
293
- tableDataFormat: getTableDataFormat (),
294
- //饼图提示文字
295
- tip: $( "#tipInput" ).val()
296
- };
297
-
298
- return info;
299
-
300
- }
301
-
302
- function setUserConfig ( config ) {
303
-
304
- var form = document.forms[ 'data-form' ];
305
-
306
- config.title && ( form[ 'title' ].value = config.title );
307
- config.subTitle && ( form[ 'sub-title' ].value = config.subTitle );
308
- config.xTitle && ( form[ 'x-title' ].value = config.xTitle );
309
- config.yTitle && ( form[ 'y-title' ].value = config.yTitle );
310
- config.suffix && ( form[ 'unit' ].value = config.suffix );
311
- config.dataFormat == "-1" && ( form[ 'charts-format' ][ 1 ].checked = true );
312
- config.tip && ( form[ 'tip' ].value = config.tip );
313
- currentChartType = config.chartType || 0;
314
-
315
- }
316
-
317
- function getSeriesAndCategories () {
318
-
319
- var form = document.forms[ 'data-form' ],
320
- series = [],
321
- categories = [],
322
- tmp = [],
323
- tableData = getTableData();
324
-
325
- //反转数据
326
- if ( getTableDataFormat() === "-1" ) {
327
-
328
- for ( var i = 0, len = tableData.length; i < len; i++ ) {
329
-
330
- for ( var j = 0, jlen = tableData[ i ].length; j < jlen; j++ ) {
331
-
332
- if ( !tmp[ j ] ) {
333
- tmp[ j ] = [];
334
- }
335
-
336
- tmp[ j ][ i ] = tableData[ i ][ j ];
337
-
338
- }
339
-
340
- }
341
-
342
- tableData = tmp;
343
-
344
- }
345
-
346
- categories = tableData[0].slice( 1 );
347
-
348
- for ( var i = 1, data; data = tableData[ i ]; i++ ) {
349
-
350
- series.push( {
351
- name: data[ 0 ],
352
- data: data.slice( 1 )
353
- } );
354
-
355
- }
356
-
357
- return {
358
- series: series,
359
- categories: categories
360
- };
361
-
362
- }
363
-
364
- /*
365
- * 获取数据源数据对齐方式
366
- */
367
- function getTableDataFormat () {
368
-
369
- var form = document.forms[ 'data-form' ],
370
- items = form['charts-format'];
371
-
372
- return items[ 0 ].checked ? items[ 0 ].value : items[ 1 ].value;
373
-
374
- }
375
-
376
- /*
377
- * 禁用非饼图类型的配置项
378
- */
379
- function disableNotPieConfig() {
380
-
381
- updateConfigItem( 'disable' );
382
-
383
- }
384
-
385
- /*
386
- * 启用非饼图类型的配置项
387
- */
388
- function enableNotPieConfig() {
389
-
390
- updateConfigItem( 'enable' );
391
-
392
- }
393
-
394
- function updateConfigItem ( value ) {
395
-
396
- var table = $( "#showTable" )[ 0 ],
397
- isDisable = value === 'disable' ? true : false;
398
-
399
- //table中的input处理
400
- for ( var i = 2 , row; row = table.rows[ i ]; i++ ) {
401
-
402
- for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {
403
-
404
- $( "input", cell ).attr( "disabled", isDisable );
405
-
406
- }
407
-
408
- }
409
-
410
- //其他项处理
411
- $( "input.not-pie-item" ).attr( "disabled", isDisable );
412
- $( "#tipInput" ).attr( "disabled", !isDisable )
413
-
414
- }
415
-
416
- /*
417
- * 获取饼图数据
418
- * 饼图的数据只取第一行的
419
- **/
420
- function getSeriesForPieChart () {
421
-
422
- var series = {
423
- type: 'pie',
424
- name: $("#tipInput").val(),
425
- data: []
426
- },
427
- tableData = getTableData();
428
-
429
-
430
- for ( var j = 1, jlen = tableData[ 0 ].length; j < jlen; j++ ) {
431
-
432
- var title = tableData[ 0 ][ j ],
433
- val = tableData[ 1 ][ j ];
434
-
435
- series.data.push( [ title, val ] );
436
-
437
- }
438
-
439
- return {
440
- series: [ series ]
441
- };
442
-
443
- }
444
-
445
- function getTableData () {
446
-
447
- var table = document.getElementById( "showTable" ),
448
- xCount = table.rows[0].cells.length - 1,
449
- values = getTableInputValue();
450
-
451
- for ( var i = 0, value; value = values[ i ]; i++ ) {
452
-
453
- tableData[ Math.floor( i / xCount ) + 1 ][ i % xCount + 1 ] = values[ i ];
454
-
455
- }
456
-
457
- return tableData;
458
-
459
- }
460
-
461
- function getTableInputValue () {
462
-
463
- var table = document.getElementById( "showTable" ),
464
- inputs = table.getElementsByTagName( "input" ),
465
- values = [];
466
-
467
- for ( var i = 0, input; input = inputs[ i ]; i++ ) {
468
- values.push( input.value | 0 );
469
- }
470
-
471
- return values;
472
-
473
- }
474
-
475
- function getCellValue ( cell ) {
476
-
477
- var value = utils.trim( ( cell.innerText || cell.textContent || '' ) );
478
-
479
- return value.replace( new RegExp( UE.dom.domUtils.fillChar, 'g' ), '' ).replace( /^\s+|\s+$/g, '' );
480
-
481
- }
482
-
483
-
484
- //dialog确认事件
485
- dialog.onok = function () {
486
-
487
- //收集信息
488
- var form = document.forms[ 'data-form' ],
489
- info = getUserConfig();
490
-
491
- //添加图表类型
492
- info.chartType = currentChartType;
493
-
494
- //同步表格数据到编辑器
495
- syncTableData();
496
-
497
- //执行图表命令
498
- editor.execCommand( 'charts', info );
499
-
500
- };
501
-
502
- /*
503
- * 同步图表编辑视图的表格数据到编辑器里的原始表格
504
- */
505
- function syncTableData () {
506
-
507
- var tableData = getTableData();
508
-
509
- for ( var i = 1, row; row = editorTable.rows[ i ]; i++ ) {
510
-
511
- for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {
512
-
513
- cell.innerHTML = tableData[ i ] [ j ];
514
-
515
- }
516
-
517
- }
518
-
519
- }