瀏覽代碼

更新到1.1.2.5

zhangfisher 13 年之前
父節點
當前提交
be09d577d4
共有 100 個文件被更改,包括 6574 次插入2079 次删除
  1. 二進制
      DjangoUeditor/fields.pyc
  2. 二進制
      DjangoUeditor/forms.pyc
  3. 9 3
      DjangoUeditor/models.py
  4. 二進制
      DjangoUeditor/models.pyc
  5. 283 0
      DjangoUeditor/static/UEditor/CHANGELOG.TXT
  6. 1 1
      DjangoUeditor/static/UEditor/dialogs/attachment/attachment.html
  7. 5 11
      DjangoUeditor/static/UEditor/dialogs/background/background.css
  8. 4 4
      DjangoUeditor/static/UEditor/dialogs/background/background.html
  9. 259 332
      DjangoUeditor/static/UEditor/dialogs/background/background.js
  10. 13 90
      DjangoUeditor/static/UEditor/dialogs/emotion/emotion.css
  11. 11 11
      DjangoUeditor/static/UEditor/dialogs/emotion/emotion.html
  12. 15 15
      DjangoUeditor/static/UEditor/dialogs/emotion/emotion.js
  13. 12 20
      DjangoUeditor/static/UEditor/dialogs/gmap/gmap.html
  14. 7 0
      DjangoUeditor/static/UEditor/dialogs/help/help.css
  15. 17 93
      DjangoUeditor/static/UEditor/dialogs/help/help.html
  16. 54 0
      DjangoUeditor/static/UEditor/dialogs/help/help.js
  17. 1 1
      DjangoUeditor/static/UEditor/dialogs/highlightcode/highlightcode.html
  18. 17 20
      DjangoUeditor/static/UEditor/dialogs/image/image.css
  19. 47 9
      DjangoUeditor/static/UEditor/dialogs/image/image.html
  20. 292 279
      DjangoUeditor/static/UEditor/dialogs/image/image.js
  21. 二進制
      DjangoUeditor/static/UEditor/dialogs/image/imageUploader.swf
  22. 二進制
      DjangoUeditor/static/UEditor/dialogs/image/images/center_focus.jpg
  23. 二進制
      DjangoUeditor/static/UEditor/dialogs/image/images/left_focus.jpg
  24. 二進制
      DjangoUeditor/static/UEditor/dialogs/image/images/none_focus.jpg
  25. 二進制
      DjangoUeditor/static/UEditor/dialogs/image/images/right_focus.jpg
  26. 2 5
      DjangoUeditor/static/UEditor/dialogs/insertframe/insertframe.html
  27. 10 2
      DjangoUeditor/static/UEditor/dialogs/internal.js
  28. 1 1
      DjangoUeditor/static/UEditor/dialogs/link/link.html
  29. 8 20
      DjangoUeditor/static/UEditor/dialogs/map/map.html
  30. 30 0
      DjangoUeditor/static/UEditor/dialogs/music/music.css
  31. 32 0
      DjangoUeditor/static/UEditor/dialogs/music/music.html
  32. 192 0
      DjangoUeditor/static/UEditor/dialogs/music/music.js
  33. 2 2
      DjangoUeditor/static/UEditor/dialogs/scrawl/scrawl.css
  34. 2 2
      DjangoUeditor/static/UEditor/dialogs/scrawl/scrawl.html
  35. 29 30
      DjangoUeditor/static/UEditor/dialogs/scrawl/scrawl.js
  36. 59 200
      DjangoUeditor/static/UEditor/dialogs/searchreplace/searchreplace.html
  37. 160 0
      DjangoUeditor/static/UEditor/dialogs/searchreplace/searchreplace.js
  38. 1 2
      DjangoUeditor/static/UEditor/dialogs/snapscreen/snapscreen.html
  39. 6 56
      DjangoUeditor/static/UEditor/dialogs/spechars/spechars.html
  40. 56 0
      DjangoUeditor/static/UEditor/dialogs/spechars/spechars.js
  41. 二進制
      DjangoUeditor/static/UEditor/dialogs/table/dragicon.png
  42. 75 0
      DjangoUeditor/static/UEditor/dialogs/table/edittable.css
  43. 56 0
      DjangoUeditor/static/UEditor/dialogs/table/edittable.html
  44. 182 0
      DjangoUeditor/static/UEditor/dialogs/table/edittable.js
  45. 38 103
      DjangoUeditor/static/UEditor/dialogs/table/edittd.html
  46. 33 0
      DjangoUeditor/static/UEditor/dialogs/table/edittip.html
  47. 19 0
      DjangoUeditor/static/UEditor/dialogs/table/table.css
  48. 2 22
      DjangoUeditor/static/UEditor/dialogs/table/table.html
  49. 1 0
      DjangoUeditor/static/UEditor/dialogs/table/table.js
  50. 4 1
      DjangoUeditor/static/UEditor/dialogs/tangram.js
  51. 2 2
      DjangoUeditor/static/UEditor/dialogs/template/config.js
  52. 1 2
      DjangoUeditor/static/UEditor/dialogs/template/template.css
  53. 1 1
      DjangoUeditor/static/UEditor/dialogs/template/template.html
  54. 1 1
      DjangoUeditor/static/UEditor/dialogs/template/template.js
  55. 二進制
      DjangoUeditor/static/UEditor/dialogs/video/images/center_focus.jpg
  56. 二進制
      DjangoUeditor/static/UEditor/dialogs/video/images/left_focus.jpg
  57. 二進制
      DjangoUeditor/static/UEditor/dialogs/video/images/none_focus.jpg
  58. 二進制
      DjangoUeditor/static/UEditor/dialogs/video/images/right_focus.jpg
  59. 4 18
      DjangoUeditor/static/UEditor/dialogs/video/video.css
  60. 3 3
      DjangoUeditor/static/UEditor/dialogs/video/video.html
  61. 17 10
      DjangoUeditor/static/UEditor/dialogs/video/video.js
  62. 3 11
      DjangoUeditor/static/UEditor/dialogs/webapp/webapp.html
  63. 2 6
      DjangoUeditor/static/UEditor/dialogs/wordimage/wordimage.html
  64. 2 1
      DjangoUeditor/static/UEditor/dialogs/wordimage/wordimage.js
  65. 681 531
      DjangoUeditor/static/UEditor/editor_all.js
  66. 0 0
      DjangoUeditor/static/UEditor/editor_all_min.js
  67. 64 38
      DjangoUeditor/static/UEditor/editor_config.js
  68. 84 61
      DjangoUeditor/static/UEditor/lang/en/en.js
  69. 二進制
      DjangoUeditor/static/UEditor/lang/en/images/music.png
  70. 二進制
      DjangoUeditor/static/UEditor/lang/zh-cn/images/music.png
  71. 79 59
      DjangoUeditor/static/UEditor/lang/zh-cn/zh-cn.js
  72. 1582 0
      DjangoUeditor/static/UEditor/themes/default/css/ueditor.css
  73. 100 0
      DjangoUeditor/static/UEditor/themes/default/dialogbase.css
  74. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/cursor_h.gif
  75. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/cursor_h.png
  76. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/cursor_v.gif
  77. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/cursor_v.png
  78. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/highlighted.gif
  79. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/icons.gif
  80. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/icons.png
  81. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/scale.png
  82. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/sparator_v.png
  83. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/unhighlighted.gif
  84. 二進制
      DjangoUeditor/static/UEditor/themes/default/images/wordpaste.png
  85. 1773 0
      DjangoUeditor/static/UEditor/themes/gorgeous/css/ueditor.css
  86. 128 0
      DjangoUeditor/static/UEditor/themes/gorgeous/dialogbase.css
  87. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/anchor.gif
  88. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/arrow.png
  89. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/bottom.png
  90. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/button-bg.gif
  91. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/cancelbutton.gif
  92. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/cursor_h.gif
  93. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/cursor_v.gif
  94. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/dialog-title-bg.png
  95. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/dialog_title.png
  96. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/filescan.png
  97. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/highlighted.gif
  98. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/icons-all.gif
  99. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/icons-all.png
  100. 二進制
      DjangoUeditor/static/UEditor/themes/gorgeous/images/icons-checked.gif

二進制
DjangoUeditor/fields.pyc


二進制
DjangoUeditor/forms.pyc


+ 9 - 3
DjangoUeditor/models.py

@@ -1,9 +1,10 @@
 #coding: utf-8
 from django.db import models
 from django.contrib.admin import widgets as admin_widgets
-from DjangoUeditor.widgets import UEditorWidget,AdminUEditorWidget
+from widgets import UEditorWidget,AdminUEditorWidget
 from utils import MadeUeditorOptions
 
+
 class UEditorField(models.TextField):
     """
     百度HTML编辑器字段,初始化时,可以提供以下参数
@@ -17,10 +18,9 @@ class UEditorField(models.TextField):
         options:其他UEditor参数,字典类型
         css:编辑器textarea的CSS样式
     """
-    def __init__(self,verbose_name,width=600,height=300,plugins=(),toolbars="normal",filePath="",imagePath="",scrawlPath="",imageManagerPath="",css="",options={},**kwargs):
+    def __init__(self,verbose_name=None,width=600,height=300,plugins=(),toolbars="normal",filePath="",imagePath="",scrawlPath="",imageManagerPath="",css="",options={},**kwargs):
         self.ueditor_options=MadeUeditorOptions(width,height,plugins,toolbars,filePath,imagePath,scrawlPath,imageManagerPath,css,options)
         kwargs["verbose_name"]=verbose_name
-
         super(UEditorField,self).__init__(**kwargs)
 
     def formfield(self,**kwargs):
@@ -30,3 +30,9 @@ class UEditorField(models.TextField):
             defaults['widget'] = AdminUEditorWidget(**self.ueditor_options)
         return super(UEditorField, self).formfield(**defaults)
 
+#以下支持south
+try:
+    from south.modelsinspector import add_ignored_fields,add_introspection_rules
+    add_introspection_rules([], [r"^.DjangoUeditor\.models\.UEditorField"])
+except:
+    pass

二進制
DjangoUeditor/models.pyc


+ 283 - 0
DjangoUeditor/static/UEditor/CHANGELOG.TXT

@@ -0,0 +1,283 @@
+UEditor Change List
+
+Version 1.2.5
+新增功能
+  . table整体重构
+  . table支持插入表头和标题
+  . table支持拷贝
+  . table支持任意调整宽高
+  . table支持任意前插后插行列
+  . table键盘操作仿word用户体验
+  . 添加table平均分布行、列
+  . 添加table单元格对齐方式
+  . 添加table对齐方式
+  . 添加选中部分表格,点击backspace或delete删除功能
+  . 重写表格属性、单元格属性dialog
+  . 粘贴支持纯文本,源码,纯标签3个模式选择
+  . 添加计算字数的getContentLength接口
+  . 添加计算字数事件wordcount
+  . 图片上传支持参数动态绑定
+  . 重写了list功能,支持一,一),(一),1),(1),——等新的列表标签
+  . 调整了list中tab键的逻辑
+  . 添加了可以限制列表的层级
+  . 全屏快捷键 ALT+Z
+  . 添加了uparse.js展示页加载器
+
+优化修复
+  . 优化了插入代码功能
+  . ie下默认禁用源码模式下的代码高亮
+  . 截图功能支持非ie浏览器
+  . 修正了非ie下中文输入时回退不准确的问题
+  . 改进了键盘输入时做回退的操作
+
+Version 1.2.4
+新增功能
+   . 官网新增API文档
+   . CSS按照UI结构进行了模块化拆分
+   . 新增皮肤切换功能,并提供一套新皮肤(可通过配置项theme来设置)
+   . 新增编辑器容器拖动缩放功能,配置项为:scaleEnabled、minFrameWidth、minFrameHeight
+   . 新增音乐插件
+   . 增加了源码模式下,全屏按钮可以使用
+   . 添加了UE.getEditor工厂方法
+   . 添加了针对jquery配合使用的demo
+   . 添加了针对jqueryValidation配合使用的demo
+   . 添加了初始化编辑器宽高配置,配置为项:initialFrameWidth、initialFrameHeight
+
+优化修复
+   . 修复涂鸦路径在配置时,添加参数时请求报错
+   . 修复涂鸦opera下缩放不能使用
+   . 修复编辑器全屏功能失效问题
+   . codemirror版本升级到最新版
+   . 对opera/safari的支持进行了进一步的优化
+   . 优化了部分demo页的代码
+   . 修改原来的minFrameHeight为拖动时的最小高度
+
+Version 1.2.3
+新增功能
+   . 新增国际化支持
+   . 新增涂鸦功能
+   . 新增大小写功能
+   . 新增getAllHtml方法,可以将整个页面的内容打出来,可以在editor_config.js里通过配置allHtmlEnabled,来配置在提交时是否使用getAllHtml来得到内容
+   . 新增插入模板的功能
+   . 新增背景功能
+   . 新增UE.instants全局对象,下边挂接了所有实例化的编辑器对象
+   . Editor下新增ready方法,当编辑器ready后执行传入的fn,如果编辑器已经ready好了,就马上执行fn
+   . 新增topOffset配置参数,用于设置AutoFloat时工具栏距离顶部的高度
+   . 新增sourceEditorFirst配置参数,用于控制编辑器初始化时是否显示成源码模式,默认为否
+   . 新增在表格内实例化编辑器的demo
+   . 新增getDialog(dialogName)接口,可以获取dialog对象。
+
+优化修复
+   . chrome下会出现alt+tab切换时,导致选区位置不对
+   . focus方法添加参数可以指向到内容末尾
+   . 完全支持opera浏览器
+   . 修复了表格中实例化编辑器时工具栏浮动错位问题
+   . 优化了后台处理文件代码,文件夹按照日期自动生成
+
+
+Version 1.2.2
+1.编辑器不可编辑时,可以配置哪些功能可以使用,例如全屏
+2.table的边框为0时,采用虚线显示
+3.修复firefox下插入大量代码时,代码格式显示不正确的问题
+4.附件上传成功后显示初始文件名
+5.自定制下载优化
+6.当图片上传超时时,增加提示信息
+7.修复自动排版对H1不生效的问题
+8.修复插入超链接,超链接地址包含script标签,预览时会执行script语句的问题
+
+
+Version 1.2.1
+1.插入表情时,按住CTRL键可连续插入多个表情
+2.按住CTRL+Enter提交表单
+3.增加readonly属性在editor_config.js,编辑器实例上增加setEnabled,setDisabled方法,设置编辑区域是否可以编辑
+4.Editor上添加了getPlainTxt方法,得到编辑器的纯文本内容,但会保留段落格式
+5.修正了initialContent赋值失效的问题,赋值顺序以标签内容为先,如果没有再看initialContent内容。
+6.为insertHtml命令添加了过滤机制
+7.getContent将“ ”转成空格,连续2个空格则以“  ”表示
+8.当选区在一个超链接中,就可以在弹出层中直接修改这个超链接中的文本
+9.与后台交互的路径整体进行了调整
+10.超链接窗口可以修改超链接显示的文字
+11.增加插入百度应用的功能
+12.为每个plugin的在代码中添加了配置项的容错代码,若配置项不存在,不会报错
+13.提供后台的jsp版本
+14.重写了ui和和编辑器的交互层,dialog改为显示时创建,整体代码减少22k
+15.修正了代码高亮跟jquery冲突的问题
+16.改进了多个编辑器实例,使用一个name做为form提交,后台都可以取到
+17.添加是否删除空的inlineElement节点(包括嵌套的情况)的配置项:autoClearEmptyNode
+18.修正了chrome下粘贴文本带有white-space样式, 导致编辑器内容不能折行的问题
+19.在配置项中增加isShow设置初始化时是否显示编辑器,在编辑器实例上增加setShow,setHide方法设置编辑器的显示/隐藏
+20.修正在jquery中实例化编辑器时与UE自带的domready冲突的问题
+21.修正代码高亮中的行号与代码内容不能对齐的问题
+22.新增了图片上传对话框中可自定义配置默认Tab的功能
+23.修正.net源码包中gbk版本的乱码以及demo中使用了php路径的问题
+
+Version 1.2.0
+1.远程图片抓取
+3.源码模式下css进行了简写
+4.增加了baidu图片搜索功能,搜索图片然后直接插入到编辑器中
+5.重写了浮动工具栏,支持混乱模式下的工具栏滚动
+6.服务器图片在线管理
+7.word的本地图片取得寛高
+8.附件上传
+9.自动排版
+10.优化了状态反射的方式,改为编辑器获得焦点才会触发,失去焦点不在触发状态查询
+11.添加了上来就可以全屏的配置项哦去焦点之前的选区
+13.优化了查询状态反射的性能
+14.添加了contentchagne事件
+15.重写了autoheight插件,去掉setInterval的方式,并且长高时不在跳动
+16.插入视频,可以预览,并且界面加入了视屏搜索功能,并且可以插入视屏预览图到编辑器中
+17.单元格属性编辑
+18.ie下的截屏功能
+19.加强了table的dialog功能
+20.改进了autolink的效果,例如: dddhttp://www.baidu.com 回车,http://www.baidu.com也可以被匹配到了
+21.文件上传提供flash源码
+22.修改了行间距的展示方式
+23.段间距变为段前距和段后距
+24.提供了.net的事例代码
+25.首页提供了功能选择生成下载的新功能
+26.首页文档进行了改进
+27.分页符可以删除
+28.增强了表格的编辑功能
+
+Version 1.1.8
+1.避免了重复加载源码高亮的核心代码
+2.修复了word粘贴table过滤出错问题
+3.修复插入地图会出现style="undefined"的问题
+4.优化了list,多个相邻的属性一直的list会合并
+5.可以在列表中的一行里产生多行的效果(通过回车再回退操作),类似office的效果
+6.添加自定义样式功能
+7.修了在chrome下右键删除td里的图片会把整个td删除的问题
+8.改进了不同的页面调用一个editor,URL问题
+9.增加了颜色选择器的颜色
+10.改进了提供的后台程序的安全性
+11.代码高亮支持折行
+12.改进了源码编辑模式下的性能(ie下),并且支持自动换行
+13.修改了在destroy之后会在ie下报错的问题
+14.给初始化容器name值,那么在后台取值的键值就是name给定的值,方便多实例在一个form下提交
+15.支持插入script/style这样的标签
+16.修复了列表里插入浮动图片,图片不占位问题
+17.源码模式下,去掉了pre中的 
+18.完善了_example下的demo例子
+19.base64的图片被过滤掉了
+
+Version 1.1.7.3
+1.支持图片相对路径模式
+2.word粘贴首行缩进问题
+3.添加了图片边距
+4.提供了图片等比压缩时基准边选择配置的功能
+5.dialog在某些页面不显示问题
+6.添加了行内间距的调整
+7.在editor实例下添加了destroy方法
+8.全屏按钮位置不对的问题
+9.iframe.css支持相对和绝对路径
+10.修正了focus方法在ff下失效的问题
+11.提供了对FF3.6的支持
+12.添加了Shift+Enter软回车功能
+10.统一了颜色rgb转成#
+
+
+version 1.1.7.2
+1.去掉了iframe.css 改为在editor_config.js中配置,避免css文件找不到的问题
+2.给下拉菜单添加了默认的文字说明
+3.Ueditor.css去掉了对外部页面css的影响
+4.修正了ie9下,编辑器的高度不随着内容缩短的问题
+5.修正了粘贴有时会出现粘贴失败的情况
+6.修正了在ie下点击图片会出现js错误的问题
+7.修正了在ie下选全部替换,回退,再替换会出现替换失败的问题
+8.增加表情本地化模式,可在config中配置是否开启本地化
+9.flash的多图片上传
+10.支持了源码模式的下的代码高亮
+11.增加插入代码支持的语言,改进了插入代码的展示效果
+12.增加了字数统计
+13.增加了对图片的排版操作
+14.解决ie6和ie7下工具栏浮动时cpu占用过高的bug
+15.优化了文本模式粘贴的效果
+16.优化了word粘贴的效果
+17.在word粘贴本地图片时添加引导上传功能
+18.更好的ie9支持
+19.优化首行缩进效果
+20.使用script标签代替textarea标签作为编辑器容器,简化前后端转码的配置。
+21.优化了路径配置,修正了1.1.7.1中需要修改多处路径的问题
+22.增加了图片操作浮层的开关配置
+23.同时支持网络图片和本地图片的等比缩放
+24.优化了源码模式下的代码格式
+
+version 1.1.6.1
+1.去掉了iframe.css 改为在editor_config.js中配置,避免css文件找不到的问题
+2.给下拉菜单添加了默认的文字说明
+3.Ueditor.css去掉了对外部页面css的影响
+4.修正了ie9下,编辑器的高度不随着内容缩短的问题
+5.修正了粘贴有时会出现粘贴失败的情况
+6.修正了在ie下点击图片会出现js错误的问题
+7.修正了在ie下选全部替换,回退,再替换会出现替换失败的问题
+
+
+
+
+
+version 1.1.6
+1. 插入日期按钮现在使用tangram日历控件
+2. table可再编辑
+3. 粘贴excel表格的问题
+4. ff下最大化和切换源码出现光标不能跟着键盘改变和不能切出输入法的问题
+5. tab按键功能
+6. 支持多级列表
+7. 超链接可以在非ie下去除下划线
+8. 字体,字号,在editor-config.js中可配置
+
+
+
+version 1.1.5
+1.右键的策略,只显示选区内可操作的条目
+2.禁止elementpath还会留下边框问题
+3.字体改为了px
+4.插入分页符
+5.整合浮动toolbar为autofloat插件
+6.初始化的值会在第一次操作前清除,而且不在有延迟感
+7.配置项都放到了editor-config.js中
+8.修正了多实例的问题
+9.插入iframe功能
+10.粘贴过滤掉内容会有提示,没过滤任何内容不会出现提示
+11.修正代码高亮的显示效果
+12.list放弃原生改为手动实现,修正一系列原生的bug
+13.初始给个textarea会把内容取出作为初始值
+14.去掉了源码状态下冗余的table/td/pre的style属性
+15.fixed剪切出去会带start/end
+16.fixex源码模式下getContent内容不是新的
+17.table加入了设置背景颜色和边框颜色
+
+
+
+Version 1.1.4
+1.  锚点
+2.  首行缩进
+3.  行间距
+4.  右键菜单
+5.  插入代码
+6.  文件上传(php版本)
+7.  修复一些bug
+
+Version 1.1.3
+1.  修复chrome下粘贴的bug
+2.  自动转换office粘入的有序列表和无序列表
+3.  插入图片不再等比缩放,显示原始大小
+
+Version 1.1.2
+1.  修正IE9下autoHeight插件会一直长高的问题
+2.  增加对IE6下大写style属性的转换处理(现统一转换成小写)
+3.  格式刷
+4.  上下标互斥
+5.  form提交的支持
+6.  增加了focus属性,可以初始化时,设置是否编辑器获得焦点
+7.  增加了下滑线,删除线按钮,去掉了原来的下拉框
+8.  autolink支持,使非ie在输入链接时能自动加上a标签
+9.  google地图支持
+10. 修正了一些bug
+
+Version 1.1
+1.	修改了删除链接的机制,允许一次性删除多个超链接
+2.	改变了目录结构,方便部署(大大减少了开发代码过程中需要引入的js数量)
+3.	修正部分bug
+
+Version 1.0 (2011-7-8)
+1.	完成功能的开发

+ 1 - 1
DjangoUeditor/static/UEditor/dialogs/attachment/attachment.html

@@ -4,6 +4,7 @@
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <link rel="stylesheet" type="text/css" href="attachment.css"/>
 </head>
 <body>
@@ -16,7 +17,6 @@
     <span id="startUpload" style="display: none;"></span>
 
 </div>
-<script type="text/javascript" src="../internal.js"></script>
 
 <script type="text/javascript" src="../../third-party/swfupload/swfupload.js"></script>
 <script type="text/javascript" src="../../third-party/swfupload/swfupload.queue.js"></script>

+ 5 - 11
DjangoUeditor/static/UEditor/dialogs/background/background.css

@@ -1,23 +1,17 @@
-*{margin:0;padding:0;}
-.wrap{ padding: 5px;}
+.wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative}
+.tabbody{height:225px;}
+.panel { position: absolute;width:100%; height:100%;background: #fff;}
+
 body{font-size: 12px;color: #888;overflow: hidden;}
 input,label{vertical-align:middle}
 .clear{clear: both;}
 .pl{padding-left: 23px;padding-left: 28px\9;}
 
-
-.tabheade {position: relative;width: 410px;z-index: 10;}
-.tabheade span{display: inline-block;width: 82px;height: 30px;text-align: center;cursor: pointer;line-height: 30px;border: 1px solid #CCC;background: url("../../themes/default/images/dialog-title-bg.png") repeat-x;}
-.tabheade span.focus{border-bottom: none;height: 31px;background-color: white;}
-
-.tabbody{border: 1px solid #CCC;width: 428px;height: 225px;_height: 228px;margin: 0 auto;position: relative;top: -1px;}
-.tabbody .panel{position: absolute;width: 420px;height: 225px;background: white;}
-
 #imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;}
 #imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;}
 #imageList img {cursor: pointer;border: 2px solid white;}
 
-.bgarea{margin: 10px;padding: 5px;height: 84%;}
+.bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;}
 .content div{margin: 10px 0 10px 5px;}
 .content .iptradio{margin-right: 10px;}
 .txt{width:280px;}

+ 4 - 4
DjangoUeditor/static/UEditor/dialogs/background/background.html

@@ -2,15 +2,16 @@
 <html>
 <head>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <link rel="stylesheet" type="text/css" href="background.css">
 </head>
 <body>
-    <div id="bg_container" class="wrap">
-        <div id="tabhead" class="tabheade">
+    <div id="bg_container" class="wrapper">
+        <div id="tabHeads" class="tabhead">
             <span class="focus" tabsrc="normal"><var id="lang_background_normal"></var></span>
             <span class="" tabsrc="imgManager"><var id="lang_background_local"></var></span>
         </div>
-        <div id="tabbody" class="tabbody">
+        <div id="tabBodys" class="tabbody">
             <div id="normal" class="panel">
                 <fieldset  class="bgarea">
                     <legend><var id="lang_background_set"></var></legend>
@@ -49,7 +50,6 @@
             </div>
         </div>
     </div>
-    <script type="text/javascript" src="../internal.js"></script>
     <script type="text/javascript" src="background.js"></script>
 </body>
 </html>

+ 259 - 332
DjangoUeditor/static/UEditor/dialogs/background/background.js

@@ -1,351 +1,303 @@
 var me = editor,
     doc = me.document,
     bodyStyle,
-    cp = $G( "colorPicker" ),
+    cp = $G("colorPicker"),
     bkbodyStyle = "",
     bkcolor = "";
-    var popup = new UE.ui.Popup( {
-        content:new UE.ui.ColorPicker( {
-            noColorText:me.getLang( "clearColor" ),
-            editor:me,
-            onpickcolor:function ( t, color ) {
-                domUtils.setStyle( cp, "background-color", color );
-                bkcolor = color;
-                UE.ui.Popup.postHide();
-            },
-            onpicknocolor:function ( t, color ) {
-                domUtils.setStyle( cp, "background-color", "transparent" );
-                bkcolor = "";
-                UE.ui.Popup.postHide();
-            }
-        } ),
+var popup = new UE.ui.Popup({
+    content:new UE.ui.ColorPicker({
+        noColorText:me.getLang("clearColor"),
         editor:me,
-        onhide:function(){
-            setBody();
+        onpickcolor:function (t, color) {
+            domUtils.setStyle(cp, "background-color", color);
+            bkcolor = color;
+            UE.ui.Popup.postHide();
+        },
+        onpicknocolor:function (t, color) {
+            domUtils.setStyle(cp, "background-color", "transparent");
+            bkcolor = "";
+            UE.ui.Popup.postHide();
         }
-    } );
-    domUtils.on( cp, "click", function () {
-        popup.showAnchor( this );
-    } );
-    domUtils.on( document, 'mousedown', function ( evt ) {
-        var el = evt.target || evt.srcElement;
-        UE.ui.Popup.postHide( el );
-    } );
-    domUtils.on( window, 'scroll', function () {
-        UE.ui.Popup.postHide();
-    } );
-    //获得head
-    var getHead = function(){
-        return domUtils.getElementsByTagName($G("tabhead"),"span");
-    };
-    //给head绑定事件
-    var bindClick = function(){
-        var heads = getHead();
-        for(var i=0,head;head=heads[i++];){
-            head.onclick = function(){
-                var bodyid = this.getAttribute("tabsrc");
-                toggleHead(this);
-                toggleBody(bodyid);
-                if(bodyid == "imgManager"){
-                    ajax.request( editor.options.imageManagerUrl, {
-                        timeout:100000,
-                        action:"get",
-                        onsuccess:function ( xhr ) {
-                            var tmp = utils.trim(xhr.responseText),
-                                    imageUrls = !tmp ? [] : tmp.split( "ue_separate_ue" ),
-                                    length = imageUrls.length,
-                                    imgList = $G( "imageList" );
-                            imgList.innerHTML = !length ? "&nbsp;&nbsp;"+lang.noUploadImage : "";
-                            for ( var k = 0, ci; ci = imageUrls[k++]; ) {
-                                var img = document.createElement( "img" );
-                                var div = document.createElement( "div" );
-                                div.appendChild( img );
-                                div.style.display = "none";
-                                imgList.appendChild( div );
-                                img.onclick = function () {
-                                    var nodes = imgList.childNodes;
-                                    for(var i=0,node;node=nodes[i++];){
-                                        node.firstChild.removeAttribute( "selected" );
-                                        node.firstChild.style.cssText = "filter:alpha(Opacity=100);-moz-opacity:1;opacity: 1;border: 2px solid #fff";
-                                    }
-                                    changeSelected( this );
-                                };
-                                img.onload = function () {
-                                    this.parentNode.style.display = "";
-                                    var w = this.width, h = this.height;
-                                    scale( this, 95, 120, 80 );
-                                    this.title = lang.toggleSelect + w + "X" + h;
-                                };
-                                img.setAttribute( k < 35 ? "src" : "lazy_src", editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig,"") );
-                                img.setAttribute( "data_ue_src", editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig,"") );
+    }),
+    editor:me,
+    onhide:function () {
+        setBody();
+    }
+});
+domUtils.on(cp, "click", function () {
+    popup.showAnchor(this);
+});
+domUtils.on(document, 'mousedown', function (evt) {
+    var el = evt.target || evt.srcElement;
+    UE.ui.Popup.postHide(el);
+});
+domUtils.on(window, 'scroll', function () {
+    UE.ui.Popup.postHide();
+});
+//获得head
+var getHead = function () {
+    return domUtils.getElementsByTagName($G("tabHeads"), "span");
+};
+//给head绑定事件
+var bindClick = function () {
+    var heads = getHead();
+    for (var i = 0, head; head = heads[i++];) {
+        head.onclick = function () {
+            var bodyid = this.getAttribute("tabsrc");
+            toggleHead(this);
+            toggleBody(bodyid);
+            if (bodyid == "imgManager") {
+                ajax.request(editor.options.imageManagerUrl, {
+                    timeout:100000,
+                    action:"get",
+                    onsuccess:function (xhr) {
+                        var tmp = utils.trim(xhr.responseText),
+                            imageUrls = !tmp ? [] : tmp.split("ue_separate_ue"),
+                            length = imageUrls.length,
+                            imgList = $G("imageList");
+                        imgList.innerHTML = !length ? "&nbsp;&nbsp;" + lang.noUploadImage : "";
+                        for (var k = 0, ci; ci = imageUrls[k++];) {
+                            var img = document.createElement("img");
+                            var div = document.createElement("div");
+                            div.appendChild(img);
+                            div.style.display = "none";
+                            imgList.appendChild(div);
+                            img.onclick = function () {
+                                var nodes = imgList.childNodes;
+                                for (var i = 0, node; node = nodes[i++];) {
+                                    node.firstChild.removeAttribute("selected");
+                                    node.firstChild.style.cssText = "filter:alpha(Opacity=100);-moz-opacity:1;opacity: 1;border: 2px solid #fff";
+                                }
+                                changeSelected(this);
+                            };
+                            img.onload = function () {
+                                this.parentNode.style.display = "";
+                                var w = this.width, h = this.height;
+                                scale(this, 95, 120, 80);
+                                this.title = lang.toggleSelect + w + "X" + h;
+                            };
+                            img.setAttribute(k < 35 ? "src" : "lazy_src", editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig, ""));
+                            img.setAttribute("data_ue_src", editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig, ""));
 
-                            }
-                        },
-                        onerror:function () {
-                            $G( "imageList" ).innerHTML = lang.imageLoadError;
-                        }
-                    } );
-                }else{
-                    var radios = document.getElementsByName("t");
-                    for(var i=0,r;r=radios[i++];){
-                        if(r.checked&&r.value!="none"){
-                            $G("repeatType").style.display="";
                         }
+                    },
+                    onerror:function () {
+                        $G("imageList").innerHTML = lang.imageLoadError;
                     }
-                }
-            }
-        }
-    };
-    /**
-     * 改变o的选中状态
-     * @param o
-     */
-    function changeSelected( o ) {
-        if ( o.getAttribute( "selected" ) ) {
-            o.removeAttribute( "selected" );
-            o.style.cssText = "filter:alpha(Opacity=100);-moz-opacity:1;opacity: 1;border: 2px solid #fff";
-        } else {
-            o.setAttribute( "selected", "true" );
-            o.style.cssText = "filter:alpha(Opacity=50);-moz-opacity:0.5;opacity: 0.5;border:2px solid blue;";
-        }
-        $G("url").value = o.getAttribute("src")
-    }
-    /**
-     * 图片缩放
-     * @param img
-     * @param max
-     */
-    function scale( img, max, oWidth, oHeight ) {
-        var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oHeight;
-        if ( ow > max || oh > max ) {
-            if ( ow >= oh ) {
-                if ( width = ow - max ) {
-                    percent = (width / ow).toFixed( 2 );
-                    img.height = oh - oh * percent;
-                    img.width = max;
-                }
+                });
             } else {
-                if ( height = oh - max ) {
-                    percent = (height / oh).toFixed( 2 );
-                    img.width = ow - ow * percent;
-                    img.height = max;
+                var radios = document.getElementsByName("t");
+                for (var i = 0, r; r = radios[i++];) {
+                    if (r.checked && r.value != "none") {
+                        $G("repeatType").style.display = "";
+                        net(r);
+                    }
                 }
             }
         }
     }
-    //切换body
-    var toggleBody = function(id){
-        var bodys = ["normal","imgManager"];
-        for(var i=0,body;body=bodys[i++];){
-            $G(body).style.zIndex = body == id?200:1;
-        }
-    };
-    //切换head
-    var toggleHead = function(obj){
-        var heads = getHead();
-        for(var i=0,head;head=heads[i++];){
-            domUtils.removeClasses(head,["focus"]);
-            $G("repeatType").style.display = "none";
-        }
-        domUtils.addClass(obj,"focus");
-    };
-    //获得当前选中的tab
-    var getCheckedTab = function(){
-        var heads = getHead();
-        for(var i=0,head;head=heads[i++];){
-            if(domUtils.hasClass(head,"focus")){
-                return head;
-            }
-        }
-    };
-
-
-    var init = function(){
-        bindClick();
-        getHead()[0].click();
-        $G("alignment").style.display = "none";
-        $G("custom").style.display = "none";
-        //初始化颜色
-        domUtils.setStyle(cp,"background-color",domUtils.getComputedStyle(doc.body,"background-color"));
-        var color = domUtils.getComputedStyle(doc.body,"background-color");
-        if((color && color!="#ffffff" && color!="transparent")||domUtils.getComputedStyle(doc.body,"background-image")!="none"){
-            setTimeout(function(){
-                document.getElementsByName("t")[1].click();
-            },200);
-        }
-        initImgUrl();
-		initSelfPos();
-        initAlign();
-    };
-    //初始化自定义位置
-    function initSelfPos(){
-		var x,y;
-		if(browser.ie){
-			x = domUtils.getComputedStyle(doc.body,"background-position-x").replace(/50%|%|px|center/ig,"");
-			y = domUtils.getComputedStyle(doc.body,"background-position-y").replace(/50%|%|px|center/ig,"");
-		}else{
-		    var arr = domUtils.getComputedStyle(doc.body,"background-position").match(/\s?(\d*)px/ig);
-			if(arr&&arr.length){
-				x = arr[0].replace("px","");
-				y = arr[1].replace("px","");
-			}
-		}
-		$G("x").value = x || 0;
-		$G("y").value = y || 0;
+};
+/**
+ * 改变o的选中状态
+ * @param o
+ */
+function changeSelected(o) {
+    if (o.getAttribute("selected")) {
+        o.removeAttribute("selected");
+        o.style.cssText = "filter:alpha(Opacity=100);-moz-opacity:1;opacity: 1;border: 2px solid #fff";
+    } else {
+        o.setAttribute("selected", "true");
+        o.style.cssText = "filter:alpha(Opacity=50);-moz-opacity:0.5;opacity: 0.5;border:2px solid blue;";
     }
-    //初始化图片地址
-    function initImgUrl(){
-        var su = domUtils.getComputedStyle(doc.body,"background-image"),
-            url="";
-        if(su.indexOf(me.options.imagePath)>0){
-            url = su.match(/url\("?(.*[^\)"])"?/i);
-            if(url && url.length){
-                url =  url[1].substring(url[1].indexOf(me.options.imagePath),url[1].length);
+    $G("url").value = o.getAttribute("src")
+}
+/**
+ * 图片缩放
+ * @param img
+ * @param max
+ */
+function scale(img, max, oWidth, oHeight) {
+    var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oHeight;
+    if (ow > max || oh > max) {
+        if (ow >= oh) {
+            if (width = ow - max) {
+                percent = (width / ow).toFixed(2);
+                img.height = oh - oh * percent;
+                img.width = max;
             }
-        }else{
-            url =  su!="none" ? su.replace(/url\("?|"?\)/ig,""):"";
-        }
-        $G("url").value = url;
-    }
-    //初始化定位
-    function initAlign(){
-        var align = domUtils.getComputedStyle(doc.body,"background-repeat"),
-            alignType = $G("repeatType");
-        if(align == "no-repeat"){
-            var pos = domUtils.getComputedStyle(doc.body,browser.ie?"background-position-x":"background-position");
-            alignType.value = pos&&pos.match(/\s?(\d*)px/ig) ? "self":"center";
-            if(pos == "center"){
-                alignType.value = "center";
+        } else {
+            if (height = oh - max) {
+                percent = (height / oh).toFixed(2);
+                img.width = ow - ow * percent;
+                img.height = max;
             }
-            $G("custom").style.display = alignType.value=="self" ? "" : "none";
-        }else{
-            alignType.value = align;
         }
     }
-    init();
-//样式表工具
-function Stylesheet(ss){
-    if(typeof ss == "number")
-    ss = doc.styleSheets[ss];
-    this.ss = ss;
 }
-Stylesheet.prototype.getRules = function(){
-    return this.ss.cssRules?this.ss.cssRules:this.ss.rules;
+//切换body
+var toggleBody = function (id) {
+    var bodys = ["normal", "imgManager"];
+    for (var i = 0, body; body = bodys[i++];) {
+        $G(body).style.zIndex = body == id ? 200 : 1;
+    }
 };
-Stylesheet.prototype.getRule = function(s){
-    var rules = this.getRules();
-    if(!rules)return null;
-    if(typeof s == 'number')return rules[s];
-    s = s.toLowerCase();
-    for(var i=rules.length-1;i>=0;i--){
-        if(rules[i].selectorText.toLowerCase() == s)return rules[i];
+//切换head
+var toggleHead = function (obj) {
+    var heads = getHead();
+    for (var i = 0, head; head = heads[i++];) {
+        domUtils.removeClasses(head, ["focus"]);
+        $G("repeatType").style.display = "none";
     }
-    return null;
+    domUtils.addClass(obj, "focus");
 };
-Stylesheet.prototype.getStyleText = function(s){
-    var rule = this.getRule(s);
-    if(rule&&rule.style&&rule.style.cssText) return rule.style.cssText;
-    else return "";
+//获得当前选中的tab
+var getCheckedTab = function () {
+    var heads = getHead();
+    for (var i = 0, head; head = heads[i++];) {
+        if (domUtils.hasClass(head, "focus")) {
+            return head;
+        }
+    }
 };
-Stylesheet.prototype.insertRule = function(selector,styles,n){
-    if(!n){
-        var rules = this.getRules();
-        rules.length&&this.deleteRule(rules.length-1);
+
+
+var init = function () {
+    bindClick();
+    var el = getHead()[0],
+            bodyid = el.getAttribute("tabsrc");
+    toggleHead(el);
+    toggleBody(bodyid);
+    $G("alignment").style.display = "none";
+    $G("custom").style.display = "none";
+    //初始化颜色
+    domUtils.setStyle(cp, "background-color", domUtils.getComputedStyle(doc.body, "background-color"));
+    var color = domUtils.getComputedStyle(doc.body, "background-color");
+    if ((color && color != "#ffffff" && color != "transparent") || domUtils.getComputedStyle(doc.body, "background-image") != "none") {
+        setTimeout(function () {
+            document.getElementsByName("t")[1].click();
+        }, 200);
     }
-    if(this.ss.insertRule)
-        this.ss.insertRule(selector+"{"+styles+"}",0);
-    else if(this.ss.addRule)
-        this.ss.addRule(selector,styles,0);
+    initImgUrl();
+    initSelfPos();
+    initAlign();
 };
-Stylesheet.prototype.deleteRule = function(s){
-    if(!s){
-        var rules = this.getRules();
-        s = rules.length-1;
+//初始化自定义位置
+function initSelfPos() {
+    var x, y;
+    if (browser.ie) {
+        x = domUtils.getComputedStyle(doc.body, "background-position-x").replace(/50%|%|px|center/ig, "");
+        y = domUtils.getComputedStyle(doc.body, "background-position-y").replace(/50%|%|px|center/ig, "");
+    } else {
+        var arr = domUtils.getComputedStyle(doc.body, "background-position").match(/\s?(\d*)px/ig);
+        if (arr && arr.length) {
+            x = arr[0].replace("px", "");
+            y = arr[1].replace("px", "");
+        }
     }
-    if(typeof s!="number"){
-        s = s.toLowerCase();
-        var rules = this.getRules();
-        for(var i=rules.length-1;i>=0;i--){
-            if(rules[i].selectorText.toLowerCase()==s){
-                s = i;
-                break;
-            }
+    $G("x").value = x || 0;
+    $G("y").value = y || 0;
+}
+//初始化图片地址
+function initImgUrl() {
+    var su = domUtils.getComputedStyle(doc.body, "background-image"),
+        url = "";
+    if (su.indexOf(me.options.imagePath) > 0) {
+        url = su.match(/url\("?(.*[^\)"])"?/i);
+        if (url && url.length) {
+            url = url[1].substring(url[1].indexOf(me.options.imagePath), url[1].length);
         }
-        if(i==-1)return;
+    } else {
+        url = su != "none" ? su.replace(/url\("?|"?\)/ig, "") : "";
     }
-    if(this.ss.deleteRule)this.ss.deleteRule(s);
-    else if(this.ss.removeRule)this.ss.removeRule(s);
-};
+    $G("url").value = url;
+}
+//初始化定位
+function initAlign() {
+    var align = domUtils.getComputedStyle(doc.body, "background-repeat"),
+        alignType = $G("repeatType");
+    if (align == "no-repeat") {
+        var pos = domUtils.getComputedStyle(doc.body, browser.ie ? "background-position-x" : "background-position");
+        alignType.value = pos && pos.match(/\s?(\d*)px/ig) ? "self" : "center";
+        if (pos == "center") {
+            alignType.value = "center";
+        }
+        $G("custom").style.display = alignType.value == "self" ? "" : "none";
+    } else {
+        alignType.value = align;
+    }
+}
+    init();
+
 
 
 //获得选中的类型
-function getCheckIpt(){
+function getCheckIpt() {
     var ipts = document.getElementsByName("t");
-    for(var i=0,ipt;ipt=ipts[i++];){
-        if(ipt.checked){
+    for (var i = 0, ipt; ipt = ipts[i++];) {
+        if (ipt.checked) {
             return ipt.value;
         }
     }
 }
-var net = function(obj){
+var net = function (obj) {
     var align = $G("alignment"),
         url = $G("url"),
         custom = $G("custom");
-    if(obj.value == "none"){
+    if (obj.value == "none") {
         align.style.display = "none";
         custom.style.display = "none";
-        if ( browser.ie ) {
+        if (browser.ie) {
             url.onpropertychange = null;
-        }else{
-            url.removeEventListener("input",setBody);
+        } else {
+            url.removeEventListener("input", setBody);
         }
-    }else{
+    } else {
         bindSelfPos();
-        $G("repeatType").style.display="";
+        $G("repeatType").style.display = "";
         align.style.display = "";
-        if ( browser.ie ) {
+        if (browser.ie) {
             url.onpropertychange = setBody;
         } else {
-            url.addEventListener( "input", setBody, false );
+            url.addEventListener("input", setBody, false);
         }
     }
     setBody();
 };
 //给自定义位置绑定事件
-var bindSelfPos = function(){
+var bindSelfPos = function () {
     var x = $G("x"),
         y = $G("y");
-    domUtils.on(x,["propertychange","input","keydown"],function(evt){
-        bindkeydown(evt,this);
+    domUtils.on(x, ["propertychange", "input", "keydown"], function (evt) {
+        bindkeydown(evt, this);
     });
-    domUtils.on(y,["propertychange","input","keydown"],function(evt){
-        bindkeydown(evt,this);
+    domUtils.on(y, ["propertychange", "input", "keydown"], function (evt) {
+        bindkeydown(evt, this);
     });
-    function bindkeydown(evt,obj){
+    function bindkeydown(evt, obj) {
         evt = evt || event;
-        if(evt.keyCode==38||evt.keyCode==40){
-            obj.value = evt.keyCode == 38 ? parseInt(obj.value)+1 : parseInt(obj.value)-1;
-            if(obj.value<0){
+        if (evt.keyCode == 38 || evt.keyCode == 40) {
+            obj.value = evt.keyCode == 38 ? parseInt(obj.value) + 1 : parseInt(obj.value) - 1;
+            if (obj.value < 0) {
                 obj.value = 0;
             }
-        }else{
-            if(evt.keyCode<48&&evt.keyCode>57){
+        } else {
+            if (evt.keyCode < 48 && evt.keyCode > 57) {
                 domUtils.preventDefault(evt);
             }
         }
         setBody();
     }
 };
-var showAlign = function(){
+var showAlign = function () {
     $G("alignment").style.display = "";
 };
-var selectAlign = function(obj){
+var selectAlign = function (obj) {
     $G("custom").style.display = obj.value == "self" ? "" : "none";
     setBody();
 };
 //给body增加样式和背景图片
-var setBody=function(){
-    var color = domUtils.getStyle(cp,"background-color"),
+var setBody = function () {
+    var color = domUtils.getStyle(cp, "background-color"),
         bgimg = $G("url").value,
         align = $G("repeatType").value,
         alignObj = {
@@ -353,69 +305,44 @@ var setBody=function(){
             "background-position":"center center"
         },
         outstr = [];
-        if(color)
+    if (color)
         alignObj["background-color"] = color;
-        if(bgimg)
-        alignObj["background-image"] = 'url("'+bgimg+'")';
-        switch(align){
-            case "repeat-x":
-                alignObj["background-repeat"] = "repeat-x;";
-                break;
-            case "repeat-y":
-                alignObj["background-repeat"] = "repeat-y;";
-                break;
-            case "repeat":
-                alignObj["background-repeat"] = "repeat;";
-                break;
-            case "self":
-                alignObj["background-position"] = $G("x").value+"px "+$G("y").value+"px";
-                break;
-        }
-    for ( var name in alignObj ) {
-        if ( alignObj.hasOwnProperty( name ) ) {
-            outstr.push(name+":"+alignObj[name]);
-        }
+    if (bgimg)
+        alignObj["background-image"] = 'url("' + bgimg + '")';
+    switch (align) {
+        case "repeat-x":
+            alignObj["background-repeat"] = "repeat-x;";
+            break;
+        case "repeat-y":
+            alignObj["background-repeat"] = "repeat-y;";
+            break;
+        case "repeat":
+            alignObj["background-repeat"] = "repeat;";
+            break;
+        case "self":
+            alignObj["background-position"] = $G("x").value + "px " + $G("y").value + "px";
+            break;
     }
-    if(getCheckIpt()!="none"){
-        setStyleSheet(outstr.join(";"));
-    }else{
-        setStyleSheet(" ");
-    }
-};
-function getStyleSheet(){
-    bodyStyle = doc.getElementsByTagName("head")[0].lastChild;
-    if(/style/ig.test(bodyStyle.tagName)){
-        var len = doc.styleSheets.length-1;
-        var ss = new Stylesheet(len);
-        bkbodyStyle = ss.getStyleText(0);
-    }else{
-        bodyStyle = null;
+    for (var name in alignObj) {
+        if (alignObj.hasOwnProperty(name)) {
+            outstr.push(name + ":" + alignObj[name]);
+        }
     }
-}
+    if (getCheckIpt() != "none") {
+        utils.cssRule('body','body{' + outstr.join(";") + '}',doc);
 
-var setStyleSheet = function(stylestr){
-    if(bodyStyle){
-        var len = doc.styleSheets.length-1;
-        var ss = new Stylesheet(len);
-        ss.insertRule("body",stylestr);
-    }else{
-        if(browser.ie){
-            bodyStyle = doc.createStyleSheet();
-            bodyStyle.cssText = stylestr;
-        }else{
-            bodyStyle = domUtils.creElm(doc,"style",{"type":"text/css"});
-            bodyStyle.innerHTML = stylestr;
-            doc.head.appendChild(bodyStyle);
-        }
+    } else {
+
+        utils.cssRule('body','',doc)
     }
-    bkbodyStyle = bkbodyStyle||stylestr;
 };
-dialog.onok = function(){
+
+
+
+dialog.onok = function () {
     setBody();
 };
-dialog.oncancel = function(){
-        var len = doc.styleSheets.length-1;
-        var ss = new Stylesheet(len);
-        ss.insertRule("body",bkbodyStyle||" ");
+dialog.oncancel = function () {
+    utils.cssRule('body',bkbodyStyle,doc)
 };
-getStyleSheet();
+bkbodyStyle = utils.cssRule('body',undefined,doc);

+ 13 - 90
DjangoUeditor/static/UEditor/dialogs/emotion/emotion.css

@@ -27,94 +27,17 @@
     cursor:pointer;width:35px;height:35px;display:block;
 }
 
-.smileytable td {
-    height: 37px;
-}
-
-body{
-    padding:0;
-    margin:0;
-}
-#tabPanel{
-    float:none;
-    text-align:left;
-}
-#tabContent {
-    float:left;
-    background:#FFFFFF;<!--EAEAD1-->
-}
-#tabContent div{
-    display: none;
-    width:480px;
-    overflow:hidden;
-}
-#tabIconReview.show{
-    left:17px;
-    display:block;
-}
-.menuFocus{
-    background:#ACCD3C;
-}
-.menuDefault{
-    background:#FFFFFF;
-}
-#tabIconReview{
-    position:absolute;
-    left:406px;
-    left:398px \9;
-    top:41px;
-    z-index:65533;
-    width:90px;
-    height:76px;
+.smileytable td {height: 37px;}
+#tabPanel{margin-left:5px;overflow: hidden;}
+#tabContent {float:left;background:#FFFFFF;}
+#tabContent div{display: none;width:480px;overflow:hidden;}
+#tabIconReview.show{left:17px;display:block;}
+.menuFocus{background:#ACCD3C;}
+.menuDefault{background:#FFFFFF;}
+#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;}
+img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;}
 
-}
-img.review{
-    width:90px;
-    height:76px;
-    border:2px solid #9cb945;
-    background:#FFFFFF;
-    background-position:center;
-    background-repeat:no-repeat;
-}
-
-.neweditor-tab{
-    position:relative;
-}
-.neweditor-tab .neweditor-tab-h{
-    float:left;
-    padding-left:5px;
-    margin-bottom:-1px;
-    position:relative;
-    z-index:1000;
-}
-.neweditor-tab .neweditor-tab-h div{
-    border-left:1px solid #c1c1c1;
-    border-top:1px solid #c1c1c1;
-    border-right:1px solid #c1c1c1;
-    margin:2px 0 0 3px;
-    float:left;
-    font-size:14px;
-    padding:5px 8px 3px;
-    line-height:16px;
-    background:url("images/neweditor-tab-bg.png") repeat-x 0 0;
-    cursor:pointer;
-}
-.neweditor-tab .neweditor-tab-h .on{
-    font-weight:bold;
-    padding:7px 8px 2px;
-    margin:0 0 0 3px;
-    border-bottom:1px solid #fff;
-    background:none;
-}
-.neweditor-tab .neweditor-tab-b{
-    position:relative;
-    float:left;
-    border-top:1px solid #c1c1c1;
-    clear:both;
-    margin:0;
-    padding:10px;
-}
-.neweditor-tab .neweditor-tab-b div{
-    border:4px solid #F2F2F2;
-    margin:0px 3px;
-}
+.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;}
+.tabbody table{width: 100%;}
+.tabbody td{border:1px solid #BAC498;}
+.tabbody td span{display: block;zoom:1;padding:0 4px;}

+ 11 - 11
DjangoUeditor/static/UEditor/dialogs/emotion/emotion.html

@@ -4,20 +4,21 @@
     <title></title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="robots" content="noindex, nofollow"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <link rel="stylesheet" type="text/css" href="emotion.css">
 </head>
 <body>
-<div id="tabPanel" class="neweditor-tab">
-    <div id="tabMenu" class="neweditor-tab-h">
-        <div><var id="lang_input_choice"></var></div>
-        <div><var id="lang_input_Tuzki"></var></div>
-        <div><var id="lang_input_lvdouwa"></var></div>
-        <div><var id="lang_input_BOBO"></var></div>
-        <div><var id="lang_input_babyCat"></var></div>
-        <div><var id="lang_input_bubble"></var></div>
-        <div><var id="lang_input_youa"></var></div>
+<div id="tabPanel" class="wrapper">
+    <div id="tabHeads" class="tabhead">
+        <span><var id="lang_input_choice"></var></span>
+        <span><var id="lang_input_Tuzki"></var></span>
+        <span><var id="lang_input_lvdouwa"></var></span>
+        <span><var id="lang_input_BOBO"></var></span>
+        <span><var id="lang_input_babyCat"></var></span>
+        <span><var id="lang_input_bubble"></var></span>
+        <span><var id="lang_input_youa"></var></span>
     </div>
-    <div id="tabContent" class="neweditor-tab-b">
+    <div id="tabBodys" class="tabbody">
         <div id="tab0"></div>
         <div id="tab1"></div>
         <div id="tab2"></div>
@@ -30,7 +31,6 @@
 <div id="tabIconReview">
     <img id='faceReview' class='review'/>
 </div>
-<script type="text/javascript" src="../internal.js"></script>
 <script type="text/javascript" src="emotion.js"></script>
 <script type="text/javascript">
     var emotion = {

+ 15 - 15
DjangoUeditor/static/UEditor/dialogs/emotion/emotion.js

@@ -8,7 +8,7 @@ window.onload = function () {
     emotion.tabExist = createArr( emotion.tabNum );
 
     initImgName();
-    initEvtHandler( "tabMenu" );
+    initEvtHandler( "tabHeads" );
 };
 
 function initImgName() {
@@ -28,9 +28,9 @@ function initImgName() {
 }
 
 function initEvtHandler( conId ) {
-    var tabMenu = $G( conId );
-    for ( var i = 0, j = 0; i < tabMenu.childNodes.length; i++ ) {
-        var tabObj = tabMenu.childNodes[i];
+    var tabHeads = $G( conId );
+    for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) {
+        var tabObj = tabHeads.childNodes[i];
         if ( tabObj.nodeType == 1 ) {
             domUtils.on( tabObj, "click", (function ( index ) {
                 return function () {
@@ -63,17 +63,17 @@ function switchTab( index ) {
         createTab( 'tab' + index );
     }
     //获取呈现元素句柄数组
-    var tabMenu = $G( "tabMenu" ).getElementsByTagName( "div" ),
-            tabContent = $G( "tabContent" ).getElementsByTagName( "div" ),
-            i = 0, L = tabMenu.length;
+    var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ),
+            tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ),
+            i = 0, L = tabHeads.length;
     //隐藏所有呈现元素
     for ( ; i < L; i++ ) {
-        tabMenu[i].className = "";
-        tabContent[i].style.display = "none";
+        tabHeads[i].className = "";
+        tabBodys[i].style.display = "none";
     }
     //显示对应呈现元素
-    tabMenu[index].className = "on";
-    tabContent[index].style.display = "block";
+    tabHeads[index].className = "focus";
+    tabBodys[index].style.display = "block";
 }
 
 function autoHeight( index ) {
@@ -123,7 +123,7 @@ function createTab( tabName ) {
             iColWidth = 3, //表格剩余空间的显示比例
             tableCss = emotion.imageCss[tabName],
             cssOffset = emotion.imageCssOffset[tabName],
-            textHTML = ['<table class="smileytable" cellpadding="1" cellspacing="0" align="center" style="border-collapse:collapse;" border="1" bordercolor="#BAC498" width="100%">'],
+            textHTML = ['<table class="smileytable">'],
             i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
             sUrl, realUrl, posflag, offset, infor;
 
@@ -138,8 +138,8 @@ function createTab( tabName ) {
                 offset = cssOffset * i * (-1) - 1;
                 infor = emotion.SmileyInfor[tabName][i];
 
-                textHTML.push( '<td  class="' + tableCss + '"   border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center"  bgcolor="#FFFFFF" onclick="InsertSmiley(\'' + realUrl.replace( /'/g, "\\'" ) + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">' );
-                textHTML.push( '<span  style="display:block;">' );
+                textHTML.push( '<td  class="' + tableCss + '"   border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center"  bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace( /'/g, "\\'" ) + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">' );
+                textHTML.push( '<span>' );
                 textHTML.push( '<img  style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' );
                 textHTML.push( '</span>' );
             } else {
@@ -162,7 +162,7 @@ function over( td, srcPath, posFlag ) {
 }
 
 function out( td ) {
-    td.style.backgroundColor = "#FFFFFF";
+    td.style.backgroundColor = "transparent";
     var tabIconRevew = $G( "tabIconReview" );
     tabIconRevew.className = "";
     tabIconRevew.style.display = 'none';

+ 12 - 20
DjangoUeditor/static/UEditor/dialogs/gmap/gmap.html

@@ -4,23 +4,14 @@
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title></title>
-    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
+    <script type="text/javascript" src="../internal.js"></script>
     <style type="text/css">
-        *{color: #838383}
-        body {
-            font-size: 12px;
-            width:540px;
-            height: 350px;
-            overflow: hidden;
-            margin:0;padding:0;
-
-        }
-        .content{padding: 9px 0 0 15px;height:100%;}
-        .content table tr{height: 30px; line-height: 30px;}
-         #address{width:220px;height:21px;background: #FFF;border:1px solid #d7d7d7; line-height: 21px;}
-         a.doSearch{display:block;text-align:center;line-height:24px; text-decoration: none;height:24px;width:95px;border: 0;background:url(../../themes/default/images/icons-all.gif)  no-repeat;}
-         a.doSearch:hover{background-position: 0 -30px;}
+        .content{width:530px; height: 350px;margin: 10px auto;}
+        .content table{width: 100%}
+        .content table td{vertical-align: middle;}
+        #address{width:220px;height:21px;background: #FFF;border:1px solid #d7d7d7; line-height: 21px;}
     </style>
+    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
 </head>
 <body>
 <div class="content">
@@ -28,14 +19,13 @@
         <tr>
             <td><label for="address"><var id="lang_input_address"></var></label></td>
             <td><input id="address" type="text" /></td>
-            <td><a id="doSearch" href="javascript:void(0)" class="doSearch"><var id="lang_input_search"></var></a></td>
+            <td><a id="doSearch" href="javascript:void(0)" class="button"><var id="lang_input_search"></var></a></td>
         </tr>
     </table>
-    <div id="container" style="width: 520px; height: 340px; border: 1px solid gray;"></div>
+    <div id="container" style="width: 100%; height: 340px;margin: 5px auto; border: 1px solid gray;"></div>
 </div>
-<script type="text/javascript" src="../internal.js"></script>
 <script type="text/javascript">
-    utils.domReady(function(){
+    domUtils.on(window,"load",function(){
         var map = new google.maps.Map(document.getElementById('container'), {
                 zoom: 3,
                 streetViewControl: false,
@@ -88,7 +78,9 @@
                 marker.setPosition(new google.maps.LatLng(Number(centers[0]),Number(centers[1])));
                 imgcss = img.style.cssText;
             }else{
-                doSearch();
+                setTimeout(function(){
+                    doSearch();
+                },30)
             }
     });
 

+ 7 - 0
DjangoUeditor/static/UEditor/dialogs/help/help.css

@@ -0,0 +1,7 @@
+.wrapper{width: 370px;margin: 10px auto;zoom: 1;}
+.tabbody{height: 360px;}
+.tabbody .panel{width:100%;height: 360px;position: absolute;background: #fff;}
+.tabbody .panel h1{font-size:26px;margin: 5px 0 0 5px;}
+.tabbody .panel p{font-size:12px;margin: 5px 0 0 5px;}
+.tabbody table{width:90%;line-height: 20px;margin: 5px 0 0 5px;;}
+.tabbody table thead{font-weight: bold;line-height: 25px;}

+ 17 - 93
DjangoUeditor/static/UEditor/dialogs/help/help.html

@@ -4,53 +4,22 @@
 <head>
     <title>帮助</title>
     <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
-    <style type="text/css">
-        .head .tab-current{
-            background-color:#7DEBFF;
-        }
-        .hide{
-            display:none;
-        }
-        *{color: #838383}
-        body {
-
-            font-size: 12px;
-            width:380px;
-            height: 400px;
-            overflow: hidden;
-            margin:0px;padding:0px;
-        }
-        .warp{
-            padding: 39px 0px 0px 15px;
-            height:90%;position:relative;
-        }
-        h1{font-size:26px;}
-        p{font-size:12px;}
-        .head{position:absolute;height:31px;top:10px;}
-        .content{height:360px;border: 1px solid #ddd;clear:both;padding:5px;overflow: auto;}
-
-        .head span{width:92px;height:29px;line-height:29px;background:red;display:block;float: left;text-align: center;margin-right: 1px;cursor: pointer; }
-        .head span.def{background:url("../../themes/default/images/dialog-title-bg.png") repeat-x;border:1px solid #ccc;}
-        .head span.act{background:#FFF;border:1px solid #ccc;border-bottom: 1px solid #FFF}
-        .content table{width:90%;line-height: 20px}
-        .content table thead{font-weight: bold;line-height: 25px;}
-    </style>
+    <script type="text/javascript" src="../internal.js"></script>
+    <link rel="stylesheet" type="text/css" href="help.css">
 </head>
 <body>
-<div class="warp">
-    <div id="head" class="head">
-        <span class="act" onclick="toggle(0)"><var id="lang_input_about"></var></span>
-        <span class="def" onclick="toggle(1)"><var id="lang_input_shortcuts"></var></span>
+<div class="wrapper" id="helptab">
+    <div id="tabHeads" class="tabhead">
+        <span class="focus" tabsrc="about"><var id="lang_input_about"></var></span>
+        <span tabsrc="shortcuts"><var id="lang_input_shortcuts"></var></span>
     </div>
-    <div class="content">
-        <div id="cont0">
-
-<h1>UEditor</h1>
-<p><var id="lang_input_version"></var></p>
-<p><var id="lang_input_introduction"></var></p>
-
+    <div id="tabBodys" class="tabbody">
+        <div id="about" class="panel">
+            <h1>UEditor</h1>
+            <p><var id="lang_input_version"></var></p>
+            <p><var id="lang_input_introduction"></var></p>
         </div>
-        <div id="cont1" class="hide">
+        <div id="shortcuts" class="panel">
             <table>
                 <thead>
                 <tr>
@@ -95,64 +64,19 @@
                     <td>ctrl+a</td>
                     <td><var id="lang_Txt_selectAll"></var></td>
                 </tr>
-                <tr>
-                    <td>ctrl+shift+c</td>
-                    <td><var id="lang_Txt_removeFormat"></var></td>
-                </tr>
-                <tr>
-                    <td>ctrl+shift+l</td>
-                    <td><var id="lang_Txt_leftJustification"></var></td>
-                </tr>
-                <tr>
-                    <td>ctrl+shift+r</td>
-                    <td><var id="lang_Txt_rightJustification"></var></td>
-                </tr>
                 <tr>
                     <td>shift+enter</td>
                     <td><var id="lang_Txt_visualEnter"></var></td>
                 </tr>
+                <tr>
+                    <td>alt+z</td>
+                    <td><var id="lang_Txt_fullscreen"></var></td>
+                </tr>
                 </tbody>
             </table>
         </div>
     </div>
 </div>
-<script type="text/javascript" src="../internal.js"></script>
-<script type="text/javascript">
-    function getChildrenByClassName (parentClass,childtag){
-        var divs = document.getElementsByTagName("div"),
-            headChilds,
-            arr = [];
-        for(var i=0;i<divs.length;i++){
-            if(divs[i].className == parentClass){
-                headChilds = divs[i].childNodes;
-            }
-        }
-        for(var j=0;j<headChilds.length;j++){
-            if(new RegExp(childtag,"i").test(headChilds[j].tagName)){
-                arr.push(headChilds[j]);
-            }
-        }
-        return arr;
-    }
-     function hideAll (){
-        var tabs = getChildrenByClassName("head","span"),
-            contents = getChildrenByClassName("content","div"),i=0;
-        for(;i<tabs.length;i++){
-            tabs[i].className = "";
-            contents[i].className = "hide";
-        }
-     }
-    function toggle (i){
-        hideAll();
-        var tabs = getChildrenByClassName("head","span"),
-            contents = getChildrenByClassName("content","div");
-          for(var s=0;s<tabs.length;s++){
-             tabs[s].className = "def";
-          }
-
-        tabs[i].className = "act";
-        contents[i].className = "";
-    }
-</script>
+<script type="text/javascript" src="help.js"></script>
 </body>
 </html>

+ 54 - 0
DjangoUeditor/static/UEditor/dialogs/help/help.js

@@ -0,0 +1,54 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-9-26
+ * Time: 下午1:06
+ * To change this template use File | Settings | File Templates.
+ */
+/**
+ * tab点击处理事件
+ * @param tabHeads
+ * @param tabBodys
+ * @param obj
+ */
+function clickHandler( tabHeads,tabBodys,obj ) {
+    //head样式更改
+    for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
+        tabHeads[k].className = "";
+    }
+    obj.className = "focus";
+    //body显隐
+    var tabSrc = obj.getAttribute( "tabSrc" );
+    for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
+        var body = tabBodys[j],
+            id = body.getAttribute( "id" );
+        body.onclick = function(){
+            this.style.zoom = 1;
+        };
+        if ( id != tabSrc ) {
+            body.style.zIndex = 1;
+        } else {
+            body.style.zIndex = 200;
+        }
+    }
+
+}
+
+/**
+ * TAB切换
+ * @param tabParentId  tab的父节点ID或者对象本身
+ */
+function switchTab( tabParentId ) {
+    var tabElements = $G( tabParentId ).children,
+        tabHeads = tabElements[0].children,
+        tabBodys = tabElements[1].children;
+
+    for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
+        var head = tabHeads[i];
+        if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
+        head.onclick = function () {
+            clickHandler(tabHeads,tabBodys,this);
+        }
+    }
+}
+switchTab("helptab");

+ 1 - 1
DjangoUeditor/static/UEditor/dialogs/highlightcode/highlightcode.html

@@ -4,6 +4,7 @@
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
         <title></title>
+        <script type="text/javascript" src="../internal.js"></script>
         <style type="text/css">
             html,body{
                 _overflow:hidden;
@@ -46,7 +47,6 @@
         </p>
         <label for="code"></label><textarea id="code" cols="" rows=""></textarea>
     </div>
-    <script type="text/javascript" src="../internal.js"></script>
         <script type="text/javascript">
             var sels = $G("language"),
                 code = $G('code');

+ 17 - 20
DjangoUeditor/static/UEditor/dialogs/image/image.css

@@ -1,22 +1,8 @@
 @charset "utf-8";
-*{ padding: 0;margin: 0}
-body{font-size: 12px;color: #888;overflow: hidden;}
-.wrapper{ width: 640px;margin: 0 auto; overflow: auto; zoom:1;position: relative;padding: 10px 0}
-#tabHeads{position: relative; width:610px;padding-left:9px;z-index: 10;}
-#tabHeads span{
-    display:inline-block;
-    width: 82px;
-    height:30px;
-    text-align: center;
-    cursor: pointer;
-    line-height: 30px;
-    *margin-right: 5px;
-    border: 1px solid #ccc;
-    background:url("../../themes/default/images/dialog-title-bg.png") repeat-x;
-}
-#tabHeads span.focus{ border-bottom: none; height: 31px;background-color: #fff;}
-#tabBodys{ border: 1px solid #ccc; width:620px;height:325px;_height:328px;margin: 0 auto;position: relative;top:-1px;}
-.panel { position: absolute; width: 620px;height:325px;background: #fff;}
+.wrapper{ width: 623px;margin: 10px auto;zoom:1;position: relative;}
+.tabbody{ height:325px;_height:330px;}/*tab样式框大小*/
+.panel { position: absolute;width:100%; height:100%;background: #fff;}
+
 #remote{ z-index: 200;}
 #remote table{border-collapse: collapse;width: 620px; height: 300px; margin-top: 5px;}
 #remote td.label{text-align: center;width: 80px; }
@@ -36,9 +22,20 @@ td input {
     height: 40px;
     top: 68px;
     left: 260px;
-    background: url("../../themes/default/images/lock.gif") -2px -3px no-repeat;
+    background: url("../../themes/default/images/lock.gif") 3px -4px no-repeat;
     line-height: 40px;
-    padding-top:13px;
+    padding-top:10px;
+}
+.saveDir{
+    /*width: 132px;*/
+    /*text-align: right;*/
+    height: 40px;
+    line-height: 40px;
+    margin-left: 30px;
+    float: left;
+}
+.saveDir select{
+    height: 30px;
 }
 #duiqi{ width: 62px; height: 38px;float: left}
 #remoteFloat div,#localFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin-left:1px;width:38px;height:36px;float:left;}

+ 47 - 9
DjangoUeditor/static/UEditor/dialogs/image/image.html

@@ -4,18 +4,19 @@
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <link rel="stylesheet" href="image.css" type="text/css" />
 </head>
 <body>
     <div class="wrapper">
         <div id="imageTab">
-            <div id="tabHeads">
-                <span tabSrc="remote"><var id="lang_tab_remote"></var></span>
-                <span tabSrc="local" class="focus"><var id="lang_tab_local"></var></span>
+            <div id="tabHeads" class="tabhead">
+                <span tabSrc="remote"  class="focus"><var id="lang_tab_remote"></var></span>
+                <span tabSrc="local"><var id="lang_tab_local"></var></span>
                 <span tabSrc="imgManager"><var id="lang_tab_imgManager"></var></span>
                 <span tabSrc="imgSearch"><var id="lang_tab_imgSearch"></var></span>
             </div>
-            <div id="tabBodys">
+            <div id="tabBodys" class="tabbody">
                 <div id="remote" class="panel">
                     <table cellpadding="0" cellspacing="0">
                         <tr>
@@ -54,6 +55,13 @@
                 <div id="local" class="panel">
                     <div id="flashContainer"></div>
                     <div><div id="upload" style="display: none" ></div><div id="duiqi"></div><div id="localFloat"></div></div>
+
+                    <div class="saveDir">
+                        <var id="lang_savePath" ></var>:<select id="savePath">
+                            <option value="1">upload</option>
+                            <option value="2">upload1</option>
+                        </select>
+                    </div>
                 </div>
                 <div id="imgManager" class="panel">
                     <div id="imageList"><var id="lang_imgLoading"></var></div>
@@ -81,7 +89,6 @@
             </div>
         </div>
     </div>
-    <script type="text/javascript" src="../internal.js"></script>
     <script type="text/javascript" src="../tangram.js"></script>
     <script type="text/javascript" src="image.js"></script>
 
@@ -120,12 +127,22 @@
             var callbacks = {
                 // 选择文件的回调
                 selectFileCallback: function(selectFiles){
+                    utils.each(selectFiles,function(file){
+                        var tmp = {};
+                        tmp.id = file.index;
+                        tmp.data = {};
+                        postConfig.push(tmp);
+                    });
                     selectedImageCount += selectFiles.length;
                     if(selectedImageCount) baidu.g("upload").style.display = "";
                     dialog.buttons[0].setDisabled(true); //初始化时置灰确定按钮
                 },
                 // 删除文件的回调
                 deleteFileCallback: function(delFiles){
+                    for(var i = 0,len = delFiles.length;i<len;i++){
+                        var index = delFiles[i].index;
+                        postConfig.splice(index,1);
+                    }
                     selectedImageCount -= delFiles.length;
                     if (!selectedImageCount) {
                         baidu.g("upload").style.display = "none";
@@ -145,21 +162,42 @@
                 // 单个文件上传失败的回调,
                 uploadErrorCallback: function (data){
                     if(!data.info){
-                        alert(lang.netError)
+                        alert(lang.netError);
                     }
                     //console && console.log(data);
                 },
                 // 全部上传完成时的回调
                 allCompleteCallback: function(){
                     dialog.buttons[0].setDisabled(false);    //上传完毕后点亮按钮
-                }
+                },
                 // 文件超出限制的最大体积时的回调
                 //exceedFileCallback: 'exceedFileCallback',
                 // 开始上传某个文件时的回调
-                //startUploadCallback: startUploadCallback
+                startUploadCallback: function(){
+                    var config = postConfig.shift();
+                    //也可以在这里更改
+                    //if(config.id==2){ //设置第三张图片的对应参数
+                    //     config.data={"myParam":"value"}
+                    // }
+                    flashObj.addCustomizedParams(config.id,config.data);
+                }
             };
             imageUploader.init(flashOptions,callbacks);
-            
+            $G("upload").onclick = function () {
+                /**
+                 * 接口imageUploader.setPostParams()可以在提交时设置本次上传提交的参数(包括所有图片)
+                 * 参数为json对象{"key1":"value1","key2":"value2"},其中key即为向后台post提交的name,value即为值。
+                 * 其中有一个特殊的保留key值为action,若设置,可以更改本次提交的处理地址
+                 */
+                var postParams = {
+                    "dir":baidu.g("savePath").value
+                };
+                imageUploader.setPostParams(postParams);
+                flashObj.upload();
+                this.style.display = "none";
+                $G("savePath").parentNode.style.display = "none";
+            };
+
         });
     </script>
 </body>

+ 292 - 279
DjangoUeditor/static/UEditor/dialogs/image/image.js

@@ -5,92 +5,103 @@
  * Time: 下午2:52
  * To change this template use File | Settings | File Templates.
  */
-var imageUploader = {};
+var imageUploader = {},
+    flashObj = null,
+    postConfig=[];
 (function () {
     var g = $G,
-            ajax = parent.baidu.editor.ajax,
-            maskIframe = g( "maskIframe" ), //tab遮罩层,用来解决flash和其他dom元素的z-index层级不一致问题
-            flashObj;               //flash上传对象
-
-    var flagImg = null,flashContainer;
-    imageUploader.init = function ( opt, callbacks ) {
-        switchTab( "imageTab" );
-        createAlignButton( ["remoteFloat", "localFloat"] );
-        createFlash( opt, callbacks );
+        ajax = parent.baidu.editor.ajax,
+        maskIframe = g("maskIframe"); //tab遮罩层,用来解决flash和其他dom元素的z-index层级不一致问题
+       // flashObj;                   //flash上传对象
+
+    var flagImg = null, flashContainer;
+    imageUploader.init = function (opt, callbacks) {
+        switchTab("imageTab");
+        createAlignButton(["remoteFloat", "localFloat"]);
+        createFlash(opt, callbacks);
         var srcImg = editor.selection.getRange().getClosedNode();
-        if ( srcImg ) {
-            showImageInfo( srcImg );
-            showPreviewImage( srcImg, true );
-            var tabElements = g( "imageTab" ).children,
-                            tabHeads = tabElements[0].children,
-                            tabBodys = tabElements[1].children;
-            for(var i=0,ci;ci = tabHeads[i++];){
-                if(ci.getAttribute("tabSrc")=="remote"){
-                    clickHandler(tabHeads,tabBodys,ci);
+        if (srcImg) {
+            showImageInfo(srcImg);
+            showPreviewImage(srcImg, true);
+            var tabElements = g("imageTab").children,
+                tabHeads = tabElements[0].children,
+                tabBodys = tabElements[1].children;
+            for (var i = 0, ci; ci = tabHeads[i++];) {
+                if (ci.getAttribute("tabSrc") == "remote") {
+                    clickHandler(tabHeads, tabBodys, ci);
                 }
             }
 
         }
         addUrlChangeListener();
-        addUploadListener();
         addOKListener();
         addScrollListener();
         addSearchListener();
-        $focus( g( "url" ) );
+        $focus(g("url"));
+    };
+    imageUploader.setPostParams = function(obj,index){
+        if(index===undefined){
+            utils.each(postConfig,function(config){
+                config.data = obj;
+            })
+        }else{
+            postConfig[index].data = obj;
+        }
     };
 
-    function insertImage(imgObjs){
-        editor.fireEvent('beforeInsertImage',imgObjs);
-        editor.execCommand( "insertImage", imgObjs );
+    function insertImage(imgObjs) {
+        editor.fireEvent('beforeInsertImage', imgObjs);
+        editor.execCommand("insertImage", imgObjs);
     }
+
     function searchImage() {
-        var imgSearchInput = $G( "imgSearchTxt" );
-        if ( !imgSearchInput.getAttribute( "hasClick" ) || !imgSearchInput.value ) {
-            selectTxt( imgSearchInput );
+        var imgSearchInput = $G("imgSearchTxt");
+        if (!imgSearchInput.getAttribute("hasClick") || !imgSearchInput.value) {
+            selectTxt(imgSearchInput);
             return;
         }
-        g( "searchList" ).innerHTML = "<p class='msg'>" + lang.imageLoading + "</p>";
+        g("searchList").innerHTML = "<p class='msg'>" + lang.imageLoading + "</p>";
         var key = imgSearchInput.value,
-                type = $G( "imgType" ).value,
-                url = "http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&st=-1&tn=baiduimagejson&istype=2&rn=32&fm=index&pv=&word=" + encodeToGb2312( key ) + type + "&" + +new Date;
-        var reqCallBack = function ( data ) {
+            type = $G("imgType").value,
+            url = "http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&st=-1&tn=baiduimagejson&istype=2&rn=32&fm=index&pv=&word=" + encodeToGb2312(key) + type + "&" + +new Date;
+        var reqCallBack = function (data) {
             try {
                 var imgObjs = data.data;
-            } catch ( e ) {
+            } catch (e) {
                 return;
             }
             var frg = document.createDocumentFragment();
-            if ( imgObjs.length < 2 ) {
-                g( "searchList" ).innerHTML = "<p class='msg'>"+lang.tryAgain+"</p>";
+            if (imgObjs.length < 2) {
+                g("searchList").innerHTML = "<p class='msg'>" + lang.tryAgain + "</p>";
                 return;
             }
-            for ( var i = 0, len = imgObjs.length; i < len - 1; i++ ) {
-                var img = document.createElement( "img" ), obj = imgObjs[i], div = document.createElement( "div" );
+            for (var i = 0, len = imgObjs.length; i < len - 1; i++) {
+                var img = document.createElement("img"), obj = imgObjs[i], div = document.createElement("div");
                 img.src = obj.objURL; //obj.thumbURL 为缩略图,只能针对百度内部使用
-                img.setAttribute( "sourceUrl", obj.objURL );
-                var title = obj.fromPageTitleEnc.replace( /^\.\.\./i, "" );
-                img.setAttribute( "title", lang.toggleSelect + obj.width + "X" + obj.height );
+                img.setAttribute("sourceUrl", obj.objURL);
+                var title = obj.fromPageTitleEnc.replace(/^\.\.\./i, "");
+                img.setAttribute("title", lang.toggleSelect + obj.width + "X" + obj.height);
                 img.onclick = function () {
-                    changeSelected( this );
+                    changeSelected(this);
                 };
-                scale( img, 100, obj.width, obj.height );
-                div.appendChild( img );
-                var p = document.createElement( "p" );
+                scale(img, 100, obj.width, obj.height);
+                div.appendChild(img);
+                var p = document.createElement("p");
                 p.innerHTML = "<a target='_blank' href='" + obj.fromURL + "'>" + title + "</a>";
-                div.appendChild( p );
+                div.appendChild(p);
                 //setTimeout(function(){
-                frg.appendChild( div );
+                frg.appendChild(div);
                 //},0);
 
             }
-            g( "searchList" ).innerHTML = "";
-            g( "searchList" ).appendChild( frg );
+            g("searchList").innerHTML = "";
+            g("searchList").appendChild(frg);
         };
-        baidu.sio.callByServer( url, reqCallBack, {charset:"GB18030"} );
+        baidu.sio.callByServer(url, reqCallBack, {charset:"GB18030"});
     }
 
-    function selectTxt( node ) {
-        if ( node.select ) {
+    function selectTxt(node) {
+        if (node.select) {
             node.select();
         } else {
             var r = node.createTextRange && node.createTextRange();
@@ -99,36 +110,36 @@ var imageUploader = {};
     }
 
     function addSearchListener() {
-        g( "imgSearchTxt" ).onclick = function () {
-            selectTxt( this );
-            this.setAttribute( "hasClick", true );
-            if ( this.value == lang.searchInitInfo ) {
+        g("imgSearchTxt").onclick = function () {
+            selectTxt(this);
+            this.setAttribute("hasClick", true);
+            if (this.value == lang.searchInitInfo) {
                 this.value = "";
             }
         };
-        g( "imgSearchTxt" ).onkeyup = function () {
-            this.setAttribute( "hasClick", true );
+        g("imgSearchTxt").onkeyup = function () {
+            this.setAttribute("hasClick", true);
             //只触发一次
             this.onkeyup = null;
         };
 
-        g( "imgSearchBtn" ).onclick = function () {
+        g("imgSearchBtn").onclick = function () {
             searchImage();
         };
-        g( "imgSearchReset" ).onclick = function () {
-            var txt = g( "imgSearchTxt" );
+        g("imgSearchReset").onclick = function () {
+            var txt = g("imgSearchTxt");
             txt.value = "";
             txt.focus();
-            g( "searchList" ).innerHTML = "";
+            g("searchList").innerHTML = "";
         };
-        g( "imgType" ).onchange = function () {
+        g("imgType").onchange = function () {
             searchImage();
         };
-        domUtils.on( g( "imgSearchTxt" ), "keyup", function ( evt ) {
-            if ( evt.keyCode == 13 ) {
+        domUtils.on(g("imgSearchTxt"), "keyup", function (evt) {
+            if (evt.keyCode == 13) {
                 searchImage();
             }
-        } )
+        })
 
     }
 
@@ -137,15 +148,15 @@ var imageUploader = {};
      */
     function addScrollListener() {
 
-        g( "imageList" ).onscroll = function () {
-            var imgs = this.getElementsByTagName( "img" ),
-                    top = Math.ceil( this.scrollTop / 100 ) - 1;
+        g("imageList").onscroll = function () {
+            var imgs = this.getElementsByTagName("img"),
+                top = Math.ceil(this.scrollTop / 100) - 1;
             top = top < 0 ? 0 : top;
-            for ( var i = top * 5; i < (top + 5) * 5; i++ ) {
+            for (var i = top * 5; i < (top + 5) * 5; i++) {
                 var img = imgs[i];
-                if ( img && !img.getAttribute( "src" ) ) {
-                    img.src = img.getAttribute( "lazy_src" );
-                    img.removeAttribute( "lazy_src" );
+                if (img && !img.getAttribute("src")) {
+                    img.src = img.getAttribute("lazy_src");
+                    img.removeAttribute("lazy_src");
                 }
             }
         }
@@ -156,8 +167,8 @@ var imageUploader = {};
      */
     function addOKListener() {
         dialog.onok = function () {
-            var currentTab = findFocus( "tabHeads", "tabSrc" );
-            switch ( currentTab ) {
+            var currentTab = findFocus("tabHeads", "tabSrc");
+            switch (currentTab) {
                 case "remote":
                     return insertSingle();
                     break;
@@ -165,19 +176,19 @@ var imageUploader = {};
                     return insertBatch();
                     break;
                 case "imgManager":
-                    return insertSearch( "imageList" );
+                    return insertSearch("imageList");
                     break;
                 case "imgSearch":
-                    return insertSearch( "searchList", true );
+                    return insertSearch("searchList", true);
                     break;
             }
         };
-        dialog.oncancel = function(){
+        dialog.oncancel = function () {
             hideFlash();
         }
     }
 
-    function hideFlash(){
+    function hideFlash() {
         flashObj = null;
         flashContainer.innerHTML = "";
     }
@@ -187,18 +198,18 @@ var imageUploader = {};
      * @param id
      * @param catchRemote  是否需要替换远程图片
      */
-    function insertSearch( id, catchRemote ) {
-        var imgs = $G( id ).getElementsByTagName( "img" ), imgObjs = [];
-        for ( var i = 0, ci; ci = imgs[i++]; ) {
-            if ( ci.getAttribute( "selected" ) ) {
-                var url = ci.getAttribute( "src", 2 ).replace( /(\s*$)/g, "" ), img = {};
+    function insertSearch(id, catchRemote) {
+        var imgs = $G(id).getElementsByTagName("img"), imgObjs = [];
+        for (var i = 0, ci; ci = imgs[i++];) {
+            if (ci.getAttribute("selected")) {
+                var url = ci.getAttribute("src", 2).replace(/(\s*$)/g, ""), img = {};
                 img.src = url;
                 img.data_ue_src = url;
-                imgObjs.push( img );
+                imgObjs.push(img);
             }
         }
         insertImage(imgObjs);
-        catchRemote && editor.fireEvent( "catchRemoteImage" );
+        catchRemote && editor.fireEvent("catchRemoteImage");
         hideFlash();
     }
 
@@ -206,17 +217,17 @@ var imageUploader = {};
      * 插入单张图片
      */
     function insertSingle() {
-        var url = g( "url" ),
-                width = g( "width" ),
-                height = g( "height" ),
-                border = g( "border" ),
-                vhSpace = g( "vhSpace" ),
-                title = g( "title" ),
-                align = findFocus( "remoteFloat", "name" ),
-                imgObj = {};
-        if ( !url.value ) return;
-        if ( !flagImg ) return;   //粘贴地址后如果没有生成对应的预览图,可以认为本次粘贴地址失败
-        if ( !checkNum( [width, height, border, vhSpace] ) ) return false;
+        var url = g("url"),
+            width = g("width"),
+            height = g("height"),
+            border = g("border"),
+            vhSpace = g("vhSpace"),
+            title = g("title"),
+            align = findFocus("remoteFloat", "name"),
+            imgObj = {};
+        if (!url.value) return;
+        if (!flagImg) return;   //粘贴地址后如果没有生成对应的预览图,可以认为本次粘贴地址失败
+        if (!checkNum([width, height, border, vhSpace])) return false;
         imgObj.src = url.value;
         imgObj.data_ue_src = url.value;
         imgObj.width = width.value;
@@ -227,7 +238,7 @@ var imageUploader = {};
         imgObj.title = title.value;
         imgObj.style = "width:" + width.value + "px;height:" + height.value + "px;";
         insertImage(imgObj);
-        editor.fireEvent( "catchRemoteImage" );
+        editor.fireEvent("catchRemoteImage");
         hideFlash();
     }
 
@@ -235,9 +246,9 @@ var imageUploader = {};
      * 检测传入的所有input框中输入的长宽是否是正数
      * @param nodes input框集合,
      */
-    function checkNum( nodes ) {
-        for ( var i = 0, ci; ci = nodes[i++]; ) {
-            if ( !isNumber( ci.value ) || ci.value < 0 ) {
+    function checkNum(nodes) {
+        for (var i = 0, ci; ci = nodes[i++];) {
+            if (!isNumber(ci.value) || ci.value < 0) {
                 alert(lang.numError);
                 ci.value = "";
                 ci.focus();
@@ -251,25 +262,25 @@ var imageUploader = {};
      * 数字判断
      * @param value
      */
-    function isNumber( value ) {
-        return /(0|^[1-9]\d*$)/.test( value );
+    function isNumber(value) {
+        return /(0|^[1-9]\d*$)/.test(value);
     }
 
     /**
      * 插入多张图片
      */
     function insertBatch() {
-        if ( imageUrls.length < 1 ) return;
+        if (imageUrls.length < 1) return;
         var imgObjs = [],
-                align = findFocus( "localFloat", "name" );
+            align = findFocus("localFloat", "name");
 
-        for ( var i = 0, ci; ci = imageUrls[i++]; ) {
+        for (var i = 0, ci; ci = imageUrls[i++];) {
             var tmpObj = {};
             tmpObj.title = ci.title;
             tmpObj.floatStyle = align;
             //修正显示时候的地址数据,如果后台返回的是图片的绝对地址,那么此处无需修正
             tmpObj.data_ue_src = tmpObj.src = editor.options.imagePath + ci.url;
-            imgObjs.push( tmpObj );
+            imgObjs.push(tmpObj);
         }
         insertImage(imgObjs);
         hideFlash();
@@ -280,49 +291,39 @@ var imageUploader = {};
      * @param id
      * @param returnProperty
      */
-    function findFocus( id, returnProperty ) {
-        var tabs = g( id ).children,
-                property;
-        for ( var i = 0, ci; ci = tabs[i++]; ) {
-            if ( ci.className == "focus" ) {
-                property = ci.getAttribute( returnProperty );
+    function findFocus(id, returnProperty) {
+        var tabs = g(id).children,
+            property;
+        for (var i = 0, ci; ci = tabs[i++];) {
+            if (ci.className == "focus") {
+                property = ci.getAttribute(returnProperty);
                 break;
             }
         }
         return property;
     }
 
-    /**
-     * 绑定开始上传事件
-     */
-    function addUploadListener() {
-        g( "upload" ).onclick = function () {
-            flashObj.upload();
-            this.style.display = "none";
-        };
-    }
-
     /**
      * 绑定地址框改变事件
      */
     function addUrlChangeListener() {
-        var value = g( "url" ).value;
-        if ( browser.ie ) {
-            g( "url" ).onpropertychange = function () {
+        var value = g("url").value;
+        if (browser.ie) {
+            g("url").onpropertychange = function () {
                 var v = this.value;
-                if ( v != value ) {
-                    createPreviewImage( v );
+                if (v != value) {
+                    createPreviewImage(v);
                     value = v;
                 }
             };
         } else {
-            g( "url" ).addEventListener( "input", function () {
+            g("url").addEventListener("input", function () {
                 var v = this.value;
-                if ( v != value ) {
-                    createPreviewImage( v );
+                if (v != value) {
+                    createPreviewImage(v);
                     value = v;
                 }
-            }, false );
+            }, false);
         }
     }
 
@@ -330,18 +331,18 @@ var imageUploader = {};
      * 绑定图片等比缩放事件
      * @param percent  缩放比例
      */
-    function addSizeChangeListener( percent ) {
-        var width = g( "width" ),
-                height = g( "height" ),
-                lock = g( 'lock' );
+    function addSizeChangeListener(percent) {
+        var width = g("width"),
+            height = g("height"),
+            lock = g('lock');
         width.onkeyup = function () {
-            if ( !isNaN( this.value ) && lock.checked ) {
-                height.value = Math.round( this.value / percent ) || this.value;
+            if (!isNaN(this.value) && lock.checked) {
+                height.value = Math.round(this.value / percent) || this.value;
             }
         };
         height.onkeyup = function () {
-            if ( !isNaN( this.value ) && lock.checked ) {
-                width.value = Math.round( this.value * percent ) || this.value;
+            if (!isNaN(this.value) && lock.checked) {
+                width.value = Math.round(this.value * percent) || this.value;
             }
         }
     }
@@ -349,37 +350,37 @@ var imageUploader = {};
     /**
      * 依据url中的地址创建一个预览图片并将对应的信息填入信息框和预览框
      */
-    function createPreviewImage( url ) {
-        if ( !url ) {
+    function createPreviewImage(url) {
+        if (!url) {
             flagImg = null;
-            g( "preview" ).innerHTML = "";
-            g( "width" ).value = "";
-            g( "height" ).value = "";
-            g( "border" ).value = "";
-            g( "vhSpace" ).value = "";
-            g( "title" ).value = "";
-            $focus( g( "url" ) );
+            g("preview").innerHTML = "";
+            g("width").value = "";
+            g("height").value = "";
+            g("border").value = "";
+            g("vhSpace").value = "";
+            g("title").value = "";
+            $focus(g("url"));
             return;
         }
-        var img = document.createElement( "img" ),
-                preview = g( "preview" );
+        var img = document.createElement("img"),
+            preview = g("preview");
 
         var imgTypeReg = /\.(png|gif|jpg|jpeg)$/gi, //格式过滤
-                urlFilter = "";                                     //地址过滤
-        if ( !imgTypeReg.test( url ) || url.indexOf( urlFilter ) == -1 ) {
-            preview.innerHTML = "<span style='color: red'>"+lang.imageUrlError+"</span>";
+            urlFilter = "";                                     //地址过滤
+        if (!imgTypeReg.test(url) || url.indexOf(urlFilter) == -1) {
+            preview.innerHTML = "<span style='color: red'>" + lang.imageUrlError + "</span>";
             flagImg = null;
             return;
         }
         preview.innerHTML = lang.imageLoading;
         img.onload = function () {
             flagImg = this;
-            showImageInfo( this );
-            showPreviewImage( this );
+            showImageInfo(this);
+            showPreviewImage(this,true);
             this.onload = null;
         };
         img.onerror = function () {
-            preview.innerHTML = "<span style='color: red'>"+lang.imageLoadError+"</span>";
+            preview.innerHTML = "<span style='color: red'>" + lang.imageLoadError + "</span>";
             flagImg = null;
             this.onerror = null;
         };
@@ -390,21 +391,21 @@ var imageUploader = {};
      * 显示图片对象的信息
      * @param img
      */
-    function showImageInfo( img ) {
-        if ( !img.getAttribute( "src" ) || !img.src ) return;
-        var wordImgFlag = img.getAttribute( "word_img" );
-        g( "url" ).value = wordImgFlag ? wordImgFlag.replace( "&amp;", "&" ) : (img.getAttribute( 'data_ue_src' ) || img.getAttribute( "src", 2 ).replace( "&amp;", "&" ));
-        g( "width" ).value = img.width || 0;
-        g( "height" ).value = img.height || 0;
-        g( "border" ).value = img.getAttribute( "border" ) || 0;
-        g( "vhSpace" ).value = img.getAttribute( "vspace" ) || 0;
-        g( "title" ).value = img.title || "";
-        var align = editor.queryCommandValue( "imageFloat" ) || "none";
-        updateAlignButton( align );
+    function showImageInfo(img) {
+        if (!img.getAttribute("src") || !img.src) return;
+        var wordImgFlag = img.getAttribute("word_img");
+        g("url").value = wordImgFlag ? wordImgFlag.replace("&amp;", "&") : (img.getAttribute('data_ue_src') || img.getAttribute("src", 2).replace("&amp;", "&"));
+        g("width").value = img.width || 0;
+        g("height").value = img.height || 0;
+        g("border").value = img.getAttribute("border") || 0;
+        g("vhSpace").value = img.getAttribute("vspace") || 0;
+        g("title").value = img.title || "";
+        var align = editor.queryCommandValue("imageFloat") || "none";
+        updateAlignButton(align);
 
         //保存原始比例,用于等比缩放
-        var percent = (img.width / img.height).toFixed( 2 );
-        addSizeChangeListener( percent );
+        var percent = (img.width / img.height).toFixed(2);
+        addSizeChangeListener(percent);
     }
 
     /**
@@ -412,25 +413,21 @@ var imageUploader = {};
      * @param img
      * @param needClone  是否需要克隆后显示
      */
-    function showPreviewImage( img, needClone ) {
+    function showPreviewImage(img, needClone) {
         var tmpWidth = img.width, tmpHeight = img.height;
-        if ( needClone ) {
-            //针对编辑图片时
-            img = img.cloneNode( true );
-            img.width = tmpWidth;
-            img.height = tmpHeight;
-            flagImg = img;
+        var maxWidth = 262,maxHeight = 262,
+            target = scaling(tmpWidth,tmpHeight,maxWidth,maxHeight);
+        target.border = img.border||0;
+        target.src = img.src;
+        flagImg = true;
+        if ((target.width + 2 * target.border) > maxWidth) {
+            target.width = maxWidth - 2 * target.border;
         }
-        var maxWidth = 262;
-        scale( img, maxWidth, maxWidth, maxWidth );
-        if ( (img.width + 2 * img.border) > maxWidth ) {
-            img.width = maxWidth - 2 * img.border;
+        if ((target.height + 2 * target.border) > maxWidth) {
+            target.height = maxWidth - 2 * target.border;
         }
-        if ( (img.height + 2 * img.border) > maxWidth ) {
-            img.height = maxWidth - 2 * img.border;
-        }
-        var preview = g( "preview" );
-        preview.innerHTML = '<img src="' + img.src + '" width="' + img.width + '" height="' + img.height + '" border="' + img.border + 'px solid #000" />';
+        var preview = g("preview");
+        preview.innerHTML = '<img src="' + target.src + '" width="' + target.width + '" height="' + target.height + '" border="' + target.border + 'px solid #000" />';
     }
 
     /**
@@ -438,18 +435,18 @@ var imageUploader = {};
      * @param img
      * @param max
      */
-    function scale( img, max, oWidth, oHeight ) {
+    function scale(img, max, oWidth, oHeight) {
         var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oHeight;
-        if ( ow > max || oh > max ) {
-            if ( ow >= oh ) {
-                if ( width = ow - max ) {
-                    percent = (width / ow).toFixed( 2 );
+        if (ow > max || oh > max) {
+            if (ow >= oh) {
+                if (width = ow - max) {
+                    percent = (width / ow).toFixed(2);
                     img.height = oh - oh * percent;
                     img.width = max;
                 }
             } else {
-                if ( height = oh - max ) {
-                    percent = (height / oh).toFixed( 2 );
+                if (height = oh - max) {
+                    percent = (height / oh).toFixed(2);
                     img.width = ow - ow * percent;
                     img.height = max;
                 }
@@ -457,20 +454,34 @@ var imageUploader = {};
         }
     }
 
+    function scaling(width,height,maxWidth,maxHeight){
+        if(width<maxWidth && height<maxHeight) return {width:width,height:height};
+        var srcRatio = (width/height).toFixed(2),
+            tarRatio = (maxWidth/maxHeight).toFixed(2),
+            w,h;
+        if(srcRatio<tarRatio){
+            h = maxHeight;
+            w = h*srcRatio;
+        }else{
+            w = maxWidth;
+            h = w/srcRatio;
+        }
+        return {width:w.toFixed(0),height:h.toFixed(0)}
+    }
     /**
      * 创建flash实例
      * @param opt
      * @param callbacks
      */
-    function createFlash( opt, callbacks ) {
-        var i18n = utils.extend({},lang.flashI18n);
+    function createFlash(opt, callbacks) {
+        var i18n = utils.extend({}, lang.flashI18n);
         //处理图片资源地址的编码,补全等问题
-        for(var i in i18n){
-            if(!(i in {"lang":1,"uploadingTF":1,"imageTF":1,"textEncoding":1}) && i18n[i]){
+        for (var i in i18n) {
+            if (!(i in {"lang":1, "uploadingTF":1, "imageTF":1, "textEncoding":1}) && i18n[i]) {
                 i18n[i] = encodeURIComponent(editor.options.langPath + editor.options.lang + "/images/" + i18n[i]);
             }
         }
-        opt = utils.extend(opt,i18n,false);
+        opt = utils.extend(opt, i18n, false);
         var option = {
             createOptions:{
                 id:'flash',
@@ -485,23 +496,23 @@ var imageUploader = {};
             }
         };
         flashContainer = $G(opt.container);
-        option = utils.extend( option, callbacks, false );
-        flashObj = new baidu.flash.imageUploader( option );
+        option = utils.extend(option, callbacks, false);
+        flashObj = new baidu.flash.imageUploader(option);
     }
 
     /**
      * 依据传入的align值更新按钮信息
      * @param align
      */
-    function updateAlignButton( align ) {
-        var aligns = g( "remoteFloat" ).children;
-        for ( var i = 0, ci; ci = aligns[i++]; ) {
-            if ( ci.getAttribute( "name" ) == align ) {
-                if ( ci.className != "focus" ) {
+    function updateAlignButton(align) {
+        var aligns = g("remoteFloat").children;
+        for (var i = 0, ci; ci = aligns[i++];) {
+            if (ci.getAttribute("name") == align) {
+                if (ci.className != "focus") {
                     ci.className = "focus";
                 }
             } else {
-                if ( ci.className == "focus" ) {
+                if (ci.className == "focus") {
                     ci.className = "";
                 }
             }
@@ -512,25 +523,26 @@ var imageUploader = {};
      * 创建图片浮动选择按钮
      * @param ids
      */
-    function createAlignButton( ids ) {
-        for ( var i = 0, ci; ci = ids[i++]; ) {
-            var floatContainer = g( ci ),
-                    nameMaps = {"none":lang.floatDefault, "left":lang.floatLeft, "right":lang.floatRight, "center":lang.floatCenter};
-            for ( var j in nameMaps ) {
-                var div = document.createElement( "div" );
-                div.setAttribute( "name", j );
-                if ( j == "none" ) div.className = "focus";
-                div.style.cssText = "background:url(../../themes/default/images/" + j + "_focus.jpg);";
-                div.setAttribute( "title", nameMaps[j] );
-                floatContainer.appendChild( div );
+    function createAlignButton(ids) {
+        for (var i = 0, ci; ci = ids[i++];) {
+            var floatContainer = g(ci),
+                nameMaps = {"none":lang.floatDefault, "left":lang.floatLeft, "right":lang.floatRight, "center":lang.floatCenter};
+            for (var j in nameMaps) {
+                var div = document.createElement("div");
+                div.setAttribute("name", j);
+                if (j == "none") div.className = "focus";
+
+                div.style.cssText = "background:url(images/" + j + "_focus.jpg);";
+                div.setAttribute("title", nameMaps[j]);
+                floatContainer.appendChild(div);
             }
-            switchSelect( ci );
+            switchSelect(ci);
         }
     }
 
-    function toggleFlash(show){
-        if(flashContainer && browser.webkit){
-            flashContainer.style.left = show ? "0":"-10000px";
+    function toggleFlash(show) {
+        if (flashContainer && browser.webkit) {
+            flashContainer.style.left = show ? "0" : "-10000px";
         }
     }
 
@@ -540,85 +552,86 @@ var imageUploader = {};
      * @param tabBodys
      * @param obj
      */
-    function clickHandler( tabHeads,tabBodys,obj ) {
+    function clickHandler(tabHeads, tabBodys, obj) {
         //head样式更改
-        for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
+        for (var k = 0, len = tabHeads.length; k < len; k++) {
             tabHeads[k].className = "";
         }
         obj.className = "focus";
         //body显隐
-        var tabSrc = obj.getAttribute( "tabSrc" );
-        for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
+        var tabSrc = obj.getAttribute("tabSrc");
+        for (var j = 0, length = tabBodys.length; j < length; j++) {
             var body = tabBodys[j],
-                    id = body.getAttribute( "id" );
-            body.onclick = function(){
+                id = body.getAttribute("id");
+            body.onclick = function () {
                 this.style.zoom = 1;
             };
-            if ( id != tabSrc ) {
+            if (id != tabSrc) {
                 body.style.zIndex = 1;
             } else {
                 body.style.zIndex = 200;
                 //当切换到本地图片上传时,隐藏遮罩用的iframe
-                if ( id == "local" ) {
+                if (id == "local") {
                     toggleFlash(true);
                     maskIframe.style.display = "none";
                     //处理确定按钮的状态
-                    if ( selectedImageCount ) {
-                        dialog.buttons[0].setDisabled( true );
+                    if (selectedImageCount) {
+                        dialog.buttons[0].setDisabled(true);
                     }
                 } else {
                     toggleFlash(false);
                     maskIframe.style.display = "";
-                    dialog.buttons[0].setDisabled( false );
+                    dialog.buttons[0].setDisabled(false);
                 }
-                var list = g( "imageList" );
+                var list = g("imageList");
                 list.style.display = "none";
                 //切换到图片管理时,ajax请求后台图片列表
-                if ( id == "imgManager" ) {
+                if (id == "imgManager") {
                     list.style.display = "";
                     //已经初始化过时不再重复提交请求
-                    if ( !list.children.length ) {
-                        ajax.request( editor.options.imageManagerUrl, {
+                    if (!list.children.length) {
+                        ajax.request(editor.options.imageManagerUrl, {
                             timeout:100000,
                             action:"get",
-                            onsuccess:function ( xhr ) {
+                            onsuccess:function (xhr) {
                                 //去除空格
                                 var tmp = utils.trim(xhr.responseText),
-                                        imageUrls = !tmp ? [] : tmp.split( "ue_separate_ue" ),
-                                        length = imageUrls.length;
-                                g( "imageList" ).innerHTML = !length ? "&nbsp;&nbsp;"+lang.noUploadImage : "";
-                                for ( var k = 0, ci; ci = imageUrls[k++]; ) {
-                                    var img = document.createElement( "img" );
-
-                                    var div = document.createElement( "div" );
-                                    div.appendChild( img );
+                                    imageUrls = !tmp ? [] : tmp.split("ue_separate_ue"),
+                                    length = imageUrls.length;
+                                g("imageList").innerHTML = !length ? "&nbsp;&nbsp;" + lang.noUploadImage : "";
+                                for (var k = 0, ci; ci = imageUrls[k++];) {
+                                    var img = document.createElement("img");
+
+                                    var div = document.createElement("div");
+                                    div.appendChild(img);
                                     div.style.display = "none";
-                                    g( "imageList" ).appendChild( div );
+                                    g("imageList").appendChild(div);
                                     img.onclick = function () {
-                                        changeSelected( this );
+                                        changeSelected(this);
                                     };
                                     img.onload = function () {
                                         this.parentNode.style.display = "";
                                         var w = this.width, h = this.height;
-                                        scale( this, 100, 120, 80 );
+                                        scale(this, 100, 120, 80);
                                         this.title = lang.toggleSelect + w + "X" + h;
+                                        this.onload = null;
                                     };
-                                    img.setAttribute( k < 35 ? "src" : "lazy_src", editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig,"") );
-                                    img.setAttribute( "data_ue_src", editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig,"") );
+                                    img.setAttribute(k < 35 ? "src" : "lazy_src", editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig, ""));
+                                    img.setAttribute("data_ue_src", editor.options.imageManagerPath + ci.replace(/\s+|\s+/ig, ""));
 
                                 }
                             },
                             onerror:function () {
-                                g( "imageList" ).innerHTML = lang.imageLoadError;
+                                g("imageList").innerHTML = lang.imageLoadError;
                             }
-                        } );
+                        });
                     }
                 }
-                if ( id == "imgSearch" ) {
-                    selectTxt( g( "imgSearchTxt" ) );
+                if (id == "imgSearch") {
+                    selectTxt(g("imgSearchTxt"));
                 }
-                if ( id == "remote" ) {
-                    $focus( g( "url" ) );
+                if (id == "remote") {
+                    $focus(g("url"));
                 }
             }
         }
@@ -629,16 +642,16 @@ var imageUploader = {};
      * TAB切换
      * @param tabParentId  tab的父节点ID或者对象本身
      */
-    function switchTab( tabParentId ) {
-        var tabElements = g( tabParentId ).children,
-                tabHeads = tabElements[0].children,
-                tabBodys = tabElements[1].children;
+    function switchTab(tabParentId) {
+        var tabElements = g(tabParentId).children,
+            tabHeads = tabElements[0].children,
+            tabBodys = tabElements[1].children;
 
-        for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
+        for (var i = 0, length = tabHeads.length; i < length; i++) {
             var head = tabHeads[i];
-            if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
+            if (head.className === "focus")clickHandler(tabHeads, tabBodys, head);
             head.onclick = function () {
-                clickHandler(tabHeads,tabBodys,this);
+                clickHandler(tabHeads, tabBodys, this);
             }
         }
     }
@@ -647,12 +660,12 @@ var imageUploader = {};
      * 改变o的选中状态
      * @param o
      */
-    function changeSelected( o ) {
-        if ( o.getAttribute( "selected" ) ) {
-            o.removeAttribute( "selected" );
+    function changeSelected(o) {
+        if (o.getAttribute("selected")) {
+            o.removeAttribute("selected");
             o.style.cssText = "filter:alpha(Opacity=100);-moz-opacity:1;opacity: 1;border: 2px solid #fff";
         } else {
-            o.setAttribute( "selected", "true" );
+            o.setAttribute("selected", "true");
             o.style.cssText = "filter:alpha(Opacity=50);-moz-opacity:0.5;opacity: 0.5;border:2px solid blue;";
         }
     }
@@ -661,14 +674,14 @@ var imageUploader = {};
      * 选择切换,传入一个container的ID
      * @param selectParentId
      */
-    function switchSelect( selectParentId ) {
-        var select = g(selectParentId ),
-                children = select.children;
-        domUtils.on(select,"click",function(evt){
+    function switchSelect(selectParentId) {
+        var select = g(selectParentId),
+            children = select.children;
+        domUtils.on(select, "click", function (evt) {
             var tar = evt.srcElement || evt.target;
-            for ( var j = 0, cj; cj = children[j++]; ) {
+            for (var j = 0, cj; cj = children[j++];) {
                 cj.className = "";
-                cj.removeAttribute && cj.removeAttribute( "class" );
+                cj.removeAttribute && cj.removeAttribute("class");
             }
             tar.className = "focus";
 
@@ -679,17 +692,17 @@ var imageUploader = {};
      * gb2312编码
      * @param str
      */
-    function encodeToGb2312( str ) {
+    function encodeToGb2312(str) {
         var strOut = "";
-        for ( var i = 0; i < str.length; i++ ) {
-            var c = str.charAt( i ),
-                    code = str.charCodeAt( i );
-            if ( c == " " ) strOut += "+";
-            else if ( code >= 19968 && code <= 40869 ) {
+        for (var i = 0; i < str.length; i++) {
+            var c = str.charAt(i),
+                code = str.charCodeAt(i);
+            if (c == " ") strOut += "+";
+            else if (code >= 19968 && code <= 40869) {
                 var index = code - 19968;
-                strOut += "%" + z.substr( index * 4, 2 ) + "%" + z.substr( index * 4 + 2, 2 );
+                strOut += "%" + z.substr(index * 4, 2) + "%" + z.substr(index * 4 + 2, 2);
             } else {
-                strOut += "%" + str.charCodeAt( i ).toString( 16 );
+                strOut += "%" + str.charCodeAt(i).toString(16);
             }
         }
         return strOut;

二進制
DjangoUeditor/static/UEditor/dialogs/image/imageUploader.swf


二進制
DjangoUeditor/static/UEditor/dialogs/image/images/center_focus.jpg


二進制
DjangoUeditor/static/UEditor/dialogs/image/images/left_focus.jpg


二進制
DjangoUeditor/static/UEditor/dialogs/image/images/none_focus.jpg


二進制
DjangoUeditor/static/UEditor/dialogs/image/images/right_focus.jpg


+ 2 - 5
DjangoUeditor/static/UEditor/dialogs/insertframe/insertframe.html

@@ -3,10 +3,9 @@
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <title></title>
+    <script type="text/javascript" src="../internal.js"></script>
     <style type="text/css">
-        * {color: #838383}
-        body {font-size: 12px;width: 320px;height: 153px;overflow: hidden; margin: 0;padding: 0; }
-        .warp {margin-left:5px;padding: 20px 0 0 15px;height: 100%;position: relative;}
+        .warp {width: 320px;height: 153px;margin-left:5px;padding: 20px 0 0 15px;position: relative;}
         #url {width: 290px; margin-bottom: 2px; margin-left: -6px; margin-left: -2px\9;*margin-left:0;_margin-left:0; }
         .format span{display: inline-block; width: 58px;text-align: center; zoom:1;}
         table td{padding:5px 0;}
@@ -40,13 +39,11 @@
                         <option value=""></option>
                         <option value="left"></option>
                         <option value="right"></option>
-                        <option value="middle"></option>
                     </select>
                 </td>
             </tr>
         </table>
 </div>
-<script type="text/javascript" src="../internal.js"></script>
 <script type="text/javascript">
     var iframe = editor._iframe;
     if(iframe){

+ 10 - 2
DjangoUeditor/static/UEditor/dialogs/internal.js

@@ -30,8 +30,16 @@
             }
         }, 0 )
     };
-    lang = UE.I18N[editor.options.lang][dialog.className.split( "-" )[2]];
-    utils.domReady( function () {
+    utils.loadFile(document,{
+        href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(),
+        tag:"link",
+        type:"text/css",
+        rel:"stylesheet"
+    });
+    lang = editor.getLang(dialog.className.split( "-" )[2]);
+
+    domUtils.on(window,'load',function () {
+
         var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
         //针对静态资源
         for ( var i in lang.static ) {

+ 1 - 1
DjangoUeditor/static/UEditor/dialogs/link/link.html

@@ -4,6 +4,7 @@
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <style type="text/css">
         *{margin:0;padding:0;color: #838383;}
         table{font-size: 12px;margin: 10px;line-height: 30px}
@@ -34,7 +35,6 @@
             <td colspan="2" id="msg"></td>
         </tr>
     </table>
-    <script type="text/javascript" src="../internal.js"></script>
 <script type="text/javascript">
     var range = editor.selection.getRange(),
         link = range.collapsed ? editor.queryCommandValue( "link" ) : editor.selection.getStart(),

+ 8 - 20
DjangoUeditor/static/UEditor/dialogs/map/map.html

@@ -3,27 +3,16 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title></title>
-<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.1&services=true"></script>
-
+    <script type="text/javascript" src="../internal.js"></script>
+    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.1&services=true"></script>
     <style type="text/css">
-        *{color: #838383}
-        body {
-            font-size: 12px;
-            width:540px;
-            height: 350px;
-            overflow: hidden;
-            margin:0px;padding:0px;
-        }
-        .content{padding: 9px 0px 0px 15px;height:100%;}
-        .content table{padding:0px;margin:0px;width: 100%}
-        .content table tr{padding:0px;margin:0px; list-style: none;height: 30px; line-height: 30px;}
-        #city,#address{height:21px;background: #FFF;border:1px solid #d7d7d7;padding: 0px; margin: 0px; line-height: 21px;}
+        .content{width:530px; height: 350px;margin: 10px auto;}
+        .content table{width: 100%}
+        .content table td{vertical-align: middle;}
+        #city,#address{height:21px;background: #FFF;border:1px solid #d7d7d7; line-height: 21px;}
         #city{width:90px}
         #address{width:220px}
-         a.doSearch{display:block;text-align:center;line-height:24px; text-decoration: none;height:24px;width:95px;border: 0px;margin:0px;padding:0px;background:url(../../themes/default/images/icons-all.gif)  no-repeat;}
-         a.doSearch:hover{background-position: 0 -30px;}
     </style>
-
 </head>
 <body>
 <div class="content">
@@ -33,13 +22,12 @@
             <td><input id="city" type="text" /></td>
             <td><var id="lang_address"></var>:</td>
             <td><input id="address" type="text" value="" /></td>
-            <td><a href="javascript:doSearch()" class="doSearch"><var id="lang_search"></var></a></td>
+            <td><a href="javascript:doSearch()" class="button"><var id="lang_search"></var></a></td>
         </tr>
     </table>
-    <div style="width:520px;height:340px;border:1px solid gray" id="container"></div>
+    <div style="width:100%;height:340px;margin:5px auto;border:1px solid gray" id="container"></div>
 
 </div>
-<script type="text/javascript" src="../internal.js"></script>
 <script type="text/javascript">
     var map = new BMap.Map("container"),marker,point,imgcss;
     map.enableScrollWheelZoom();

+ 30 - 0
DjangoUeditor/static/UEditor/dialogs/music/music.css

@@ -0,0 +1,30 @@
+.wrapper{margin: 5px 10px;}
+
+.searchBar{height:30px;padding:7px 0 3px;text-align:center;}
+.searchBtn{font-size:13px;height:24px;}
+
+.resultBar{width:460px;margin:5px auto;border: 1px solid #CCC;border-radius: 5px;box-shadow: 2px 2px 5px #D3D6DA;overflow: hidden;}
+
+.listPanel{overflow: hidden;}
+.panelon{display:block;}
+.paneloff{display:none}
+
+.page{width:220px;margin:20px auto;overflow: hidden;}
+.pageon{float:right;width:24px;line-height:24px;height:24px;margin-right: 5px;background: none;border: none;color: #000;font-weight: bold;text-align:center}
+.pageoff{float:right;width:24px;line-height:24px;height:24px;cursor:pointer;background-color: #fff;
+   border: 1px solid #E7ECF0;color: #2D64B3;margin-right: 5px;text-decoration: none;text-align:center;}
+
+.m-box{width:460px;}
+.m-m{float: left;line-height: 20px;height: 20px;}
+.m-h{height:24px;line-height:24px;padding-left: 46px;background-color:#FAFAFA;border-bottom: 1px solid #DAD8D8;font-weight: bold;font-size: 12px;color: #333;}
+.m-l{float:left;width:40px; }
+.m-t{float:left;width:140px;}
+.m-s{float:left;width:110px;}
+.m-z{float:left;width:100px;}
+.m-try-t{float: left;width: 60px;;}
+
+.m-try{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/try_music.gif') no-repeat ;}
+.m-trying{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/stop_music.gif') no-repeat ;}
+
+.loading{width:95px;height:7px;font-size:7px;margin:60px auto;background:url(http://static.tieba.baidu.com/tb/editor/images/loading.gif) no-repeat}
+.empty{width:300px;height:40px;padding:2px;margin:50px auto;line-height:40px; color:#006699;text-align:center;}

+ 32 - 0
DjangoUeditor/static/UEditor/dialogs/music/music.html

@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8">
+    <title>插入音乐</title>
+    <script type="text/javascript" src="../internal.js"></script>
+    <link rel="stylesheet" type="text/css" href="music.css">
+</head>
+<body>
+<div class="wrapper">
+    <div class="searchBar">
+        <input id="J_searchName" type="text"/>
+        <input type="button" class="searchBtn" id="J_searchBtn">
+    </div>
+    <div class="resultBar" id="J_resultBar">
+        <div class="loading" style="display:none"></div>
+        <div class="empty"><var id="lang_input_tips"></var></div>
+    </div>
+    <div id="J_preview"></div>
+</div>
+<script type="text/javascript" src="music.js"></script>
+<script type="text/javascript">
+    var music = new Music;
+    dialog.onok = function () {
+        music.exec();
+    };
+    dialog.oncancel = function () {
+        $G('J_preview').innerHTML = "";
+    };
+</script>
+</body>
+</html>

+ 192 - 0
DjangoUeditor/static/UEditor/dialogs/music/music.js

@@ -0,0 +1,192 @@
+function Music() {
+    this.init();
+}
+(function () {
+    var pages = [],
+        panels = [],
+        selectedItem = null;
+    Music.prototype = {
+        total:70,
+        pageSize:10,
+        dataUrl:"http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.common",
+        playerUrl:"http://box.baidu.com/widget/flash/bdspacesong.swf",
+
+        init:function () {
+            var me = this;
+            domUtils.on($G("J_searchName"), "keyup", function (event) {
+                var e = window.event || event;
+                if (e.keyCode == 13) {
+                    me.dosearch();
+                }
+            });
+            domUtils.on($G("J_searchBtn"), "click", function () {
+                me.dosearch();
+            });
+        },
+        callback:function (data) {
+            var me = this;
+            me.data = data.song_list;
+            setTimeout(function () {
+                $G('J_resultBar').innerHTML = me._renderTemplate(data.song_list);
+            }, 300);
+        },
+        dosearch:function () {
+            var me = this;
+            selectedItem = null;
+            var key = $G('J_searchName').value;
+            if (utils.trim(key) == "")return false;
+            key = encodeURIComponent(key);
+            me._sent(key);
+        },
+        doselect:function (i) {
+            var me = this;
+            if (typeof i == 'object') {
+                selectedItem = i;
+            } else if (typeof i == 'number') {
+                selectedItem = me.data[i];
+            }
+        },
+        onpageclick:function (id) {
+            var me = this;
+            for (var i = 0; i < pages.length; i++) {
+                $G(pages[i]).className = 'pageoff';
+                $G(panels[i]).className = 'paneloff';
+            }
+            $G('page' + id).className = 'pageon';
+            $G('panel' + id).className = 'panelon';
+        },
+        listenTest:function (elem) {
+            var me = this,
+                view = $G('J_preview'),
+                is_play_action = (elem.className == 'm-try'),
+                old_trying = me._getTryingElem();
+
+            if (old_trying) {
+                old_trying.className = 'm-try';
+                view.innerHTML = '';
+            }
+            if (is_play_action) {
+                elem.className = 'm-trying';
+                view.innerHTML = me._buildMusicHtml(me._getUrl(true));
+            }
+        },
+        _sent:function (param) {
+            var me = this;
+            $G('J_resultBar').innerHTML = '<div class="loading"></div>';
+
+            utils.loadFile(document, {
+                src:me.dataUrl + '&query=' + param + '&page_size=' + me.total + '&callback=music.callback()&.r=' + Math.random(),
+                tag:"script",
+                type:"text/javascript",
+                defer:"defer"
+            });
+        },
+        _removeHtml:function (str) {
+            var reg = /<\s*\/?\s*[^>]*\s*>/gi;
+            return str.replace(reg, "");
+        },
+        _getUrl:function (isTryListen) {
+            var me = this;
+            var param = 'from=tiebasongwidget&url=&name=' + encodeURIComponent(me._removeHtml(selectedItem.title)) + '&artist='
+                + encodeURIComponent(me._removeHtml(selectedItem.author)) + '&extra='
+                + encodeURIComponent(me._removeHtml(selectedItem.album_title))
+                + '&autoPlay='+isTryListen+'' + '&loop=true';
+            return  me.playerUrl + "?" + param;
+        },
+        _getTryingElem:function () {
+            var s = $G('J_listPanel').getElementsByTagName('span');
+
+            for (var i = 0; i < s.length; i++) {
+                if (s[i].className == 'm-trying')
+                    return s[i];
+            }
+            return null;
+        },
+        _buildMusicHtml:function (playerUrl) {
+            var html = '<embed class="BDE_try_Music" allowfullscreen="false" pluginspage="http://www.macromedia.com/go/getflashplayer"';
+            html += ' src="' + playerUrl + '"';
+            html += ' width="1" height="1" style="position:absolute;left:-2000px;"';
+            html += ' type="application/x-shockwave-flash" wmode="transparent" play="true" loop="false"';
+            html += ' menu="false" allowscriptaccess="never" scale="noborder">';
+            return html;
+        },
+        _byteLength:function (str) {
+            return str.replace(/[^\u0000-\u007f]/g, "\u0061\u0061").length;
+        },
+        _getMaxText:function (s) {
+            var me = this;
+            s = me._removeHtml(s);
+            if (me._byteLength(s) > 12)
+                return s.substring(0, 5) + '...';
+            if (!s) s = "&nbsp;";
+            return s;
+        },
+        _rebuildData:function (data) {
+            var me = this,
+                newData = [],
+                d = me.pageSize,
+                itembox;
+            for (var i = 0; i < data.length; i++) {
+                if ((i + d) % d == 0) {
+                    itembox = [];
+                    newData.push(itembox)
+                }
+                itembox.push(data[i]);
+            }
+            return newData;
+        },
+        _renderTemplate:function (data) {
+            var me = this;
+            if (data.length == 0)return '<div class="empty">' + lang.emptyTxt + '</div>';
+            data = me._rebuildData(data);
+            var s = [], p = [], t = [];
+            s.push('<div id="J_listPanel" class="listPanel">');
+            p.push('<div class="page">');
+            for (var i = 0, tmpList; tmpList = data[i++];) {
+                panels.push('panel' + i);
+                pages.push('page' + i);
+                if (i == 1) {
+                    s.push('<div id="panel' + i + '" class="panelon">');
+                    if (data.length != 1) {
+                        t.push('<div id="page' + i + '" onclick="music.onpageclick(' + i + ')" class="pageon">' + (i ) + '</div>');
+                    }
+                } else {
+                    s.push('<div id="panel' + i + '" class="paneloff">');
+                    t.push('<div id="page' + i + '" onclick="music.onpageclick(' + i + ')" class="pageoff">' + (i ) + '</div>');
+                }
+                s.push('<div class="m-box">');
+                s.push('<div class="m-h"><span class="m-t">' + lang.chapter + '</span><span class="m-s">' + lang.singer
+                    + '</span><span class="m-z">' + lang.special + '</span><span class="m-try-t">' + lang.listenTest + '</span></div>');
+                for (var j = 0, tmpObj; tmpObj = tmpList[j++];) {
+                    s.push('<label for="radio-' + i + '-' + j + '" class="m-m">');
+                    s.push('<input type="radio" id="radio-' + i + '-' + j + '" name="musicId" class="m-l" onclick="music.doselect(' + (me.pageSize * (i-1) + (j-1)) + ')"/>');
+                    s.push('<span class="m-t">' + me._getMaxText(tmpObj.title) + '</span>');
+                    s.push('<span class="m-s">' + me._getMaxText(tmpObj.author) + '</span>');
+                    s.push('<span class="m-z">' + me._getMaxText(tmpObj.album_title) + '</span>');
+                    s.push('<span class="m-try" onclick="music.doselect(' + (me.pageSize * (i-1) + (j-1)) + ');music.listenTest(this)"></span>');
+                    s.push('</label>');
+                }
+                s.push('</div>');
+                s.push('</div>');
+            }
+            t.reverse();
+            p.push(t.join(''));
+            s.push('</div>');
+            p.push('</div>');
+            return s.join('') + p.join('');
+        },
+        exec:function () {
+            var me = this;
+            if (selectedItem == null)   return;
+            $G('J_preview').innerHTML = "";
+            editor.execCommand('music', {
+                url:me._getUrl(false),
+                width:400,
+                height:95
+            });
+        }
+    };
+})();
+
+
+

+ 2 - 2
DjangoUeditor/static/UEditor/dialogs/scrawl/scrawl.css

@@ -2,7 +2,7 @@
 */
 body{margin: 0;}
 table{width:100%;}
-td{padding:2px 4px;vertical-align: middle;}
+table td{padding:2px 4px;vertical-align: middle;}
 a{text-decoration: none;}
 em{font-style: normal;}
 .border_style1{border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;}
@@ -13,7 +13,7 @@ em{font-style: normal;}
 .hot{float:left;height:335px;}
 .drawBoard{position: relative; cursor: crosshair;}
 .brushBorad{position: absolute;left:0;top:0;z-index: 998;}
-.picBoard{display:table-cell;border: none;text-align: center;vertical-align: middle;cursor: default;}
+.picBoard{border: none;text-align: center;line-height: 300px;cursor: default;}
 .operateBar{margin-top:10px;font-size:12px;text-align: center;}
 .operateBar span{margin-left: 10px;}
 

+ 2 - 2
DjangoUeditor/static/UEditor/dialogs/scrawl/scrawl.html

@@ -1,9 +1,10 @@
-<!DOCTYPE html>
+<!DOCTYPE html>
 <html>
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="robots" content="noindex, nofollow"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <link rel="stylesheet" type="text/css" href="scrawl.css">
 </head>
 <body>
@@ -69,7 +70,6 @@
 </div>
 <div id="J_maskLayer" class="maskLayerNull"></div>
 
-<script type="text/javascript" src="../internal.js"></script>
 <script type="text/javascript" src="scrawl.js"></script>
 <script type="text/javascript">
     var settings = {

+ 29 - 30
DjangoUeditor/static/UEditor/dialogs/scrawl/scrawl.js

@@ -12,7 +12,7 @@ var scrawl = function (options) {
     var canvas = $G("J_brushBoard"),
         context = canvas.getContext('2d'),
         drawStep = [], //undo redo存储
-        drawStepIndex = -1; //undo redo指针
+        drawStepIndex = 0; //undo redo指针
 
     scrawl.prototype = {
         isScrawl:false, //是否涂鸦
@@ -40,14 +40,13 @@ var scrawl = function (options) {
         },
 
         originalState:function (options) {
-            var me = this;
+            var me = this,
+                url = editor.options.scrawlUrl;
 
             me.brushWidth = options.drawBrushSize;//同步画笔粗细
             me.brushColor = options.drawBrushColor;//同步画笔颜色
 
-            $G("fileForm").action = editor.options.scrawlUrl + "?action=tmpImg";//初始form提交地址
-            //$G("fileForm").action = url + (url.indexOf("?") == -1 ? "?" : "&") + "action=tmpImg";
-
+            $G("fileForm").action = url + (url.indexOf("?") == -1 ? "?" : "&") + "action=tmpImg";//初始form提交地址
             context.lineWidth = me.brushWidth;//初始画笔大小
             context.strokeStyle = me.brushColor;//初始画笔颜色
             context.fillStyle = "transparent";//初始画布背景颜色
@@ -79,13 +78,13 @@ var scrawl = function (options) {
                 isMouseDown = false,
                 isMouseMove = false,
                 isMouseUp = false,
-                buttonPress= 0,button, flag = '';
+                buttonPress = 0, button, flag = '';
 
             margin = parseInt(domUtils.getComputedStyle($G("J_wrap"), "margin-left"));
             drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height));
             drawStepIndex += 1;
 
-            domUtils.on(canvas, ["mousedown","mousemove", "mouseup", "mouseout"], function(e){
+            domUtils.on(canvas, ["mousedown", "mousemove", "mouseup", "mouseout"], function (e) {
                 button = browser.webkit ? e.which : buttonPress;
                 switch (e.type) {
                     case 'mousedown':
@@ -93,23 +92,23 @@ var scrawl = function (options) {
                         flag = 1;
                         isMouseDown = true;
                         isMouseUp = false;
-                        isMouseMove=false;
+                        isMouseMove = false;
                         me.isScrawl = true;
                         startX = e.clientX - margin;//10为外边距总和
                         startY = e.clientY - margin;
                         context.beginPath();
                         break;
                     case 'mousemove' :
-                        if(!flag && button == 0){
+                        if (!flag && button == 0) {
                             return;
                         }
-                        if(!flag && button){
+                        if (!flag && button) {
                             startX = e.clientX - margin;//10为外边距总和
                             startY = e.clientY - margin;
                             context.beginPath();
                             flag = 1;
                         }
-                        if(isMouseUp || !isMouseDown){
+                        if (isMouseUp || !isMouseDown) {
                             return;
                         }
                         var endX = e.clientX - margin,
@@ -124,7 +123,7 @@ var scrawl = function (options) {
                         break;
                     case 'mouseup':
                         buttonPress = 0;
-                        if(!isMouseDown)return;
+                        if (!isMouseDown)return;
                         if (!isMouseMove) {
                             context.arc(startX, startY, context.lineWidth, 0, Math.PI * 2, false);
                             context.fillStyle = context.strokeStyle;
@@ -141,7 +140,7 @@ var scrawl = function (options) {
                     case 'mouseout':
                         flag = '';
                         buttonPress = 0;
-                        if( button == 1) return;
+                        if (button == 1) return;
                         context.closePath();
                         break;
                 }
@@ -171,7 +170,7 @@ var scrawl = function (options) {
                 context.clearRect(0, 0, context.canvas.width, context.canvas.height);
                 drawStep = [];
                 me._saveOPerate(saveNum);
-                drawStepIndex = 0;
+                drawStepIndex = 1;
                 me.isScrawl = false;
                 me.btn2disable("J_previousStep");
                 me.btn2disable("J_nextStep");
@@ -241,8 +240,6 @@ var scrawl = function (options) {
             });
         },
         _addScalePicListenter:function () {
-            //trace 2457
-            if(browser.opera) return;
             domUtils.on($G("J_sacleBoard"), "click", function () {
                 var picBoard = $G("J_picBoard"),
                     scaleCon = $G("J_scaleCon"),
@@ -250,8 +247,8 @@ var scrawl = function (options) {
 
                 if (img) {
                     if (!scaleCon) {
+                        picBoard.style.cssText = "position:relative;z-index:999;"+picBoard.style.cssText;
                         img.style.cssText = "position: absolute;top:" + (canvas.height - img.height) / 2 + "px;left:" + (canvas.width - img.width) / 2 + "px;";
-                        picBoard.style.cssText += "position:relative;z-index:999";
                         var scale = new ScaleBoy();
                         picBoard.appendChild(scale.init());
                         scale.startScale(img);
@@ -268,10 +265,10 @@ var scrawl = function (options) {
                 }
             });
         },
-        _addClearSelectionListenter:function(){
-            var doc=document;
-            domUtils.on(doc,'mousemove',function(e){
-                if(browser.ie)
+        _addClearSelectionListenter:function () {
+            var doc = document;
+            domUtils.on(doc, 'mousemove', function (e) {
+                if (browser.ie)
                     doc.selection.clear();
                 else
                     window.getSelection().removeAllRanges();
@@ -280,13 +277,17 @@ var scrawl = function (options) {
         _clearSelection:function () {
             var list = ["J_operateBar", "J_colorBar", "J_brushBar", "J_eraserBar", "J_picBoard"];
             for (var i = 0, group; group = list[i++];) {
-                domUtils.unselectable($G(group));
+                domUtils.unSelectable($G(group));
             }
         },
 
         _saveOPerate:function (saveNum) {
             var me = this;
             if (drawStep.length <= saveNum) {
+                if(drawStepIndex<drawStep.length){
+                    me.btn2disable("J_nextStep");
+                    drawStep.splice(drawStepIndex);
+                }
                 drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height));
                 drawStepIndex = drawStep.length;
             } else {
@@ -381,9 +382,9 @@ var scrawl = function (options) {
                 context.fillStyle = "#fff";//重置画布背景白色
                 context.fillRect(0, 0, canvas.width, canvas.height);
             }
-            try{
+            try {
                 return canvas.toDataURL("image/png").substring(22);
-            }catch(e){
+            } catch (e) {
                 return "";
             }
         },
@@ -410,7 +411,7 @@ var ScaleBoy = function () {
         var doc = document,
             head = doc.getElementsByTagName('head')[0],
             style = doc.createElement('style'),
-            cssText = '.scale{visibility:hidden;cursor:move;position:absolute;left:0;top:0;width:100px;height:50px;background-color:#fff;font-size:0;line-height:0;overflow:hidden;opacity:.4;filter:Alpha(opacity=40);}'
+            cssText = '.scale{visibility:hidden;cursor:move;position:absolute;left:0;top:0;width:100px;height:50px;background-color:#fff;font-size:0;line-height:0;opacity:.4;filter:Alpha(opacity=40);}'
                 + '.scale span{position:absolute;left:0;top:0;width:6px;height:6px;background-color:#006DAE;}'
                 + '.scale .hand0, .scale .hand7{cursor:nw-resize;}'
                 + '.scale .hand1, .scale .hand6{left:50%;margin-left:-3px;cursor:n-resize;}'
@@ -594,9 +595,7 @@ function ue_callback(url, state) {
             var obj = new scrawl();
             obj.btn2Highlight("J_removeImg");
             //trace 2457
-            if(!browser.opera){
-                obj.btn2Highlight("J_sacleBoard");
-            }
+            obj.btn2Highlight("J_sacleBoard");
         };
         img.src = editor.options.scrawlPath + url;
     } else {
@@ -621,8 +620,8 @@ function addMaskLayer(html) {
 function exec(scrawlObj) {
     if (scrawlObj.isScrawl) {
         addMaskLayer(lang.scrawlUpLoading);
-        var base64=scrawlObj.getCanvasData();
-        if(!!base64){
+        var base64 = scrawlObj.getCanvasData();
+        if (!!base64) {
             ajax.request(editor.options.scrawlUrl, {
                 timeout:100000,
                 content:base64,

+ 59 - 200
DjangoUeditor/static/UEditor/dialogs/searchreplace/searchreplace.html

@@ -4,212 +4,71 @@
 <head>
     <title></title>
     <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <style type="text/css">
-        *{color: #838383}
-        body {
-            font-size: 12px;
-            width:380px;
-            height: 170px;
-            overflow: hidden;
-            margin:0;padding:0;
-        }
-        .warp{ padding: 39px 0 0 15px;height:88%;position:relative;}
-        * +html .warp{height:80%}
-        .head{position:absolute;height:31px;top:9px;}
-        .content{height:110px;border: 1px solid #ddd;padding:5px}
-        .head span{width:62px;height:29px;line-height:29px;background:red;display:block;float: left;text-align: center;margin-right: 1px;cursor: pointer }
-        .head span.def{background:url("../../themes/default/images/dialog-title-bg.png") repeat-x;border:1px solid #ccc;}
-        .head span.act{background:#FFF;border:1px solid #ccc;border-bottom: 1px solid #FFF}
-        .content table{width:100%;}
-        .content input.int{ width:190px;height:21px;background: #FFF;border:1px solid #d7d7d7;padding: 0; margin: 0;line-height:21px;}
-        .content input.btn{padding: 0 5px; text-align:center;line-height:24px; text-decoration: none;height:24px;border: 0;margin:0;background:url("../../themes/default/images/dialog-title-bg.png") repeat-x;border:1px solid #ccc; }
+        .warpper{ position:relative;width: 380px;margin: 10px auto;}
+        .tabbody{height: 115px;}
+        .tabbody table{width:100%;border-collapse: separate;border-spacing: 3px;}
+        .tabbody .panel{width:373px;height:100%;padding-left: 5px;position: absolute;background-color: #fff;}
+        .tabbody input.int{ width:190px;height:21px;border:1px solid #d7d7d7;line-height:21px;}
+        .tabbody input.btn{padding: 0 5px; text-align:center;line-height:24px; text-decoration: none;height:24px;background:url("../../themes/default/images/dialog-title-bg.png") repeat-x;border:1px solid #ccc; }
     </style>
 </head>
 <body>
-<div class="warp">
-    <div id="head" class="head">
-        <span name="find" class="act"><var id="lang_tab_search"></var></span> <span name="replace" class="def"><var id="lang_tab_replace"></var></span>
+<div class="warpper" id="searchtab">
+    <div id="head" class="tabhead">
+        <span  tabsrc="find" class="focus"><var id="lang_tab_search"></var></span>
+        <span  tabsrc="replace" ><var id="lang_tab_replace"></var></span>
     </div>
-    <div class="content" id="find">
-        <table>
-            <tr>
-                <td width="80"><var id="lang_search1"></var>: </td>
-                <td><input id="findtxt" type="text" class="int" /></td>
-            </tr>
-            <tr>
-                <td><var id="lang_case_sensitive1"></var></td>
-                <td>
-                    <input id="matchCase" type="checkbox" />
-                </td>
-            </tr>
-            <tr>
-                <td colspan="2">
-                    <input id="nextFindBtn" type="button" class="btn" />
-                    <input id="preFindBtn" type="button" class="btn" />
-                </td>
-            </tr>
-        </table>
-    </div>
-    
-    <div class="content" id="replace">
-        <table>
-            <tr>
-                <td width="80"><var id="lang_search2"></var>: </td>
-                <td><input id="findtxt1" type="text" class="int"  /></td>
-            </tr>
-            <tr>
-                <td><var id="lang_replace"></var>: </td>
-                <td><input id="replacetxt" type="text" class="int" /></td>
-            </tr>
-            <tr>
-                <td><var id="lang_case_sensitive2"></var></td>
-                <td>
-                    <input id="matchCase1" type="checkbox" />
-                </td>
-            </tr>
-            <tr>
-                <td colspan="2">
-                    <input id="nextReplaceBtn" type="button" class="btn" />
-                    <input id="preReplaceBtn" type="button" class="btn" />
-                    <input id="repalceBtn" type="button" class="btn" />
-                    <input id="repalceAllBtn" type="button" class="btn" />
-                </td>
-            </tr>
-        </table>
+    <div class="tabbody">
+        <div class="panel" id="find">
+            <table>
+                <tr>
+                    <td width="80"><var id="lang_search1"></var>: </td>
+                    <td><input id="findtxt" type="text" class="int" /></td>
+                </tr>
+                <tr>
+                    <td><var id="lang_case_sensitive1"></var></td>
+                    <td>
+                        <input id="matchCase" type="checkbox" />
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        <input id="nextFindBtn" type="button" class="btn" />
+                        <input id="preFindBtn" type="button" class="btn" />
+                    </td>
+                </tr>
+            </table>
+        </div>
+        <div class="panel" id="replace">
+            <table>
+                <tr>
+                    <td width="80"><var id="lang_search2"></var>: </td>
+                    <td><input id="findtxt1" type="text" class="int"  /></td>
+                </tr>
+                <tr>
+                    <td><var id="lang_replace"></var>: </td>
+                    <td><input id="replacetxt" type="text" class="int" /></td>
+                </tr>
+                <tr>
+                    <td><var id="lang_case_sensitive2"></var></td>
+                    <td>
+                        <input id="matchCase1" type="checkbox" />
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2">
+                        <input id="nextReplaceBtn" type="button" class="btn" />
+                        <input id="preReplaceBtn" type="button" class="btn" />
+                        <input id="repalceBtn" type="button" class="btn" />
+                        <input id="repalceAllBtn" type="button" class="btn" />
+                    </td>
+                </tr>
+            </table>
+        </div>
     </div>
 </div>
-<script type="text/javascript" src="../internal.js"></script>
-<script type="text/javascript">
-        //清空上次查选的痕迹
-        editor.firstForSR = 0;
-        editor.currentRangeForSR = null;
-        $G("replace").style.display = "none";
-        //给tab注册切换事件
-        function toggletab(){
-            var tabs = document.getElementsByTagName("span");
-            for(var i=0,j;j=tabs[i];i++){
-                domUtils.on(j,"click",function(){
-                    var name = this.getAttribute("name");
-                    var spans = document.getElementsByTagName("span");
-                    var len = spans.length;
-                    for(var s=0;s<len;s++){
-                        spans[s].className = 'def';
-                    }
-                    this.className = 'act';
-                    $G("find").style.display = "none";
-                    $G("replace").style.display = "none";
-                    $G(name).style.display = "";
-                    $G('findtxt1').value = $G('findtxt').value;
-                    if(name =="replace"){
-                        $focus($G("findtxt1"));
-                    }else{
-                        $focus($G("findtxt"));
-                    }
-                });
-            }
-
-        }
-        //是否区分大小写
-        function getMatchCase (id){
-            return $G(id).checked ? true : false;
-        }
-        //查找
-        $G("nextFindBtn").onclick = function(txt,dir,mcase){
-            var findtxt = $G("findtxt").value,obj;
-            if(!findtxt){
-                return false;
-            }
-            obj = {
-                searchStr : findtxt,
-                dir : 1,
-                casesensitive : getMatchCase("matchCase")
-            };
-            if(!frCommond(obj)){
-                alert(lang.getEnd);
-            }
-        };
-        $G("nextReplaceBtn").onclick = function(txt,dir,mcase){
-            var findtxt = $G("findtxt1").value,obj;
-            if(!findtxt){
-                return false;
-            }
-            obj = {
-                searchStr : findtxt,
-                dir : 1,
-                casesensitive : getMatchCase("matchCase1")
-            };
-            frCommond(obj);
-        }
-        $G("preFindBtn").onclick = function(txt,dir,mcase){
-            var findtxt = $G("findtxt").value,obj;
-            if(!findtxt){
-                return false;
-            }
-            obj = {
-                searchStr : findtxt,
-                dir : -1,
-                casesensitive : getMatchCase("matchCase")
-            };
-            if(!frCommond(obj)){
-                alert(lang.getStart);
-            }
-        }
-        $G("preReplaceBtn").onclick = function(txt,dir,mcase){
-            var findtxt = $G("findtxt1").value,obj;
-            if(!findtxt){
-                return false;
-            }
-            obj = {
-                searchStr : findtxt,
-                dir : -1,
-                casesensitive : getMatchCase("matchCase1")
-            };
-            frCommond(obj);
-        }
-        //替换
-        $G("repalceBtn").onclick = function(){
-            var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g,""),obj,
-                replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g,"");
-            if(!findtxt){
-                return false;
-            }
-            if(findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())){
-                return false;
-            }
-            obj = {
-                searchStr : findtxt,
-                dir : 1,
-                casesensitive : getMatchCase("matchCase1"),
-                replaceStr : replacetxt
-            };
-            frCommond(obj);
-        }
-        //全部替换
-        $G("repalceAllBtn").onclick = function(){
-            var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g,""),obj,
-                replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g,"");
-            if(!findtxt){
-                return false;
-            }
-            if(findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())){
-                return false;
-            }
-            obj = {
-                searchStr : findtxt,
-                casesensitive : getMatchCase("matchCase1"),
-                replaceStr : replacetxt,
-                all : true
-            };
-            var num = frCommond(obj);
-            if(num){
-                alert(lang.countMsg.replace("{#count}",num));
-            }
-        }
-        //执行
-        var frCommond = function(obj){
-            return editor.execCommand("searchreplace",obj);
-        }
-        toggletab();
-</script>
+<script type="text/javascript" src="searchreplace.js"></script>
 </body>
 </html>

+ 160 - 0
DjangoUeditor/static/UEditor/dialogs/searchreplace/searchreplace.js

@@ -0,0 +1,160 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-9-26
+ * Time: 下午12:29
+ * To change this template use File | Settings | File Templates.
+ */
+
+//清空上次查选的痕迹
+editor.firstForSR = 0;
+editor.currentRangeForSR = null;
+//给tab注册切换事件
+/**
+ * tab点击处理事件
+ * @param tabHeads
+ * @param tabBodys
+ * @param obj
+ */
+function clickHandler( tabHeads,tabBodys,obj ) {
+    //head样式更改
+    for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
+        tabHeads[k].className = "";
+    }
+    obj.className = "focus";
+    //body显隐
+    var tabSrc = obj.getAttribute( "tabSrc" );
+    for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
+        var body = tabBodys[j],
+            id = body.getAttribute( "id" );
+        body.onclick = function(){
+            this.style.zoom = 1;
+        };
+        if ( id != tabSrc ) {
+            body.style.zIndex = 1;
+        } else {
+            body.style.zIndex = 200;
+        }
+    }
+
+}
+
+/**
+ * TAB切换
+ * @param tabParentId  tab的父节点ID或者对象本身
+ */
+function switchTab( tabParentId ) {
+    var tabElements = $G( tabParentId ).children,
+        tabHeads = tabElements[0].children,
+        tabBodys = tabElements[1].children;
+
+    for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
+        var head = tabHeads[i];
+        if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
+        head.onclick = function () {
+            clickHandler(tabHeads,tabBodys,this);
+        }
+    }
+}
+
+//是否区分大小写
+function getMatchCase(id) {
+    return $G(id).checked ? true : false;
+}
+//查找
+$G("nextFindBtn").onclick = function (txt, dir, mcase) {
+    var findtxt = $G("findtxt").value, obj;
+    if (!findtxt) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:1,
+        casesensitive:getMatchCase("matchCase")
+    };
+    if (!frCommond(obj)) {
+        alert(lang.getEnd);
+    }
+};
+$G("nextReplaceBtn").onclick = function (txt, dir, mcase) {
+    var findtxt = $G("findtxt1").value, obj;
+    if (!findtxt) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:1,
+        casesensitive:getMatchCase("matchCase1")
+    };
+    frCommond(obj);
+};
+$G("preFindBtn").onclick = function (txt, dir, mcase) {
+    var findtxt = $G("findtxt").value, obj;
+    if (!findtxt) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:-1,
+        casesensitive:getMatchCase("matchCase")
+    };
+    if (!frCommond(obj)) {
+        alert(lang.getStart);
+    }
+};
+$G("preReplaceBtn").onclick = function (txt, dir, mcase) {
+    var findtxt = $G("findtxt1").value, obj;
+    if (!findtxt) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:-1,
+        casesensitive:getMatchCase("matchCase1")
+    };
+    frCommond(obj);
+};
+//替换
+$G("repalceBtn").onclick = function () {
+    var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj,
+        replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, "");
+    if (!findtxt) {
+        return false;
+    }
+    if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        dir:1,
+        casesensitive:getMatchCase("matchCase1"),
+        replaceStr:replacetxt
+    };
+    frCommond(obj);
+};
+//全部替换
+$G("repalceAllBtn").onclick = function () {
+    var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj,
+        replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, "");
+    if (!findtxt) {
+        return false;
+    }
+    if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) {
+        return false;
+    }
+    obj = {
+        searchStr:findtxt,
+        casesensitive:getMatchCase("matchCase1"),
+        replaceStr:replacetxt,
+        all:true
+    };
+    var num = frCommond(obj);
+    if (num) {
+        alert(lang.countMsg.replace("{#count}", num));
+    }
+};
+//执行
+var frCommond = function (obj) {
+    return editor.execCommand("searchreplace", obj);
+};
+switchTab("searchtab");

+ 1 - 2
DjangoUeditor/static/UEditor/dialogs/snapscreen/snapscreen.html

@@ -1,5 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-    "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML>
 <html>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

+ 6 - 56
DjangoUeditor/static/UEditor/dialogs/spechars/spechars.html

@@ -4,68 +4,18 @@
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <style type="text/css">
         html,body{overflow:hidden;}
-        #specharsTab{width: 600px;height: 100%;font-size: 12px;position: relative;}
-        #tabHeads{position: relative;z-index: 10}
-        #tabHeads span{display:inline-block;width: 65px;height:26px;text-align: center; cursor: pointer; line-height: 26px; border: 1px solid #ccc; border-bottom: 0 solid #ddd; margin-left: 2px; }
-        #tabHeads span.focus{ border-bottom: none; height: 27px;background-color: #fff;}
-        #tabBodys {width: 600px;height:440px;border: 1px solid #ddd;margin-left: 2px;position: relative;top:-1px}
-        #tabBodys span{ margin: 5px 3px;text-align: center;display:inline-block;width: 40px;height:16px;cursor: pointer;line-height: 22px; }
+        #specharsTab{width: 97%;margin: 10px auto; zoom:1;position: relative}
+        .tabbody {height:447px;}
+        .tabbody span{ margin: 5px 3px;text-align: center;display:inline-block;width: 40px;height:16px;line-height: 16px;cursor: pointer; }
     </style>
 </head>
 <body>
     <div id="specharsTab">
-        <div id="tabHeads"></div><div id="tabBodys"></div>
+        <div id="tabHeads" class="tabhead"></div><div id="tabBodys" class="tabbody"></div>
     </div>
-<script type="text/javascript" src="../internal.js"></script>
-<script type="text/javascript">
-        var charsContent = [
-            { name:"tsfh",title:lang.tsfh, content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")},
-            { name:"lmsz",title:lang.lmsz, content:toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")},
-            { name:"szfh",title:lang.szfh, content:toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")},
-            { name:"rwfh",title:lang.rwfh, content:toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")},
-            { name:"xlzm",title:lang.xlzm, content:toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")},
-            { name:"ewzm",title:lang.ewzm, content:toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")},
-            { name:"pyzm",title:lang.pyzm, content:toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")},
-            { name:"zyzf",title:lang.zyzf, content:toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")}
-        ];
-        (function createTab(content){
-            for(var i =0,ci;ci = content[i++];){
-                var span = document.createElement("span");
-                span.setAttribute("tabSrc",ci.name);
-                span.innerHTML = ci.title;
-                if(i==1)span.className = "focus";
-                domUtils.on(span,"click",function(){
-                    var tmps = $G("tabHeads").children;
-                    for(var k = 0,sk;sk = tmps[k++];){
-                        sk.className = "";
-                    }
-                    tmps = $G("tabBodys").children;
-                    for(var k = 0,sk;sk = tmps[k++];){
-                        sk.style.display = "none";
-                    }
-                    this.className = "focus";
-                    $G(this.getAttribute("tabSrc")).style.display = "";
-                });
-                $G("tabHeads").appendChild(span);
-                var div = document.createElement("div");
-                div.id = ci.name;
-                div.style.display = (i==1) ? "" :"none";
-                var cons = ci.content;
-                for(var j = 0,con;con=cons[j++];){
-                    var charSpan = document.createElement("span");
-                    charSpan.innerHTML = con;
-                    domUtils.on(charSpan,"click",function(){
-                        editor.execCommand("insertHTML",this.innerHTML);
-                        dialog.close();
-                    });
-                    div.appendChild(charSpan);
-                }
-                $G("tabBodys").appendChild(div);
-            }
-        })(charsContent);
-        function toArray(str){return str.split(",");}
-</script>
+<script type="text/javascript" src="spechars.js"></script>
 </body>
 </html>

+ 56 - 0
DjangoUeditor/static/UEditor/dialogs/spechars/spechars.js

@@ -0,0 +1,56 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-9-26
+ * Time: 下午1:09
+ * To change this template use File | Settings | File Templates.
+ */
+var charsContent = [
+    { name:"tsfh", title:lang.tsfh, content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")},
+    { name:"lmsz", title:lang.lmsz, content:toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")},
+    { name:"szfh", title:lang.szfh, content:toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")},
+    { name:"rwfh", title:lang.rwfh, content:toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")},
+    { name:"xlzm", title:lang.xlzm, content:toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")},
+    { name:"ewzm", title:lang.ewzm, content:toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")},
+    { name:"pyzm", title:lang.pyzm, content:toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")},
+    { name:"zyzf", title:lang.zyzf, content:toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")}
+];
+(function createTab(content) {
+    for (var i = 0, ci; ci = content[i++];) {
+        var span = document.createElement("span");
+        span.setAttribute("tabSrc", ci.name);
+        span.innerHTML = ci.title;
+        if (i == 1)span.className = "focus";
+        domUtils.on(span, "click", function () {
+            var tmps = $G("tabHeads").children;
+            for (var k = 0, sk; sk = tmps[k++];) {
+                sk.className = "";
+            }
+            tmps = $G("tabBodys").children;
+            for (var k = 0, sk; sk = tmps[k++];) {
+                sk.style.display = "none";
+            }
+            this.className = "focus";
+            $G(this.getAttribute("tabSrc")).style.display = "";
+        });
+        $G("tabHeads").appendChild(span);
+        domUtils.insertAfter(span, document.createTextNode("\n"));
+        var div = document.createElement("div");
+        div.id = ci.name;
+        div.style.display = (i == 1) ? "" : "none";
+        var cons = ci.content;
+        for (var j = 0, con; con = cons[j++];) {
+            var charSpan = document.createElement("span");
+            charSpan.innerHTML = con;
+            domUtils.on(charSpan, "click", function () {
+                editor.execCommand("insertHTML", this.innerHTML);
+                dialog.close();
+            });
+            div.appendChild(charSpan);
+        }
+        $G("tabBodys").appendChild(div);
+    }
+})(charsContent);
+function toArray(str) {
+    return str.split(",");
+}

二進制
DjangoUeditor/static/UEditor/dialogs/table/dragicon.png


+ 75 - 0
DjangoUeditor/static/UEditor/dialogs/table/edittable.css

@@ -0,0 +1,75 @@
+.wrapper {
+    margin: 10px auto 0;
+    font-size: 12px;
+    overflow: hidden;
+}
+
+.clear {
+    clear: both;
+}
+
+.wrapper .left {
+    float: left;
+    margin-left: 10px;;
+}
+
+.wrapper .right {
+    float: right;
+    margin-right: 10px;
+    border-left: 2px dotted #EDEDED;
+    padding-left: 15px;
+}
+
+.section {
+    margin-bottom: 20px;
+    overflow: hidden;
+}
+
+.section h3 {
+    font-weight: bold;
+    padding: 5px 0;
+    margin-bottom: 10px;
+    border-bottom: 1px solid #EDEDED;
+    font-size: 12px;
+}
+
+.section ul {
+    list-style: none;
+    overflow: hidden;
+}
+
+.section li {
+    float: left;
+}
+
+.section .tone {
+    width: 80px;;
+}
+
+.section .preview {
+    width: 220px;
+}
+
+.section .preview table {
+    text-align: center;
+    vertical-align: middle;
+    color: #666;
+}
+
+.section .preview caption {
+    font-weight: bold;
+}
+
+.section .preview td {
+    border-width: 1px;
+    border-style: solid;
+    height: 22px;
+}
+
+.section .preview th {
+    border-style: solid;
+    border-color: #DDD;
+    border-width: 2px 1px 1px 1px;
+    height: 22px;
+    background-color: #F7F7F7;
+}

+ 56 - 0
DjangoUeditor/static/UEditor/dialogs/table/edittable.html

@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title></title>
+    <script type="text/javascript" src="../internal.js"></script>
+    <link rel="stylesheet" type="text/css" href="edittable.css">
+</head>
+<body>
+<div class="wrapper">
+    <div class="left">
+        <div class="section">
+            <h3><var id="lang_tableStyle"></var></h3>
+            <ul>
+                <li>
+                    <label><input type="checkbox" id="J_title" name="style"/><var id="lang_insertCaption"></var></label>
+                </li>
+                <li>
+                    <label><input type="checkbox" id="J_caption" name="style"/><var id="lang_insertTitle"></var></label>
+                </li>
+            </ul>
+            <div class="clear"></div>
+        </div>
+        <div class="section">
+            <h3><var id="lang_tableSize"></var></h3>
+            <ul>
+                <li>
+                    <label><input type="radio" id="J_autoSizeContent" name="size"/><var id="lang_autoSizeContent"></var></label>
+                </li>
+                <li>
+                    <label><input type="radio" id="J_autoSizePage" name="size"/><var id="lang_autoSizePage"></var></label>
+                </li>
+            </ul>
+            <div class="clear"></div>
+        </div>
+        <div class="section">
+            <h3><var id="lang_borderStyle"></var></h3>
+            <ul>
+                <li>
+                    <span><var id="lang_color"></var></span>
+                    <input type="text" class="tone" id="J_tone" readonly='readonly' />
+                </li>
+            </ul>
+            <div class="clear"></div>
+        </div>
+    </div>
+    <div class="right">
+        <div class="section">
+            <h3><var id="lang_example"></var></h3>
+            <div class="preview" id="J_preview">
+            </div>
+        </div>
+    </div>
+</div>
+<script type="text/javascript" src="edittable.js"></script>
+</body>
+</html>

+ 182 - 0
DjangoUeditor/static/UEditor/dialogs/table/edittable.js

@@ -0,0 +1,182 @@
+/**
+ * Created with JetBrains PhpStorm.
+ * User: xuheng
+ * Date: 12-12-19
+ * Time: 下午4:55
+ * To change this template use File | Settings | File Templates.
+ */
+(function () {
+    var title = $G("J_title"),
+        caption = $G("J_caption"),
+        autoSizeContent = $G("J_autoSizeContent"),
+        autoSizePage = $G("J_autoSizePage"),
+        tone = $G("J_tone"),
+        me,
+        preview = $G("J_preview");
+
+    var editTable = function () {
+        me = this;
+        me.init();
+    };
+    editTable.prototype = {
+        init:function () {
+            var colorPiker = new UE.ui.ColorPicker({
+                    editor:editor
+                }),
+                colorPop = new UE.ui.Popup({
+                    editor:editor,
+                    content:colorPiker
+                });
+
+            title.checked = editor.queryCommandState("inserttitle") == -1;
+            caption.checked = editor.queryCommandState("insertcaption") == -1;
+
+            me.createTable(title.checked, caption.checked);
+            me.setAutoSize();
+            me.setColor(me.getColor());
+
+            domUtils.on(title, "click", me.titleHanler);
+            domUtils.on(caption, "click", me.captionHanler);
+            domUtils.on(autoSizeContent, "click", me.autoSizeContentHanler);
+            domUtils.on(autoSizePage, "click", me.autoSizePageHanler);
+
+            domUtils.on(tone, "click", function () {
+                colorPop.showAnchor(tone);
+            });
+            domUtils.on(document, 'mousedown', function () {
+                colorPop.hide();
+            });
+            colorPiker.addListener("pickcolor", function () {
+                me.setColor(arguments[1]);
+                colorPop.hide();
+            });
+            colorPiker.addListener("picknocolor", function () {
+                me.setColor("");
+                colorPop.hide();
+            });
+        },
+
+        createTable:function (hasTitle, hasCaption) {
+            var arr = [];
+            arr.push("<table id='J_example'>");
+            if (hasCaption) {
+                arr.push("<caption>" + lang.captionName + "</caption>")
+            }
+            if (hasTitle) {
+                arr.push("<tr>");
+                for (var j = 0; j < 5; j++) {
+                    arr.push("<th>" + lang.titleName + "</th>")
+                }
+                arr.push("</tr>");
+            }
+            for (var i = 0; i < 6; i++) {
+                arr.push("<tr>");
+                for (var k = 0; k < 5; k++) {
+                    arr.push("<td>" + lang.cellsName + "</td>")
+                }
+                arr.push("</tr>");
+            }
+            arr.push("</table>");
+            preview.innerHTML = arr.join("");
+        },
+
+        titleHanler:function () {
+            var example = $G("J_example"),
+                 frg=document.createDocumentFragment(),
+                color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color");
+
+            if (title.checked) {
+                example.insertRow(0);
+                for (var i = 0, node; i < 5; i++) {
+                    node = document.createElement("th");
+                    node.innerHTML = lang.titleName;
+                    frg.appendChild(node);
+                }
+                example.rows[0].appendChild(frg);
+
+            } else {
+                domUtils.remove(example.rows[0]);
+            }
+            me.setColor(color);
+        },
+        captionHanler:function () {
+            var example = $G("J_example");
+            if (caption.checked) {
+                var row = document.createElement('caption');
+                row.innerHTML = lang.captionName;
+                example.insertBefore(row, example.firstChild);
+            } else {
+                domUtils.remove(domUtils.getElementsByTagName(example, 'caption')[0]);
+            }
+        },
+        autoSizeContentHanler:function () {
+            var example = $G("J_example");
+            example.removeAttribute("width");
+        },
+        autoSizePageHanler:function () {
+            var example = $G("J_example");
+            var tds = example.getElementsByTagName(example, "td");
+            utils.each(tds, function (td) {
+                td.removeAttribute("width");
+            });
+            example.setAttribute('width', '100%');
+        },
+
+        getColor:function () {
+            var start = editor.selection.getStart(), color,
+                cell = domUtils.findParentByTagName(start, ["td", "th", "caption"], true);
+            color = domUtils.getComputedStyle(cell, "border-color");
+            if (!color)  color = "#DDDDDD";
+            return color;
+        },
+        setColor:function (color) {
+            var example = $G("J_example"),
+                arr = domUtils.getElementsByTagName(example, "td").concat(
+                    domUtils.getElementsByTagName(example, "th"),
+                    domUtils.getElementsByTagName(example, "caption")
+                );
+
+            tone.value = color;
+            utils.each(arr, function (node) {
+                node.style.borderColor = color;
+            });
+
+        },
+        setAutoSize:function () {
+            var me = this,
+                start = editor.selection.getStart(),
+                wt = domUtils.findParentByTagName(start, "table", true).width,
+                flag = !wt;
+            if (flag) {
+                autoSizeContent.checked = flag;
+                me.autoSizeContentHanler();
+            } else {
+                autoSizePage.checked = !flag;
+                me.autoSizePageHanler();
+            }
+        }
+    };
+
+    new editTable;
+
+    dialog.onok = function () {
+        editor.__hasEnterExecCommand = true;
+
+        if (title.checked) {
+            editor.queryCommandState("inserttitle") != -1 && editor.execCommand("inserttitle")
+        } else {
+            editor.queryCommandState("deletetitle") != -1 && editor.execCommand("deletetitle");
+        }
+
+        if (caption.checked) {
+            editor.queryCommandState("insertcaption") != -1 && editor.execCommand("insertcaption")
+        } else {
+            editor.queryCommandState("deletecaption") != -1 && editor.execCommand("deletecaption");
+        }
+        editor.execCommand("edittable", tone.value);
+        autoSizeContent.checked ?editor.execCommand('adaptbytext') : "";
+        autoSizePage.checked ? editor.execCommand("adaptbywindow") : "";
+
+        editor.__hasEnterExecCommand = false;
+    };
+})();

+ 38 - 103
DjangoUeditor/static/UEditor/dialogs/table/edittd.html

@@ -1,115 +1,50 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-        "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE html>
 <html>
 <head>
     <title></title>
-    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-
+    <script type="text/javascript" src="../internal.js"></script>
     <style type="text/css">
-        * {margin: 0; padding: 0}
-        table { margin: 10px;font-size: 12px}
-        table tr { height: 25px}
-        input { width: 110px;border: 1px solid #ccc;}
-        select { width: 76px;margin-left:6px\9; }
-        span.strong {font-weight: bold;}
+        .section {
+            text-align: center;
+            margin-top: 10px;
+        }
+        .section input {
+            margin-left: 5px;
+            width: 70px;
+        }
     </style>
 </head>
 <body>
-<table>
-    <tr>
-        <td width="70"><span class="strong"><var id="lang_background"></var></span></td>
-        <td><input id="bgColor" type="text" value="#FFFFFF"></td>
-    </tr>
-    <tr>
-        <td rowspan="2"><span class="strong"><var id="lang_alignment"></var></span></td>
-        <td><var id="lang_horizontal"></var>:&nbsp;<select id="align">
-                <option value="">默认</option>
-                <option value="center">居中</option>
-                <option value="left">居左</option>
-                <option value="right">居右</option>
-            </select>
-        </td>
-    </tr>
-    <tr>
-        <td><var id="lang_vertical"></var>:&nbsp;<select id="vAlign">
-                <option value="">默认</option>
-                <option value="middle">居中</option>
-                <option value="top">顶端对齐</option>
-                <option value="bottom">底端对齐</option>
-            </select>
-        </td>
-    </tr>
-
-</table>
-<script type="text/javascript" src="../internal.js"></script>
+<div class="section">
+    <span><var id="lang_tdBkColor"></var></span>
+    <input type="text" id="J_tone"/>
+</div>
 <script type="text/javascript">
-    addColorPickListener();
-    dialog.onok = function () {
-        var tdItem = {
-            bgColor:$G( "bgColor" ).value || "#FFFFFF",
-            align:$G( "align" ).value || "",
-            vAlign:$G( "vAlign" ).value || ""
-        };
-        editor.execCommand( "edittd", tdItem );
-    };
-    (function () {
-        if ( !editor.currentSelectedArr.length ) {
-            var range = editor.selection.getRange();
-            var td = domUtils.findParentByTagName( range.startContainer, 'td', true );
-            if ( td ) {
-                $G( "bgColor" ).value = (td.bgColor || "#FFFFFF").toUpperCase();
-                $G( "align" ).value = td.align || "";
-                $G( "vAlign" ).value = td.vAlign || "";
-            }
-        }
-    })();
-    /**
-     * 绑定取色器监听事件
-     */
-    function addColorPickListener() {
-        var colorPicker = getColorPicker(),
-                ids = ["bgColor"];
-        for ( var i = 0, ci; ci = $G( ids[i++] ); ) {
-            domUtils.on( ci, "click", function () {
-                var me = this;
-                showColorPicker( colorPicker, me );
-                colorPicker.content.onpickcolor = function ( t, color ) {
-                    me.value = color.toUpperCase();
-                    colorPicker.hide();
-                };
-                colorPicker.content.onpicknocolor = function () {
-                    me.value = '';
-                    colorPicker.hide();
-                };
-            } );
-            domUtils.on( ci, "keyup", function () {
-                colorPicker.hide();
-            } );
-        }
-        domUtils.on( document, 'mousedown', function () {
-            UE.ui.Popup.postHide( this );
-        } );
-    }
-
-    /**
-     * 实例化一个colorpicker对象
-     */
-    function getColorPicker() {
-        return new UE.ui.Popup( {
-            content:new UE.ui.ColorPicker( {
-                noColorText:lang.noColor,
+    var tone = $G("J_tone"),
+            colorPiker = new UE.ui.ColorPicker({
                 editor:editor
-            } )
-        } );
-    }
-
-    /**
-     * 在anchorObj上显示colorpicker
-     * @param anchorObj
-     */
-    function showColorPicker( colorPicker, anchorObj ) {
-        colorPicker.showAnchor( anchorObj );
-    }
+            }),
+            colorPop = new UE.ui.Popup({
+                editor:editor,
+                content:colorPiker
+            });
+    domUtils.on(tone, "click", function () {
+        colorPop.showAnchor(tone);
+    });
+    domUtils.on(document, 'mousedown', function () {
+        colorPop.hide();
+    });
+    colorPiker.addListener("pickcolor", function () {
+        tone.value = arguments[1];
+        colorPop.hide();
+    });
+    colorPiker.addListener("picknocolor", function () {
+        tone.value="";
+        colorPop.hide();
+    });
+    dialog.onok=function(){
+        editor.execCommand("edittd",tone.value);
+    };
 </script>
 </body>
 </html>

+ 33 - 0
DjangoUeditor/static/UEditor/dialogs/table/edittip.html

@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>表格删除提示</title>
+    <script type="text/javascript" src="../internal.js"></script>
+    <style type="text/css">
+        .section {
+            width: 200px;
+            margin: 10px auto 0;
+            font-size: 14px;
+        }
+
+        .item {
+            text-align: center;
+        }
+    </style>
+</head>
+<body>
+<div class="section">
+    <div class="item">
+        <label><input type="radio" id="J_delRow" name="cmd" checked/><var id="lang_delRow"></var></label>
+    </div>
+    <div class="item">
+        <label><input type="radio" id="J_delCol" name="cmd"/><var id="lang_delCol"></var></label>
+    </div>
+</div>
+<script type="text/javascript">
+    dialog.onok = function () {
+        $G("J_delRow").checked ? editor.execCommand("deleterow") : editor.execCommand("deletecol");
+    };
+</script>
+</body>
+</html>

+ 19 - 0
DjangoUeditor/static/UEditor/dialogs/table/table.css

@@ -0,0 +1,19 @@
+.wrapper{margin-left: 2px;}
+.base{width: 472px;height: 70px; margin-left: 10px;margin-top:10px;border: 1px solid #ddd;}
+.wrapper legend{margin-left: 5px; font-weight: bold;font-size: 12px;color: #0066cc;}
+.wrapper fieldset table{margin-left: 5px;float: left;}
+.wrapper input{ width: 50px;border:1px solid #ccc;}
+.wrapper select{width: 50px}
+
+.base table{margin-left: 10px;}
+.base table tr{height: 25px;}
+.extend {width: 300px;height: 160px;margin:10px;;float: left;border: 1px solid #ddd;}
+.extend table{height: 135px;}
+#preview{width: 160px;height: 155px;float: left;border: 1px solid #ccc;margin: 16px 0;background-color: #eee}
+span.bold{font-weight: bold}
+#preview table {margin:3px 5px;}
+#preview table td{width: 30px;height: 20px;border: 1px solid #000;}
+#message{float: left;width: 110px;margin-left: 10px;font-size: 10px;color: red;line-height: 15px}
+#messageContent{color: green;margin-top: 5px;}
+.extend select{width: 90px}
+#bgColor{width: 85px;}

+ 2 - 22
DjangoUeditor/static/UEditor/dialogs/table/table.html

@@ -4,27 +4,8 @@
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-    <style type="text/css">
-        *{margin: 0;padding: 0;font-size: 12px;}
-        .wrapper{margin-left: 2px;}
-        .base{width: 472px;height: 70px; margin-left: 10px;margin-top:10px;border: 1px solid #ddd;}
-        legend{margin-left: 5px; font-weight: bold;font-size: 12px;color: #0066cc;}
-        fieldset table{margin-left: 5px;float: left;}
-        select{width: 50px}
-        .base table{margin-left: 10px;}
-        .base table tr{height: 25px;}
-        input{ width: 50px;border:1px solid #ccc;}
-        .extend {width: 300px;height: 160px;margin:10px;;float: left;border: 1px solid #ddd;}
-        .extend table{height: 135px;}
-        #preview{width: 160px;height: 155px;float: left;border: 1px solid #ccc;margin: 16px 0;background-color: #eee}
-        span.bold{font-weight: bold}
-        #preview table {margin:3px 5px;}
-        #preview table td{width: 30px;height: 20px;}
-        #message{float: left;width: 110px;margin-left: 10px;font-size: 10px;color: red;line-height: 15px}
-        #messageContent{color: green;margin-top: 5px;}
-        .extend select{width: 90px}
-        #bgColor{width: 85px;}
-    </style>
+    <script type="text/javascript" src="../internal.js"></script>
+    <link rel="stylesheet" type="text/css" href="table.css">
 </head>
 <body>
     <div class="wrapper">
@@ -110,7 +91,6 @@
             </div>
         </div>
     </div>
-    <script type="text/javascript" src="../internal.js"></script>
     <script type="text/javascript" src="table.js"></script>
     <script type="text/javascript">
         var inputs = document.getElementsByTagName('input'),

+ 1 - 0
DjangoUeditor/static/UEditor/dialogs/table/table.js

@@ -171,6 +171,7 @@
      */
     function getColorPicker(){
         return new UE.ui.Popup({
+            editor:editor,
             content: new UE.ui.ColorPicker({
                 noColorText: lang.noColor,
                 editor:editor

+ 4 - 1
DjangoUeditor/static/UEditor/dialogs/tangram.js

@@ -693,7 +693,7 @@ baidu.flash._Base = (function(){
         me.call = function(fnName, params, callBack){
             if(!fnName) return null;
             callBack = callBack || new Function();
-    
+
             var result = null;
     
             if(isReady){
@@ -813,6 +813,9 @@ baidu.flash.imageUploader = baidu.flash.imageUploader || function(options){
     me.pause = function(){
         _flash.call('pause');
     };
+    me.addCustomizedParams = function(index,obj){
+        _flash.call('addCustomizedParams',[index,obj]);
+    }
 };
 
 /**

+ 2 - 2
DjangoUeditor/static/UEditor/dialogs/template/config.js

@@ -30,8 +30,8 @@ var templates = [
     {
         "pre":"pre3.png",
         'title':lang.richText,
-        'preHtml':'<h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;"><span class="ue_t">[此处键入文章标题]</span><br /></h1><p><img src="http://img.baidu.com/hi/youa/y_0034.gif" width="150" height="100" border="0" hspace="0" vspace="0" style="width:150px;height:100px;float:left;" />图文混排方法</p><p>图片居左,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文</p><p><br /></p><p><img src="http://img.baidu.com/hi/youa/y_0040.gif" width="100" height="100" border="0" hspace="0" vspace="0" style="width:100px;height:100px;float:right;" /></p><p>还有没有什么其他的环绕方式呢?这里是居右环绕</p><p><br /></p><p>欢迎大家多多尝试,为UEditor提供更多高质量模板!</p>',
-        "html":'<p><br /></p><h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;"><span class="ue_t">[此处键入文章标题]</span><br /></h1><p><img src="http://img.baidu.com/hi/youa/y_0034.gif" width="300" height="200" border="0" hspace="0" vspace="0" style="width:300px;height:200px;float:left;" />图文混排方法</p><p>1. 图片居左,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文本</p><p><br /></p><p>2. 图片居右,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居右对齐,然后即可在左边输入多行文本</p><p><br /></p><p>3. 图片居中环绕排版</p><p>方法:亲,这个真心没有办法。。。</p><p><br /></p><p><br /></p><p><img src="http://img.baidu.com/hi/youa/y_0040.gif" width="300" height="300" border="0" hspace="0" vspace="0" style="width:300px;height:300px;float:right;" /></p><p>还有没有什么其他的环绕方式呢?这里是居右环绕</p><p><br /></p><p>欢迎大家多多尝试,为UEditor提供更多高质量模板!</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p><br /></p>'
+        'preHtml':'<h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;" class="ue_t">[此处键入文章标题]</h1><p><img src="http://img.baidu.com/hi/youa/y_0034.gif" width="150" height="100" border="0" hspace="0" vspace="0" style="width:150px;height:100px;float:left;" />图文混排方法</p><p>图片居左,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文</p><p><br /></p><p><img src="http://img.baidu.com/hi/youa/y_0040.gif" width="100" height="100" border="0" hspace="0" vspace="0" style="width:100px;height:100px;float:right;" /></p><p>还有没有什么其他的环绕方式呢?这里是居右环绕</p><p><br /></p><p>欢迎大家多多尝试,为UEditor提供更多高质量模板!</p>',
+        "html":'<p><br /></p><h1 label="Title center" name="tc" style="border-bottom-color:#cccccc;border-bottom-width:2px;border-bottom-style:solid;padding:0px 4px 0px 0px;text-align:center;margin:0px 0px 20px;" class="ue_t">[此处键入文章标题]</h1><p><img src="http://img.baidu.com/hi/youa/y_0034.gif" width="300" height="200" border="0" hspace="0" vspace="0" style="width:300px;height:200px;float:left;" />图文混排方法</p><p>1. 图片居左,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文本</p><p><br /></p><p>2. 图片居右,文字围绕图片排版</p><p>方法:在文字前面插入图片,设置居右对齐,然后即可在左边输入多行文本</p><p><br /></p><p>3. 图片居中环绕排版</p><p>方法:亲,这个真心没有办法。。。</p><p><br /></p><p><br /></p><p><img src="http://img.baidu.com/hi/youa/y_0040.gif" width="300" height="300" border="0" hspace="0" vspace="0" style="width:300px;height:300px;float:right;" /></p><p>还有没有什么其他的环绕方式呢?这里是居右环绕</p><p><br /></p><p>欢迎大家多多尝试,为UEditor提供更多高质量模板!</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p>占位</p><p><br /></p><p><br /></p>'
     },
     {
         "pre":"pre4.png",

+ 1 - 2
DjangoUeditor/static/UEditor/dialogs/template/template.css

@@ -1,5 +1,4 @@
-*{margin:0;padding:0;}
-.wrap{ padding: 5px;}
+.wrap{ padding: 5px;font-size: 14px;}
 .left{width:425px;float: left;}
 .right{width:160px;border: 1px solid #ccc;float: right;padding: 5px;margin-right: 5px;}
 .right .pre{height: 332px;overflow-y: auto;}

+ 1 - 1
DjangoUeditor/static/UEditor/dialogs/template/template.html

@@ -3,6 +3,7 @@
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <link rel="stylesheet" type="text/css" href="template.css">
 </head>
 <body>
@@ -19,7 +20,6 @@
         </fieldset>
         <div class="clear"></div>
     </div>
-    <script type="text/javascript" src="../internal.js"></script>
     <script type="text/javascript" src="config.js"></script>
     <script type="text/javascript" src="template.js"></script>
 </body>

+ 1 - 1
DjangoUeditor/static/UEditor/dialogs/template/template.js

@@ -48,6 +48,6 @@
     };
     initPre();
     window.pre = pre;
-    preitem.children[1].click();
+    pre(2)
 
 })();

二進制
DjangoUeditor/static/UEditor/dialogs/video/images/center_focus.jpg


二進制
DjangoUeditor/static/UEditor/dialogs/video/images/left_focus.jpg


二進制
DjangoUeditor/static/UEditor/dialogs/video/images/none_focus.jpg


二進制
DjangoUeditor/static/UEditor/dialogs/video/images/right_focus.jpg


+ 4 - 18
DjangoUeditor/static/UEditor/dialogs/video/video.css

@@ -1,22 +1,8 @@
 @charset "utf-8";
-*{ padding: 0;margin: 0}
-body{font-size: 12px;color: #888}
-.wrapper{ width: 590px;margin: 0 auto; overflow: auto; zoom:1;position: relative;padding: 10px 0}
-#tabHeads{position: relative; width:560px;padding-left:9px;z-index: 10;}
-#tabHeads span{
-    display:inline-block;
-    /*width: 82px;*/
-    padding: 0 5px;
-    height:30px;
-    text-align: center;
-    cursor: pointer;
-    line-height: 30px;
-    border: 1px solid #ccc;
-    background:url("../../themes/default/images/dialog-title-bg.png") repeat-x;
-}
-#tabHeads span.focus{ border-bottom: none; height: 31px;background-color: #fff;}
-#tabBodys{ border: 1px solid #ccc; width:570px;height:325px;margin: 0 auto;position: relative;top:-1px;}
-.panel { position: absolute; width: 570px;height:325px;background: #fff;}
+.wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative}
+.tabbody{height:335px;}
+.panel { position: absolute;width:100%; height:100%;background: #fff;}
+.panel table td{vertical-align: middle;}
 #videoUrl {
     width: 490px;
     height: 21px;

+ 3 - 3
DjangoUeditor/static/UEditor/dialogs/video/video.html

@@ -4,16 +4,17 @@
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <script type="text/javascript" src="../internal.js"></script>
     <link rel="stylesheet" type="text/css" href="video.css" />
 </head>
 <body>
 <div class="wrapper">
     <div id="videoTab">
-        <div id="tabHeads">
+        <div id="tabHeads" class="tabhead">
             <span tabSrc="video" class="focus"><var id="lang_tab_insertV"></var></span>
             <span tabSrc="videoSearch"><var id="lang_tab_searchV"></var></span>
         </div>
-        <div id="tabBodys">
+        <div id="tabBodys" class="tabbody">
             <div id="video" class="panel">
                <table><tr><td><label for="videoUrl" class="url"><var id="lang_video_url"></var></label></td><td><input id="videoUrl" type="text"></td></tr></table>
                <div id="preview"></div>
@@ -55,7 +56,6 @@
         </div>
     </div>
 </div>
-<script type="text/javascript" src="../internal.js"></script>
 <script type="text/javascript" src="video.js"></script>
 <script type="text/javascript">
     window.onload = function(){

+ 17 - 10
DjangoUeditor/static/UEditor/dialogs/video/video.js

@@ -22,7 +22,9 @@ var video = {};
                 $G("videoUrl").value = url = img.getAttribute("_url");
                 $G("videoWidth").value = img.width;
                 $G("videoHeight").value = img.height;
-                updateAlignButton(img.getAttribute("align"));
+                var align = domUtils.getComputedStyle(img,"float"),
+                    parentAlign = domUtils.getComputedStyle(img.parentNode,"text-align");
+                updateAlignButton(parentAlign==="center"?"center":align);
             }
             createPreviewVideo(url);
         })();
@@ -215,7 +217,7 @@ var video = {};
                  var div = document.createElement( "div" );
                  div.setAttribute( "name", j );
                  if ( j == "none" ) div.className="focus";
-                 div.style.cssText = "background:url(../../themes/default/images/" + j + "_focus.jpg);";
+                 div.style.cssText = "background:url(images/" + j + "_focus.jpg);";
                  div.setAttribute( "title", nameMaps[j] );
                  floatContainer.appendChild( div );
              }
@@ -264,14 +266,19 @@ var video = {};
 
         if ( !url )return;
 		var matches = url.match(/youtu.be\/(\w+)$/) || url.match(/youtube\.com\/watch\?v=(\w+)/) || url.match(/youtube.com\/v\/(\w+)/),
-            youku = url.match(/youku\.com\/v_show\/id_(\w+)/);
-		if (matches){
-			url = "https://www.youtube.com/v/" + matches[1] + "?version=3&feature=player_embedded";
-		}else if(youku){
-            url = "http://player.youku.com/player.php/sid/"+youku[1]+"/v.swf"
-        }else if(!endWith(url,[".swf",".flv",".wmv"])){
-            $G("preview").innerHTML = lang.urlError;
-            return;
+            youku = url.match(/youku\.com\/v_show\/id_(\w+)/),
+            youkuPlay = /player\.youku\.com/ig.test(url);
+        if(!youkuPlay){
+            if (matches){
+                url = "https://www.youtube.com/v/" + matches[1] + "?version=3&feature=player_embedded";
+            }else if(youku){
+                url = "http://player.youku.com/player.php/sid/"+youku[1]+"/v.swf"
+            }else if(!endWith(url,[".swf",".flv",".wmv"])){
+                $G("preview").innerHTML = lang.urlError;
+                return;
+            }
+        }else{
+            url = url.replace(/\?f=.*/,"");
         }
         $G("preview").innerHTML = '<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"' +
         ' src="' + url + '"' +

+ 3 - 11
DjangoUeditor/static/UEditor/dialogs/webapp/webapp.html

@@ -4,19 +4,11 @@
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
     <script type="text/javascript" src="../internal.js"></script>
-
     <style type="text/css">
-        #appShow {
-            width: 540px;
-            border: 1px solid #ddd;
-        }
-        .errorMsg{
-            font-size: 13px;
-            margin: 10px;
-            color: #dd0000
-        }
+        .wrapper{width: 540px; margin: 10px auto;}
+        #appShow {border: 1px solid #ddd;}
+        .errorMsg{font-size: 13px;margin: 10px;color: #dd0000}
     </style>
-
 </head>
 <body>
     <div class="wrapper">

+ 2 - 6
DjangoUeditor/static/UEditor/dialogs/wordimage/wordimage.html

@@ -4,12 +4,9 @@
 <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-
-
+    <script type="text/javascript" src="../internal.js"></script>
     <style type="text/css">
-        *{padding: 0;margin: 0}
-        body {font-size: 12px;overflow: hidden;padding: 10px;margin: 0;color: #838383;}
-        .wrapper{width: 600px;height: 352px;overflow: hidden;position: relative;border-bottom: 1px solid #d7d7d7}
+        .wrapper{width: 600px;padding: 10px;height: 352px;overflow: hidden;position: relative;border-bottom: 1px solid #d7d7d7}
         .localPath input{float: left;width: 350px;line-height: 20px;height: 20px;}
         #clipboard{float:left;width: 70px;height: 30px; }
         .description{ color: #0066cc; margin-top: 2px; width: 450px; height: 45px;float: left;line-height: 22px}
@@ -32,7 +29,6 @@
             </div>
           </div>
     </div>
-    <script type="text/javascript" src="../internal.js"></script>
     <script type="text/javascript" src="../tangram.js"></script>
     <script type="text/javascript" src="wordimage.js"></script>
     <script type="text/javascript">

+ 2 - 1
DjangoUeditor/static/UEditor/dialogs/wordimage/wordimage.js

@@ -62,7 +62,8 @@ function addUploadListener() {
 
 function showLocalPath(id) {
     //单张编辑
-    if(editor.word_img.length==1){
+    var img = editor.selection.getRange().getClosedNode();
+    if(editor.word_img.length==1 || img && img.tagName == 'IMG'){
         g(id).value = editor.word_img[0];
         return;
     }

File diff suppressed because it is too large
+ 681 - 531
DjangoUeditor/static/UEditor/editor_all.js


File diff suppressed because it is too large
+ 0 - 0
DjangoUeditor/static/UEditor/editor_all_min.js


+ 64 - 38
DjangoUeditor/static/UEditor/editor_config.js

@@ -24,8 +24,8 @@
     /**
      * 此处配置写法适用于UEditor小组成员开发使用,外部部署用户请按照上述说明方式配置即可,建议保留下面两行,以兼容可在具体每个页面配置window.UEDITOR_HOME_URL的功能。
      */
-    var tmp = window.location.pathname;
-        URL = window.UEDITOR_HOME_URL||tmp.substr(0,tmp.lastIndexOf("\/")+1).replace("_examples/","").replace("website/","");//这里你可以配置成ueditor目录在您网站的相对路径或者绝对路径(指以http开头的绝对路径)
+    var tmp = location.protocol.indexOf("file")==-1 ? location.pathname : location.href;
+    URL = window.UEDITOR_HOME_URL||tmp.substr(0,tmp.lastIndexOf("\/")+1).replace("_examples/","").replace("website/","");//这里你可以配置成ueditor目录在您网站的相对路径或者绝对路径(指以http开头的绝对路径)
 
     /**
      * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
@@ -35,11 +35,6 @@
         //为编辑器实例添加一个路径,这个不能被注释
         UEDITOR_HOME_URL : URL
 
-        //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
-        //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
-        //,lang:"zh-cn"
-        //,langPath:URL +"lang/"
-
         //图片上传配置区
         ,imageUrl:URL+"php/imageUp.php"             //图片上传提交地址
         ,imagePath:URL + "php/"                     //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
@@ -48,8 +43,8 @@
         //,maxImageSideLength:900                    //上传图片最大允许的边长,超过会自动等比缩放,不缩放就设置一个比较大的值,更多设置在image.html中
 
         //涂鸦图片配置区
-        ,scrawlUrl:URL+"php/scrawlUp.php"               //涂鸦上传地址
-        ,scrawlPath:URL+"php/"                          //图片修正地址,同imagePath
+        ,scrawlUrl:URL+"php/scrawlUp.php"           //涂鸦上传地址
+        ,scrawlPath:URL+"php/"                            //图片修正地址,同imagePath
 
         //附件上传配置区
         ,fileUrl:URL+"php/fileUp.php"               //附件上传提交地址
@@ -73,7 +68,7 @@
         ,snapscreenServerUrl: URL +"php/imageUp.php" //屏幕截图的server端保存程序,UEditor的范例代码为“URL +"server/upload/php/snapImgUp.php"”
         ,snapscreenPath: URL + "php/"
         //,snapscreenServerPort: 80                                    //屏幕截图的server端端口
-        //,snapscreenImgAlign: 'center'                                //截图的图片默认的排版方式
+        //,snapscreenImgAlign: ''                                //截图的图片默认的排版方式
 
         //word转存配置区
         ,wordImageUrl:URL + "php/imageUp.php"             //word转存提交地址
@@ -86,13 +81,13 @@
         //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
         ,toolbars:[
             ['fullscreen', 'source', '|', 'undo', 'redo', '|',
-                'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch','autotypeset', '|',
-                'blockquote', '|', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist','selectall', 'cleardoc', '|', 'customstyle',
-                'paragraph', '|','rowspacingtop', 'rowspacingbottom','lineheight', '|','fontfamily', 'fontsize', '|',
-                'directionalityltr', 'directionalityrtl', '|', '', 'indent', '|',
+                'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch','autotypeset','blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist','selectall', 'cleardoc', '|',
+                'rowspacingtop', 'rowspacingbottom','lineheight','|',
+                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
+                'directionalityltr', 'directionalityrtl', 'indent', '|',
                 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','touppercase','tolowercase','|',
-                'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright',
-                'imagecenter', '|', 'insertimage', 'emotion','scrawl', 'insertvideo', 'attachment', 'map', 'gmap', 'insertframe','highlightcode','webapp','pagebreak','template','background', '|',
+                'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright','imagecenter', '|',
+                'insertimage', 'emotion','scrawl', 'insertvideo','music','attachment', 'map', 'gmap', 'insertframe','highlightcode','webapp','pagebreak','template','background', '|',
                 'horizontal', 'date', 'time', 'spechars','snapscreen', 'wordimage', '|',
                 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', '|',
                 'print', 'preview', 'searchreplace','help']
@@ -102,9 +97,18 @@
             'anchor':'', 'undo':''
         }
         //webAppKey
-        //百度应用的APIkey,每个站长必须首先去百度官网注册一个key后方能正常使用app功能  盛怒安乐死卡解决
+        //百度应用的APIkey,每个站长必须首先去百度官网注册一个key后方能正常使用app功能
         ,webAppKey:""
 
+        //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
+        //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
+        //,lang:"zh-cn"
+        //,langPath:URL +"lang/"
+
+        //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
+        //现有如下皮肤:default
+        //,theme:'default'
+        //,themePath:URL +"themes/"
 
         //若实例化编辑器的页面手动修改的domain,此处需要设置为true
         //,customDomain:false
@@ -115,18 +119,19 @@
         //常用配置项目
         //,isShow : true    //默认显示编辑器
 
-        //,initialContent:'欢迎使用ueditor!'    //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
+        ,initialContent:''    //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
+
+        //,initialFrameWidth:1000  //初始化编辑器宽度,默认1000
+        //,initialFrameHeight:320  //初始化编辑器高度,默认320
 
         //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
 
-        //,iframeCssUrl: URL + '/themes/default/iframe.css' //给编辑器内部引入一个css文件
+        //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑器内部引入一个css文件
 
         //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
 
         //,focus:false //初始化时,是否让编辑器获得焦点true或false
 
-        ,minFrameHeight:80  // 最小高度,默认320
-
         //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
 
         //,fullscreen : false //是否开启初始化时即全屏,默认关闭
@@ -141,7 +146,7 @@
 
         //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
 
-        //,pasteplain:true  //是否纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
+        //,pasteplain:false  //是否纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
 
         //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
         //iframeUrlMap
@@ -153,21 +158,35 @@
         //insertorderedlist
         //有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
 //        ,'insertorderedlist':{
+//              //自定的样式
+//                'num':'1,2,3...',
+//                'num1':'1),2),3)...',
+//                'num2':'(1),(2),(3)...',
+//                'cn':'一,二,三....',
+//                'cn1':'一),二),三)....',
+//                'cn2':'(一),(二),(三)....',
+//             //系统自带
 //             'decimal' : '' ,         //'1,2,3...'
 //             'lower-alpha' : '' ,    // 'a,b,c...'
 //             'lower-roman' : '' ,    //'i,ii,iii...'
-//             'upper-alpha' : '' ,    //'A,B,C'
+//             'upper-alpha' : '' , lang   //'A,B,C'
 //             'upper-roman' : ''      //'I,II,III...'
 //        }
 
         //insertunorderedlist
         //无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准
         //,insertunorderedlist : {
+        //              //自定的样式
+//        'dash' :'— 破折号',
+//        'dot':' 。 小圆圈'
+//             //系统自带
         //    'circle' : '',  // '○ 小圆圈'
         //    'disc' : '',    // '● 小圆点'
         //    'square' : ''   //'■ 小方块'
         //}
-
+//        ,listDefaultPaddingLeft : '30'//默认的左边缩进的基数倍
+//        ,listiconpath : 'http://bs.baidu.com/listicon/'//自定义标号的路径
+//        ,maxListLevel : 3 //限制可以tab的级数-1不限制
         //fontfamily
         //字体设置 label留空支持多语言自动切换,若配置,则以配置值为准
 //        ,'fontfamily':[
@@ -216,7 +235,7 @@
         //,'customstyle':[
         //      {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'},
         //      {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'},
-        //      {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold;color:#000'},
+        //      {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'},
         //      {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
         //  ]
 
@@ -234,7 +253,7 @@
 //           ]
 
         //wordCount
-        //,wordCount:false          //是否开启字数统计
+        //,wordCount:true          //是否开启字数统计
         //,maximumWords:10000       //允许的最大字符数
         //字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示
         //,wordCountMsg:''   //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符
@@ -253,7 +272,7 @@
 
         //elementPathEnabled
         //是否启用元素路径,默认是显示
-        //,elementPathEnabled : false
+        //,elementPathEnabled : true
 
         //removeFormat
         //清除格式时可以删除的标签和属性
@@ -262,19 +281,25 @@
         //removeFormatAttributes属性
         //,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign'
 
-         //undo
-         //可以最多回退的次数,默认20
-         //,maxUndoCount:20
-         //当输入的字符数超过该值时,保存一次现场
-//         ,maxInputCount:1
+        //undo
+        //可以最多回退的次数,默认20
+        //,maxUndoCount:20
+        //当输入的字符数超过该值时,保存一次现场
+        //,maxInputCount:1
 
         //autoHeightEnabled
         // 是否自动长高,默认true
-        //,autoHeightEnabled:false
+        ,autoHeightEnabled:false
+
+        //scaleEnabled
+        //是否可以拉伸长高,默认true(当开启时,自动长高失效)
+        //,scaleEnabled:false
+        ,minFrameWidth:500    //编辑器拖动时最小宽度,默认800
+        ,minFrameHeight:120  //编辑器拖动时最小高度,默认220
 
         //autoFloatEnabled
         //是否保持toolbar的位置不动,默认true
-        ,autoFloatEnabled:false,
+        //,autoFloatEnabled:true
         //浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
         //,topOffset:30
 
@@ -288,12 +313,13 @@
 
         //sourceEditor
         //源码的查看方式,codemirror 是代码高亮,textarea是文本框,默认是codemirror
+        //注意默认codemirror只能在ie8+和非ie中使用
         //,sourceEditor:"codemirror"
         //如果sourceEditor是codemirror,还用配置一下两个参数
-        //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror2.15/codemirror.js"
-        //,codeMirrorJsUrl:URL + "third-party/codemirror2.15/codemirror.js"
-        //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror2.15/codemirror.css"
-        //,codeMirrorCssUrl:URL + "third-party/codemirror2.15/codemirror.css"
+        //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror/codemirror.js"
+        //,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js"
+        //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror/codemirror.css"
+        //,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css"
         //编辑器初始化完成后是否进入源码模式,默认为否。
         //,sourceEditorFirst:false
 

+ 84 - 61
DjangoUeditor/static/UEditor/lang/en/en.js

@@ -13,18 +13,27 @@ UE.I18N['en'] = {
         'pasteplain':'PastePlain', 'selectall':'SelectAll', 'print':'Print', 'preview':'Preview',
         'horizontal':'Horizontal', 'removeformat':'RemoveFormat', 'time':'Time', 'date':'Date',
         'unlink':'Unlink', 'insertrow':'InsertRow', 'insertcol':'InsertCol', 'mergeright':'MergeRight', 'mergedown':'MergeDown',
-        'deleterow':'DeleteRow', 'deletecol':'DeleteCol', 'splittorows':'SplitToRows', 'splittocols':'SplitToCols', 'splittocells':'SplitToCells',
-        'mergecells':'MergeCells', 'deletetable':'DeleteTable', 'insertparagraphbeforetable':'ParagraphBeforeTable', 'cleardoc':'Clear',
-        'fontfamily':'FontFamily', 'fontsize':'FontSize', 'paragraph':'Paragraph', 'insertimage':'Image', 'inserttable':'Table', 'link':'Link',
+        'deleterow':'DeleteRow', 'deletecol':'DeleteCol', 'splittorows':'SplitToRows',
+        'splittocols':'SplitToCols', 'splittocells':'SplitToCells','deletecaption':'DeleteCaption','inserttitle':'InsertTitle',
+        'mergecells':'MergeCells', 'deletetable':'DeleteTable', 'cleardoc':'Clear', 'insertparagraphbeforetable':"InsertParagraphBeforeTable",
+        'fontfamily':'FontFamily', 'fontsize':'FontSize', 'paragraph':'Paragraph', 'insertimage':'Image','edittable':'Edit Table', edittd:'Edit Td','link':'Link',
         'emotion':'Emotion', 'spechars':'Spechars', 'searchreplace':'SearchReplace', 'map':'BaiduMap', 'gmap':'GoogleMap',
         'insertvideo':'Video', 'help':'Help', 'justifyleft':'JustifyLeft', 'justifyright':'JustifyRight', 'justifycenter':'JustifyCenter',
         'justifyjustify':'Justify', 'forecolor':'FontColor', 'backcolor':'BackColor', 'insertorderedlist':'OL',
         'insertunorderedlist':'UL', 'fullscreen':'FullScreen', 'directionalityltr':'EnterFromLeft', 'directionalityrtl':'EnterFromRight',
         'rowspacingtop':'RowSpacingTop', 'rowspacingbottom':'RowSpacingBottom', 'highlightcode':'Code', 'pagebreak':'PageBreak', 'insertframe':'Iframe', 'imagenone':'Default',
         'imageleft':'ImageLeft', 'imageright':'ImageRight', 'attachment':'Attachment', 'imagecenter':'ImageCenter', 'wordimage':'WordImage',
-        'lineheight':'LineHeight','edittd':'EditTD', 'customstyle':'CustomStyle', 'scrawl':'Scrawl', 'autotypeset':'AutoTypeset', 'webapp':'WebAPP', 'touppercase':'UpperCase', 'tolowercase':'LowerCase','template':'Template','background':'Background'
+        'lineheight':'LineHeight','edittip':'EditTip','customstyle':'CustomStyle', 'scrawl':'Scrawl', 'autotypeset':'AutoTypeset',
+        'webapp':'WebAPP', 'touppercase':'UpperCase', 'tolowercase':'LowerCase','template':'Template','background':'Background',inserttable:'InsertTable',
+        'music':'Music'
     },
     'insertorderedlist':{
+        'num':'1,2,3...',
+        'num1':'1),2),3)...',
+        'num2':'(1),(2),(3)...',
+        'cn':'一,二,三....',
+        'cn1':'一),二),三)....',
+        'cn2':'(一),(二),(三)....',
         'decimal':'1,2,3...',
         'lower-alpha':'a,b,c...',
         'lower-roman':'i,ii,iii...',
@@ -34,7 +43,9 @@ UE.I18N['en'] = {
     'insertunorderedlist':{
         'circle':'○ Circle',
         'disc':'● Circle dot',
-        'square':'■ Rectangle '
+        'square':'■ Rectangle ',
+        'dash' :'- Dash',
+        'dot' : '。dot'
     },
     'paragraph':{'p':'Paragraph', 'h1':'Title 1', 'h2':'Title 2', 'h3':'Title 3', 'h4':'Title 4', 'h5':'Title 5', 'h6':'Title 6'},
     'fontfamily':{
@@ -80,18 +91,34 @@ UE.I18N['en'] = {
         'unlink':"Unlink",
         'paragraph':"Paragraph",
         'edittable':"Table property",
+        'aligncell':'Align cell',
+        'aligntable':'Table alignment',
+        'tableleft':'Left float',
+        'tablecenter':'Center',
+        'tableright':'Right float',
+        'aligntd':'Cell alignment',
         'edittd':"Cell property",
         'table':"Table",
         'justifyleft':'Justify Left',
-            'justifyright':'Justify Right',
-            'justifycenter':'Justify Center',
-            'justifyj':'Default',
+        'justifyright':'Justify Right',
+        'justifycenter':'Justify Center',
+        'justifyjustify':'Default',
         'deletetable':"Delete table",
-        'insertparagraphbeforetable':"Insert paragraph",
+        'insertparagraphbefore':"InsertedBeforeLine",
+        'insertparagraphafter':'InsertedAfterLine',
+        'inserttable':'Insert table',
+        'insertcaption':'Insert caption',
+        'deletecaption':'Delete Caption',
+        'inserttitle':'Insert Title',
+        'deletetitle':'Delete Title',
+        'averageDiseRow':'AverageDise Row',
+        'averageDisCol':'AverageDis Col',
         'deleterow':"Delete row",
         'deletecol':"Delete col",
         'insertrow':"Insert row",
         'insertcol':"Insert col",
+        'insertrownext':'Insert Row Next',
+        'insertcolnext':'Insert Col Next',
         'mergeright':"Merge right",
         'mergeleft':"Merge left",
         'mergedown':"Merge down",
@@ -102,7 +129,8 @@ UE.I18N['en'] = {
         'copy':"Copy(Ctrl + c)",
         'copymsg':"Please use 'Ctrl + c' instead!",
         'paste':"Paste(Ctrl + v)",
-        'pastemsg':"Please use 'Ctrl + v' instead!"
+        'pastemsg':"Please use 'Ctrl + v' instead!",
+        'highlightcode':'insert code'
     },
 
     'anthorMsg':"Link",
@@ -115,7 +143,7 @@ UE.I18N['en'] = {
     'justifyleft':'Justify Left',
     'justifyright':'Justify Right',
     'justifycenter':'Justify Center',
-    'justifyj':'Default',
+    'justify':'Default',
     'clear':'Clear',
     'anchorMsg':'Anchor',
     'delete':'Delete',
@@ -123,6 +151,10 @@ UE.I18N['en'] = {
     'unset':'Language hasn\'t been set!',
     't_row':'row',
     't_col':'col',
+    'pasteOpt':'Paste Option',
+    'pasteSourceFormat':"Keep Source Formatting",
+    'tagFormat':'Keep tag',
+    'pasteTextFormat':'Keep Text only',
     'more':'More',
     'autoTypeSet':{
         mergeLine:"Merge empty line",
@@ -174,8 +206,8 @@ UE.I18N['en'] = {
             'imgSearchBtn':{value:"Search"},
             'imgSearchReset':{value:"Clear"},
             'upload':{style:'background: url(upload.png);'},
-            'duiqi':{style:'background: url(imglabel.png) -12px 2px no-repeat;'}
-
+            'duiqi':{style:'background: url(imglabel.png) -12px 2px no-repeat;'},
+            'lang_savePath':'Select savePath:'
         },
         'netError':"Network error,please check the config!",
         'noUploadImage':"No pictures has been uploaded!",
@@ -245,6 +277,17 @@ UE.I18N['en'] = {
         'imageError':"Image failed to load!",
         'backgroundUploading':'Image is uploading,please wait...'
     },
+    'music':{
+        'static':{
+            'lang_input_tips':"Input singer/song/album, search you interested in music!",
+            'J_searchBtn':{value:'Search songs'}
+        },
+        'emptyTxt':'Not search to the relevant music results, please change a keyword try.',
+        'chapter':'Songs',
+        'singer':'Singer',
+        'special':'Album',
+        'listenTest':'Audition'
+    },
     anchor:{
         'static':{
             'lang_input_anchorName':'Anchor Name:'
@@ -309,9 +352,9 @@ UE.I18N['en'] = {
     },
     help:{
         'static':{
-            'lang_input_about':'About UEditor',
+            'lang_input_about':'About',
             'lang_input_shortcuts':'Shortcuts',
-            'lang_input_version':'Version:1.2.3',
+            'lang_input_version':'Version:1.2.5',
             'lang_input_introduction':"UEditor is developed by Baidu Co.ltd.  It is lightweight, customizable , focusing on user experience and etc. , UEditor is based on open source BSD license , allowing free use and redistribution.",
             'lang_Txt_shortcuts':'Shortcuts',
             'lang_Txt_func':'Function',
@@ -324,10 +367,8 @@ UE.I18N['en'] = {
             'lang_Txt_italic':'Italic',
             'lang_Txt_underline':'Underline',
             'lang_Txt_selectAll':'Select All',
-            'lang_Txt_removeFormat':'Remove Format',
-            'lang_Txt_leftJustification':'Justify Left',
-            'lang_Txt_rightJustification':'Justify Right',
-            'lang_Txt_visualEnter':'Submit'
+            'lang_Txt_visualEnter':'Submit',
+            'lang_Txt_fullscreen':'Fullscreen'
         }
     },
     insertframe:{
@@ -392,8 +433,8 @@ UE.I18N['en'] = {
     },
     insertvideo:{
         'static':{
-            lang_tab_insertV:"Insert Video",
-            lang_tab_searchV:"Search Video",
+            lang_tab_insertV:"Video",
+            lang_tab_searchV:"Search",
             lang_video_url:" URL ",
             lang_video_size:"Video Size",
             lang_videoW:"Width",
@@ -426,50 +467,32 @@ UE.I18N['en'] = {
         pyzm:"Phonetic",
         zyzf:"Others"
     },
-    inserttable:{
+    'edittable':{
         'static':{
-            lang_baseInfo:"Base info",
-            lang_rows:"Rows",
-            lang_rowUnit:"row",
-            lang_width:"Width",
-            lang_widthUnit:"Unit",
-            lang_height:"Height",
-            lang_heightUnit:"Unit",
-            lang_cols:"Cols",
-            lang_colUnit:"col",
-            lang_warmPrompt:"Warm prompt",
-            lang_maxPadding:"Margins maximum can't more than 13 px! ",
-            lang_extendInfo:"Extend info",
-            lang_preview:"Can preview",
-            lang_tableBorder:"Border",
-            lang_borderSize:"Size",
-            lang_borderColor:"Color",
-            lang_mar_pad:"MarginPad",
-            lang_margin:"Mar",
-            lang_padding:"Pad",
-            lang_table_background:"Table background",
-            lang_table_alignment:"Table alignment",
-            lang_borderFor:"Border for",
-            align:{options:["Default", "Justify", "Justify Left", "Justify Right"]},
-            borderType:{options:["Only table", "All cells"]},
-            lang_forPreview:"This is used for preview"
+            'lang_tableStyle':'Table style',
+            'lang_insertCaption':'Add table header row',
+            'lang_insertTitle':'Add table title row',
+            'lang_tableSize':'Automatically adjust table size',
+                'lang_autoSizeContent':'Adaptive by form text',
+            'lang_autoSizePage':'Page width adaptive',
+            'lang_example':'Example',
+            'lang_borderStyle':'Table Border',
+            'lang_color':'Color:'
         },
-        errorNum:"Please enter the right number!",
-        errorColor:"Please enter the right color!",
-        clearColor:"Clear",
-        overflowMsg:"Maximum can't more than {#value} px!",
-        overflowPreviewMsg:"More than {#value} px no longer provide real-time preview!"
+        captionName:'Caption',
+        titleName:'Title',
+        cellsName:'text'
     },
-    edittd:{
+    'edittip':{
         'static':{
-            lang_background:"Back Color",
-            lang_alignment:"Alignment",
-            lang_horizontal:"H",
-            lang_vertical:"V",
-            vAlign:{options:["Default", "Justify", "Justify Top", "Justify Bottom"]},
-            align:{options:["Default", "Justify", "Justify Left", "Justify Right"]}
-        },
-        clearColor:"Clear"
+            lang_delRow:'Delete entire row',
+            lang_delCol:'Delete entire col'
+        }
+    },
+    'edittd':{
+        'static':{
+            lang_tdBkColor:'Background Color:'
+        }
     },
     wordimage:{
         'static':{

二進制
DjangoUeditor/static/UEditor/lang/en/images/music.png


二進制
DjangoUeditor/static/UEditor/lang/zh-cn/images/music.png


+ 79 - 59
DjangoUeditor/static/UEditor/lang/zh-cn/zh-cn.js

@@ -14,17 +14,23 @@ UE.I18N['zh-cn'] = {
         'horizontal':'分隔线', 'removeformat':'清除格式', 'time':'时间', 'date':'日期',
         'unlink':'取消链接', 'insertrow':'前插入行', 'insertcol':'前插入列', 'mergeright':'右合并单元格', 'mergedown':'下合并单元格',
         'deleterow':'删除行', 'deletecol':'删除列', 'splittorows':'拆分成行', 'splittocols':'拆分成列', 'splittocells':'完全拆分单元格',
-        'mergecells':'合并多个单元格', 'deletetable':'删除表格', 'insertparagraphbeforetable':'表格前插行', 'cleardoc':'清空文档',
-        'fontfamily':'字体', 'fontsize':'字号', 'paragraph':'段落格式', 'insertimage':'图片', 'inserttable':'表格', 'link':'超链接',
-        'emotion':'表情', 'spechars':'特殊字符', 'searchreplace':'查询替换', 'map':'Baidu地图', 'gmap':'Google地图',
+        'mergecells':'合并多个单元格', 'deletetable':'删除表格', 'cleardoc':'清空文档','insertparagraphbeforetable':"表格前插入行",'fontfamily':'字体', 'fontsize':'字号', 'paragraph':'段落格式', 'insertimage':'图片',
+        'edittable':'表格属性','edittd':'单元格属性', 'link':'超链接','emotion':'表情', 'spechars':'特殊字符', 'searchreplace':'查询替换', 'map':'Baidu地图', 'gmap':'Google地图',
         'insertvideo':'视频', 'help':'帮助', 'justifyleft':'居左对齐', 'justifyright':'居右对齐', 'justifycenter':'居中对齐',
         'justifyjustify':'两端对齐', 'forecolor':'字体颜色', 'backcolor':'背景色', 'insertorderedlist':'有序列表',
         'insertunorderedlist':'无序列表', 'fullscreen':'全屏', 'directionalityltr':'从左向右输入', 'directionalityrtl':'从右向左输入',
         'rowspacingtop':'段前距', 'rowspacingbottom':'段后距', 'highlightcode':'插入代码', 'pagebreak':'分页', 'insertframe':'插入Iframe', 'imagenone':'默认',
         'imageleft':'左浮动', 'imageright':'右浮动', 'attachment':'附件', 'imagecenter':'居中', 'wordimage':'图片转存',
-        'lineheight':'行间距','edittd':'单元格', 'customstyle':'自定义标题', 'autotypeset':'自动排版', 'webapp':'百度应用', 'touppercase':'字母大写', 'tolowercase':'字母小写','background':'背景','template':'模板','scrawl':'涂鸦'
+        'lineheight':'行间距','edittip' :'编辑提示','customstyle':'自定义标题', 'autotypeset':'自动排版', 'webapp':'百度应用',
+        'touppercase':'字母大写', 'tolowercase':'字母小写','background':'背景','template':'模板','scrawl':'涂鸦','music':'音乐',inserttable:'插入表格'
     },
     'insertorderedlist':{
+        'num':'1,2,3...',
+        'num1':'1),2),3)...',
+        'num2':'(1),(2),(3)...',
+        'cn':'一,二,三....',
+        'cn1':'一),二),三)....',
+        'cn2':'(一),(二),(三)....',
         'decimal':'1,2,3...',
         'lower-alpha':'a,b,c...',
         'lower-roman':'i,ii,iii...',
@@ -32,9 +38,11 @@ UE.I18N['zh-cn'] = {
         'upper-roman':'I,II,III...'
     },
     'insertunorderedlist':{
-        'circle':'○ 小圆圈',
-        'disc':'● 小圆点',
-        'square':'■ 小方块 '
+        'circle':'○ 大圆圈',
+        'disc':'● 小黑点',
+        'square':'■ 小方块 ',
+        'dash' :'— 破折号',
+        'dot':' 。 小圆圈'
     },
     'paragraph':{'p':'段落', 'h1':'标题 1', 'h2':'标题 2', 'h3':'标题 3', 'h4':'标题 4', 'h5':'标题 5', 'h6':'标题 6'},
     'fontfamily':{
@@ -59,7 +67,7 @@ UE.I18N['zh-cn'] = {
     elementPathTip:"元素路径",
     'wordCountTip':"字数统计",
     'wordCountMsg':'当前已输入{#count}个字符, 您还可以输入{#leave}个字符。 ',
-    'wordOverFlowMsg':'<span style="color:red;">The number of characters has been exceeded maximum allowable values, the server may refuse to save!</span>',
+    'wordOverFlowMsg':'<span style="color:red;">字数超出最大允许值,服务器可能拒绝保存!</span>',
     'ok':"确认",
     'cancel':"取消",
     'closeDialog':"关闭对话框",
@@ -80,18 +88,33 @@ UE.I18N['zh-cn'] = {
         'unlink':"删除超链接",
         'paragraph':"段落格式",
         'edittable':"表格属性",
+        'aligntd':"单元格对齐方式",
+        'aligntable':'表格对齐方式',
+        'tableleft':'左浮动',
+        'tablecenter':'居中显示',
+        'tableright':'右浮动',
         'edittd':"单元格属性",
         'justifyleft':'左对齐',
         'justifyright':'右对齐',
         'justifycenter':'居中对齐',
         'justifyjustify':'两端对齐',
         'table':"表格",
+        'inserttable':'插入表格',
         'deletetable':"删除表格",
-        'insertparagraphbeforetable':"表格前插入行",
-        'deleterow':"删除行",
-        'deletecol':"删除列",
-        'insertrow':"插入行",
-        'insertcol':"插入列",
+        'insertparagraphbefore':"前插入段落",
+        'insertparagraphafter':'后插入段落',
+        'deleterow':"删除当前行",
+        'deletecol':"删除当前列",
+        'insertrow':"前插入行",
+        'insertcol':"左插入列",
+        'insertrownext':'后插入行',
+        'insertcolnext':'右插入列',
+        insertcaption:'插入表格名称',
+        'deletecaption':'删除表格名称',
+        'inserttitle':'插入表格标题行',
+        'deletetitle':'删除表格标题行',
+        'averageDiseRow':'平均分布各行',
+        'averageDisCol':'平均分布各列',
         'mergeright':"向右合并",
         'mergeleft':"向左合并",
         'mergedown':"向下合并",
@@ -102,7 +125,8 @@ UE.I18N['zh-cn'] = {
         'copy':"复制(Ctrl + c)",
         'copymsg':"请使用 'Ctrl + c'执行复制操作",
         'paste':"粘贴(Ctrl + v)",
-        'pastemsg':"请使用'Ctrl + v'执行复制操作"
+        'pastemsg':"请使用'Ctrl + v'执行复制操作",
+        'highlightcode':'插入代码'
     },
 
     'anthorMsg':"链接",
@@ -124,6 +148,10 @@ UE.I18N['zh-cn'] = {
     't_row':'行',
     't_col':'列',
     'more':'更多',
+    'pasteOpt':'粘贴选项',
+    'pasteSourceFormat':"保留源格式",
+    'tagFormat':'只保留标签',
+    'pasteTextFormat':'只保留文本',
     'autoTypeSet':{
         mergeLine:"合并空行",
         delLine:"清除空行",
@@ -175,7 +203,8 @@ UE.I18N['zh-cn'] = {
             'imgSearchBtn':{value:"百度一下"},
             'imgSearchReset':{value:"清空搜索"},
             'upload':{style:'background: url(upload.png);'},
-            'duiqi':{style:'background: url(imglabel.png) -12px 2px no-repeat;'}
+            'duiqi':{style:'background: url(imglabel.png) -12px 2px no-repeat;'},
+            'lang_savePath':'选择保存目录'
         },
         'netError':"网络链接错误,请检查配置后重试!",
         'noUploadImage':"当前未上传过任何图片!",
@@ -230,6 +259,17 @@ UE.I18N['zh-cn'] = {
         'imageError':"糟糕,图片读取失败了!",
         'backgroundUploading':'背景图片上传中,别急哦~'
     },
+    'music':{
+        'static':{
+            'lang_input_tips':"输入歌手/歌曲/专辑,搜索您感兴趣的音乐!",
+            'J_searchBtn':{value:'搜索歌曲'}
+        },
+        'emptyTxt':'未搜索到相关音乐结果,请换一个关键词试试。',
+        'chapter':'歌曲',
+        'singer':'歌手',
+        'special':'专辑',
+        'listenTest':'试听'
+    },
     'anchor':{
         'static':{
             'lang_input_anchorName':'锚点名字:'
@@ -296,7 +336,7 @@ UE.I18N['zh-cn'] = {
         'static':{
             'lang_input_about':'关于UEditor',
             'lang_input_shortcuts':'快捷键',
-            'lang_input_version':'版本:1.2.3',
+            'lang_input_version':'版本:1.2.5',
             'lang_input_introduction':'UEditor是由百度web前端研发部开发的所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点。开源基于BSD协议,允许自由使用和修改代码。',
             'lang_Txt_shortcuts':'快捷键',
             'lang_Txt_func':'功能',
@@ -309,10 +349,8 @@ UE.I18N['zh-cn'] = {
             'lang_Txt_italic':'给选中字设置为斜体',
             'lang_Txt_underline':'给选中字加下划线',
             'lang_Txt_selectAll':'全部选中',
-            'lang_Txt_removeFormat':'清除页面文字格式',
-            'lang_Txt_leftJustification':'页面文字居左显示',
-            'lang_Txt_rightJustification':'页面文字居右显示',
-            'lang_Txt_visualEnter':'软回车'
+            'lang_Txt_visualEnter':'软回车',
+             'lang_Txt_fullscreen':'全屏'
         }
     },
     'insertframe':{
@@ -411,50 +449,32 @@ UE.I18N['zh-cn'] = {
         pyzm:"拼音字母",
         zyzf:"注音及其他"
     },
-    'inserttable':{
+    'edittable':{
         'static':{
-            lang_baseInfo:"基础信息",
-            lang_rows:"行数",
-            lang_rowUnit:"行",
-            lang_width:"宽度",
-            lang_widthUnit:"px",
-            lang_height:"高度",
-            lang_heightUnit:"px",
-            lang_cols:"列数",
-            lang_colUnit:"列",
-            lang_warmPrompt:"温馨提示",
-            lang_maxPadding:"边距最大不能超过13px! ",
-            lang_extendInfo:"扩展信息",
-            lang_preview:"可预览",
-            lang_tableBorder:"表格边框",
-            lang_borderSize:"大小",
-            lang_borderColor:"颜色",
-            lang_mar_pad:"边距间距",
-            lang_margin:"边距",
-            lang_padding:"间距",
-            lang_table_background:"表格的背景颜色",
-            lang_table_alignment:"表格的对齐方式",
-            lang_borderFor:"边框设置作用于",
-            align:{options:["默认", "居中", "居左", "居右"]},
-            borderType:{options:["仅表格", "所有单元格"]},
-            lang_forPreview:"这是用来预览的"
+            'lang_tableStyle':'表格样式',
+            'lang_insertCaption':'添加表格标题行',
+            'lang_insertTitle':'添加表格名称行',
+            'lang_tableSize':'自动调整表格尺寸',
+            'lang_autoSizeContent':'按表格文字自适应',
+            'lang_autoSizePage':'按页面宽度自适应',
+            'lang_example':'示例',
+            'lang_borderStyle':'表格边框',
+            'lang_color':'颜色:'
         },
-        errorNum:"请输入正确的数值,如124,358",
-        errorColor:"请输入正确的颜色值,如#34abdd,red",
-        clearColor:"清除颜色",
-        overflowMsg:"最大值不能超过{#value}px!",
-        overflowPreviewMsg:"超过{#value} px时将不再提供实时预览。"
+        captionName:'表格名称',
+        titleName:'标题',
+        cellsName:'内容'
+    },
+    'edittip':{
+        'static':{
+            lang_delRow:'删除整行',
+            lang_delCol:'删除整列'
+        }
     },
     'edittd':{
         'static':{
-            lang_background:"背景颜色",
-            lang_alignment:"对齐方式",
-            lang_horizontal:"水平",
-            lang_vertical:"垂直",
-            vAlign:{options:["默认", "居中对齐", "顶端对齐", "底部对齐"]},
-            align:{options:["默认", "居中对齐", "左对齐", "右对齐"]}
-        },
-        clearColor:"清除颜色"
+            lang_tdBkColor:'背景颜色:'
+        }
     },
     'wordimage':{
         'static':{

+ 1582 - 0
DjangoUeditor/static/UEditor/themes/default/css/ueditor.css

@@ -0,0 +1,1582 @@
+/*基础UI构建
+*/
+/* common layer */
+.edui-default .edui-box {
+    border: none;
+    padding: 0;
+    margin: 0;
+    overflow: hidden;
+}
+
+.edui-default a.edui-box {
+    display: block;
+    text-decoration: none;
+    color: black;
+}
+
+.edui-default a.edui-box:hover {
+    text-decoration: none;
+}
+
+.edui-default a.edui-box:active {
+    text-decoration: none;
+}
+
+.edui-default table.edui-box {
+    border-collapse: collapse;
+}
+
+.edui-default ul.edui-box {
+    list-style-type: none;
+}
+
+div.edui-box {
+    position: relative;
+    display: -moz-inline-box !important;
+    display: inline-block !important;
+    vertical-align: top;
+}
+
+.edui-default .edui-clearfix {
+    zoom: 1
+}
+
+.edui-default .edui-clearfix:after {
+    content: '\20';
+    display: block;
+    clear: both;
+}
+
+ * html div.edui-box {
+    display: inline !important;
+}
+
+*:first-child+html div.edui-box {
+    display: inline !important;
+}
+
+/* control layout */
+.edui-default .edui-button-body, .edui-splitbutton-body, .edui-menubutton-body, .edui-combox-body {
+    position: relative;
+}
+
+.edui-default .edui-popup {
+    position: absolute;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+}
+
+.edui-default .edui-popup .edui-shadow {
+    position: absolute;
+    z-index: -1;
+}
+
+.edui-default .edui-popup .edui-bordereraser {
+    position: absolute;
+    overflow: hidden;
+}
+
+.edui-default .edui-tablepicker .edui-canvas {
+    position: relative;
+}
+
+.edui-default .edui-tablepicker .edui-canvas .edui-overlay {
+    position: absolute;
+}
+
+.edui-default .edui-dialog-modalmask, .edui-dialog-dragmask {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+}
+
+.edui-default .edui-toolbar {
+    position: relative;
+}
+
+/*
+ * default theme
+ */
+.edui-default .edui-label {
+    cursor: default;
+}
+
+.edui-default span.edui-clickable {
+    color: blue;
+    cursor: pointer;
+    text-decoration: underline;
+}
+
+.edui-default span.edui-unclickable {
+    color: gray;
+    cursor: default;
+}
+/* 工具栏 */
+.edui-default .edui-toolbar {
+    cursor: default;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    padding: 1px;
+    overflow: hidden; /*全屏下单独一行不占位*/
+    zoom: 1;
+}
+
+.edui-default .edui-toolbar .edui-button,
+.edui-default .edui-toolbar .edui-splitbutton,
+.edui-default .edui-toolbar .edui-menubutton,
+.edui-default .edui-toolbar .edui-combox {
+    margin: 1px;
+}
+/*UI工具栏、编辑区域、底部*/
+.edui-default .edui-editor {
+    border: 1px solid #ccc;
+    background-color: white;
+    position: relative;
+    overflow: visible;
+}
+
+.edui-default .edui-editor-toolbarbox {
+    position: relative;
+    zoom: 1;
+}
+
+.edui-default .edui-editor-toolbarboxouter {
+    border-bottom: 1px solid #ccc;
+    background: white url(../images/toolbar_bg.png) repeat-x bottom left;
+}
+
+.edui-default .edui-editor-toolbarboxinner {
+    padding: 2px;
+}
+
+.edui-default .edui-editor-iframeholder {
+    position: relative;
+    /*for fix ie6 toolbarmsg under iframe bug. relative -> static */
+    /*_position: static !important;*/
+}
+
+.edui-default .edui-editor-iframeholder textarea {
+    font-family: consolas, "Courier New", "lucida console", monospace;
+    font-size: 12px;
+    line-height: 18px;
+}
+
+.edui-default .edui-editor-bottombar {
+    /*border-top: 1px solid #ccc;*/
+    /*height: 20px;*/
+    /*width: 40%;*/
+    /*float: left;*/
+    /*overflow: hidden;*/
+}
+
+.edui-default .edui-editor-bottomContainer {
+    overflow: hidden;
+}
+
+.edui-default .edui-editor-bottomContainer table {
+    width: 100%;
+    height: 0;
+    overflow: hidden;
+    border-spacing: 0;
+}
+
+.edui-default .edui-editor-bottomContainer td {
+    white-space: nowrap;
+    border-top: 1px solid #ccc;
+    line-height: 20px;
+    font-size: 12px;
+    font-family: Arial, Helvetica, Tahoma, Verdana, Sans-Serif;
+}
+
+.edui-default .edui-editor-wordcount {
+    text-align: right;
+    margin-right: 5px;
+    color: #aaa;
+}
+.edui-default .edui-editor-scale {
+    width: 12px;
+}
+.edui-default .edui-editor-scale .edui-editor-icon {
+    float: right;
+    width: 100%;
+    height: 12px;
+    margin-top: 10px;
+    background: url(../images/scale.png) no-repeat;
+    cursor: se-resize;
+}
+.edui-default .edui-editor-breadcrumb {
+    margin: 2px 0 0 3px;
+}
+
+.edui-default .edui-editor-breadcrumb span {
+    cursor: pointer;
+    text-decoration: underline;
+    color: blue;
+}
+
+.edui-default .edui-toolbar .edui-for-fullscreen {
+    float: right;
+}
+
+.edui-default .edui-bubble .edui-popup-content {
+    border: 1px solid #DCAC6C;
+    background-color: #fff6d9;
+    padding: 5px;
+    font-size: 10pt;
+    font-family: "宋体";
+}
+
+.edui-default .edui-bubble .edui-shadow {
+    box-shadow: 1px 1px 3px #818181;
+    -webkit-box-shadow: 2px 2px 3px #818181;
+    -moz-box-shadow: 2px 2px 3px #818181;
+    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '2', MakeShadow = 'true', ShadowOpacity = '0.5');
+}
+
+.edui-default .edui-editor-toolbarmsg {
+    background-color: #FFF6D9;
+    border-bottom: 1px solid #ccc;
+    position: absolute;
+    bottom: -25px;
+    left: 0;
+    z-index: 1009;
+    width: 99.9%;
+}
+
+.edui-default .edui-editor-toolbarmsg-upload {
+    font-size: 14px;
+    color: blue;
+    width: 100px;
+    height: 16px;
+    line-height: 16px;
+    cursor: pointer;
+    position: absolute;
+    top: 5px;
+    left: 350px;
+}
+
+.edui-default .edui-editor-toolbarmsg-label {
+    font-size: 12px;
+    line-height: 16px;
+    padding: 4px;
+}
+
+.edui-default .edui-editor-toolbarmsg-close {
+    float: right;
+    width: 20px;
+    height: 16px;
+    line-height: 16px;
+    cursor: pointer;
+    color: red;
+}
+/*可选中菜单按钮*/
+.edui-default .edui-list .edui-bordereraser {
+    display: none;
+}
+
+.edui-default .edui-listitem {
+    padding: 1px;
+    white-space: nowrap;
+}
+
+.edui-default .edui-list .edui-state-hover {
+    position: relative;
+    background-color: #fff5d4;
+    border: 1px solid #dcac6c;
+    padding: 0;
+}
+
+.edui-default .edui-for-fontfamily .edui-listitem-label {
+    min-width: 120px;
+    _width: 120px;
+    font-size: 12px;
+    height: 22px;
+    line-height: 22px;
+    padding-left: 5px;
+}
+
+.edui-default .edui-for-underline .edui-listitem-label {
+    min-width: 120px;
+    _width: 120px;
+    padding: 3px 5px;
+    font-size: 12px;
+}
+
+.edui-default .edui-for-fontsize .edui-listitem-label {
+    min-width: 120px;
+    _width: 120px;
+    padding: 3px 5px;
+
+}
+
+.edui-default .edui-for-paragraph .edui-listitem-label {
+    min-width: 200px;
+    _width: 200px;
+    padding: 2px 5px;
+}
+
+.edui-default .edui-for-rowspacingtop .edui-listitem-label,
+.edui-default .edui-for-rowspacingbottom .edui-listitem-label {
+    min-width: 53px;
+    _width: 53px;
+    padding: 2px 5px;
+}
+
+.edui-default .edui-for-lineheight .edui-listitem-label {
+    min-width: 53px;
+    _width: 53px;
+    padding: 2px 5px;
+}
+
+.edui-default .edui-for-customstyle .edui-listitem-label {
+    min-width: 200px;
+    _width: 200px;
+    width: 200px !important;
+    padding: 2px 5px;
+}
+/* 可选中按钮弹出菜单*/
+.edui-default .edui-menu {
+    z-index: 3000;
+}
+
+.edui-default .edui-menu .edui-popup-content {
+    background-color: white;
+    padding: 3px;
+}
+
+.edui-default .edui-menu-body {
+    _width: 150px;
+    min-width: 150px;
+    background: url("../images/sparator_v.png") repeat-y 25px;
+}
+
+.edui-default .edui-menuitem-body {
+}
+
+.edui-default .edui-menuitem {
+    height: 20px;
+    cursor: default;
+    vertical-align: top;
+}
+
+.edui-default .edui-menuitem .edui-icon {
+    width: 20px !important;
+    height: 20px !important;
+    background: url(../images/icons.png) 0 -40px;
+    background: url(../images/icons.gif) 0 -40 px\9;
+}
+
+.edui-default .edui-menuitem .edui-label {
+    font-size: 12px;
+    line-height: 20px;
+    height: 20px;
+    padding-left: 10px;
+}
+
+.edui-default .edui-state-checked .edui-menuitem-body {
+    background: url("../images/icons-all.gif") no-repeat 6px -205px;
+}
+
+.edui-default .edui-state-disabled .edui-menuitem-label {
+    color: gray;
+}
+
+
+/*不可选中菜单按钮 */
+.edui-default .edui-toolbar .edui-combox-body .edui-button-body {
+    width: 60px;
+    font-size: 12px;
+    height: 20px;
+    line-height: 20px;
+    padding-left: 5px;
+    white-space: nowrap;
+}
+
+.edui-default .edui-toolbar .edui-combox-body .edui-arrow {
+    background: url(../images/icons.png) -741px 0;
+    _background: url(../images/icons.gif) -741px 0;
+    height: 20px;
+    width: 9px;
+}
+
+.edui-default .edui-toolbar .edui-combox .edui-combox-body {
+    border: 1px solid #CCC;
+    background-color: white;
+}
+
+.edui-default .edui-toolbar .edui-combox-body .edui-splitborder {
+    display: none;
+}
+
+.edui-default .edui-toolbar .edui-combox-body .edui-arrow {
+    border-left: 1px solid #CCC;
+}
+
+.edui-default .edui-toolbar .edui-state-hover .edui-combox-body {
+    background-color: #fff5d4;
+    border: 1px solid #dcac6c;
+}
+
+.edui-default .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow {
+    border-left: 1px solid #dcac6c;
+}
+
+.edui-default .edui-toolbar .edui-state-checked .edui-combox-body {
+    background-color: #FFE69F;
+    border: 1px solid #DCAC6C;
+}
+
+.edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow {
+    border-left: 1px solid #DCAC6C;
+}
+
+.edui-toolbar .edui-state-disabled .edui-combox-body {
+    background-color: #F0F0EE;
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+}
+
+.edui-toolbar .edui-state-opened .edui-combox-body {
+    background-color: white;
+    border: 1px solid gray;
+}
+/*普通按钮样式及状态*/
+.edui-default .edui-toolbar .edui-button .edui-icon,
+.edui-default .edui-toolbar .edui-menubutton .edui-icon,
+.edui-default .edui-toolbar .edui-splitbutton .edui-icon {
+    height: 20px !important;
+    width: 20px !important;
+    background-image: url(../images/icons.png);
+    background-image: url(../images/icons.gif) \9;
+}
+
+.edui-default .edui-toolbar .edui-button .edui-button-wrap {
+    padding: 1px;
+    position: relative;
+}
+
+.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap {
+    background-color: #fff5d4;
+    padding: 0;
+    border: 1px solid #dcac6c;
+}
+
+.edui-default .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap {
+    background-color: #ffe69f;
+    padding: 0;
+    border: 1px solid #dcac6c;
+}
+
+.edui-default .edui-toolbar .edui-button .edui-state-active .edui-button-wrap {
+    background-color: #ffffff;
+    padding: 0;
+    border: 1px solid gray;
+}
+.edui-default .edui-toolbar .edui-state-disabled .edui-label {
+    color: #ccc;
+}
+.edui-default .edui-toolbar .edui-state-disabled .edui-icon {
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+}
+/* toolbar icons */
+.edui-default .edui-for-undo .edui-icon {
+    background-position: -160px 0;
+}
+
+.edui-default  .edui-for-redo .edui-icon {
+    background-position: -100px 0;
+}
+
+.edui-default  .edui-for-bold .edui-icon {
+    background-position: 0 0;
+}
+
+.edui-default  .edui-for-italic .edui-icon {
+    background-position: -60px 0;
+}
+
+.edui-default  .edui-for-underline .edui-icon {
+    background-position: -140px 0;
+}
+
+.edui-default  .edui-for-strikethrough .edui-icon {
+    background-position: -120px 0;
+}
+
+.edui-default  .edui-for-subscript .edui-icon {
+    background-position: -600px 0;
+}
+
+.edui-default  .edui-for-superscript .edui-icon {
+    background-position: -620px 0;
+}
+
+.edui-default  .edui-for-blockquote .edui-icon {
+    background-position: -220px 0;
+}
+
+.edui-default  .edui-for-forecolor .edui-icon {
+    background-position: -720px 0;
+}
+
+.edui-default  .edui-for-backcolor .edui-icon {
+    background-position: -760px 0;
+}
+
+.edui-default  .edui-for-inserttable .edui-icon {
+    background-position: -580px -20px;
+}
+
+.edui-default  .edui-for-autotypeset .edui-icon {
+    background-position: -640px -40px;
+}
+
+.edui-default  .edui-for-justifyleft .edui-icon {
+    background-position: -460px 0;
+}
+
+.edui-default  .edui-for-justifycenter .edui-icon {
+    background-position: -420px 0;
+}
+
+.edui-default  .edui-for-justifyright .edui-icon {
+    background-position: -480px 0;
+}
+
+.edui-default  .edui-for-justifyjustify .edui-icon {
+    background-position: -440px 0;
+}
+
+.edui-default  .edui-for-insertorderedlist .edui-icon {
+    background-position: -80px 0;
+}
+
+.edui-default  .edui-for-insertunorderedlist .edui-icon {
+    background-position: -20px 0;
+}
+
+.edui-default  .edui-for-lineheight .edui-icon {
+    background-position: -725px -40px;
+}
+
+.edui-default  .edui-for-rowspacingbottom .edui-icon {
+    background-position: -745px -40px;
+}
+
+.edui-default  .edui-for-rowspacingtop .edui-icon {
+    background-position: -765px -40px;
+}
+
+.edui-default  .edui-for-horizontal .edui-icon {
+    background-position: -360px 0;
+}
+
+.edui-default  .edui-for-link .edui-icon {
+    background-position: -500px 0;
+}
+
+.edui-default  .edui-for-code .edui-icon {
+    background-position: -440px -40px;
+}
+
+.edui-default  .edui-for-insertimage .edui-icon {
+    background-position: -380px 0;
+}
+
+.edui-default  .edui-for-insertframe .edui-icon {
+    background-position: -240px -40px;
+}
+
+.edui-default  .edui-for-emoticon .edui-icon {
+    background-position: -60px -20px;
+}
+
+.edui-default  .edui-for-spechars .edui-icon {
+    background-position: -240px 0;
+}
+
+.edui-default  .edui-for-help .edui-icon {
+    background-position: -340px 0;
+}
+
+.edui-default  .edui-for-print .edui-icon {
+    background-position: -440px -20px;
+}
+
+.edui-default  .edui-for-preview .edui-icon {
+    background-position: -420px -20px;
+}
+
+.edui-default  .edui-for-selectall .edui-icon {
+    background-position: -400px -20px;
+}
+
+.edui-default  .edui-for-searchreplace .edui-icon {
+    background-position: -520px -20px;
+}
+
+.edui-default  .edui-for-map .edui-icon {
+    background-position: -40px -40px;
+}
+
+.edui-default  .edui-for-gmap .edui-icon {
+    background-position: -260px -40px;
+}
+
+.edui-default  .edui-for-insertvideo .edui-icon {
+    background-position: -320px -20px;
+}
+
+.edui-default  .edui-for-time .edui-icon {
+    background-position: -160px -20px;
+}
+
+.edui-default  .edui-for-date .edui-icon {
+    background-position: -140px -20px;
+}
+
+.edui-default  .edui-for-cut .edui-icon {
+    background-position: -680px 0;
+}
+
+.edui-default  .edui-for-copy .edui-icon {
+    background-position: -700px 0;
+}
+
+.edui-default  .edui-for-paste .edui-icon {
+    background-position: -560px 0;
+}
+
+.edui-default  .edui-for-formatmatch .edui-icon {
+    background-position: -40px 0;
+}
+
+.edui-default  .edui-for-pasteplain .edui-icon {
+    background-position: -360px -20px;
+}
+
+.edui-default  .edui-for-directionalityltr .edui-icon {
+    background-position: -20px -20px;
+}
+
+.edui-default  .edui-for-directionalityrtl .edui-icon {
+    background-position: -40px -20px;
+}
+
+.edui-default  .edui-for-source .edui-icon {
+    background-position: -260px -0px;
+}
+
+.edui-default  .edui-for-removeformat .edui-icon {
+    background-position: -580px 0;
+}
+
+.edui-default  .edui-for-unlink .edui-icon {
+    background-position: -640px 0;
+}
+
+.edui-default  .edui-for-touppercase .edui-icon {
+    background-position: -786px 0;
+}
+
+.edui-default  .edui-for-tolowercase .edui-icon {
+    background-position: -806px 0;
+}
+
+.edui-default  .edui-for-insertrow .edui-icon {
+    background-position: -740px -20px;
+}
+
+.edui-default  .edui-for-insertcol .edui-icon {
+    background-position: -700px -20px;
+}
+
+.edui-default  .edui-for-mergeright .edui-icon {
+    background-position: -60px -40px;
+}
+
+.edui-default  .edui-for-mergedown .edui-icon {
+    background-position: -80px -40px;
+}
+
+.edui-default  .edui-for-splittorows .edui-icon {
+    background-position: -100px -40px;
+}
+
+.edui-default  .edui-for-splittocols .edui-icon {
+    background-position: -120px -40px;
+}
+
+.edui-default  .edui-for-insertparagraphbeforetable .edui-icon {
+    background-position: -140px -40px;
+}
+
+.edui-default  .edui-for-deleterow .edui-icon {
+    background-position: -660px -20px;
+}
+
+.edui-default  .edui-for-deletecol .edui-icon {
+    background-position: -640px -20px;
+}
+
+.edui-default  .edui-for-splittocells .edui-icon {
+    background-position: -800px -20px;
+}
+
+.edui-default  .edui-for-mergecells .edui-icon {
+    background-position: -760px -20px;
+}
+
+.edui-default  .edui-for-deletetable .edui-icon {
+    background-position: -620px -20px;
+}
+
+.edui-default  .edui-for-cleardoc .edui-icon {
+    background-position: -520px 0;
+}
+
+.edui-default  .edui-for-fullscreen .edui-icon {
+    background-position: -100px -20px;
+}
+
+.edui-default  .edui-for-anchor .edui-icon {
+    background-position: -200px 0;
+}
+
+.edui-default  .edui-for-pagebreak .edui-icon {
+    background-position: -460px -40px;
+}
+
+.edui-default  .edui-for-imagenone .edui-icon {
+    background-position: -480px -40px;
+}
+
+.edui-default  .edui-for-imageleft .edui-icon {
+    background-position: -500px -40px;
+}
+
+.edui-default  .edui-for-wordimage .edui-icon {
+    background-position: -660px -40px;
+}
+
+.edui-default  .edui-for-imageright .edui-icon {
+    background-position: -520px -40px;
+}
+
+.edui-default  .edui-for-imagecenter .edui-icon {
+    background-position: -540px -40px;
+}
+
+.edui-default  .edui-for-indent .edui-icon {
+    background-position: -400px 0;
+}
+
+.edui-default  .edui-for-outdent .edui-icon {
+    background-position: -540px 0;
+}
+
+.edui-default  .edui-for-webapp .edui-icon {
+    background-position: -601px -40px
+}
+
+.edui-default  .edui-for-table .edui-icon {
+    background-position: -580px -20px;
+}
+
+.edui-default  .edui-for-edittable .edui-icon {
+    background-position: -420px -40px;
+}
+
+.edui-default  .edui-for-template .edui-icon {
+    background-position: -339px -40px;
+}
+
+.edui-default  .edui-for-delete .edui-icon {
+    background-position: -360px -40px;
+}
+
+.edui-default  .edui-for-highlightcode .edui-icon {
+    background-position: -440px -40px;
+}
+
+.edui-default  .edui-for-deletehighlightcode .edui-icon {
+    background-position: -360px -40px;
+}
+
+.edui-default  .edui-for-attachment .edui-icon {
+    background-position: -620px -40px;
+}
+
+.edui-default  .edui-for-edittd .edui-icon {
+    background-position: -700px -40px;
+}
+
+.edui-default  .edui-for-snapscreen .edui-icon {
+    background-position: -581px -40px
+}
+
+.edui-default  .edui-for-scrawl .edui-icon {
+    background-position: -801px -41px
+}
+
+.edui-default  .edui-for-background .edui-icon {
+    background-position: -678px -40px;
+}
+
+.edui-default  .edui-for-music .edui-icon {
+    background-position: -18px -40px
+}
+/*splitbutton*/
+.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow,
+.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow {
+    background: url(../images/icons.png) -741px 0;
+    _background: url(../images/icons.gif) -741px 0;
+    height: 20px;
+    width: 9px;
+}
+
+.edui-default .edui-toolbar .edui-splitbutton .edui-splitbutton-body,
+.edui-default .edui-toolbar .edui-menubutton .edui-menubutton-body {
+    padding: 1px;
+}
+
+.edui-default .edui-toolbar .edui-splitborder {
+    width: 1px;
+    height: 20px;
+}
+
+.edui-default .edui-toolbar .edui-state-hover .edui-splitborder {
+    width: 1px;
+    border-left: 0px solid #dcac6c;
+}
+
+.edui-default .edui-toolbar .edui-state-active .edui-splitborder {
+    width: 0;
+    border-left: 1px solid gray;
+}
+
+.edui-default .edui-toolbar .edui-state-opened .edui-splitborder {
+    width: 1px;
+    border: 0;
+}
+
+.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body,
+.edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body {
+    background-color: #fff5d4;
+    border: 1px solid #dcac6c;
+    padding: 0;
+}
+
+.edui-default .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body,
+.edui-default .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body {
+    background-color: #FFE69F;
+    border: 1px solid #DCAC6C;
+    padding: 0;
+}
+
+.edui-default .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body,
+.edui-default .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body {
+    background-color: #ffffff;
+    border: 1px solid gray;
+    padding: 0;
+}
+
+.edui-default .edui-state-disabled .edui-arrow {
+    opacity: 0.3;
+    _filter: alpha(opacity = 30);
+}
+
+.edui-default .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body,
+.edui-default .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body {
+    background-color: white;
+    border: 1px solid gray;
+    padding: 0;
+}
+
+.edui-default .edui-for-insertorderedlist .edui-bordereraser,
+.edui-default .edui-for-lineheight .edui-bordereraser,
+.edui-default .edui-for-rowspacingtop .edui-bordereraser,
+.edui-default .edui-for-rowspacingbottom .edui-bordereraser,
+.edui-default .edui-for-insertunorderedlist .edui-bordereraser {
+    background-color: white;
+}
+
+/* 解决嵌套导致的图标问题 */
+.edui-default .edui-for-insertorderedlist .edui-popup-body .edui-icon,
+.edui-default .edui-for-lineheight .edui-popup-body .edui-icon,
+.edui-default .edui-for-rowspacingtop .edui-popup-body .edui-icon,
+.edui-default .edui-for-rowspacingbottom .edui-popup-body .edui-icon,
+.edui-default .edui-for-insertunorderedlist .edui-popup-body .edui-icon {
+    /*background-position: 0 -40px;*/
+    background-image: none  ;
+}
+
+/* 弹出菜单 */
+.edui-default .edui-popup {
+    z-index: 3000;
+}
+
+.edui-default .edui-popup .edui-shadow {
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    background-color: black;
+    box-shadow: 3px 3px 5px #818181;
+    -webkit-box-shadow: 3px 3px 5px #818181;
+    -moz-box-shadow: 3px 3px 5px #818181;
+    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '3', MakeShadow = 'true', ShadowOpacity = '0.5');
+}
+
+.edui-default .edui-popup-content {
+    border: 1px solid gray;
+    background-color: white;
+    padding: 5px;
+}
+
+.edui-default .edui-popup .edui-bordereraser {
+    background-color: white;
+    height: 3px;
+}
+
+.edui-default .edui-menu .edui-bordereraser {
+    height: 3px;
+}
+
+.edui-default .edui-anchor-topleft .edui-bordereraser {
+    left: 1px;
+    top: -2px;
+}
+
+.edui-default .edui-anchor-topright .edui-bordereraser {
+    right: 1px;
+    top: -2px;
+}
+
+.edui-default .edui-anchor-bottomleft .edui-bordereraser {
+    left: 0;
+    bottom: -6px;
+    height: 7px;
+    border-left: 1px solid gray;
+    border-right: 1px solid gray;
+}
+
+.edui-default .edui-anchor-bottomright .edui-bordereraser {
+    right: 0;
+    bottom: -6px;
+    height: 7px;
+    border-left: 1px solid gray;
+    border-right: 1px solid gray;
+}
+
+/* 弹出对话框按钮和对话框大小 */
+.edui-default .edui-dialog {
+    z-index: 2000;
+    position: absolute;
+}
+
+.edui-default .edui-dialog-wrap {
+    margin-right: 6px;
+    margin-bottom: 6px;
+    border: 1px solid #c6c6c6;
+}
+
+.edui-default .edui-dialog-body {
+    position: relative;
+    background-color: white;
+    _zoom: 1;
+}
+
+.edui-default .edui-dialog-shadow {
+    position: absolute;
+    z-index: -1;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    background-color: black;
+    box-shadow: 3px 3px 5px #818181;
+    -webkit-box-shadow: 3px 3px 5px #818181;
+    -moz-box-shadow: 3px 3px 5px #818181;
+    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '3', MakeShadow = 'true', ShadowOpacity = '0.5');
+}
+
+.edui-default .edui-dialog-foot {
+    background-color: white;
+}
+
+.edui-default .edui-dialog-titlebar {
+    height: 26px;
+    border-bottom: 1px solid #c6c6c6;
+    background: url(../images/dialog-title-bg.png) repeat-x bottom;
+    position: relative;
+    cursor: move;
+}
+.edui-default .edui-dialog-caption {
+    font-weight: bold;
+    font-size: 12px;
+    line-height: 26px;
+    padding-left: 5px;
+}
+
+.edui-default .edui-dialog-draghandle {
+    height: 26px;
+}
+
+.edui-default .edui-dialog-closebutton {
+    position: absolute !important;
+    right: 5px;
+    top: 3px;
+}
+
+.edui-default .edui-dialog-closebutton .edui-button-body {
+    height: 20px;
+    width: 20px;
+    cursor: pointer;
+    background: url("../images/icons-all.gif") no-repeat 0 -59px;
+}
+
+.edui-default .edui-dialog-closebutton .edui-state-hover .edui-button-body {
+    background: url("../images/icons-all.gif") no-repeat 0 -89px;
+}
+
+.edui-default .edui-dialog-foot {
+    height: 40px;
+}
+
+.edui-default .edui-dialog-buttons {
+    position: absolute;
+    right: 0;
+}
+
+.edui-default .edui-dialog-buttons .edui-button {
+    margin-right: 10px;
+}
+
+.edui-default .edui-dialog-buttons .edui-button .edui-button-body {
+    background: url("../images/icons-all.gif") no-repeat;
+    height: 24px;
+    width: 96px;
+    font-size: 12px;
+    line-height: 24px;
+    text-align: center;
+    cursor: default;
+}
+
+.edui-default .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body {
+    background: url("../images/icons-all.gif") no-repeat 0 -30px;
+}
+
+.edui-default .edui-dialog iframe {
+    border: 0;
+    padding: 0;
+    margin: 0;
+    vertical-align: top;
+}
+
+.edui-default .edui-dialog-modalmask {
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+    background-color: #ccc;
+    position: absolute;
+    /*z-index: 1999;*/
+}
+
+.edui-default .edui-dialog-dragmask {
+    position: absolute;
+    /*z-index: 2001;*/
+    background-color: transparent;
+    cursor: move;
+}
+
+.edui-default .edui-dialog-content {
+    position: relative;
+}
+
+.edui-default .dialogcontmask {
+    cursor: move;
+    visibility: hidden;
+    display: block;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    opacity: 0;
+    filter: alpha(opacity = 0);
+}
+
+/*link-dialog*/
+.edui-default .edui-for-link .edui-dialog-content {
+    width: 420px;
+    height: 200px;
+    overflow: hidden;
+}
+/*background-dialog*/
+.edui-default .edui-for-background .edui-dialog-content {
+    width: 440px;
+    height: 280px;
+    overflow: hidden;
+}
+
+/*template-dialog*/
+.edui-default .edui-for-template .edui-dialog-content {
+    width: 630px;
+    height: 390px;
+    overflow: hidden;
+}
+
+/*scrawl-dialog*/
+.edui-default .edui-for-scrawl .edui-dialog-content {
+    width: 515px;
+    *width: 506px;
+    height: 360px;
+}
+
+/*spechars-dialog*/
+.edui-default .edui-for-spechars .edui-dialog-content {
+    width: 620px;
+    height: 500px;
+    *height: 570px;
+}
+
+/*image-dialog*/
+.edui-default .edui-for-insertimage .edui-dialog-content {
+    width: 640px;
+    height: 390px;
+    overflow: hidden;
+}
+/*webapp-dialog*/
+.edui-default .edui-for-webapp .edui-dialog-content {
+    width: 560px;
+    _width: 565px;
+    height: 450px;
+    overflow: hidden;
+}
+
+/*image-insertframe*/
+.edui-default .edui-for-insertframe .edui-dialog-content {
+    width: 350px;
+    height: 200px;
+    overflow: hidden;
+}
+
+/*wordImage-dialog*/
+.edui-default .edui-for-wordimage .edui-dialog-content {
+    width: 620px;
+    height: 380px;
+    overflow: hidden;
+}
+
+/*attachment-dialog*/
+.edui-default .edui-for-attachment .edui-dialog-content {
+    width: 480px;
+    height: 360px;
+    overflow: hidden;
+}
+
+/*code-dialog*/
+.edui-default .edui-for-highlightcode .edui-dialog-content {
+    width: 550px;
+    height: 360px;
+    overflow: hidden;
+}
+
+/*map-dialog*/
+.edui-default .edui-for-map .edui-dialog-content {
+    width: 550px;
+    height: 400px;
+}
+
+/*gmap-dialog*/
+.edui-default .edui-for-gmap .edui-dialog-content {
+    width: 550px;
+    height: 400px;
+}
+
+/*video-dialog*/
+.edui-default .edui-for-insertvideo .edui-dialog-content {
+    width: 590px;
+    height: 390px;
+}
+
+/*anchor-dialog*/
+.edui-default .edui-for-anchor .edui-dialog-content {
+    width: 320px;
+    height: 60px;
+    overflow: hidden;
+}
+
+/*searchreplace-dialog*/
+.edui-default .edui-for-searchreplace .edui-dialog-content {
+    width: 400px;
+    height: 180px;
+}
+
+/*help-dialog*/
+.edui-default .edui-for-help .edui-dialog-content {
+    width: 400px;
+    height: 420px;
+}
+
+/*edittable-dialog*/
+.edui-default .edui-for-edittable .edui-dialog-content {
+    width: 540px;
+    _width:590px;
+    height: 265px;
+}
+
+/*edittip-dialog*/
+.edui-default .edui-for-edittip .edui-dialog-content {
+    width: 225px;
+    height: 60px;
+}
+
+/*edittd-dialog*/
+.edui-default .edui-for-edittd .edui-dialog-content {
+    width: 240px;
+    height: 50px;
+}
+/*snapscreen-dialog*/
+.edui-default .edui-for-snapscreen .edui-dialog-content {
+    width: 400px;
+    height: 220px;
+}
+
+/*music-dialog*/
+.edui-default .edui-for-music .edui-dialog-content {
+    width: 515px;
+    height: 360px;
+}
+/*段落弹出菜单*/
+.edui-default .edui-for-paragraph .edui-listitem-label {
+    font-family: Tahoma, Verdana, Arial, Helvetica;
+}
+
+.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-p {
+    font-size: 22px;
+    line-height: 27px;
+}
+
+.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h1 {
+    font-weight: bolder;
+    font-size: 32px;
+    line-height: 36px;
+}
+
+.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h2 {
+    font-weight: bolder;
+    font-size: 27px;
+    line-height: 29px;
+}
+
+.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h3 {
+    font-weight: bolder;
+    font-size: 19px;
+    line-height: 23px;
+}
+
+.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h4 {
+    font-weight: bolder;
+    font-size: 16px;
+    line-height: 19px
+}
+
+.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h5 {
+    font-weight: bolder;
+    font-size: 13px;
+    line-height: 16px;
+}
+
+.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h6 {
+    font-weight: bolder;
+    font-size: 12px;
+    line-height: 14px;
+}
+/* 表格弹出菜单 */
+.edui-default .edui-for-inserttable .edui-splitborder {
+    display: none
+}
+.edui-default .edui-for-inserttable  .edui-splitbutton-body .edui-arrow {
+    width: 0
+}
+.edui-default .edui-toolbar .edui-for-inserttable  .edui-state-active .edui-splitborder{
+    border-left: 1px solid transparent;
+}
+.edui-default .edui-tablepicker .edui-infoarea {
+    height: 14px;
+    line-height: 14px;
+    font-size: 12px;
+    width: 220px;
+    margin-bottom: 3px;
+    clear: both;
+}
+
+.edui-default .edui-tablepicker .edui-infoarea .edui-label {
+    float: left;
+}
+
+.edui-default .edui-dialog-buttons .edui-label {
+    line-height: 24px;
+}
+
+.edui-default .edui-tablepicker .edui-infoarea .edui-clickable {
+    float: right;
+}
+
+.edui-default .edui-tablepicker .edui-pickarea {
+    background: url("../images/unhighlighted.gif") repeat;
+    height: 220px;
+    width: 220px;
+}
+
+.edui-default .edui-tablepicker .edui-pickarea .edui-overlay {
+    background: url("../images/highlighted.gif") repeat;
+}
+
+/* 颜色弹出菜单 */
+.edui-default .edui-colorpicker-topbar {
+    height: 27px;
+    width: 200px;
+    /*border-bottom: 1px gray dashed;*/
+}
+
+.edui-default .edui-colorpicker-preview {
+    height: 20px;
+    border: 1px inset black;
+    margin-left: 1px;
+    width: 128px;
+    float: left;
+}
+
+.edui-default .edui-colorpicker-nocolor {
+    float: right;
+    margin-right: 1px;
+    font-size: 12px;
+    line-height: 14px;
+    height: 14px;
+    border: 1px solid #333;
+    padding: 3px 5px;
+    cursor: pointer;
+}
+
+.edui-default .edui-colorpicker-tablefirstrow {
+    height: 30px;
+}
+
+.edui-default .edui-colorpicker-colorcell {
+    width: 14px;
+    height: 14px;
+    display: block;
+    margin: 0;
+    cursor: pointer;
+}
+
+.edui-default .edui-colorpicker-colorcell:hover {
+    width: 14px;
+    height: 14px;
+    margin: 0;
+}
+/*自动排版弹出菜单*/
+.edui-default .edui-autotypesetpicker .edui-autotypesetpicker-body {
+    font-size: 12px;
+    margin-bottom: 3px;
+    clear: both;
+}
+
+.edui-default .edui-autotypesetpicker-body table {
+    border-collapse: separate;
+    border-spacing: 2px;
+}
+
+.edui-default .edui-autotypesetpicker-body td {
+    font-size: 12px;
+    word-wrap:break-word;
+}
+
+.edui-default .edui-autotypesetpicker-body td input {
+    margin: 3px 3px 3px 4px;
+    *margin: 1px 0 0 0;
+}
+/*自动排版弹出菜单*/
+.edui-default .edui-cellalignpicker .edui-cellalignpicker-body {
+    width: 70px;
+    font-size: 12px;
+    cursor: default;
+}
+
+.edui-default .edui-cellalignpicker-body table {
+    border-collapse: separate;
+    border-spacing: 0;
+}
+.edui-default .edui-cellalignpicker-body td{
+    padding: 1px;
+}
+.edui-default .edui-cellalignpicker-body .edui-icon{
+    height: 20px;
+    width: 20px;
+    padding: 1px;
+    background-image: url(../images/icons.png);
+    background-image: url(../images/icons.gif) \9;
+}
+.edui-default .edui-cellalignpicker-body .edui-left{
+    background-position: -460px 0;
+}
+.edui-default .edui-cellalignpicker-body .edui-center{
+    background-position: -420px 0;
+}
+.edui-default .edui-cellalignpicker-body .edui-right{
+    background-position: -480px 0;
+}
+.edui-default .edui-cellalignpicker-body td.edui-state-hover {
+    background-color: #fff5d4;
+    padding: 0;
+    border: 1px solid #dcac6c;
+}
+/*分隔线*/
+.edui-default .edui-toolbar .edui-separator {
+    width: 2px;
+    height: 20px;
+    margin: 2px 4px 2px 3px;
+    background: url(../images/icons.png) -180px 0;
+    background: url(../images/icons.gif) -180px 0 \9;
+}
+
+/*颜色按钮 */
+.edui-default .edui-toolbar .edui-colorbutton .edui-colorlump {
+    position: absolute;
+    overflow: hidden;
+    bottom: 1px;
+    left: 1px;
+    width: 18px;
+    height: 4px;
+}
+/*表情按钮及弹出菜单*/
+/*去除了表情的下拉箭头*/
+.edui-default .edui-for-emotion .edui-icon {
+    background-position: -60px -20px;
+}
+
+.edui-default .edui-for-emotion .edui-popup-content {
+    position: relative;
+    z-index: 555
+}
+
+.edui-default .edui-for-emotion .edui-popup-content iframe {
+    width: 514px;
+    height: 380px;
+    overflow: hidden;
+}
+
+.edui-default .edui-for-emotion .edui-splitborder {
+    display: none
+}
+
+.edui-default .edui-for-emotion .edui-splitbutton-body .edui-arrow {
+    width: 0
+}
+.edui-default .edui-toolbar .edui-for-emotion  .edui-state-active .edui-splitborder{
+    border-left: 1px solid transparent;
+}
+/*contextmenu*/
+.edui-default .edui-hassubmenu .edui-arrow {
+    height: 20px;
+    width: 20px;
+    float: right;
+    background: url("../images/icons-all.gif") no-repeat 10px -233px;
+}
+
+.edui-default .edui-menu-body .edui-menuitem {
+    padding: 1px;
+}
+
+.edui-default .edui-menuseparator {
+    margin: 2px 0;
+    height: 1px;
+    overflow: hidden;
+}
+
+.edui-default .edui-menuseparator-inner {
+    border-bottom: 1px solid #e2e3e3;
+    margin-left: 29px;
+    margin-right: 1px;
+}
+
+.edui-default .edui-menu-body .edui-state-hover {
+    padding: 0 !important;
+    background-color: #fff5d4;
+    border: 1px solid #dcac6c;
+}
+/*粘贴弹出菜单*/
+.edui-default .edui-wordpastepop .edui-popup-content{
+    border: none;
+    padding: 0;
+    width: 54px;
+    height: 21px;
+}
+.edui-default  .edui-pasteicon {
+    width: 100%;
+    height: 100%;
+    background-image: url('../images/wordpaste.png');
+    background-position: 0 0;
+}
+
+.edui-default  .edui-pasteicon.edui-state-opened {
+    background-position: 0 -34px;
+}
+
+.edui-default  .edui-pastecontainer {
+    position: relative;
+    visibility: hidden;
+    width: 97px;
+    background: #fff;
+    border: 1px solid #ccc;
+}
+
+.edui-default  .edui-pastecontainer .edui-title {
+    font-weight: bold;
+    background: #F8F8FF;
+    height: 25px;
+    line-height: 25px;
+    font-size: 12px;
+    padding-left: 5px;
+}
+
+.edui-default  .edui-pastecontainer .edui-button {
+    overflow: hidden;
+    margin: 3px 0;
+}
+
+.edui-default  .edui-pastecontainer .edui-button .edui-richtxticon,
+.edui-default  .edui-pastecontainer .edui-button .edui-tagicon,
+.edui-default  .edui-pastecontainer .edui-button .edui-plaintxticon{
+    float: left;
+    cursor: pointer;
+    width: 29px;
+    height: 29px;
+    margin-left: 5px;
+    background-image: url('../images/wordpaste.png');
+    background-repeat: no-repeat;
+}
+.edui-default  .edui-pastecontainer .edui-button .edui-richtxticon {
+    margin-left: 0;
+    background-position: -109px 0;
+}
+.edui-default  .edui-pastecontainer .edui-button .edui-tagicon {
+    background-position: -148px 1px;
+}
+
+.edui-default  .edui-pastecontainer .edui-button .edui-plaintxticon {
+    background-position: -72px 0;
+}
+
+.edui-default  .edui-pastecontainer .edui-button .edui-state-hover .edui-richtxticon {
+    background-position: -109px -34px;
+}
+.edui-default  .edui-pastecontainer .edui-button .edui-state-hover .edui-tagicon{
+    background-position: -148px -34px;
+}
+.edui-default  .edui-pastecontainer .edui-button  .edui-state-hover .edui-plaintxticon{
+    background-position: -72px -34px;
+}

+ 100 - 0
DjangoUeditor/static/UEditor/themes/default/dialogbase.css

@@ -0,0 +1,100 @@
+/*弹出对话框页面样式组件
+*/
+
+/*reset
+*/
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, font, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td {
+    margin: 0;
+    padding: 0;
+    outline: 0;
+    font-size: 100%;
+}
+
+body {
+    line-height: 1;
+}
+
+ol, ul {
+    list-style: none;
+}
+
+blockquote, q {
+    quotes: none;
+}
+
+ins {
+    text-decoration: none;
+}
+
+del {
+    text-decoration: line-through;
+}
+
+table {
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+/*module
+*/
+body {
+    background-color: #fff;
+    font: 12px/1.5 "宋体", "Arial Narrow", HELVETICA;
+    color: #646464;
+}
+
+/*tab*/
+.tabhead {
+    position: relative;
+    z-index: 10;
+}
+
+.tabhead span {
+    display: inline-block;
+    padding: 0 5px;
+    height: 30px;
+    border: 1px solid #ccc;
+    background: url("images/dialog-title-bg.png") repeat-x;
+    text-align: center;
+    line-height: 30px;
+    cursor: pointer;
+    *margin-right: 5px;
+}
+
+.tabhead span.focus {
+    height: 31px;
+    border-bottom: none;
+    background: #fff;
+}
+
+.tabbody {
+    position: relative;
+    top: -1px;
+    margin: 0 auto;
+    border: 1px solid #ccc;
+}
+
+/*button*/
+a.button {
+    display: block;
+    text-align: center;
+    line-height: 24px;
+    text-decoration: none;
+    height: 24px;
+    width: 95px;
+    border: 0;
+    color: #838383;
+    background: url(../../themes/default/images/icons-all.gif) no-repeat;
+}
+
+a.button:hover {
+    background-position: 0 -30px;
+}

二進制
DjangoUeditor/static/UEditor/themes/default/images/cursor_h.gif


二進制
DjangoUeditor/static/UEditor/themes/default/images/cursor_h.png


二進制
DjangoUeditor/static/UEditor/themes/default/images/cursor_v.gif


二進制
DjangoUeditor/static/UEditor/themes/default/images/cursor_v.png


二進制
DjangoUeditor/static/UEditor/themes/default/images/highlighted.gif


二進制
DjangoUeditor/static/UEditor/themes/default/images/icons.gif


二進制
DjangoUeditor/static/UEditor/themes/default/images/icons.png


二進制
DjangoUeditor/static/UEditor/themes/default/images/scale.png


二進制
DjangoUeditor/static/UEditor/themes/default/images/sparator_v.png


二進制
DjangoUeditor/static/UEditor/themes/default/images/unhighlighted.gif


二進制
DjangoUeditor/static/UEditor/themes/default/images/wordpaste.png


+ 1773 - 0
DjangoUeditor/static/UEditor/themes/gorgeous/css/ueditor.css

@@ -0,0 +1,1773 @@
+/*基础UI构建
+*/
+/* common layer */
+.edui-gorgeous .edui-box {
+    border: none;
+    padding: 0;
+    margin: 0;
+    overflow: hidden;
+}
+
+.edui-gorgeous a.edui-box {
+    display: block;
+    text-decoration: none;
+    color: black;
+}
+
+.edui-gorgeous a.edui-box:hover {
+    text-decoration: none;
+}
+
+.edui-gorgeous a.edui-box:active {
+    text-decoration: none;
+}
+
+.edui-gorgeous table.edui-box {
+    border-collapse: collapse;
+}
+
+.edui-gorgeous ul.edui-box {
+    list-style-type: none;
+}
+
+div.edui-box {
+    position: relative;
+    display: -moz-inline-box !important;
+    display: inline-block !important;
+    vertical-align: top;
+}
+
+.edui-gorgeous .edui-clearfix {
+    zoom: 1
+}
+
+.edui-gorgeous .edui-clearfix:after {
+    content: '\20';
+    display: block;
+    clear: both;
+}
+
+* html div.edui-box {
+    display: inline !important;
+}
+
+*:first-child+html div.edui-box {
+    display: inline !important;
+}
+
+/* control layout */
+.edui-gorgeous .edui-button-body, .edui-splitbutton-body, .edui-menubutton-body, .edui-combox-body {
+    position: relative;
+}
+
+.edui-gorgeous .edui-popup {
+    position: absolute;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+}
+
+.edui-gorgeous .edui-popup .edui-shadow {
+    position: absolute;
+    z-index: -1;
+}
+
+.edui-gorgeous .edui-popup .edui-bordereraser {
+    position: absolute;
+    overflow: hidden;
+}
+
+.edui-gorgeous .edui-tablepicker .edui-canvas {
+    position: relative;
+}
+
+.edui-gorgeous .edui-tablepicker .edui-canvas .edui-overlay {
+    position: absolute;
+}
+
+.edui-gorgeous .edui-dialog-modalmask, .edui-dialog-dragmask {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+}
+
+.edui-gorgeous .edui-toolbar {
+    position: relative;
+}
+
+/*
+ * default theme
+ */
+.edui-gorgeous .edui-label {
+    cursor: default;
+    font-family: "Microsoft Yahei", "微软雅黑", Tahoma, Arial, Helvetica, STHeiti;
+}
+
+.edui-gorgeous span.edui-clickable {
+    color: #39C;
+    cursor: pointer;
+    text-decoration: underline;
+}
+
+.edui-gorgeous span.edui-unclickable {
+    color: gray;
+    cursor: default;
+}
+/* 工具栏 */
+.edui-gorgeous .edui-toolbar {
+    cursor: default;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    padding: 1px;
+    overflow: hidden; /*全屏下单独一行不占位*/
+    zoom: 1;
+}
+.edui-gorgeous .edui-toolbar .edui-button,
+.edui-gorgeous .edui-toolbar .edui-splitbutton,
+.edui-gorgeous .edui-toolbar .edui-menubutton,
+.edui-gorgeous .edui-toolbar .edui-combox {
+    margin:2px 2px 0 0;
+}
+/*UI工具栏、编辑区域、底部*/
+.edui-gorgeous .edui-editor {
+    border: 1px solid #8B96AD;
+    border-radius: 5px;
+    background-color: white;
+    position: relative;
+    overflow: visible;
+    box-shadow: 3px 3px 5px #CACACA
+}
+
+.edui-gorgeous .edui-editor-toolbarbox {
+    position: relative;
+    zoom: 1;
+    border-bottom: 1px solid #8B96AD;
+}
+
+.edui-gorgeous .edui-editor-toolbarboxouter {
+    border: 1px solid #878c96;
+    border-radius: 5px;
+    border-bottom-right-radius:0;
+    border-bottom-left-radius: 0;
+    background:url(../images/toolbar-bg.png) right top no-repeat;
+    background-color: #263B55;
+}
+
+.edui-gorgeous .edui-editor-toolbarboxinner {
+    padding: 2px;
+}
+
+.edui-gorgeous .edui-editor-iframeholder {
+    position: relative;
+    /*for fix ie6 toolbarmsg under iframe bug. relative -> static */
+    /*_position: static !important;*/
+}
+
+.edui-gorgeous .edui-editor-iframeholder textarea {
+    font-family: consolas, "Courier New", "lucida console", monospace;
+    font-size: 12px;
+    line-height: 18px;
+}
+
+.edui-gorgeous .edui-editor-bottomContainer {
+    overflow: hidden;
+    border: 1px solid #8B96AD;
+    border-radius: 5px;
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    background-color: #263B55;
+}
+
+.edui-gorgeous .edui-editor-bottomContainer table {
+    width: 100%;
+    height: 0;
+    overflow: hidden;
+    border-spacing: 0;
+    border-collapse: collapse;
+}
+
+.edui-gorgeous .edui-editor-bottomContainer td {
+    white-space: nowrap;
+    border-top: 1px solid #868b96;
+    line-height: 20px;
+    font-size: 12px;
+    font-family: Arial, Helvetica, Tahoma, Verdana, Sans-Serif;
+}
+
+.edui-gorgeous .edui-editor-wordcount {
+    text-align: right;
+    margin-right: 5px;
+    color: #fff;
+}
+.edui-gorgeous .edui-editor-scale {
+    width: 12px;
+}
+.edui-gorgeous .edui-editor-scale .edui-editor-icon {
+    float: right;
+    width: 100%;
+    height: 12px;
+    margin-top: 10px;
+    background: url(../images/scale.png) no-repeat;
+    cursor: se-resize;
+}
+.edui-gorgeous .edui-editor-breadcrumb {
+    margin: 2px 0 0 3px;
+    color: #fff;
+}
+
+.edui-gorgeous .edui-editor-breadcrumb span {
+    cursor: pointer;
+    text-decoration: underline;
+    color: #fff;
+}
+
+.edui-gorgeous .edui-toolbar .edui-for-fullscreen {
+    float: right;
+}
+
+.edui-gorgeous .edui-bubble .edui-popup-content {
+    border: 1px solid #8B96AD;
+    background-color:#263B55;
+    padding: 5px;
+    font-size: 10pt;
+    font-family: "宋体";
+    border-radius: 3px;
+}
+
+.edui-gorgeous .edui-bubble .edui-shadow {
+    box-shadow:3px 3px 5px #CACACA;
+    -webkit-box-shadow: 3px 3px 5px #CACACA;
+    -moz-box-shadow:  3px 3px 5px #CACACA;
+    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '3', MakeShadow = 'true', ShadowOpacity = '0.5');
+}
+
+.edui-gorgeous .edui-editor-toolbarmsg {
+    background-color: #FFF6D9;
+    border-bottom: 1px solid #ccc;
+    position: absolute;
+    bottom: -25px;
+    left: 0;
+    z-index: 1009;
+    width: 99.9%;
+}
+
+.edui-gorgeous .edui-editor-toolbarmsg-upload {
+    font-size: 14px;
+    color: blue;
+    width: 100px;
+    height: 16px;
+    line-height: 16px;
+    cursor: pointer;
+    position: absolute;
+    top: 5px;
+    left: 350px;
+}
+
+.edui-gorgeous .edui-editor-toolbarmsg-label {
+    font-size: 12px;
+    line-height: 16px;
+    padding: 4px;
+}
+
+.edui-gorgeous .edui-editor-toolbarmsg-close {
+    float: right;
+    width: 20px;
+    height: 16px;
+    line-height: 16px;
+    cursor: pointer;
+    color: red;
+}
+/*可选中菜单按钮*/
+.edui-gorgeous .edui-list .edui-bordereraser {
+    display: none;
+}
+
+.edui-gorgeous .edui-listitem {
+    padding: 1px;
+    white-space: nowrap;
+}
+
+.edui-gorgeous .edui-list .edui-state-hover {
+    position: relative;
+    border: 1px solid #A5ADB9;
+    padding: 0;
+    border-radius: 3px;
+}
+
+.edui-gorgeous .edui-for-fontfamily .edui-listitem-label {
+    min-width: 120px;
+    _width: 120px;
+    font-size: 12px;
+    height: 22px;
+    line-height: 22px;
+    padding-left: 5px;
+}
+
+.edui-gorgeous .edui-for-underline .edui-listitem-label {
+    min-width: 120px;
+    _width: 120px;
+    padding: 3px 5px;
+    font-size: 12px;
+}
+
+.edui-gorgeous .edui-for-fontsize .edui-listitem-label {
+    min-width: 120px;
+    _width: 120px;
+    padding: 3px 5px;
+}
+
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label {
+    min-width: 200px;
+    _width: 200px;
+    padding: 2px 5px;
+}
+
+.edui-gorgeous .edui-for-rowspacingtop .edui-listitem-label,
+.edui-gorgeous .edui-for-rowspacingbottom .edui-listitem-label {
+    min-width: 53px;
+    _width: 53px;
+    padding: 2px 5px;
+}
+
+.edui-gorgeous .edui-for-lineheight .edui-listitem-label {
+    min-width: 53px;
+    _width: 53px;
+    padding: 2px 5px;
+}
+
+.edui-gorgeous .edui-for-customstyle .edui-listitem-label {
+    min-width: 200px;
+    _width: 200px;
+    width: 200px !important;
+    padding: 2px 5px;
+    line-height: 38px;
+}
+/* 可选中按钮弹出菜单*/
+.edui-gorgeous .edui-menu {
+    z-index: 3000;
+}
+
+.edui-gorgeous .edui-menu .edui-popup-content {
+    background-color: #263B55;
+    padding: 3px;
+}
+
+.edui-gorgeous .edui-menu-body {
+    _width: 150px;
+    min-width: 150px;
+    background: url("../images/sparator_v.png") repeat-y 30px;
+}
+
+.edui-gorgeous .edui-menuitem-body {
+}
+
+.edui-gorgeous .edui-menuitem {
+    height: 29px;
+    cursor: default;
+    vertical-align: top;
+}
+
+.edui-gorgeous .edui-menuitem .edui-icon {
+    width: 29px !important;
+    height: 29px !important;
+    background: url(../images/icons.png) 0 -40px;
+    _background: url(../images/icons.gif) 0 -40px;
+}
+
+.edui-gorgeous .edui-menuitem .edui-label {
+    font-size: 12px;
+    line-height: 29px;
+    height: 29px;
+    padding-left: 5px;
+}
+
+.edui-gorgeous .edui-state-checked .edui-menuitem-body {
+    background: url("../images/icons-all.png") no-repeat 6px -205px;
+}
+
+.edui-gorgeous .edui-state-disabled .edui-menuitem-label {
+    color: gray;
+}
+
+.edui-gorgeous .edui-state-disabled .edui-icon {
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+}
+/*不可选中菜单按钮 */
+.edui-gorgeous .edui-toolbar .edui-combox-body .edui-button-body {
+    width: 60px;
+    font-size: 12px;
+    height: 20px;
+    line-height: 20px;
+    padding-left: 5px;
+    white-space: nowrap;
+}
+
+.edui-gorgeous .edui-toolbar .edui-combox-body .edui-arrow {
+    background:url(../images/icons.png) -1220px -7px;
+    _background: url(../images/icons.gif) -1220px -7px;
+    height: 20px;
+    width: 9px;
+}
+
+.edui-gorgeous .edui-toolbar .edui-combox .edui-combox-body {
+    border: 1px solid #fff;
+    border-radius: 3px;
+    color: #fff;
+    margin: 9px 3px 0 0
+}
+
+.edui-gorgeous .edui-toolbar .edui-combox-body .edui-splitborder {
+    display: none;
+}
+
+.edui-gorgeous .edui-toolbar .edui-combox-body .edui-arrow {
+    border-left: 1px solid #fff;
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-hover .edui-combox-body {
+    border: 1px solid #A5ADB9;
+    border-radius: 3px;
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-active .edui-combox-body {
+    border: 1px solid #fff;
+    border-radius: 3px;
+    background-color: transparent;
+    background-image: none;
+}
+.edui-gorgeous .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow {
+    border-left: 1px solid #A5ADB9;
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-checked .edui-combox-body {
+    background-color: #263B55;
+    border: 1px solid #6A7085;
+
+    background-image: -webkit-gradient(linear, left top, left bottom, from(#72788E), to(#1F2949));
+    background-image: -webkit-linear-gradient(top, #72788E, #1F2949);
+    background-image: -moz-linear-gradient(top, #72788E, #1F2949);
+    background-image: -o-linear-gradient(top, #72788E, #1F2949);
+    background-image: linear-gradient(to bottom, #72788E, #1F2949);
+    border-radius: 3px;
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow {
+    border-left: 1px solid #6A7085;
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-disabled .edui-combox-body {
+    background-color: #263B55;
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-opened .edui-combox-body {
+    background-color: #263B55;
+    border: 1px solid #fff;
+}
+/*普通按钮样式及状态*/
+.edui-gorgeous  .edui-toolbar .edui-button .edui-icon,
+.edui-gorgeous  .edui-toolbar .edui-menubutton .edui-icon,
+.edui-gorgeous  .edui-toolbar .edui-splitbutton .edui-icon {
+    height: 29px !important;
+    width: 29px !important;
+    background-image: url(../images/icons.png);
+    _background-image: url(../images/icons.gif);
+}
+
+.edui-gorgeous  .edui-toolbar .edui-button .edui-state-hover .edui-icon,
+.edui-gorgeous  .edui-toolbar .edui-menubutton .edui-state-hover .edui-icon,
+.edui-gorgeous  .edui-toolbar .edui-splitbutton .edui-state-hover .edui-icon {
+    background-image: url(../images/icons-hover.png);
+    _background-image: url(../images/icons-hover.gif);
+}
+
+.edui-gorgeous  .edui-toolbar .edui-button .edui-state-checked .edui-icon,
+.edui-gorgeous  .edui-toolbar .edui-menubutton .edui-state-checked .edui-icon,
+.edui-gorgeous  .edui-toolbar .edui-splitbutton .edui-state-checked .edui-icon {
+    background-image: url(../images/icons-checked.png);
+    _background-image: url(../images/icons-checked.gif);
+}
+.edui-gorgeous  .edui-toolbar .edui-state-disabled .edui-label {
+    color: gray;
+}
+.edui-gorgeous  .edui-toolbar .edui-state-disabled .edui-icon {
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+}
+/*每个按钮外面的框*/
+.edui-gorgeous  .edui-toolbar .edui-button .edui-button-wrap {
+    padding: 1px;
+    position: relative;
+    margin-top: 5px;
+}
+
+.edui-gorgeous  .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap {
+    padding: 0;
+    border: 1px solid #A5ADB9;
+    border-radius: 3px;
+}
+
+.edui-gorgeous  .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap {
+    padding: 0;
+    border: 1px solid #A5ADB9;
+    border-radius: 3px;
+}
+
+.edui-gorgeous  .edui-toolbar .edui-button .edui-state-active .edui-button-wrap {
+    padding: 0;
+    border: 1px solid #fff;
+    background-color: transparent;
+    background-image: none;
+    border-radius: 3px;
+}
+/* 每个按钮的default、hover、active、checked背景位置*/
+.edui-gorgeous .edui-for-undo .edui-icon,
+.edui-gorgeous .edui-for-undo .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-undo .edui-state-checked .edui-icon {
+    background-position: -267px -3px
+}
+
+.edui-gorgeous .edui-for-redo .edui-icon,
+.edui-gorgeous .edui-for-redo .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-redo .edui-state-checked .edui-icon {
+    background-position: -166px -3px
+}
+
+.edui-gorgeous .edui-for-bold .edui-icon,
+.edui-gorgeous .edui-for-bold .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-bold .edui-state-checked .edui-icon {
+    background-position: 0 -3px
+}
+
+.edui-gorgeous .edui-for-italic .edui-icon,
+.edui-gorgeous .edui-for-italic .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-italic .edui-state-checked .edui-icon {
+    background-position: -99px -3px
+}
+
+.edui-gorgeous .edui-for-underline .edui-icon,
+.edui-gorgeous .edui-for-underline .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-underline .edui-state-checked .edui-icon {
+    background-position: -234px -3px
+}
+
+.edui-gorgeous .edui-for-strikethrough .edui-icon,
+.edui-gorgeous .edui-for-strikethrough .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-strikethrough .edui-state-checked .edui-icon {
+    background-position: -200px -3px
+}
+
+.edui-gorgeous .edui-for-subscript .edui-icon,
+.edui-gorgeous .edui-for-subscript .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-subscript .edui-state-checked .edui-icon {
+    background-position: -991px -3px
+}
+
+.edui-gorgeous .edui-for-superscript .edui-icon,
+.edui-gorgeous .edui-for-superscript .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-superscript .edui-state-checked .edui-icon {
+    background-position: -1024px -3px
+}
+
+.edui-gorgeous .edui-for-blockquote .edui-icon,
+.edui-gorgeous .edui-for-blockquote .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-blockquote .edui-state-checked .edui-icon {
+    background-position: -364px -3px
+}
+
+.edui-gorgeous .edui-for-forecolor .edui-icon,
+.edui-gorgeous .edui-for-forecolor .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-forecolor .edui-state-checked .edui-icon {
+    background-position: -1189px -3px
+}
+
+.edui-gorgeous .edui-for-backcolor .edui-icon,
+.edui-gorgeous .edui-for-backcolor .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-backcolor .edui-state-checked .edui-icon {
+    background-position: -1255px -3px
+}
+
+.edui-gorgeous .edui-for-inserttable .edui-icon,
+.edui-gorgeous .edui-for-inserttable .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-inserttable .edui-state-checked .edui-icon {
+    background-position:-960px -35px
+}
+
+.edui-gorgeous .edui-for-autotypeset .edui-icon,
+.edui-gorgeous .edui-for-autotypeset .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-autotypeset .edui-state-checked .edui-icon {
+    background-position: -1058px -68px;
+}
+
+.edui-gorgeous .edui-for-justifyleft .edui-icon,
+.edui-gorgeous .edui-for-justifyleft .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-justifyleft .edui-state-checked .edui-icon {
+    background-position: -762px -3px
+}
+
+.edui-gorgeous .edui-for-justifycenter .edui-icon,
+.edui-gorgeous .edui-for-justifycenter .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-justifycenter .edui-state-checked .edui-icon {
+    background-position: -695px -3px
+}
+
+.edui-gorgeous .edui-for-justifyright .edui-icon,
+.edui-gorgeous .edui-for-justifyright .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-justifyright .edui-state-checked .edui-icon {
+    background-position: -794px -3px
+}
+
+.edui-gorgeous .edui-for-justifyjustify .edui-icon,
+.edui-gorgeous .edui-for-justifyjustify .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-justifyjustify .edui-state-checked .edui-icon {
+    background-position: -728px -3px
+}
+
+.edui-gorgeous .edui-for-insertorderedlist .edui-icon,
+.edui-gorgeous .edui-for-insertorderedlist .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-insertorderedlist .edui-state-checked .edui-icon {
+    background-position: -134px -3px
+}
+
+.edui-gorgeous .edui-for-insertunorderedlist .edui-icon,
+.edui-gorgeous .edui-for-insertunorderedlist .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-insertunorderedlist .edui-state-checked .edui-icon {
+    background-position: -36px -1px
+}
+
+.edui-gorgeous .edui-for-lineheight .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-lineheight .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-lineheight .edui-icon {
+    background-position: -1190px -68px;
+}
+
+.edui-gorgeous .edui-for-rowspacingbottom .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-rowspacingbottom .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-rowspacingbottom .edui-icon {
+    background-position: -1223px -68px;
+}
+
+.edui-gorgeous .edui-for-rowspacingtop .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-rowspacingtop .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-rowspacingtop .edui-icon {
+    background-position: -1256px -68px;
+}
+
+.edui-gorgeous .edui-for-horizontal .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-horizontal .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-horizontal .edui-icon {
+    background-position: -595px -3px
+}
+
+.edui-gorgeous .edui-for-link .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-link .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-link .edui-icon {
+    background-position: -826px -3px
+}
+
+.edui-gorgeous .edui-for-code .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-code .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-code .edui-icon {
+    background-position: -440px -68px;
+}
+
+.edui-gorgeous .edui-for-insertimage .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-insertimage .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-insertimage .edui-icon {
+    background-position: -629px -3px
+}
+
+.edui-gorgeous .edui-for-insertframe .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-insertframe .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-insertframe .edui-icon {
+    background-position: -397px -68px
+}
+
+.edui-gorgeous .edui-for-emoticon .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-emoticon .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-emoticon .edui-icon {
+    background-position: -60px -35px;
+}
+
+.edui-gorgeous .edui-for-spechars .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-spechars .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-spechars .edui-icon {
+    background-position: -396px -3px
+}
+
+.edui-gorgeous .edui-for-help .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-help .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-help .edui-icon {
+    background-position: -563px -3px
+}
+
+.edui-gorgeous .edui-for-print .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-print .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-print .edui-icon {
+    background-position: -729px -35px
+}
+
+.edui-gorgeous .edui-for-preview .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-preview .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-preview .edui-icon {
+    background-position: -695px -35px
+}
+
+.edui-gorgeous .edui-for-selectall .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-selectall .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-selectall .edui-icon {
+    background-position: -662px -35px
+}
+
+.edui-gorgeous .edui-for-searchreplace .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-searchreplace .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-searchreplace .edui-icon {
+    background-position: -856px -35px
+}
+
+.edui-gorgeous .edui-for-map .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-map .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-map .edui-icon {
+    background-position: -69px -68px
+}
+
+.edui-gorgeous .edui-for-gmap .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-gmap .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-gmap .edui-icon {
+    background-position: -432px -68px
+}
+
+.edui-gorgeous .edui-for-insertvideo .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-insertvideo .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-insertvideo .edui-icon {
+    background-position: -530px -35px;
+}
+
+.edui-gorgeous .edui-for-time .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-time .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-time .edui-icon {
+    background-position: -267px -35px
+}
+
+.edui-gorgeous .edui-for-date .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-date .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-date .edui-icon {
+    background-position: -233px -35px
+}
+
+.edui-gorgeous .edui-for-cut .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-cut .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-cut .edui-icon {
+    background-position: -680px -3px
+}
+
+.edui-gorgeous .edui-for-copy .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-copy .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-copy .edui-icon {
+    background-position: -1123px -3px
+}
+
+.edui-gorgeous .edui-for-paste .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-paste .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-paste .edui-icon {
+    background-position: -925px -3px
+}
+
+.edui-gorgeous .edui-for-formatmatch .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-formatmatch .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-formatmatch .edui-icon {
+    background-position: -69px -3px
+}
+
+.edui-gorgeous .edui-for-pasteplain .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-pasteplain .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-pasteplain .edui-icon {
+    background-position: -597px -35px;
+}
+
+.edui-gorgeous .edui-for-directionalityltr .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-directionalityltr .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-directionalityltr .edui-icon {
+    background-position: -36px -35px;
+}
+
+.edui-gorgeous .edui-for-directionalityrtl .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-directionalityrtl .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-directionalityrtl .edui-icon {
+    background-position: -69px -35px;
+}
+
+.edui-gorgeous .edui-for-source .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-source .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-source .edui-icon {
+    background-position: -430px -3px;
+}
+
+.edui-gorgeous .edui-for-removeformat .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-removeformat .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-removeformat .edui-icon {
+    background-position: -960px -3px
+}
+
+.edui-gorgeous .edui-for-unlink .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-unlink .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-unlink .edui-icon {
+    background-position: -1058px -3px
+}
+
+.edui-gorgeous .edui-for-touppercase .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-touppercase .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-touppercase .edui-icon {
+    background-position: -1289px -3px
+}
+
+.edui-gorgeous .edui-for-tolowercase .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-tolowercase .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-tolowercase .edui-icon {
+    background-position: -1321px -3px
+}
+
+.edui-gorgeous .edui-for-insertrow .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-insertrow .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-insertrow .edui-icon {
+    background-position:-1222px -35px
+}
+
+.edui-gorgeous .edui-for-insertcol .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-insertcol .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-insertcol .edui-icon {
+    background-position: -1125px -35px
+}
+
+.edui-gorgeous .edui-for-mergeright .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-mergeright .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-mergeright .edui-icon {
+    background-position: -101px -68px
+}
+
+.edui-gorgeous .edui-for-mergedown .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-mergedown .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-mergedown .edui-icon {
+    background-position:-134px -68px
+}
+
+.edui-gorgeous .edui-for-splittorows .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-splittorows .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-splittorows .edui-icon {
+    background-position: -167px -68px
+}
+
+.edui-gorgeous .edui-for-splittocols .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-splittocols .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-splittocols .edui-icon {
+    background-position: -200px -68px
+}
+
+.edui-gorgeous .edui-for-insertparagraphbeforetable .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-insertparagraphbeforetable .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-insertparagraphbeforetable .edui-icon {
+    background-position: -234px -68px
+}
+
+.edui-gorgeous .edui-for-deleterow .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-deleterow .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-deleterow .edui-icon {
+    background-position:-1091px -35px
+}
+
+.edui-gorgeous .edui-for-deletecol .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-deletecol .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-deletecol .edui-icon {
+    background-position:-1056px -35px
+}
+
+.edui-gorgeous .edui-for-splittocells .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-splittocells .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-splittocells .edui-icon {
+    background-position: -1257px -35px
+}
+
+.edui-gorgeous .edui-for-mergecells .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-mergecells .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-mergecells .edui-icon {
+    background-position: -1257px -35px
+}
+
+.edui-gorgeous .edui-for-deletetable .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-deletetable .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-deletetable .edui-icon {
+    background-position: -1025px -35px
+}
+
+.edui-gorgeous .edui-for-cleardoc .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-cleardoc .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-cleardoc .edui-icon {
+    background-position: -860px -3px
+}
+
+.edui-gorgeous .edui-for-fullscreen .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-fullscreen .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-fullscreen .edui-icon {
+    background-position: -167px -35px;
+}
+
+.edui-gorgeous .edui-for-anchor .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-anchor .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-anchor .edui-icon {
+    background-position: -332px -3px
+}
+
+.edui-gorgeous .edui-for-pagebreak .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-pagebreak .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-pagebreak .edui-icon {
+    background-position: -762px -68px
+}
+
+.edui-gorgeous .edui-for-imagenone .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-imagenone .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-imagenone .edui-icon {
+    background-position: -795px -68px;
+}
+
+.edui-gorgeous .edui-for-imageleft .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-imageleft .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-imageleft .edui-icon {
+    background-position: -827px -68px;
+}
+
+.edui-gorgeous .edui-for-wordimage .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-wordimage .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-wordimage .edui-icon {
+    background-position: -1091px -68px
+}
+
+.edui-gorgeous .edui-for-imageright .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-imageright .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-imageright .edui-icon {
+    background-position: -861px -68px
+}
+
+.edui-gorgeous .edui-for-imagecenter .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-imagecenter .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-imagecenter .edui-icon {
+    background-position:-894px -68px
+}
+
+.edui-gorgeous .edui-for-indent .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-indent .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-indent .edui-icon {
+    background-position: -661px -3px
+}
+
+.edui-gorgeous .edui-for-outdent .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-outdent .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-outdent .edui-icon {
+    background-position: -540px -3px
+}
+
+.edui-gorgeous .edui-for-webapp .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-webapp .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-webapp .edui-icon {
+    background-position: -993px -68px
+}
+
+.edui-gorgeous .edui-for-table .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-table .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-table .edui-icon {
+    background-position: -959px -35px;
+}
+
+.edui-gorgeous .edui-for-edittable .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-edittable .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-edittable .edui-icon {
+    background-position: -2px -69px
+}
+
+.edui-gorgeous .edui-for-template .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-template .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-template .edui-icon {
+    background-position: -563px -68px
+}
+
+.edui-gorgeous .edui-for-delete .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-delete .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-delete .edui-icon {
+    background-position:-597px -68px
+}
+
+.edui-gorgeous .edui-for-highlightcode .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-highlightcode .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-highlightcode .edui-icon {
+    background-position: -728px -68px
+}
+
+.edui-gorgeous .edui-for-deletehighlightcode .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-deletehighlightcode .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-deletehighlightcode .edui-icon {
+    background-position: -599px -68px
+}
+
+.edui-gorgeous .edui-for-attachment .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-attachment .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-attachment .edui-icon {
+    background-position: -1030px -68px
+}
+
+.edui-gorgeous .edui-for-edittd .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-edittd .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-edittd .edui-icon {
+    background-position: -35px -69px
+}
+
+.edui-gorgeous .edui-for-snapscreen .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-snapscreen .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-snapscreen .edui-icon {
+    background-position: -959px -68px
+}
+
+.edui-gorgeous .edui-for-scrawl .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-scrawl .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-scrawl .edui-icon {
+    background-position: -1323px -68px
+}
+
+.edui-gorgeous .edui-for-background .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-background .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-background .edui-icon {
+    background-position: -1124px -68px
+}
+
+.edui-gorgeous .edui-for-music .edui-state-hover .edui-icon,
+.edui-gorgeous .edui-for-music .edui-state-checked .edui-icon,
+.edui-gorgeous .edui-for-music .edui-icon {
+    background-position: 0 -36px
+}
+/*splitbutton*/
+.edui-gorgeous .edui-toolbar .edui-splitbutton-body .edui-arrow,
+.edui-gorgeous .edui-toolbar .edui-menubutton-body .edui-arrow {
+    background: url(../images/icons.png) -1220px -2px;
+    _background: url(../images/icons.gif) -1220px -2px;
+    height: 25px;
+    width: 9px;
+}
+
+.edui-gorgeous .edui-toolbar .edui-splitbutton .edui-splitbutton-body,
+.edui-gorgeous .edui-toolbar .edui-menubutton .edui-menubutton-body {
+    padding: 1px;
+    margin-top: 5px;
+}
+
+.edui-gorgeous .edui-toolbar .edui-menubutton-body .edui-splitborder,
+.edui-gorgeous .edui-toolbar .edui-splitbutton-body .edui-splitborder{
+    width: 1px;
+    height: 29px;
+}
+.edui-gorgeous .edui-toolbar .edui-splitborder {
+    width: 1px;
+    height: 20px;
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-hover .edui-splitborder {
+    width: 1px;
+    border-left: 0 solid #A5ADB9;
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-active .edui-splitborder {
+    width: 0;
+    border-left: 1px solid #fff;
+}
+
+.edui-gorgeous .edui-toolbar .edui-state-opened .edui-splitborder {
+    width: 1px;
+    border: 0;
+}
+
+.edui-gorgeous .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body,
+.edui-gorgeous .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body {
+    border: 1px solid #A5ADB9;
+    padding: 0;
+    border-radius: 3px;
+}
+
+.edui-gorgeous .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body,
+.edui-gorgeous .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body {
+    border: 1px solid #A5ADB9;
+    border-radius: 3px;
+    padding: 0;
+}
+
+.edui-gorgeous .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body,
+.edui-gorgeous .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body {
+    background-color: transparent;
+    background-image: none;
+    border: 1px solid #fff;
+    border-radius: 3px;
+    padding: 0;
+}
+
+.edui-gorgeous .edui-state-disabled .edui-arrow {
+    opacity: 0.3;
+    _filter: alpha(opacity = 30);
+}
+
+.edui-gorgeous .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body,
+.edui-gorgeous .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body {
+    background-color: #263B55;
+    background-image: none;
+    border: 1px solid #fff;
+    border-top-right-radius: 3px;
+    border-top-left-radius: 3px;
+    border-bottom-left-radius: 0;
+    border-bottom-right-radius: 0;
+    padding: 0;
+}
+
+.edui-gorgeous .edui-for-insertorderedlist .edui-bordereraser,
+.edui-gorgeous .edui-for-lineheight .edui-bordereraser,
+.edui-gorgeous .edui-for-rowspacingtop .edui-bordereraser,
+.edui-gorgeous .edui-for-rowspacingbottom .edui-bordereraser,
+.edui-gorgeous .edui-for-insertunorderedlist .edui-bordereraser {
+    background-color: white;
+}
+
+/* 解决嵌套导致的图标问题 */
+.edui-gorgeous .edui-for-insertorderedlist .edui-popup-body .edui-icon,
+.edui-gorgeous .edui-for-lineheight .edui-popup-body .edui-icon,
+.edui-gorgeous .edui-for-rowspacingtop .edui-popup-body .edui-icon,
+.edui-gorgeous .edui-for-rowspacingbottom .edui-popup-body .edui-icon,
+.edui-gorgeous .edui-for-insertunorderedlist .edui-popup-body .edui-icon {
+    background-image: none;
+}
+
+/* 弹出菜单 */
+.edui-gorgeous .edui-popup {
+    z-index: 3000;
+    opacity: 0.95;
+}
+
+.edui-gorgeous .edui-popup .edui-shadow {
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    background-color: #CACACA;
+    box-shadow:3px 3px 5px #CACACA;
+    border-radius: 5px;
+    -webkit-box-shadow:  3px 3px 5px #CACACA;
+    -moz-box-shadow:  3px 3px 5px #CACACA;
+    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '3', MakeShadow = 'true', ShadowOpacity = '0.5');
+}
+
+.edui-gorgeous .edui-for-autotypeset .edui-popup-content,
+.edui-gorgeous .edui-for-forecolor .edui-popup-content,
+.edui-gorgeous .edui-for-backcolor .edui-popup-content,
+.edui-gorgeous .edui-for-insertorderedlist .edui-popup-content,
+.edui-gorgeous .edui-for-insertunorderedlist .edui-popup-content,
+.edui-gorgeous .edui-for-rowspacingtop .edui-popup-content,
+.edui-gorgeous .edui-for-rowspacingbottom .edui-popup-content,
+.edui-gorgeous .edui-for-inserttable .edui-popup-content,
+.edui-gorgeous .edui-for-lineheight .edui-popup-content{
+    border: 1px solid white;
+    border-bottom-left-radius: 5px;
+    border-bottom-right-radius: 5px;
+    border-top-right-radius: 5px;
+    border-top-left-radius: 0;
+    background-color: #263B55;
+    padding: 5px;
+    color: white;
+}
+.edui-gorgeous .edui-popup-content {
+    border: 1px solid white;
+    border-radius: 5px;
+    background-color: #263B55;
+    padding: 5px;
+    color: white;
+}
+.edui-gorgeous .edui-popup .edui-bordereraser {
+    background-color: #263B55;
+    height: 3px;
+}
+
+.edui-gorgeous .edui-menu .edui-bordereraser {
+    background-color: #263B55;
+    height: 3px;
+}
+
+.edui-gorgeous .edui-anchor-topleft .edui-bordereraser {
+    left: 1px;
+    top: -1px;
+}
+
+.edui-gorgeous .edui-anchor-topright .edui-bordereraser {
+    right: 1px;
+    top: -2px;
+}
+
+.edui-gorgeous .edui-anchor-bottomleft .edui-bordereraser {
+    left: 0;
+    bottom: -6px;
+    height: 7px;
+    border-left: 1px solid gray;
+    border-right: 1px solid gray;
+}
+
+.edui-gorgeous .edui-anchor-bottomright .edui-bordereraser {
+    right: 0;
+    bottom: -6px;
+    height: 7px;
+    border-left: 1px solid gray;
+    border-right: 1px solid gray;
+}
+
+/* 弹出对话框按钮 */
+.edui-gorgeous .edui-dialog {
+    z-index: 2000;
+    position: absolute;
+}
+
+.edui-gorgeous .edui-dialog-wrap {
+    margin-right: 6px;
+    margin-bottom: 6px;
+    border: 1px solid #7182a6;
+    border-radius: 5px;
+    opacity: 0.9;
+    filter: alpha(opacity = 95);
+}
+
+.edui-gorgeous .edui-dialog-body {
+    position: relative;
+    background-color: #fff;
+    border-radius: 5px;
+    _zoom: 1;
+}
+
+.edui-gorgeous .edui-dialog-shadow {
+    position: absolute;
+    border-radius: 5px;
+    z-index: -1;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    background-color: #000;
+    box-shadow: 0 0 10px #000;
+    -webkit-box-shadow:  0 0 10px #000;
+    -moz-box-shadow:  0 0 10px #000;
+    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '3', MakeShadow = 'true', ShadowOpacity = '0.5');
+}
+
+.edui-gorgeous .edui-dialog-foot {
+    *background-color: #f5f6fa;
+}
+
+.edui-gorgeous .edui-dialog-titlebar {
+    height: 35px;
+    position: relative;
+    cursor: move;
+    *background-color: #f5f6fa;
+}
+
+.edui-gorgeous .edui-dialog-caption {
+    display: inline-block;
+    zoom:1;
+    padding:5px 0 0 10px;
+    width: 125px;
+    height: 25px;
+    font-size: 0;
+    line-height: 0;
+    margin-top: 5px;
+    background:url("../images/dialog_title.png") no-repeat;
+}
+
+.edui-gorgeous .edui-dialog-draghandle {
+    height: 26px;
+}
+
+.edui-gorgeous .edui-dialog-closebutton {
+    position: absolute !important;
+    right: 0;
+    top: -3px;
+}
+
+.edui-gorgeous .edui-dialog-closebutton .edui-button-body {
+    height: 30px;
+    _margin-top:3px;
+    width: 48px;
+    cursor: pointer;
+    border-radius:5px;
+    background: url("../images/icons-all.png") no-repeat 0 -70px
+}
+
+.edui-gorgeous .edui-dialog-closebutton .edui-state-hover .edui-button-body {
+    background:url("../images/icons-all.png") no-repeat -59px -69px
+}
+
+.edui-gorgeous .edui-dialog-foot {
+    height: 40px;
+}
+
+.edui-gorgeous .edui-dialog-buttons {
+    position: absolute;
+    right: 0;
+}
+
+.edui-gorgeous .edui-dialog-buttons .edui-button {
+    margin-right: 10px;
+    box-shadow: 3px 3px 5px #D3D6DA;
+    opacity: 0.85;
+    filter: alpha(opacity = 85);
+}
+
+.edui-gorgeous .edui-dialog-buttons .edui-button .edui-button-body {
+    height: 27px;
+    width: 96px;
+    font-size: 12px;
+    color: #131f40;
+    line-height: 27px;
+    text-align: center;
+    cursor: default;
+    background-image: url(../images/icons-all.gif);
+    background-position:0 -35px;
+}
+
+.edui-gorgeous .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body {
+    background-position: 0 0;
+}
+
+.edui-gorgeous .edui-dialog iframe {
+    border: 0;
+    padding: 0;
+    margin: 0;
+    vertical-align: top;
+}
+
+.edui-gorgeous .edui-dialog-modalmask {
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+    background-color: #000;
+    position: absolute;
+    /*z-index: 1999;*/
+}
+
+.edui-gorgeous .edui-dialog-dragmask {
+    position: absolute;
+    /*z-index: 2001;*/
+    background-color: transparent;
+    cursor: move;
+}
+
+.edui-gorgeous .edui-dialog-content {
+    background-color: transparent;
+    position: relative;
+}
+
+.edui-gorgeous .dialogcontmask {
+    cursor: move;
+    visibility: hidden;
+    display: block;
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    opacity: 0;
+    filter: alpha(opacity = 0);
+}
+/*link-dialog*/
+.edui-gorgeous .edui-for-link .edui-dialog-content {
+    width: 420px;
+    height: 180px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-link .edui-dialog-caption {
+    background-position:-141px -187px
+}
+/*background-dialog*/
+.edui-gorgeous .edui-for-background .edui-dialog-content {
+    width: 440px;
+    height: 280px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-background .edui-dialog-caption {
+    background-position: -6px -218px
+}
+
+/*template-dialog*/
+.edui-gorgeous .edui-for-template .edui-dialog-content {
+    width: 630px;
+    height: 390px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-template .edui-dialog-caption {
+    background-position: -1px -33px
+}
+/*scrawl-dialog*/
+.edui-gorgeous .edui-for-scrawl .edui-dialog-content {
+    width: 515px;
+    *width: 506px;
+    height: 360px;
+}
+.edui-gorgeous .edui-for-scrawl .edui-dialog-caption {
+    background-position: -1px -67px
+}
+/*spechars-dialog*/
+.edui-gorgeous .edui-for-spechars .edui-dialog-content {
+    width: 700px;
+    _width:730px;
+    height: 500px;
+    *height: 570px;
+}
+.edui-gorgeous .edui-for-spechars .edui-dialog-caption {
+    background-position: -1px -126px
+}
+/*image-dialog*/
+.edui-gorgeous .edui-for-insertimage .edui-dialog-content {
+    width: 640px;
+    height: 390px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-insertimage .edui-dialog-caption {
+    background-position: -1px -97px
+}
+/*webapp-dialog*/
+.edui-gorgeous .edui-for-webapp .edui-dialog-content {
+    width: 560px;
+    _width: 565px;
+    height: 450px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-webapp .edui-dialog-caption {
+    background-position: -1px -258px
+}
+/*image-insertframe*/
+.edui-gorgeous .edui-for-insertframe .edui-dialog-content {
+    width: 350px;
+    height: 200px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-insertframe .edui-dialog-caption {
+    background-position:-142px -32px
+}
+/*wordImage-dialog*/
+.edui-gorgeous .edui-for-wordimage .edui-dialog-content {
+    width: 620px;
+    height: 380px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-wordimage .edui-dialog-caption {
+    background-position: -1px -3px;
+}
+/*attachment-dialog*/
+.edui-gorgeous .edui-for-attachment .edui-dialog-content {
+    width: 480px;
+    height: 360px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-attachment .edui-dialog-caption {
+    background-position: -1px -185px
+}
+/*code-dialog*/
+.edui-gorgeous .edui-for-highlightcode .edui-dialog-content {
+    width: 550px;
+    height: 360px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-highlightcode .edui-dialog-caption {
+    background-position: -142px -3px
+}
+/*map-dialog*/
+.edui-gorgeous .edui-for-map .edui-dialog-content {
+    width: 550px;
+    height: 400px;
+}
+.edui-gorgeous .edui-for-map .edui-dialog-caption {
+    background-position: -142px -124px
+}
+/*gmap-dialog*/
+.edui-gorgeous .edui-for-gmap .edui-dialog-content {
+    width: 550px;
+    height: 400px;
+}
+.edui-gorgeous .edui-for-gmap .edui-dialog-caption {
+    background-position: -1px -153px
+}
+/*video-dialog*/
+.edui-gorgeous .edui-for-insertvideo .edui-dialog-content {
+    width: 590px;
+    height: 410px;
+}
+.edui-gorgeous .edui-for-insertvideo .edui-dialog-caption {
+    background-position: -1px -3px;
+}
+/*anchor-dialog*/
+.edui-gorgeous .edui-for-anchor .edui-dialog-content {
+    width: 320px;
+    height: 60px;
+    overflow: hidden;
+}
+.edui-gorgeous .edui-for-anchor .edui-dialog-caption {
+    background-position: -139px -221px
+}
+/*searchreplace-dialog*/
+.edui-gorgeous .edui-for-searchreplace .edui-dialog-content {
+    width: 400px;
+    height: 180px;
+}
+.edui-gorgeous .edui-for-searchreplace .edui-dialog-caption {
+    background-position: -141px -62px
+}
+/*help-dialog*/
+.edui-gorgeous .edui-for-help .edui-dialog-content {
+    width: 400px;
+    height: 420px;
+}
+.edui-gorgeous .edui-for-help .edui-dialog-caption {
+    background-position: -139px -260px
+}
+/*table-dialog*/
+.edui-gorgeous .edui-for-inserttable .edui-dialog-content {
+    width: 510px;
+    height: 275px;
+}
+.edui-gorgeous .edui-for-inserttable .edui-dialog-caption {
+    background-position:-142px -95px
+}
+/*td-dialog*/
+.edui-gorgeous .edui-for-edittd .edui-dialog-content {
+    width: 220px;
+    height: 115px;
+}
+.edui-gorgeous .edui-for-edittd .edui-dialog-caption {
+    background-position: -1px -300px
+}
+/*snapscreen-dialog*/
+.edui-gorgeous .edui-for-snapscreen .edui-dialog-content {
+    width: 400px;
+    height: 220px;
+}
+.edui-gorgeous .edui-for-snapscreen .edui-dialog-caption {
+     background-position: -138px -304px
+ }
+/*music-dialog*/
+.edui-gorgeous .edui-for-music .edui-dialog-content {
+    width: 515px;
+    height: 360px;
+}
+.edui-gorgeous .edui-for-music .edui-dialog-caption {
+    background-position: -132px -150px
+}
+/*段落弹出菜单*/
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label {
+    font-family: Tahoma, Verdana, Arial, Helvetica;
+    color: #fff;
+}
+
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label .edui-for-p {
+    font-size: 22px;
+    line-height: 27px;
+}
+
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label .edui-for-h1 {
+    font-weight: bolder;
+    font-size: 32px;
+    line-height: 36px;
+}
+
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label .edui-for-h2 {
+    font-weight: bolder;
+    font-size: 27px;
+    line-height: 29px;
+}
+
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label .edui-for-h3 {
+    font-weight: bolder;
+    font-size: 19px;
+    line-height: 23px;
+}
+
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label .edui-for-h4 {
+    font-weight: bolder;
+    font-size: 16px;
+    line-height: 19px
+}
+
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label .edui-for-h5 {
+    font-weight: bolder;
+    font-size: 13px;
+    line-height: 16px;
+}
+
+.edui-gorgeous .edui-for-paragraph .edui-listitem-label .edui-for-h6 {
+    font-weight: bolder;
+    font-size: 12px;
+    line-height: 14px;
+}
+/* 表格弹出菜单 */
+.edui-gorgeous .edui-tablepicker .edui-infoarea {
+    height: 14px;
+    line-height: 14px;
+    font-size: 12px;
+    width: 220px;
+    margin-bottom: 3px;
+    clear: both;
+}
+
+.edui-gorgeous .edui-tablepicker .edui-infoarea .edui-label {
+    float: left;
+}
+
+.edui-gorgeous .edui-dialog-buttons .edui-label {
+    line-height: 27px;
+}
+
+.edui-gorgeous .edui-tablepicker .edui-infoarea .edui-clickable {
+    float: right;
+}
+
+.edui-gorgeous .edui-tablepicker .edui-pickarea {
+    background: url("../images/unhighlighted.gif") repeat;
+    height: 220px;
+    width: 220px;
+}
+
+.edui-gorgeous .edui-tablepicker .edui-pickarea .edui-overlay {
+    background: url("../images/highlighted.gif") repeat;
+}
+
+/* 颜色弹出菜单 */
+.edui-gorgeous .edui-colorpicker-topbar {
+    height: 27px;
+    width: 200px;
+    /*border-bottom: 1px gray dashed;*/
+}
+
+.edui-gorgeous .edui-colorpicker-preview {
+    height: 20px;
+    border: 1px inset black;
+    margin-left: 1px;
+    width: 128px;
+    float: left;
+}
+
+.edui-gorgeous .edui-colorpicker-nocolor {
+    float: right;
+    margin-right: 1px;
+    font-size: 12px;
+    line-height: 14px;
+    height: 14px;
+    border: 1px solid #333;
+    padding: 3px 5px;
+    cursor: pointer;
+}
+
+.edui-gorgeous .edui-colorpicker-tablefirstrow {
+    height: 30px;
+}
+
+.edui-gorgeous .edui-colorpicker-colorcell {
+    width: 14px;
+    height: 14px;
+    display: block;
+    margin: 0;
+    cursor: pointer;
+}
+
+.edui-gorgeous .edui-colorpicker-colorcell:hover {
+    width: 14px;
+    height: 14px;
+    margin: 0;
+}
+/*自动排版弹出菜单*/
+.edui-gorgeous .edui-autotypesetpicker .edui-autotypesetpicker-body {
+    font-size: 12px;
+    margin-bottom: 3px;
+    clear: both;
+}
+
+.edui-gorgeous .edui-autotypesetpicker-body table {
+    border-collapse: separate;
+    border-spacing: 2px;
+}
+
+.edui-gorgeous .edui-autotypesetpicker-body td {
+    font-size: 12px;
+}
+
+.edui-gorgeous .edui-autotypesetpicker-body td input {
+    margin: 3px 3px 3px 4px;
+    *margin: 1px 0 0 0;
+}
+/*分隔线*/
+.edui-gorgeous .edui-toolbar .edui-separator {
+    width: 2px;
+    height: 20px;
+    margin:7px 6px 2px;
+    background: url(../images/icons.png) -180px 0;
+    _background: url(../images/icons.gif) -180px 0;
+}
+
+/*颜色按钮 */
+.edui-gorgeous .edui-toolbar .edui-colorbutton .edui-colorlump {
+    position: absolute;
+    overflow: hidden;
+    bottom: 1px;
+    left: 3px;
+    width: 25px;
+    height: 4px;
+}
+/*表情按钮及弹出菜单*/
+/*去除了表情的下拉箭头*/
+.edui-gorgeous .edui-for-emotion .edui-icon {
+    background-position: -101px -35px;
+}
+
+.edui-gorgeous .edui-for-emotion .edui-popup-content {
+    position: relative;
+    z-index: 555;
+    border: 1px solid #7182A6;
+    background-color: #F0F2F7;
+}
+
+.edui-gorgeous .edui-for-emotion .edui-popup-content iframe {
+    width: 600px;
+    height: 380px;
+    overflow: hidden;
+}
+
+.edui-gorgeous .edui-for-emotion .edui-splitborder {
+    display: none
+}
+
+.edui-gorgeous .edui-for-emotion .edui-splitbutton-body .edui-arrow {
+    width: 0
+}
+/*contextmenu*/
+.edui-gorgeous .edui-hassubmenu .edui-arrow {
+    height: 20px;
+    width: 20px;
+    float: right;
+    background: url("../images/icons-all.png") no-repeat 10px -233px;
+}
+
+.edui-gorgeous .edui-menu-body .edui-menuitem {
+    padding: 1px;
+}
+
+.edui-gorgeous .edui-menuseparator {
+    margin: 2px 0;
+    height: 1px;
+    overflow: hidden;
+}
+
+.edui-gorgeous .edui-menuseparator-inner {
+    border-bottom: 1px solid #e2e3e3;
+    margin-left: 29px;
+    margin-right: 1px;
+}
+
+.edui-gorgeous .edui-menu-body .edui-state-hover {
+    padding: 0 !important;
+    border: 1px solid #A5ADB9;
+    border-radius: 3px;
+}

+ 128 - 0
DjangoUeditor/static/UEditor/themes/gorgeous/dialogbase.css

@@ -0,0 +1,128 @@
+/*弹出对话框页面样式组件
+*/
+
+/*reset
+*/
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, font, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td {
+    margin: 0;
+    padding: 0;
+    outline: 0;
+    font-size: 100%;
+}
+
+body {
+    line-height: 1;
+}
+
+ol, ul {
+    list-style: none;
+}
+
+blockquote, q {
+    quotes: none;
+}
+
+ins {
+    text-decoration: none;
+}
+
+del {
+    text-decoration: line-through;
+}
+
+table {
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+/*module
+*/
+body {
+    font: 12px/1.5 "Microsoft Yahei", "微软雅黑", Tahoma, Arial, Helvetica, STHeiti;
+    color: #131f40
+}
+
+/*tab*/
+.tabhead {
+    position: relative;
+    z-index: 10;
+    margin-left: 16px;
+}
+
+.tabhead span {
+    display: inline-block;
+    position: relative;
+    height: 26px;
+    line-height: 26px;
+    width: 87px;
+    margin-left: -16px;
+    text-align: center;
+    cursor: pointer;
+    background-image: url(images/dialog-title-bg.png);
+    background-position: 0 0;
+    z-index: 1
+}
+.tabhead span.focus {
+    background-position:  0 -42px;
+    top:1px;
+    z-index: 100;
+}
+
+.tabbody {
+    position: relative;
+    top: -1px;
+    margin: 0 auto;
+    border: 1px solid #60739b;
+    box-shadow: 3px 3px 5px #D3D6DA;
+    background-color: #fff;
+}
+
+/*button*/
+a.button {
+    display: block;
+    text-decoration: none;
+    height: 27px;
+    width: 96px;
+    font-size: 12px;
+    color: #131f40;
+    line-height: 27px;
+    text-align: center;
+    cursor: default;
+    background-image: url(images/icons-all.gif);
+    background-position:0 -35px;
+}
+
+a.button:hover {
+    background-position: 0 0;
+}
+
+/*滚动条*/
+::-webkit-scrollbar-track-piece{
+    background-color:#fff;
+    -webkit-border-radius:0;
+}
+::-webkit-scrollbar{
+    width:10px;
+    height:8px;
+}
+::-webkit-scrollbar-thumb{
+    height:50px;
+    background-color:#999;
+    -webkit-border-radius:5px;
+    outline:2px solid #fff;
+    outline-offset:-2px;
+    border: 2px solid #fff;
+}
+::-webkit-scrollbar-thumb:hover{
+    height:50px;
+    background-color:#9f9f9f;
+    -webkit-border-radius:4px;
+}

二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/anchor.gif


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/arrow.png


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/bottom.png


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/button-bg.gif


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/cancelbutton.gif


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/cursor_h.gif


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/cursor_v.gif


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/dialog-title-bg.png


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/dialog_title.png


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/filescan.png


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/highlighted.gif


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/icons-all.gif


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/icons-all.png


二進制
DjangoUeditor/static/UEditor/themes/gorgeous/images/icons-checked.gif


Some files were not shown because too many files changed in this diff