Sfoglia il codice sorgente

替换ueditor为官方最新的1.3.6版本,更改UEditor为ueditor防止linux下找不到静态文件

Signed-off-by: WeizhongTu <tuweizhong@163.com>
WeizhongTu 12 anni fa
parent
commit
75e78fa95d
100 ha cambiato i file con 241 aggiunte e 619 eliminazioni
  1. 0 283
      DjangoUeditor/static/UEditor/CHANGELOG.TXT
  2. 3 3
      DjangoUeditor/static/UEditor/dialogs/attachment/attachment.html
  3. 5 4
      DjangoUeditor/static/UEditor/dialogs/background/background.css
  4. 9 8
      DjangoUeditor/static/UEditor/dialogs/background/background.html
  5. 222 319
      DjangoUeditor/static/UEditor/dialogs/background/background.js
  6. 1 1
      DjangoUeditor/static/UEditor/dialogs/emotion/emotion.html
  7. 1 1
      DjangoUeditor/static/UEditor/dialogs/emotion/emotion.js
  8. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0001.gif
  9. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0002.gif
  10. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0003.gif
  11. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0004.gif
  12. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0005.gif
  13. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0006.gif
  14. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0007.gif
  15. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0008.gif
  16. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0009.gif
  17. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0010.gif
  18. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0011.gif
  19. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0012.gif
  20. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0013.gif
  21. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0014.gif
  22. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0015.gif
  23. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0016.gif
  24. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0017.gif
  25. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0018.gif
  26. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0019.gif
  27. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0020.gif
  28. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0001.gif
  29. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0002.gif
  30. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0003.gif
  31. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0004.gif
  32. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0005.gif
  33. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0006.gif
  34. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0007.gif
  35. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0008.gif
  36. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0009.gif
  37. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0010.gif
  38. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0011.gif
  39. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0012.gif
  40. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0013.gif
  41. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0014.gif
  42. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0015.gif
  43. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0016.gif
  44. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0017.gif
  45. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0018.gif
  46. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0019.gif
  47. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0020.gif
  48. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0021.gif
  49. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0022.gif
  50. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0023.gif
  51. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0024.gif
  52. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0025.gif
  53. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0026.gif
  54. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0027.gif
  55. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0028.gif
  56. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0029.gif
  57. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0030.gif
  58. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0031.gif
  59. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0032.gif
  60. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0033.gif
  61. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0034.gif
  62. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0035.gif
  63. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0036.gif
  64. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0037.gif
  65. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0038.gif
  66. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0039.gif
  67. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0040.gif
  68. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0041.gif
  69. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0042.gif
  70. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0043.gif
  71. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0044.gif
  72. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0045.gif
  73. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0046.gif
  74. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0047.gif
  75. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0048.gif
  76. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0049.gif
  77. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0050.gif
  78. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0051.gif
  79. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0052.gif
  80. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0053.gif
  81. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0054.gif
  82. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0055.gif
  83. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0056.gif
  84. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0057.gif
  85. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0058.gif
  86. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0059.gif
  87. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0060.gif
  88. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0061.gif
  89. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0062.gif
  90. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0063.gif
  91. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_01.gif
  92. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_02.gif
  93. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_03.gif
  94. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_04.gif
  95. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_05.gif
  96. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_06.gif
  97. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_07.gif
  98. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_08.gif
  99. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_09.gif
  100. BIN
      DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_10.gif

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

@@ -1,283 +0,0 @@
-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将“&nbsp;”转成空格,连续2个空格则以“ &nbsp;”表示
-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中的&nbsp;
-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.	完成功能的开发

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

@@ -35,7 +35,7 @@
             file_post_name:editor.options.fileFieldName,      //向后台提交的表单名
             flash_url:"../../third-party/swfupload/swfupload.swf",
             flash9_url:"../../third-party/swfupload/swfupload_fp9.swf",
-            post_params:{"PHPSESSID":"<?php echo session_id(); ?>"}, //解决session丢失问题
+            post_params:{"PHPSESSID":"<?php echo session_id(); ?>","fileNameFormat": editor.options.fileNameFormat}, //解决session丢失问题
             file_size_limit:"100 MB",                                 //文件大小限制,此处仅是前端flash选择时候的限制,具体还需要和后端结合判断
             file_types:"*.*",                                         //允许的扩展名,多个扩展名之间用分号隔开,支持*通配符
             file_types_description:"All Files",                      //扩展名描述
@@ -57,7 +57,7 @@
             button_text_left_padding:10,
             button_text_top_padding:4,
 
-            // 所有回调函数 in handlers.js
+            // 所有回调函数 in handlersplugin.js
             swfupload_preload_handler:preLoad,
             swfupload_load_failed_handler:loadFailed,
             file_queued_handler:fileQueued,
@@ -112,7 +112,7 @@
                 str="";
             for(var i=0,ci;ci=filesList[i++];){
                 var src = editor.options.UEDITOR_HOME_URL + "dialogs/attachment/fileTypeImages/"+(map[ci.type]||"icon_default.png");
-                str += "<p style='line-height: 16px;'><img src='"+ src + "' data_ue_src='"+src+"' />" +
+                str += "<p style='line-height: 16px;'><img src='"+ src + "' _src='"+src+"' />" +
                        "<a href='"+editor.options.filePath + ci.url+"'>" + ci.original + "</a></p>";
             }
             editor.execCommand("insertHTML",str);

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

@@ -1,11 +1,12 @@
 .wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative}
 .tabbody{height:225px;}
-.panel { position: absolute;width:100%; height:100%;background: #fff;}
+.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;}
+.tabbody .focus { display: block;}
 
 body{font-size: 12px;color: #888;overflow: hidden;}
 input,label{vertical-align:middle}
 .clear{clear: both;}
-.pl{padding-left: 23px;padding-left: 28px\9;}
+.pl{padding-left: 18px;padding-left: 23px\9;}
 
 #imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;}
 #imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;}
@@ -13,12 +14,12 @@ input,label{vertical-align:middle}
 
 .bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;}
 .content div{margin: 10px 0 10px 5px;}
-.content .iptradio{margin-right: 10px;}
+.content .iptradio{margin: 0px 5px 5px 0px;}
 .txt{width:280px;}
 
 .wrapcolor{height: 19px;}
 div.color{float: left;margin: 0;}
 #colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;}
-div.alignment,#custom{margin-left: 30px;margin-left: 35px\9;}
+div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
 #custom input{height: 15px;min-height: 15px;width:20px;}
 #repeatType{width:100px;}

+ 9 - 8
DjangoUeditor/static/UEditor/dialogs/background/background.html

@@ -8,20 +8,21 @@
 <body>
     <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>
+            <span class="focus" data-content-id="normal"><var id="lang_background_normal"></var></span>
+            <span class="" data-content-id="imgManager"><var id="lang_background_local"></var></span>
         </div>
         <div id="tabBodys" class="tabbody">
-            <div id="normal" class="panel">
-                <fieldset  class="bgarea">
+            <div id="normal" class="panel focus">
+                <fieldset class="bgarea">
                     <legend><var id="lang_background_set"></var></legend>
                     <div class="content">
                         <div>
-                            <input class="iptradio" type="radio" name="t" value="none" checked="checked" onclick="net(this)"><label><var id="lang_background_none"></var></label>
+                            <label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none" checked="checked"><var id="lang_background_none"></var></label>
+                            <label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var id="lang_background_colored"></var></label>
                         </div>
-                        <div class="wrapcolor">
+                        <div class="wrapcolor pl">
                             <div class="color">
-                                <input class="iptradio" type="radio" name="t" value="color" onclick="net(this)"><label><var id="lang_background_color"></var>:</label>
+                                <var id="lang_background_color"></var>:
                             </div>
                             <div id="colorPicker"></div>
                             <div class="clear"></div>
@@ -30,7 +31,7 @@
                             <label><var id="lang_background_netimg"></var>:</label><input class="txt" type="text" id="url">
                         </div>
                         <div id="alignment" class="alignment">
-                            <var id="lang_background_align"></var>:<select id="repeatType" onchange="selectAlign(this)">
+                            <var id="lang_background_align"></var>:<select id="repeatType">
                                 <option value="center"></option>
                                 <option value="repeat-x"></option>
                                 <option value="repeat-y"></option>

+ 222 - 319
DjangoUeditor/static/UEditor/dialogs/background/background.js

@@ -1,348 +1,251 @@
-var me = editor,
-    doc = me.document,
-    bodyStyle,
-    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();
-        }
-    }),
-    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, ""));
+(function () {
 
-                        }
-                    },
-                    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 = "";
-                        net(r);
+    var backupStyle = editor.queryCommandValue('background');
+
+    window.onload = function () {
+        initTabs();
+        initColorSelector();
+        getImageData(initImagePanel);
+    };
+
+    /* 初始化tab标签 */
+    function initTabs(){
+        var tabs = $G('tabHeads').children;
+        for (var i = 0; i < tabs.length; i++) {
+            domUtils.on(tabs[i], "click", function (e) {
+                var target = e.target || e.srcElement;
+                for (var j = 0; j < tabs.length; j++) {
+                    if(tabs[j] == target){
+                        tabs[j].className = "focus";
+                        $G(tabs[j].getAttribute('data-content-id')).style.display = "block";
+                    }else {
+                        tabs[j].className = "";
+                        $G(tabs[j].getAttribute('data-content-id')).style.display = "none";
                     }
                 }
-            }
+            });
         }
     }
-};
-/**
- * 改变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;
-            }
+
+    /* 初始化颜色设置 */
+    function initColorSelector () {
+        var obj = editor.queryCommandValue('background');
+        if (obj) {
+            var color = obj['background-color'],
+                repeat = obj['background-repeat'] || 'repeat',
+                image = obj['background-image'] || '',
+                position = obj['background-position'] || 'center center',
+                pos = position.split(' '),
+                x = parseInt(pos[0]) || 0,
+                y = parseInt(pos[1]) || 0;
+
+            if(repeat == 'no-repeat' && (x || y)) repeat = 'self';
+
+            image = image.match(/url[\s]*\(([^\)]*)\)/);
+            image = image ? image[1]:'';
+            updateFormState('colored', color, image, repeat, x, y);
         } else {
-            if (height = oh - max) {
-                percent = (height / oh).toFixed(2);
-                img.width = ow - ow * percent;
-                img.height = max;
-            }
+            updateFormState();
         }
-    }
-}
-//切换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 updateHandler = function () {
+            updateFormState();
+            updateBackground();
         }
+        domUtils.on($G('nocolorRadio'), 'click', updateBackground);
+        domUtils.on($G('coloredRadio'), 'click', updateHandler);
+        domUtils.on($G('url'), 'keyup', function(){
+            if($G('url').value && $G('alignment').style.display == "none") {
+                utils.each($G('repeatType').children, function(item){
+                    item.selected = ('repeat' == item.getAttribute('value') ? 'selected':false);
+                });
+            }
+            updateHandler();
+        });
+        domUtils.on($G('repeatType'), 'change', updateHandler);
+        domUtils.on($G('x'), 'keyup', updateBackground);
+        domUtils.on($G('y'), 'keyup', updateBackground);
+
+        initColorPicker();
     }
-};
 
+    /* 初始化颜色选择器 */
+    function initColorPicker() {
+        var me = editor,
+            cp = $G("colorPicker");
+
+        /* 生成颜色选择器ui对象 */
+        var popup = new UE.ui.Popup({
+            content: new UE.ui.ColorPicker({
+                noColorText: me.getLang("clearColor"),
+                editor: me,
+                onpickcolor: function (t, color) {
+                    updateFormState('colored', color);
+                    updateBackground();
+                    UE.ui.Popup.postHide();
+                },
+                onpicknocolor: function (t, color) {
+                    updateFormState('colored', 'transparent');
+                    updateBackground();
+                    UE.ui.Popup.postHide();
+                }
+            }),
+            editor: me,
+            onhide: function () {
+            }
+        });
 
-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);
+        /* 设置颜色选择器 */
+        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();
+        });
     }
-    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", "");
-        }
+
+    /* 向后台拉取图片列表数据 */
+    function getImageData(callback) {
+        ajax.request(editor.options.imageManagerUrl, {
+            timeout: 100000,
+            action: 'get',
+            onsuccess: function (r) {
+                var data = r.responseText.split('ue_separate_ue');
+                if(data.length && data[0]=='') data.shift();
+                if(data.length && data[data.length-1]=='') data.pop();
+                callback(data.length ? data:lang.noUploadImage);
+            },
+            onerror: function () {
+                callback(lang.imageLoadError);
+            }
+        });
     }
-    $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);
+
+    /* 初始化在线图片列表 */
+    function initImagePanel(data) {
+        var imagePanel = $G("imageList");
+        if(utils.isArray(data) && data) {
+            utils.each(data, function(value, key){
+                var img = document.createElement("img"),
+                    div = document.createElement("div");
+                div.appendChild(img);
+                div.style.display = "none";
+                imagePanel.appendChild(div);
+
+                domUtils.on(img, 'click', function(e){
+                    var target = e.target || e.srcElement,
+                        nodes = imagePanel.childNodes;
+                    updateFormState('nocolor', null, '');
+                    for (var i = 0, node; node = nodes[i++];) {
+                        if(node.firstChild == target && !node.firstChild.getAttribute("selected")) {
+                            node.firstChild.setAttribute("selected", "true");
+                            node.firstChild.style.cssText = "filter:alpha(Opacity=50);-moz-opacity:0.5;opacity: 0.5;border:2px solid blue;";
+                            updateFormState('colored', null, target.getAttribute("src"), 'repeat');
+                        } else {
+                            node.firstChild.removeAttribute("selected");
+                            node.firstChild.style.cssText = "filter:alpha(Opacity=100);-moz-opacity:1;opacity: 1;border: 2px solid #fff";
+                        }
+                    }
+                    updateBackground();
+                });
+
+                img.onload = function (e) {
+                    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(key < 35 ? "src" : "lazy_src", editor.options.imageManagerPath + value.replace(/\s+|\s+/ig, ""));
+                img.setAttribute("_src", editor.options.imageManagerPath + value.replace(/\s+|\s+/ig, ""));
+            });
+        } else {
+            imagePanel.innerHTML = "&nbsp;&nbsp;" + data;
         }
-    } 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";
+
+    /* 图片缩放 */
+    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;
+                }
+            }
         }
-        $G("custom").style.display = alignType.value == "self" ? "" : "none";
-    } else {
-        alignType.value = align;
     }
-}
-    init();
-
 
+    /* 更新背景色设置面板 */
+    function updateFormState (radio, color, url, align, x, y) {
+        var nocolorRadio = $G('nocolorRadio'),
+            coloredRadio = $G('coloredRadio');
 
-//获得选中的类型
-function getCheckIpt() {
-    var ipts = document.getElementsByName("t");
-    for (var i = 0, ipt; ipt = ipts[i++];) {
-        if (ipt.checked) {
-            return ipt.value;
+        if(radio) {
+            nocolorRadio.checked = (radio == 'colored' ? false:'checked');
+            coloredRadio.checked = (radio == 'colored' ? 'checked':false);
         }
-    }
-}
-var net = function (obj) {
-    var align = $G("alignment"),
-        url = $G("url"),
-        custom = $G("custom");
-    if (obj.value == "none") {
-        align.style.display = "none";
-        custom.style.display = "none";
-        if (browser.ie) {
-            url.onpropertychange = null;
-        } else {
-            url.removeEventListener("input", setBody);
+        if(color) {
+            domUtils.setStyle($G("colorPicker"), "background-color", color);
         }
-    } else {
-        bindSelfPos();
-        $G("repeatType").style.display = "";
-        align.style.display = "";
-        if (browser.ie) {
-            url.onpropertychange = setBody;
-        } else {
-            url.addEventListener("input", setBody, false);
+        if(url || url === '') {
+            $G('url').value = url;
         }
-    }
-    setBody();
-};
-//给自定义位置绑定事件
-var bindSelfPos = function () {
-    var x = $G("x"),
-        y = $G("y");
-    domUtils.on(x, ["propertychange", "input", "keydown"], function (evt) {
-        bindkeydown(evt, this);
-    });
-    domUtils.on(y, ["propertychange", "input", "keydown"], function (evt) {
-        bindkeydown(evt, this);
-    });
-    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) {
-                obj.value = 0;
-            }
-        } else {
-            if (evt.keyCode < 48 && evt.keyCode > 57) {
-                domUtils.preventDefault(evt);
-            }
+        if(align) {
+            utils.each($G('repeatType').children, function(item){
+                item.selected = (align == item.getAttribute('value') ? 'selected':false);
+            });
         }
-        setBody();
-    }
-};
-var showAlign = function () {
-    $G("alignment").style.display = "";
-};
-var selectAlign = function (obj) {
-    $G("custom").style.display = obj.value == "self" ? "" : "none";
-    setBody();
-};
-//给body增加样式和背景图片
-var setBody = function () {
-    var color = domUtils.getStyle(cp, "background-color"),
-        bgimg = $G("url").value,
-        align = $G("repeatType").value,
-        alignObj = {
-            "background-repeat":"no-repeat",
-            "background-position":"center center"
-        },
-        outstr = [];
-    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(x || y) {
+            $G('x').value = parseInt(x) || 0;
+            $G('y').value = parseInt(y) || 0;
         }
-    }
-    if (getCheckIpt() != "none") {
-        utils.cssRule('body','body{' + outstr.join(";") + '}',doc);
-
-    } else {
 
-        utils.cssRule('body','',doc)
+        $G('alignment').style.display = coloredRadio.checked && $G('url').value ? '':'none';
+        $G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '':'none';
     }
-};
 
+    /* 更新背景颜色 */
+    function updateBackground () {
+        if ($G('coloredRadio').checked) {
+            var color = domUtils.getStyle($G("colorPicker"), "background-color"),
+                bgimg = $G("url").value,
+                align = $G("repeatType").value,
+                backgroundObj = {
+                    "background-repeat": "no-repeat",
+                    "background-position": "center center"
+                };
+
+            if (color) backgroundObj["background-color"] = color;
+            if (bgimg) backgroundObj["background-image"] = 'url(' + bgimg + ')';
+            if (align == 'self') {
+                backgroundObj["background-position"] = $G("x").value + "px " + $G("y").value + "px";
+            } else if (align == 'repeat-x' || align == 'repeat-y' || align == 'repeat') {
+                backgroundObj["background-repeat"] = align;
+            }
 
+            editor.execCommand('background', backgroundObj);
+        } else {
+            editor.execCommand('background', null);
+        }
+    }
 
-dialog.onok = function () {
-    setBody();
-};
-dialog.oncancel = function () {
-    utils.cssRule('body',bkbodyStyle,doc)
-};
-bkbodyStyle = utils.cssRule('body',undefined,doc);
+    dialog.onok = function () {
+        updateBackground();
+        editor.fireEvent('saveScene');
+    };
+    dialog.oncancel = function () {
+        editor.execCommand('background', backupStyle);
+    };
+})()

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

@@ -29,7 +29,7 @@
     </div>
 </div>
 <div id="tabIconReview">
-    <img id='faceReview' class='review'/>
+    <img id='faceReview' class='review' src="../../themes/default/images/spacer.gif"/>
 </div>
 <script type="text/javascript" src="emotion.js"></script>
 <script type="text/javascript">

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

@@ -48,7 +48,7 @@ function InsertSmiley( url, evt ) {
     var obj = {
         src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
     };
-    obj.data_ue_src = obj.src;
+    obj._src = obj.src;
     editor.execCommand( 'insertimage', obj );
     if ( !evt.ctrlKey ) {
         dialog.popup.hide();

BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0001.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0002.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0003.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0004.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0005.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0006.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0007.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0008.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0009.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0010.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0011.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0012.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0013.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0014.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0015.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0016.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0017.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0018.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0019.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/babycat/C_0020.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0001.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0002.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0003.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0004.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0005.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0006.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0007.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0008.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0009.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0010.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0011.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0012.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0013.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0014.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0015.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0016.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0017.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0018.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0019.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0020.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0021.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0022.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0023.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0024.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0025.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0026.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0027.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0028.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0029.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0030.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0031.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0032.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0033.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0034.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0035.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0036.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0037.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0038.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0039.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0040.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0041.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0042.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0043.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0044.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0045.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0046.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0047.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0048.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0049.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0050.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0051.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0052.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0053.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0054.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0055.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0056.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0057.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0058.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0059.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0060.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0061.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0062.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/bobo/b_0063.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_01.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_02.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_03.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_04.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_05.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_06.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_07.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_08.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_09.gif


BIN
DjangoUeditor/static/UEditor/dialogs/emotion/images/face/i_f_10.gif


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