From 65e450667785ff46fc7b2b24a71aead18376dbad Mon Sep 17 00:00:00 2001 From: Martin Zhou <1009465756@qq.com> Date: Sun, 24 Jan 2016 11:54:16 +0800 Subject: [PATCH] =?UTF-8?q?SRCMS=C2=B7=E8=BD=BB=E5=93=8D=E5=BA=94=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=20V1.5=E6=AD=A3=E5=BC=8F=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SRCMS是专门为中小企业和互联网产品创业团队打造的应急响应中心网站建站框架 --- Application/Admin/Common/function.php | 11 + Application/Admin/Conf/config.php | 8 + .../Admin/Controller/BaseController.class.php | 8 + .../Admin/Controller/BlogController.class.php | 8 + .../Controller/CategoryController.class.php | 8 + .../Controller/CheckController.class.php | 23 + .../Admin/Controller/HallController.class.php | 8 + .../Controller/IndexController.class.php | 7 + .../Admin/Controller/InfoController.class.php | 8 + .../Controller/LinksController.class.php | 9 + .../Controller/LoginController.class.php | 7 + .../Controller/MemberController.class.php | 8 + .../Controller/OrderController.class.php | 51 + .../Admin/Controller/PageController.class.php | 7 + .../Admin/Controller/PostController.class.php | 41 +- .../Controller/SettingController.class.php | 12 +- .../Admin/Model/PostViewModel.class.php | 2 +- Application/Admin/View/Check/view.html | 81 ++ Application/Admin/View/Hall/add.html | 4 + Application/Admin/View/Hall/update.html | 4 + Application/Admin/View/Order/index.html | 49 + Application/Admin/View/Post/add.html | 2 +- Application/Admin/View/Post/index.html | 18 +- Application/Admin/View/Post/update.html | 38 +- Application/Admin/View/Public/sidebar.html | 23 +- Application/Admin/View/Setting/index.html | 8 +- Application/Common/Conf/config.php | 1 + .../Home/Controller/BlogController.class.php | 16 +- .../Home/Controller/GiftController.class.php | 11 +- .../Home/Controller/HallController.class.php | 11 +- .../Home/Controller/IndexController.class.php | 16 +- .../Home/Controller/PageController.class.php | 12 +- Application/Home/View/Blog/index.html | 72 +- Application/Home/View/Blog/view.html | 78 +- Application/Home/View/Gift/index.html | 69 +- Application/Home/View/Hall/index.html | 144 +- Application/Home/View/Index/index.html | 287 ++-- Application/Home/View/Page/index.html | 85 +- Application/Home/View/Page/view.html | 76 +- Application/Home/View/Public/footer.html | 21 +- Application/Home/View/Public/header.html | 64 +- Application/User/Common/function.php | 11 + .../User/Controller/BaseController.class.php | 6 +- .../Controller/ChangeController.class.php | 6 +- .../Controller/ForgetController.class.php | 6 +- .../User/Controller/GiftController.class.php | 39 +- .../User/Controller/IndexController.class.php | 14 +- .../User/Controller/InfoController.class.php | 9 +- .../User/Controller/LoginController.class.php | 13 +- .../User/Controller/PostController.class.php | 20 +- .../User/Controller/RegController.class.php | 6 +- Application/User/Model/GiftModel.class.php | 28 + Application/User/Model/InfoModel.class.php | 1 + Application/User/View/Gift/add.html | 52 + Application/User/View/Gift/index.html | 2 +- Application/User/View/Index/index.html | 89 +- Application/User/View/Info/add.html | 4 + Application/User/View/Info/index.html | 6 +- Application/User/View/Info/update.html | 25 +- Application/User/View/Login/index.html | 54 +- Application/User/View/Post/add.html | 3 +- Application/User/View/Post/index.html | 12 +- Application/User/View/Post/view.html | 35 + Application/User/View/Public/footer.html | 12 +- Application/User/View/Public/header.html | 69 +- DB/srcms.sql | 76 +- Public/Home/images/banner.jpg | Bin 0 -> 86635 bytes Public/Home/images/main-photo.jpg | Bin 0 -> 14435 bytes Public/Home/images/unknow.jpeg | Bin 0 -> 4231 bytes Public/Home/index/bootstrap.min.css | 5 + Public/Home/index/bootstrap.min.js | 7 + Public/Home/index/carousel.css | 163 +++ Public/Home/index/holder.min.js | 13 + .../Home/index/ie-emulation-modes-warning.js | 51 + .../index/ie10-viewport-bug-workaround.js | 23 + Public/Home/index/jquery.min.js | 6 + Public/ueditor/index.html | 175 +++ Public/ueditor/php/Uploader.class.php | 29 +- Public/ueditor/php/config.json | 16 +- .../themes/default/css/ueditor.min.css | 2 +- Public/ueditor/ueditor.all.js | 4 +- Public/ueditor/ueditor.all.min.js | 1258 ++++++++--------- Public/ueditor/ueditor.parse.js | 2 +- Public/ueditor/ueditor.parse.min.js | 56 +- README.md | 39 +- ThinkPHP/Library/Org/Net/Geetestlib.class.php | 57 + robots.txt | 2 + 87 files changed, 2837 insertions(+), 1085 deletions(-) create mode 100644 Application/Admin/Controller/CheckController.class.php create mode 100644 Application/Admin/Controller/OrderController.class.php create mode 100644 Application/Admin/View/Check/view.html create mode 100644 Application/Admin/View/Order/index.html create mode 100644 Application/User/Common/function.php create mode 100644 Application/User/Model/GiftModel.class.php create mode 100644 Application/User/View/Gift/add.html create mode 100644 Application/User/View/Post/view.html create mode 100644 Public/Home/images/banner.jpg create mode 100644 Public/Home/images/main-photo.jpg create mode 100644 Public/Home/images/unknow.jpeg create mode 100644 Public/Home/index/bootstrap.min.css create mode 100644 Public/Home/index/bootstrap.min.js create mode 100644 Public/Home/index/carousel.css create mode 100644 Public/Home/index/holder.min.js create mode 100644 Public/Home/index/ie-emulation-modes-warning.js create mode 100644 Public/Home/index/ie10-viewport-bug-workaround.js create mode 100644 Public/Home/index/jquery.min.js create mode 100644 ThinkPHP/Library/Org/Net/Geetestlib.class.php create mode 100644 robots.txt diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index e69de29..a8733eb 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/Application/Admin/Conf/config.php b/Application/Admin/Conf/config.php index 6949fd5..71865cf 100644 --- a/Application/Admin/Conf/config.php +++ b/Application/Admin/Conf/config.php @@ -1,4 +1,12 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + return array( //'配置项'=>'配置值' //主题静态文件路径 diff --git a/Application/Admin/Controller/BaseController.class.php b/Application/Admin/Controller/BaseController.class.php index 2ebbedd..ab33760 100644 --- a/Application/Admin/Controller/BaseController.class.php +++ b/Application/Admin/Controller/BaseController.class.php @@ -2,6 +2,14 @@ namespace Admin\Controller; use Think\Controller; +/** + * @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + + class BaseController extends Controller { public function _initialize(){ $sid = session('adminId'); diff --git a/Application/Admin/Controller/BlogController.class.php b/Application/Admin/Controller/BlogController.class.php index 4f17314..98d6844 100644 --- a/Application/Admin/Controller/BlogController.class.php +++ b/Application/Admin/Controller/BlogController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 博客管理 */ diff --git a/Application/Admin/Controller/CategoryController.class.php b/Application/Admin/Controller/CategoryController.class.php index 189fe7a..f82ab85 100644 --- a/Application/Admin/Controller/CategoryController.class.php +++ b/Application/Admin/Controller/CategoryController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 分类管理 */ diff --git a/Application/Admin/Controller/CheckController.class.php b/Application/Admin/Controller/CheckController.class.php new file mode 100644 index 0000000..a56a8dd --- /dev/null +++ b/Application/Admin/Controller/CheckController.class.php @@ -0,0 +1,23 @@ + 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + +class CheckController extends Controller +{ + /** + * 临时查看漏洞报告 + */ + public function view(){ + $id = I('get.session_id',0,'intval'); + $model = M('post')->where('session='.$id)->find(); + $this->assign('model',$model); + $this->display(); + } +} diff --git a/Application/Admin/Controller/HallController.class.php b/Application/Admin/Controller/HallController.class.php index d221615..c9ef63f 100644 --- a/Application/Admin/Controller/HallController.class.php +++ b/Application/Admin/Controller/HallController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 贡献榜管理 */ diff --git a/Application/Admin/Controller/IndexController.class.php b/Application/Admin/Controller/IndexController.class.php index 9b53ea1..9102bbb 100644 --- a/Application/Admin/Controller/IndexController.class.php +++ b/Application/Admin/Controller/IndexController.class.php @@ -2,6 +2,13 @@ namespace Admin\Controller; use Admin\Controller; +/** + * @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + class IndexController extends BaseController{ public function index(){ diff --git a/Application/Admin/Controller/InfoController.class.php b/Application/Admin/Controller/InfoController.class.php index 55d9fbe..116fd0c 100644 --- a/Application/Admin/Controller/InfoController.class.php +++ b/Application/Admin/Controller/InfoController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 单页管理 */ diff --git a/Application/Admin/Controller/LinksController.class.php b/Application/Admin/Controller/LinksController.class.php index e17393b..24ff70e 100644 --- a/Application/Admin/Controller/LinksController.class.php +++ b/Application/Admin/Controller/LinksController.class.php @@ -1,6 +1,15 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + + /** * 链接管理 */ diff --git a/Application/Admin/Controller/LoginController.class.php b/Application/Admin/Controller/LoginController.class.php index 3c83364..b5524f9 100644 --- a/Application/Admin/Controller/LoginController.class.php +++ b/Application/Admin/Controller/LoginController.class.php @@ -2,6 +2,13 @@ namespace Admin\Controller; use Think\Controller; +/** + * @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + class LoginController extends Controller { //登陆主页 public function index(){ diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index aa2e570..5471296 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 用户管理 */ diff --git a/Application/Admin/Controller/OrderController.class.php b/Application/Admin/Controller/OrderController.class.php new file mode 100644 index 0000000..c80d15b --- /dev/null +++ b/Application/Admin/Controller/OrderController.class.php @@ -0,0 +1,51 @@ + 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + +/** + * 单页管理 + */ +class OrderController extends BaseController +{ + /** + * 单页列表 + * @return [type] [description] + */ + public function index($key="") + { + if($key == ""){ + $model = M('order'); + }else{ + $where['title'] = array('like',"%$key%"); + $where['name'] = array('like',"%$key%"); + $where['_logic'] = 'or'; + $model = M('order')->where($where); + } + + $count = $model->where($where)->count();// 查询满足要求的总记录数 + $Page = new \Extend\Page($count,15);// 实例化分页类 传入总记录数和每页显示的记录数(25) + $show = $Page->show();// 分页显示输出 + $pages = $model->limit($Page->firstRow.','.$Page->listRows)->where($where)->order('id DESC')->select(); + $this->assign('model', $pages); + $this->assign('page',$show); + $this->display(); + } + + public function delete() + { + $id = I('get.id',0,'intval'); + $model = M('order'); + $result = $model->where("user_id=".$id)->delete(); + if($result){ + $this->success("删除成功", U('info/index')); + }else{ + $this->error("删除失败"); + } + } +} diff --git a/Application/Admin/Controller/PageController.class.php b/Application/Admin/Controller/PageController.class.php index b3e013f..18bfc1c 100644 --- a/Application/Admin/Controller/PageController.class.php +++ b/Application/Admin/Controller/PageController.class.php @@ -1,6 +1,13 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 单页管理 */ diff --git a/Application/Admin/Controller/PostController.class.php b/Application/Admin/Controller/PostController.class.php index 9ea6656..838c263 100644 --- a/Application/Admin/Controller/PostController.class.php +++ b/Application/Admin/Controller/PostController.class.php @@ -2,10 +2,10 @@ namespace Admin\Controller; use Admin\Controller; /** - * @author Zhou Yuyang <1009465756@qq.com> 2015-07-27 - * @copyright ©2105-2018 SRCMS + * @author Zhou Yuyang <1009465756@qq.com> 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS * @homepage http://www.src.pw - * @version 1.0 + * @version 1.5 */ class PostController extends BaseController @@ -125,30 +125,21 @@ class PostController extends BaseController } } + /** - * 分发漏洞报告 - * @param [type] $id [description] - * @return [type] [description] + * 生成session key */ - public function send() - { - import('ORG.Net.Mail'); + public function session(){ $id = I('get.id',0,'intval'); - $email = I('post.email'); - $title = I('post.title'); - $tips = I('post.tips'); - if (!IS_POST) { - $model = M('post')->where('id='.$id)->find(); - $this->assign('post',$model); - $this->display(); + $str = '!@#$%^&*abcdefghijklmnopqrstuvwxyz'; + $session = md5($str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)]); + $model = M('post'); + $model->session = $session; + $result = $model->where('id='.$id)->save(); + if($result){ + $this->success("授权成功", U('Check/view?session_id='.$session)); + }else{ + $this->error("授权失败"); } - if (IS_POST) { - $result = SendMail($email,$title,$tips,'应急响应中心'); - if($result){ - $this->success("发送成功", U('post/index')); - }else{ - $this->error("发送失败"); - } - } - } + } } \ No newline at end of file diff --git a/Application/Admin/Controller/SettingController.class.php b/Application/Admin/Controller/SettingController.class.php index fe2b273..a70d6a1 100644 --- a/Application/Admin/Controller/SettingController.class.php +++ b/Application/Admin/Controller/SettingController.class.php @@ -1,6 +1,14 @@ 12:28 2016/1/23 + * @copyright 2105-2018 SRCMS + * @homepage http://www.src.pw + * @version 1.5 + */ + /** * 字段管理 */ @@ -76,9 +84,9 @@ class SettingController extends BaseController }else{ // dd(I());die; if ($model->save()) { - $this->success("字段更新成功", U('setting/index')); + $this->success("设置更新成功", U('setting/index')); } else { - $this->error("字段更新失败"); + $this->error("设置更新失败"); } } } diff --git a/Application/Admin/Model/PostViewModel.class.php b/Application/Admin/Model/PostViewModel.class.php index 5f34cc5..c01141c 100644 --- a/Application/Admin/Model/PostViewModel.class.php +++ b/Application/Admin/Model/PostViewModel.class.php @@ -3,7 +3,7 @@ namespace Admin\Model; use Think\Model\ViewModel; class PostViewModel extends ViewModel { public $viewFields = array( - 'post'=>array('id','title','content','user_id','cate_id','time','type'), + 'post'=>array('id','session','title','content','user_id','cate_id','time','type'), 'category'=>array('name'=>'category_name','title'=>'category_title', '_on'=>'post.cate_id=category.id'), 'member'=>array('username', '_on'=>'post.user_id=member.id'), ); diff --git a/Application/Admin/View/Check/view.html b/Application/Admin/View/Check/view.html new file mode 100644 index 0000000..bf807df --- /dev/null +++ b/Application/Admin/View/Check/view.html @@ -0,0 +1,81 @@ + + + + + + 安全工单 + + + + + + + + + + + + +"},postRender:function(){this.Stateful_postRender();this.setDisabled(this.disabled)},_onMouseDown:function(a){a=(a=a.target||a.srcElement)&&a.tagName&&a.tagName.toLowerCase();if("input"==a||"object"==a||"object"==a)return!1},_onClick:function(){this.isDisabled()||this.fireEvent("click")},setTitle:function(a){this.getDom("label").innerHTML=a}};d.inherits(a,b);d.extend(a.prototype,c)})();(function(){var d= +t.editor.utils,b=t.editor.ui.uiUtils,c=t.editor.ui.UIBase,a=t.editor.ui.Stateful,e=t.editor.ui.SplitButton=function(a){this.initOptions(a);this.initSplitButton()};e.prototype={popup:null,uiName:"splitbutton",title:"",initSplitButton:function(){this.initUIBase();this.Stateful_init();if(null!=this.popup){var a=this.popup;this.popup=null;this.setPopup(a)}},_UIBase_postRender:c.prototype.postRender,postRender:function(){this.Stateful_postRender();this._UIBase_postRender()},setPopup:function(a){this.popup!== +a&&(null!=this.popup&&this.popup.dispose(),a.addListener("show",d.bind(this._onPopupShow,this)),a.addListener("hide",d.bind(this._onPopupHide,this)),a.addListener("postrender",d.bind(function(){a.getDom("body").appendChild(b.createElementByHtml('
'));a.getDom().className+=" "+this.className},this)),this.popup=a)},_onPopupShow:function(){this.addState("opened")}, _onPopupHide:function(){this.removeState("opened")},getHtmlTpl:function(){return'
'},showPopup:function(){var a= -c.getClientRect(this.getDom());a.top-=this.popup.SHADOW_RADIUS;a.height+=this.popup.SHADOW_RADIUS;this.popup.showAnchorRect(a)},_onArrowClick:function(a,b){this.isDisabled()||this.showPopup()},_onButtonClick:function(){this.isDisabled()||this.fireEvent("buttonclick")}};d.inherits(e,b);d.extend(e.prototype,a,!0)})();(function(){var d=s.editor.utils,c=s.editor.ui.uiUtils,b=s.editor.ui.ColorPicker,a=s.editor.ui.Popup,e=s.editor.ui.SplitButton,f=s.editor.ui.ColorButton=function(a){this.initOptions(a); -this.initColorButton()};f.prototype={initColorButton:function(){var c=this;this.popup=new a({content:new b({noColorText:c.editor.getLang("clearColor"),editor:c.editor,onpickcolor:function(a,b){c._onPickColor(b)},onpicknocolor:function(a,b){c._onPickNoColor(b)}}),editor:c.editor});this.initSplitButton()},_SplitButton_postRender:e.prototype.postRender,postRender:function(){this._SplitButton_postRender();this.getDom("button_body").appendChild(c.createElementByHtml('
')); -this.getDom().className+=" edui-colorbutton"},setColor:function(a){this.color=this.getDom("colorlump").style.backgroundColor=a},_onPickColor:function(a){!1!==this.fireEvent("pickcolor",a)&&(this.setColor(a),this.popup.hide())},_onPickNoColor:function(a){!1!==this.fireEvent("picknocolor")&&this.popup.hide()}};d.inherits(f,e)})();(function(){var d=s.editor.utils,c=s.editor.ui.Popup,b=s.editor.ui.TablePicker,a=s.editor.ui.SplitButton,e=s.editor.ui.TableButton=function(a){this.initOptions(a);this.initTableButton()}; -e.prototype={initTableButton:function(){var a=this;this.popup=new c({content:new b({editor:a.editor,onpicktable:function(b,c,d){a._onPickTable(c,d)}}),editor:a.editor});this.initSplitButton()},_onPickTable:function(a,b){!1!==this.fireEvent("picktable",a,b)&&this.popup.hide()}};d.inherits(e,a)})();(function(){var d=s.editor.utils,c=s.editor.ui.UIBase,b=s.editor.ui.AutoTypeSetPicker=function(a){this.initOptions(a);this.initAutoTypeSetPicker()};b.prototype={initAutoTypeSetPicker:function(){this.initUIBase()}, +b.getClientRect(this.getDom());a.top-=this.popup.SHADOW_RADIUS;a.height+=this.popup.SHADOW_RADIUS;this.popup.showAnchorRect(a)},_onArrowClick:function(a,b){this.isDisabled()||this.showPopup()},_onButtonClick:function(){this.isDisabled()||this.fireEvent("buttonclick")}};d.inherits(e,c);d.extend(e.prototype,a,!0)})();(function(){var d=t.editor.utils,b=t.editor.ui.uiUtils,c=t.editor.ui.ColorPicker,a=t.editor.ui.Popup,e=t.editor.ui.SplitButton,f=t.editor.ui.ColorButton=function(a){this.initOptions(a); +this.initColorButton()};f.prototype={initColorButton:function(){var b=this;this.popup=new a({content:new c({noColorText:b.editor.getLang("clearColor"),editor:b.editor,onpickcolor:function(a,c){b._onPickColor(c)},onpicknocolor:function(a,c){b._onPickNoColor(c)}}),editor:b.editor});this.initSplitButton()},_SplitButton_postRender:e.prototype.postRender,postRender:function(){this._SplitButton_postRender();this.getDom("button_body").appendChild(b.createElementByHtml('
')); +this.getDom().className+=" edui-colorbutton"},setColor:function(a){this.color=this.getDom("colorlump").style.backgroundColor=a},_onPickColor:function(a){!1!==this.fireEvent("pickcolor",a)&&(this.setColor(a),this.popup.hide())},_onPickNoColor:function(a){!1!==this.fireEvent("picknocolor")&&this.popup.hide()}};d.inherits(f,e)})();(function(){var d=t.editor.utils,b=t.editor.ui.Popup,c=t.editor.ui.TablePicker,a=t.editor.ui.SplitButton,e=t.editor.ui.TableButton=function(a){this.initOptions(a);this.initTableButton()}; +e.prototype={initTableButton:function(){var a=this;this.popup=new b({content:new c({editor:a.editor,onpicktable:function(b,c,d){a._onPickTable(c,d)}}),editor:a.editor});this.initSplitButton()},_onPickTable:function(a,b){!1!==this.fireEvent("picktable",a,b)&&this.popup.hide()}};d.inherits(e,a)})();(function(){var d=t.editor.utils,b=t.editor.ui.UIBase,c=t.editor.ui.AutoTypeSetPicker=function(a){this.initOptions(a);this.initAutoTypeSetPicker()};c.prototype={initAutoTypeSetPicker:function(){this.initUIBase()}, getHtmlTpl:function(){var a=this.editor,b=a.options.autotypeset,c=a.getLang("autoTypeSet"),d="textAlignValue"+a.uid,f="imageBlockLineValue"+a.uid,k="symbolConverValue"+a.uid;return'
"+c.mergeLine+'"+c.delLine+ '
"+c.removeFormat+'"+c.indent+'
"+c.alignment+'"+a.getLang("justifyleft")+'"+a.getLang("justifycenter")+'"+a.getLang("justifyright")+'
"+c.imageFloat+'"+a.getLang("default")+ '"+a.getLang("justifyleft")+'"+a.getLang("justifycenter")+'"+a.getLang("justifyright")+'
"+c.removeFontsize+'"+c.removeFontFamily+'
"+c.removeHtml+'
"+c.pasteFilter+'
"+c.symbol+'"+c.bdc2sb+'"+c.tobdc+'
"},_UIBase_render:c.prototype.render};d.inherits(b,c)})();(function(){function d(a){for(var b={},d=a.getDom(),e=a.editor.uid,h=null,h=null,q=f.getElementsByTagName(d,"input"),t=q.length-1,p;p= -q[t--];)if(h=p.getAttribute("type"),"checkbox"==h)if(h=p.getAttribute("name"),b[h]&&delete b[h],p.checked)if(p=document.getElementById(h+"Value"+e))if(/input/ig.test(p.tagName))b[h]=p.value;else{p=p.getElementsByTagName("input");for(var r=p.length-1,u;u=p[r--];)if(u.checked){b[h]=u.value;break}}else b[h]=!0;else b[h]=!1;else b[p.getAttribute("value")]=p.checked;d=f.getElementsByTagName(d,"select");for(t=0;e=d[t++];)q=e.getAttribute("name"),b[q]=b[q]?e.value:"";c.extend(a.editor.options.autotypeset, -b);a.editor.setPreferences("autotypeset",b)}var c=s.editor.utils,b=s.editor.ui.Popup,a=s.editor.ui.AutoTypeSetPicker,e=s.editor.ui.SplitButton,h=s.editor.ui.AutoTypeSetButton=function(a){this.initOptions(a);this.initAutoTypeSetButton()};h.prototype={initAutoTypeSetButton:function(){var c=this;this.popup=new b({content:new a({editor:c.editor}),editor:c.editor,hide:function(){!this._hidden&&this.getDom()&&(d(this),this.getDom().style.display="none",this._hidden=!0,this.fireEvent("hide"))}});var e=0; -this.popup.addListener("postRenderAfter",function(){var a=this;if(!e){var b=this.getDom();b.getElementsByTagName("button")[0].onclick=function(){d(a);c.editor.execCommand("autotypeset");a.hide()};f.on(b,"click",function(b){b=b.target||b.srcElement;var e=c.editor.uid;if(b&&"INPUT"==b.tagName){if("imageBlockLine"==b.name||"textAlign"==b.name||"symbolConver"==b.name)for(var f=b.checked,h=document.getElementById(b.name+"Value"+e).getElementsByTagName("input"),l={imageBlockLine:"none",textAlign:"left", -symbolConver:"tobdc"},m=0;m"+c.symbol+'"+c.bdc2sb+'"+c.tobdc+'"},_UIBase_render:b.prototype.render};d.inherits(c,b)})();(function(){function d(a){for(var c={},d=a.getDom(),e=a.editor.uid,h=null,h=null,q=f.getElementsByTagName(d,"input"),u=q.length-1,p;p= +q[u--];)if(h=p.getAttribute("type"),"checkbox"==h)if(h=p.getAttribute("name"),c[h]&&delete c[h],p.checked)if(p=document.getElementById(h+"Value"+e))if(/input/ig.test(p.tagName))c[h]=p.value;else{p=p.getElementsByTagName("input");for(var r=p.length-1,v;v=p[r--];)if(v.checked){c[h]=v.value;break}}else c[h]=!0;else c[h]=!1;else c[p.getAttribute("value")]=p.checked;d=f.getElementsByTagName(d,"select");for(u=0;e=d[u++];)q=e.getAttribute("name"),c[q]=c[q]?e.value:"";b.extend(a.editor.options.autotypeset, +c);a.editor.setPreferences("autotypeset",c)}var b=t.editor.utils,c=t.editor.ui.Popup,a=t.editor.ui.AutoTypeSetPicker,e=t.editor.ui.SplitButton,h=t.editor.ui.AutoTypeSetButton=function(a){this.initOptions(a);this.initAutoTypeSetButton()};h.prototype={initAutoTypeSetButton:function(){var b=this;this.popup=new c({content:new a({editor:b.editor}),editor:b.editor,hide:function(){!this._hidden&&this.getDom()&&(d(this),this.getDom().style.display="none",this._hidden=!0,this.fireEvent("hide"))}});var e=0; +this.popup.addListener("postRenderAfter",function(){var a=this;if(!e){var c=this.getDom();c.getElementsByTagName("button")[0].onclick=function(){d(a);b.editor.execCommand("autotypeset");a.hide()};f.on(c,"click",function(c){c=c.target||c.srcElement;var e=b.editor.uid;if(c&&"INPUT"==c.tagName){if("imageBlockLine"==c.name||"textAlign"==c.name||"symbolConver"==c.name)for(var f=c.checked,h=document.getElementById(c.name+"Value"+e).getElementsByTagName("input"),l={imageBlockLine:"none",textAlign:"left", +symbolConver:"tobdc"},m=0;me;e++)b=this.selectedIndex===e?' class="edui-cellalign-selected" ':"",c=e%3,0===c&&d.push(""),d.push('
'),2===c&&d.push("");return'
'+d.join("")+"
"},getStateDom:function(){return this.target},_onClick:function(a){var b=a.target||a.srcElement;/icon/.test(b.className)&&(this.items[b.parentNode.getAttribute("index")].onclick(),c.postHide(a))},_UIBase_render:a.prototype.render};d.inherits(e,a);d.extend(e.prototype,b,!0)})();(function(){var d= -s.editor.utils,c=s.editor.ui.Stateful,b=s.editor.ui.uiUtils,a=s.editor.ui.UIBase,e=s.editor.ui.PastePicker=function(a){this.initOptions(a);this.initPastePicker()};e.prototype={initPastePicker:function(){this.initUIBase();this.Stateful_init()},getHtmlTpl:function(){return'
'+this.editor.getLang("pasteOpt")+'
'},getStateDom:function(){return this.target},format:function(a){this.editor.ui._isTransfer=!0;this.editor.fireEvent("pasteTransfer",a)},_onClick:function(a){var c= -f.getNextDomNode(a),d=b.getViewportRect().height,e=b.getClientRect(c);c.style.top=e.top+e.height>d?-e.height-a.offsetHeight+"px":"";/hidden/ig.test(f.getComputedStyle(c,"visibility"))?(c.style.visibility="visible",f.addClass(a,"edui-state-opened")):(c.style.visibility="hidden",f.removeClasses(a,"edui-state-opened"))},_UIBase_render:a.prototype.render};d.inherits(e,a);d.extend(e.prototype,c,!0)})();(function(){var d=s.editor.utils,c=s.editor.ui.uiUtils,b=s.editor.ui.UIBase,a=s.editor.ui.Toolbar=function(a){this.initOptions(a); -this.initToolbar()};a.prototype={items:null,initToolbar:function(){this.items=this.items||[];this.initUIBase()},add:function(a,b){void 0===b?this.items.push(a):this.items.splice(b,0,a)},getHtmlTpl:function(){for(var a=[],b=0;b'+a.join("")+""},postRender:function(){for(var a=this.getDom(),b=0;b
'}, +a[c]+'">'),2===c&&d.push("");return'
'+d.join("")+"
"},getStateDom:function(){return this.target},_onClick:function(a){var c=a.target||a.srcElement;/icon/.test(c.className)&&(this.items[c.parentNode.getAttribute("index")].onclick(),b.postHide(a))},_UIBase_render:a.prototype.render};d.inherits(e,a);d.extend(e.prototype,c,!0)})();(function(){var d= +t.editor.utils,b=t.editor.ui.Stateful,c=t.editor.ui.uiUtils,a=t.editor.ui.UIBase,e=t.editor.ui.PastePicker=function(a){this.initOptions(a);this.initPastePicker()};e.prototype={initPastePicker:function(){this.initUIBase();this.Stateful_init()},getHtmlTpl:function(){return'
'+this.editor.getLang("pasteOpt")+'
'},getStateDom:function(){return this.target},format:function(a){this.editor.ui._isTransfer=!0;this.editor.fireEvent("pasteTransfer",a)},_onClick:function(a){var b= +f.getNextDomNode(a),d=c.getViewportRect().height,e=c.getClientRect(b);b.style.top=e.top+e.height>d?-e.height-a.offsetHeight+"px":"";/hidden/ig.test(f.getComputedStyle(b,"visibility"))?(b.style.visibility="visible",f.addClass(a,"edui-state-opened")):(b.style.visibility="hidden",f.removeClasses(a,"edui-state-opened"))},_UIBase_render:a.prototype.render};d.inherits(e,a);d.extend(e.prototype,b,!0)})();(function(){var d=t.editor.utils,b=t.editor.ui.uiUtils,c=t.editor.ui.UIBase,a=t.editor.ui.Toolbar=function(a){this.initOptions(a); +this.initToolbar()};a.prototype={items:null,initToolbar:function(){this.items=this.items||[];this.initUIBase()},add:function(a,b){void 0===b?this.items.push(a):this.items.splice(b,0,a)},getHtmlTpl:function(){for(var a=[],b=0;b'+a.join("")+""},postRender:function(){for(var a=this.getDom(),c=0;c
'}, postRender:function(){},queryAutoHide:function(){return!0}};l.prototype={items:null,uiName:"menu",initMenu:function(){this.items=this.items||[];this.initPopup();this.initItems()},initItems:function(){for(var a=0;a'+a.join("")+""},_Popup_postRender:e.prototype.postRender,postRender:function(){for(var a=this,d=0;d
'+this.renderLabelHtml()+"
"},postRender:function(){var a=this;this.addListener("over",function(){a.ownerMenu.fireEvent("submenuover",a);a.subMenu&&a.delayShowSubMenu()});this.subMenu&&(this.getDom().className+= -" edui-hassubmenu",this.subMenu.render(),this.addListener("out",function(){a.delayHideSubMenu()}),this.subMenu.addListener("over",function(){clearTimeout(a._closingTimer);a._closingTimer=null;a.addState("opened")}),this.ownerMenu.addListener("hide",function(){a.hideSubMenu()}),this.ownerMenu.addListener("submenuover",function(b,c){c!==a&&a.delayHideSubMenu()}),this.subMenu._bakQueryAutoHide=this.subMenu.queryAutoHide,this.subMenu.queryAutoHide=function(c){return c&&b.contains(a.getDom(),c)?!1:this._bakQueryAutoHide(c)}); -this.getDom().style.tabIndex="-1";b.makeUnselectable(this.getDom());this.Stateful_postRender()},delayShowSubMenu:function(){var a=this;a.isDisabled()||(a.addState("opened"),clearTimeout(a._showingTimer),clearTimeout(a._closingTimer),a._closingTimer=null,a._showingTimer=setTimeout(function(){a.showSubMenu()},250))},delayHideSubMenu:function(){var a=this;a.isDisabled()||(a.removeState("opened"),clearTimeout(a._showingTimer),a._closingTimer||(a._closingTimer=setTimeout(function(){a.hasState("opened")|| +getContentHtmlTpl:function(){if(0==this.items.length)return this._Popup_getContentHtmlTpl();for(var a=[],b=0;b'+a.join("")+""},_Popup_postRender:e.prototype.postRender,postRender:function(){for(var a=this,d=0;d
'+this.renderLabelHtml()+"
"},postRender:function(){var a=this;this.addListener("over",function(){a.ownerMenu.fireEvent("submenuover",a);a.subMenu&&a.delayShowSubMenu()});this.subMenu&&(this.getDom().className+= +" edui-hassubmenu",this.subMenu.render(),this.addListener("out",function(){a.delayHideSubMenu()}),this.subMenu.addListener("over",function(){clearTimeout(a._closingTimer);a._closingTimer=null;a.addState("opened")}),this.ownerMenu.addListener("hide",function(){a.hideSubMenu()}),this.ownerMenu.addListener("submenuover",function(b,c){c!==a&&a.delayHideSubMenu()}),this.subMenu._bakQueryAutoHide=this.subMenu.queryAutoHide,this.subMenu.queryAutoHide=function(b){return b&&c.contains(a.getDom(),b)?!1:this._bakQueryAutoHide(b)}); +this.getDom().style.tabIndex="-1";c.makeUnselectable(this.getDom());this.Stateful_postRender()},delayShowSubMenu:function(){var a=this;a.isDisabled()||(a.addState("opened"),clearTimeout(a._showingTimer),clearTimeout(a._closingTimer),a._closingTimer=null,a._showingTimer=setTimeout(function(){a.showSubMenu()},250))},delayHideSubMenu:function(){var a=this;a.isDisabled()||(a.removeState("opened"),clearTimeout(a._showingTimer),a._closingTimer||(a._closingTimer=setTimeout(function(){a.hasState("opened")|| a.hideSubMenu();a._closingTimer=null},400)))},renderLabelHtml:function(){return'
'+(this.label||"")+"
"},getStateDom:function(){return this.getDom()},queryAutoHide:function(a){if(this.subMenu&&this.hasState("opened"))return this.subMenu.queryAutoHide(a)},_onClick:function(a,b){this.hasState("disabled")||!1!==this.fireEvent("click",a,b)&&(this.subMenu?this.showSubMenu():e.postHide(a))}, -showSubMenu:function(){var a=b.getClientRect(this.getDom());a.right-=5;a.left+=2;a.width-=7;a.top-=4;a.bottom+=4;a.height+=8;this.subMenu.showAnchorRect(a,!0,!0)},hideSubMenu:function(){this.subMenu.hide()}};d.inherits(m,a);d.extend(m.prototype,f,!0)})();(function(){var d=s.editor.utils,c=s.editor.ui.uiUtils,b=s.editor.ui.Menu,a=s.editor.ui.SplitButton,e=s.editor.ui.Combox=function(a){this.initOptions(a);this.initCombox()};e.prototype={uiName:"combox",onbuttonclick:function(){this.showPopup()},initCombox:function(){var a= -this;this.items=this.items||[];for(var c=0;cd.right&&(f=d.right-e.width);a=a.top;a+e.height>d.bottom&&(a=d.bottom-e.height);c.style.left=Math.max(f,0)+"px";c.style.top=Math.max(a,0)+"px"},showAtCenter:function(){var a=b.getViewportRect();if(this.fullscreen){var d=this.getDom(),e=this.getDom("content");d.style.display="block";var f= +this;b.on(window,"resize",function(){a._hidden||void 0===a._hidden||(a.__resizeTimer&&window.clearTimeout(a.__resizeTimer),a.__resizeTimer=window.setTimeout(function(){a.__resizeTimer=null;var b=a.getDom(),d=a.getDom("content"),e=UE.ui.uiUtils.getClientRect(b),f=UE.ui.uiUtils.getClientRect(d),g=c.getViewportRect();d.style.width=g.width-e.width+f.width+"px";d.style.height=g.height-e.height+f.height+"px";b.style.width=g.width+"px";b.style.height=g.height+"px";a.fireEvent("resize")},100))})},fitSize:function(){var a= +this.getDom("body"),b=this.mesureSize();a.style.width=b.width+"px";a.style.height=b.height+"px";return b},safeSetOffset:function(a){var b=this.getDom(),d=c.getViewportRect(),e=c.getClientRect(b),f=a.left;f+e.width>d.right&&(f=d.right-e.width);a=a.top;a+e.height>d.bottom&&(a=d.bottom-e.height);b.style.left=Math.max(f,0)+"px";b.style.top=Math.max(a,0)+"px"},showAtCenter:function(){var a=c.getViewportRect();if(this.fullscreen){var d=this.getDom(),e=this.getDom("content");d.style.display="block";var f= UE.ui.uiUtils.getClientRect(d),g=UE.ui.uiUtils.getClientRect(e);d.style.left="-100000px";e.style.width=a.width-f.width+g.width+"px";e.style.height=a.height-f.height+g.height+"px";d.style.width=a.width+"px";d.style.height=a.height+"px";d.style.left=0;this._originalContext={html:{overflowX:document.documentElement.style.overflowX,overflowY:document.documentElement.style.overflowY},body:{overflowX:document.body.style.overflowX,overflowY:document.body.style.overflowY}};document.documentElement.style.overflowX= -"hidden";document.documentElement.style.overflowY="hidden";document.body.style.overflowX="hidden";document.body.style.overflowY="hidden"}else this.getDom().style.display="",e=this.fitSize(),f=this.getDom("titlebar").offsetHeight|0,d=a.width/2-e.width/2,a=a.height/2-(e.height-f)/2-f,e=this.getDom(),this.safeSetOffset({left:Math.max(d|0,0),top:Math.max(a|0,0)}),c.hasClass(e,"edui-state-centered")||(e.className+=" edui-state-centered");this._show()},getContentHtml:function(){var a="";"string"==typeof this.content? +"hidden";document.documentElement.style.overflowY="hidden";document.body.style.overflowX="hidden";document.body.style.overflowY="hidden"}else this.getDom().style.display="",e=this.fitSize(),f=this.getDom("titlebar").offsetHeight|0,d=a.width/2-e.width/2,a=a.height/2-(e.height-f)/2-f,e=this.getDom(),this.safeSetOffset({left:Math.max(d|0,0),top:Math.max(a|0,0)}),b.hasClass(e,"edui-state-centered")||(e.className+=" edui-state-centered");this._show()},getContentHtml:function(){var a="";"string"==typeof this.content? a=this.content:this.iframeUrl&&(a='');return a},getHtmlTpl:function(){var a="";if(this.buttons){for(var a=[],b=0;b
'+a.join("")+"
"}return'
'+(this.title||"")+"
"+this.closeButton.renderHtml()+'
'+(this.autoReset?"":this.getContentHtml())+"
"+a+"
"},postRender:function(){this.modalMask.getDom()|| -(this.modalMask.render(),this.modalMask.hide());this.dragMask.getDom()||(this.dragMask.render(),this.dragMask.hide());var a=this;this.addListener("show",function(){a.modalMask.show(this.getDom().style.zIndex-2)});this.addListener("hide",function(){a.modalMask.hide()});if(this.buttons)for(var d=0;d',a.editor.container.style.zIndex&& -(this.getDom().style.zIndex=1*a.editor.container.style.zIndex+1))}});this.onbuttonclick=function(){this.showPopup()};this.initSplitButton()}};d.inherits(a,b)})();(function(){function d(a){if(!f.findParent(a.target||a.srcElement,function(a){return f.hasClass(a,"edui-shortcutmenu")||f.hasClass(a,"edui-popup")},!0)){a=0;for(var b;b=g[a++];)b.hide()}}var c=s.editor.ui,b=c.UIBase,a=c.uiUtils,e=s.editor.utils,f=s.editor.dom.domUtils,g=[],l,k=!1,m=c.ShortCutMenu=function(a){this.initOptions(a);this.initShortCutMenu()}; +this._originalContext.html.overflowX,document.documentElement.style.overflowY=this._originalContext.html.overflowY,document.body.style.overflowX=this._originalContext.body.overflowX,document.body.style.overflowY=this._originalContext.body.overflowY,delete this._originalContext);this._hide();a=this.getDom("content");var c=this.getDom("iframe");a&&c&&((c=c.contentDocument||c.contentWindow.document)&&(c.body.innerHTML=""),b.remove(a))}}};d.inherits(g,e)})();(function(){var d=t.editor.utils,b=t.editor.ui.Menu, +c=t.editor.ui.SplitButton,a=t.editor.ui.MenuButton=function(a){this.initOptions(a);this.initMenuButton()};a.prototype={initMenuButton:function(){var a=this;this.uiName="menubutton";this.popup=new b({items:a.items,className:a.className,editor:a.editor});this.popup.addListener("show",function(){for(var b=0;b',a.editor.container.style.zIndex&& +(this.getDom().style.zIndex=1*a.editor.container.style.zIndex+1))}});this.onbuttonclick=function(){this.showPopup()};this.initSplitButton()}};d.inherits(a,c)})();(function(){function d(a){if(!f.findParent(a.target||a.srcElement,function(a){return f.hasClass(a,"edui-shortcutmenu")||f.hasClass(a,"edui-popup")},!0)){a=0;for(var b;b=g[a++];)b.hide()}}var b=t.editor.ui,c=b.UIBase,a=b.uiUtils,e=t.editor.utils,f=t.editor.dom.domUtils,g=[],l,k=!1,m=b.ShortCutMenu=function(a){this.initOptions(a);this.initShortCutMenu()}; m.postHide=d;m.prototype={isHidden:!0,SPACE:5,initShortCutMenu:function(){this.items=this.items||[];this.initUIBase();this.initItems();this.initEvent();g.push(this)},initEvent:function(){var a=this,b=a.editor.document;f.on(b,"mousemove",function(b){if(!1===a.isHidden&&!a.getSubMenuMark()&&"contextmenu"!=a.eventType){var c=!0,d=a.getDom(),e=d.offsetWidth/2+a.SPACE,f=d.offsetHeight/2,g=Math.abs(b.screenX-a.left),k=Math.abs(b.screenY-a.top);clearTimeout(l);l=setTimeout(function(){0f&&kf+70&&ke&&ge+70&&gf&&kf+70&&ke&&ge+70&&gr.version?a.style.filter="alpha(opacity = "+100*parseFloat(b)+");":a.style.opacity=b},getSubMenuMark:function(){k=!1;for(var b=a.getFixedLayer(),b=f.getElementsByTagName(b,"div",function(a){return f.hasClass(a,"edui-shortcutsubmenu edui-popup")}),c=0,d;d=b[c++];)"none"!=d.style.display&&(k=!0);return k},show:function(b,c){function d(a){0>a.left&&(a.left=0);0>a.top&&(a.top=0);k.style.cssText="position:absolute;left:"+ a.left+"px;top:"+a.top+"px;"}function e(a){a.tagName||(a=a.getDom());g.left=parseInt(a.style.left);g.top=parseInt(a.style.top);g.top-=k.offsetHeight+15;d(g)}var g={},k=this.getDom(),l=a.getFixedLayer();this.eventType=b.type;k.style.cssText="display:block;left:-9999px";if("contextmenu"==b.type&&c){var m=f.getElementsByTagName(l,"div","edui-contextmenu")[0];m?e(m):this.editor.addListener("aftershowcontextmenu",function(a,b){e(b)})}else g=a.getViewportOffsetByEvent(b),g.top-=k.offsetHeight+this.SPACE, -g.left+=this.SPACE+20,d(g),this.setOpacity(k,0.2);this.isHidden=!1;this.left=b.screenX+k.offsetWidth/2-this.SPACE;this.top=b.screenY-k.offsetHeight/2-this.SPACE;this.editor&&(k.style.zIndex=1*this.editor.container.style.zIndex+10,l.style.zIndex=k.style.zIndex-1)},hide:function(){this.getDom()&&(this.getDom().style.display="none");this.isHidden=!0},postRender:function(){if(e.isArray(this.items))for(var a=0,b;b=this.items[a++];)b.postRender()},getHtmlTpl:function(){var a;if(e.isArray(this.items)){a= -[];for(var b=0;b'+a+""}};e.inherits(m,b);f.on(document,"mousedown",function(a){d(a)});f.on(window,"scroll",function(a){d(a)})})();(function(){var d=s.editor.utils,c=s.editor.ui.UIBase,b=s.editor.ui.Breakline=function(a){this.initOptions(a);this.initSeparator()};b.prototype={uiName:"Breakline", -initSeparator:function(){this.initUIBase()},getHtmlTpl:function(){return"
"}};d.inherits(b,c)})();(function(){var d=s.editor.utils,c=s.editor.dom.domUtils,b=s.editor.ui.UIBase,a=s.editor.ui.Message=function(a){this.initOptions(a);this.initMessage()};a.prototype={initMessage:function(){this.initUIBase()},getHtmlTpl:function(){return'
\u00d7
'}, -reset:function(a){var b=this;a.keepshow||(clearTimeout(this.timer),b.timer=setTimeout(function(){b.hide()},a.timeout||4E3));void 0!==a.content&&b.setContent(a.content);void 0!==a.type&&b.setType(a.type);b.show()},postRender:function(){var a=this,b=this.getDom("closer");b&&c.on(b,"click",function(){a.hide()})},setContent:function(a){this.getDom("content").innerHTML=a},setType:function(a){a=a||"info";var b=this.getDom("body");b.className=b.className.replace(/edui-message-type-[\w-]+/,"edui-message-type-"+ -a)},getContent:function(){return this.getDom("content").innerHTML},getType:function(){var a=this.getDom("body").match(/edui-message-type-([\w-]+)/);return a?a[1]:""},show:function(){this.getDom().style.display="block"},hide:function(){var a=this.getDom();a&&(a.style.display="none",a.parentNode&&a.parentNode.removeChild(a))}};d.inherits(a,b)})();(function(){var d=s.editor.utils,c=s.editor.ui,b=c.Dialog;c.buttons={};c.Dialog=function(a){var c=new b(a);c.addListener("hide",function(){if(c.editor){var a= -c.editor;try{if(r.gecko){var b=a.window.scrollY,d=a.window.scrollX;a.body.focus();a.window.scrollTo(d,b)}else a.focus()}catch(e){}}});return c};for(var a={anchor:"~/dialogs/anchor/anchor.html",insertimage:"~/dialogs/image/image.html",link:"~/dialogs/link/link.html",spechars:"~/dialogs/spechars/spechars.html",searchreplace:"~/dialogs/searchreplace/searchreplace.html",map:"~/dialogs/map/map.html",gmap:"~/dialogs/gmap/gmap.html",insertvideo:"~/dialogs/video/video.html",help:"~/dialogs/help/help.html", +g.left+=this.SPACE+20,d(g),this.setOpacity(k,.2);this.isHidden=!1;this.left=b.screenX+k.offsetWidth/2-this.SPACE;this.top=b.screenY-k.offsetHeight/2-this.SPACE;this.editor&&(k.style.zIndex=1*this.editor.container.style.zIndex+10,l.style.zIndex=k.style.zIndex-1)},hide:function(){this.getDom()&&(this.getDom().style.display="none");this.isHidden=!0},postRender:function(){if(e.isArray(this.items))for(var a=0,b;b=this.items[a++];)b.postRender()},getHtmlTpl:function(){var a;if(e.isArray(this.items)){a= +[];for(var b=0;b'+a+""}};e.inherits(m,c);f.on(document,"mousedown",function(a){d(a)});f.on(window,"scroll",function(a){d(a)})})();(function(){var d=t.editor.utils,b=t.editor.ui.UIBase,c=t.editor.ui.Breakline=function(a){this.initOptions(a);this.initSeparator()};c.prototype={uiName:"Breakline", +initSeparator:function(){this.initUIBase()},getHtmlTpl:function(){return"
"}};d.inherits(c,b)})();(function(){var d=t.editor.utils,b=t.editor.dom.domUtils,c=t.editor.ui.UIBase,a=t.editor.ui.Message=function(a){this.initOptions(a);this.initMessage()};a.prototype={initMessage:function(){this.initUIBase()},getHtmlTpl:function(){return'
\u00d7
'}, +reset:function(a){var b=this;a.keepshow||(clearTimeout(this.timer),b.timer=setTimeout(function(){b.hide()},a.timeout||4E3));void 0!==a.content&&b.setContent(a.content);void 0!==a.type&&b.setType(a.type);b.show()},postRender:function(){var a=this,c=this.getDom("closer");c&&b.on(c,"click",function(){a.hide()})},setContent:function(a){this.getDom("content").innerHTML=a},setType:function(a){a=a||"info";var b=this.getDom("body");b.className=b.className.replace(/edui-message-type-[\w-]+/,"edui-message-type-"+ +a)},getContent:function(){return this.getDom("content").innerHTML},getType:function(){var a=this.getDom("body").match(/edui-message-type-([\w-]+)/);return a?a[1]:""},show:function(){this.getDom().style.display="block"},hide:function(){var a=this.getDom();a&&(a.style.display="none",a.parentNode&&a.parentNode.removeChild(a))}};d.inherits(a,c)})();(function(){var d=t.editor.utils,b=t.editor.ui,c=b.Dialog;b.buttons={};b.Dialog=function(a){var b=new c(a);b.addListener("hide",function(){if(b.editor){var a= +b.editor;try{if(r.gecko){var c=a.window.scrollY,d=a.window.scrollX;a.body.focus();a.window.scrollTo(d,c)}else a.focus()}catch(e){}}});return b};for(var a={anchor:"~/dialogs/anchor/anchor.html",insertimage:"~/dialogs/image/image.html",link:"~/dialogs/link/link.html",spechars:"~/dialogs/spechars/spechars.html",searchreplace:"~/dialogs/searchreplace/searchreplace.html",map:"~/dialogs/map/map.html",gmap:"~/dialogs/gmap/gmap.html",insertvideo:"~/dialogs/video/video.html",help:"~/dialogs/help/help.html", preview:"~/dialogs/preview/preview.html",emotion:"~/dialogs/emotion/emotion.html",wordimage:"~/dialogs/wordimage/wordimage.html",attachment:"~/dialogs/attachment/attachment.html",insertframe:"~/dialogs/insertframe/insertframe.html",edittip:"~/dialogs/table/edittip.html",edittable:"~/dialogs/table/edittable.html",edittd:"~/dialogs/table/edittd.html",webapp:"~/dialogs/webapp/webapp.html",snapscreen:"~/dialogs/snapscreen/snapscreen.html",scrawl:"~/dialogs/scrawl/scrawl.html",music:"~/dialogs/music/music.html", template:"~/dialogs/template/template.html",background:"~/dialogs/background/background.html",charts:"~/dialogs/charts/charts.html"},e="undo redo formatmatch bold italic underline fontborder touppercase tolowercase strikethrough subscript superscript source indent outdent blockquote pasteplain pagebreak selectall print horizontal removeformat time date unlink insertparagraphbeforetable insertrow insertcol mergeright mergedown deleterow deletecol splittorows splittocols splittocells mergecells deletetable drafts".split(" "), -f=0,g;g=e[f++];)g=g.toLowerCase(),c[g]=function(a){return function(b){var d=new c.Button({className:"edui-for-"+a,title:b.options.labelMap[a]||b.getLang("labelMap."+a)||"",onclick:function(){b.execCommand(a)},theme:b.options.theme,showText:!1});c.buttons[a]=d;b.addListener("selectionchange",function(c,e,f){c=b.queryCommandState(a);-1==c?(d.setDisabled(!0),d.setChecked(!1)):f||(d.setDisabled(!1),d.setChecked(c))});return d}}(g);c.cleardoc=function(a){var b=new c.Button({className:"edui-for-cleardoc", -title:a.options.labelMap.cleardoc||a.getLang("labelMap.cleardoc")||"",theme:a.options.theme,onclick:function(){confirm(a.getLang("confirmClear"))&&a.execCommand("cleardoc")}});c.buttons.cleardoc=b;a.addListener("selectionchange",function(){b.setDisabled(-1==a.queryCommandState("cleardoc"))});return b};var e={justify:["left","right","center","justify"],imagefloat:["none","left","center","right"],directionality:["ltr","rtl"]},l;for(l in e)(function(a,b){for(var d=0,e;e=b[d++];)(function(b){c[a.replace("float", -"")+b]=function(d){var e=new c.Button({className:"edui-for-"+a.replace("float","")+b,title:d.options.labelMap[a.replace("float","")+b]||d.getLang("labelMap."+a.replace("float","")+b)||"",theme:d.options.theme,onclick:function(){d.execCommand(a,b)}});c.buttons[a]=e;d.addListener("selectionchange",function(c,f,g){e.setDisabled(-1==d.queryCommandState(a));e.setChecked(d.queryCommandValue(a)==b&&!g)});return e}})(e)})(l,e[l]);for(f=0;g=["backcolor","forecolor"][f++];)c[g]=function(a){return function(b){var d= -new c.ColorButton({className:"edui-for-"+a,color:"default",title:b.options.labelMap[a]||b.getLang("labelMap."+a)||"",editor:b,onpickcolor:function(c,d){b.execCommand(a,d)},onpicknocolor:function(){b.execCommand(a,"default");this.setColor("transparent");this.color="default"},onbuttonclick:function(){b.execCommand(a,this.color)}});c.buttons[a]=d;b.addListener("selectionchange",function(){d.setDisabled(-1==b.queryCommandState(a))});return d}}(g);e={noOk:["searchreplace","help","spechars","webapp","preview"], -ok:"attachment anchor link insertimage map gmap insertframe wordimage insertvideo insertframe edittip edittable edittd scrawl template music background charts".split(" ")};for(l in e)(function(b,e){for(var f=0,g;g=e[f++];)r.opera&&"searchreplace"===g||function(e){c[e]=function(f,g,h){g=g||(f.options.iframeUrlMap||{})[e]||a[e];h=f.options.labelMap[e]||f.getLang("labelMap."+e)||"";var l;g&&(l=new c.Dialog(d.extend({iframeUrl:f.ui.mapUrl(g),editor:f,className:"edui-for-"+e,title:h,holdScroll:"insertimage"=== -e,fullscreen:/charts|preview/.test(e),closeDialog:f.getLang("closeDialog")},"ok"==b?{buttons:[{className:"edui-okbutton",label:f.getLang("ok"),editor:f,onclick:function(){l.close(!0)}},{className:"edui-cancelbutton",label:f.getLang("cancel"),editor:f,onclick:function(){l.close(!1)}}]}:{})),f.ui._dialogs[e+"Dialog"]=l);var m=new c.Button({className:"edui-for-"+e,title:h,onclick:function(){if(l)switch(e){case "wordimage":var a=f.execCommand("wordimage");a&&a.length&&(l.render(),l.open());break;case "scrawl":-1!= -f.queryCommandState("scrawl")&&(l.render(),l.open());break;default:l.render(),l.open()}},theme:f.options.theme,disabled:"scrawl"==e&&-1==f.queryCommandState("scrawl")||"charts"==e});c.buttons[e]=m;f.addListener("selectionchange",function(){if(!(e in{edittable:1})){var a=f.queryCommandState(e);m.getDom()&&(m.setDisabled(-1==a),m.setChecked(a))}});return m}}(g.toLowerCase())})(l,e[l]);c.snapscreen=function(b,d,e){e=b.options.labelMap.snapscreen||b.getLang("labelMap.snapscreen")||"";var f=new c.Button({className:"edui-for-snapscreen", -title:e,onclick:function(){b.execCommand("snapscreen")},theme:b.options.theme});c.buttons.snapscreen=f;if(d=d||(b.options.iframeUrlMap||{}).snapscreen||a.snapscreen){var g=new c.Dialog({iframeUrl:b.ui.mapUrl(d),editor:b,className:"edui-for-snapscreen",title:e,buttons:[{className:"edui-okbutton",label:b.getLang("ok"),editor:b,onclick:function(){g.close(!0)}},{className:"edui-cancelbutton",label:b.getLang("cancel"),editor:b,onclick:function(){g.close(!1)}}]});g.render();b.ui._dialogs.snapscreenDialog= -g}b.addListener("selectionchange",function(){f.setDisabled(-1==b.queryCommandState("snapscreen"))});return f};c.insertcode=function(a,b,e){b=a.options.insertcode||[];e=a.options.labelMap.insertcode||a.getLang("labelMap.insertcode")||"";var f=[];d.each(b,function(b,c){f.push({label:b,value:c,theme:a.options.theme,renderLabelHtml:function(){return'
'+(this.label||"")+"
"}})});var g=new c.Combox({editor:a,items:f,onselect:function(b,c){a.execCommand("insertcode", -this.items[c].value)},onbuttonclick:function(){this.showPopup()},title:e,initValue:e,className:"edui-for-insertcode",indexByValue:function(a){if(a)for(var b=0,c;c=this.items[b];b++)if(-1!=c.value.indexOf(a))return b;return-1}});c.buttons.insertcode=g;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("insertcode")?g.setDisabled(!0):(g.setDisabled(!1),(b=a.queryCommandValue("insertcode"))?(b&&(b=b.replace(/['"]/g,"").split(",")[0]),g.setValue(b)):g.setValue(e)))});return g}; -c.fontfamily=function(a,b,e){b=a.options.fontfamily||[];e=a.options.labelMap.fontfamily||a.getLang("labelMap.fontfamily")||"";if(b.length){for(var f=0,g,h=[];g=b[f];f++){var l=a.getLang("fontfamily")[g.name]||"";(function(b,c){h.push({label:b,value:c,theme:a.options.theme,renderLabelHtml:function(){return'
'+(this.label||"")+"
"}})})(g.label||l,g.val)}var p=new c.Combox({editor:a,items:h,onselect:function(b,c){a.execCommand("FontFamily", -this.items[c].value)},onbuttonclick:function(){this.showPopup()},title:e,initValue:e,className:"edui-for-fontfamily",indexByValue:function(a){if(a)for(var b=0,c;c=this.items[b];b++)if(-1!=c.value.indexOf(a))return b;return-1}});c.buttons.fontfamily=p;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("FontFamily")?p.setDisabled(!0):(p.setDisabled(!1),(b=a.queryCommandValue("FontFamily"))&&(b=b.replace(/['"]/g,"").split(",")[0]),p.setValue(b)))});return p}};c.fontsize=function(a, -b,d){d=a.options.labelMap.fontsize||a.getLang("labelMap.fontsize")||"";b=b||a.options.fontsize||[];if(b.length){for(var e=[],f=0;f'+(this.label||"")+""}})}var h=new c.Combox({editor:a,items:e,title:d,initValue:d,onselect:function(b,c){a.execCommand("FontSize",this.items[c].value)},onbuttonclick:function(){this.showPopup()}, -className:"edui-for-fontsize"});c.buttons.fontsize=h;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("FontSize")?h.setDisabled(!0):(h.setDisabled(!1),h.setValue(a.queryCommandValue("FontSize"))))});return h}};c.paragraph=function(a,b,e){e=a.options.labelMap.paragraph||a.getLang("labelMap.paragraph")||"";b=a.options.paragraph||[];if(!d.isEmptyObject(b)){var f=[],g;for(g in b)f.push({value:g,label:b[g]||a.getLang("paragraph")[g],theme:a.options.theme,renderLabelHtml:function(){return'
'+(this.label||"")+"
"}});var h=new c.Combox({editor:a,items:f,title:e,initValue:e,className:"edui-for-paragraph",onselect:function(b,c){a.execCommand("Paragraph",this.items[c].value)},onbuttonclick:function(){this.showPopup()}});c.buttons.paragraph=h;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("Paragraph")?h.setDisabled(!0):(h.setDisabled(!1),b=a.queryCommandValue("Paragraph"),-1!=h.indexByValue(b)?h.setValue(b):h.setValue(h.initValue)))}); -return h}};c.customstyle=function(a){var b=a.options.customstyle||[],d=a.options.labelMap.customstyle||a.getLang("labelMap.customstyle")||"";if(b.length){for(var e=a.getLang("customstyle"),f=0,g=[],h;h=b[f++];)(function(b){var c={};c.label=b.label?b.label:e[b.name];c.style=b.style;c.className=b.className;c.tag=b.tag;g.push({label:c.label,value:c,theme:a.options.theme,renderLabelHtml:function(){return'
<'+c.tag+" "+(c.className?' class="'+c.className+'"':"")+(c.style? -' style="'+c.style+'"':"")+">"+c.label+"
"}})})(h);var l=new c.Combox({editor:a,items:g,title:d,initValue:d,className:"edui-for-customstyle",onselect:function(b,c){a.execCommand("customstyle",this.items[c].value)},onbuttonclick:function(){this.showPopup()},indexByValue:function(a){for(var b=0,c;c=this.items[b++];)if(c.label==a)return b-1;return-1}});c.buttons.customstyle=l;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("customstyle")?l.setDisabled(!0): -(l.setDisabled(!1),b=a.queryCommandValue("customstyle"),-1!=l.indexByValue(b)?l.setValue(b):l.setValue(l.initValue)))});return l}};c.inserttable=function(a,b,d){d=a.options.labelMap.inserttable||a.getLang("labelMap.inserttable")||"";var e=new c.TableButton({editor:a,title:d,className:"edui-for-inserttable",onpicktable:function(b,c,d){a.execCommand("InsertTable",{numRows:d,numCols:c,border:1})},onbuttonclick:function(){this.showPopup()}});c.buttons.inserttable=e;a.addListener("selectionchange",function(){e.setDisabled(-1== -a.queryCommandState("inserttable"))});return e};c.lineheight=function(a){var b=a.options.lineheight||[];if(b.length){for(var d=0,e,f=[];e=b[d++];)f.push({label:e,value:e,theme:a.options.theme,onclick:function(){a.execCommand("lineheight",this.value)}});var g=new c.MenuButton({editor:a,className:"edui-for-lineheight",title:a.options.labelMap.lineheight||a.getLang("labelMap.lineheight")||"",items:f,onbuttonclick:function(){var b=a.queryCommandValue("LineHeight")||this.value;a.execCommand("LineHeight", -b)}});c.buttons.lineheight=g;a.addListener("selectionchange",function(){var b=a.queryCommandState("LineHeight");if(-1==b)g.setDisabled(!0);else{g.setDisabled(!1);var c=a.queryCommandValue("LineHeight");c&&g.setValue((c+"").replace(/cm/,""));g.setChecked(b)}});return g}};l=["top","bottom"];for(e=0;f=l[e++];)(function(a){c["rowspacing"+a]=function(b){var d=b.options["rowspacing"+a]||[];if(!d.length)return null;for(var e=0,f,g=[];f=d[e++];)g.push({label:f,value:f,theme:b.options.theme,onclick:function(){b.execCommand("rowspacing", -this.value,a)}});var h=new c.MenuButton({editor:b,className:"edui-for-rowspacing"+a,title:b.options.labelMap["rowspacing"+a]||b.getLang("labelMap.rowspacing"+a)||"",items:g,onbuttonclick:function(){var c=b.queryCommandValue("rowspacing",a)||this.value;b.execCommand("rowspacing",c,a)}});c.buttons[a]=h;b.addListener("selectionchange",function(){var c=b.queryCommandState("rowspacing",a);if(-1==c)h.setDisabled(!0);else{h.setDisabled(!1);var d=b.queryCommandValue("rowspacing",a);d&&h.setValue((d+"").replace(/%/, -""));h.setChecked(c)}});return h}})(f);l=["insertorderedlist","insertunorderedlist"];for(e=0;f=l[e++];)(function(a){c[a]=function(b){var d=b.options[a],e=function(){b.execCommand(a,this.value)},f=[],g;for(g in d)f.push({label:d[g]||b.getLang()[a][g]||"",value:g,theme:b.options.theme,onclick:e});var h=new c.MenuButton({editor:b,className:"edui-for-"+a,title:b.getLang("labelMap."+a)||"",items:f,onbuttonclick:function(){var c=b.queryCommandValue(a)||this.value;b.execCommand(a,c)}});c.buttons[a]=h;b.addListener("selectionchange", -function(){var c=b.queryCommandState(a);if(-1==c)h.setDisabled(!0);else{h.setDisabled(!1);var d=b.queryCommandValue(a);h.setValue(d);h.setChecked(c)}});return h}})(f);c.fullscreen=function(a,b){b=a.options.labelMap.fullscreen||a.getLang("labelMap.fullscreen")||"";var d=new c.Button({className:"edui-for-fullscreen",title:b,theme:a.options.theme,onclick:function(){a.ui&&a.ui.setFullScreen(!a.ui.isFullScreen());this.setChecked(a.ui.isFullScreen())}});c.buttons.fullscreen=d;a.addListener("selectionchange", -function(){var b=a.queryCommandState("fullscreen");d.setDisabled(-1==b);d.setChecked(a.ui.isFullScreen())});return d};c.emotion=function(b,d){var e=new c.MultiMenuPop({title:b.options.labelMap.emotion||b.getLang("labelMap.emotion")||"",editor:b,className:"edui-for-emotion",iframeUrl:b.ui.mapUrl(d||(b.options.iframeUrlMap||{}).emotion||a.emotion)});c.buttons.emotion=e;b.addListener("selectionchange",function(){e.setDisabled(-1==b.queryCommandState("emotion"))});return e};c.autotypeset=function(a){var b= -new c.AutoTypeSetButton({editor:a,title:a.options.labelMap.autotypeset||a.getLang("labelMap.autotypeset")||"",className:"edui-for-autotypeset",onbuttonclick:function(){a.execCommand("autotypeset")}});c.buttons.autotypeset=b;a.addListener("selectionchange",function(){b.setDisabled(-1==a.queryCommandState("autotypeset"))});return b};c.simpleupload=function(a){var b=new c.Button({className:"edui-for-simpleupload",title:a.options.labelMap.simpleupload||a.getLang("labelMap.simpleupload")||"",onclick:function(){}, -theme:a.options.theme,showText:!1});c.buttons.simpleupload=b;a.addListener("ready",function(){var c=b.getDom("body").children[0];a.fireEvent("simpleuploadbtnready",c)});a.addListener("selectionchange",function(c,d,e){c=a.queryCommandState("simpleupload");-1==c?(b.setDisabled(!0),b.setChecked(!1)):e||(b.setDisabled(!1),b.setChecked(c))});return b}})();(function(){function d(a){this.initOptions(a);this.initEditorUI()}var c=s.editor.utils,b=s.editor.ui.uiUtils,a=s.editor.ui.UIBase,e=s.editor.dom.domUtils, +f=0,g;g=e[f++];)g=g.toLowerCase(),b[g]=function(a){return function(c){var d=new b.Button({className:"edui-for-"+a,title:c.options.labelMap[a]||c.getLang("labelMap."+a)||"",onclick:function(){c.execCommand(a)},theme:c.options.theme,showText:!1});b.buttons[a]=d;c.addListener("selectionchange",function(b,e,f){b=c.queryCommandState(a);-1==b?(d.setDisabled(!0),d.setChecked(!1)):f||(d.setDisabled(!1),d.setChecked(b))});return d}}(g);b.cleardoc=function(a){var c=new b.Button({className:"edui-for-cleardoc", +title:a.options.labelMap.cleardoc||a.getLang("labelMap.cleardoc")||"",theme:a.options.theme,onclick:function(){confirm(a.getLang("confirmClear"))&&a.execCommand("cleardoc")}});b.buttons.cleardoc=c;a.addListener("selectionchange",function(){c.setDisabled(-1==a.queryCommandState("cleardoc"))});return c};var e={justify:["left","right","center","justify"],imagefloat:["none","left","center","right"],directionality:["ltr","rtl"]},l;for(l in e)(function(a,c){for(var d=0,e;e=c[d++];)(function(c){b[a.replace("float", +"")+c]=function(d){var e=new b.Button({className:"edui-for-"+a.replace("float","")+c,title:d.options.labelMap[a.replace("float","")+c]||d.getLang("labelMap."+a.replace("float","")+c)||"",theme:d.options.theme,onclick:function(){d.execCommand(a,c)}});b.buttons[a]=e;d.addListener("selectionchange",function(b,f,g){e.setDisabled(-1==d.queryCommandState(a));e.setChecked(d.queryCommandValue(a)==c&&!g)});return e}})(e)})(l,e[l]);for(f=0;g=["backcolor","forecolor"][f++];)b[g]=function(a){return function(c){var d= +new b.ColorButton({className:"edui-for-"+a,color:"default",title:c.options.labelMap[a]||c.getLang("labelMap."+a)||"",editor:c,onpickcolor:function(b,d){c.execCommand(a,d)},onpicknocolor:function(){c.execCommand(a,"default");this.setColor("transparent");this.color="default"},onbuttonclick:function(){c.execCommand(a,this.color)}});b.buttons[a]=d;c.addListener("selectionchange",function(){d.setDisabled(-1==c.queryCommandState(a))});return d}}(g);e={noOk:["searchreplace","help","spechars","webapp","preview"], +ok:"attachment anchor link insertimage map gmap insertframe wordimage insertvideo insertframe edittip edittable edittd scrawl template music background charts".split(" ")};for(l in e)(function(c,e){for(var f=0,g;g=e[f++];)r.opera&&"searchreplace"===g||function(e){b[e]=function(f,g,h){g=g||(f.options.iframeUrlMap||{})[e]||a[e];h=f.options.labelMap[e]||f.getLang("labelMap."+e)||"";var l;g&&(l=new b.Dialog(d.extend({iframeUrl:f.ui.mapUrl(g),editor:f,className:"edui-for-"+e,title:h,holdScroll:"insertimage"=== +e,fullscreen:/charts|preview/.test(e),closeDialog:f.getLang("closeDialog")},"ok"==c?{buttons:[{className:"edui-okbutton",label:f.getLang("ok"),editor:f,onclick:function(){l.close(!0)}},{className:"edui-cancelbutton",label:f.getLang("cancel"),editor:f,onclick:function(){l.close(!1)}}]}:{})),f.ui._dialogs[e+"Dialog"]=l);var m=new b.Button({className:"edui-for-"+e,title:h,onclick:function(){if(l)switch(e){case "wordimage":var a=f.execCommand("wordimage");a&&a.length&&(l.render(),l.open());break;case "scrawl":-1!= +f.queryCommandState("scrawl")&&(l.render(),l.open());break;default:l.render(),l.open()}},theme:f.options.theme,disabled:"scrawl"==e&&-1==f.queryCommandState("scrawl")||"charts"==e});b.buttons[e]=m;f.addListener("selectionchange",function(){if(!(e in{edittable:1})){var a=f.queryCommandState(e);m.getDom()&&(m.setDisabled(-1==a),m.setChecked(a))}});return m}}(g.toLowerCase())})(l,e[l]);b.snapscreen=function(c,d,e){e=c.options.labelMap.snapscreen||c.getLang("labelMap.snapscreen")||"";var f=new b.Button({className:"edui-for-snapscreen", +title:e,onclick:function(){c.execCommand("snapscreen")},theme:c.options.theme});b.buttons.snapscreen=f;if(d=d||(c.options.iframeUrlMap||{}).snapscreen||a.snapscreen){var g=new b.Dialog({iframeUrl:c.ui.mapUrl(d),editor:c,className:"edui-for-snapscreen",title:e,buttons:[{className:"edui-okbutton",label:c.getLang("ok"),editor:c,onclick:function(){g.close(!0)}},{className:"edui-cancelbutton",label:c.getLang("cancel"),editor:c,onclick:function(){g.close(!1)}}]});g.render();c.ui._dialogs.snapscreenDialog= +g}c.addListener("selectionchange",function(){f.setDisabled(-1==c.queryCommandState("snapscreen"))});return f};b.insertcode=function(a,c,e){c=a.options.insertcode||[];e=a.options.labelMap.insertcode||a.getLang("labelMap.insertcode")||"";var f=[];d.each(c,function(b,c){f.push({label:b,value:c,theme:a.options.theme,renderLabelHtml:function(){return'
'+(this.label||"")+"
"}})});var g=new b.Combox({editor:a,items:f,onselect:function(b,c){a.execCommand("insertcode", +this.items[c].value)},onbuttonclick:function(){this.showPopup()},title:e,initValue:e,className:"edui-for-insertcode",indexByValue:function(a){if(a)for(var b=0,c;c=this.items[b];b++)if(-1!=c.value.indexOf(a))return b;return-1}});b.buttons.insertcode=g;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("insertcode")?g.setDisabled(!0):(g.setDisabled(!1),(b=a.queryCommandValue("insertcode"))?(b&&(b=b.replace(/['"]/g,"").split(",")[0]),g.setValue(b)):g.setValue(e)))});return g}; +b.fontfamily=function(a,c,e){c=a.options.fontfamily||[];e=a.options.labelMap.fontfamily||a.getLang("labelMap.fontfamily")||"";if(c.length){for(var f=0,g,h=[];g=c[f];f++){var l=a.getLang("fontfamily")[g.name]||"";(function(b,c){h.push({label:b,value:c,theme:a.options.theme,renderLabelHtml:function(){return'
'+(this.label||"")+"
"}})})(g.label||l,g.val)}var p=new b.Combox({editor:a,items:h,onselect:function(b,c){a.execCommand("FontFamily", +this.items[c].value)},onbuttonclick:function(){this.showPopup()},title:e,initValue:e,className:"edui-for-fontfamily",indexByValue:function(a){if(a)for(var b=0,c;c=this.items[b];b++)if(-1!=c.value.indexOf(a))return b;return-1}});b.buttons.fontfamily=p;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("FontFamily")?p.setDisabled(!0):(p.setDisabled(!1),(b=a.queryCommandValue("FontFamily"))&&(b=b.replace(/['"]/g,"").split(",")[0]),p.setValue(b)))});return p}};b.fontsize=function(a, +c,d){d=a.options.labelMap.fontsize||a.getLang("labelMap.fontsize")||"";c=c||a.options.fontsize||[];if(c.length){for(var e=[],f=0;f'+(this.label||"")+""}})}var h=new b.Combox({editor:a,items:e,title:d,initValue:d,onselect:function(b,c){a.execCommand("FontSize",this.items[c].value)},onbuttonclick:function(){this.showPopup()}, +className:"edui-for-fontsize"});b.buttons.fontsize=h;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("FontSize")?h.setDisabled(!0):(h.setDisabled(!1),h.setValue(a.queryCommandValue("FontSize"))))});return h}};b.paragraph=function(a,c,e){e=a.options.labelMap.paragraph||a.getLang("labelMap.paragraph")||"";c=a.options.paragraph||[];if(!d.isEmptyObject(c)){var f=[],g;for(g in c)f.push({value:g,label:c[g]||a.getLang("paragraph")[g],theme:a.options.theme,renderLabelHtml:function(){return'
'+(this.label||"")+"
"}});var h=new b.Combox({editor:a,items:f,title:e,initValue:e,className:"edui-for-paragraph",onselect:function(b,c){a.execCommand("Paragraph",this.items[c].value)},onbuttonclick:function(){this.showPopup()}});b.buttons.paragraph=h;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("Paragraph")?h.setDisabled(!0):(h.setDisabled(!1),b=a.queryCommandValue("Paragraph"),-1!=h.indexByValue(b)?h.setValue(b):h.setValue(h.initValue)))}); +return h}};b.customstyle=function(a){var c=a.options.customstyle||[],d=a.options.labelMap.customstyle||a.getLang("labelMap.customstyle")||"";if(c.length){for(var e=a.getLang("customstyle"),f=0,g=[],h;h=c[f++];)(function(b){var c={};c.label=b.label?b.label:e[b.name];c.style=b.style;c.className=b.className;c.tag=b.tag;g.push({label:c.label,value:c,theme:a.options.theme,renderLabelHtml:function(){return'
<'+c.tag+" "+(c.className?' class="'+c.className+'"':"")+(c.style? +' style="'+c.style+'"':"")+">"+c.label+"
"}})})(h);var l=new b.Combox({editor:a,items:g,title:d,initValue:d,className:"edui-for-customstyle",onselect:function(b,c){a.execCommand("customstyle",this.items[c].value)},onbuttonclick:function(){this.showPopup()},indexByValue:function(a){for(var b=0,c;c=this.items[b++];)if(c.label==a)return b-1;return-1}});b.buttons.customstyle=l;a.addListener("selectionchange",function(b,c,d){d||(-1==a.queryCommandState("customstyle")?l.setDisabled(!0): +(l.setDisabled(!1),b=a.queryCommandValue("customstyle"),-1!=l.indexByValue(b)?l.setValue(b):l.setValue(l.initValue)))});return l}};b.inserttable=function(a,c,d){d=a.options.labelMap.inserttable||a.getLang("labelMap.inserttable")||"";var e=new b.TableButton({editor:a,title:d,className:"edui-for-inserttable",onpicktable:function(b,c,d){a.execCommand("InsertTable",{numRows:d,numCols:c,border:1})},onbuttonclick:function(){this.showPopup()}});b.buttons.inserttable=e;a.addListener("selectionchange",function(){e.setDisabled(-1== +a.queryCommandState("inserttable"))});return e};b.lineheight=function(a){var c=a.options.lineheight||[];if(c.length){for(var d=0,e,f=[];e=c[d++];)f.push({label:e,value:e,theme:a.options.theme,onclick:function(){a.execCommand("lineheight",this.value)}});var g=new b.MenuButton({editor:a,className:"edui-for-lineheight",title:a.options.labelMap.lineheight||a.getLang("labelMap.lineheight")||"",items:f,onbuttonclick:function(){var b=a.queryCommandValue("LineHeight")||this.value;a.execCommand("LineHeight", +b)}});b.buttons.lineheight=g;a.addListener("selectionchange",function(){var b=a.queryCommandState("LineHeight");if(-1==b)g.setDisabled(!0);else{g.setDisabled(!1);var c=a.queryCommandValue("LineHeight");c&&g.setValue((c+"").replace(/cm/,""));g.setChecked(b)}});return g}};l=["top","bottom"];for(e=0;f=l[e++];)(function(a){b["rowspacing"+a]=function(c){var d=c.options["rowspacing"+a]||[];if(!d.length)return null;for(var e=0,f,g=[];f=d[e++];)g.push({label:f,value:f,theme:c.options.theme,onclick:function(){c.execCommand("rowspacing", +this.value,a)}});var h=new b.MenuButton({editor:c,className:"edui-for-rowspacing"+a,title:c.options.labelMap["rowspacing"+a]||c.getLang("labelMap.rowspacing"+a)||"",items:g,onbuttonclick:function(){var b=c.queryCommandValue("rowspacing",a)||this.value;c.execCommand("rowspacing",b,a)}});b.buttons[a]=h;c.addListener("selectionchange",function(){var b=c.queryCommandState("rowspacing",a);if(-1==b)h.setDisabled(!0);else{h.setDisabled(!1);var d=c.queryCommandValue("rowspacing",a);d&&h.setValue((d+"").replace(/%/, +""));h.setChecked(b)}});return h}})(f);l=["insertorderedlist","insertunorderedlist"];for(e=0;f=l[e++];)(function(a){b[a]=function(c){var d=c.options[a],e=function(){c.execCommand(a,this.value)},f=[],g;for(g in d)f.push({label:d[g]||c.getLang()[a][g]||"",value:g,theme:c.options.theme,onclick:e});var h=new b.MenuButton({editor:c,className:"edui-for-"+a,title:c.getLang("labelMap."+a)||"",items:f,onbuttonclick:function(){var b=c.queryCommandValue(a)||this.value;c.execCommand(a,b)}});b.buttons[a]=h;c.addListener("selectionchange", +function(){var b=c.queryCommandState(a);if(-1==b)h.setDisabled(!0);else{h.setDisabled(!1);var d=c.queryCommandValue(a);h.setValue(d);h.setChecked(b)}});return h}})(f);b.fullscreen=function(a,c){c=a.options.labelMap.fullscreen||a.getLang("labelMap.fullscreen")||"";var d=new b.Button({className:"edui-for-fullscreen",title:c,theme:a.options.theme,onclick:function(){a.ui&&a.ui.setFullScreen(!a.ui.isFullScreen());this.setChecked(a.ui.isFullScreen())}});b.buttons.fullscreen=d;a.addListener("selectionchange", +function(){var b=a.queryCommandState("fullscreen");d.setDisabled(-1==b);d.setChecked(a.ui.isFullScreen())});return d};b.emotion=function(c,d){var e=new b.MultiMenuPop({title:c.options.labelMap.emotion||c.getLang("labelMap.emotion")||"",editor:c,className:"edui-for-emotion",iframeUrl:c.ui.mapUrl(d||(c.options.iframeUrlMap||{}).emotion||a.emotion)});b.buttons.emotion=e;c.addListener("selectionchange",function(){e.setDisabled(-1==c.queryCommandState("emotion"))});return e};b.autotypeset=function(a){var c= +new b.AutoTypeSetButton({editor:a,title:a.options.labelMap.autotypeset||a.getLang("labelMap.autotypeset")||"",className:"edui-for-autotypeset",onbuttonclick:function(){a.execCommand("autotypeset")}});b.buttons.autotypeset=c;a.addListener("selectionchange",function(){c.setDisabled(-1==a.queryCommandState("autotypeset"))});return c};b.simpleupload=function(a){var c=new b.Button({className:"edui-for-simpleupload",title:a.options.labelMap.simpleupload||a.getLang("labelMap.simpleupload")||"",onclick:function(){}, +theme:a.options.theme,showText:!1});b.buttons.simpleupload=c;a.addListener("ready",function(){var b=c.getDom("body").children[0];a.fireEvent("simpleuploadbtnready",b)});a.addListener("selectionchange",function(b,d,e){b=a.queryCommandState("simpleupload");-1==b?(c.setDisabled(!0),c.setChecked(!1)):e||(c.setDisabled(!1),c.setChecked(b))});return c}})();(function(){function d(a){this.initOptions(a);this.initEditorUI()}var b=t.editor.utils,c=t.editor.ui.uiUtils,a=t.editor.ui.UIBase,e=t.editor.dom.domUtils, f=[];d.prototype={uiName:"editor",initEditorUI:function(){function a(b,c){b.setOpt({wordCount:!0,maximumWords:1E4,wordCountMsg:b.options.wordCountMsg||b.getLang("wordCountMsg"),wordOverFlowMsg:b.options.wordOverFlowMsg||b.getLang("wordOverFlowMsg")});var d=b.options,e=d.maximumWords,f=d.wordCountMsg,g=d.wordOverFlowMsg,h=c.getDom("wordcount");d.wordCount&&(d=b.getContentLength(!0),d>e?(h.innerHTML=g,b.fireEvent("wordcountoverflow")):h.innerHTML=f.replace("{#leave}",e-d).replace("{#count}",d))}this.editor.ui= -this;this._dialogs={};this.initUIBase();this._initToolbars();var b=this.editor,c=this;b.addListener("ready",function(){b.getDialog=function(a){return b.ui._dialogs[a+"Dialog"]};e.on(b.window,"scroll",function(a){s.editor.ui.Popup.postHide(a)});b.ui._actualFrameWidth=b.options.initialFrameWidth;UE.browser.ie&&6===UE.browser.version&&b.container.ownerDocument.execCommand("BackgroundImageCache",!1,!0);b.options.elementPathEnabled&&(b.ui.getDom("elementpath").innerHTML='
'+ +this;this._dialogs={};this.initUIBase();this._initToolbars();var b=this.editor,c=this;b.addListener("ready",function(){b.getDialog=function(a){return b.ui._dialogs[a+"Dialog"]};e.on(b.window,"scroll",function(a){t.editor.ui.Popup.postHide(a)});b.ui._actualFrameWidth=b.options.initialFrameWidth;UE.browser.ie&&6===UE.browser.version&&b.container.ownerDocument.execCommand("BackgroundImageCache",!1,!0);b.options.elementPathEnabled&&(b.ui.getDom("elementpath").innerHTML='
'+ b.getLang("elementPathTip")+":
");b.options.wordCount&&(e.on(b.document,"click",function(){a(b,c);e.un(b.document,"click",arguments.callee)}),b.ui.getDom("wordcount").innerHTML=b.getLang("wordCountTip"));b.ui._scale();b.options.scaleEnabled?(b.autoHeightEnabled&&b.disableAutoHeight(),c.enableScale()):c.disableScale();b.options.elementPathEnabled||b.options.wordCount||b.options.scaleEnabled||(b.ui.getDom("elementpath").style.display="none",b.ui.getDom("wordcount").style.display="none",b.ui.getDom("scale").style.display= -"none");b.selection.isFocus()&&b.fireEvent("selectionchange",!1,!0)});b.addListener("mousedown",function(a,b){s.editor.ui.Popup.postHide(b,b.target||b.srcElement);s.editor.ui.ShortCutMenu.postHide(b)});b.addListener("delcells",function(){UE.ui.edittip&&new UE.ui.edittip(b);b.getDialog("edittip").open()});var d,f=!1,g;b.addListener("afterpaste",function(){b.queryCommandState("pasteplain")||(s.editor.ui.PastePicker&&(d=new s.editor.ui.Popup({content:new s.editor.ui.PastePicker({editor:b}),editor:b, -className:"edui-wordpastepop"}),d.render()),f=!0)});b.addListener("afterinserthtml",function(){clearTimeout(g);g=setTimeout(function(){if(d&&(f||b.ui._isTransfer)){if(d.isHidden()){var a=e.createElement(b.document,"span",{style:"line-height:0px;",innerHTML:"\ufeff"});b.selection.getRange().insertNode(a);var c=X(a,"firstChild","previousSibling");c&&d.showAnchor(3==c.nodeType?c.parentNode:c);e.remove(a)}else d.show();delete b.ui._isTransfer;f=!1}},200)});b.addListener("contextmenu",function(a,b){s.editor.ui.Popup.postHide(b)}); -b.addListener("keydown",function(a,b){d&&d.dispose(b);var c=b.keyCode||b.which;if(b.altKey&&90==c)UE.ui.buttons.fullscreen.onclick()});b.addListener("wordcount",function(b){a(this,c)});b.addListener("selectionchange",function(){if(b.options.elementPathEnabled)c[(-1==b.queryCommandState("elementpath")?"dis":"en")+"ableElementPath"]();if(b.options.scaleEnabled)c[(-1==b.queryCommandState("scale")?"dis":"en")+"ableScale"]()});var h=new s.editor.ui.Popup({editor:b,content:"",className:"edui-bubble",_onEditButtonClick:function(){this.hide(); +"none");b.selection.isFocus()&&b.fireEvent("selectionchange",!1,!0)});b.addListener("mousedown",function(a,b){t.editor.ui.Popup.postHide(b,b.target||b.srcElement);t.editor.ui.ShortCutMenu.postHide(b)});b.addListener("delcells",function(){UE.ui.edittip&&new UE.ui.edittip(b);b.getDialog("edittip").open()});var d,f=!1,g;b.addListener("afterpaste",function(){b.queryCommandState("pasteplain")||(t.editor.ui.PastePicker&&(d=new t.editor.ui.Popup({content:new t.editor.ui.PastePicker({editor:b}),editor:b, +className:"edui-wordpastepop"}),d.render()),f=!0)});b.addListener("afterinserthtml",function(){clearTimeout(g);g=setTimeout(function(){if(d&&(f||b.ui._isTransfer)){if(d.isHidden()){var a=e.createElement(b.document,"span",{style:"line-height:0px;",innerHTML:"\ufeff"});b.selection.getRange().insertNode(a);var c=Y(a,"firstChild","previousSibling");c&&d.showAnchor(3==c.nodeType?c.parentNode:c);e.remove(a)}else d.show();delete b.ui._isTransfer;f=!1}},200)});b.addListener("contextmenu",function(a,b){t.editor.ui.Popup.postHide(b)}); +b.addListener("keydown",function(a,b){d&&d.dispose(b);var c=b.keyCode||b.which;if(b.altKey&&90==c)UE.ui.buttons.fullscreen.onclick()});b.addListener("wordcount",function(b){a(this,c)});b.addListener("selectionchange",function(){if(b.options.elementPathEnabled)c[(-1==b.queryCommandState("elementpath")?"dis":"en")+"ableElementPath"]();if(b.options.scaleEnabled)c[(-1==b.queryCommandState("scale")?"dis":"en")+"ableScale"]()});var h=new t.editor.ui.Popup({editor:b,content:"",className:"edui-bubble",_onEditButtonClick:function(){this.hide(); b.ui._dialogs.linkDialog.open()},_onImgEditButtonClick:function(a){this.hide();b.ui._dialogs[a]&&b.ui._dialogs[a].open()},_onImgSetFloat:function(a){this.hide();b.execCommand("imagefloat",a)},_setIframeAlign:function(a){var b=h.anchorEl,c=b.cloneNode(!0);switch(a){case -2:c.setAttribute("align","");break;case -1:c.setAttribute("align","left");break;case 1:c.setAttribute("align","right")}b.parentNode.insertBefore(c,b);e.remove(b);h.anchorEl=c;h.showAnchor(h.anchorEl)},_updateIframe:function(){var a= -b._iframe=h.anchorEl;e.hasClass(a,"ueditor_baidumap")?(b.selection.getRange().selectNode(a).select(),b.ui._dialogs.mapDialog.open()):b.ui._dialogs.insertframeDialog.open();h.hide()},_onRemoveButtonClick:function(a){b.execCommand(a);this.hide()},queryAutoHide:function(a){return a&&a.ownerDocument==b.document&&("img"==a.tagName.toLowerCase()||e.findParentByTagName(a,"a",!0))?a!==h.anchorEl:s.editor.ui.Popup.prototype.queryAutoHide.call(this,a)}});h.render();b.options.imagePopup&&(b.addListener("mouseover", +b._iframe=h.anchorEl;e.hasClass(a,"ueditor_baidumap")?(b.selection.getRange().selectNode(a).select(),b.ui._dialogs.mapDialog.open()):b.ui._dialogs.insertframeDialog.open();h.hide()},_onRemoveButtonClick:function(a){b.execCommand(a);this.hide()},queryAutoHide:function(a){return a&&a.ownerDocument==b.document&&("img"==a.tagName.toLowerCase()||e.findParentByTagName(a,"a",!0))?a!==h.anchorEl:t.editor.ui.Popup.prototype.queryAutoHide.call(this,a)}});h.render();b.options.imagePopup&&(b.addListener("mouseover", function(a,c){c=c||window.event;var d=c.target||c.srcElement;if(b.ui._dialogs.insertframeDialog&&/iframe/ig.test(d.tagName)){var e=h.formatHtml(""+b.getLang("property")+': '+b.getLang("default")+'  '+b.getLang("justifyleft")+'  '+b.getLang("justifyright")+'   '+ b.getLang("modify")+"");e?(h.getDom("content").innerHTML=e,h.anchorEl=d,h.showAnchor(h.anchorEl)):h.hide()}}),b.addListener("selectionchange",function(a,c){if(c){var d="",f="",g=b.selection.getRange().getClosedNode(),f=b.ui._dialogs;if(g&&"IMG"==g.tagName){var l="insertimageDialog";if(-1!=g.className.indexOf("edui-faked-video")||-1!=g.className.indexOf("edui-upload-video"))l="insertvideoDialog";-1!=g.className.indexOf("edui-faked-webapp")&&(l="webappDialog");-1!=g.src.indexOf("http://api.map.baidu.com")&& (l="mapDialog");-1!=g.className.indexOf("edui-faked-music")&&(l="musicDialog");-1!=g.src.indexOf("http://maps.google.com/maps/api/staticmap")&&(l="gmapDialog");g.getAttribute("anchorname")&&(l="anchorDialog",d=h.formatHtml(""+b.getLang("property")+': '+b.getLang("modify")+"  "+b.getLang("delete")+""));g.getAttribute("word_img")&& (b.word_img=[g.getAttribute("word_img")],l="wordimageDialog");if(e.hasClass(g,"loadingclass")||e.hasClass(g,"loaderrorclass"))l="";if(!f[l])return;f=""+b.getLang("property")+': '+b.getLang("default")+'  '+b.getLang("justifyleft")+'  '+b.getLang("justifyright")+'  '+ b.getLang("justifycenter")+"  '+b.getLang("modify")+"";!d&&(d=h.formatHtml(f))}if(b.ui._dialogs.linkDialog){var m=b.queryCommandValue("link"),n;m&&(n=m.getAttribute("_href")||m.getAttribute("href",2))&&(f=n,30
'),d+=h.formatHtml(""+b.getLang("anthorMsg")+': '+f+' '+ -b.getLang("modify")+' '+b.getLang("clear")+""),h.showAnchor(m))}d?(h.getDom("content").innerHTML=d,h.anchorEl=g||m,h.showAnchor(h.anchorEl)):h.hide()}}))},_initToolbars:function(){for(var a=this.editor,b=this.toolbars||[],d=[],e=0;e
'+(this.toolbars.length?'
'+ +b.getLang("modify")+' '+b.getLang("clear")+""),h.showAnchor(m))}d?(h.getDom("content").innerHTML=d,h.anchorEl=g||m,h.showAnchor(h.anchorEl)):h.hide()}}))},_initToolbars:function(){for(var a=this.editor,c=this.toolbars||[],d=[],e=0;e
'+(this.toolbars.length?'
'+ this.renderToolbarBoxHtml()+"
":"")+'
'}, -showWordImageDialog:function(){this._dialogs.wordimageDialog.open()},renderToolbarBoxHtml:function(){for(var a=[],b=0;b'+e+"");a.innerHTML='
'+ -this.editor.getLang("elementPathTip")+": "+c.join(" > ")+"
"}else a.style.display="none"},disableElementPath:function(){var a=this.getDom("elementpath");a.innerHTML="";a.style.display="none";this.elementPathEnabled=!1},enableElementPath:function(){this.getDom("elementpath").style.display="";this.elementPathEnabled=!0;this._updateElementPath()},_scale:function(){function a(){I=e.getXY(h);L||(L=g.options.minFrameHeight+s.offsetHeight+v.offsetHeight);G.style.cssText="position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:"+ -h.offsetWidth+"px;height:"+h.offsetHeight+"px;z-index:"+(g.options.zIndex+1);e.on(f,"mousemove",b);e.on(p,"mouseup",c);e.on(f,"mouseup",c)}function b(a){d();a=a||window.event;T=a.pageX||f.documentElement.scrollLeft+a.clientX;z=a.pageY||f.documentElement.scrollTop+a.clientY;H=T-I.x;D=z-I.y;H>=P&&(A=!0,G.style.width=H+"px");D>=L&&(A=!0,G.style.height=D+"px")}function c(){A&&(A=!1,g.ui._actualFrameWidth=G.offsetWidth-2,h.style.width=g.ui._actualFrameWidth+"px",g.setHeight(G.offsetHeight-v.offsetHeight- -s.offsetHeight-2,!0));G&&(G.style.display="none");d();e.un(f,"mousemove",b);e.un(p,"mouseup",c);e.un(f,"mouseup",c)}function d(){r.ie?f.selection.clear():window.getSelection().removeAllRanges()}var f=document,g=this.editor,h=g.container,p=g.document,s=this.getDom("toolbarbox"),v=this.getDom("bottombar"),E=this.getDom("scale"),G=this.getDom("scalelayer"),A=!1,I=null,L=0,P=g.options.minFrameWidth,T=0,z=0,H=0,D=0,B=this;this.editor.addListener("fullscreenchanged",function(a,b){if(b)B.disableScale(); -else if(B.editor.options.scaleEnabled){B.enableScale();var c=B.editor.document.createElement("span");B.editor.body.appendChild(c);B.editor.body.style.height=Math.max(e.getXY(c).y,B.editor.iframe.offsetHeight-20)+"px";e.remove(c)}});this.enableScale=function(){1!=g.queryCommandState("source")&&(E.style.display="",this.scaleEnabled=!0,e.on(E,"mousedown",a))};this.disableScale=function(){E.style.display="none";this.scaleEnabled=!1;e.un(E,"mousedown",a)}},isFullScreen:function(){return this._fullscreen}, -postRender:function(){a.prototype.postRender.call(this);for(var b=0;b[\n\r\t]+([ ]{4})+/g,">").replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<");a.className&&(g.className=a.className);a.style.cssText&&(g.style.cssText=a.style.cssText);/textarea/i.test(a.tagName)?(b.textarea=a,b.textarea.style.display="none"):a.parentNode.removeChild(a);a.id&&(g.id=a.id,e.removeAttributes(a,"id"));a=g;a.innerHTML=""}e.addClass(a,"edui-"+b.options.theme);b.ui.render(a);g=b.options;b.container=b.ui.getDom();for(var h=e.findParents(a, -!0),l=[],p=0,q;q=h[p];p++)l[p]=q.style.display,q.style.display="block";g.initialFrameWidth?g.minFrameWidth=g.initialFrameWidth:(g.minFrameWidth=g.initialFrameWidth=a.offsetWidth,p=a.style.width,/%$/.test(p)&&(g.initialFrameWidth=p));g.initialFrameHeight?g.minFrameHeight=g.initialFrameHeight:g.initialFrameHeight=g.minFrameHeight=a.offsetHeight;for(p=0;q=h[p];p++)q.style.display=l[p];a.style.height&&(a.style.height="");b.container.style.width=g.initialFrameWidth+(/%$/.test(g.initialFrameWidth)?"":"px"); -b.container.style.zIndex=g.zIndex;f.call(b,b.ui.getDom("iframeholder"));b.fireEvent("afteruiready")}b.langIsReady?c():b.addListener("langReady",c)})};return b};UE.getEditor=function(a,b){var c=g[a];c||(c=g[a]=new UE.ui.Editor(b),c.render(a));return c};UE.delEditor=function(a){var b;if(b=g[a])b.key&&b.destroy(),delete g[a]};UE.registerUI=function(a,b,d,e){c.each(a.split(/\s+/),function(a){UE._customizeUI[a]={id:e,execFn:b,index:d}})}})();UE.registerUI("message",function(d){function c(){var b=f.ui.getDom("toolbarbox"); -b&&(a.style.top=b.offsetHeight+3+"px");a.style.zIndex=Math.max(f.options.zIndex,f.iframe.style.zIndex)+1}var b=s.editor.ui.Message,a,e=[],f=d;f.addListener("ready",function(){a=document.getElementById(f.ui.id+"_message_holder");c();setTimeout(function(){c()},500)});f.addListener("showmessage",function(d,l){l=p.isString(l)?{content:l}:l;var k=new b({timeout:l.timeout,type:l.type,content:l.content,keepshow:l.keepshow,editor:f}),m=l.id||"msg_"+(+new Date).toString(36);k.render(a);e[m]=k;k.reset(l);c(); -return m});f.addListener("updatemessage",function(b,c,d){d=p.isString(d)?{content:d}:d;b=e[c];b.render(a);b&&b.reset(d)});f.addListener("hidemessage",function(a,b){var c=e[b];c&&c.hide()})});UE.registerUI("autosave",function(d){var c=null,b=null;d.on("afterautosave",function(){clearTimeout(c);c=setTimeout(function(){b&&d.trigger("hidemessage",b);b=d.trigger("showmessage",{content:d.getLang("autosave.success"),timeout:2E3})},2E3)})})})(); +document.body.style.overflow=this._bakBodyOverflow;b.iframe.parentNode.style.width=this._bakEditorContaninerWidth+"px";window.scrollTo(0,this._bakScrollTop)}if(r.gecko&&"true"===b.body.contentEditable){var g=document.createElement("input");document.body.appendChild(g);b.body.contentEditable=!1;setTimeout(function(){g.focus();setTimeout(function(){b.body.contentEditable=!0;b.fireEvent("fullscreenchanged",a);b.selection.getRange().moveToBookmark(d).select(!0);t.editor.dom.domUtils.remove(g);a&&window.scroll(0, +0)},0)},0)}"true"===b.body.contentEditable&&(this.editor.fireEvent("fullscreenchanged",a),this.triggerLayout())}},_updateFullScreen:function(){if(this._fullscreen){var a=c.getViewportRect();this.getDom().style.cssText="border:0;position:absolute;left:0;top:"+(this.editor.options.topOffset||0)+"px;width:"+a.width+"px;height:"+a.height+"px;z-index:"+(1*this.getDom().style.zIndex+100);c.setViewportOffset(this.getDom(),{left:0,top:this.editor.options.topOffset||0});this.editor.setHeight(a.height-this.getDom("toolbarbox").offsetHeight- +this.getDom("bottombar").offsetHeight-(this.editor.options.topOffset||0),!0);if(r.gecko)try{window.onresize()}catch(b){}}},_updateElementPath:function(){var a=this.getDom("elementpath"),b;if(this.elementPathEnabled&&(b=this.editor.queryCommandValue("elementpath"))){for(var c=[],d=0,e;e=b[d];d++)c[d]=this.formatHtml(''+e+"");a.innerHTML='
'+ +this.editor.getLang("elementPathTip")+": "+c.join(" > ")+"
"}else a.style.display="none"},disableElementPath:function(){var a=this.getDom("elementpath");a.innerHTML="";a.style.display="none";this.elementPathEnabled=!1},enableElementPath:function(){this.getDom("elementpath").style.display="";this.elementPathEnabled=!0;this._updateElementPath()},_scale:function(){function a(){J=e.getXY(h);M||(M=g.options.minFrameHeight+t.offsetHeight+w.offsetHeight);H.style.cssText="position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:"+ +h.offsetWidth+"px;height:"+h.offsetHeight+"px;z-index:"+(g.options.zIndex+1);e.on(f,"mousemove",b);e.on(p,"mouseup",c);e.on(f,"mouseup",c)}function b(a){d();a=a||window.event;U=a.pageX||f.documentElement.scrollLeft+a.clientX;A=a.pageY||f.documentElement.scrollTop+a.clientY;I=U-J.x;E=A-J.y;I>=Q&&(B=!0,H.style.width=I+"px");E>=M&&(B=!0,H.style.height=E+"px")}function c(){B&&(B=!1,g.ui._actualFrameWidth=H.offsetWidth-2,h.style.width=g.ui._actualFrameWidth+"px",g.setHeight(H.offsetHeight-w.offsetHeight- +t.offsetHeight-2,!0));H&&(H.style.display="none");d();e.un(f,"mousemove",b);e.un(p,"mouseup",c);e.un(f,"mouseup",c)}function d(){r.ie?f.selection.clear():window.getSelection().removeAllRanges()}var f=document,g=this.editor,h=g.container,p=g.document,t=this.getDom("toolbarbox"),w=this.getDom("bottombar"),F=this.getDom("scale"),H=this.getDom("scalelayer"),B=!1,J=null,M=0,Q=g.options.minFrameWidth,U=0,A=0,I=0,E=0,C=this;this.editor.addListener("fullscreenchanged",function(a,b){if(b)C.disableScale(); +else if(C.editor.options.scaleEnabled){C.enableScale();var c=C.editor.document.createElement("span");C.editor.body.appendChild(c);C.editor.body.style.height=Math.max(e.getXY(c).y,C.editor.iframe.offsetHeight-20)+"px";e.remove(c)}});this.enableScale=function(){1!=g.queryCommandState("source")&&(F.style.display="",this.scaleEnabled=!0,e.on(F,"mousedown",a))};this.disableScale=function(){F.style.display="none";this.scaleEnabled=!1;e.un(F,"mousedown",a)}},isFullScreen:function(){return this._fullscreen}, +postRender:function(){a.prototype.postRender.call(this);for(var b=0;b[\n\r\t]+([ ]{4})+/g,">").replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<");a.className&&(g.className=a.className);a.style.cssText&&(g.style.cssText=a.style.cssText);/textarea/i.test(a.tagName)?(c.textarea=a,c.textarea.style.display="none"):a.parentNode.removeChild(a);a.id&&(g.id=a.id,e.removeAttributes(a,"id"));a=g;a.innerHTML=""}e.addClass(a,"edui-"+c.options.theme);c.ui.render(a);g=c.options;c.container=c.ui.getDom();for(var h=e.findParents(a, +!0),l=[],p=0,q;q=h[p];p++)l[p]=q.style.display,q.style.display="block";g.initialFrameWidth?g.minFrameWidth=g.initialFrameWidth:(g.minFrameWidth=g.initialFrameWidth=a.offsetWidth,p=a.style.width,/%$/.test(p)&&(g.initialFrameWidth=p));g.initialFrameHeight?g.minFrameHeight=g.initialFrameHeight:g.initialFrameHeight=g.minFrameHeight=a.offsetHeight;for(p=0;q=h[p];p++)q.style.display=l[p];a.style.height&&(a.style.height="");c.container.style.width=g.initialFrameWidth+(/%$/.test(g.initialFrameWidth)?"":"px"); +c.container.style.zIndex=g.zIndex;f.call(c,c.ui.getDom("iframeholder"));c.fireEvent("afteruiready")}c.langIsReady?b():c.addListener("langReady",b)})};return c};UE.getEditor=function(a,b){var c=g[a];c||(c=g[a]=new UE.ui.Editor(b),c.render(a));return c};UE.delEditor=function(a){var b;if(b=g[a])b.key&&b.destroy(),delete g[a]};UE.registerUI=function(a,c,d,e){b.each(a.split(/\s+/),function(a){UE._customizeUI[a]={id:e,execFn:c,index:d}})}})();UE.registerUI("message",function(d){function b(){var b=f.ui.getDom("toolbarbox"); +b&&(a.style.top=b.offsetHeight+3+"px");a.style.zIndex=Math.max(f.options.zIndex,f.iframe.style.zIndex)+1}var c=t.editor.ui.Message,a,e=[],f=d;f.addListener("ready",function(){a=document.getElementById(f.ui.id+"_message_holder");b();setTimeout(function(){b()},500)});f.addListener("showmessage",function(d,l){l=p.isString(l)?{content:l}:l;var k=new c({timeout:l.timeout,type:l.type,content:l.content,keepshow:l.keepshow,editor:f}),m=l.id||"msg_"+(+new Date).toString(36);k.render(a);e[m]=k;k.reset(l);b(); +return m});f.addListener("updatemessage",function(b,c,d){d=p.isString(d)?{content:d}:d;b=e[c];b.render(a);b&&b.reset(d)});f.addListener("hidemessage",function(a,b){var c=e[b];c&&c.hide()})});UE.registerUI("autosave",function(d){var b=null,c=null;d.on("afterautosave",function(){clearTimeout(b);b=setTimeout(function(){c&&d.trigger("hidemessage",c);c=d.trigger("showmessage",{content:d.getLang("autosave.success"),timeout:2E3})},2E3)})})})(); diff --git a/Public/ueditor/ueditor.parse.js b/Public/ueditor/ueditor.parse.js index 09393ab..6d76e92 100644 --- a/Public/ueditor/ueditor.parse.js +++ b/Public/ueditor/ueditor.parse.js @@ -1,7 +1,7 @@ /*! * UEditor * version: ueditor - * build: Thu May 29 2014 16:47:49 GMT+0800 (中国标准时间) + * build: Tue Aug 25 2015 15:23:01 GMT+0800 (CST) */ (function(){ diff --git a/Public/ueditor/ueditor.parse.min.js b/Public/ueditor/ueditor.parse.min.js index 1888454..7282e01 100644 --- a/Public/ueditor/ueditor.parse.min.js +++ b/Public/ueditor/ueditor.parse.min.js @@ -1,28 +1,28 @@ -(function(){(function(){UE=window.UE||{};var f=!!window.ActiveXObject,h={removeLastbs:function(a){return a.replace(/\/$/,"")},extend:function(a,d){for(var b=arguments,c=this.isBoolean(b[b.length-1])?b[b.length-1]:!1,e=this.isBoolean(b[b.length-1])?b.length-1:b.length,k=1;k=b&&a===d)return c=k,!1});return c},hasClass:function(a,d){d=d.replace(/(^[ ]+)|([ ]+$)/g,"").replace(/[ ]{2,}/g," ").split(" ");for(var b=0,c,e=a.className;c=d[b++];)if(!RegExp("\\b"+c+"\\b","i").test(e))return!1;return b-1==d.length},addClass:function(a,d){if(a){d=this.trim(d).replace(/[ ]{2,}/g, -" ").split(" ");for(var b=0,c,e=a.className;c=d[b++];)RegExp("\\b"+c+"\\b").test(e)||(e+=" "+c);a.className=h.trim(e)}},removeClass:function(a,d){d=this.isArray(d)?d:this.trim(d).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,c,e=a.className;c=d[b++];)e=e.replace(RegExp("\\b"+c+"\\b"),"");e=this.trim(e).replace(/[ ]{2,}/g," ");a.className=e;!e&&a.removeAttribute("className")},on:function(a,d,b){var c=this.isArray(d)?d:d.split(/\s+/),e=c.length;if(e)for(;e--;)if(d=c[e],a.addEventListener)a.addEventListener(d, -b,!1);else{b._d||(b._d={els:[]});var k=d+b.toString(),n=h.indexOf(b._d.els,a);b._d[k]&&-1!=n||(-1==n&&b._d.els.push(a),b._d[k]||(b._d[k]=function(a){return b.call(a.srcElement,a||window.event)}),a.attachEvent("on"+d,b._d[k]))}a=null},off:function(a,d,b){var c=this.isArray(d)?d:d.split(/\s+/),e=c.length;if(e)for(;e--;)if(d=c[e],a.removeEventListener)a.removeEventListener(d,b,!1);else{var k=d+b.toString();try{a.detachEvent("on"+d,b._d?b._d[k]:b)}catch(n){}b._d&&b._d[k]&&(d=h.indexOf(b._d.els,a),-1!= -d&&b._d.els.splice(d,1),0==b._d.els.length&&delete b._d[k])}},loadFile:function(){function a(a,c){try{for(var e=0,k;k=d[e++];)if(k.doc===a&&k.url==(c.src||c.href))return k}catch(n){return null}}var d=[];return function(b,c,e){var k=a(b,c);if(k)k.ready?e&&e():k.funs.push(e);else if(d.push({doc:b,url:c.src||c.href,funs:[e]}),!b.body){e=[];for(var n in c)"tag"!=n&&e.push(n+'="'+c[n]+'"');b.write("<"+c.tag+" "+e.join(" ")+" >")}else if(!c.id||!b.getElementById(c.id)){var l=b.createElement(c.tag); -delete c.tag;for(n in c)l.setAttribute(n,c[n]);l.onload=l.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){k=a(b,c);if(0=b&&a===c)return d=k,!1});return d},hasClass:function(a,c){c=c.replace(/(^[ ]+)|([ ]+$)/g,"").replace(/[ ]{2,}/g," ").split(" ");for(var b=0,d,e=a.className;d=c[b++];)if(!(new RegExp("\\b"+d+"\\b","i")).test(e))return!1;return b-1==c.length},addClass:function(a,c){if(a){c= +this.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,d,e=a.className;d=c[b++];)(new RegExp("\\b"+d+"\\b")).test(e)||(e+=" "+d);a.className=h.trim(e)}},removeClass:function(a,c){c=this.isArray(c)?c:this.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var b=0,d,e=a.className;d=c[b++];)e=e.replace(new RegExp("\\b"+d+"\\b"),"");e=this.trim(e).replace(/[ ]{2,}/g," ");a.className=e;!e&&a.removeAttribute("className")},on:function(a,c,b){var d=this.isArray(c)?c:c.split(/\s+/),e=d.length;if(e)for(;e--;)if(c= +d[e],a.addEventListener)a.addEventListener(c,b,!1);else{b._d||(b._d={els:[]});var k=c+b.toString(),n=h.indexOf(b._d.els,a);b._d[k]&&-1!=n||(-1==n&&b._d.els.push(a),b._d[k]||(b._d[k]=function(a){return b.call(a.srcElement,a||window.event)}),a.attachEvent("on"+c,b._d[k]))}a=null},off:function(a,c,b){var d=this.isArray(c)?c:c.split(/\s+/),e=d.length;if(e)for(;e--;)if(c=d[e],a.removeEventListener)a.removeEventListener(c,b,!1);else{var k=c+b.toString();try{a.detachEvent("on"+c,b._d?b._d[k]:b)}catch(n){}b._d&& +b._d[k]&&(c=h.indexOf(b._d.els,a),-1!=c&&b._d.els.splice(c,1),0==b._d.els.length&&delete b._d[k])}},loadFile:function(){function a(a,d){try{for(var e=0,k;k=c[e++];)if(k.doc===a&&k.url==(d.src||d.href))return k}catch(n){return null}}var c=[];return function(b,d,e){var k=a(b,d);if(k)k.ready?e&&e():k.funs.push(e);else if(c.push({doc:b,url:d.src||d.href,funs:[e]}),!b.body){e=[];for(var n in d)"tag"!=n&&e.push(n+'="'+d[n]+'"');b.write("<"+d.tag+" "+e.join(" ")+" >")}else if(!d.id||!b.getElementById(d.id)){var l= +b.createElement(d.tag);delete d.tag;for(n in d)l.setAttribute(n,d[n]);l.onload=l.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){k=a(b,d);if(0 * **开发者:** Martin Chow(E-Mail:1009465756@qq.com) +# 欢迎使用SRCMS·轻响应框架 V1.5正式版 +**像使用办公软件一样容易,为你的企业建立起美观完备的安全应急响应中心** +**SRCMS**是专门为中小企业和互联网产品创业团队打造的应急响应中心网站建站框架。 +> * **项目维护:** Martin Zhou(E-Mail:1009465756@qq.com) > * **官网:** http://www.src.pw -> * **QQ交流群:**132108046 +> * **QQ群:**132108046 --- ##框架首次运行配置说明: -在进行下面的步骤之前,请您确保本地或服务器有运行PHP程序的环境(推荐环境:Apache+PHP+MySQL),接下来您需要: +在进行下面的步骤之前,请您确保本地或服务器有运行PHP程序的环境(推荐环境:Apache+PHP5.0及以上[暂不能完美兼容PHP7]+MySQL),接下来您需要: -* 通过SRCMS(轻响应)Github托管页面(https://github.com/martinzhou2015/SRCMS/)将项目源代码下载 +* 1. 通过Github代码托管页面将项目源代码下载 -* 项目根目录的DB目录下存储着Demo数据库,您需要在phpmyadmin建立一个名为srcms的数据库,然后将整个srcms.sql导入刚刚创建的数据库。接下来您就可以通过在浏览器内输入 相应地址体验SRCMS(轻响应)了。 +* 2. 在phpmyadmin建立一个名为srcms的数据库,然后将./DB目录下srcms.sql文件导入刚刚创建的数据库。 + +* 3. 打开./Application/Common/Conf/config.php,按照文件中绿色注释文字的提示,填写网站找回密码、后台登陆报警所需要使用到SMTP服务的相关配置。 + +* 4. 打开./Application/Common/Conf/db.php,调整本地数据库连接相关配置。 + +* 5. 初次配置全部完成,下面您就可以通过在浏览器内输入相应地址体验SRCMS(轻响应)了。 --- ##版本更新日志 +#####2016-01-24 +* **新增** 新版首页:简洁、大方、更为灵活,方便您建立有自己特色的安全应急响应中心 +* **新增** 新版前台个人中心:支持支付宝账号的录入 +* **新增** 前台礼品兑换功能:用户可以在前台兑换礼品 +* **新增** 漏洞报告临时授权查看 +* **新增** 安全工单系统:合并进入了快捷方便的安全工单系统,方便安全和开发部门对安全事件的响应 +* **新增** 系统配置功能:通过后台配置修改网站标题等配置 +* **新增** robots.txt:根目录下增加了robots.txt方便搜索爬虫抓取,同时防止敏感内容被获取 +* **优化** 前端静态资源:网站打开更快 +* **修复** 漏洞报告中富文本XSS问题(Issued By Ivan) +* **修复** 数据库gbk导致的编码问题(Issued By Del技术菜鸟) + #####2015-10-06 * **新增** 团队博客 * **新增** 后台登陆保护 @@ -28,9 +47,13 @@ ##框架BUG提交说明 如果您在使用本框架或是二次开发中发现任何SRCMS的问题,都欢迎通过Github将问题issue给我 +--- +##二次开发帮助说明 +如果您在二次开发SRCMS,搭建自己的安全应急响应中心时遇到问题,非常欢迎通过QQ或邮件咨询我:1009465756(@qq.com) + --- ##致谢 -在开发过程中SRCMS参考了不少优秀的开源项目,在此向下面的开发者们致谢: +在开发过程中,SRCMS参考借鉴了不少优秀的开源项目,在此向下面的开发者们致谢: * [ThinkPHP](http://www.thinkphp.cn/) * [ThinkAdmin](http://www.thinkphp.cn/code/1342.html) diff --git a/ThinkPHP/Library/Org/Net/Geetestlib.class.php b/ThinkPHP/Library/Org/Net/Geetestlib.class.php new file mode 100644 index 0000000..8950e4f --- /dev/null +++ b/ThinkPHP/Library/Org/Net/Geetestlib.class.php @@ -0,0 +1,57 @@ + + */ + class Geetestlib { + public function geetest_validate($challenge, $validate, $seccode, $key) { + $apiserver = 'api.geetest.com'; + if (strlen($validate) > 0 && $this->check_result_by_private($challenge, $validate, $key)) { + $query = 'seccode='.$seccode; + $servervalidate = $this->http_post($apiserver, '/validate.php', $query); + if (strlen($servervalidate) > 0 && $servervalidate == md5($seccode)) { + return TRUE; + } + } + + return FALSE; + } + private function check_result_by_private($origin, $validate, $key) { + return $validate == md5($key.'geetest'.$origin) ? TRUE : FALSE; + } + private function http_post($host, $path, $data, $port = 80) { + // $data = $this->fix_encoding($data); + + $http_request = "POST $path HTTP/1.0\r\n"; + $http_request .= "Host: $host\r\n"; + $http_request .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $http_request .= "Content-Length: " . strlen($data) . "\r\n"; + $http_request .= "\r\n"; + $http_request .= $data; + $response = ''; + if (($fs = @fsockopen($host, $port, $errno, $errstr, 10)) == false) { + die ('Could not open socket! ' . $errstr); + } + + fwrite($fs, $http_request); + while (!feof($fs)) + $response .= fgets($fs, 1160); + fclose($fs); + + $response = explode("\r\n\r\n", $response, 2); + return $response[1]; + } + private function fix_encoding($str) { + $curr_encoding = mb_detect_encoding($str) ; + + if($curr_encoding == "UTF-8" && mb_check_encoding($str,"UTF-8")) { + return $str; + } else { + return utf8_encode($str); + } + } + } + ?> \ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /