ueditor.rails 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/config.mindpin.default.coffee +59 -0
- data/app/assets/javascripts/ueditor.js +3 -2
- data/app/assets/stylesheets/ueditor/themes/mindpin/css/ueditor.css +1945 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/dialogbase.css +100 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/anchor.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/arrow.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/arrow_down.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/arrow_up.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/button-bg.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/cancelbutton.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/charts.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/cursor_h.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/cursor_h.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/cursor_v.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/cursor_v.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/dialog-title-bg.png +0 -0
- data/{vendor/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.png → app/assets/stylesheets/ueditor/themes/mindpin/images/filescan.png} +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/highlighted.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/icons-all.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/icons.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/icons.png +0 -0
- data/{vendor/assets/javascripts/ueditor/dialogs/attachment/images/bg.png → app/assets/stylesheets/ueditor/themes/mindpin/images/loaderror.png} +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/loading.gif +0 -0
- data/{vendor/assets/javascripts/ueditor/dialogs/attachment/images/alignicon.gif → app/assets/stylesheets/ueditor/themes/mindpin/images/lock.gif} +0 -0
- data/{vendor/assets/javascripts/ueditor/dialogs/emotion → app/assets/stylesheets/ueditor/themes/mindpin}/images/neweditor-tab-bg.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/pagebreak.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/scale.png +0 -0
- data/{vendor/assets/javascripts/ueditor/dialogs/video/images/bg.png → app/assets/stylesheets/ueditor/themes/mindpin/images/sortable.png} +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/spacer.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/sparator_v.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/table-cell-align.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/tangram-colorpicker.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/toolbar_bg.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/unhighlighted.gif +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/upload.png +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/videologo.gif +0 -0
- data/{vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif → app/assets/stylesheets/ueditor/themes/mindpin/images/word.gif} +0 -0
- data/app/assets/stylesheets/ueditor/themes/mindpin/images/wordpaste.png +0 -0
- data/lib/ueditor/version.rb +1 -1
- data/test/dummy/log/development.log +105 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/02b56f18dcd4ddec585a02528773c04b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/067a099f2392ac9d679fb27d72421548 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/07898ec696d976eeafb61ef6bb48e097 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/19694ecb6829b547affeb420f6c4f4ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/22b4a109d4f3136884f5b96c0dafe5c4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2e810e09180be475ce270590eb6d79bf +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/31b24023d7695b6c40fbe8b2d903e8db +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/32e4b0cbcc7942738eb80e9c571e09ad +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3e6fbffe890d9471ace4284a35cf833e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/50a23c1131cabc18af0d7ce21df229ea +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/792425c63374a4c75ca043ceeb960991 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8165d0bcd2b5c04b4a98f4f0cbabef64 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9bf28bcb944fe3baabaabb97036a4d6c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9df06b25c7118a2446ff210358a7150a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a0a5d0da6dc7907299fb15adbabc87e5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d3a9a64bc190424c032a25d0b7ee0ed1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/eb17dc3da27134989a88ec01caa61d78 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ef01c1c9fa9a8ace471702975febabf5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fa046bb067616da9d14862739bf2c67c +0 -0
- data/vendor/assets/javascripts/ueditor/index.html +0 -19
- data/vendor/assets/javascripts/ueditor/themes/iframe.css +0 -1
- data/vendor/assets/javascripts/ueditor/ueditor.all.js +2854 -12684
- data/vendor/assets/javascripts/ueditor/ueditor.all.min.js +10 -709
- data/vendor/assets/javascripts/ueditor/ueditor.config.js +2 -147
- data/vendor/assets/javascripts/ueditor/ueditor.parse.js +11 -602
- data/vendor/assets/javascripts/ueditor/ueditor.parse.min.js +1 -28
- metadata +82 -161
- data/app/assets/javascripts/default.config.js +0 -381
- data/vendor/assets/javascripts/ueditor/dialogs/anchor/anchor.html +0 -40
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.css +0 -681
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.html +0 -60
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/attachment.js +0 -754
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_default.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/file-icons.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/icons.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/icons.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/image.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/progress.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/success.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/attachment/images/success.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/background/background.css +0 -94
- data/vendor/assets/javascripts/ueditor/dialogs/background/background.html +0 -56
- data/vendor/assets/javascripts/ueditor/dialogs/background/background.js +0 -376
- data/vendor/assets/javascripts/ueditor/dialogs/background/images/bg.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/background/images/success.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/charts/chart.config.js +0 -65
- data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.css +0 -165
- data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.html +0 -89
- data/vendor/assets/javascripts/ueditor/dialogs/charts/charts.js +0 -519
- data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts0.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts1.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts2.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts3.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts4.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/charts/images/charts5.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.css +0 -43
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.html +0 -54
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/emotion.js +0 -186
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/0.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/bface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/cface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/fface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/jxface2.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/tface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/wface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/emotion/images/yface.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/gmap/gmap.html +0 -89
- data/vendor/assets/javascripts/ueditor/dialogs/help/help.css +0 -7
- data/vendor/assets/javascripts/ueditor/dialogs/help/help.html +0 -82
- data/vendor/assets/javascripts/ueditor/dialogs/help/help.js +0 -56
- data/vendor/assets/javascripts/ueditor/dialogs/image/image.css +0 -894
- data/vendor/assets/javascripts/ueditor/dialogs/image/image.html +0 -120
- data/vendor/assets/javascripts/ueditor/dialogs/image/image.js +0 -1139
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/alignicon.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/bg.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/icons.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/icons.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/image.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/progress.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/success.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/image/images/success.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/insertframe/insertframe.html +0 -98
- data/vendor/assets/javascripts/ueditor/dialogs/map/map.html +0 -135
- data/vendor/assets/javascripts/ueditor/dialogs/map/show.html +0 -118
- data/vendor/assets/javascripts/ueditor/dialogs/music/music.css +0 -30
- data/vendor/assets/javascripts/ueditor/dialogs/music/music.html +0 -32
- data/vendor/assets/javascripts/ueditor/dialogs/music/music.js +0 -192
- data/vendor/assets/javascripts/ueditor/dialogs/preview/preview.html +0 -40
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/addimg.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/brush.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/delimg.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/delimgH.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/empty.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/emptyH.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/eraser.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/redo.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/redoH.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/scale.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/scaleH.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/size.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/undo.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/images/undoH.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.css +0 -72
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.html +0 -95
- data/vendor/assets/javascripts/ueditor/dialogs/scrawl/scrawl.js +0 -671
- data/vendor/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.html +0 -102
- data/vendor/assets/javascripts/ueditor/dialogs/searchreplace/searchreplace.js +0 -164
- data/vendor/assets/javascripts/ueditor/dialogs/snapscreen/snapscreen.html +0 -58
- data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.html +0 -21
- data/vendor/assets/javascripts/ueditor/dialogs/spechars/spechars.js +0 -57
- data/vendor/assets/javascripts/ueditor/dialogs/table/dragicon.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.css +0 -84
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.html +0 -64
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittable.js +0 -237
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittd.html +0 -61
- data/vendor/assets/javascripts/ueditor/dialogs/table/edittip.html +0 -33
- data/vendor/assets/javascripts/ueditor/dialogs/template/config.js +0 -42
- data/vendor/assets/javascripts/ueditor/dialogs/template/images/bg.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre0.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre1.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre2.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre3.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/template/images/pre4.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/template/template.css +0 -18
- data/vendor/assets/javascripts/ueditor/dialogs/template/template.html +0 -26
- data/vendor/assets/javascripts/ueditor/dialogs/template/template.js +0 -53
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/center_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/file-icons.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/file-icons.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/icons.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/icons.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/image.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/left_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/none_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/progress.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/right_focus.jpg +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/success.gif +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/images/success.png +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/video/video.css +0 -635
- data/vendor/assets/javascripts/ueditor/dialogs/video/video.html +0 -86
- data/vendor/assets/javascripts/ueditor/dialogs/video/video.js +0 -789
- data/vendor/assets/javascripts/ueditor/dialogs/webapp/webapp.html +0 -53
- data/vendor/assets/javascripts/ueditor/dialogs/wordimage/fClipboard_ueditor.swf +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/wordimage/imageUploader.swf +0 -0
- data/vendor/assets/javascripts/ueditor/dialogs/wordimage/tangram.js +0 -1495
- data/vendor/assets/javascripts/ueditor/dialogs/wordimage/wordimage.html +0 -111
- data/vendor/assets/javascripts/ueditor/dialogs/wordimage/wordimage.js +0 -157
- data/vendor/assets/javascripts/ueditor/lang/en/en.js +0 -684
- data/vendor/assets/javascripts/ueditor/lang/en/images/addimage.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/alldeletebtnupskin.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/background.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/button.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/copy.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/deletedisable.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/deleteenable.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/listbackground.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/localimage.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/music.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/rotateleftdisable.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/rotateleftenable.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/rotaterightdisable.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/rotaterightenable.png +0 -0
- data/vendor/assets/javascripts/ueditor/lang/en/images/upload.png +0 -0
- data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.js +0 -1256
- data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.min.js +0 -9
- data/vendor/assets/javascripts/ueditor/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
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
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,94 +0,0 @@
|
|
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
|
-
}
|
@@ -1,56 +0,0 @@
|
|
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>
|
@@ -1,376 +0,0 @@
|
|
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
|
-
})();
|