123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643 |
-
- Namespace.register("U.F.W");
- U.F.W.ViewFriend = U.F.W.SLHCK = function (friendinfo) {
- var _childs,
- _friendel
- ;
-
- if (friendinfo) {
-
- if (friendinfo.UserId == US.userInfo.userid) {
- U.Alert("无法与本人聊天!");
- }
- else {
-
- _friendel = $("#UD_SYHRCO").find("[tid=" + friendinfo.UserId + "]")[0];
-
- if (_friendel) {
- _friendel.onclick();
- }
-
- else {
- U.F.W.PopupFriendsForm(friendinfo);
- }
- }
- }
-
- else {
- _childs = $("#UD_SYHRCO").Child();
- friendinfo = (US.Friend[4][0] || US.Friend[1][0]);
-
- if (_childs.length) {
- _childs[0].onclick();
- }
-
- else {
-
- if (friendinfo && friendinfo.tf) {
- friendinfo = _$(US.Friend[2]).Select({ "GroupManageID": friendinfo.UserId })[0];
- }
-
- U.F.W.PopupFriendsForm(friendinfo);
-
- if (!friendinfo || (!friendinfo.UserId && !friendinfo.GroupManageID)) {
- U.F.W.RecommendFriend();
- }
- }
- }
- }
- U.F.W.RecommendFriend = function () {
- U.F.W.PrintRecommendFriend(US.userInfo.TJF.slice(0, 8), $("#UD_SYHZR")[0], 1);
- U.F.W.FriendDisplayAndNone([{ "display": "block" }, { "display": "none"}], true);
- }
- U.F.W.PrintRecommendFriend = function (friendinfo, el, page) {
-
- var _tempel,
- _temponeel,
- _temptwoel,
- _tempthreeel,
- _tempfourel,
- _tempfiveel
- ;
-
- el.innerText = "";
-
- _tempel = $$("div", { "className": "UD_SYHZRO", "onmousedown": U.M.StopBubble });
- _temponeel = $$("div", { "className": "UD_SYHZROS" }, _tempel);
- $$("div", { "className": "UD_SYHZROSS", "innerHTML": "这里暂时没有任何内容哦" }, _temponeel);
- $$("div", { "className": "UD_SYHZROSZ", "innerHTML": "Nothing!!" }, _temponeel);
- _temptwoel = $$("div", { "className": "UD_SYHZROSX" }, _temponeel);
- $$("div", { "className": "UD_SYHZROSXL", "innerHTML": "可尝试点击左边的头像,或追随一下的用户!" }, _temptwoel);
- $$("div", { "className": "UD_SYHZROSXR UD_SYI" }, _temptwoel);
- _temponeel = $$("div", { "className": "UD_SYHZROX" }, _tempel);
- _temptwoel = $$("div", { "className": "UD_SYHZROXT" }, _temponeel);
- $$("div", { "className": "UD_SYSXLTTO UD_SYSXROHTO", "innerHTML": "推荐追随" }, _temptwoel);
- $$("div", { "className": "UD_SYSXLTTI UD_SYI", "onclick": [[U.F.W.RecommendFriend, [el, page]]] }, _temptwoel);
- _temptwoel = $$("div", { "className": "UD_SYHZROXX" }, _temponeel);
-
- for (i = 0; i < friendinfo.length; i++) {
- _tempthreeel = $$("div", { "className": "UD_SYHZROXXO", "style": { "marginLeft": "65px"} }, _temptwoel);
- _tempfourel = $$("div", { "className": "UD_SYHZROXXOS" }, _tempthreeel);
- _tempfiveel = $$("div", { "className": "UD_SYHZROXXOSL" }, _tempfourel);
- $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "onclick": [[U.M.StopBubble], [U.U.I.ViewOtherUserInfo, [friendinfo[i].UserID]]],
- "src": U.M.GetImgU(friendinfo[i].UserThumbnailImageHead), "alt": friendinfo[i].UserName
- }, _tempfiveel);
- $$("div", { "className": "UD_SYHZROXXOSN UTDF", "innerHTML": friendinfo[i].UserName }, _tempfourel);
- $$("div", { "className": "UD_SYHZROXXOSR", "title": "点击追随该用户", "innerHTML": "追随", "onclick": [[U.F.M.AddFriend, [friendinfo[i]]]] }, _tempfourel);
- _tempfourel = $$("div", { "className": "UD_SYHZROXXOX UD_SYSXZLLZOOX" }, _tempthreeel);
- $$("div", { "className": "UD_SYSXRATOCS", "innerHTML": "▲" }, _tempfourel);
- $$("div", { "className": "UD_SYSXRATOCX", "innerHTML": (friendinfo[i].UserIndividualitysignature ? friendinfo[i].UserIndividualitysignature.substring(0, 15) : "添加我为好友吧,分享我们的信息,让我们距离更近一步").trim() }, _tempfourel);
- }
-
- el.appendChild(_tempel);
- }
- U.F.W.RecommendFriend = function (el, page) {
- var _userinfo = US.userInfo,
- _start = page * 4,
- _end = (page + 1) * 4,
- _recommendfriend = _userinfo.TJF.slice(_start, _end)
- ;
-
- if (_recommendfriend.length) {
- U.F.W.PrintRecommendFriend(_recommendfriend, el, page + 1);
- }
-
- else {
- U.A.Request(US.CD, [US.DB, "UseStudio_Friends", "RecommendFriends", _userinfo.UserId || US.NU, _userinfo.length, _userinfo.length + 4]), U.D.SY.AsynSYTJ, [el, el, page];
- }
- }
- U.F.W.AsynRecommendFriend = function (r) {
- var _userinfo = US.userInfo,
- _context = r.context,
- _el = _context[1],
- _page = _context[2]
- ;
- r = r.value;
- _userinfo = _userinfo.concat(r);
- U.F.W.PrintRecommendFriend(r, _el, _page + 1);
- }
- U.F.W.PopupFriendsForm = function (friendinfo, el) {
-
- if (!U.U.L.isLogin(3)) {
- var _friendform = $("#UD_SYHZA")[0];
-
- if (!_friendform) {
-
- U.UI.Form({
- "min": false,
- "resize": U.F.W.ReSize,
- "style": { display: "block", height: "80%" },
- "id": "UD_SYHZA",
- "content": $("#UD_SYHZ")[0],
- "title": "<div class='UD_SYF_STI'></div>",
- "hst": { "style": { "padding": "0"} },
- "SO": false,
- "close": {
- "onclick": U.M.apply(null, [[U.F.W.FriendDisplayAndNone, [[{ "display": "none" }, { "display": "block"}], { "left": "auto", "right": "0px"}]]])
- }
- }).be;
- }
-
- U.F.W.FriendDisplayAndNone[{ "display": "block" }, { "display": "none"}];
- U.F.W.OpenFriendChat(friendinfo);
- U.F.W.ReSize();
- }
- }
- U.F.W.OpenFriendChat = function (friendinfo) {
- var _friendfromel = $("#UD_SYHZR")[0],
- _friendchatfrom = $("#UD_SYF")[0],
- _userid = friendinfo.GroupManageID || friendinfo.UserId,
- _chatform = U.F.W.IsCreateForm(_userid),
- _isgroup = friendinfo.GroupManageID != null
- ;
- _friendchatfrom.style.display = "block";
- _friendfromel.appendChild(_friendchatfrom);
-
- if (!_chatform) {
- _chatform = U.F.W.CreateFriendChat(friendinfo);
- }
-
- U.F.W.SwitchFriendsChat(_chatform, friendinfo);
-
- U.F.FM.GetFriendOrGroupNews(_userid, U.M.apply(this, [[U.F.FM.AsynReceiveMessages, [_isgroup, _chatform[1]]]]), _isgroup);
- }
- U.F.W.ReSize = function () {
- U.F.W.LeftSize();
- U.F.W.ChatBoxSize($("#UD_SYF")[0], $("#UD_SYF")[0].childs[0].element[1]);
- }
- U.F.W.LeftSize = function () {
- var _leftcontent = $("#UD_SYHZLT").Parent(),
- _childs = $(_leftcontent).Child(),
- _height = _leftcontent.offsetHeight;
-
- $("#UD_SYHZLZ")[0].style.height = _height - _childs[0].offsetHeight - _childs[1].offsetHeight + "px";
- }
- U.F.W.ChatBoxSize = function (el, chatel) {
- var i,
- _childs,
- _rightchilds = $(el).Child(),
- _chatchilds = $(chatel.parentNode).Child(),
- _height = el.offsetHeight,
- _width = el.offsetWidth;
-
- for (i = 0; i < _chatchilds.length; i++) {
-
- _childs = $(_chatchilds[i]).Child();
- _childs[0].style.width = _width - _childs[1].offsetWidth + "px";
-
- $(".UD_SYFCA", _chatchilds[i]).css("height", _height - 350 + "px");
- }
- }
- U.F.W.FriendDisplayAndNone = function (style) {
- var _friendform = $("#UD_SYHZA"),
- _friendright = $("#UD_SYHR");
- _friendform.addAttrArray({ "style": style[0] });
- _friendright.addAttrArray({ "style": style[1] });
- }
- U.F.W.IsCreateForm = function (friendid) {
- var i,
- _friendchatform = $("#UD_SYF")[0];
- if (_friendchatform.childs) {
- for (i = 0; i < _friendchatform.childs.length; i++) {
- if (_friendchatform.childs[i].formid == friendid) {
- return _friendchatform.childs[i].element;
- }
- }
- }
- }
- U.F.W.CreateFriendChat = function (friendandgroupinfo) {
-
- var _headel,
- _headimageel,
- _chatel,
- _chatleftel,
- _chatheadel,
- _chatheadimageel,
- _chatheadcontentel,
- _chatheadpromptel,
- _chatcontentel,
- _chatcontentnewsel,
- _chatnewsel,
- _chatnewsoneel,
- _chatnewstwoel,
- _chateditel,
- _chatbuttonel,
- _chatbuttonsendel,
- _chatrecordel,
-
- _userid = friendandgroupinfo.GroupManageID ||
- friendandgroupinfo.UserId,
-
- _name = friendandgroupinfo.GroupManageName ||
- friendandgroupinfo.FriendsDescript ||
- friendandgroupinfo.UserNickName,
-
- descript = friendandgroupinfo.GroupManageDescript ||
- friendandgroupinfo.UserIndividualitysignature ||
- "暂时没有填写介绍..",
-
- _chatformel = $("#UD_SYF")[0],
-
- _chatformchilds = $(_chatformel).Child(),
-
- _navichilds = $(_chatformchilds[0]).Child();
-
- _headel = $$("div", { "className": "UD_SYFTO", "onmousedown": U.M.StopBubble }, _navichilds[0], _navichilds[0].firstChild);
- _headimageel = $$("div", { "className": "UD_SYFTOI" }, _headel);
-
- if (friendandgroupinfo.UserId) {
- $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "src": U.M.GetImgU(friendandgroupinfo.UserThumbnailImageHead),
- "alt": friendandgroupinfo.UserNickName
- }, _headimageel);
- }
-
- else {
- U.F.PrintGroupHeadImage(friendandgroupinfo, _headimageel, 4, [25, 25]);
- }
- $$("div", { "className": "UD_SYFTON UTDF", "innerHTML": _name }, _headel);
- $$("div", { "className": "UD_SYFTOC UD_SYI", "onclick": [[U.F.W.DelteFriendChat, [_userid, _chatformel, friendandgroupinfo]]] }, _headel);
-
- _chatel = $$("div", { "className": "UD_SYFNA" });
- _chatformchilds[1].insertBefore(_chatel, _chatformchilds[1].firstChild);
-
- _chatleftel = $$("div", { "className": "UD_SYFN" }, _chatel);
-
- _chatheadel = $$("div", { "className": "UD_SYFH" }, _chatleftel);
- _chatheadimageel = $$("div", { "className": "UD_SYFHH" }, _chatheadel);
- if (friendandgroupinfo.GroupManageID) {
- U.F.PrintGroupHeadImage(friendandgroupinfo, _chatheadimageel); $(_chatheadimageel).addAttrArray({ onclick: [[U.F.J.GroupInfoForm, [friendandgroupinfo]]], title: friendandgroupinfo["GroupManageName"] });
- }
- else {
- $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "onclick": [[U.M.StopBubble], U.D.IsUseStudio ? [U.U.I.ViewOtherUserInfo, [_userid]] : []], "src": U.M.GetImgU(friendandgroupinfo.UserThumbnailImageHead), "alt": friendandgroupinfo.UserNickName }, _chatheadimageel);
- }
- _chatheadcontentel = $$("div", { "className": "UD_SYFHT UTDF" }, _chatheadel);
- $$("div", { "className": "UD_SYFHTN", "innerHTML": _name }, _chatheadcontentel);
- $$("div", { "className": "UD_SYFHTC", "innerHTML": (friendandgroupinfo.GroupManageDescript || friendandgroupinfo.UserIndividualitysignature || "暂时没有填写介绍..") }, _chatheadcontentel);
- _chatheadpromptel = $$("div", { "className": "UD_SYFG" }, _chatleftel);
- $$("div", { "className": "UD_SYFGI UD_SYI" }, _chatheadpromptel);
- $$("div", { "className": "UD_SYFGC", "innerHTML": "交谈中请勿轻信汇款、中奖信息、陌生电话..." }, _chatheadpromptel);
-
- _chatcontentel = $$("div", { "className": "UD_SYFCA" }, _chatleftel);
- _chatcontentnewsel = $$("div", { "className": "UD_SYFC" }, _chatcontentel);
-
- _chatnewsel = $$("div", { "className": "UD_SYFD", "style": { "position": "relative"} }, _chatleftel);
- _chatnewsoneel = $$("div", { "className": "UD_SYFDA" }, _chatnewsel);
- _chatnewstwoel = $$("div", { "className": "UD_SYFDT" }, _chatnewsoneel);
- _chateditel = $$("div", { "className": "UD_SYFDC", "contentEditable": "true" }, _chatnewsoneel);
- $$("div", { "className": "UD_SYFDJ UD_SYI" }, _chatnewsoneel);
-
- _chatbuttonel = $$("div", { "className": "UD_SYFX" }, _chatleftel);
- _chatbuttonsendel = $$("div", { "className": "UD_SYFXE", "innerHTML": "发送(Enter)", "style": { "marginRight": "15px" },
- "onclick": [[U.F.FM.SendFriendOrGroupChatMessage, [friendandgroupinfo, _chateditel, _chatcontentnewsel, (friendandgroupinfo.UserId == null)]]]
- }, _chatbuttonel);
- $$("div", { "className": "UD_SYFXC", "innerHTML": "关闭(n)",
- "onclick": [[U.F.W.FriendDisplayAndNone, [[{ "display": "none" }, { "display": "block"}], { "left": "auto", "right": "0px"}]]]
- }, _chatbuttonel);
-
- _chatrecordel = $$("div", { "className": "UD_SYFL" }, _chatel);
- $$("div", { "className": "UD_SYFLA" }, _chatrecordel);
- $$("div", { "className": "UD_SYFLB" }, _chatrecordel);
-
- $$("div", { "classNmae": "UD_SYFDTF UD_SYI", "id": "UD_SFB", "title": "发送表情", "style": { "margin": "0", "position": "relative" },
- "onmousedown": [[U.UI.face, [_chatnewsel, U.F.W.PrintEmoticon]]], "onclick": U.M.StopBubble
- }, _chatnewstwoel);
- _chatheadimageel = $$("div", { "className": "UD_SYFDTZ UD_SYI", "title": "添加文件",
- "onclick": [[U.Dk.HP.FileSwitch, [US.NU, null, { "CB": U.M.apply(null, [[U.F.W.AddFile, [friendandgroupinfo, _chatcontentnewsel]]])}]]]
- }, _chatnewstwoel);
- if (friendandgroupinfo.GroupManageID) {
- $$("div", { "className": "UD_SYFDTS UD_SYI", "title": "网盘提交", "onclick": [[U.D.DT.YYDK, ["Disk", { "userid": US.userInfo.userid, "directoryid": friendandgroupinfo.GroupManageID}]]] }, _chatnewstwoel);
- }
- $$("div", { "className": "UD_SYFDTJ UD_SYI", "title": "聊天记录", "onclick": [[U.F.FM.ViewFriendsChatRecords, [_chatrecordel, friendandgroupinfo, 1, (friendandgroupinfo.UserId == null)]]] }, _chatnewstwoel);
- _chateditel.onkeydown = U.M.apply(_chateditel, [[U.M.returnkeylogin, [[{ "obj": _chatbuttonsendel, "event": 'onclick'}]]]]);
- _headel.onclick = U.M.apply(this, [[U.F.W.SwitchFriendsChat, [[_headel, _chatel, friendandgroupinfo], friendandgroupinfo]]]);
-
- U.D.E.GetSelectionRange(window, _chateditel, { "TF": "Friend" });
-
- if (_chatformel.childs == null) {
- _chatformel.childs = [];
- }
- _chatformel.childs.unshift({ "formid": _userid, "element": [_headel, _chatel], "info": friendandgroupinfo });
- return _chatformel.childs[0].element;
- }
- U.F.W.SwitchFriendsChat = function (elements, friendorgroupinfo) {
- var i,
- _friendchatel,
- _chatel = $(elements[1]).Parent(2),
- _topbottom = $($(_chatel).Child()[0]).Child()[2],
- _chatchilds = _chatel.childs;
-
- for (i = 0; i < _chatchilds.length; i++) {
- _friendchatel = _chatchilds[i].element;
- if (_friendchatel == elements) {
- $(elements[0]).addClass("UD_SYFTOT");
- $(elements[1]).css("display", "block");
-
- $(".UD_SYFDC", elements[1])[0].focus();
- }
- else {
- $(_friendchatel[0]).removeClass("UD_SYFTOT");
- $(_friendchatel[1]).css("display", "none");
- }
- }
-
- _topbottom.onclick = U.M.apply(_topbottom, [[U.F.R.PopupRightCornerMenu, [friendorgroupinfo, _topbottom]]]);
- _topbottom.title = friendorgroupinfo.UserId ? "个人信息" : "创建群";
-
- U.F.W.ChatBoxSize(_chatel, elements[1]);
- }
- U.F.W.DelteFriendChat = function (friendid, el) {
- var i, j,
- _chatinfo,
- _elements,
- _childs = el.childs;
-
- if (_childs.length == 1) {
- U.F.W.FriendDisplayAndNone([{ "display": "none" }, { "display": "block"}], { "left": "auto", "right": "0px" });
- }
- else {
-
- for (i = 0; i < _childs.length; i++) {
-
- if (_childs[i].formid == friendid) {
- _elements = _childs[i]["element"];
- for (j = 0; j < _elements.length; j++) {
- $(_elements[i]).remove();
- }
- _childs.splice(i, 1);
-
- if (_elements[0].className.indexOf("UD_SYFTOT") > -1) {
-
- _chatinfo = _childs[i] || _childs[i - 1];
-
- U.F.W.SwitchFriendsChat(_chatinfo["element"], _chatinfo["info"]);
- }
- break;
- }
- }
- }
- }
- U.F.W.PrintFriendChatMessage = function (el, newsinfo, issend) {
- var i,
- _date,
- _chatcontentel,
- _chatcontentoneel,
- _chatcontentwordsel,
- _chatel = el.parentNode,
- _frag = $$("frag"),
- _stylearray = issend ? ["UD_SYFCT", "UD_SYFCTL", " UD_SYFCTTO", " UD_SYFCTO"] : ["UD_SYFCO", "UD_SYFCOL", " UD_SYFCTT", ""];
-
- for (i = 0; i < newsinfo.length; i++) {
- _date = U.MT.getYearMonthDay(newsinfo[i]["Time"] || newsinfo[i]["MessageSendTime"], "Array");
- _chatcontentel = $$("div", { "className": _stylearray[0] }, _frag);
- _chatcontentoneel = $$("div", { "className": _stylearray[1] }, _chatcontentel);
-
- if (issend) {
- $$("div", { "className": "UD_SYFCOLC UD_SYFCTLC", "innerHTML": newsinfo[i]["Content"] }, _chatcontentoneel);
- $$("div", { "className": "UD_SYFCOLT UD_SYFCTLT UD_SYI" }, _chatcontentoneel);
- }
-
- else {
- $$("div", { "className": "UD_SYFCOLT UD_SYI" }, _chatcontentoneel);
- $$("div", { "className": "UD_SYFCOLC", "innerHTML": newsinfo[i]["MessageContent"] }, _chatcontentoneel);
- }
- _chatcontentwordsel = $$("div", { "className": "UD_SYFCOT" + _stylearray[2] }, _chatcontentel);
- $$("div", { "className": "UD_SYFCOTO" + _stylearray[3], "innerHTML": (_date[3] + ":" + _date[4] + ":" + _date[5]) }, _chatcontentwordsel);
- }
- el.appendChild(_frag);
-
- _chatel.scrollTop = _chatel.scrollHeight - _chatel.offsetHeight;
- }
- U.F.W.PrintGroupChatMessage = function (el, newsinfo, issend) {
- var i,
- _date,
- _contentel,
- _contentoneel,
- _contentwordsel,
- _contentimgel,
- _contentnameel,
- _stylearray,
- _chatcontentel = el.parentNode,
- _frag = $$("frag");
-
- if (issend) {
- _stylearray = ["UD_SYFCT", " UD_SYFCTLC UD_SYGCTLC", " UD_SYFCOLCOO", " UD_SYFCTTO", " "];
- }
- else {
- _stylearray = ["UD_SYFCO", "", " UD_SYFCOLCOT", " UD_SYFCTT"];
- }
-
- for (i = 0; i < newsinfo.length; i++) {
- _date = U.MT.getYearMonthDay(newsinfo[i]["Time"] || newsinfo[i]["GroupMessageSendTime"], "Array");
- _contentel = $$("div", { "className": _stylearray[0], "title": newsinfo[i].GroupMessageSendUsername || newsinfo[i].Name }, _frag);
- _contentoneel = $$("div", { "className": "UD_SYFCOLC" + _stylearray[1] }, _contentel);
- _contentimgel = $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "onclick": [[U.U.I.ViewOtherUserInfo, [newsinfo[i].GroupMessageSendUser || newsinfo[i].UserId]]], "src": U.M.GetImgU((newsinfo[i].IMG || newsinfo[i].UserThumbnailImageHead)), "className": "UD_SYFCOLCI" }, _contentoneel);
- _contentwordsel = $$("div", { "className": "UD_SYFCOLCO " + _stylearray[2], "innerHTML": newsinfo[i]["Content"] || newsinfo[i]["GroupMessageContent"] }, _contentoneel);
- (issend) && (_contentoneel.insertBefore(_contentwordsel, _contentimgel));
- _contentnameel = $$("div", { "className": "UD_SYFCOT " + _stylearray[3] }, _contentel);
- $$("div", { "className": "UD_SYFCOTOK", "innerHTML": newsinfo[i].GroupMessageSendUsername || newsinfo[i].Name }, _contentnameel);
- $$("div", { "className": "UD_SYFCOTO UD_SYFCTO", "style": { "bottom": "0px" }, "innerHTML": (_date[3] + ":" + _date[4] + ":" + _date[5]) }, _contentnameel);
- }
-
- el.appendChild(_frag);
-
- _chatcontentel.scrollTop = _chatcontentel.scrollHeight - _chatcontentel.clientHeight;
- }
- U.F.W.AddFile = function (friendinfo, el, thumbnail, fileurl, fileinfo) {
-
- var _tempel,
- _temponeel,
- _temptwoel,
- _tempthreeel,
- _isgroup = friendinfo.UserId == null;
-
- if (U.UP.IsImg(fileinfo.UserDirectoryExtendType)) {
-
- _tempel = $$("div", {});
-
- $$("img", { "className": "UD_SYFCI", "src": U.M.GetImgU(thumbnail),
- "title": U.M.GetImgU(fileurl)
- }, _messageel).onclick = "U.M.StopBubble();U.D.Img.Img(US.userInfo, { 'Thm': '" + fileurl + "', 'Img': '" + fileurl + "'})";
-
- U.F.FM.SendFriendOrGroupChatMessage(friendinfo, _messageel, el, _isgroup, true);
- }
-
- else {
- _tempthreeel = $$("div");
-
- _tempel = $$("div", { "className": "UD_SYWF" }, _tempthreeel);
- _temponeel = $$("div", { "className": "UD_SYWFS" }, _tempel);
- _temptwoel = $$("div", { "className": "UD_SYWFSS" }, _temponeel);
- $$("div", { "innerHTML": fileinfo["UserDirectoryExtendType"] }, _temptwoel);
- _temptwoel = $$("div", { "className": "UD_SYWFSX" }, _temponeel);
- $$("div", { "className": "UD_SYWFSXN", "innerHTML": fileinfo["UserallDirectoryName"] }, _temptwoel);
- $$("div", { "className": "UD_SYWFSXS", "innerHTML": "已成功发送" }, _temptwoel);
- _temponeel = $$("div", { "className": "UD_SYWFX" }, _tempel);
-
- if (U.D.IsUseStudio) {
- _tempel.onclick = "U.M.StopBubble();YDHJH('disk', ['" + fileinfo.UserId + "', '" + fileinfo.UserDirectoryID + "'])"
- _temptwoel = $$("div", { "innerHTML": "打开我的云盘", "title": "打开我的云盘" }, _temponeel);
- _temptwoel.onclick = "U.M.StopBubble();YDHJH('disk', ['" + fileinfo.UserId + "','" + fileinfo.UserDirectoryParentID + "'])";
- _temptwoel = $$("div", { "innerHTML": "打开", "title": "打开" }, _temponeel);
- _temptwoel.onclick = "U.M.StopBubble();YDHJH('disk', ['" + fileinfo.UserId + "','" + fileinfo.UserDirectoryID + "'])";
- }
-
- else {
- _temptwoel = $$("div", { "innerHTML": "下载", "title": "下载" }, _temponeel);
- _temptwoel.onclick = "U.M.StopBubble();U.UP.FileDL('" + fileinfo.UserallDirectoryName + "','" + fileinfo.UserFilesServerName + "')";
- }
-
- U.F.FM.SendFriendOrGroupChatMessage(friendinfo, _tempthreeel, el, _isgroup, true);
- }
- }
- U.F.W.PrintEmoticon = function (el, i) {
- var _imageurl = "/img/ChatingFaceGif/[face](" + i + ").gif",
- _range = U.D.E.SORange.OE["Friend"];
- _range.Replace(" " + $$("img", { "src": _imageurl, "contentEditable": "true" }).outerHTML + " ", null, true);
- }
- U.F.W.RightFormlocation = function () {
- $("#UD_SYHR").addAttrArray({ "style": { "top": (US.Height - 530) / 2, "right": "0px"} });
- }
|