Authored by weiqingting

文件整理

@@ -89,7 +89,7 @@ gulp.task("buildjs",["js"],function(){ @@ -89,7 +89,7 @@ gulp.task("buildjs",["js"],function(){
89 }); 89 });
90 //发布静态资源 90 //发布静态资源
91 gulp.task('assets', function() { 91 gulp.task('assets', function() {
92 - gulp.src(public_dir + '/img/**') 92 + gulp.src(public_dir + '/images/**')
93 .pipe(gulp.dest(dist_dir.image)); 93 .pipe(gulp.dest(dist_dir.image));
94 gulp.src(public_dir + '/fonts/*') 94 gulp.src(public_dir + '/fonts/*')
95 .pipe(gulp.dest(dist_dir.font)); 95 .pipe(gulp.dest(dist_dir.font));
1 -  
2 -var $=require('jquery');  
3 -  
4 -(function(){  
5 -  
6 - var editor = null;  
7 -  
8 - UM.registerWidget('emotion',{  
9 -  
10 - tpl: "<link type=\"text/css\" rel=\"stylesheet\" href=\"<%=emotion_url%>emotion.css\">" +  
11 - "<div class=\"edui-emotion-tab-Jpanel edui-emotion-wrapper\">" +  
12 - "<ul class=\"edui-emotion-Jtabnav edui-tab-nav\">" +  
13 - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab0\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_choice%></a></li>" +  
14 - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab1\" class=\"edui-tab-text\"><%=lang_input_Tuzki%></a></li>" +  
15 - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab2\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_lvdouwa%></a></li>" +  
16 - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab3\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_BOBO%></a></li>" +  
17 - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab4\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_babyCat%></a></li>" +  
18 - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab5\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_bubble%></a></li>" +  
19 - "<li class=\"edui-tab-item\"><a data-context=\".edui-emotion-Jtab6\" hideFocus=\"true\" class=\"edui-tab-text\"><%=lang_input_youa%></a></li>" +  
20 - "<li class=\"edui-emotion-tabs\"></li>" +  
21 - "</ul>" +  
22 - "<div class=\"edui-tab-content edui-emotion-JtabBodys\">" +  
23 - "<div class=\"edui-emotion-Jtab0 edui-tab-pane\"></div>" +  
24 - "<div class=\"edui-emotion-Jtab1 edui-tab-pane\"></div>" +  
25 - "<div class=\"edui-emotion-Jtab2 edui-tab-pane\"></div>" +  
26 - "<div class=\"edui-emotion-Jtab3 edui-tab-pane\"></div>" +  
27 - "<div class=\"edui-emotion-Jtab4 edui-tab-pane\"></div>" +  
28 - "<div class=\"edui-emotion-Jtab5 edui-tab-pane\"></div>" +  
29 - "<div class=\"edui-emotion-Jtab6 edui-tab-pane\"></div>" +  
30 - "</div>" +  
31 - "<div class=\"edui-emotion-JtabIconReview edui-emotion-preview-box\">" +  
32 - "<img src=\"<%=cover_img%>\" class=\'edui-emotion-JfaceReview edui-emotion-preview-img\'/>" +  
33 - "</div>",  
34 -  
35 - sourceData: {  
36 - emotion: {  
37 - tabNum:7, //切换面板数量  
38 - SmilmgName:{ 'edui-emotion-Jtab0':['j_00', 84], 'edui-emotion-Jtab1':['t_00', 40], 'edui-emotion-Jtab2':['w_00', 52], 'edui-emotion-Jtab3':['B_00', 63], 'edui-emotion-Jtab4':['C_00', 20], 'edui-emotion-Jtab5':['i_f', 50], 'edui-emotion-Jtab6':['y_00', 40] }, //图片前缀名  
39 - imageFolders:{ 'edui-emotion-Jtab0':'jx2/', 'edui-emotion-Jtab1':'tsj/', 'edui-emotion-Jtab2':'ldw/', 'edui-emotion-Jtab3':'bobo/', 'edui-emotion-Jtab4':'babycat/', 'edui-emotion-Jtab5':'face/', 'edui-emotion-Jtab6':'youa/'}, //图片对应文件夹路径  
40 - imageCss:{'edui-emotion-Jtab0':'jd', 'edui-emotion-Jtab1':'tsj', 'edui-emotion-Jtab2':'ldw', 'edui-emotion-Jtab3':'bb', 'edui-emotion-Jtab4':'cat', 'edui-emotion-Jtab5':'pp', 'edui-emotion-Jtab6':'youa'}, //图片css类名  
41 - imageCssOffset:{'edui-emotion-Jtab0':35, 'edui-emotion-Jtab1':35, 'edui-emotion-Jtab2':35, 'edui-emotion-Jtab3':35, 'edui-emotion-Jtab4':35, 'edui-emotion-Jtab5':25, 'edui-emotion-Jtab6':35}, //图片偏移  
42 - SmileyInfor:{  
43 - 'edui-emotion-Jtab0':['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'],  
44 - 'edui-emotion-Jtab1':['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'],  
45 - 'edui-emotion-Jtab2':['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'],  
46 - 'edui-emotion-Jtab3':['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'],  
47 - 'edui-emotion-Jtab4':['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'],  
48 - 'edui-emotion-Jtab5':['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],  
49 - 'edui-emotion-Jtab6':['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']  
50 - }  
51 - }  
52 - },  
53 - initContent:function( _editor, $widget ){  
54 -  
55 - var me = this,  
56 - emotion = me.sourceData.emotion,  
57 - lang = _editor.getLang( 'emotion' )['static'],  
58 - emotionUrl = UMEDITOR_CONFIG.UMEDITOR_HOME_URL + 'dialogs/emotion/',  
59 - options = $.extend( {}, lang, {  
60 - emotion_url: emotionUrl  
61 - }),  
62 - $root = me.root();  
63 -  
64 - if( me.inited ) {  
65 - me.preventDefault();  
66 - this.switchToFirst();  
67 - return;  
68 - }  
69 -  
70 - me.inited = true;  
71 -  
72 - editor = _editor;  
73 - this.widget = $widget;  
74 -  
75 - emotion.SmileyPath = _editor.options.emotionLocalization === true ? emotionUrl + 'images/' : "http://img.baidu.com/hi/";  
76 - emotion.SmileyBox = me.createTabList( emotion.tabNum );  
77 - emotion.tabExist = me.createArr( emotion.tabNum );  
78 -  
79 - options['cover_img'] = emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif' : 'default/0.gif');  
80 -  
81 - $root.html( $.parseTmpl( me.tpl, options ) );  
82 -  
83 - me.tabs = $.eduitab({selector:".edui-emotion-tab-Jpanel"});  
84 -  
85 - //缓存预览对象  
86 - me.previewBox = $root.find(".edui-emotion-JtabIconReview");  
87 - me.previewImg = $root.find(".edui-emotion-JfaceReview");  
88 -  
89 - me.initImgName();  
90 -  
91 - },  
92 - initEvent:function(){  
93 -  
94 - var me = this;  
95 -  
96 - //防止点击过后关闭popup  
97 - me.root().on('click', function(e){  
98 - return false;  
99 - });  
100 -  
101 - //移动预览  
102 - me.root().delegate( 'td', 'mouseover mouseout', function( evt ){  
103 -  
104 - var $td = $( this),  
105 - url = $td.attr('data-surl') || null;  
106 -  
107 - if( url ) {  
108 - me[evt.type]( this, url , $td.attr('data-posflag') );  
109 - }  
110 -  
111 - return false;  
112 -  
113 - } );  
114 -  
115 - //点击选中  
116 - me.root().delegate( 'td', 'click', function( evt ){  
117 -  
118 - var $td = $( this),  
119 - realUrl = $td.attr('data-realurl') || null;  
120 -  
121 - if( realUrl ) {  
122 - me.insertSmiley( realUrl.replace( /'/g, "\\'" ), evt );  
123 - }  
124 -  
125 - return false;  
126 -  
127 - } );  
128 -  
129 - //更新模板  
130 - me.tabs.edui().on("beforeshow", function( evt ){  
131 -  
132 - var contentId = $(evt.target).attr('data-context').replace( /^.*\.(?=[^\s]*$)/, '' );  
133 -  
134 - evt.stopPropagation();  
135 -  
136 - me.updateTab( contentId );  
137 -  
138 - });  
139 -  
140 - this.switchToFirst();  
141 -  
142 - },  
143 - initImgName: function() {  
144 -  
145 - var emotion = this.sourceData.emotion;  
146 -  
147 - for ( var pro in emotion.SmilmgName ) {  
148 - var tempName = emotion.SmilmgName[pro],  
149 - tempBox = emotion.SmileyBox[pro],  
150 - tempStr = "";  
151 -  
152 - if ( tempBox.length ) return;  
153 -  
154 - for ( var i = 1; i <= tempName[1]; i++ ) {  
155 - tempStr = tempName[0];  
156 - if ( i < 10 ) tempStr = tempStr + '0';  
157 - tempStr = tempStr + i + '.gif';  
158 - tempBox.push( tempStr );  
159 - }  
160 - }  
161 -  
162 - },  
163 - /**  
164 - * 切换到第一个tab  
165 - */  
166 - switchToFirst: function(){  
167 - this.root().find(".edui-emotion-Jtabnav .edui-tab-text:first").trigger('click');  
168 - },  
169 - updateTab: function( contentBoxId ) {  
170 -  
171 - var me = this,  
172 - emotion = me.sourceData.emotion;  
173 -  
174 - me.autoHeight( contentBoxId );  
175 -  
176 - if ( !emotion.tabExist[ contentBoxId ] ) {  
177 -  
178 - emotion.tabExist[ contentBoxId ] = true;  
179 - me.createTab( contentBoxId );  
180 -  
181 - }  
182 -  
183 - },  
184 - autoHeight: function( ) {  
185 - this.widget.height(this.root() + 2);  
186 - },  
187 - createTabList: function( tabNum ) {  
188 - var obj = {};  
189 - for ( var i = 0; i < tabNum; i++ ) {  
190 - obj["edui-emotion-Jtab" + i] = [];  
191 - }  
192 - return obj;  
193 - },  
194 - mouseover: function( td, srcPath, posFlag ) {  
195 -  
196 - posFlag -= 0;  
197 -  
198 - $(td).css( 'backgroundColor', '#ACCD3C' );  
199 -  
200 - this.previewImg.css( "backgroundImage", "url(" + srcPath + ")" );  
201 - posFlag && this.previewBox.addClass('edui-emotion-preview-left');  
202 - this.previewBox.show();  
203 -  
204 - },  
205 - mouseout: function( td ) {  
206 - $(td).css( 'backgroundColor', 'transparent' );  
207 - this.previewBox.removeClass('edui-emotion-preview-left').hide();  
208 - },  
209 - insertSmiley: function( url, evt ) {  
210 - var obj = {  
211 - src: url  
212 - };  
213 - obj._src = obj.src;  
214 - editor.execCommand( 'insertimage', obj );  
215 - if ( !evt.ctrlKey ) {  
216 - //关闭预览  
217 - this.previewBox.removeClass('edui-emotion-preview-left').hide();  
218 - this.widget.edui().hide();  
219 - }  
220 - },  
221 - createTab: function( contentBoxId ) {  
222 -  
223 - var faceVersion = "?v=1.1", //版本号  
224 - me = this,  
225 - $contentBox = this.root().find("."+contentBoxId),  
226 - emotion = me.sourceData.emotion,  
227 - imagePath = emotion.SmileyPath + emotion.imageFolders[ contentBoxId ], //获取显示表情和预览表情的路径  
228 - positionLine = 11 / 2, //中间数  
229 - iWidth = iHeight = 35, //图片长宽  
230 - iColWidth = 3, //表格剩余空间的显示比例  
231 - tableCss = emotion.imageCss[ contentBoxId ],  
232 - cssOffset = emotion.imageCssOffset[ contentBoxId ],  
233 - textHTML = ['<table border="1" class="edui-emotion-smileytable">'],  
234 - i = 0, imgNum = emotion.SmileyBox[ contentBoxId ].length, imgColNum = 11, faceImage,  
235 - sUrl, realUrl, posflag, offset, infor;  
236 -  
237 - for ( ; i < imgNum; ) {  
238 - textHTML.push( '<tr>' );  
239 - for ( var j = 0; j < imgColNum; j++, i++ ) {  
240 - faceImage = emotion.SmileyBox[ contentBoxId ][i];  
241 - if ( faceImage ) {  
242 - sUrl = imagePath + faceImage + faceVersion;  
243 - realUrl = imagePath + faceImage;  
244 - posflag = j < positionLine ? 0 : 1;  
245 - offset = cssOffset * i * (-1) - 1;  
246 - infor = emotion.SmileyInfor[ contentBoxId ][i];  
247 -  
248 - textHTML.push( '<td class="edui-emotion-' + tableCss + '" data-surl="'+ sUrl +'" data-realurl="'+ realUrl +'" data-posflag="'+ posflag +'" align="center">' );  
249 - textHTML.push( '<span>' );  
250 - textHTML.push( '<img style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' );  
251 - textHTML.push( '</span>' );  
252 - } else {  
253 - textHTML.push( '<td bgcolor="#FFFFFF">' );  
254 - }  
255 - textHTML.push( '</td>' );  
256 - }  
257 - textHTML.push( '</tr>' );  
258 - }  
259 - textHTML.push( '</table>' );  
260 - textHTML = textHTML.join( "" );  
261 - $contentBox.html( textHTML );  
262 - },  
263 - createArr: function( tabNum ) {  
264 - var arr = [];  
265 - for ( var i = 0; i < tabNum; i++ ) {  
266 - arr[i] = 0;  
267 - }  
268 - return arr;  
269 - },  
270 - width:603,  
271 - height:400  
272 - });  
273 -  
274 -})();  
275 -  
1 -var $=require('jquery');  
2 -(function () {  
3 -  
4 - var editor = null;  
5 -  
6 - UM.registerWidget('formula', {  
7 -  
8 - tpl: "<link type=\"text/css\" rel=\"stylesheet\" href=\"<%=formula_url%>formula.css\">" +  
9 - "<div class=\"edui-formula-wrapper\">" +  
10 - "<ul class=\"edui-tab-nav\"></ul>" +  
11 - "<div class=\"edui-tab-content\"></div>" +  
12 - "</div>",  
13 -  
14 - sourceData: {  
15 - formula: {  
16 - 'common': [  
17 - "{/}frac{ }{ }", "^{ }/_{ }", "x^{ }", "x_{ }", "x^{ }_{ }", "{/}bar{ }", "{/}sqrt{ }", "{/}nthroot{ }{ }",  
18 - "{/}sum^{ }_{n=}", "{/}sum", "{/}log_{ }", "{/}ln", "{/}int_{ }^{ }", "{/}oint_{ }^{ }"  
19 - ],  
20 - 'symbol': [  
21 - "+", "-", "{/}pm", "{/}times", "{/}ast", "{/}div", "/", "{/}bigtriangleup",  
22 - "=", "{/}ne", "{/}approx", ">", "<", "{/}ge", "{/}le", "{/}infty",  
23 - "{/}cap", "{/}cup", "{/}because", "{/}therefore", "{/}subset", "{/}supset", "{/}subseteq", "{/}supseteq",  
24 - "{/}nsubseteq", "{/}nsupseteq", "{/}in", "{/}ni", "{/}notin", "{/}mapsto", "{/}leftarrow", "{/}rightarrow",  
25 - "{/}Leftarrow", "{/}Rightarrow", "{/}leftrightarrow", "{/}Leftrightarrow"  
26 - ],  
27 - 'letter': [  
28 - "{/}alpha", "{/}beta", "{/}gamma", "{/}delta", "{/}varepsilon", "{/}varphi", "{/}lambda", "{/}mu",  
29 - "{/}rho", "{/}sigma", "{/}omega", "{/}Gamma", "{/}Delta", "{/}Theta", "{/}Lambda", "{/}Xi",  
30 - "{/}Pi", "{/}Sigma", "{/}Upsilon", "{/}Phi", "{/}Psi", "{/}Omega"  
31 - ]  
32 - }  
33 - },  
34 - initContent: function (_editor, $widget) {  
35 -  
36 - var me = this,  
37 - formula = me.sourceData.formula,  
38 - lang = _editor.getLang('formula').static,  
39 - formulaUrl = UMEDITOR_CONFIG.UMEDITOR_HOME_URL + 'dialogs/formula/',  
40 - options = $.extend({}, lang, { 'formula_url': formulaUrl }),  
41 - $root = me.root();  
42 -  
43 - if (me.inited) {  
44 - me.preventDefault();  
45 - return;  
46 - }  
47 - me.inited = true;  
48 -  
49 - editor = _editor;  
50 - me.$widget = $widget;  
51 -  
52 - $root.html($.parseTmpl(me.tpl, options));  
53 - me.tabs = $.eduitab({selector: "#edui-formula-tab-Jpanel"});  
54 -  
55 - /* 初始化popup的内容 */  
56 - var headHtml = [], xMax = 0, yMax = 0,  
57 - $tabContent = me.root().find('.edui-tab-content');  
58 - $.each(formula, function (k, v) {  
59 - var contentHtml = [];  
60 - $.each(v, function (i, f) {  
61 - contentHtml.push('<li class="edui-formula-latex-item" data-latex="' + f + '" style="background-position:-' + (xMax * 30) + 'px -' + (yMax * 30) + 'px"></li>');  
62 - if (++xMax >=8) {  
63 - ++yMax; xMax = 0;  
64 - }  
65 - });  
66 - yMax++; xMax = 0;  
67 - $tabContent.append('<div class="edui-tab-pane"><ul>' + contentHtml.join('') + '</ul>');  
68 - headHtml.push('<li class="edui-tab-item"><a href="javascript:void(0);" class="edui-tab-text">' + lang['lang_tab_' + k] + '</a></li>');  
69 - });  
70 - headHtml.push('<li class="edui-formula-clearboth"></li>');  
71 - $root.find('.edui-tab-nav').html(headHtml.join(''));  
72 - $root.find('.edui-tab-content').append('<div class="edui-formula-clearboth"></div>');  
73 -  
74 - /* 选中第一个tab */  
75 - me.switchTab(0);  
76 - },  
77 - initEvent: function () {  
78 - var me = this;  
79 -  
80 - //防止点击过后关闭popup  
81 - me.root().on('click', function (e) {  
82 - return false;  
83 - });  
84 -  
85 - //点击tab切换菜单  
86 - me.root().find('.edui-tab-nav').delegate('.edui-tab-item', 'click', function (evt) {  
87 - me.switchTab(this);  
88 - return false;  
89 - });  
90 -  
91 - //点击选中公式  
92 - me.root().find('.edui-tab-pane').delegate('.edui-formula-latex-item', 'click', function (evt) {  
93 - var $item = $(this),  
94 - latex = $item.attr('data-latex') || '';  
95 -  
96 - if (latex) {  
97 - me.insertLatex(latex.replace("{/}", "\\"));  
98 - }  
99 - me.$widget.edui().hide();  
100 - return false;  
101 - });  
102 - },  
103 - switchTab:function(index){  
104 - var me = this,  
105 - $root = me.root(),  
106 - index = $.isNumeric(index) ? index:$.inArray(index, $root.find('.edui-tab-nav .edui-tab-item'));  
107 -  
108 - $root.find('.edui-tab-nav .edui-tab-item').removeClass('edui-active').eq(index).addClass('edui-active');  
109 - $root.find('.edui-tab-content .edui-tab-pane').removeClass('edui-active').eq(index).addClass('edui-active');  
110 -  
111 - /* 自动长高 */  
112 - me.autoHeight(0);  
113 - },  
114 - autoHeight: function () {  
115 - this.$widget.height(this.root() + 2);  
116 - },  
117 - insertLatex: function (latex) {  
118 - editor.execCommand('formula', latex );  
119 - },  
120 - width: 350,  
121 - height: 400  
122 - });  
123 -  
124 -})();  
125 -  
1 -.edui-popup-emotion .edui-emotion-jd img{  
2 - background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;  
3 - cursor:pointer;width:35px;height:35px;display:block;  
4 -}  
5 -.edui-popup-emotion .edui-emotion-pp img{  
6 - background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;  
7 - cursor:pointer;width:25px;height:25px;display:block;  
8 -}  
9 -  
10 -.edui-popup-emotion .edui-emotion-ldw img{  
11 - background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;  
12 - cursor:pointer;width:35px;height:35px;display:block;  
13 -}  
14 -  
15 -.edui-popup-emotion .edui-emotion-tsj img{  
16 - background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;  
17 - cursor:pointer;width:35px;height:35px;display:block;  
18 -}  
19 -  
20 -.edui-popup-emotion .edui-emotion-cat img{  
21 - background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;  
22 - cursor:pointer;width:35px;height:35px;display:block;  
23 -}  
24 -  
25 -.edui-popup-emotion .edui-emotion-bb img{  
26 - background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;  
27 - cursor:pointer;width:35px;height:35px;display:block;  
28 -}  
29 -  
30 -.edui-popup-emotion .edui-emotion-youa img{  
31 - background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;  
32 - cursor:pointer;width:35px;height:35px;display:block;  
33 -}  
34 -  
35 -.edui-popup-emotion .edui-emotion-smileytable {  
36 - width: 100%;  
37 - border-spacing: 0;  
38 - border-collapse: collapse;  
39 - table-layout: fixed;  
40 -}  
41 -  
42 -.edui-popup-emotion .edui-emotion-wrapper {  
43 - padding: 15px;  
44 -}  
45 -  
46 -.edui-popup-emotion .edui-tab-nav{  
47 - height: auto;  
48 - *height: 31px;  
49 -}  
50 -.edui-popup-emotion .edui-emotion-tabs{  
51 - clear: both;  
52 - width: 0;  
53 - height: 0;  
54 -}  
55 -  
56 -.edui-popup-emotion .edui-tab-content {  
57 - padding: 15px 0;  
58 -}  
59 -  
60 -.edui-popup-emotion .edui-emotion-preview-box {  
61 - width:90px;  
62 - height:76px;  
63 - border:2px solid #9cb945;  
64 - background:#FFFFFF;  
65 - background-position:center;  
66 - background-repeat:no-repeat;  
67 - position: absolute;  
68 - top: 67px;  
69 - left: 494px;  
70 - display: none;  
71 -}  
72 -  
73 -.edui-popup-emotion .edui-tab-text {  
74 - font-size: 12px;  
75 -}  
76 -  
77 -.edui-popup-emotion .edui-emotion-preview-left {  
78 - left: 15px;  
79 -}  
80 -  
81 -.edui-popup-emotion .edui-emotion-preview-img {  
82 - width: 100%;  
83 - height: 100%;  
84 - display: block;  
85 - background-repeat: no-repeat;  
86 - background-position: center center;  
87 -}  
1 -.edui-popup-formula .edui-formula-wrapper {  
2 - padding: 15px;  
3 -}  
4 -.edui-popup-formula .edui-formula-wrapper .edui-tab-nav{  
5 - height: auto;  
6 - *height: 31px;  
7 -}  
8 -.edui-popup-formula .edui-formula-wrapper .edui-tab-text {  
9 - font-size: 12px;  
10 -}  
11 -.edui-popup-formula .edui-formula-wrapper .edui-formula-clearboth {  
12 - clear: both;  
13 - width: 0;  
14 - height: 0;  
15 -}  
16 -.edui-popup-formula .edui-formula-wrapper .edui-tab-pane ul {  
17 - margin: 0px;  
18 - padding: 0px;  
19 -}  
20 -.edui-popup-formula .edui-formula-wrapper .edui-tab-content {  
21 - padding: 5px 0px 0px 0px;  
22 -}  
23 -.edui-popup-formula .edui-formula-wrapper .edui-tab-pane .edui-formula-latex-item {  
24 - display: block;  
25 - float: left;  
26 - margin: 0px 3px 3px 0px;  
27 - width: 30px;  
28 - height: 30px;  
29 - border:1px solid #cccccc;  
30 - background-image: url("images/formula.png");  
31 - cursor: pointer;  
32 -}  
1 -if (typeof seajs === 'undefined') {  
2 -/*  
3 - SeaJS - A Module Loader for the Web  
4 - v2.3.0 | seajs.org | MIT Licensed  
5 -*/  
6 -!function(a,b){function c(a){return function(b){return{}.toString.call(b)=="[object "+a+"]"}}function d(){return z++}function e(a){return a.match(C)[0]}function f(a){for(a=a.replace(D,"/"),a=a.replace(F,"$1/");a.match(E);)a=a.replace(E,"/");return a}function g(a){var b=a.length-1,c=a.charAt(b);return"#"===c?a.substring(0,b):".js"===a.substring(b-2)||a.indexOf("?")>0||"/"===c?a:a+".js"}function h(a){var b=u.alias;return b&&w(b[a])?b[a]:a}function i(a){var b=u.paths,c;return b&&(c=a.match(G))&&w(b[c[1]])&&(a=b[c[1]]+c[2]),a}function j(a){var b=u.vars;return b&&a.indexOf("{")>-1&&(a=a.replace(H,function(a,c){return w(b[c])?b[c]:a})),a}function k(a){var b=u.map,c=a;if(b)for(var d=0,e=b.length;e>d;d++){var f=b[d];if(c=y(f)?f(a)||a:a.replace(f[0],f[1]),c!==a)break}return c}function l(a,b){var c,d=a.charAt(0);if(I.test(a))c=a;else if("."===d)c=f((b?e(b):u.cwd)+a);else if("/"===d){var g=u.cwd.match(J);c=g?g[0]+a.substring(1):a}else c=u.base+a;return 0===c.indexOf("//")&&(c=location.protocol+c),c}function m(a,b){if(!a)return"";a=h(a),a=i(a),a=j(a),a=g(a);var c=l(a,b);return c=k(c)}function n(a){return a.hasAttribute?a.src:a.getAttribute("src",4)}function o(a,b,c){var d=K.createElement("script");if(c){var e=y(c)?c(a):c;e&&(d.charset=e)}p(d,b,a),d.async=!0,d.src=a,R=d,Q?P.insertBefore(d,Q):P.appendChild(d),R=null}function p(a,b,c){function d(){a.onload=a.onerror=a.onreadystatechange=null,u.debug||P.removeChild(a),a=null,b()}var e="onload"in a;e?(a.onload=d,a.onerror=function(){B("error",{uri:c,node:a}),d()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&d()}}function q(){if(R)return R;if(S&&"interactive"===S.readyState)return S;for(var a=P.getElementsByTagName("script"),b=a.length-1;b>=0;b--){var c=a[b];if("interactive"===c.readyState)return S=c}}function r(a){var b=[];return a.replace(U,"").replace(T,function(a,c,d){d&&b.push(d)}),b}function s(a,b){this.uri=a,this.dependencies=b||[],this.exports=null,this.status=0,this._waitings={},this._remain=0}if(!a.seajs){var t=a.seajs={version:"2.3.0"},u=t.data={},v=c("Object"),w=c("String"),x=Array.isArray||c("Array"),y=c("Function"),z=0,A=u.events={};t.on=function(a,b){var c=A[a]||(A[a]=[]);return c.push(b),t},t.off=function(a,b){if(!a&&!b)return A=u.events={},t;var c=A[a];if(c)if(b)for(var d=c.length-1;d>=0;d--)c[d]===b&&c.splice(d,1);else delete A[a];return t};var B=t.emit=function(a,b){var c=A[a],d;if(c){c=c.slice();for(var e=0,f=c.length;f>e;e++)c[e](b)}return t},C=/[^?#]*\//,D=/\/\.\//g,E=/\/[^/]+\/\.\.\//,F=/([^:/])\/+\//g,G=/^([^/:]+)(\/.+)$/,H=/{([^{]+)}/g,I=/^\/\/.|:\//,J=/^.*?\/\/.*?\//,K=document,L=location.href&&0!==location.href.indexOf("about:")?e(location.href):"",M=K.scripts,N=K.getElementById("seajsnode")||M[M.length-1],O=e(n(N)||L);t.resolve=m;var P=K.head||K.getElementsByTagName("head")[0]||K.documentElement,Q=P.getElementsByTagName("base")[0],R,S;t.request=o;var T=/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\/\*[\S\s]*?\*\/|\/(?:\\\/|[^\/\r\n])+\/(?=[^\/])|\/\/.*|\.\s*require|(?:^|[^$])\brequire\s*\(\s*(["'])(.+?)\1\s*\)/g,U=/\\\\/g,V=t.cache={},W,X={},Y={},Z={},$=s.STATUS={FETCHING:1,SAVED:2,LOADING:3,LOADED:4,EXECUTING:5,EXECUTED:6};s.prototype.resolve=function(){for(var a=this,b=a.dependencies,c=[],d=0,e=b.length;e>d;d++)c[d]=s.resolve(b[d],a.uri);return c},s.prototype.load=function(){var a=this;if(!(a.status>=$.LOADING)){a.status=$.LOADING;var c=a.resolve();B("load",c);for(var d=a._remain=c.length,e,f=0;d>f;f++)e=s.get(c[f]),e.status<$.LOADED?e._waitings[a.uri]=(e._waitings[a.uri]||0)+1:a._remain--;if(0===a._remain)return a.onload(),b;var g={};for(f=0;d>f;f++)e=V[c[f]],e.status<$.FETCHING?e.fetch(g):e.status===$.SAVED&&e.load();for(var h in g)g.hasOwnProperty(h)&&g[h]()}},s.prototype.onload=function(){var a=this;a.status=$.LOADED,a.callback&&a.callback();var b=a._waitings,c,d;for(c in b)b.hasOwnProperty(c)&&(d=V[c],d._remain-=b[c],0===d._remain&&d.onload());delete a._waitings,delete a._remain},s.prototype.fetch=function(a){function c(){t.request(g.requestUri,g.onRequest,g.charset)}function d(){delete X[h],Y[h]=!0,W&&(s.save(f,W),W=null);var a,b=Z[h];for(delete Z[h];a=b.shift();)a.load()}var e=this,f=e.uri;e.status=$.FETCHING;var g={uri:f};B("fetch",g);var h=g.requestUri||f;return!h||Y[h]?(e.load(),b):X[h]?(Z[h].push(e),b):(X[h]=!0,Z[h]=[e],B("request",g={uri:f,requestUri:h,onRequest:d,charset:u.charset}),g.requested||(a?a[g.requestUri]=c:c()),b)},s.prototype.exec=function(){function a(b){return s.get(a.resolve(b)).exec()}var c=this;if(c.status>=$.EXECUTING)return c.exports;c.status=$.EXECUTING;var e=c.uri;a.resolve=function(a){return s.resolve(a,e)},a.async=function(b,c){return s.use(b,c,e+"_async_"+d()),a};var f=c.factory,g=y(f)?f(a,c.exports={},c):f;return g===b&&(g=c.exports),delete c.factory,c.exports=g,c.status=$.EXECUTED,B("exec",c),g},s.resolve=function(a,b){var c={id:a,refUri:b};return B("resolve",c),c.uri||t.resolve(c.id,b)},s.define=function(a,c,d){var e=arguments.length;1===e?(d=a,a=b):2===e&&(d=c,x(a)?(c=a,a=b):c=b),!x(c)&&y(d)&&(c=r(""+d));var f={id:a,uri:s.resolve(a),deps:c,factory:d};if(!f.uri&&K.attachEvent){var g=q();g&&(f.uri=g.src)}B("define",f),f.uri?s.save(f.uri,f):W=f},s.save=function(a,b){var c=s.get(a);c.status<$.SAVED&&(c.id=b.id||a,c.dependencies=b.deps||[],c.factory=b.factory,c.status=$.SAVED,B("save",c))},s.get=function(a,b){return V[a]||(V[a]=new s(a,b))},s.use=function(b,c,d){var e=s.get(d,x(b)?b:[b]);e.callback=function(){for(var b=[],d=e.resolve(),f=0,g=d.length;g>f;f++)b[f]=V[d[f]].exec();c&&c.apply(a,b),delete e.callback},e.load()},t.use=function(a,b){return s.use(a,b,u.cwd+"_use_"+d()),t},s.define.cmd={},a.define=s.define,t.Module=s,u.fetchedList=Y,u.cid=d,t.require=function(a){var b=s.get(s.resolve(a));return b.status<$.EXECUTING&&(b.onload(),b.exec()),b.exports},u.base=O,u.dir=O,u.cwd=L,u.charset="utf-8",t.config=function(a){for(var b in a){var c=a[b],d=u[b];if(d&&v(d))for(var e in c)d[e]=c[e];else x(d)?c=d.concat(c):"base"===b&&("/"!==c.slice(-1)&&(c+="/"),c=l(c)),u[b]=c}return B("config",a),t}}}(this);  
7 -  
8 -/*! Seajs-css 1.0.4 */  
9 -!function(){function a(a){return function(b){return{}.toString.call(b)=="[object "+a+"]"}}function b(a){return"[object Function]"=={}.toString.call(a)}function c(a,c,e){var f=u.test(a),g=r.createElement(f?"link":"script");if(e){var h=b(e)?e(a):e;h&&(g.charset=h)}d(g,c,f,a),f?(g.rel="stylesheet",g.href=a):(g.async=!0,g.src=a),p=g,t?s.insertBefore(g,t):s.appendChild(g),p=null}function d(a,b,c,d){function f(){a.onload=a.onerror=a.onreadystatechange=null,c||seajs.data.debug||s.removeChild(a),a=null,b()}var g="onload"in a;return!c||!v&&g?(g?(a.onload=f,a.onerror=function(){seajs.emit("error",{uri:d,node:a}),f()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&f()},void 0):(setTimeout(function(){e(a,b)},1),void 0)}function e(a,b){var c,d=a.sheet;if(v)d&&(c=!0);else if(d)try{d.cssRules&&(c=!0)}catch(f){"NS_ERROR_DOM_SECURITY_ERR"===f.name&&(c=!0)}setTimeout(function(){c?b():e(a,b)},20)}function f(a){return a.match(x)[0]}function g(a){for(a=a.replace(y,"/"),a=a.replace(A,"$1/");a.match(z);)a=a.replace(z,"/");return a}function h(a){var b=a.length-1,c=a.charAt(b);return"#"===c?a.substring(0,b):".js"===a.substring(b-2)||a.indexOf("?")>0||".css"===a.substring(b-3)||"/"===c?a:a+".js"}function i(a){var b=w.alias;return b&&q(b[a])?b[a]:a}function j(a){var b,c=w.paths;return c&&(b=a.match(B))&&q(c[b[1]])&&(a=c[b[1]]+b[2]),a}function k(a){var b=w.vars;return b&&a.indexOf("{")>-1&&(a=a.replace(C,function(a,c){return q(b[c])?b[c]:a})),a}function l(a){var c=w.map,d=a;if(c)for(var e=0,f=c.length;f>e;e++){var g=c[e];if(d=b(g)?g(a)||a:a.replace(g[0],g[1]),d!==a)break}return d}function m(a,b){var c,d=a.charAt(0);if(D.test(a))c=a;else if("."===d)c=g((b?f(b):w.cwd)+a);else if("/"===d){var e=w.cwd.match(E);c=e?e[0]+a.substring(1):a}else c=w.base+a;return 0===c.indexOf("//")&&(c=location.protocol+c),c}function n(a,b){if(!a)return"";a=i(a),a=j(a),a=k(a),a=h(a);var c=m(a,b);return c=l(c)}function o(a){return a.hasAttribute?a.src:a.getAttribute("src",4)}var p,q=a("String"),r=document,s=r.head||r.getElementsByTagName("head")[0]||r.documentElement,t=s.getElementsByTagName("base")[0],u=/\.css(?:\?|$)/i,v=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;seajs.request=c;var w=seajs.data,x=/[^?#]*\//,y=/\/\.\//g,z=/\/[^/]+\/\.\.\//,A=/([^:/])\/+\//g,B=/^([^/:]+)(\/.+)$/,C=/{([^{]+)}/g,D=/^\/\/.|:\//,E=/^.*?\/\/.*?\//,r=document,F=location.href&&0!==location.href.indexOf("about:")?f(location.href):"",G=r.scripts,H=r.getElementById("seajsnode")||G[G.length-1];f(o(H)||F),seajs.resolve=n,define("seajs/seajs-css/1.0.4/seajs-css",[],{})}();  
10 -}  
11 -  
12 -if (typeof g_spm_init === 'undefined') {  
13 -(function() {  
14 - var cache = [];  
15 - var timer = null;  
16 - g_spm_init = function(entry) {  
17 - cache.push(entry);  
18 - timer && clearTimeout(timer);  
19 - timer = setTimeout(init, 100);  
20 - };  
21 - function init() {  
22 - var entry = cache.shift();  
23 - if (entry) {  
24 - seajs.use(entry, init);  
25 - }  
26 - }  
27 -})();  
28 -}