From 6bc60739f7ae0bb6dbba2860b6f3137fa6c8a416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E9=B1=BC=28iFish=29?= Date: Wed, 12 Aug 2015 15:16:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=83=A8=E5=88=86=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E5=9B=BE=E6=A0=87=E6=97=A0=E6=B3=95=E5=8F=91?= =?UTF-8?q?=E9=80=81=E8=A1=A8=E6=83=85=E7=9A=84bug=EF=BC=9B=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=E8=B4=B4=E5=9B=BE=E5=8F=91=E9=80=81=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=9B=E5=BE=AE=E8=B0=83=E8=B7=A8=E7=AB=99=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web12306/css/ui/query-result.css | 2 ++ Web12306/js/ui/chat/roomsession.js | 56 ++++++++++++++++-------------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/Web12306/css/ui/query-result.css b/Web12306/css/ui/query-result.css index f97de0a..db26624 100644 --- a/Web12306/css/ui/query-result.css +++ b/Web12306/css/ui/query-result.css @@ -282,6 +282,8 @@ #suggestion .result .train-list { border: 1px solid #dcdcdc; padding: 10px; + max-width: 500px; + word-wrap: break-word; } #suggestion .result .train-list span { diff --git a/Web12306/js/ui/chat/roomsession.js b/Web12306/js/ui/chat/roomsession.js index cfe97c0..339de0b 100644 --- a/Web12306/js/ui/chat/roomsession.js +++ b/Web12306/js/ui/chat/roomsession.js @@ -168,8 +168,10 @@ .done(function (json) { tip.close(); if (json.resCode === 0) { - data.images.push(json.data.img_url); - port.postMessage("chatRoomSendMsg", coder.encode(data)); + setTimeout(function () { + data.images.push(json.data.img_url); + port.postMessage("chatRoomSendMsg", coder.encode(data)); + }, 1000); } }).fail(function () { tip.setState("error", "图片上传失败:服务器开小差了...."); @@ -230,7 +232,7 @@ if (msg.color) msg.color = "#" + msg.color; //咩哈哈哈哈 - if (msg.fromUser === "iccfish" || msg.fromUser.username === "imfish") { + if (msg.fromUser.username === "iccfish" || msg.fromUser.username === "imfish") { msg.fromUser.realname = "木魚"; msg.fromUser.exStyle = "font-weight:bold;"; } @@ -356,30 +358,30 @@ editor.find(">header .chat-editor-color").val(color); editor.find(".chat-editor-container").css("color", color); - faceSelector.click(function () { - editor.find(">header>.popup-smail").toggleClass("popup-smail-on"); - loadImgIcons(); - }); - $(document).on("click", ".popup-smail>li", function () { - var img = this.childNodes[0]; - pasteHtml("  "); - editor.find(">header>.popup-smail-on").removeClass("popup-smail-on"); - }); - //specChars.forEach(function (f) { - // var x = new Option(f, f); - // faceDom.options[faceDom.options.length] = x; - //}); - //faceSelector.change(function () { - // var v = faceSelector.val(); - // if (v) { - // pasteHtml(v); - // } - // faceSelector[0].selectedIndex = 0; - //}); - $(".chat-items").on("click", ".chat-item > section > img", function () { - $(this).colorbox({ html: this.outerHTML }); - }); }; + faceSelector.click(function () { + editor.find(">header>.popup-smail").toggleClass("popup-smail-on"); + loadImgIcons(); + }); + $(document).on("click", ".popup-smail>li", function () { + var img = this.childNodes[0]; + pasteHtml("  "); + editor.find(">header>.popup-smail-on").removeClass("popup-smail-on"); + }); + //specChars.forEach(function (f) { + // var x = new Option(f, f); + // faceDom.options[faceDom.options.length] = x; + //}); + //faceSelector.change(function () { + // var v = faceSelector.val(); + // if (v) { + // pasteHtml(v); + // } + // faceSelector[0].selectedIndex = 0; + //}); + $(".chat-items").on("click", ".chat-item > section > img", function () { + $(this).colorbox({ html: this.outerHTML }); + }); var delayEnableSend = function () { sendBtn.prop("disabled", true); setTimeout(function () { @@ -491,7 +493,7 @@ var authorlink = item.find(".chat-item-at:eq(0)")[0]; var username = authorlink.dataset.un; - if (username === '*') { + if (username === '*' || username === "imfish" || username === "iccfish") { mp.showMessagePopup("error", "亲,不可以举报我们伟大的管理员哦 ♪(´ε`)"); return; }