centaline-data-driven 1.2.64 → 1.2.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/package.json +1 -1
  2. package/src/centaline/dynamicContact/src/dynamicContact.vue +2 -1
  3. package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +1 -1
  4. package/src/centaline/dynamicRichText/src/dynamicRichText.vue +16 -10
  5. package/src/main.js +1 -1
  6. package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
  7. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
  8. package/static/UEditor/dialogs/anchor/anchor.html +0 -40
  9. package/static/UEditor/dialogs/attachment/attachment.css +0 -681
  10. package/static/UEditor/dialogs/attachment/attachment.html +0 -60
  11. package/static/UEditor/dialogs/attachment/attachment.js +0 -768
  12. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_chm.gif +0 -0
  13. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
  14. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
  15. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
  16. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
  17. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
  18. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
  19. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
  20. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
  21. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
  22. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
  23. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
  24. package/static/UEditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
  25. package/static/UEditor/dialogs/attachment/images/alignicon.gif +0 -0
  26. package/static/UEditor/dialogs/attachment/images/alignicon.png +0 -0
  27. package/static/UEditor/dialogs/attachment/images/bg.png +0 -0
  28. package/static/UEditor/dialogs/attachment/images/file-icons.gif +0 -0
  29. package/static/UEditor/dialogs/attachment/images/file-icons.png +0 -0
  30. package/static/UEditor/dialogs/attachment/images/icons.gif +0 -0
  31. package/static/UEditor/dialogs/attachment/images/icons.png +0 -0
  32. package/static/UEditor/dialogs/attachment/images/image.png +0 -0
  33. package/static/UEditor/dialogs/attachment/images/progress.png +0 -0
  34. package/static/UEditor/dialogs/attachment/images/success.gif +0 -0
  35. package/static/UEditor/dialogs/attachment/images/success.png +0 -0
  36. package/static/UEditor/dialogs/background/background.css +0 -94
  37. package/static/UEditor/dialogs/background/background.html +0 -56
  38. package/static/UEditor/dialogs/background/background.js +0 -376
  39. package/static/UEditor/dialogs/background/images/bg.png +0 -0
  40. package/static/UEditor/dialogs/background/images/success.png +0 -0
  41. package/static/UEditor/dialogs/charts/chart.config.js +0 -65
  42. package/static/UEditor/dialogs/charts/charts.css +0 -165
  43. package/static/UEditor/dialogs/charts/charts.html +0 -89
  44. package/static/UEditor/dialogs/charts/charts.js +0 -519
  45. package/static/UEditor/dialogs/charts/images/charts0.png +0 -0
  46. package/static/UEditor/dialogs/charts/images/charts1.png +0 -0
  47. package/static/UEditor/dialogs/charts/images/charts2.png +0 -0
  48. package/static/UEditor/dialogs/charts/images/charts3.png +0 -0
  49. package/static/UEditor/dialogs/charts/images/charts4.png +0 -0
  50. package/static/UEditor/dialogs/charts/images/charts5.png +0 -0
  51. package/static/UEditor/dialogs/emotion/emotion.css +0 -43
  52. package/static/UEditor/dialogs/emotion/emotion.html +0 -54
  53. package/static/UEditor/dialogs/emotion/emotion.js +0 -186
  54. package/static/UEditor/dialogs/emotion/images/0.gif +0 -0
  55. package/static/UEditor/dialogs/emotion/images/bface.gif +0 -0
  56. package/static/UEditor/dialogs/emotion/images/cface.gif +0 -0
  57. package/static/UEditor/dialogs/emotion/images/fface.gif +0 -0
  58. package/static/UEditor/dialogs/emotion/images/jxface2.gif +0 -0
  59. package/static/UEditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
  60. package/static/UEditor/dialogs/emotion/images/tface.gif +0 -0
  61. package/static/UEditor/dialogs/emotion/images/wface.gif +0 -0
  62. package/static/UEditor/dialogs/emotion/images/yface.gif +0 -0
  63. package/static/UEditor/dialogs/gmap/gmap.html +0 -89
  64. package/static/UEditor/dialogs/help/help.css +0 -7
  65. package/static/UEditor/dialogs/help/help.html +0 -82
  66. package/static/UEditor/dialogs/help/help.js +0 -56
  67. package/static/UEditor/dialogs/image/image.css +0 -894
  68. package/static/UEditor/dialogs/image/image.html +0 -120
  69. package/static/UEditor/dialogs/image/image.js +0 -1156
  70. package/static/UEditor/dialogs/image/images/alignicon.jpg +0 -0
  71. package/static/UEditor/dialogs/image/images/bg.png +0 -0
  72. package/static/UEditor/dialogs/image/images/icons.gif +0 -0
  73. package/static/UEditor/dialogs/image/images/icons.png +0 -0
  74. package/static/UEditor/dialogs/image/images/image.png +0 -0
  75. package/static/UEditor/dialogs/image/images/progress.png +0 -0
  76. package/static/UEditor/dialogs/image/images/success.gif +0 -0
  77. package/static/UEditor/dialogs/image/images/success.png +0 -0
  78. package/static/UEditor/dialogs/insertframe/insertframe.html +0 -98
  79. package/static/UEditor/dialogs/internal.js +0 -81
  80. package/static/UEditor/dialogs/link/link.html +0 -126
  81. package/static/UEditor/dialogs/map/map.html +0 -135
  82. package/static/UEditor/dialogs/map/show.html +0 -118
  83. package/static/UEditor/dialogs/music/music.css +0 -30
  84. package/static/UEditor/dialogs/music/music.html +0 -32
  85. package/static/UEditor/dialogs/music/music.js +0 -192
  86. package/static/UEditor/dialogs/preview/preview.html +0 -40
  87. package/static/UEditor/dialogs/scrawl/images/addimg.png +0 -0
  88. package/static/UEditor/dialogs/scrawl/images/brush.png +0 -0
  89. package/static/UEditor/dialogs/scrawl/images/delimg.png +0 -0
  90. package/static/UEditor/dialogs/scrawl/images/delimgH.png +0 -0
  91. package/static/UEditor/dialogs/scrawl/images/empty.png +0 -0
  92. package/static/UEditor/dialogs/scrawl/images/emptyH.png +0 -0
  93. package/static/UEditor/dialogs/scrawl/images/eraser.png +0 -0
  94. package/static/UEditor/dialogs/scrawl/images/redo.png +0 -0
  95. package/static/UEditor/dialogs/scrawl/images/redoH.png +0 -0
  96. package/static/UEditor/dialogs/scrawl/images/scale.png +0 -0
  97. package/static/UEditor/dialogs/scrawl/images/scaleH.png +0 -0
  98. package/static/UEditor/dialogs/scrawl/images/size.png +0 -0
  99. package/static/UEditor/dialogs/scrawl/images/undo.png +0 -0
  100. package/static/UEditor/dialogs/scrawl/images/undoH.png +0 -0
  101. package/static/UEditor/dialogs/scrawl/scrawl.css +0 -72
  102. package/static/UEditor/dialogs/scrawl/scrawl.html +0 -95
  103. package/static/UEditor/dialogs/scrawl/scrawl.js +0 -671
  104. package/static/UEditor/dialogs/searchreplace/searchreplace.html +0 -102
  105. package/static/UEditor/dialogs/searchreplace/searchreplace.js +0 -164
  106. package/static/UEditor/dialogs/snapscreen/snapscreen.html +0 -58
  107. package/static/UEditor/dialogs/spechars/spechars.html +0 -21
  108. package/static/UEditor/dialogs/spechars/spechars.js +0 -57
  109. package/static/UEditor/dialogs/table/dragicon.png +0 -0
  110. package/static/UEditor/dialogs/table/edittable.css +0 -84
  111. package/static/UEditor/dialogs/table/edittable.html +0 -64
  112. package/static/UEditor/dialogs/table/edittable.js +0 -237
  113. package/static/UEditor/dialogs/table/edittd.html +0 -61
  114. package/static/UEditor/dialogs/table/edittip.html +0 -33
  115. package/static/UEditor/dialogs/template/config.js +0 -42
  116. package/static/UEditor/dialogs/template/images/bg.gif +0 -0
  117. package/static/UEditor/dialogs/template/images/pre0.png +0 -0
  118. package/static/UEditor/dialogs/template/images/pre1.png +0 -0
  119. package/static/UEditor/dialogs/template/images/pre2.png +0 -0
  120. package/static/UEditor/dialogs/template/images/pre3.png +0 -0
  121. package/static/UEditor/dialogs/template/images/pre4.png +0 -0
  122. package/static/UEditor/dialogs/template/template.css +0 -18
  123. package/static/UEditor/dialogs/template/template.html +0 -26
  124. package/static/UEditor/dialogs/template/template.js +0 -53
  125. package/static/UEditor/dialogs/video/images/bg.png +0 -0
  126. package/static/UEditor/dialogs/video/images/center_focus.jpg +0 -0
  127. package/static/UEditor/dialogs/video/images/file-icons.gif +0 -0
  128. package/static/UEditor/dialogs/video/images/file-icons.png +0 -0
  129. package/static/UEditor/dialogs/video/images/icons.gif +0 -0
  130. package/static/UEditor/dialogs/video/images/icons.png +0 -0
  131. package/static/UEditor/dialogs/video/images/image.png +0 -0
  132. package/static/UEditor/dialogs/video/images/left_focus.jpg +0 -0
  133. package/static/UEditor/dialogs/video/images/none_focus.jpg +0 -0
  134. package/static/UEditor/dialogs/video/images/progress.png +0 -0
  135. package/static/UEditor/dialogs/video/images/right_focus.jpg +0 -0
  136. package/static/UEditor/dialogs/video/images/success.gif +0 -0
  137. package/static/UEditor/dialogs/video/images/success.png +0 -0
  138. package/static/UEditor/dialogs/video/video.css +0 -635
  139. package/static/UEditor/dialogs/video/video.html +0 -86
  140. package/static/UEditor/dialogs/video/video.js +0 -797
  141. package/static/UEditor/dialogs/webapp/webapp.html +0 -53
  142. package/static/UEditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
  143. package/static/UEditor/dialogs/wordimage/imageUploader.swf +0 -0
  144. package/static/UEditor/dialogs/wordimage/tangram.js +0 -1495
  145. package/static/UEditor/dialogs/wordimage/wordimage.html +0 -110
  146. package/static/UEditor/dialogs/wordimage/wordimage.js +0 -157
  147. package/static/UEditor/index.html +0 -175
  148. package/static/UEditor/jsp/config.json +0 -94
  149. package/static/UEditor/jsp/controller.jsp +0 -14
  150. package/static/UEditor/jsp/lib/commons-codec-1.9.jar +0 -0
  151. package/static/UEditor/jsp/lib/commons-fileupload-1.3.1.jar +0 -0
  152. package/static/UEditor/jsp/lib/commons-io-2.4.jar +0 -0
  153. package/static/UEditor/jsp/lib/json.jar +0 -0
  154. package/static/UEditor/jsp/lib/ueditor-1.1.2.jar +0 -0
  155. package/static/UEditor/lang/en/en.js +0 -684
  156. package/static/UEditor/lang/en/images/addimage.png +0 -0
  157. package/static/UEditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
  158. package/static/UEditor/lang/en/images/alldeletebtnupskin.png +0 -0
  159. package/static/UEditor/lang/en/images/background.png +0 -0
  160. package/static/UEditor/lang/en/images/button.png +0 -0
  161. package/static/UEditor/lang/en/images/copy.png +0 -0
  162. package/static/UEditor/lang/en/images/deletedisable.png +0 -0
  163. package/static/UEditor/lang/en/images/deleteenable.png +0 -0
  164. package/static/UEditor/lang/en/images/listbackground.png +0 -0
  165. package/static/UEditor/lang/en/images/localimage.png +0 -0
  166. package/static/UEditor/lang/en/images/music.png +0 -0
  167. package/static/UEditor/lang/en/images/rotateleftdisable.png +0 -0
  168. package/static/UEditor/lang/en/images/rotateleftenable.png +0 -0
  169. package/static/UEditor/lang/en/images/rotaterightdisable.png +0 -0
  170. package/static/UEditor/lang/en/images/rotaterightenable.png +0 -0
  171. package/static/UEditor/lang/en/images/upload.png +0 -0
  172. package/static/UEditor/lang/zh-cn/images/copy.png +0 -0
  173. package/static/UEditor/lang/zh-cn/images/localimage.png +0 -0
  174. package/static/UEditor/lang/zh-cn/images/music.png +0 -0
  175. package/static/UEditor/lang/zh-cn/images/upload.png +0 -0
  176. package/static/UEditor/lang/zh-cn/zh-cn.js +0 -669
  177. package/static/UEditor/themes/default/css/ueditor.css +0 -1903
  178. package/static/UEditor/themes/default/css/ueditor.min.css +0 -8
  179. package/static/UEditor/themes/default/dialogbase.css +0 -100
  180. package/static/UEditor/themes/default/images/anchor.gif +0 -0
  181. package/static/UEditor/themes/default/images/arrow.png +0 -0
  182. package/static/UEditor/themes/default/images/arrow_down.png +0 -0
  183. package/static/UEditor/themes/default/images/arrow_up.png +0 -0
  184. package/static/UEditor/themes/default/images/button-bg.gif +0 -0
  185. package/static/UEditor/themes/default/images/cancelbutton.gif +0 -0
  186. package/static/UEditor/themes/default/images/charts.png +0 -0
  187. package/static/UEditor/themes/default/images/cursor_h.gif +0 -0
  188. package/static/UEditor/themes/default/images/cursor_h.png +0 -0
  189. package/static/UEditor/themes/default/images/cursor_v.gif +0 -0
  190. package/static/UEditor/themes/default/images/cursor_v.png +0 -0
  191. package/static/UEditor/themes/default/images/dialog-title-bg.png +0 -0
  192. package/static/UEditor/themes/default/images/filescan.png +0 -0
  193. package/static/UEditor/themes/default/images/highlighted.gif +0 -0
  194. package/static/UEditor/themes/default/images/icons-all.gif +0 -0
  195. package/static/UEditor/themes/default/images/icons.gif +0 -0
  196. package/static/UEditor/themes/default/images/icons.png +0 -0
  197. package/static/UEditor/themes/default/images/loaderror.png +0 -0
  198. package/static/UEditor/themes/default/images/loading.gif +0 -0
  199. package/static/UEditor/themes/default/images/lock.gif +0 -0
  200. package/static/UEditor/themes/default/images/neweditor-tab-bg.png +0 -0
  201. package/static/UEditor/themes/default/images/pagebreak.gif +0 -0
  202. package/static/UEditor/themes/default/images/scale.png +0 -0
  203. package/static/UEditor/themes/default/images/sortable.png +0 -0
  204. package/static/UEditor/themes/default/images/spacer.gif +0 -0
  205. package/static/UEditor/themes/default/images/sparator_v.png +0 -0
  206. package/static/UEditor/themes/default/images/table-cell-align.png +0 -0
  207. package/static/UEditor/themes/default/images/tangram-colorpicker.png +0 -0
  208. package/static/UEditor/themes/default/images/toolbar_bg.png +0 -0
  209. package/static/UEditor/themes/default/images/unhighlighted.gif +0 -0
  210. package/static/UEditor/themes/default/images/upload.png +0 -0
  211. package/static/UEditor/themes/default/images/videologo.gif +0 -0
  212. package/static/UEditor/themes/default/images/word.gif +0 -0
  213. package/static/UEditor/themes/default/images/wordpaste.png +0 -0
  214. package/static/UEditor/themes/iframe.css +0 -1
  215. package/static/UEditor/third-party/SyntaxHighlighter/shCore.js +0 -3655
  216. package/static/UEditor/third-party/SyntaxHighlighter/shCoreDefault.css +0 -1
  217. package/static/UEditor/third-party/codemirror/codemirror.css +0 -104
  218. package/static/UEditor/third-party/codemirror/codemirror.js +0 -3581
  219. package/static/UEditor/third-party/highcharts/adapters/mootools-adapter.js +0 -13
  220. package/static/UEditor/third-party/highcharts/adapters/mootools-adapter.src.js +0 -313
  221. package/static/UEditor/third-party/highcharts/adapters/prototype-adapter.js +0 -15
  222. package/static/UEditor/third-party/highcharts/adapters/prototype-adapter.src.js +0 -316
  223. package/static/UEditor/third-party/highcharts/adapters/standalone-framework.js +0 -17
  224. package/static/UEditor/third-party/highcharts/adapters/standalone-framework.src.js +0 -583
  225. package/static/UEditor/third-party/highcharts/highcharts-more.js +0 -50
  226. package/static/UEditor/third-party/highcharts/highcharts-more.src.js +0 -2430
  227. package/static/UEditor/third-party/highcharts/highcharts.js +0 -283
  228. package/static/UEditor/third-party/highcharts/highcharts.src.js +0 -16974
  229. package/static/UEditor/third-party/highcharts/modules/annotations.js +0 -7
  230. package/static/UEditor/third-party/highcharts/modules/annotations.src.js +0 -401
  231. package/static/UEditor/third-party/highcharts/modules/canvas-tools.js +0 -133
  232. package/static/UEditor/third-party/highcharts/modules/canvas-tools.src.js +0 -3113
  233. package/static/UEditor/third-party/highcharts/modules/data.js +0 -17
  234. package/static/UEditor/third-party/highcharts/modules/data.src.js +0 -582
  235. package/static/UEditor/third-party/highcharts/modules/drilldown.js +0 -11
  236. package/static/UEditor/third-party/highcharts/modules/drilldown.src.js +0 -447
  237. package/static/UEditor/third-party/highcharts/modules/exporting.js +0 -22
  238. package/static/UEditor/third-party/highcharts/modules/exporting.src.js +0 -709
  239. package/static/UEditor/third-party/highcharts/modules/funnel.js +0 -12
  240. package/static/UEditor/third-party/highcharts/modules/funnel.src.js +0 -289
  241. package/static/UEditor/third-party/highcharts/modules/heatmap.js +0 -1
  242. package/static/UEditor/third-party/highcharts/modules/heatmap.src.js +0 -53
  243. package/static/UEditor/third-party/highcharts/modules/map.js +0 -27
  244. package/static/UEditor/third-party/highcharts/modules/map.src.js +0 -1002
  245. package/static/UEditor/third-party/highcharts/modules/no-data-to-display.js +0 -12
  246. package/static/UEditor/third-party/highcharts/modules/no-data-to-display.src.js +0 -128
  247. package/static/UEditor/third-party/highcharts/themes/dark-blue.js +0 -254
  248. package/static/UEditor/third-party/highcharts/themes/dark-green.js +0 -255
  249. package/static/UEditor/third-party/highcharts/themes/gray.js +0 -257
  250. package/static/UEditor/third-party/highcharts/themes/grid.js +0 -103
  251. package/static/UEditor/third-party/highcharts/themes/skies.js +0 -89
  252. package/static/UEditor/third-party/jquery-1.10.2.js +0 -9789
  253. package/static/UEditor/third-party/jquery-1.10.2.min.js +0 -6
  254. package/static/UEditor/third-party/jquery-1.10.2.min.map +0 -1
  255. package/static/UEditor/third-party/snapscreen/UEditorSnapscreen.exe +0 -0
  256. package/static/UEditor/third-party/video-js/font/vjs.eot +0 -0
  257. package/static/UEditor/third-party/video-js/font/vjs.svg +0 -65
  258. package/static/UEditor/third-party/video-js/font/vjs.ttf +0 -0
  259. package/static/UEditor/third-party/video-js/font/vjs.woff +0 -0
  260. package/static/UEditor/third-party/video-js/video-js.css +0 -766
  261. package/static/UEditor/third-party/video-js/video-js.min.css +0 -5
  262. package/static/UEditor/third-party/video-js/video-js.swf +0 -0
  263. package/static/UEditor/third-party/video-js/video.dev.js +0 -7106
  264. package/static/UEditor/third-party/video-js/video.js +0 -129
  265. package/static/UEditor/third-party/webuploader/Uploader.swf +0 -0
  266. package/static/UEditor/third-party/webuploader/webuploader.css +0 -28
  267. package/static/UEditor/third-party/webuploader/webuploader.custom.js +0 -5670
  268. package/static/UEditor/third-party/webuploader/webuploader.custom.min.js +0 -2
  269. package/static/UEditor/third-party/webuploader/webuploader.flashonly.js +0 -4176
  270. package/static/UEditor/third-party/webuploader/webuploader.flashonly.min.js +0 -2
  271. package/static/UEditor/third-party/webuploader/webuploader.html5only.js +0 -5559
  272. package/static/UEditor/third-party/webuploader/webuploader.html5only.min.js +0 -2
  273. package/static/UEditor/third-party/webuploader/webuploader.js +0 -6733
  274. package/static/UEditor/third-party/webuploader/webuploader.min.js +0 -2
  275. package/static/UEditor/third-party/webuploader/webuploader.withoutimage.js +0 -4593
  276. package/static/UEditor/third-party/webuploader/webuploader.withoutimage.min.js +0 -2
  277. package/static/UEditor/third-party/xss.min.js +0 -1
  278. package/static/UEditor/third-party/zeroclipboard/ZeroClipboard.js +0 -1256
  279. package/static/UEditor/third-party/zeroclipboard/ZeroClipboard.min.js +0 -9
  280. package/static/UEditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
  281. package/static/UEditor/ueditor.all.min.js +0 -29574
  282. package/static/UEditor/ueditor.config.js +0 -497
  283. package/static/UEditor/ueditor.parse.js +0 -1022
  284. package/static/UEditor/ueditor.parse.min.js +0 -7
@@ -1,1022 +0,0 @@
1
- /*!
2
- * UEditor
3
- * version: ueditor
4
- * build: Wed Dec 26 2018 17:24:52 GMT+0800 (CST)
5
- */
6
-
7
- (function(){
8
-
9
- (function(){
10
- UE = window.UE || {};
11
- var isIE = !!window.ActiveXObject;
12
- //定义utils工具
13
- var utils = {
14
- removeLastbs : function(url){
15
- return url.replace(/\/$/,'')
16
- },
17
- extend : function(t,s){
18
- var a = arguments,
19
- notCover = this.isBoolean(a[a.length - 1]) ? a[a.length - 1] : false,
20
- len = this.isBoolean(a[a.length - 1]) ? a.length - 1 : a.length;
21
- for (var i = 1; i < len; i++) {
22
- var x = a[i];
23
- for (var k in x) {
24
- if (!notCover || !t.hasOwnProperty(k)) {
25
- t[k] = x[k];
26
- }
27
- }
28
- }
29
- return t;
30
- },
31
- isIE : isIE,
32
- cssRule : isIE ? function(key,style,doc){
33
- var indexList,index;
34
- doc = doc || document;
35
- if(doc.indexList){
36
- indexList = doc.indexList;
37
- }else{
38
- indexList = doc.indexList = {};
39
- }
40
- var sheetStyle;
41
- if(!indexList[key]){
42
- if(style === undefined){
43
- return ''
44
- }
45
- sheetStyle = doc.createStyleSheet('',index = doc.styleSheets.length);
46
- indexList[key] = index;
47
- }else{
48
- sheetStyle = doc.styleSheets[indexList[key]];
49
- }
50
- if(style === undefined){
51
- return sheetStyle.cssText
52
- }
53
- sheetStyle.cssText = sheetStyle.cssText + '\n' + (style || '')
54
- } : function(key,style,doc){
55
- doc = doc || document;
56
- var head = doc.getElementsByTagName('head')[0],node;
57
- if(!(node = doc.getElementById(key))){
58
- if(style === undefined){
59
- return ''
60
- }
61
- node = doc.createElement('style');
62
- node.id = key;
63
- head.appendChild(node)
64
- }
65
- if(style === undefined){
66
- return node.innerHTML
67
- }
68
- if(style !== ''){
69
- node.innerHTML = node.innerHTML + '\n' + style;
70
- }else{
71
- head.removeChild(node)
72
- }
73
- },
74
- domReady : function (onready) {
75
- var doc = window.document;
76
- if (doc.readyState === "complete") {
77
- onready();
78
- }else{
79
- if (isIE) {
80
- (function () {
81
- if (doc.isReady) return;
82
- try {
83
- doc.documentElement.doScroll("left");
84
- } catch (error) {
85
- setTimeout(arguments.callee, 0);
86
- return;
87
- }
88
- onready();
89
- })();
90
- window.attachEvent('onload', function(){
91
- onready()
92
- });
93
- } else {
94
- doc.addEventListener("DOMContentLoaded", function () {
95
- doc.removeEventListener("DOMContentLoaded", arguments.callee, false);
96
- onready();
97
- }, false);
98
- window.addEventListener('load', function(){onready()}, false);
99
- }
100
- }
101
-
102
- },
103
- each : function(obj, iterator, context) {
104
- if (obj == null) return;
105
- if (obj.length === +obj.length) {
106
- for (var i = 0, l = obj.length; i < l; i++) {
107
- if(iterator.call(context, obj[i], i, obj) === false)
108
- return false;
109
- }
110
- } else {
111
- for (var key in obj) {
112
- if (obj.hasOwnProperty(key)) {
113
- if(iterator.call(context, obj[key], key, obj) === false)
114
- return false;
115
- }
116
- }
117
- }
118
- },
119
- inArray : function(arr,item){
120
- var index = -1;
121
- this.each(arr,function(v,i){
122
- if(v === item){
123
- index = i;
124
- return false;
125
- }
126
- });
127
- return index;
128
- },
129
- pushItem : function(arr,item){
130
- if(this.inArray(arr,item)==-1){
131
- arr.push(item)
132
- }
133
- },
134
- trim: function (str) {
135
- return str.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g, '');
136
- },
137
- indexOf: function (array, item, start) {
138
- var index = -1;
139
- start = this.isNumber(start) ? start : 0;
140
- this.each(array, function (v, i) {
141
- if (i >= start && v === item) {
142
- index = i;
143
- return false;
144
- }
145
- });
146
- return index;
147
- },
148
- hasClass: function (element, className) {
149
- className = className.replace(/(^[ ]+)|([ ]+$)/g, '').replace(/[ ]{2,}/g, ' ').split(' ');
150
- for (var i = 0, ci, cls = element.className; ci = className[i++];) {
151
- if (!new RegExp('\\b' + ci + '\\b', 'i').test(cls)) {
152
- return false;
153
- }
154
- }
155
- return i - 1 == className.length;
156
- },
157
- addClass:function (elm, classNames) {
158
- if(!elm)return;
159
- classNames = this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' ');
160
- for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){
161
- if(!new RegExp('\\b' + ci + '\\b').test(cls)){
162
- cls += ' ' + ci;
163
- }
164
- }
165
- elm.className = utils.trim(cls);
166
- },
167
- removeClass:function (elm, classNames) {
168
- classNames = this.isArray(classNames) ? classNames :
169
- this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' ');
170
- for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){
171
- cls = cls.replace(new RegExp('\\b' + ci + '\\b'),'')
172
- }
173
- cls = this.trim(cls).replace(/[ ]{2,}/g,' ');
174
- elm.className = cls;
175
- !cls && elm.removeAttribute('className');
176
- },
177
- on: function (element, type, handler) {
178
- var types = this.isArray(type) ? type : type.split(/\s+/),
179
- k = types.length;
180
- if (k) while (k--) {
181
- type = types[k];
182
- if (element.addEventListener) {
183
- element.addEventListener(type, handler, false);
184
- } else {
185
- if (!handler._d) {
186
- handler._d = {
187
- els : []
188
- };
189
- }
190
- var key = type + handler.toString(),index = utils.indexOf(handler._d.els,element);
191
- if (!handler._d[key] || index == -1) {
192
- if(index == -1){
193
- handler._d.els.push(element);
194
- }
195
- if(!handler._d[key]){
196
- handler._d[key] = function (evt) {
197
- return handler.call(evt.srcElement, evt || window.event);
198
- };
199
- }
200
-
201
-
202
- element.attachEvent('on' + type, handler._d[key]);
203
- }
204
- }
205
- }
206
- element = null;
207
- },
208
- off: function (element, type, handler) {
209
- var types = this.isArray(type) ? type : type.split(/\s+/),
210
- k = types.length;
211
- if (k) while (k--) {
212
- type = types[k];
213
- if (element.removeEventListener) {
214
- element.removeEventListener(type, handler, false);
215
- } else {
216
- var key = type + handler.toString();
217
- try{
218
- element.detachEvent('on' + type, handler._d ? handler._d[key] : handler);
219
- }catch(e){}
220
- if (handler._d && handler._d[key]) {
221
- var index = utils.indexOf(handler._d.els,element);
222
- if(index!=-1){
223
- handler._d.els.splice(index,1);
224
- }
225
- handler._d.els.length == 0 && delete handler._d[key];
226
- }
227
- }
228
- }
229
- },
230
- loadFile : function () {
231
- var tmpList = [];
232
- function getItem(doc,obj){
233
- try{
234
- for(var i= 0,ci;ci=tmpList[i++];){
235
- if(ci.doc === doc && ci.url == (obj.src || obj.href)){
236
- return ci;
237
- }
238
- }
239
- }catch(e){
240
- return null;
241
- }
242
-
243
- }
244
- return function (doc, obj, fn) {
245
- var item = getItem(doc,obj);
246
- if (item) {
247
- if(item.ready){
248
- fn && fn();
249
- }else{
250
- item.funs.push(fn)
251
- }
252
- return;
253
- }
254
- tmpList.push({
255
- doc:doc,
256
- url:obj.src||obj.href,
257
- funs:[fn]
258
- });
259
- if (!doc.body) {
260
- var html = [];
261
- for(var p in obj){
262
- if(p == 'tag')continue;
263
- html.push(p + '="' + obj[p] + '"')
264
- }
265
- doc.write('<' + obj.tag + ' ' + html.join(' ') + ' ></'+obj.tag+'>');
266
- return;
267
- }
268
- if (obj.id && doc.getElementById(obj.id)) {
269
- return;
270
- }
271
- var element = doc.createElement(obj.tag);
272
- delete obj.tag;
273
- for (var p in obj) {
274
- element.setAttribute(p, obj[p]);
275
- }
276
- element.onload = element.onreadystatechange = function () {
277
- if (!this.readyState || /loaded|complete/.test(this.readyState)) {
278
- item = getItem(doc,obj);
279
- if (item.funs.length > 0) {
280
- item.ready = 1;
281
- for (var fi; fi = item.funs.pop();) {
282
- fi();
283
- }
284
- }
285
- element.onload = element.onreadystatechange = null;
286
- }
287
- };
288
- element.onerror = function(){
289
- throw Error('The load '+(obj.href||obj.src)+' fails,check the url')
290
- };
291
- doc.getElementsByTagName("head")[0].appendChild(element);
292
- }
293
- }()
294
- };
295
- utils.each(['String', 'Function', 'Array', 'Number', 'RegExp', 'Object','Boolean'], function (v) {
296
- utils['is' + v] = function (obj) {
297
- return Object.prototype.toString.apply(obj) == '[object ' + v + ']';
298
- }
299
- });
300
- var parselist = {};
301
- UE.parse = {
302
- register : function(parseName,fn){
303
- parselist[parseName] = fn;
304
- },
305
- load : function(opt){
306
- utils.each(parselist,function(v){
307
- v.call(opt,utils);
308
- })
309
- }
310
- };
311
- uParse = function(selector,opt){
312
- utils.domReady(function(){
313
- var contents;
314
- if(document.querySelectorAll){
315
- contents = document.querySelectorAll(selector)
316
- }else{
317
- if(/^#/.test(selector)){
318
- contents = [document.getElementById(selector.replace(/^#/,''))]
319
- }else if(/^\./.test(selector)){
320
- var contents = [];
321
- utils.each(document.getElementsByTagName('*'),function(node){
322
- if(node.className && new RegExp('\\b' + selector.replace(/^\./,'') + '\\b','i').test(node.className)){
323
- contents.push(node)
324
- }
325
- })
326
- }else{
327
- contents = document.getElementsByTagName(selector)
328
- }
329
- }
330
- utils.each(contents,function(v){
331
- UE.parse.load(utils.extend({root:v,selector:selector},opt))
332
- })
333
- })
334
- }
335
- })();
336
-
337
- UE.parse.register('insertcode',function(utils){
338
- var pres = this.root.getElementsByTagName('pre');
339
- if(pres.length){
340
- if(typeof XRegExp == "undefined"){
341
- var jsurl,cssurl;
342
- if(this.rootPath !== undefined){
343
- jsurl = utils.removeLastbs(this.rootPath) + '/third-party/SyntaxHighlighter/shCore.js';
344
- cssurl = utils.removeLastbs(this.rootPath) + '/third-party/SyntaxHighlighter/shCoreDefault.css';
345
- }else{
346
- jsurl = this.highlightJsUrl;
347
- cssurl = this.highlightCssUrl;
348
- }
349
- utils.loadFile(document,{
350
- id : "syntaxhighlighter_css",
351
- tag : "link",
352
- rel : "stylesheet",
353
- type : "text/css",
354
- href : cssurl
355
- });
356
- utils.loadFile(document,{
357
- id : "syntaxhighlighter_js",
358
- src : jsurl,
359
- tag : "script",
360
- type : "text/javascript",
361
- defer : "defer"
362
- },function(){
363
- utils.each(pres,function(pi){
364
- if(pi && /brush/i.test(pi.className)){
365
- SyntaxHighlighter.highlight(pi);
366
- }
367
- });
368
- });
369
- }else{
370
- utils.each(pres,function(pi){
371
- if(pi && /brush/i.test(pi.className)){
372
- SyntaxHighlighter.highlight(pi);
373
- }
374
- });
375
- }
376
- }
377
-
378
- });
379
- UE.parse.register('table', function (utils) {
380
- var me = this,
381
- root = this.root,
382
- tables = root.getElementsByTagName('table');
383
- if (tables.length) {
384
- var selector = this.selector;
385
- //追加默认的表格样式
386
- utils.cssRule('table',
387
- selector + ' table.noBorderTable td,' +
388
- selector + ' table.noBorderTable th,' +
389
- selector + ' table.noBorderTable caption{border:1px dashed #ddd !important}' +
390
- selector + ' table.sortEnabled tr.firstRow th,' + selector + ' table.sortEnabled tr.firstRow td{padding-right:20px; background-repeat: no-repeat;' +
391
- 'background-position: center right; background-image:url(' + this.rootPath + 'themes/default/images/sortable.png);}' +
392
- selector + ' table.sortEnabled tr.firstRow th:hover,' + selector + ' table.sortEnabled tr.firstRow td:hover{background-color: #EEE;}' +
393
- selector + ' table{margin-bottom:10px;border-collapse:collapse;display:table;}' +
394
- selector + ' td,' + selector + ' th{ background:white; padding: 5px 10px;border: 1px solid #DDD;}' +
395
- selector + ' caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}' +
396
- selector + ' th{border-top:1px solid #BBB;background:#F7F7F7;}' +
397
- selector + ' table tr.firstRow th{border-top:2px solid #BBB;background:#F7F7F7;}' +
398
- selector + ' tr.ue-table-interlace-color-single td{ background: #fcfcfc; }' +
399
- selector + ' tr.ue-table-interlace-color-double td{ background: #f7faff; }' +
400
- selector + ' td p{margin:0;padding:0;}',
401
- document);
402
- //填充空的单元格
403
-
404
- utils.each('td th caption'.split(' '), function (tag) {
405
- var cells = root.getElementsByTagName(tag);
406
- cells.length && utils.each(cells, function (node) {
407
- if (!node.firstChild) {
408
- node.innerHTML = '&nbsp;';
409
-
410
- }
411
- })
412
- });
413
-
414
- //表格可排序
415
- var tables = root.getElementsByTagName('table');
416
- utils.each(tables, function (table) {
417
- if (/\bsortEnabled\b/.test(table.className)) {
418
- utils.on(table, 'click', function(e){
419
- var target = e.target || e.srcElement,
420
- cell = findParentByTagName(target, ['td', 'th']);
421
- var table = findParentByTagName(target, 'table'),
422
- colIndex = utils.indexOf(table.rows[0].cells, cell),
423
- sortType = table.getAttribute('data-sort-type');
424
- if(colIndex != -1) {
425
- sortTable(table, colIndex, me.tableSortCompareFn || sortType);
426
- updateTable(table);
427
- }
428
- });
429
- }
430
- });
431
-
432
- //按照标签名查找父节点
433
- function findParentByTagName(target, tagNames) {
434
- var i, current = target;
435
- tagNames = utils.isArray(tagNames) ? tagNames:[tagNames];
436
- while(current){
437
- for(i = 0;i < tagNames.length; i++) {
438
- if(current.tagName == tagNames[i].toUpperCase()) return current;
439
- }
440
- current = current.parentNode;
441
- }
442
- return null;
443
- }
444
- //表格排序
445
- function sortTable(table, sortByCellIndex, compareFn) {
446
- var rows = table.rows,
447
- trArray = [],
448
- flag = rows[0].cells[0].tagName === "TH",
449
- lastRowIndex = 0;
450
-
451
- for (var i = 0,len = rows.length; i < len; i++) {
452
- trArray[i] = rows[i];
453
- }
454
-
455
- var Fn = {
456
- 'reversecurrent': function(td1,td2){
457
- return 1;
458
- },
459
- 'orderbyasc': function(td1,td2){
460
- var value1 = td1.innerText||td1.textContent,
461
- value2 = td2.innerText||td2.textContent;
462
- return value1.localeCompare(value2);
463
- },
464
- 'reversebyasc': function(td1,td2){
465
- var value1 = td1.innerHTML,
466
- value2 = td2.innerHTML;
467
- return value2.localeCompare(value1);
468
- },
469
- 'orderbynum': function(td1,td2){
470
- var value1 = td1[utils.isIE ? 'innerText':'textContent'].match(/\d+/),
471
- value2 = td2[utils.isIE ? 'innerText':'textContent'].match(/\d+/);
472
- if(value1) value1 = +value1[0];
473
- if(value2) value2 = +value2[0];
474
- return (value1||0) - (value2||0);
475
- },
476
- 'reversebynum': function(td1,td2){
477
- var value1 = td1[utils.isIE ? 'innerText':'textContent'].match(/\d+/),
478
- value2 = td2[utils.isIE ? 'innerText':'textContent'].match(/\d+/);
479
- if(value1) value1 = +value1[0];
480
- if(value2) value2 = +value2[0];
481
- return (value2||0) - (value1||0);
482
- }
483
- };
484
-
485
- //对表格设置排序的标记data-sort-type
486
- table.setAttribute('data-sort-type', compareFn && typeof compareFn === "string" && Fn[compareFn] ? compareFn:'');
487
-
488
- //th不参与排序
489
- flag && trArray.splice(0, 1);
490
- trArray = sort(trArray,function (tr1, tr2) {
491
- var result;
492
- if (compareFn && typeof compareFn === "function") {
493
- result = compareFn.call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]);
494
- } else if (compareFn && typeof compareFn === "number") {
495
- result = 1;
496
- } else if (compareFn && typeof compareFn === "string" && Fn[compareFn]) {
497
- result = Fn[compareFn].call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]);
498
- } else {
499
- result = Fn['orderbyasc'].call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]);
500
- }
501
- return result;
502
- });
503
- var fragment = table.ownerDocument.createDocumentFragment();
504
- for (var j = 0, len = trArray.length; j < len; j++) {
505
- fragment.appendChild(trArray[j]);
506
- }
507
- var tbody = table.getElementsByTagName("tbody")[0];
508
- if(!lastRowIndex){
509
- tbody.appendChild(fragment);
510
- }else{
511
- tbody.insertBefore(fragment,rows[lastRowIndex- range.endRowIndex + range.beginRowIndex - 1])
512
- }
513
- }
514
- //冒泡排序
515
- function sort(array, compareFn){
516
- compareFn = compareFn || function(item1, item2){ return item1.localeCompare(item2);};
517
- for(var i= 0,len = array.length; i<len; i++){
518
- for(var j = i,length = array.length; j<length; j++){
519
- if(compareFn(array[i], array[j]) > 0){
520
- var t = array[i];
521
- array[i] = array[j];
522
- array[j] = t;
523
- }
524
- }
525
- }
526
- return array;
527
- }
528
- //更新表格
529
- function updateTable(table) {
530
- //给第一行设置firstRow的样式名称,在排序图标的样式上使用到
531
- if(!utils.hasClass(table.rows[0], "firstRow")) {
532
- for(var i = 1; i< table.rows.length; i++) {
533
- utils.removeClass(table.rows[i], "firstRow");
534
- }
535
- utils.addClass(table.rows[0], "firstRow");
536
- }
537
- }
538
- }
539
- });
540
- UE.parse.register('charts',function( utils ){
541
-
542
- utils.cssRule('chartsContainerHeight','.edui-chart-container { height:'+(this.chartContainerHeight||300)+'px}');
543
- var resourceRoot = this.rootPath,
544
- containers = this.root,
545
- sources = null;
546
-
547
- //不存在指定的根路径, 则直接退出
548
- if ( !resourceRoot ) {
549
- return;
550
- }
551
-
552
- if ( sources = parseSources() ) {
553
-
554
- loadResources();
555
-
556
- }
557
-
558
-
559
- function parseSources () {
560
-
561
- if ( !containers ) {
562
- return null;
563
- }
564
-
565
- return extractChartData( containers );
566
-
567
- }
568
-
569
- /**
570
- * 提取数据
571
- */
572
- function extractChartData ( rootNode ) {
573
-
574
- var data = [],
575
- tables = rootNode.getElementsByTagName( "table" );
576
-
577
- for ( var i = 0, tableNode; tableNode = tables[ i ]; i++ ) {
578
-
579
- if ( tableNode.getAttribute( "data-chart" ) !== null ) {
580
-
581
- data.push( formatData( tableNode ) );
582
-
583
- }
584
-
585
- }
586
-
587
- return data.length ? data : null;
588
-
589
- }
590
-
591
- function formatData ( tableNode ) {
592
-
593
- var meta = tableNode.getAttribute( "data-chart" ),
594
- metaConfig = {},
595
- data = [];
596
-
597
- //提取table数据
598
- for ( var i = 0, row; row = tableNode.rows[ i ]; i++ ) {
599
-
600
- var rowData = [];
601
-
602
- for ( var j = 0, cell; cell = row.cells[ j ]; j++ ) {
603
-
604
- var value = ( cell.innerText || cell.textContent || '' );
605
- rowData.push( cell.tagName == 'TH' ? value:(value | 0) );
606
-
607
- }
608
-
609
- data.push( rowData );
610
-
611
- }
612
-
613
- //解析元信息
614
- meta = meta.split( ";" );
615
- for ( var i = 0, metaData; metaData = meta[ i ]; i++ ) {
616
-
617
- metaData = metaData.split( ":" );
618
- metaConfig[ metaData[ 0 ] ] = metaData[ 1 ];
619
-
620
- }
621
-
622
-
623
- return {
624
- table: tableNode,
625
- meta: metaConfig,
626
- data: data
627
- };
628
-
629
- }
630
-
631
- //加载资源
632
- function loadResources () {
633
-
634
- loadJQuery();
635
-
636
- }
637
-
638
- function loadJQuery () {
639
-
640
- //不存在jquery, 则加载jquery
641
- if ( !window.jQuery ) {
642
-
643
- utils.loadFile(document,{
644
- src : resourceRoot + "/third-party/jquery-1.10.2.min.js",
645
- tag : "script",
646
- type : "text/javascript",
647
- defer : "defer"
648
- },function(){
649
-
650
- loadHighcharts();
651
-
652
- });
653
-
654
- } else {
655
-
656
- loadHighcharts();
657
-
658
- }
659
-
660
- }
661
-
662
- function loadHighcharts () {
663
-
664
- //不存在Highcharts, 则加载Highcharts
665
- if ( !window.Highcharts ) {
666
-
667
- utils.loadFile(document,{
668
- src : resourceRoot + "/third-party/highcharts/highcharts.js",
669
- tag : "script",
670
- type : "text/javascript",
671
- defer : "defer"
672
- },function(){
673
-
674
- loadTypeConfig();
675
-
676
- });
677
-
678
- } else {
679
-
680
- loadTypeConfig();
681
-
682
- }
683
-
684
- }
685
-
686
- //加载图表差异化配置文件
687
- function loadTypeConfig () {
688
-
689
- utils.loadFile(document,{
690
- src : resourceRoot + "/dialogs/charts/chart.config.js",
691
- tag : "script",
692
- type : "text/javascript",
693
- defer : "defer"
694
- },function(){
695
-
696
- render();
697
-
698
- });
699
-
700
- }
701
-
702
- //渲染图表
703
- function render () {
704
-
705
- var config = null,
706
- chartConfig = null,
707
- container = null;
708
-
709
- for ( var i = 0, len = sources.length; i < len; i++ ) {
710
-
711
- config = sources[ i ];
712
-
713
- chartConfig = analysisConfig( config );
714
-
715
- container = createContainer( config.table );
716
-
717
- renderChart( container, typeConfig[ config.meta.chartType ], chartConfig );
718
-
719
- }
720
-
721
-
722
- }
723
-
724
- /**
725
- * 渲染图表
726
- * @param container 图表容器节点对象
727
- * @param typeConfig 图表类型配置
728
- * @param config 图表通用配置
729
- * */
730
- function renderChart ( container, typeConfig, config ) {
731
-
732
-
733
- $( container ).highcharts( $.extend( {}, typeConfig, {
734
-
735
- credits: {
736
- enabled: false
737
- },
738
- exporting: {
739
- enabled: false
740
- },
741
- title: {
742
- text: config.title,
743
- x: -20 //center
744
- },
745
- subtitle: {
746
- text: config.subTitle,
747
- x: -20
748
- },
749
- xAxis: {
750
- title: {
751
- text: config.xTitle
752
- },
753
- categories: config.categories
754
- },
755
- yAxis: {
756
- title: {
757
- text: config.yTitle
758
- },
759
- plotLines: [{
760
- value: 0,
761
- width: 1,
762
- color: '#808080'
763
- }]
764
- },
765
- tooltip: {
766
- enabled: true,
767
- valueSuffix: config.suffix
768
- },
769
- legend: {
770
- layout: 'vertical',
771
- align: 'right',
772
- verticalAlign: 'middle',
773
- borderWidth: 1
774
- },
775
- series: config.series
776
-
777
- } ));
778
-
779
- }
780
-
781
- /**
782
- * 创建图表的容器
783
- * 新创建的容器会替换掉对应的table对象
784
- * */
785
- function createContainer ( tableNode ) {
786
-
787
- var container = document.createElement( "div" );
788
- container.className = "edui-chart-container";
789
-
790
- tableNode.parentNode.replaceChild( container, tableNode );
791
-
792
- return container;
793
-
794
- }
795
-
796
- //根据config解析出正确的类别和图表数据信息
797
- function analysisConfig ( config ) {
798
-
799
- var series = [],
800
- //数据类别
801
- categories = [],
802
- result = [],
803
- data = config.data,
804
- meta = config.meta;
805
-
806
- //数据对齐方式为相反的方式, 需要反转数据
807
- if ( meta.dataFormat != "1" ) {
808
-
809
- for ( var i = 0, len = data.length; i < len ; i++ ) {
810
-
811
- for ( var j = 0, jlen = data[ i ].length; j < jlen; j++ ) {
812
-
813
- if ( !result[ j ] ) {
814
- result[ j ] = [];
815
- }
816
-
817
- result[ j ][ i ] = data[ i ][ j ];
818
-
819
- }
820
-
821
- }
822
-
823
- data = result;
824
-
825
- }
826
-
827
- result = {};
828
-
829
- //普通图表
830
- if ( meta.chartType != typeConfig.length - 1 ) {
831
-
832
- categories = data[ 0 ].slice( 1 );
833
-
834
- for ( var i = 1, curData; curData = data[ i ]; i++ ) {
835
- series.push( {
836
- name: curData[ 0 ],
837
- data: curData.slice( 1 )
838
- } );
839
- }
840
-
841
- result.series = series;
842
- result.categories = categories;
843
- result.title = meta.title;
844
- result.subTitle = meta.subTitle;
845
- result.xTitle = meta.xTitle;
846
- result.yTitle = meta.yTitle;
847
- result.suffix = meta.suffix;
848
-
849
- } else {
850
-
851
- var curData = [];
852
-
853
- for ( var i = 1, len = data[ 0 ].length; i < len; i++ ) {
854
-
855
- curData.push( [ data[ 0 ][ i ], data[ 1 ][ i ] | 0 ] );
856
-
857
- }
858
-
859
- //饼图
860
- series[ 0 ] = {
861
- type: 'pie',
862
- name: meta.tip,
863
- data: curData
864
- };
865
-
866
- result.series = series;
867
- result.title = meta.title;
868
- result.suffix = meta.suffix;
869
-
870
- }
871
-
872
- return result;
873
-
874
- }
875
-
876
- });
877
- UE.parse.register('background', function (utils) {
878
- var me = this,
879
- root = me.root,
880
- p = root.getElementsByTagName('p'),
881
- styles;
882
-
883
- for (var i = 0,ci; ci = p[i++];) {
884
- styles = ci.getAttribute('data-background');
885
- if (styles){
886
- ci.parentNode.removeChild(ci);
887
- }
888
- }
889
-
890
- //追加默认的表格样式
891
- styles && utils.cssRule('ueditor_background', me.selector + '{' + styles + '}', document);
892
- });
893
- UE.parse.register('list',function(utils){
894
- var customCss = [],
895
- customStyle = {
896
- 'cn' : 'cn-1-',
897
- 'cn1' : 'cn-2-',
898
- 'cn2' : 'cn-3-',
899
- 'num' : 'num-1-',
900
- 'num1' : 'num-2-',
901
- 'num2' : 'num-3-',
902
- 'dash' : 'dash',
903
- 'dot' : 'dot'
904
- };
905
-
906
-
907
- utils.extend(this,{
908
- liiconpath : 'http://bs.baidu.com/listicon/',
909
- listDefaultPaddingLeft : '20'
910
- });
911
-
912
- var root = this.root,
913
- ols = root.getElementsByTagName('ol'),
914
- uls = root.getElementsByTagName('ul'),
915
- selector = this.selector;
916
-
917
- if(ols.length){
918
- applyStyle.call(this,ols);
919
- }
920
-
921
- if(uls.length){
922
- applyStyle.call(this,uls);
923
- }
924
-
925
- if(ols.length || uls.length){
926
- customCss.push(selector +' .list-paddingleft-1{padding-left:0}');
927
- customCss.push(selector +' .list-paddingleft-2{padding-left:'+ this.listDefaultPaddingLeft+'px}');
928
- customCss.push(selector +' .list-paddingleft-3{padding-left:'+ this.listDefaultPaddingLeft*2+'px}');
929
-
930
- utils.cssRule('list', selector +' ol,'+selector +' ul{margin:0;padding:0;}li{clear:both;}'+customCss.join('\n'), document);
931
- }
932
- function applyStyle(nodes){
933
- var T = this;
934
- utils.each(nodes,function(list){
935
- if(list.className && /custom_/i.test(list.className)){
936
- var listStyle = list.className.match(/custom_(\w+)/)[1];
937
- if(listStyle == 'dash' || listStyle == 'dot'){
938
- utils.pushItem(customCss,selector +' li.list-' + customStyle[listStyle] + '{background-image:url(' + T.liiconpath +customStyle[listStyle]+'.gif)}');
939
- utils.pushItem(customCss,selector +' ul.custom_'+listStyle+'{list-style:none;} '+ selector +' ul.custom_'+listStyle+' li{background-position:0 3px;background-repeat:no-repeat}');
940
-
941
- }else{
942
- var index = 1;
943
- utils.each(list.childNodes,function(li){
944
- if(li.tagName == 'LI'){
945
- utils.pushItem(customCss,selector + ' li.list-' + customStyle[listStyle] + index + '{background-image:url(' + T.liiconpath + 'list-'+customStyle[listStyle] +index + '.gif)}');
946
- index++;
947
- }
948
- });
949
- utils.pushItem(customCss,selector + ' ol.custom_'+listStyle+'{list-style:none;}'+selector+' ol.custom_'+listStyle+' li{background-position:0 3px;background-repeat:no-repeat}');
950
- }
951
- switch(listStyle){
952
- case 'cn':
953
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:25px}');
954
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}');
955
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:55px}');
956
- break;
957
- case 'cn1':
958
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:30px}');
959
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}');
960
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:55px}');
961
- break;
962
- case 'cn2':
963
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:40px}');
964
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:55px}');
965
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:68px}');
966
- break;
967
- case 'num':
968
- case 'num1':
969
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:25px}');
970
- break;
971
- case 'num2':
972
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:35px}');
973
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}');
974
- break;
975
- case 'dash':
976
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft{padding-left:35px}');
977
- break;
978
- case 'dot':
979
- utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft{padding-left:20px}');
980
- }
981
- }
982
- });
983
- }
984
-
985
-
986
- });
987
- UE.parse.register('vedio',function(utils){
988
- var video = this.root.getElementsByTagName('video'),
989
- audio = this.root.getElementsByTagName('audio');
990
-
991
- document.createElement('video');document.createElement('audio');
992
- if(video.length || audio.length){
993
- var sourcePath = utils.removeLastbs(this.rootPath),
994
- jsurl = sourcePath + '/third-party/video-js/video.js',
995
- cssurl = sourcePath + '/third-party/video-js/video-js.min.css',
996
- swfUrl = sourcePath + '/third-party/video-js/video-js.swf';
997
-
998
- if(window.videojs) {
999
- videojs.autoSetup();
1000
- } else {
1001
- utils.loadFile(document,{
1002
- id : "video_css",
1003
- tag : "link",
1004
- rel : "stylesheet",
1005
- type : "text/css",
1006
- href : cssurl
1007
- });
1008
- utils.loadFile(document,{
1009
- id : "video_js",
1010
- src : jsurl,
1011
- tag : "script",
1012
- type : "text/javascript"
1013
- },function(){
1014
- videojs.options.flash.swf = swfUrl;
1015
- videojs.autoSetup();
1016
- });
1017
- }
1018
-
1019
- }
1020
- });
1021
-
1022
- })();