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
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,94 @@
|
|
1
|
+
.wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative}
|
2
|
+
.tabbody{height:225px;}
|
3
|
+
.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;}
|
4
|
+
.tabbody .focus { display: block;}
|
5
|
+
|
6
|
+
body{font-size: 12px;color: #888;overflow: hidden;}
|
7
|
+
input,label{vertical-align:middle}
|
8
|
+
.clear{clear: both;}
|
9
|
+
.pl{padding-left: 18px;padding-left: 23px\9;}
|
10
|
+
|
11
|
+
#imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;}
|
12
|
+
#imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;}
|
13
|
+
#imageList img {cursor: pointer;border: 2px solid white;}
|
14
|
+
|
15
|
+
.bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;}
|
16
|
+
.content div{margin: 10px 0 10px 5px;}
|
17
|
+
.content .iptradio{margin: 0px 5px 5px 0px;}
|
18
|
+
.txt{width:280px;}
|
19
|
+
|
20
|
+
.wrapcolor{height: 19px;}
|
21
|
+
div.color{float: left;margin: 0;}
|
22
|
+
#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;}
|
23
|
+
div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
|
24
|
+
#custom input{height: 15px;min-height: 15px;width:20px;}
|
25
|
+
#repeatType{width:100px;}
|
26
|
+
|
27
|
+
|
28
|
+
/* 图片管理样式 */
|
29
|
+
#imgManager {
|
30
|
+
width: 100%;
|
31
|
+
height: 225px;
|
32
|
+
}
|
33
|
+
#imgManager #imageList{
|
34
|
+
width: 100%;
|
35
|
+
overflow-x: hidden;
|
36
|
+
overflow-y: auto;
|
37
|
+
}
|
38
|
+
#imgManager ul {
|
39
|
+
display: block;
|
40
|
+
list-style: none;
|
41
|
+
margin: 0;
|
42
|
+
padding: 0;
|
43
|
+
}
|
44
|
+
#imgManager li {
|
45
|
+
float: left;
|
46
|
+
display: block;
|
47
|
+
list-style: none;
|
48
|
+
padding: 0;
|
49
|
+
width: 113px;
|
50
|
+
height: 113px;
|
51
|
+
margin: 9px 0 0 19px;
|
52
|
+
background-color: #eee;
|
53
|
+
overflow: hidden;
|
54
|
+
cursor: pointer;
|
55
|
+
position: relative;
|
56
|
+
}
|
57
|
+
#imgManager li.clearFloat {
|
58
|
+
float: none;
|
59
|
+
clear: both;
|
60
|
+
display: block;
|
61
|
+
width:0;
|
62
|
+
height:0;
|
63
|
+
margin: 0;
|
64
|
+
padding: 0;
|
65
|
+
}
|
66
|
+
#imgManager li img {
|
67
|
+
cursor: pointer;
|
68
|
+
}
|
69
|
+
#imgManager li .icon {
|
70
|
+
cursor: pointer;
|
71
|
+
width: 113px;
|
72
|
+
height: 113px;
|
73
|
+
position: absolute;
|
74
|
+
top: 0;
|
75
|
+
left: 0;
|
76
|
+
z-index: 2;
|
77
|
+
border: 0;
|
78
|
+
background-repeat: no-repeat;
|
79
|
+
}
|
80
|
+
#imgManager li .icon:hover {
|
81
|
+
width: 107px;
|
82
|
+
height: 107px;
|
83
|
+
border: 3px solid #1094fa;
|
84
|
+
}
|
85
|
+
#imgManager li.selected .icon {
|
86
|
+
background-image: url(images/success.png);
|
87
|
+
background-position: 75px 75px;
|
88
|
+
}
|
89
|
+
#imgManager li.selected .icon:hover {
|
90
|
+
width: 107px;
|
91
|
+
height: 107px;
|
92
|
+
border: 3px solid #1094fa;
|
93
|
+
background-position: 72px 72px;
|
94
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
5
|
+
<script type="text/javascript" src="../internal.js"></script>
|
6
|
+
<link rel="stylesheet" type="text/css" href="background.css">
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div id="bg_container" class="wrapper">
|
10
|
+
<div id="tabHeads" class="tabhead">
|
11
|
+
<span class="focus" data-content-id="normal"><var id="lang_background_normal"></var></span>
|
12
|
+
<span class="" data-content-id="imgManager"><var id="lang_background_local"></var></span>
|
13
|
+
</div>
|
14
|
+
<div id="tabBodys" class="tabbody">
|
15
|
+
<div id="normal" class="panel focus">
|
16
|
+
<fieldset class="bgarea">
|
17
|
+
<legend><var id="lang_background_set"></var></legend>
|
18
|
+
<div class="content">
|
19
|
+
<div>
|
20
|
+
<label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none" checked="checked"><var id="lang_background_none"></var></label>
|
21
|
+
<label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var id="lang_background_colored"></var></label>
|
22
|
+
</div>
|
23
|
+
<div class="wrapcolor pl">
|
24
|
+
<div class="color">
|
25
|
+
<var id="lang_background_color"></var>:
|
26
|
+
</div>
|
27
|
+
<div id="colorPicker"></div>
|
28
|
+
<div class="clear"></div>
|
29
|
+
</div>
|
30
|
+
<div class="wrapcolor pl">
|
31
|
+
<label><var id="lang_background_netimg"></var>:</label><input class="txt" type="text" id="url">
|
32
|
+
</div>
|
33
|
+
<div id="alignment" class="alignment">
|
34
|
+
<var id="lang_background_align"></var>:<select id="repeatType">
|
35
|
+
<option value="center"></option>
|
36
|
+
<option value="repeat-x"></option>
|
37
|
+
<option value="repeat-y"></option>
|
38
|
+
<option value="repeat"></option>
|
39
|
+
<option value="self"></option>
|
40
|
+
</select>
|
41
|
+
</div>
|
42
|
+
<div id="custom" >
|
43
|
+
<var id="lang_background_position"></var>:x:<input type="text" size="1" id="x" maxlength="4" value="0">px y:<input type="text" size="1" id="y" maxlength="4" value="0">px
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</fieldset>
|
47
|
+
|
48
|
+
</div>
|
49
|
+
<div id="imgManager" class="panel">
|
50
|
+
<div id="imageList" style=""></div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
<script type="text/javascript" src="background.js"></script>
|
55
|
+
</body>
|
56
|
+
</html>
|
@@ -0,0 +1,376 @@
|
|
1
|
+
(function () {
|
2
|
+
|
3
|
+
var onlineImage,
|
4
|
+
backupStyle = editor.queryCommandValue('background');
|
5
|
+
|
6
|
+
window.onload = function () {
|
7
|
+
initTabs();
|
8
|
+
initColorSelector();
|
9
|
+
};
|
10
|
+
|
11
|
+
/* 初始化tab标签 */
|
12
|
+
function initTabs(){
|
13
|
+
var tabs = $G('tabHeads').children;
|
14
|
+
for (var i = 0; i < tabs.length; i++) {
|
15
|
+
domUtils.on(tabs[i], "click", function (e) {
|
16
|
+
var target = e.target || e.srcElement;
|
17
|
+
for (var j = 0; j < tabs.length; j++) {
|
18
|
+
if(tabs[j] == target){
|
19
|
+
tabs[j].className = "focus";
|
20
|
+
var contentId = tabs[j].getAttribute('data-content-id');
|
21
|
+
$G(contentId).style.display = "block";
|
22
|
+
if(contentId == 'imgManager') {
|
23
|
+
initImagePanel();
|
24
|
+
}
|
25
|
+
}else {
|
26
|
+
tabs[j].className = "";
|
27
|
+
$G(tabs[j].getAttribute('data-content-id')).style.display = "none";
|
28
|
+
}
|
29
|
+
}
|
30
|
+
});
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
/* 初始化颜色设置 */
|
35
|
+
function initColorSelector () {
|
36
|
+
var obj = editor.queryCommandValue('background');
|
37
|
+
if (obj) {
|
38
|
+
var color = obj['background-color'],
|
39
|
+
repeat = obj['background-repeat'] || 'repeat',
|
40
|
+
image = obj['background-image'] || '',
|
41
|
+
position = obj['background-position'] || 'center center',
|
42
|
+
pos = position.split(' '),
|
43
|
+
x = parseInt(pos[0]) || 0,
|
44
|
+
y = parseInt(pos[1]) || 0;
|
45
|
+
|
46
|
+
if(repeat == 'no-repeat' && (x || y)) repeat = 'self';
|
47
|
+
|
48
|
+
image = image.match(/url[\s]*\(([^\)]*)\)/);
|
49
|
+
image = image ? image[1]:'';
|
50
|
+
updateFormState('colored', color, image, repeat, x, y);
|
51
|
+
} else {
|
52
|
+
updateFormState();
|
53
|
+
}
|
54
|
+
|
55
|
+
var updateHandler = function () {
|
56
|
+
updateFormState();
|
57
|
+
updateBackground();
|
58
|
+
}
|
59
|
+
domUtils.on($G('nocolorRadio'), 'click', updateBackground);
|
60
|
+
domUtils.on($G('coloredRadio'), 'click', updateHandler);
|
61
|
+
domUtils.on($G('url'), 'keyup', function(){
|
62
|
+
if($G('url').value && $G('alignment').style.display == "none") {
|
63
|
+
utils.each($G('repeatType').children, function(item){
|
64
|
+
item.selected = ('repeat' == item.getAttribute('value') ? 'selected':false);
|
65
|
+
});
|
66
|
+
}
|
67
|
+
updateHandler();
|
68
|
+
});
|
69
|
+
domUtils.on($G('repeatType'), 'change', updateHandler);
|
70
|
+
domUtils.on($G('x'), 'keyup', updateBackground);
|
71
|
+
domUtils.on($G('y'), 'keyup', updateBackground);
|
72
|
+
|
73
|
+
initColorPicker();
|
74
|
+
}
|
75
|
+
|
76
|
+
/* 初始化颜色选择器 */
|
77
|
+
function initColorPicker() {
|
78
|
+
var me = editor,
|
79
|
+
cp = $G("colorPicker");
|
80
|
+
|
81
|
+
/* 生成颜色选择器ui对象 */
|
82
|
+
var popup = new UE.ui.Popup({
|
83
|
+
content: new UE.ui.ColorPicker({
|
84
|
+
noColorText: me.getLang("clearColor"),
|
85
|
+
editor: me,
|
86
|
+
onpickcolor: function (t, color) {
|
87
|
+
updateFormState('colored', color);
|
88
|
+
updateBackground();
|
89
|
+
UE.ui.Popup.postHide();
|
90
|
+
},
|
91
|
+
onpicknocolor: function (t, color) {
|
92
|
+
updateFormState('colored', 'transparent');
|
93
|
+
updateBackground();
|
94
|
+
UE.ui.Popup.postHide();
|
95
|
+
}
|
96
|
+
}),
|
97
|
+
editor: me,
|
98
|
+
onhide: function () {
|
99
|
+
}
|
100
|
+
});
|
101
|
+
|
102
|
+
/* 设置颜色选择器 */
|
103
|
+
domUtils.on(cp, "click", function () {
|
104
|
+
popup.showAnchor(this);
|
105
|
+
});
|
106
|
+
domUtils.on(document, 'mousedown', function (evt) {
|
107
|
+
var el = evt.target || evt.srcElement;
|
108
|
+
UE.ui.Popup.postHide(el);
|
109
|
+
});
|
110
|
+
domUtils.on(window, 'scroll', function () {
|
111
|
+
UE.ui.Popup.postHide();
|
112
|
+
});
|
113
|
+
}
|
114
|
+
|
115
|
+
/* 初始化在线图片列表 */
|
116
|
+
function initImagePanel() {
|
117
|
+
onlineImage = onlineImage || new OnlineImage('imageList');
|
118
|
+
}
|
119
|
+
|
120
|
+
/* 更新背景色设置面板 */
|
121
|
+
function updateFormState (radio, color, url, align, x, y) {
|
122
|
+
var nocolorRadio = $G('nocolorRadio'),
|
123
|
+
coloredRadio = $G('coloredRadio');
|
124
|
+
|
125
|
+
if(radio) {
|
126
|
+
nocolorRadio.checked = (radio == 'colored' ? false:'checked');
|
127
|
+
coloredRadio.checked = (radio == 'colored' ? 'checked':false);
|
128
|
+
}
|
129
|
+
if(color) {
|
130
|
+
domUtils.setStyle($G("colorPicker"), "background-color", color);
|
131
|
+
}
|
132
|
+
|
133
|
+
if(url && /^\//.test(url)) {
|
134
|
+
var a = document.createElement('a');
|
135
|
+
a.href = url;
|
136
|
+
browser.ie && (a.href = a.href);
|
137
|
+
url = browser.ie ? a.href:(a.protocol + '//' + a.host + a.pathname + a.search + a.hash);
|
138
|
+
}
|
139
|
+
|
140
|
+
if(url || url === '') {
|
141
|
+
$G('url').value = url;
|
142
|
+
}
|
143
|
+
if(align) {
|
144
|
+
utils.each($G('repeatType').children, function(item){
|
145
|
+
item.selected = (align == item.getAttribute('value') ? 'selected':false);
|
146
|
+
});
|
147
|
+
}
|
148
|
+
if(x || y) {
|
149
|
+
$G('x').value = parseInt(x) || 0;
|
150
|
+
$G('y').value = parseInt(y) || 0;
|
151
|
+
}
|
152
|
+
|
153
|
+
$G('alignment').style.display = coloredRadio.checked && $G('url').value ? '':'none';
|
154
|
+
$G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '':'none';
|
155
|
+
}
|
156
|
+
|
157
|
+
/* 更新背景颜色 */
|
158
|
+
function updateBackground () {
|
159
|
+
if ($G('coloredRadio').checked) {
|
160
|
+
var color = domUtils.getStyle($G("colorPicker"), "background-color"),
|
161
|
+
bgimg = $G("url").value,
|
162
|
+
align = $G("repeatType").value,
|
163
|
+
backgroundObj = {
|
164
|
+
"background-repeat": "no-repeat",
|
165
|
+
"background-position": "center center"
|
166
|
+
};
|
167
|
+
|
168
|
+
if (color) backgroundObj["background-color"] = color;
|
169
|
+
if (bgimg) backgroundObj["background-image"] = 'url(' + bgimg + ')';
|
170
|
+
if (align == 'self') {
|
171
|
+
backgroundObj["background-position"] = $G("x").value + "px " + $G("y").value + "px";
|
172
|
+
} else if (align == 'repeat-x' || align == 'repeat-y' || align == 'repeat') {
|
173
|
+
backgroundObj["background-repeat"] = align;
|
174
|
+
}
|
175
|
+
|
176
|
+
editor.execCommand('background', backgroundObj);
|
177
|
+
} else {
|
178
|
+
editor.execCommand('background', null);
|
179
|
+
}
|
180
|
+
}
|
181
|
+
|
182
|
+
|
183
|
+
/* 在线图片 */
|
184
|
+
function OnlineImage(target) {
|
185
|
+
this.container = utils.isString(target) ? document.getElementById(target) : target;
|
186
|
+
this.init();
|
187
|
+
}
|
188
|
+
OnlineImage.prototype = {
|
189
|
+
init: function () {
|
190
|
+
this.reset();
|
191
|
+
this.initEvents();
|
192
|
+
},
|
193
|
+
/* 初始化容器 */
|
194
|
+
initContainer: function () {
|
195
|
+
this.container.innerHTML = '';
|
196
|
+
this.list = document.createElement('ul');
|
197
|
+
this.clearFloat = document.createElement('li');
|
198
|
+
|
199
|
+
domUtils.addClass(this.list, 'list');
|
200
|
+
domUtils.addClass(this.clearFloat, 'clearFloat');
|
201
|
+
|
202
|
+
this.list.id = 'imageListUl';
|
203
|
+
this.list.appendChild(this.clearFloat);
|
204
|
+
this.container.appendChild(this.list);
|
205
|
+
},
|
206
|
+
/* 初始化滚动事件,滚动到地步自动拉取数据 */
|
207
|
+
initEvents: function () {
|
208
|
+
var _this = this;
|
209
|
+
|
210
|
+
/* 滚动拉取图片 */
|
211
|
+
domUtils.on($G('imageList'), 'scroll', function(e){
|
212
|
+
var panel = this;
|
213
|
+
if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
|
214
|
+
_this.getImageData();
|
215
|
+
}
|
216
|
+
});
|
217
|
+
/* 选中图片 */
|
218
|
+
domUtils.on(this.container, 'click', function (e) {
|
219
|
+
var target = e.target || e.srcElement,
|
220
|
+
li = target.parentNode,
|
221
|
+
nodes = $G('imageListUl').childNodes;
|
222
|
+
|
223
|
+
if (li.tagName.toLowerCase() == 'li') {
|
224
|
+
updateFormState('nocolor', null, '');
|
225
|
+
for (var i = 0, node; node = nodes[i++];) {
|
226
|
+
if (node == li && !domUtils.hasClass(node, 'selected')) {
|
227
|
+
domUtils.addClass(node, 'selected');
|
228
|
+
updateFormState('colored', null, li.firstChild.getAttribute("_src"), 'repeat');
|
229
|
+
} else {
|
230
|
+
domUtils.removeClasses(node, 'selected');
|
231
|
+
}
|
232
|
+
}
|
233
|
+
updateBackground();
|
234
|
+
}
|
235
|
+
});
|
236
|
+
},
|
237
|
+
/* 初始化第一次的数据 */
|
238
|
+
initData: function () {
|
239
|
+
|
240
|
+
/* 拉取数据需要使用的值 */
|
241
|
+
this.state = 0;
|
242
|
+
this.listSize = editor.getOpt('imageManagerListSize');
|
243
|
+
this.listIndex = 0;
|
244
|
+
this.listEnd = false;
|
245
|
+
|
246
|
+
/* 第一次拉取数据 */
|
247
|
+
this.getImageData();
|
248
|
+
},
|
249
|
+
/* 重置界面 */
|
250
|
+
reset: function() {
|
251
|
+
this.initContainer();
|
252
|
+
this.initData();
|
253
|
+
},
|
254
|
+
/* 向后台拉取图片列表数据 */
|
255
|
+
getImageData: function () {
|
256
|
+
var _this = this;
|
257
|
+
|
258
|
+
if(!_this.listEnd && !this.isLoadingData) {
|
259
|
+
this.isLoadingData = true;
|
260
|
+
var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')),
|
261
|
+
isJsonp = utils.isCrossDomainUrl(url);
|
262
|
+
ajax.request(url, {
|
263
|
+
'timeout': 100000,
|
264
|
+
'dataType': isJsonp ? 'jsonp':'',
|
265
|
+
'data': utils.extend({
|
266
|
+
start: this.listIndex,
|
267
|
+
size: this.listSize
|
268
|
+
}, editor.queryCommandValue('serverparam')),
|
269
|
+
'method': 'get',
|
270
|
+
'onsuccess': function (r) {
|
271
|
+
try {
|
272
|
+
var json = isJsonp ? r:eval('(' + r.responseText + ')');
|
273
|
+
if (json.state == 'SUCCESS') {
|
274
|
+
_this.pushData(json.list);
|
275
|
+
_this.listIndex = parseInt(json.start) + parseInt(json.list.length);
|
276
|
+
if(_this.listIndex >= json.total) {
|
277
|
+
_this.listEnd = true;
|
278
|
+
}
|
279
|
+
_this.isLoadingData = false;
|
280
|
+
}
|
281
|
+
} catch (e) {
|
282
|
+
if(r.responseText.indexOf('ue_separate_ue') != -1) {
|
283
|
+
var list = r.responseText.split(r.responseText);
|
284
|
+
_this.pushData(list);
|
285
|
+
_this.listIndex = parseInt(list.length);
|
286
|
+
_this.listEnd = true;
|
287
|
+
_this.isLoadingData = false;
|
288
|
+
}
|
289
|
+
}
|
290
|
+
},
|
291
|
+
'onerror': function () {
|
292
|
+
_this.isLoadingData = false;
|
293
|
+
}
|
294
|
+
});
|
295
|
+
}
|
296
|
+
},
|
297
|
+
/* 添加图片到列表界面上 */
|
298
|
+
pushData: function (list) {
|
299
|
+
var i, item, img, icon, _this = this,
|
300
|
+
urlPrefix = editor.getOpt('imageManagerUrlPrefix');
|
301
|
+
for (i = 0; i < list.length; i++) {
|
302
|
+
if(list[i] && list[i].url) {
|
303
|
+
item = document.createElement('li');
|
304
|
+
img = document.createElement('img');
|
305
|
+
icon = document.createElement('span');
|
306
|
+
|
307
|
+
domUtils.on(img, 'load', (function(image){
|
308
|
+
return function(){
|
309
|
+
_this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
|
310
|
+
}
|
311
|
+
})(img));
|
312
|
+
img.width = 113;
|
313
|
+
img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
|
314
|
+
img.setAttribute('_src', urlPrefix + list[i].url);
|
315
|
+
domUtils.addClass(icon, 'icon');
|
316
|
+
|
317
|
+
item.appendChild(img);
|
318
|
+
item.appendChild(icon);
|
319
|
+
this.list.insertBefore(item, this.clearFloat);
|
320
|
+
}
|
321
|
+
}
|
322
|
+
},
|
323
|
+
/* 改变图片大小 */
|
324
|
+
scale: function (img, w, h, type) {
|
325
|
+
var ow = img.width,
|
326
|
+
oh = img.height;
|
327
|
+
|
328
|
+
if (type == 'justify') {
|
329
|
+
if (ow >= oh) {
|
330
|
+
img.width = w;
|
331
|
+
img.height = h * oh / ow;
|
332
|
+
img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
|
333
|
+
} else {
|
334
|
+
img.width = w * ow / oh;
|
335
|
+
img.height = h;
|
336
|
+
img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
|
337
|
+
}
|
338
|
+
} else {
|
339
|
+
if (ow >= oh) {
|
340
|
+
img.width = w * ow / oh;
|
341
|
+
img.height = h;
|
342
|
+
img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
|
343
|
+
} else {
|
344
|
+
img.width = w;
|
345
|
+
img.height = h * oh / ow;
|
346
|
+
img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
|
347
|
+
}
|
348
|
+
}
|
349
|
+
},
|
350
|
+
getInsertList: function () {
|
351
|
+
var i, lis = this.list.children, list = [], align = getAlign();
|
352
|
+
for (i = 0; i < lis.length; i++) {
|
353
|
+
if (domUtils.hasClass(lis[i], 'selected')) {
|
354
|
+
var img = lis[i].firstChild,
|
355
|
+
src = img.getAttribute('_src');
|
356
|
+
list.push({
|
357
|
+
src: src,
|
358
|
+
_src: src,
|
359
|
+
floatStyle: align
|
360
|
+
});
|
361
|
+
}
|
362
|
+
|
363
|
+
}
|
364
|
+
return list;
|
365
|
+
}
|
366
|
+
};
|
367
|
+
|
368
|
+
dialog.onok = function () {
|
369
|
+
updateBackground();
|
370
|
+
editor.fireEvent('saveScene');
|
371
|
+
};
|
372
|
+
dialog.oncancel = function () {
|
373
|
+
editor.execCommand('background', backupStyle);
|
374
|
+
};
|
375
|
+
|
376
|
+
})();
|