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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/baidu_ueditor.js +1 -1
- data/app/assets/javascripts/ueditor/dialogs/anchor/anchor.html +40 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.css +681 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.html +60 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/attachment.js +754 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/bg.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/icons.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/icons.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/image.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/progress.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/success.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/attachment/images/success.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/background/background.css +94 -0
- data/app/assets/javascripts/ueditor/dialogs/background/background.html +56 -0
- data/app/assets/javascripts/ueditor/dialogs/background/background.js +376 -0
- data/app/assets/javascripts/ueditor/dialogs/background/images/bg.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/background/images/success.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/chart.config.js +65 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/charts.css +165 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/charts.html +89 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/charts.js +519 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/images/charts0.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/images/charts1.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/images/charts2.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/images/charts3.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/images/charts4.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/charts/images/charts5.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.css +43 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.html +54 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/emotion.js +186 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/0.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/bface.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/cface.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/fface.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/tface.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/wface.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/emotion/images/yface.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/gmap/gmap.html +89 -0
- data/app/assets/javascripts/ueditor/dialogs/help/help.css +7 -0
- data/app/assets/javascripts/ueditor/dialogs/help/help.html +82 -0
- data/app/assets/javascripts/ueditor/dialogs/help/help.js +56 -0
- data/app/assets/javascripts/ueditor/dialogs/image/image.css +894 -0
- data/app/assets/javascripts/ueditor/dialogs/image/image.html +120 -0
- data/app/assets/javascripts/ueditor/dialogs/image/image.js +1142 -0
- data/app/assets/javascripts/ueditor/dialogs/image/images/alignicon.jpg +0 -0
- data/app/assets/javascripts/ueditor/dialogs/image/images/bg.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/image/images/icons.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/image/images/icons.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/image/images/image.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/image/images/progress.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/image/images/success.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/image/images/success.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/insertframe/insertframe.html +98 -0
- data/app/assets/javascripts/ueditor/dialogs/internal.js +81 -0
- data/app/assets/javascripts/ueditor/dialogs/link/link.html +126 -0
- data/app/assets/javascripts/ueditor/dialogs/map/map.html +135 -0
- data/app/assets/javascripts/ueditor/dialogs/map/show.html +118 -0
- data/app/assets/javascripts/ueditor/dialogs/music/music.css +30 -0
- data/app/assets/javascripts/ueditor/dialogs/music/music.html +32 -0
- data/app/assets/javascripts/ueditor/dialogs/music/music.js +192 -0
- data/app/assets/javascripts/ueditor/dialogs/preview/preview.html +40 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/addimg.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/brush.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/delimg.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/delimgH.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/empty.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/emptyH.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/eraser.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/redo.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/redoH.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/scale.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/scaleH.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/size.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/undo.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/images/undoH.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.css +72 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.html +95 -0
- data/app/assets/javascripts/ueditor/dialogs/scrawl/scrawl.js +671 -0
- data/app/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.html +102 -0
- data/app/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.js +164 -0
- data/app/assets/javascripts/ueditor/dialogs/snapscreen/snapscreen.html +58 -0
- data/app/assets/javascripts/ueditor/dialogs/spechars/spechars.html +21 -0
- data/app/assets/javascripts/ueditor/dialogs/spechars/spechars.js +57 -0
- data/app/assets/javascripts/ueditor/dialogs/table/dragicon.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/table/edittable.css +84 -0
- data/app/assets/javascripts/ueditor/dialogs/table/edittable.html +64 -0
- data/app/assets/javascripts/ueditor/dialogs/table/edittable.js +237 -0
- data/app/assets/javascripts/ueditor/dialogs/table/edittd.html +61 -0
- data/app/assets/javascripts/ueditor/dialogs/table/edittip.html +33 -0
- data/app/assets/javascripts/ueditor/dialogs/template/config.js +42 -0
- data/app/assets/javascripts/ueditor/dialogs/template/images/bg.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/template/images/pre0.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/template/images/pre1.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/template/images/pre2.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/template/images/pre3.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/template/images/pre4.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/template/template.css +18 -0
- data/app/assets/javascripts/ueditor/dialogs/template/template.html +26 -0
- data/app/assets/javascripts/ueditor/dialogs/template/template.js +53 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/bg.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/center_focus.jpg +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/file-icons.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/file-icons.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/icons.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/icons.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/image.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/left_focus.jpg +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/none_focus.jpg +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/progress.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/right_focus.jpg +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/success.gif +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/images/success.png +0 -0
- data/app/assets/javascripts/ueditor/dialogs/video/video.css +635 -0
- data/app/assets/javascripts/ueditor/dialogs/video/video.html +86 -0
- data/app/assets/javascripts/ueditor/dialogs/video/video.js +791 -0
- data/app/assets/javascripts/ueditor/dialogs/webapp/webapp.html +53 -0
- data/app/assets/javascripts/ueditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
- data/app/assets/javascripts/ueditor/dialogs/wordimage/imageUploader.swf +0 -0
- data/app/assets/javascripts/ueditor/dialogs/wordimage/tangram.js +1495 -0
- data/app/assets/javascripts/ueditor/dialogs/wordimage/wordimage.html +111 -0
- data/app/assets/javascripts/ueditor/dialogs/wordimage/wordimage.js +157 -0
- data/app/assets/javascripts/ueditor/index.html +175 -0
- data/app/assets/javascripts/ueditor/lang/en/en.js +684 -0
- data/app/assets/javascripts/ueditor/lang/en/images/addimage.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/alldeletebtnupskin.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/background.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/button.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/copy.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/deletedisable.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/deleteenable.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/listbackground.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/localimage.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/music.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/rotateleftdisable.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/rotateleftenable.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/rotaterightdisable.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/rotaterightenable.png +0 -0
- data/app/assets/javascripts/ueditor/lang/en/images/upload.png +0 -0
- data/app/assets/javascripts/ueditor/lang/zh-cn/images/copy.png +0 -0
- data/app/assets/javascripts/ueditor/lang/zh-cn/images/localimage.png +0 -0
- data/app/assets/javascripts/ueditor/lang/zh-cn/images/music.png +0 -0
- data/app/assets/javascripts/ueditor/lang/zh-cn/images/upload.png +0 -0
- data/app/assets/javascripts/ueditor/lang/zh-cn/zh-cn.js +669 -0
- data/app/assets/javascripts/ueditor/themes/default/css/ueditor.css +1903 -0
- data/app/assets/javascripts/ueditor/themes/default/css/ueditor.min.css +8 -0
- data/app/assets/javascripts/ueditor/themes/default/dialogbase.css +100 -0
- data/app/assets/javascripts/ueditor/themes/default/images/anchor.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/arrow.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/arrow_down.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/arrow_up.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/button-bg.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/cancelbutton.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/charts.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/cursor_h.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/cursor_h.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/cursor_v.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/cursor_v.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/dialog-title-bg.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/filescan.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/highlighted.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/icons-all.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/icons.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/icons.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/loaderror.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/loading.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/lock.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/neweditor-tab-bg.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/pagebreak.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/scale.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/sortable.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/spacer.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/sparator_v.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/table-cell-align.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/tangram-colorpicker.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/toolbar_bg.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/unhighlighted.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/upload.png +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/videologo.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/word.gif +0 -0
- data/app/assets/javascripts/ueditor/themes/default/images/wordpaste.png +0 -0
- data/app/assets/javascripts/ueditor/themes/iframe.css +1 -0
- data/app/assets/javascripts/ueditor/third-party/SyntaxHighlighter/shCore.js +3655 -0
- data/app/assets/javascripts/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css +1 -0
- data/app/assets/javascripts/ueditor/third-party/codemirror/codemirror.css +104 -0
- data/app/assets/javascripts/ueditor/third-party/codemirror/codemirror.js +3581 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/mootools-adapter.js +13 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/mootools-adapter.src.js +313 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/prototype-adapter.js +15 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/prototype-adapter.src.js +316 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/standalone-framework.js +17 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/adapters/standalone-framework.src.js +583 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts-more.js +50 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts-more.src.js +2430 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts.js +283 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/highcharts.src.js +16974 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/annotations.js +7 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/annotations.src.js +401 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/canvas-tools.js +133 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/canvas-tools.src.js +3113 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/data.js +17 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/data.src.js +582 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/drilldown.js +11 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/drilldown.src.js +447 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/exporting.js +22 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/exporting.src.js +709 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/funnel.js +12 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/funnel.src.js +289 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.js +1 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js +53 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/map.js +27 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/map.src.js +1002 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/no-data-to-display.js +12 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/modules/no-data-to-display.src.js +128 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/themes/dark-blue.js +254 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/themes/dark-green.js +255 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/themes/gray.js +257 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/themes/grid.js +103 -0
- data/app/assets/javascripts/ueditor/third-party/highcharts/themes/skies.js +89 -0
- data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.js +9789 -0
- data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.min.js +6 -0
- data/app/assets/javascripts/ueditor/third-party/jquery-1.10.2.min.map +1 -0
- data/app/assets/javascripts/ueditor/third-party/snapscreen/UEditorSnapscreen.exe +0 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.eot +0 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.svg +65 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.ttf +0 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/font/vjs.woff +0 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/video-js.css +766 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/video-js.min.css +5 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/video-js.swf +0 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/video.dev.js +7108 -0
- data/app/assets/javascripts/ueditor/third-party/video-js/video.js +129 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/Uploader.swf +0 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.css +28 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.custom.js +5670 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.custom.min.js +2 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.flashonly.js +4176 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.flashonly.min.js +2 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.html5only.js +5559 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.html5only.min.js +2 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.js +6733 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.min.js +2 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.withoutimage.js +4593 -0
- data/app/assets/javascripts/ueditor/third-party/webuploader/webuploader.withoutimage.min.js +2 -0
- data/app/assets/javascripts/ueditor/third-party/xss.min.js +1 -0
- data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
- data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js +9 -0
- data/app/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
- data/app/assets/javascripts/ueditor/ueditor.all.js +29568 -0
- data/app/assets/javascripts/ueditor/ueditor.all.min.js +18 -0
- data/app/assets/javascripts/ueditor/ueditor.config.js +497 -0
- data/app/assets/javascripts/ueditor/ueditor.parse.js +1022 -0
- data/app/assets/javascripts/ueditor/ueditor.parse.min.js +7 -0
- data/app/assets/javascripts/{ueditor → ueditor_custom}/preinit.js.erb +0 -0
- data/lib/baidu_ueditor_rails/version.rb +1 -1
- metadata +292 -21
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
Highcharts JS v3.0.6 (2013-10-04)
|
3
|
+
MooTools adapter
|
4
|
+
|
5
|
+
(c) 2010-2013 Torstein Hønsi
|
6
|
+
|
7
|
+
License: www.highcharts.com/license
|
8
|
+
*/
|
9
|
+
(function(){var e=window,h=document,f=e.MooTools.version.substring(0,3),i=f==="1.2"||f==="1.1",j=i||f==="1.3",g=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsAdapter={init:function(a){var b=Fx.prototype,c=b.start,d=Fx.Morph.prototype,e=d.compute;b.start=function(b,d){var e=this.element;if(b.d)this.paths=a.init(e,e.d,this.toD);c.apply(this,arguments);return this};d.compute=function(b,c,d){var f=this.paths;if(f)this.element.attr("d",a.step(f[0],f[1],d,this.toD));else return e.apply(this,
|
10
|
+
arguments)}},adapterRun:function(a,b){if(b==="width"||b==="height")return parseInt($(a).getStyle(b),10)},getScript:function(a,b){var c=h.getElementsByTagName("head")[0],d=h.createElement("script");d.type="text/javascript";d.src=a;d.onload=b;c.appendChild(d)},animate:function(a,b,c){var d=a.attr,f=c&&c.complete;if(d&&!a.setStyle)a.getStyle=a.attr,a.setStyle=function(){var a=arguments;this.attr.call(this,a[0],a[1][0])},a.$family=function(){return!0};e.HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:$(a),
|
11
|
+
g({transition:Fx.Transitions.Quad.easeInOut},c));if(d)c.element=a;if(b.d)c.toD=b.d;f&&c.addEvent("complete",f);c.start(b);a.fx=c},each:function(a,b){return i?$each(a,b):Array.each(a,b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},inArray:function(a,b,c){return b?b.indexOf(a,c):-1},offset:function(a){a=a.getPosition();return{left:a.x,top:a.y}},extendWithEvents:function(a){a.addEvent||(a.nodeName?$(a):g(a,new Events))},addEvent:function(a,b,c){typeof b==="string"&&(b===
|
12
|
+
"unload"&&(b="beforeunload"),e.HighchartsAdapter.extendWithEvents(a),a.addEvent(b,c))},removeEvent:function(a,b,c){typeof a!=="string"&&a.addEvent&&(b?(b==="unload"&&(b="beforeunload"),c?a.removeEvent(b,c):a.removeEvents&&a.removeEvents(b)):a.removeEvents())},fireEvent:function(a,b,c,d){b={type:b,target:a};b=j?new Event(b):new DOMEvent(b);b=g(b,c);if(!b.target&&b.event)b.target=b.event.target;b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)},washMouseEvent:function(a){if(a.page)a.pageX=
|
13
|
+
a.page.x,a.pageY=a.page.y;return a},stop:function(a){a.fx&&a.fx.cancel()}}})();
|
@@ -0,0 +1,313 @@
|
|
1
|
+
/**
|
2
|
+
* @license Highcharts JS v3.0.6 (2013-10-04)
|
3
|
+
* MooTools adapter
|
4
|
+
*
|
5
|
+
* (c) 2010-2013 Torstein Hønsi
|
6
|
+
*
|
7
|
+
* License: www.highcharts.com/license
|
8
|
+
*/
|
9
|
+
|
10
|
+
// JSLint options:
|
11
|
+
/*global Fx, $, $extend, $each, $merge, Events, Event, DOMEvent */
|
12
|
+
|
13
|
+
(function () {
|
14
|
+
|
15
|
+
var win = window,
|
16
|
+
doc = document,
|
17
|
+
mooVersion = win.MooTools.version.substring(0, 3), // Get the first three characters of the version number
|
18
|
+
legacy = mooVersion === '1.2' || mooVersion === '1.1', // 1.1 && 1.2 considered legacy, 1.3 is not.
|
19
|
+
legacyEvent = legacy || mooVersion === '1.3', // In versions 1.1 - 1.3 the event class is named Event, in newer versions it is named DOMEvent.
|
20
|
+
$extend = win.$extend || function () {
|
21
|
+
return Object.append.apply(Object, arguments);
|
22
|
+
};
|
23
|
+
|
24
|
+
win.HighchartsAdapter = {
|
25
|
+
/**
|
26
|
+
* Initialize the adapter. This is run once as Highcharts is first run.
|
27
|
+
* @param {Object} pathAnim The helper object to do animations across adapters.
|
28
|
+
*/
|
29
|
+
init: function (pathAnim) {
|
30
|
+
var fxProto = Fx.prototype,
|
31
|
+
fxStart = fxProto.start,
|
32
|
+
morphProto = Fx.Morph.prototype,
|
33
|
+
morphCompute = morphProto.compute;
|
34
|
+
|
35
|
+
// override Fx.start to allow animation of SVG element wrappers
|
36
|
+
/*jslint unparam: true*//* allow unused parameters in fx functions */
|
37
|
+
fxProto.start = function (from, to) {
|
38
|
+
var fx = this,
|
39
|
+
elem = fx.element;
|
40
|
+
|
41
|
+
// special for animating paths
|
42
|
+
if (from.d) {
|
43
|
+
//this.fromD = this.element.d.split(' ');
|
44
|
+
fx.paths = pathAnim.init(
|
45
|
+
elem,
|
46
|
+
elem.d,
|
47
|
+
fx.toD
|
48
|
+
);
|
49
|
+
}
|
50
|
+
fxStart.apply(fx, arguments);
|
51
|
+
|
52
|
+
return this; // chainable
|
53
|
+
};
|
54
|
+
|
55
|
+
// override Fx.step to allow animation of SVG element wrappers
|
56
|
+
morphProto.compute = function (from, to, delta) {
|
57
|
+
var fx = this,
|
58
|
+
paths = fx.paths;
|
59
|
+
|
60
|
+
if (paths) {
|
61
|
+
fx.element.attr(
|
62
|
+
'd',
|
63
|
+
pathAnim.step(paths[0], paths[1], delta, fx.toD)
|
64
|
+
);
|
65
|
+
} else {
|
66
|
+
return morphCompute.apply(fx, arguments);
|
67
|
+
}
|
68
|
+
};
|
69
|
+
/*jslint unparam: false*/
|
70
|
+
},
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Run a general method on the framework, following jQuery syntax
|
74
|
+
* @param {Object} el The HTML element
|
75
|
+
* @param {String} method Which method to run on the wrapped element
|
76
|
+
*/
|
77
|
+
adapterRun: function (el, method) {
|
78
|
+
|
79
|
+
// This currently works for getting inner width and height. If adding
|
80
|
+
// more methods later, we need a conditional implementation for each.
|
81
|
+
if (method === 'width' || method === 'height') {
|
82
|
+
return parseInt($(el).getStyle(method), 10);
|
83
|
+
}
|
84
|
+
},
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Downloads a script and executes a callback when done.
|
88
|
+
* @param {String} scriptLocation
|
89
|
+
* @param {Function} callback
|
90
|
+
*/
|
91
|
+
getScript: function (scriptLocation, callback) {
|
92
|
+
// We cannot assume that Assets class from mootools-more is available so instead insert a script tag to download script.
|
93
|
+
var head = doc.getElementsByTagName('head')[0];
|
94
|
+
var script = doc.createElement('script');
|
95
|
+
|
96
|
+
script.type = 'text/javascript';
|
97
|
+
script.src = scriptLocation;
|
98
|
+
script.onload = callback;
|
99
|
+
|
100
|
+
head.appendChild(script);
|
101
|
+
},
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Animate a HTML element or SVG element wrapper
|
105
|
+
* @param {Object} el
|
106
|
+
* @param {Object} params
|
107
|
+
* @param {Object} options jQuery-like animation options: duration, easing, callback
|
108
|
+
*/
|
109
|
+
animate: function (el, params, options) {
|
110
|
+
var isSVGElement = el.attr,
|
111
|
+
effect,
|
112
|
+
complete = options && options.complete;
|
113
|
+
|
114
|
+
if (isSVGElement && !el.setStyle) {
|
115
|
+
// add setStyle and getStyle methods for internal use in Moo
|
116
|
+
el.getStyle = el.attr;
|
117
|
+
el.setStyle = function () { // property value is given as array in Moo - break it down
|
118
|
+
var args = arguments;
|
119
|
+
this.attr.call(this, args[0], args[1][0]);
|
120
|
+
};
|
121
|
+
// dirty hack to trick Moo into handling el as an element wrapper
|
122
|
+
el.$family = function () { return true; };
|
123
|
+
}
|
124
|
+
|
125
|
+
// stop running animations
|
126
|
+
win.HighchartsAdapter.stop(el);
|
127
|
+
|
128
|
+
// define and run the effect
|
129
|
+
effect = new Fx.Morph(
|
130
|
+
isSVGElement ? el : $(el),
|
131
|
+
$extend({
|
132
|
+
transition: Fx.Transitions.Quad.easeInOut
|
133
|
+
}, options)
|
134
|
+
);
|
135
|
+
|
136
|
+
// Make sure that the element reference is set when animating svg elements
|
137
|
+
if (isSVGElement) {
|
138
|
+
effect.element = el;
|
139
|
+
}
|
140
|
+
|
141
|
+
// special treatment for paths
|
142
|
+
if (params.d) {
|
143
|
+
effect.toD = params.d;
|
144
|
+
}
|
145
|
+
|
146
|
+
// jQuery-like events
|
147
|
+
if (complete) {
|
148
|
+
effect.addEvent('complete', complete);
|
149
|
+
}
|
150
|
+
|
151
|
+
// run
|
152
|
+
effect.start(params);
|
153
|
+
|
154
|
+
// record for use in stop method
|
155
|
+
el.fx = effect;
|
156
|
+
},
|
157
|
+
|
158
|
+
/**
|
159
|
+
* MooTool's each function
|
160
|
+
*
|
161
|
+
*/
|
162
|
+
each: function (arr, fn) {
|
163
|
+
return legacy ?
|
164
|
+
$each(arr, fn) :
|
165
|
+
Array.each(arr, fn);
|
166
|
+
},
|
167
|
+
|
168
|
+
/**
|
169
|
+
* Map an array
|
170
|
+
* @param {Array} arr
|
171
|
+
* @param {Function} fn
|
172
|
+
*/
|
173
|
+
map: function (arr, fn) {
|
174
|
+
return arr.map(fn);
|
175
|
+
},
|
176
|
+
|
177
|
+
/**
|
178
|
+
* Grep or filter an array
|
179
|
+
* @param {Array} arr
|
180
|
+
* @param {Function} fn
|
181
|
+
*/
|
182
|
+
grep: function (arr, fn) {
|
183
|
+
return arr.filter(fn);
|
184
|
+
},
|
185
|
+
|
186
|
+
/**
|
187
|
+
* Return the index of an item in an array, or -1 if not matched
|
188
|
+
*/
|
189
|
+
inArray: function (item, arr, from) {
|
190
|
+
return arr ? arr.indexOf(item, from) : -1;
|
191
|
+
},
|
192
|
+
|
193
|
+
/**
|
194
|
+
* Get the offset of an element relative to the top left corner of the web page
|
195
|
+
*/
|
196
|
+
offset: function (el) {
|
197
|
+
var offsets = el.getPosition(); // #1496
|
198
|
+
return {
|
199
|
+
left: offsets.x,
|
200
|
+
top: offsets.y
|
201
|
+
};
|
202
|
+
},
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Extends an object with Events, if its not done
|
206
|
+
*/
|
207
|
+
extendWithEvents: function (el) {
|
208
|
+
// if the addEvent method is not defined, el is a custom Highcharts object
|
209
|
+
// like series or point
|
210
|
+
if (!el.addEvent) {
|
211
|
+
if (el.nodeName) {
|
212
|
+
el = $(el); // a dynamically generated node
|
213
|
+
} else {
|
214
|
+
$extend(el, new Events()); // a custom object
|
215
|
+
}
|
216
|
+
}
|
217
|
+
},
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Add an event listener
|
221
|
+
* @param {Object} el HTML element or custom object
|
222
|
+
* @param {String} type Event type
|
223
|
+
* @param {Function} fn Event handler
|
224
|
+
*/
|
225
|
+
addEvent: function (el, type, fn) {
|
226
|
+
if (typeof type === 'string') { // chart broke due to el being string, type function
|
227
|
+
|
228
|
+
if (type === 'unload') { // Moo self destructs before custom unload events
|
229
|
+
type = 'beforeunload';
|
230
|
+
}
|
231
|
+
|
232
|
+
win.HighchartsAdapter.extendWithEvents(el);
|
233
|
+
|
234
|
+
el.addEvent(type, fn);
|
235
|
+
}
|
236
|
+
},
|
237
|
+
|
238
|
+
removeEvent: function (el, type, fn) {
|
239
|
+
if (typeof el === 'string') {
|
240
|
+
// el.removeEvents below apperantly calls this method again. Do not quite understand why, so for now just bail out.
|
241
|
+
return;
|
242
|
+
}
|
243
|
+
|
244
|
+
if (el.addEvent) { // If el doesn't have an addEvent method, there are no events to remove
|
245
|
+
if (type) {
|
246
|
+
if (type === 'unload') { // Moo self destructs before custom unload events
|
247
|
+
type = 'beforeunload';
|
248
|
+
}
|
249
|
+
|
250
|
+
if (fn) {
|
251
|
+
el.removeEvent(type, fn);
|
252
|
+
} else if (el.removeEvents) { // #958
|
253
|
+
el.removeEvents(type);
|
254
|
+
}
|
255
|
+
} else {
|
256
|
+
el.removeEvents();
|
257
|
+
}
|
258
|
+
}
|
259
|
+
},
|
260
|
+
|
261
|
+
fireEvent: function (el, event, eventArguments, defaultFunction) {
|
262
|
+
var eventArgs = {
|
263
|
+
type: event,
|
264
|
+
target: el
|
265
|
+
};
|
266
|
+
// create an event object that keeps all functions
|
267
|
+
event = legacyEvent ? new Event(eventArgs) : new DOMEvent(eventArgs);
|
268
|
+
event = $extend(event, eventArguments);
|
269
|
+
|
270
|
+
// When running an event on the Chart.prototype, MooTools nests the target in event.event
|
271
|
+
if (!event.target && event.event) {
|
272
|
+
event.target = event.event.target;
|
273
|
+
}
|
274
|
+
|
275
|
+
// override the preventDefault function to be able to use
|
276
|
+
// this for custom events
|
277
|
+
event.preventDefault = function () {
|
278
|
+
defaultFunction = null;
|
279
|
+
};
|
280
|
+
// if fireEvent is not available on the object, there hasn't been added
|
281
|
+
// any events to it above
|
282
|
+
if (el.fireEvent) {
|
283
|
+
el.fireEvent(event.type, event);
|
284
|
+
}
|
285
|
+
|
286
|
+
// fire the default if it is passed and it is not prevented above
|
287
|
+
if (defaultFunction) {
|
288
|
+
defaultFunction(event);
|
289
|
+
}
|
290
|
+
},
|
291
|
+
|
292
|
+
/**
|
293
|
+
* Set back e.pageX and e.pageY that MooTools has abstracted away. #1165, #1346.
|
294
|
+
*/
|
295
|
+
washMouseEvent: function (e) {
|
296
|
+
if (e.page) {
|
297
|
+
e.pageX = e.page.x;
|
298
|
+
e.pageY = e.page.y;
|
299
|
+
}
|
300
|
+
return e;
|
301
|
+
},
|
302
|
+
|
303
|
+
/**
|
304
|
+
* Stop running animations on the object
|
305
|
+
*/
|
306
|
+
stop: function (el) {
|
307
|
+
if (el.fx) {
|
308
|
+
el.fx.cancel();
|
309
|
+
}
|
310
|
+
}
|
311
|
+
};
|
312
|
+
|
313
|
+
}());
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
Highcharts JS v3.0.6 (2013-10-04)
|
3
|
+
Prototype adapter
|
4
|
+
|
5
|
+
@author Michael Nelson, Torstein Hønsi.
|
6
|
+
|
7
|
+
Feel free to use and modify this script.
|
8
|
+
Highcharts license: www.highcharts.com/license.
|
9
|
+
*/
|
10
|
+
var HighchartsAdapter=function(){var f=typeof Effect!=="undefined";return{init:function(a){if(f)Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(b,c,d,g){var e;this.element=b;this.key=c;e=b.attr?b.attr(c):$(b).getStyle(c);if(c==="d")this.paths=a.init(b,b.d,d),this.toD=d,e=0,d=1;this.start(Object.extend(g||{},{from:e,to:d,attribute:c}))},setup:function(){HighchartsAdapter._extend(this.element);if(!this.element._highchart_animation)this.element._highchart_animation={};this.element._highchart_animation[this.key]=
|
11
|
+
this},update:function(b){var c=this.paths,d=this.element;c&&(b=a.step(c[0],c[1],b,this.toD));d.attr?d.element&&d.attr(this.options.attribute,b):(c={},c[this.options.attribute]=b,$(d).setStyle(c))},finish:function(){this.element&&this.element._highchart_animation&&delete this.element._highchart_animation[this.key]}})},adapterRun:function(a,b){return parseInt($(a).getStyle(b),10)},getScript:function(a,b){var c=$$("head")[0];c&&c.appendChild((new Element("script",{type:"text/javascript",src:a})).observe("load",
|
12
|
+
b))},addNS:function(a){var b=/^(?:click|mouse(?:down|up|over|move|out))$/;return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(a)||b.test(a)?a:"h:"+a},addEvent:function(a,b,c){a.addEventListener||a.attachEvent?Event.observe($(a),HighchartsAdapter.addNS(b),c):(HighchartsAdapter._extend(a),a._highcharts_observe(b,c))},animate:function(a,b,c){var d,c=c||{};c.delay=0;c.duration=(c.duration||500)/1E3;c.afterFinish=c.complete;if(f)for(d in b)new Effect.HighchartsTransition($(a),
|
13
|
+
d,b[d],c);else{if(a.attr)for(d in b)a.attr(d,b[d]);c.complete&&c.complete()}a.attr||$(a).setStyle(b)},stop:function(a){var b;if(a._highcharts_extended&&a._highchart_animation)for(b in a._highchart_animation)a._highchart_animation[b].cancel()},each:function(a,b){$A(a).each(b)},inArray:function(a,b,c){return b?b.indexOf(a,c):-1},offset:function(a){return $(a).cumulativeOffset()},fireEvent:function(a,b,c,d){a.fire?a.fire(HighchartsAdapter.addNS(b),c):a._highcharts_extended&&(c=c||{},a._highcharts_fire(b,
|
14
|
+
c));c&&c.defaultPrevented&&(d=null);d&&d(c)},removeEvent:function(a,b,c){$(a).stopObserving&&(b&&(b=HighchartsAdapter.addNS(b)),$(a).stopObserving(b,c));window===a?Event.stopObserving(a,b,c):(HighchartsAdapter._extend(a),a._highcharts_stop_observing(b,c))},washMouseEvent:function(a){return a},grep:function(a,b){return a.findAll(b)},map:function(a,b){return a.map(b)},_extend:function(a){a._highcharts_extended||Object.extend(a,{_highchart_events:{},_highchart_animation:null,_highcharts_extended:!0,
|
15
|
+
_highcharts_observe:function(b,a){this._highchart_events[b]=[this._highchart_events[b],a].compact().flatten()},_highcharts_stop_observing:function(b,a){b?a?this._highchart_events[b]=[this._highchart_events[b]].compact().flatten().without(a):delete this._highchart_events[b]:this._highchart_events={}},_highcharts_fire:function(a,c){var d=this;(this._highchart_events[a]||[]).each(function(a){if(!c.stopped)c.preventDefault=function(){c.defaultPrevented=!0},c.target=d,a.bind(this)(c)===!1&&c.preventDefault()}.bind(this))}})}}}();
|
@@ -0,0 +1,316 @@
|
|
1
|
+
/**
|
2
|
+
* @license Highcharts JS v3.0.6 (2013-10-04)
|
3
|
+
* Prototype adapter
|
4
|
+
*
|
5
|
+
* @author Michael Nelson, Torstein Hønsi.
|
6
|
+
*
|
7
|
+
* Feel free to use and modify this script.
|
8
|
+
* Highcharts license: www.highcharts.com/license.
|
9
|
+
*/
|
10
|
+
|
11
|
+
// JSLint options:
|
12
|
+
/*global Effect, Class, Event, Element, $, $$, $A */
|
13
|
+
|
14
|
+
// Adapter interface between prototype and the Highcharts charting library
|
15
|
+
var HighchartsAdapter = (function () {
|
16
|
+
|
17
|
+
var hasEffect = typeof Effect !== 'undefined';
|
18
|
+
|
19
|
+
return {
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Initialize the adapter. This is run once as Highcharts is first run.
|
23
|
+
* @param {Object} pathAnim The helper object to do animations across adapters.
|
24
|
+
*/
|
25
|
+
init: function (pathAnim) {
|
26
|
+
if (hasEffect) {
|
27
|
+
/**
|
28
|
+
* Animation for Highcharts SVG element wrappers only
|
29
|
+
* @param {Object} element
|
30
|
+
* @param {Object} attribute
|
31
|
+
* @param {Object} to
|
32
|
+
* @param {Object} options
|
33
|
+
*/
|
34
|
+
Effect.HighchartsTransition = Class.create(Effect.Base, {
|
35
|
+
initialize: function (element, attr, to, options) {
|
36
|
+
var from,
|
37
|
+
opts;
|
38
|
+
|
39
|
+
this.element = element;
|
40
|
+
this.key = attr;
|
41
|
+
from = element.attr ? element.attr(attr) : $(element).getStyle(attr);
|
42
|
+
|
43
|
+
// special treatment for paths
|
44
|
+
if (attr === 'd') {
|
45
|
+
this.paths = pathAnim.init(
|
46
|
+
element,
|
47
|
+
element.d,
|
48
|
+
to
|
49
|
+
);
|
50
|
+
this.toD = to;
|
51
|
+
|
52
|
+
|
53
|
+
// fake values in order to read relative position as a float in update
|
54
|
+
from = 0;
|
55
|
+
to = 1;
|
56
|
+
}
|
57
|
+
|
58
|
+
opts = Object.extend((options || {}), {
|
59
|
+
from: from,
|
60
|
+
to: to,
|
61
|
+
attribute: attr
|
62
|
+
});
|
63
|
+
this.start(opts);
|
64
|
+
},
|
65
|
+
setup: function () {
|
66
|
+
HighchartsAdapter._extend(this.element);
|
67
|
+
// If this is the first animation on this object, create the _highcharts_animation helper that
|
68
|
+
// contain pointers to the animation objects.
|
69
|
+
if (!this.element._highchart_animation) {
|
70
|
+
this.element._highchart_animation = {};
|
71
|
+
}
|
72
|
+
|
73
|
+
// Store a reference to this animation instance.
|
74
|
+
this.element._highchart_animation[this.key] = this;
|
75
|
+
},
|
76
|
+
update: function (position) {
|
77
|
+
var paths = this.paths,
|
78
|
+
element = this.element,
|
79
|
+
obj;
|
80
|
+
|
81
|
+
if (paths) {
|
82
|
+
position = pathAnim.step(paths[0], paths[1], position, this.toD);
|
83
|
+
}
|
84
|
+
|
85
|
+
if (element.attr) { // SVGElement
|
86
|
+
|
87
|
+
if (element.element) { // If not, it has been destroyed (#1405)
|
88
|
+
element.attr(this.options.attribute, position);
|
89
|
+
}
|
90
|
+
|
91
|
+
} else { // HTML, #409
|
92
|
+
obj = {};
|
93
|
+
obj[this.options.attribute] = position;
|
94
|
+
$(element).setStyle(obj);
|
95
|
+
}
|
96
|
+
|
97
|
+
},
|
98
|
+
finish: function () {
|
99
|
+
// Delete the property that holds this animation now that it is finished.
|
100
|
+
// Both canceled animations and complete ones gets a 'finish' call.
|
101
|
+
if (this.element && this.element._highchart_animation) { // #1405
|
102
|
+
delete this.element._highchart_animation[this.key];
|
103
|
+
}
|
104
|
+
}
|
105
|
+
});
|
106
|
+
}
|
107
|
+
},
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Run a general method on the framework, following jQuery syntax
|
111
|
+
* @param {Object} el The HTML element
|
112
|
+
* @param {String} method Which method to run on the wrapped element
|
113
|
+
*/
|
114
|
+
adapterRun: function (el, method) {
|
115
|
+
|
116
|
+
// This currently works for getting inner width and height. If adding
|
117
|
+
// more methods later, we need a conditional implementation for each.
|
118
|
+
return parseInt($(el).getStyle(method), 10);
|
119
|
+
|
120
|
+
},
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Downloads a script and executes a callback when done.
|
124
|
+
* @param {String} scriptLocation
|
125
|
+
* @param {Function} callback
|
126
|
+
*/
|
127
|
+
getScript: function (scriptLocation, callback) {
|
128
|
+
var head = $$('head')[0]; // Returns an array, so pick the first element.
|
129
|
+
if (head) {
|
130
|
+
// Append a new 'script' element, set its type and src attributes, add a 'load' handler that calls the callback
|
131
|
+
head.appendChild(new Element('script', { type: 'text/javascript', src: scriptLocation}).observe('load', callback));
|
132
|
+
}
|
133
|
+
},
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Custom events in prototype needs to be namespaced. This method adds a namespace 'h:' in front of
|
137
|
+
* events that are not recognized as native.
|
138
|
+
*/
|
139
|
+
addNS: function (eventName) {
|
140
|
+
var HTMLEvents = /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
|
141
|
+
MouseEvents = /^(?:click|mouse(?:down|up|over|move|out))$/;
|
142
|
+
return (HTMLEvents.test(eventName) || MouseEvents.test(eventName)) ?
|
143
|
+
eventName :
|
144
|
+
'h:' + eventName;
|
145
|
+
},
|
146
|
+
|
147
|
+
// el needs an event to be attached. el is not necessarily a dom element
|
148
|
+
addEvent: function (el, event, fn) {
|
149
|
+
if (el.addEventListener || el.attachEvent) {
|
150
|
+
Event.observe($(el), HighchartsAdapter.addNS(event), fn);
|
151
|
+
|
152
|
+
} else {
|
153
|
+
HighchartsAdapter._extend(el);
|
154
|
+
el._highcharts_observe(event, fn);
|
155
|
+
}
|
156
|
+
},
|
157
|
+
|
158
|
+
// motion makes things pretty. use it if effects is loaded, if not... still get to the end result.
|
159
|
+
animate: function (el, params, options) {
|
160
|
+
var key,
|
161
|
+
fx;
|
162
|
+
|
163
|
+
// default options
|
164
|
+
options = options || {};
|
165
|
+
options.delay = 0;
|
166
|
+
options.duration = (options.duration || 500) / 1000;
|
167
|
+
options.afterFinish = options.complete;
|
168
|
+
|
169
|
+
// animate wrappers and DOM elements
|
170
|
+
if (hasEffect) {
|
171
|
+
for (key in params) {
|
172
|
+
// The fx variable is seemingly thrown away here, but the Effect.setup will add itself to the _highcharts_animation object
|
173
|
+
// on the element itself so its not really lost.
|
174
|
+
fx = new Effect.HighchartsTransition($(el), key, params[key], options);
|
175
|
+
}
|
176
|
+
} else {
|
177
|
+
if (el.attr) { // #409 without effects
|
178
|
+
for (key in params) {
|
179
|
+
el.attr(key, params[key]);
|
180
|
+
}
|
181
|
+
}
|
182
|
+
if (options.complete) {
|
183
|
+
options.complete();
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
if (!el.attr) { // HTML element, #409
|
188
|
+
$(el).setStyle(params);
|
189
|
+
}
|
190
|
+
},
|
191
|
+
|
192
|
+
// this only occurs in higcharts 2.0+
|
193
|
+
stop: function (el) {
|
194
|
+
var key;
|
195
|
+
if (el._highcharts_extended && el._highchart_animation) {
|
196
|
+
for (key in el._highchart_animation) {
|
197
|
+
// Cancel the animation
|
198
|
+
// The 'finish' function in the Effect object will remove the reference
|
199
|
+
el._highchart_animation[key].cancel();
|
200
|
+
}
|
201
|
+
}
|
202
|
+
},
|
203
|
+
|
204
|
+
// um.. each
|
205
|
+
each: function (arr, fn) {
|
206
|
+
$A(arr).each(fn);
|
207
|
+
},
|
208
|
+
|
209
|
+
inArray: function (item, arr, from) {
|
210
|
+
return arr ? arr.indexOf(item, from) : -1;
|
211
|
+
},
|
212
|
+
|
213
|
+
/**
|
214
|
+
* Get the cumulative offset relative to the top left of the page. This method, unlike its
|
215
|
+
* jQuery and MooTools counterpart, still suffers from issue #208 regarding the position
|
216
|
+
* of a chart within a fixed container.
|
217
|
+
*/
|
218
|
+
offset: function (el) {
|
219
|
+
return $(el).cumulativeOffset();
|
220
|
+
},
|
221
|
+
|
222
|
+
// fire an event based on an event name (event) and an object (el).
|
223
|
+
// again, el may not be a dom element
|
224
|
+
fireEvent: function (el, event, eventArguments, defaultFunction) {
|
225
|
+
if (el.fire) {
|
226
|
+
el.fire(HighchartsAdapter.addNS(event), eventArguments);
|
227
|
+
} else if (el._highcharts_extended) {
|
228
|
+
eventArguments = eventArguments || {};
|
229
|
+
el._highcharts_fire(event, eventArguments);
|
230
|
+
}
|
231
|
+
|
232
|
+
if (eventArguments && eventArguments.defaultPrevented) {
|
233
|
+
defaultFunction = null;
|
234
|
+
}
|
235
|
+
|
236
|
+
if (defaultFunction) {
|
237
|
+
defaultFunction(eventArguments);
|
238
|
+
}
|
239
|
+
},
|
240
|
+
|
241
|
+
removeEvent: function (el, event, handler) {
|
242
|
+
if ($(el).stopObserving) {
|
243
|
+
if (event) {
|
244
|
+
event = HighchartsAdapter.addNS(event);
|
245
|
+
}
|
246
|
+
$(el).stopObserving(event, handler);
|
247
|
+
} if (window === el) {
|
248
|
+
Event.stopObserving(el, event, handler);
|
249
|
+
} else {
|
250
|
+
HighchartsAdapter._extend(el);
|
251
|
+
el._highcharts_stop_observing(event, handler);
|
252
|
+
}
|
253
|
+
},
|
254
|
+
|
255
|
+
washMouseEvent: function (e) {
|
256
|
+
return e;
|
257
|
+
},
|
258
|
+
|
259
|
+
// um, grep
|
260
|
+
grep: function (arr, fn) {
|
261
|
+
return arr.findAll(fn);
|
262
|
+
},
|
263
|
+
|
264
|
+
// um, map
|
265
|
+
map: function (arr, fn) {
|
266
|
+
return arr.map(fn);
|
267
|
+
},
|
268
|
+
|
269
|
+
// extend an object to handle highchart events (highchart objects, not svg elements).
|
270
|
+
// this is a very simple way of handling events but whatever, it works (i think)
|
271
|
+
_extend: function (object) {
|
272
|
+
if (!object._highcharts_extended) {
|
273
|
+
Object.extend(object, {
|
274
|
+
_highchart_events: {},
|
275
|
+
_highchart_animation: null,
|
276
|
+
_highcharts_extended: true,
|
277
|
+
_highcharts_observe: function (name, fn) {
|
278
|
+
this._highchart_events[name] = [this._highchart_events[name], fn].compact().flatten();
|
279
|
+
},
|
280
|
+
_highcharts_stop_observing: function (name, fn) {
|
281
|
+
if (name) {
|
282
|
+
if (fn) {
|
283
|
+
this._highchart_events[name] = [this._highchart_events[name]].compact().flatten().without(fn);
|
284
|
+
} else {
|
285
|
+
delete this._highchart_events[name];
|
286
|
+
}
|
287
|
+
} else {
|
288
|
+
this._highchart_events = {};
|
289
|
+
}
|
290
|
+
},
|
291
|
+
_highcharts_fire: function (name, args) {
|
292
|
+
var target = this;
|
293
|
+
(this._highchart_events[name] || []).each(function (fn) {
|
294
|
+
// args is never null here
|
295
|
+
if (args.stopped) {
|
296
|
+
return; // "throw $break" wasn't working. i think because of the scope of 'this'.
|
297
|
+
}
|
298
|
+
|
299
|
+
// Attach a simple preventDefault function to skip default handler if called
|
300
|
+
args.preventDefault = function () {
|
301
|
+
args.defaultPrevented = true;
|
302
|
+
};
|
303
|
+
args.target = target;
|
304
|
+
|
305
|
+
// If the event handler return false, prevent the default handler from executing
|
306
|
+
if (fn.bind(this)(args) === false) {
|
307
|
+
args.preventDefault();
|
308
|
+
}
|
309
|
+
}
|
310
|
+
.bind(this));
|
311
|
+
}
|
312
|
+
});
|
313
|
+
}
|
314
|
+
}
|
315
|
+
};
|
316
|
+
}());
|