123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185 |
- //Namespace.register("U.F.R"); //好友右键的命名空间
- ////---------------------------------------------------------------------------好友右键功能-----------------------------------------------------------------------------
- ////出现修改备注,删除好友等列单
- //U.F.R.FGC = function (UDOD, UIF) {
- // var _UE = U.M.GetMousep(), _UDTD = $("#UF_RB_FriDLBox").addAttrArray({ "style": { "display": "block", "left": _UE["X"] + "px", "top": _UE["Y"] + "px", "zIndex": 9999} });
- // U.F.R.AM(UDOD, UIF, _UDTD[0]); //赋予右键事件
- //}
- ////右键的元素赋值事件
- //U.F.R.AM = function (UDOD, UIF, UDTD) {
- // var i, _UDAD = $("div", UDTD), _UDE = [[U.F.W.DMW, [UIF]], [U.F.R.FSA, [UIF, UDOD]], [U.F.R.SOB, ["删除好友", UIF, UDOD]], [U.F.R.SOB, ["修改备注", UIF, UDOD]], [U.U.I.POUW, [UIF.UserId]]]; //功能
- // for (i = 1; i <= _UDE.length; i++) { if (i != 2) { _UDAD[i].onclick = U.M.apply(this, [_UDE[i - 1]]); } else { _UDAD[2].onmousemove = U.M.apply(this, [_UDE[i - 1]]); } } //功能键辅助
- //}
- ////------------------------------------------------------------------好友管理器弹出窗口区域---------------------------------------------------------------------
- ////点击qq好友管理器 弹框
- //U.F.M.FAW = function () {
- // var _UDOD = $("#UF_GM_FMDiv")[0]; U.D.PopupWindow(_UDOD);
- // U.D.Tb.WindowRestore(_UDOD, null, "好友管理器"); //创建任务栏链接
- // U.F.M.IFGAW(); //加载好友管理器
- //}
- /////判断用户是需要查看好友 还是群
- //U.F.M.IFGAW = function (ITF) {
- // var i = (ITF || 1) + 1, _UDE = [[$("#UF_FM_FGW")[0], US.Friend[0], ["FriendsGroupID", "fg", "FriendsGroupName"]], [$("#UF_FM_GGW")[0], US.Friend[2], ["GroupManageID", "gg", "GroupManageName"]]];
- // while ((i !== ITF && i--)) { _UDE[i][0].innerText = ""; U.F.M.PFAGG(_UDE[i][0], _UDE[i][1], _UDE[i][2]); }
- //}
- ////加载分组
- //U.F.M.PFAGG = function (UDOD, UDE, UTF) {
- // for (i = 0; i < UDE.length; i++) { $$("div", { "oncontextmenu": [U.F.M.RC, [UDE[i][UTF[0]], "this", UTF[1]]], "onclick": [U.F.M.PF, [UDE[i][UTF[0]], UDE[i][UTF[2]], UTF[1]]], "innerHTML": UDE[i][UTF[2]] }, UDOD); }
- //}
- ////好友分组或者群分组右键
- //U.F.M.RC = function (UGID, UDOD, TF) {
- // var i, _UDMD = TF == "fg" ? $("#UF_FM_AddFG")[0] : $("#UF_FM_AddGG")[0], _UDTD = $("#RightClick_Groupmenu"), _UE = U.M.GetMousep(), _UDAD = $("a", _UDTD[0]), _UDE = [[U.F.M.DCFG, [UGID, UDOD.innerHTML, UDOD, TF]], [U.F.M.DGFG, [UGID, UDOD.innerHTML, UDOD, TF]], [_UDMD.onclick]];
- // if (TF == "fg" && _$(US.Friend[0]).Select({ "FriendsGroupID": UGID }, null, 1)[0].FriendsGroupDescript == "自动创建") { _UDTD.style.display = "none"; return; }
- // for (i = 0; i < _UDE.length; i++) { _UDAD.addAttrArray({ "onclick": [_UDE[i], [U.F.M.NR]] }, i); }
- // U.D.SetDTop(_UDTD.addAttrArray({ "style": { "left": _UE["X"] + "px", "top": _UE["Y"] + "px", "display": "block"} })[0]);
- //}
- ////隐藏右键菜单
- //U.F.M.NR = function (UDOD) {
- // (UDOD || $("#RightClick_Groupmenu")[0]).style.display = "none";
- //}
- ////打印好友或群 分组下的好友
- //U.F.M.PF = function (UGID, UGN, TF) {
- // var _UDE, _UDOD = $("#UF_FM_FCR")[0]; _UDOD.innerText = "";
- // if (TF == "fg") { _UDE = _$(US.Friend[1]).Select({ "FriendsGroupID": UGID }); _UDE.MFF = [U.F.M.DMF, U.F.M.DDF, U.F.M.MOF]; }
- // else { _UDE = _$(US.Friend[3]).Select({ "GroupManageID": UGID }); _UDE.MFF = [U.F.M.DMF, U.F.M.DFGF, U.M.apply()]; }
- // U.F.M.PAF(_UDE, UGN, _UDOD); //打印所有的好友
- //}
- ////打印好友分组下的好友或者群好友
- //U.F.M.PAF = function (UDE, UGN, UDOD) {
- // var i, _UDTD, _UDSD, _UDFD = $$("frag");
- // for (i = 0; i < UDE.length; i++) {
- // _UDTD = $$("div", { "className": "UF_FM_CFLT" }, _UDFD);
- // $$("img", { "onerror": U.M.ImgError, "src": U.M.GetImgU(UDE[i].UserThumbnailImageHead), "className": "UF_FM_CSHD", "onclick": [[U.M.StopBubble], [U.U.I.POUW, [UDE[i].UserId]]] }, _UDTD);
- // _UDSD = $$("div", { "className": "UF_FM_HCT" }, _UDTD);
- // $$("div", { "className": "UF_FM_CNTT", "innerHTML": UDE[i].UserNickName }, _UDSD);
- // $$("div", { "className": "UF_FM_CFMKT", "innerHTML": UDE[i].GroupUsersDescript || UDE[i].FriendsDescript || UDE[i].UserName, "onclick": [UDE.MFF[0], [UDE[i], "this", UDE[i].GroupManageID]] }, _UDSD);
- // $$("div", { "className": "UF_FM_CFGPT UTDF", "innerHTML": UGN, "onclick": [UDE.MFF[2], [UDE[i], UGN, "this"]] }, _UDSD);
- // $$("div", { "className": "UF_FM_CSFLTT", "innerHTML": UDE[i].UserIndividualitysignature || "1473云端" }, _UDSD);
- // $$("div", { "className": "UF_FM_COS UF_FM_CFDBT", "onclick": [UDE.MFF[1], [UDE[i], UDE[i].GroupManageID || UDE[i].FriendsGroupID, _UDTD]] }, _UDSD);
- // }
- // UDOD.appendChild(_UDFD);
- //}
- ////---------------------------------------------------------------------------重命名
- ////----------------分组修改
- ////重命名
- //U.F.M.DCFG = function (UGID, UGN, UDOD, TF) {
- // UDOD.innerHTML = ""; $$("input", { "type": "text", "onkeyup": [[U.M.returnkeylogin, [null, [[U.F.M.CFG, [UDOD, "retElement", UGID, UGN, TF]]]]]], "onclick": U.M.StopBubble, "className": "UF_FM_InputAdmin", "value": UGN, "onblur": [[U.F.M.CFG, [UDOD, "retElement", UGID, UGN, TF]]] }, UDOD).focus();
- //}
- ////重命名的函数
- //U.F.M.CFG = function (UDOD, UDID, UGID, UGN, TF) {
- // if (UDID.value.removeP() != "" && UDID.value != UGN && UDID.value.count()>40) { if (U.F.M.SCFG(UDID, UGID, TF, UDOD)) { UDOD.innerHTML = UDID.value; return; } else { U.Alert("您不是群主,无法修改群"); } }
- // else { U.Alert("无效输入"); }; UDOD.innerHTML = UGN;
- //}
- ////好友分组重新命名
- //U.F.M.SCFG = function (UDID, UGID, TF) {
- // var _UDE = TF == "fg" ? [true, "ModifyFriendsGroup"] : [_$(US.Friend[2]).Select({ "GroupManageID": UGID, "GroupManageCreateUserID": US.userInfo.userid })[0], "ModifyGroup"];
- // if (_UDE[0]) { U.A.Request(US.Auth,"UseStudioManage." + _UDE[1], [US.userInfo.userid, UDID.value, UGID], U.F.M.AsynSCFG, ["", UGID, UDID.value, TF]); }
- // return _UDE[0];
- //}
- ////修改分组命名异步
- //U.F.M.AsynSCFG = function (r) {
- // var _TF, _UDE, _UDOD, context = r.context, _UGID = context[1], _UTH = context[2], _TF = context[3]; r = r.value;
- // if (_TF == "fg") { _UDE = _$(US.Friend[0]).Select({ "FriendsGroupID": _UGID })[0]; _UDOD = $("a", $("#ListClass_" + _UGID)[0])[0]; _TF = "FriendsGroupName"; }
- // else { _UDE = _$(US.Friend[2]).Select({ "GroupManageID": _UGID })[0]; _UDOD = $("span", $("#GroupclassPanel_" + _UGID)[0])[0]; _TF = "GroupManageName"; }
- // (_UDOD) && (_UDOD.innerText = _UDE[_TF] = _UTH); U.F.M.PF(_UGID, _UTH, _TF); U.F.M.IFGAW(); //修改好友框
- //}
- ////--------------------------好友和群友修改
- ////好友和群友修改
- //U.F.M.DMF = function (UGGI, UDOD) {
- // UDOD.innerText = ""; $$("input", { "type": "text", "id": "FriendsDescript", "className": "UF_FM_InputAdmin", "value": UGGI.FriendsDescript || UGGI.GroupUsersDescript || UGGI.UserName, "onblur": [U.F.M.MF, [UGGI, UDOD]] }, UDOD).select();
- //}
- ////确定修改
- //U.F.M.MF = function (UGGI, UDOD) {
- // var _UHT = (UGGI.FriendsDescript || UGGI.GroupUsersDescript);
- // if (this.value.removeP() != "" && this.value != _UHT) {
- // if (UGGI.GroupManageID) { if (U.F.M.CGFT(UGGI, this)) { this.value = _UHT; }; } //修改群友备注
- // else { U.F.R.CUR(this.value, $("Buddy_" + UGGI.FriendsID)[0], UGGI); } //修改好友备注
- // }
- // else { this.value = _UHT; }
- // UDOD.innerText = this.value;
- //}
- ////群成员修改
- //U.F.M.CGFT = function (UGGI, UDOD) {
- // if (UGGI.UserId == US.userInfo.userid || _$(US.Friend[2]).Select({ "GroupManageID": UGGI.GroupManageID, "GroupManageCreateUserID": US.userInfo.userid })[0]) { U.F.M.CGN(UGGI.GroupManageID, UGGI.UserId, UDOD.value); } //修改自己获取群主修改他人的
- // else { U.Alert("无权限修改"); return true; } //无法修改
- //}
- ////修改群昵称
- //U.F.M.CGN = function (UGID, userid, UTH) {
- // U.A.Request(US.Auth,"UseStudioManage.ModifyGroupFriedns", [US.userInfo.userid, UGID, userid, UTH], U.F.M.AsynCGN, ["", UGID, userid, UTH]);
- //}
- ////修改群呢称异步
- //U.F.M.AsynCGN = function (r) {
- // var context = r.context, _UGID = context[1], _userid = context[2], _UTH = context[3]; r = r.value;
- // if (r != null) { _$(US.Friend[3]).Select({ "GroupManageID": _UGID, "UserId": _userid }, null, 1)[0].GroupUsersDescript = _UTH; U.Alert("修改成功"); }
- //}
- ////-----------------------------------------------------------------------删除
- ////----------------------分组
- ////删除该组 这边是好友分组和群分组都在这里
- //U.F.M.DGFG = function (UGID, UGN, UDOD, TF) {
- // U.UI.Confirm("你确定删除 " + UGN + "分组吗?", [U.F.M.DGFGT, (arguments)], "");
- //}
- ////确定删除组
- //U.F.M.DGFGT = function (UGID, UGN, UDOD, TF) {
- // if (TF == "fg") {//删除好友分组
- // if (US.Friend[1].Select({ "FriendsGroupID": UGID }, null, 1)[0]) { U.F.M.DFG(UGN, UGID, UDOD); }
- // else { U.Alert("好友分组下有好友,无法删除"); }
- // }
- // else { U.F.M.DFGF(US.userInfo, UGID, UDOD); } //删除群分组
- //}
- ////好友分组的删除
- //U.F.M.DFG = function (UGN, UGID, UDOD) {
- // U.A.Request(US.Auth,"UseStudioManage.DeleteFrinedsGroup", [US.userInfo.userid, UGID], U.F.M.AsynDFG, ["", UDOD, UGID, UGN]); //好友分组的删除
- //}
- ////好友分组删除异步
- //U.F.M.AsynDFG = function (r) {
- // var i, context = r.context, _UDOD = context[1], _UGID = context[2], _UDTD = [$("span#ListClass_" + _UGID)[0], _UDOD]; r = r.value;
- // if (r != null) {
- // _$(US.Friend[0]).Delete({ "FriendsGroupID": _UGID }, null);
- // for (i = 0; i < _UDTD.length; i++) { _UDTD[i].parentNode.removeChild(_UDTD[i]); }
- // U.Alert("成功删除" + context[3] + "分组"); //成功删除分组
- // }
- //}
- ////--------------------------------------------成员
- ////群成员删除
- //U.F.M.DFGF = function (UIF, UGID, UDOD) {
- // var _userid = UIF.UserId, _TF = [U.UI.Confirm, false, "你确定要删除该成员吗?", [U.F.M.KF, [UIF, UGID, UDOD, _userid]]];
- // if (_$(US.Friend[2]).Select({ "GroupManageID": UIF.GroupManageID, "GroupManageCreateUserID": US.userInfo.userid })[0]) { if (_userid == US.userInfo.userid) { _TF[2] = "你确定要解散该群吗?"; _TF[3] = [U.F.M.DGG, [UGID, UDOD]]; } } //离开群或者删除群
- // else if (US.userInfo.userid == _userid) { _TF[2] = "你确定离开群吗?"; }
- // else { U.Alert("你不是群主或管理员无法移除该成员"); _TF[1] = true; }
- // if (!_TF[1]) { _TF[0](_TF[2], _TF[3], null); }
- //}
- ////踢人出群
- //U.F.M.KF = function (UIF, UGID, UDOD, userid) {
- // U.A.Request(US.Auth,"UseStudioManage.GroupFriednsDelect", [US.userInfo.userid, UGID, userid], U.F.M.AsynKF, ["", UGID, userid, UDOD]);
- //}
- ////离开群和踢人出群异步
- //U.F.M.AsynKF = function (r) {
- // var context = r.context, _UGID = context[1], _userid = context[2], _UDOD = context[3]; r = r.value;
- // if (r != null) {
- // if (_userid == US.userInfo.userid) { U.F.M.YDGG(_UGID, _UDOD); }
- // else { _$(US.Friend[3]).Delete({ "GroupManageID": _UGID, "UserId": _userid }); _UDOD.parentNode.removeChild(_UDOD); }
- // }
- //}
- ////删除好友群
- //U.F.M.DGG = function (UGID, UDOD) {
- // U.A.Request(US.Auth,"UseStudioManage.DeleteGroupFriendsAjax", [US.userInfo.userid, UGID], U.F.M.AsynDGG, ["", UGID, UDOD]); //此时还要删除的是群
- //}
- ////删除好友群异步
- //U.F.M.AsynDGG = function (r) {
- // var context = r.context, _UGID = context[1], _UDOD = context[2]; r = r.value;
- // if (r != null) { U.F.M.YDGG(_UGID, _UDOD); U.Alert("群解散成功!"); }
- //}
- ////移除群处理
- //U.F.M.YDGG = function (UGID, UDOD) {
- // _$(US.Friend[2]).Delete({ "GroupManageID": UGID }); _$(US.Friend[3]).Delete({ "GroupManageID": UGID }); //移除群和群好友
- // UDOD.parentNode.removeChild(UDOD); $("#UF_FM_FCR")[0].innerText = ""; //清除
- // U.F.M.IFGAW(1); U.F.GetAllGroupAjax($("#UF_UP_GroupBoard")[0]); //清理多余数据
- //}
- ////好友删除
- //U.F.M.DDF = function (UIF) {
- // U.UI.Confirm("你确定删除" + UIF.FriendsDescript + "联系人吗?", [U.F.M.DDFT, [UIF]], "");
- //}
- ////好友删除
- //U.F.M.DDFT = function (UIF) {
- // U.F.R.DF($("#Buddy_" + UIF.FriendsID)[0], UIF); //好友面板上删除好友
- // U.Alert("移除好友成功");
- //}
- ////------------------------------------------------------------------------------添加
- ////添加分组
- //U.F.M.AGAF = function (TF, UDOD) {
- // if (!$("input", UDOD)[0]) { $$("input", { "type": "text", "onkeyup": [[U.M.returnkeylogin, [null, [[U.F.M.AGF, [TF]]]]]], "onblur": [[U.F.M.AGF, [TF]]], "className": "UF_FM_InputAdmin", "name": "0", "maxlength": "24" }, UDOD).focus(); }
- //}
- ////添加分组
- //U.F.M.AGF = function (TF) {
- // var _UTH = this.value.trim();
- // if (_UTH.removeP() != "" && _UTH.count()>40) { if (confirm("你确定要保存吗?")) { U.F.M.AGFT(this, TF); } }
- // else { U.Alert("输入的文字无效,不可为空或大于40"); }
- // this.parentNode.removeChild(this);
- //}
- ////确定添加添加分组
- //U.F.M.AGFT = function (UDOD, TF) {
- // var _UNID = U.MS.produceGuid(), _UTF = TF == "fg" ? "AddToFriendsGroup" : "AddNewGroup"; //分组或者群分组ID
- // U.A.Request(US.Auth,"UseStudioManage." + _UTF, [US.userInfo.userid, UDOD.value, _UNID, ""], U.F.M.AsynAFG, ["", UDOD, _UNID, TF]);
- //}
- ////异步确定添加
- //U.F.M.AsynAFG = function (r) {
- // var _UDE, _ITF = 0, context = r.context, _UDOD = context[1], _UNID = context[2], _TF = context[3]; r = r.value;
- // if (r != null) {
- // if (_TF == "fg") {
- // US.Friend[0].push((_UDE = new U.F.T.FriendGroupEntity["", _UNID, _UDOD.value])); //创建好友分组实体
- // U.F.CFGG($("#UF_UP_FriendBoard")[0], _UDE, []); //添加好友分组
- // }
- // else {
- // US.Friend[2].push(new U.F.T.GroupEntity[_UNID, _UDOD.value, U.MT.formatDateToArray(), US.userInfo.userid, US.NU, "", null]); US.Friend[3].push(new U.F.T.GroupUserEntity[US.userInfo.userid, US.userInfo.UserImageHead, US.userInfo.UserNickName, US.userInfo.username, US.userInfo.UserThumbnailImageHead, US.userInfo.UserNickName, _UNID, 1]); //添加实体
- // U.F.GetAllGroupAjax($("#UF_UP_GroupBoard")[0]); _ITF = 1 //刷新显示区域
- // }
- // U.F.M.IFGAW(_ITF);
- // }
- //}
- ////---------------------------------------------------------好友移动
- ////好友移动
- //U.F.M.MOF = function (UIF, UGN, UDOD) {
- // var i, _UDSD, _UDE = US.Friend[0], _UDTD = $("select", UDOD)[0];
- // if (!_UDTD) {
- // UDOD.innerText = ""; _UDTD = $$("select", { "id": "ListAdmin", "className": "UF_FM_SelectAdmin", "onblur": [U.F.M.MOFB, [UDOD, UGN]], "onchange": [U.F.M.SMOF, [UIF]], "onclick": U.M.StopBubble });
- // for (i = 0; i < _UDE.length; i++) {
- // _UDTD.options.length += 1; _UDSD = _UDTD.options[i];
- // _UDSD.value = _UDE[i].FriendsGroupName + "|" + _UDE[i].FriendsGroupID; _UDSD.text = _UDE[i].FriendsGroupName;
- // (UIF.FriendsGroupID == _UDE[i].FriendsGroupID) && (_UDSD.selected = true);
- // }
- // UDOD.appendChild(_UDTD); _UDSD.focus();
- // }
- //}
- ////移动好友 onblur触发的
- //U.F.M.MOFB = function (UFOD, UGN) {
- // UFOD.innerHTML = UGN;
- //}
- ////好友移动功能
- //U.F.M.SMOF = function (UIF) {
- // var _UTH = this.value, _UN = _UTH.lastIndexOf("|"), _UGN = _UTH.substring(0, _UN), _UGID = _UTH.substring(_UN + 1);
- // U.UI.Confirm("你确定移动到" + _UGN + "这个分组吗?", [U.F.M.SMOFT, [UIF, _UGID]], "");
- //}
- ////确定好友移动
- //U.F.M.SMOFT = function (UIF, UGID) {
- // (UGID != UIF.FriendsGroupID) && (U.F.R.MF(UGID, UIF))
- //}
- ////---------------------------------------------------------------------------移动好友---------------------------------------------------------------------------------
- ////移动好友分组
- //U.F.R.FSA = function (UIF, UDOD) {
- // var i, _UDE = US.Friend[0], _UDFD = $$("frag"), _UDTD = $("#UserFriendArrayBox")[0], _UDSD = $("#UF_RB_FriDLBox")[0]; _UDTD.innerText = "";
- // if (_UDE.length > 1) {
- // for (i = 0; i < _UDE.length; i++) {
- // if (UIF.FriendsGroupID != _UDE[i].FriendsGroupID) { $$("div", { "onclick": [U.F.R.MF, [_UDE[i].FriendsGroupID, UIF, UDOD]], "innerHTML": _UDE[i].FriendsGroupName }, _UDFD); }
- // }
- // _UDTD.style.height = ((_UDE.length - 1) * 30) + "px"; _UDTD.appendChild(_UDFD); //添加数据 //好友分组框的宽度
- // U.F.R.DFP(_UDSD, _UDTD); U.D.SetDTop(_UDTD); //好友分组位置
- // }
- //}
- ////这里是好友分组框
- //U.F.R.DFP = function (UDOD, UDTD) {
- // var _UX = UDOD.offsetLeft, _UL = _UX + UDOD.offsetWidth - 1; (_UL + 142 > US.Width) && (_UL = _UX - 142);
- // $(UDTD).addAttrArray({ "style": { "top": UDOD.offsetTop + 54 + "px", "left": _UL + "px", "display": (UDOD.style.display = "block")} });
- //}
- ////执行移动好友分组
- //U.F.R.MF = function (UGID, UIF, UDOD) {
- // (UDOD) && (UDOD.style.display = "none"); //隐藏好友分组框
- // U.A.Request(US.Auth,"UseStudioManage.ModifyFrinedsAjaxMove", [US.userInfo.userid, UIF.FriendsID, UGID], U.F.R.AsynAFA, ["", UGID, UIF]); //移动好友到别的分组
- //}
- ////移动好友异步
- //U.F.R.AsynAFA = function (r) {
- // var _UDE, context = r.context, _UGID = context[1], _UIF = context[2]; r = r.value;
- // if (r != null) {
- // _UDE = _$(US.Friend[0]).Select({ "FriendsGroupID": _UGID }, null, 1); //获取群信息
- // _$(US.Friend[1]).Select({ "FriendsID": _UIF.FriendsID })[0].FriendsGroupID = _UGID; //修改分组
- // (_$(US.Friend[1]).Reset({ "IsLogin": 1 })); U.F.refreshFriends(); U.F.M.PF(_UIF.FriendsGroupID, _UDE.FriendsGroupName, "fg"); //更新好友
- // }
- //}
- ////----------------------------------------------------------------------------删除修改的样式显示--------------------------------------------------------------------
- ////删除修改显示的样式
- //U.F.R.SOB = function (TF, UIF, UDOD) {
- // var _UDTD, _UDSD;
- // if (TF == "删除好友") {
- // _UDTD = $$("div", { "className": "USFriendsOperational_Delete" });
- // $$("div", { "id": "DeleteFriendTitle", "innerHTML": " 您确定要删除以下联系人吗?" }, _UDTD);
- // $$("img", { "onerror": U.M.ImgError, "src": U.M.GetImgU(UIF.UserThumbnailImageHead), "className": "UF_FA_DFNI" }, _UDTD);
- // $$("span", { "className": "UserNameDelete", "innerHTML": UIF.FriendsDescript }, _UDTD);
- // $$("div", { "innerHTML": " 要删除的话,那就无法恢复好友!", "className": "UF_FA_DFNC" }, _UDTD);
- // }
- // else {
- // _UDTD = $$("div", { "className": "USFriendsOperational_Amend" });
- // $$("div", { "className": "AmendFriendTitle", "innerHTML": "请输入或修改备注用户和姓名" }, _UDTD);
- // $$("input", { "className": "USFriendsName", "type": "text", "value": UIF.FriendsDescript }, _UDTD);
- // }
- // _UDSD = new U.UI.Dialog(TF, { "width": "350px" }, "", U.M.apply(_UDTD, [[U.F.R.CF, [TF, UDOD, UIF]]]), _UDTD, "");
- // U.D.PopupWindow(_UDSD.Create());
- //}
- ////修改备注和删除好友执行确定操作
- //U.F.R.CF = function (TF, UDOD, UIF) {
- // if (TF == "修改备注") { U.F.R.CUR($("input", this)[0].value, UDOD, UIF); } //执行修改备注
- // else { U.F.R.DF(UDOD, UIF); }
- //}
- ////-------------------------------------------------------------------------------------修改备注----------------------------------------------------------------------
- ////修改备注
- //U.F.R.CUR = function (UFN, UDOD, UIF) {
- // (UFN.removeP() == "") && (UFN = UIF.UserNickName);
- // U.A.Request(US.Auth,"UseStudioManage.ModifyFriendsDescriptName", [US.userInfo.userid, UIF.FriendsID, UFN], U.F.R.AsynCUR, ["", UIF, UFN, UDOD]); //修改好友昵称
- //}
- ////修改备注异步
- //U.F.R.AsynCUR = function (r) {
- // var context = r.context, _UIF = context[1], _UFN = context[2], _UDOD = context[3]; r = r.value;
- // _$(US.Friend[1]).Select({ "FriendsID": _UIF.FriendsID })[0].FriendsDescript = $("span", context[3])[0].innerHTML = _UFN; //修改资料
- // U.Alert("修改好友备注成功");
- //}
- ////----------------------------------------------------------------------------------删除好友-------------------------------------------------------------------------
- ////删除好友
- //U.F.R.DF = function (UDOD, UIF) {
- // U.A.Request(US.Auth,"UseStudioManage.USFreindsDeleteFriendAjax", [US.userInfo.userid, UIF.FriendsID, UIF.UserId], U.F.R.AsynDF, ["", UDOD, UIF]); //执行删除好友的ajax
- //}
- ////删除好友异步
- //U.F.R.AsynDF = function (r) {
- // var _UDE, context = r.context, _UDOD = context[1], _UIF = context[2], _UDTD = $("em", _UDOD.parentNode.parentNode)[0], _UHT = _UDTD.innerHTML; r = r.value;
- // _UDE = _$(US.Friend[0]).Select({ "FriendsGroupID": _UIF.FriendsGroupID }, null, 1); //分组的信息
- // _UDTD.innerHTML = "[" + (_UHT.substring(1, _UHT.length - 1) - 1) + "]"; _UDOD.parentNode.removeChild(_UDOD); //删除好友的div
- // _$(US.Friend[1]).Delete({ "FriendsID": _UIF.FriendsID }); U.F.M.PF(_UIF.FriendsGroupID, _UDE.FriendsGroupName, "fg");
- //}
- ////------------------------------------------------------------------------好友右键的辅助函数--------------------------------------------------------------------------
- ////移动好友分组
- //U.F.R.FDN = function (UDOD, UDTD) {//解决冒泡事件
- // (!(U.M.onmouseout(UDOD))) && (U.F.R.MMO(UDTD));
- //}
- ////好友分组显示和消失
- //U.F.R.MMO = function (UDOD) {
- // UDOD.style.display = (U.M.onmouseout(UDOD)) ? "block" : "none";
- //}
- ////好友状态变化
- //U.F.R.USF = function (UDOD) {
- // $("#UserstatusFat").addAttrArray({ "style": { "backgroundPosition": UDOD.style.backgroundPosition} });
- // UDOD.parentNode.parentNode.style.display = "none";
- //}
- ////显示用户状态选择
- //U.F.R.US = function () {
- // var _UDOD = $("#Userstatus")[0]; _UDOD.style.display = _UDOD.style.display == "block" ? "none" : "block";
- //}
- //Namespace.register("U.F.A"); //好友辅助函数命名空间
- ////------------------------------------------------------------------------好友面板上独立的一下通用函数
- ////群 好友 最近联系人的切换
- //U.F.A.MAGC = function (UDXD) {
- // var i, _TF, _UTF = ["UF_UP_FriendBoard", "UF_UP_GroupBoard", "UF_UP_ChatRecord"];
- // for (i = 0; i < _UTF.length; i++) { if (_UTF[i] == UDXD) { _TF = "block"; } else { _TF = "none"; } $("#" + _UTF[i])[0].style.display = _TF; }
- //}
- ////好友聊天框
- //U.F.A.ISFriend = function () {
- // if (!U.U.L.LARG()) {
- // var _UDOD = $("#UF_UP_UserBoard")[0], _TF = ["150px", "block"];
- // (_UDOD.style.display == "block") && (_TF[0] = "-2000px", _TF[1] = "none");
- // $(_UDOD).animate({ "top": _TF[0], "display": _TF[1] }, 100);
- // }
- // return _UDOD;
- //}
- ////调整好友框
- //U.F.A.IframeAutoHight = function (UDOD) {
- // var i, _UDTD, _UDSD, _UDFD, _UDGD, _UE = U.M.GetElementInfo(UDOD), _UDAD = U.M.GTCN(UDOD.childNodes);
- // if (_UE["CW"] > 0) {
- // //中间编辑区域和查看区域
- // for (i = 0; i < _UDAD.length; i++) {
- // if (_UDAD[i].id.indexOf("UF_FW_Content") > -1 && _UDAD[i].id.length > 14 && _UDAD[i].style.display != "none") {
- // _UDTD = $("div#UF_FW_Context", _UDAD[i])[0]; _UDSD = $("div#UF_FW_C", _UDTD)[0];
- // if (_UDSD.offsetWidth > 0) { UDOD.style.minWidth = "730px"; } else { UDOD.style.minWidth = "430px"; };
- // if (_UE["CH"] > 0) {
- // _UDFD = $("div", _UDTD); _UDSD.style.height = (_UE["CH"] - 119) + "px"; _UE = U.M.GetElementInfo(UDOD); //大小变化
- // _UDFD[2].style.height = (_UE["CH"] - 231) + "px"; _UDFD[0].style.width = _UE["CW"] - _UDSD.offsetWidth + "px";
- // }
- // //发送框和头部
- // _UDGD = $("div#SendMessageImg", UDOD)[0]; _UDGD.parentNode.style.width = _UE["CW"] - 22 + "px"; _UDGD.style.marginLeft = _UE["CW"] - 60 + "px";
- // $("div#UF_FW_user", UDOD)[0].style.width = _UE["CW"] - 92 + "px";
- // }
- // }
- // }
- //}
- //_$(U.F.N).Add({ "UXFN": [] });
- ////消息框显示
- //U.F.N.SFNB = function (UDOD) {
- // if (!U.U.L.LARG()) {
- // var _UDTD = $("#UF_FA_FMAlertWin"), _UDE = { "display": "none" };
- // (_UDTD[0].style.display == "none") && (_UDE.display = "block", _UDE.left = UDOD.offsetLeft - 65 + "px");
- // _UDTD.addAttrArray({ "style": _UDE });
- // }
- //}
- ////请求好友消息 群消息 聊天室消息和用户基本资料 同时具有添加聊天室消息的功能
- //U.F.N.GNM = function (userid) {
- // var _UDE = U.D.BC.BS, _UME = U.D.BC.M; U.A.Request(US.Auth,"UseStudioManage.GetNewMessageService", [userid, US.userInfo.OnUserId, U.MS.jsonToStr(_UME), _UDE[0], _UDE[3][_UDE[0]]["ID"], US["ITID"]]), U.F.N.AsynGNM, ["", _UDE[0]]; //每隔5秒钟获取用户信息和好友上下线
- // U.D.BC.M.splice(0, _UME.length);
- //}
- ////--------------------------------------------------------------------------获取好友消息------------------------------------------------------------------------------
- ////这个是消息的异步处理
- //U.F.N.AsynGNM = function (r) {
- // var i, _UDE, ULE, context = r.context, _DID = context[1]; r = r.value;
- // if (r) {
- // _UDE = r[0]; ULE = r[1];
- // if (ULE == "upline") { U.F.N.DL(); } //用户下线
- // else if (ULE == "none") { if (confirm("登录超时!。是否从新登陆")) { U.A.Request(US.Auth,"UseStudioManage.UserStateLogin", [US.userInfo.username, US.userInfo.UserPassword, US.userInfo.OnUserId, 0], U.F.N.AsynLogin, []); U.Alert("正在和服务器连接") } else { U.U.L.TCUL(); } } //登录超时
- // else {
- // for (i = 0; i < 2; i++) { U.F.N.ST(ULE[i], i); } //上下线通知
- // if (ULE[2]) { (ULE[2].length > 0) && (U.D.BC.SetNews(ULE[2]), U.D.BC.BS[3][_DID]["ID"] = ULE[2][ULE[2].length - 1].newid); } //聊天时消息
- // if (ULE[4] && ULE[4].length) { U.F.N.SRXX(ULE[4]); } //用户即时消息
- // U.D.PSU[ULE[5], ULE[3]]; U.F.N.SNF(_UDE); //在线人数变化
- // for (i = 0; i < U.F.N.UXFN.length; i++) { U.F.N.UXFN[i](r); } //消息应用盒子发送
- // }
- // }
- //}
- //创建群聊天
- U.D.SY.OGM = function (UGE, UDOD) {
- var _UDCD, _UDED, _UATD, _UDPD, _UDLD, _UFE = U.D.SY.ET["UL"]["GG"][UGE.GroupManageID], _UDOD = _UFE || $("#UD_SYG")[0].cloneNode(true), _UDAD = U.M.GTCN(_UDOD.childNodes); UDOD = UDOD || $("#UD_SYHZR")[0];
- if (_UFE == null) {
- //简述
- _UDCD = $("div", _UDAD[0]); U.D.SY.GQTX(UGE, _UDCD[0]); _UDCD[2].innerText = UGE.GroupManageName; _UDCD[3].innerText = UGE.GroupManageRemark || "暂无简述";
- //按钮
- _UDCD = U.M.GTCN(_UDAD[2].childNodes); _UDLD = _UDCD[1]; _UDCD = _UDCD[0]; _UDPD = $("div", _UDCD)[1]; _UDED = $("div@contentEditable=true", _UDCD)[0]; _UATD = $("div", $("div.UD_SYFDT", _UDCD)[0]); _UDCD = $("div", _UDCD);
- _UDED.onkeydown = U.M.apply(_UDED, [[U.M.returnkeylogin, ([null, (_UDCD[_UDCD.length - 2].onclick = U.M.apply(this, [[U.D.SY.FSOFM, [UGE, _UDED, _UDPD, true]]]))])]]); _UDCD[_UDCD.length - 1].onclick = U.M.apply(this, [[U.D.SY.COGM, [_UDOD]]]); _UATD[1].onclick = U.M.apply(this, [[U.D.SY.LTJLFM, [_UDLD, UGE, 1, true]]]); _UATD[0].onclick = U.M.apply(_UATD[1], [[U.M.StopBubble], [U.Dk.UP.FUW, (['', US.userInfo.userid, '', { 'GS': 'M', 'AFCP': U.M.apply(this, [[U.D.SY.ASCTP, [UGE, _UDCD, true]]]), 'FCP': U.D.SY.SCTP, 'URL': 'http://disk.1473.cn/USupfile.ashx?iframename=UseStudioEditor', 'ID': 'UDK_FUPB' }])]]);
- //群
- _UDCD = U.M.GTCN(_UDAD[0].childNodes); _UDCD[2].onclick = U.M.apply(_UDCD[2], [[U.D.SY.NewQZ, [UGE]]]);
- _UDOD.id = ""; U.D.SY.ET["UL"]["GG"][UGE.GroupManageID] = _UDOD; UDOD.appendChild(_UDOD);
- }
- U.F.FM.SMT(UGE.GroupManageID, "", U.M.apply(this, [[U.D.SY.JKXOFM, ["GM", [UGE, _UDOD]]]]), true); U.D.PopupWindow(_UDOD); U.D.SY.TZOPM(_UDOD, true); (_UDED || $("div@contentEditable=true", _UDCD)[0]).focus(); //获取群消息 //显示调整
- }
- //关闭群消息
- U.D.SY.COGM = function (UDOD) {
- _$(U.D.SY.ET["UL"]["GG"]).DeleteBV(UDOD);
- U.D.CloseWindow(UDOD, "remove"); //移除
- }
- ////----------------------------------------------------------------上下线处理
- ////用户重录异步
- //U.F.N.AsynLogin = function (r) {
- // r = r.value;
- // (r) && (U.Alert("和服务器连接成功"));
- //}
- ////挤下线的处理
- //U.F.N.DL = function () {
- // if (confirm("您好,您的账号在别处有登录,点击确定从新登录")) { U.A.Request(US.Auth,"UseStudioManage.lineUser", [US.userInfo.userid, US.userInfo.username, US.userInfo.OnUserId], U.M.apply(), []); }
- // else { U.U.L.TCUL(); }
- //}
- ////上线
- //U.F.N.ST = function (UDE, TF) {
- // var i, j, _UIT, _UGF, _UCE = U.F.W.GNF;
- // for (i = 0; (UDE && i < UDE.length); i++) {//修改上下线用户的登录情况
- // if (UDE[i] != US.userInfo.userid) { for (j = 0; j < 3; j++) { _$(_$(US.Friend[(j ? j + 2 : 1)]).Select({ "UserId": UDE[i] })).Change({ "IsLogin": TF }); }; _UIT = true; }
- // }
- // if (_UIT) { for (i = 0; i < 3; i++) { (_$(US.Friend[(i ? i + 2 : 1)]).Reset({ "IsLogin": 1 })); } for (i = 0; i < _UCE.length; i++) { U.F.DisplayGroupMembers(_UCE[i].id, $("div#UF_GW_MembersDiv", _UCE[i])[0]); } U.F.refreshFriends(); } //群好友和好友和最近联系人上下线通知
- //}
- ////--------------------------------------------------------------------即时通讯消息
- ////即时消息处理
- //U.F.N.SRXX = function (UDE) {
- // var i, j, _UCE, _UKE, _UPE, _UN;
- // for (i = 0; i < UDE.length; i++) {
- // if ((_UCE = UDE[i]) && (UDE[i].UserId != US.userInfo.userid)) {
- // switch (_UCE["NEWTYPE"]) {
- // case "UD_DiskCon": //添加网盘文件
- // eval("_UKE =" + _UCE["NEWC"]); _UKE = _UKE.length == null ? [_UKE] : _UKE; _UPE = US.Disk.UserDisk; //获取实体
- // for (j = 0; j < _UKE.length; j++) {
- // _UN = _UKE[j].UserDirectoryName || _UKE[j].UserFilesName;
- // _UCE = U.Dk.M.RUS(new U.Dk.M.Entity([_UKE[j].UserFilesID || _UKE[j].UserDirectoryID, _UKE[j].UserFilesSize || 0, _UKE[j].UserDirectoryParentID || _UKE[j].UserDirectoryID, _UN, _UN, _UKE[j].UserDirectoryExtendType || _UKE[j].UserFilesExtendName, _UKE[j].UserFilesServerName, new Date(), _UKE[j].UseFilesServerThumbnailName ? US.fs + _UKE[j].UseFilesServerThumbnailName : U.UP.FFT(_UKE[j].UserDirectoryExtendType || _UKE[j].UserFilesExtendName)[1], _UKE[j].UserDirectoryDeep || "9999.00", null, null, _UKE[j].UserDirectoryExtendType ? 0 : 1, _UKE[j].UserDirectoryDescript || _UKE[j].UserFilesDescript, US.userInfo.userid, "", _UCE.UserId, _UCE.UserName, _UCE.UserName, _UCE.UserThumbnailImageHead])); //新建实体
- // _UPE[0].push(_UCE);
- // }
- // (_UPE[1][1] == _UCE.UserDirectoryID) && (U.Dk.VW.DT(_UCE.UserDirectoryID));
- // break;
- // case "DDisk": //删除网盘文件信息
- // _UKE = _UCE["NEWC"].split(","); _UPE = US.Disk.UserDisk;
- // for (j = 0; j < _UKE.length; j++) { _$(_UPE[0]).Delete({ "UserDirectoryID": _UKE[i] }); } //删除文件
- // if (_UPE[1][1] == _UCE["NEWT"]) { U.Alert((_UCE["UserNickName"] || _UCE["UserName"]) + "跟新了当前目录"); U.Dk.VW.DT(_UCE["NEWT"]); } //用户操作当前跟新的文件夹
- // break;
- // case "AddG": eval("_UKE =" + _UCE["NEWC"]); U.F.J.AUGT(_UKE, { "GroupManageID": _UCE["NEWT"] }); break; //添加用户进入群
- // case "UPBR": break; //blog pb评论信息 eval("_UKE =" + _UCE["ET"]);
- // }
- // }
- // }
- //}
- ////-------------------------------------------------------------------消息提示
- ////------------------------------------------------------------------------好友提示
- ////删除消息提示
- //U.F.N.DM = function () {
- // this.parentNode.removeChild(this); U.F.N.NMC(); //清理消息
- //}
- ////好友消息提示
- //U.F.N.NMC = function () {
- // var _UMID, _UDCD, _UDOD = $("#UF_UP_UCNewsRecord")[0], _UDTD = $("#UD_HF_NewMessage")[0], _UDPD = _UDTD.parentNode, _UDID = $("i", _UDOD), _UDMD = $("img", _UDPD)
- // if (_UDID.length > 0) {
- // _UDTD.innerText = _UDID.length; _UMID = _UDMD[0]; _UDCD = $("img", _UDID[0])[0];
- // if (!_UMID) { _UMID = $("img", _UDID[0])[0].cloneNode(true); _UDPD.appendChild(_UMID); }
- // else if (_UMID.src != _UDCD.src) { _UMID.src = _UDCD.src; }
- // $(_UMID).addAttrArray({ "className": "UF_FA_FNR_img", "style": { "display": "block" }, "onclick": (_UDPD.ondblclick = _UDID[0].onclick) });
- // setTimeout(U.M.apply(this, [[U.F.N.SNMC, [_UMID]]]), 500);
- // }
- // else { _UDPD.ondblclick = null; (_UDTD.innerText != 0) && (_UDTD.innerText = 0); (_UDMD.length > 0) && (_UDMD[0].parentNode.removeChild(_UDMD[0])); }
- //}
- ////闪烁效果
- //U.F.N.SNMC = function (UDOD) {
- // UDOD.style.display = "none";
- //}
- ////-----------------------------------------------------------------------消息提示音--------------------------------------------------------------------------------
- //U.F.N.M = []; //消息集
- ////消息处理 判断是都要提示音
- //U.F.N.ISM = function (UDE) {
- // var i, _UCE = U.F.N.M, _UNT;
- // for (i = 0; i < UDE.length; i++) {
- // if (_UCE.indexOf((_UNT = (UDE[i].MessageID || UDE[i].GroupManageID))) == -1) { U.F.SFM(); _UCE.push(_UNT); }
- // }
- //}
- ////好友提示音
- //U.F.SFM = function () {
- // try { $("*U_MP_MPFlash")[0].loadNew("/img/消息提示音/MP3剪切-Msn短信提示音.mp3"); } //播放音乐
- // catch (e) { $("#UseStudioU_MP").addAttrArray({ "style": { "display": "block", "left": "-1000px"} }); window.setTimeout(U.F.SFM, 500); } //提示音
- //}
- ////移除消息
- //U.F.N.SM = function (UDE) {
- // var _UCE = U.F.N.M, i = _UCE.indexOf((UDE.MessageID || UDE.GroupManageID)); (UDE > -1) && (U.F.N.M.splice(i, 1));
- //}
- ////移除所有的消息
- //U.F.N.YCSM = function () {
- // // $("#UF_UP_UCNewsRecord")[0].innerText = $("#UD_HF_NewMessage")[0].innerText = $("#Friend_Count").innerText = "";
- //}
- ////群窗口拖动后iframe调整
- //U.F.A.GIframeAutoHight = function (UDOD) {
- // var _UE = U.M.GetElementInfo(UDOD), _UDTD = $("div#UF_GW_CE", UDOD)[0], _UDSD = $("div#UF_GW_C", UDOD)[0], _UDGD = $("div#GainFormation", UDOD)[0], _UDHD = $("div#UF_GW_user", UDOD)[0], _UDID = $("div#UF_GW_Context", UDOD)[0], _UDJD = $("div#SendMessageImg", UDOD)[0];
- // //头部内容
- // _UDHD.style.width = _UE["CW"] - 92 + "px";
- // //中间
- // _UDID.style.width = _UE["CW"] - _UDSD.offsetWidth + "px";
- // _UDGD.style.height = _UDSD.style.height = _UE["CH"] - 122 + "px";
- // _UDTD.style.width = _UE["CW"] - _UDSD.offsetWidth - _UDGD.offsetWidth + "px";
- // $("div", _UDTD)[0].style.height = _UE["CH"] - 240 + "px";
- // //发送框
- // _UDJD.parentNode.style.width = _UE["CW"] - 22 + "px";
- // _UDJD.style.marginLeft = _UE["CW"] - 60 + "px";
- //}
- ////-----------------------------------------------------------------------加群的方法----------------------------------------------------------------------------------
- ////判断好友是否加入该群
- //U.F.J.AFG = function (UGID, UGMN) {
- // if (!U.U.L.LARG()) {
- // if (_$(US.Friend[2]).Select({ "GroupManageID": UGID })[0]) { U.Alert("你已经加入群" + UGMN + "了"); } //如果用户已经加入了该群 就返回
- // else { U.UI.Confirm("确认要加入群" + UGMN + "吗", [U.F.J.AFGT, [UGID, UGMN]], ""); }
- // }
- //}
- ////确定添加进入群
- //U.F.J.AFGT = function (UGID, UGMN) {
- // U.Alert("和云端同步中"); U.A.Request(US.Auth,"UseStudioManage.AddToGroupMessageStatus", [UGID, US.userInfo.userid, UGMN], U.M.apply(this, "U.Alert('等待回应')"), [""]);
- //}
- ////----------------------------------------------------------------------------添加其他用户进入群
- ////添加人进入群
- //U.F.J.AUG = function (UFNM) {
- // var _UGED = _$(US.Friend[2]).Select({ "GroupManageID": UFNM.MessageContent })[0]; //获取好友的群名
- // if (_$(US.Friend[3]).Select({ "GroupManageID": UFNM.MessageContent, "UserId": UFNM.MessageSendUserID })[0]) { U.Alert(UFNM.UserNickName + "加入" + _UGED.GroupManageName + "群了"); U.A.Request(US.Auth,"UseStudioManage.canceluseraddtogrouprequest", [US.userInfo.userid, UFNM.MessageID], U.M.apply(), [""]); }
- // else { U.UI.Confirm("您确认要添加" + UFNM.UserNickName + "进" + _UGED.GroupManageName + "群吗?", [U.F.J.AUGT, [UFNM, _UGED, true]], [U.A.Request, [US.Auth,"UseStudioManage.canceluseraddtogrouprequest", [US.userInfo.userid, UFNM.MessageID], U.M.apply(), [""]])]; }
- //}
- ////添加用户进入指定的群
- //U.F.J.AUGT = function (UFNM, UGED, TF) {
- // var _UDOD = $("#" + UFNM.GroupManageID + "Content")[0], _userid = UFNM.UserId || UFNM.MessageSendUserID, _UGID = UFNM.GroupManageID || UFNM.MessageContent || UFNM.GroupManageID;
- // if (!_$(US.Friend[3]).Select({ "GroupManageID": _UGID, "UserId": _userid })[0]) { US.Friend[3].push(new U.F.T.GroupUserEntity[_userid, U.M.GetImgU(UFNM.UserImageHead), UFNM.UserNickName || UFNM.UserName, UFNM.UserName, U.M.GetImgU(UFNM.UserThumbnailImageHead), UFNM.GroupUsersDescript || UFNM.UserNickName, _UGID, 1]); } //添加好友
- // if (TF) { U.A.Request(US.Auth,"UseStudioManage.AddUsrsToGroup", [US.userInfo.userid, UFNM.MessageID, UFNM.MessageSendUserID, UFNM.MessageContent, U.MS.produceGuid(), UFNM.GroupManageName]), U.M.apply(this, [[U.A.Request, [US.Auth,"UseStudioManage.canceluseraddtogrouprequest", [US.userInfo.userid, UFNM.MessageID], U.M.apply(), [""]])]], [""]; } //发送确定用户进入群消息
- // if (_UDOD) { U.F.DisplayGroupMembers(UFNM.GroupManageID, _UDOD); } //从新加载群好友
- //}
- ////-------------------------------------------------------------------------用户成功给加入群
- ////成功进入群
- //U.F.J.AG = function (UDFE) {
- // U.UI.Confirm("你已经被" + UDFE.UserNickName + "拉入" + UDFE.MessageDescript + "群"); //提示
- // U.A.Request(US.Auth,"UseStudioManage.canceluseraddtogrouprequest", [US.userInfo.userid, UDFE.MessageID], U.M.apply(), [""]); //删除群消息
- // if (_$(US.Friend[2]).Select({ "GroupManageID": UDFE.MessageContent })[0] == null) {//如果群不存在
- // U.A.Request(US.Auth,"UseStudioDisk.GetGF", [UDFE.MessageContent], U.F.J.DL, []); //获取去网盘的值
- // U.A.Request(US.Auth,"UseStudioManage._gaingroupandgroupallfriend", [UDFE.MessageContent], U.F.J.AsynAG, ["", UDFE]); //获取好友群消息
- // }
- //}
- ////获取群网盘文件异步
- //U.F.J.DL = function (r) {
- // var context = r.context;
- // r = r.value; //获取的群网盘的值
- // US.Disk.Disks[US.userInfo.userid].push(r); //
- //}
- ////用户成功加入群后
- //U.F.J.AsynAG = function (r) {
- // var i, _UGE, _UDOD, context = r.context, _UGFD = context[1]; r = r.value;
- // if (r && r.length > 0) {
- // US.Friend[2].push((_UGE = new U.F.T.GroupEntity[_UGFD.MessageContent.toLocaleLowerCase(), _UGFD.MessageDescript, r[0].GroupManageCreateDate, _UGFD.MessageSendUserID, US.NU, "", null])); //添加
- // for (i = 0; i < r.length; i++) { if (!_$(US.Friend[3]).Select({ "GroupManageID": r[i].GroupManageID || r[i].MessageContent, "UserId": r[i].UserId || r[i].MessageSendUserID })[0]) { US.Friend[3].push(new U.F.T.GroupUserEntity[r[i].UserId || r[i].MessageSendUserID, U.M.GetImgU(r[i].UserImageHead), r[i].UserNickName || r[i].UserName, r[i].UserName, U.M.GetImgU(r[i].UserThumbnailImageHead), r[i].GroupUsersDescript || r[i].UserNickName, r[i].GroupManageID || r[i].MessageContent, 1]); } } //添加好友
- // (!(_UDOD = $("#GroupclassPanel_" + _UGE.GroupManageID)[0])) && (U.F.PGroup(_UGE, $("#UF_UP_GroupBoard")[0], _$(US.Friend[3]).Select({ "GroupManageID": _UGE.GroupManageID }))); $("#UD_SYHZLT").Child()[1].onclick(); //群分组打印
- // }
- //}
- ////-----------------------------------------------------------------------------添加好友的方法-------------------------------------------------------------------------
- ////添加新的好友
- //U.F.J.ANF = function (UIF, TF) {
- // if (!U.U.L.LARG()) {
- // if (UIF.UserId != US.userInfo.userid) { //判断是否是加自己为好友 如果是就不允许
- // var _UDOD = $("#addnewFriendsGroup")[0], _UDCD = $("#FriendSystemContent")[0], _UDFE = _$(US.Friend[1]).Select({ "UserId": UIF.UserId }, null, 1)[0]; //获取好友实体
- // if (_UDFE == null) {
- // $("img", _UDOD).addAttrArray({ "onerror": U.M.ImgError, "src": U.M.GetImgU(UIF.UserThumbnailImageHead)}, 0); $("div", _UDOD)[3].innerHTML = UIF.UserNickName || UIF.UserName; //设置被添加的用户名
- // _UDCD.innerHTML = ""; U.F.J.SA(TF, UIF.UserId, _UDCD); U.F.J.LG(UIF, _UDCD); U.D.PopupWindow(_UDOD); //U.M.StopBubble(); U.D.R.DesktopLeftClick();//显示添加好友分组
- // }
- // (_UDFE || TF == "padd") && (U.A.Request(US.Auth,"UseStudioManage.canceluseraddtogrouprequest", [UIF.MessageID], U.M.apply(), [""]), (_UDFE) && (U.F.W.DMW(_UDFE)))//清除好友提示消息同时
- // }
- // else { U.Alert("无法添加自己为好友"); }
- // }
- //}
- ////添加好友和被添加好友切换
- //U.F.J.SA = function (TF, userid, UDOD) {
- // var i, _UDE = [["div", "AddUser_Remind"], ["div", "RemindFriendTitle"], ["a", "AddUser_Yes"], ["a", "AddUser_NO"]], _UTF = TF == "add" ? ["添加好友", "(添加好友)", "确定", "取消"] : ["对方要求添加好友", "(对方要求添加好友)", "同意", "不同意"];
- // for (i = 0; i < _UDE.legnth; i++) { $(_UDE[i][0] + "#" + _UDE[i][1], UDOD)[0].innerHTML = _UTF[i]; }
- //}
- ////-----------------------------------------------------------------发送消息
- ////统一发送群和好友消息
- //U.F.FM.SGM = function (UDOD, UTID, TF) {
- // var _UDED = $("div@contentEditable=true", UDOD)[0];
- // U.F.FM.SMT(UTID, _UDED.innerHTML, "", TF); U.F.FM.SMS(UTID, UDOD, _UDED); //(!TF) && (U.F.FM.SLF(UTID));
- //}
- ////统一消息提交
- //U.F.FM.SMS = function (UTID, UDOD, UDED) {
- // var _UDCD = $("div#Content" + UTID, UDOD)[0]; //多窗口id
- // U.F.FM.SFGM(UDED, _UDCD); //发送消息的规范
- // _UDCD.scrollTop = _UDCD.scrollHeight - _UDCD.offsetHeight; //滚动条置低
- //}
- ////聊天消息的打印
- //U.F.FM.PGM = function (UFMM, UFDD) {
- // for (var i = 0; i < UFMM.length; i++) { U.F.FM.PSNS(UFMM[i].GroupMessageSendUsername || UFMM[i].MessageDescript, U.MT.formatDateToArray(UFMM[i].GroupMessageSendTime || UFMM[i].MessageSendTime), UFMM[i].GroupMessageContent || UFMM[i].MessageContent, UFDD); }
- // UFDD.scrollTop = UFDD.scrollHeight - UFDD.offsetHeight;
- //}
- ////------------------------------------------------------------查看消息
- ////查看聊天 好友或者群
- //U.F.FM.SMT = function (UTID, UFGM, UFN, TF) {
- // var _UDE = TF ? ["GetGroupMessageServiceStatus", "addgroupmessage"] : ["GetMessageServiceStatus", "addmessage"];
- // if (UFGM == "") { U.A.Request(US.Auth,"UseStudioManage." + _UDE[0], [US.userInfo.userid, UTID], (UFN || U.F.FM.AsynSMT), ["", UTID, TF]); } //获取聊天
- // else { U.A.Request(US.Auth,"UseStudioManage." + _UDE[1], [US.userInfo.userid, US.userInfo.UserNickName || US.userInfo.username, UTID, UFGM]), U.M.apply(), [""]; (!_TF) && (U.F.FM.SLF(UTID)); } //发送聊天消息
- //}
- ////获取多窗口消息回调函数。
- //U.F.FM.AsynSMT = function (r) {
- // var context = r.context, _UTID = context[1], _TF = context[2], _UDOD = $("#Content" + _UTID)[0]; r = r.value;
- // if (r && r.length) { U.F.FM.PGM(r, _UDOD); }
- //}
- ////-----------------------------------------------------------聊天记录
- ////群(好友)聊天记录查询
- //U.F.FM.GSH = function (UTID, UDOD, P, TF) {
- // var _E = P * 20, _S = _E - 20, _UTF = TF ? "GetGroupMessage" : "allrecord";
- // U.A.Request(US.Auth,"UseStudioManage." + _UTF, [UTID, _S, _E], U.F.FM.AsynGSH, ["", UDOD, UTID, P, TF]);
- //}
- ////群(好友)聊天记录查询异步
- //U.F.FM.AsynGSH = function (r) {
- // var context = r.context, _UDOD = context[1], _UDPD = $("div#UF_FW_Chatrecord", _UDOD)[0]; r = r.value;
- // if (r) {
- // _UDPD.innerText = ""; U.F.FM.PGM(r, _UDPD); //打印聊天记录内容
- // U.F.FM.GMP(_UDOD, r.length == 0 ? 0 : r[0].AllC, context[2], context[3], context[4]); //分页
- // }
- //}
- ////这个是历史记录分页样式
- //U.F.FM.GMP = function (UDOD, UCN, UTID, P, TF) {
- // var _UTF = TF ? "UF_GW_Message" : "UF_FW_Message", _UDMD = $("div#" + _UTF, UDOD)[0]; _UDMD.innerHTML = "";
- // U.PG.PPage(_UDMD, UCN, P, 20, { "fun": [[U.F.FM.GSH, [UTID, UDOD, P, TF]]], "page": [2] }); //分页样式
- //}
- ////-------------------好友消息区域--------------------------------------------------------------------------------------------
- //U.F.W.WA = []; //好友聊天框
- ////创建好友窗体
- //U.F.W.DMW = function (UIF) {
- // if (!U.U.L.LARG() && UIF.UserId != US.userInfo.userid) {
- // var _TF, _UDOD = U.F.T.IW(UIF.UserId);
- // if (_UDOD) { U.F.W.CMW(_UDOD, _UDOD.parentNode); } //直接切换到指定的
- // else {
- // _UDOD = U.F.T.FW(UIF.UserId); (!_UDOD) && (_UDOD = U.F.W.CBW(U.F.W.WA.length), _TF = true); //获取主窗体
- // U.F.W.CSMW(UIF, _UDOD); U.D.SetDTop(_UDOD); //创建子窗体
- // (_TF) && (U.D.Tb.WindowRestore(_UDOD, null, "1个会话", U.M.apply(this, [[U.F.W.CWML, [_UDOD]]]), "remove")); //创建任务栏链接
- // U.F.FM.SMT(UIF.UserId, "", ""); //获取聊天消息
- // }
- // }
- //}
- ////创建窗体
- //U.F.W.CBW = function (UL) {
- // var _UDOD = $("#usestudiomessagediv")[0].cloneNode(true); _UDOD.id = ""; _UDOD.ChildrenWindow = [];
- // U.F.W.WA.push(_UDOD); document.body.appendChild(_UDOD); return _UDOD;
- //}
- ////窗口的子元素的创建
- //U.F.W.CSMW = function (UIF, UDOD) {
- // var _UDSD, _UDED, _UDFD, _UDGD, _UDHD, _UDND, _UDRD, _UDMD, _UDID, _UDUD, _UDBD, _UTF, _UDYD = $("div#UF_FW_Content", UDOD)[0], _UDTD = _UDYD.cloneNode(true);
- // $(_UDTD).addAttrArray({ "id": "UF_FW_Content" + UIF.UserId, "style": { "display": "block"} });
- // //用户个性签名
- // _UDSD = $("div#UF_FW_windowfont", _UDTD)[0];
- // _UDED = $$("div", { "id": "UF_FW_oneChating" + UIF.UserId, "className": "UF_FW_oneChating" }, _UDSD);
- // _UDFD = $$("div", { "className": "UF_FW_os UF_FW_userHeadBack" }, _UDED);
- // $$("img", { "onerror": U.M.ImgError, "src": U.M.GetImgU(UIF.UserThumbnailImageHead), "alt": "", "onclick": [[U.M.StopBubble], [parent.U.U.I.POUW, [UIF.UserId]]], "onmousedown": [U.M.StopBubble] }, _UDFD);
- // _UDGD = $$("div", { "style": { "cssText": "width: 100%; padding-top: 10px;max-width: 345px; paddingtop: 10px; float: left;"} }, _UDED);
- // $$("div", { "style": { "float": "left", "color": "#efefef", "fontSize": "130%" }, "innerHTML": UIF.UserNickName }, _UDGD);
- // $$("div", { "className": "UF_FW_os UF_FW_signIcon" }, _UDGD);
- // $$("div", { "className": "UF_FW_sign", "innerHTML": UIF.UserIndividualitysignature || "" }, _UDGD);
- // //用户聊天区域
- // _UDHD = $("div#UF_FW_windowcontent", _UDTD)[0];
- // _UDND = $$("div", { "style": { "width": "100%", "height": "100%"} }, _UDHD);
- // $$("div", { "id": "Content" + UIF.UserId, "className": "", "style": { "height": (UDOD.clientHeight == 0 ? 412 : UDOD.clientHeight) - 229 + "px", "width": "100%", "backgroundColor": "White", "overflowY": "auto", "overflowX": "hidden"} }, _UDND);
- // _UDRD = $$("div", { "id": "ChattingRichEditorDiv" + UIF.UserId, "style": { "width": "100%", "height": "112px"} }, _UDND);
- // U.D.E.RichEditor(_UDRD, 430, 82, true); //生成一个iframe聊天框
- // _UDMD = $("div@contentEditable=true", _UDRD).addAttrArray({ "onkeypress": [[U.M.returnkeylogin, [null, (_UTF = [[U.F.FM.SGM, [_UDND, UIF.UserId]], [U.F.FM.SEB, ["this"]]])]]] });
- // _UDID = $("div#SendMessageImg", UDOD).addAttrArray({ "onclick": _UTF })[0];
- // $("div#messagenote", _UDRD)[0].onclick = U.M.apply(this, [[U.F.W.CDC, [UIF.UserId, _UDTD]]]);
- // _UDUD = $("div#UF_FW_user", UDOD)[0];
- // _UDBD = $$("div", { "id": "UF_ChattingUser" + UIF.UserId, "className": "UF_FW_os UF_FW_userState", "onmousedown": U.M.StopBubble, "onclick": [[U.M.StopBubble], [U.F.W.CMW, [_UDTD, UDOD]]] }, _UDUD);
- // $$("div", { "className": "UF_FW_os " + UIF.IsLogin == 0 ? "UF_FW_StateBackG" : "UF_FW_LoginStateBackG" }, _UDBD);
- // $$("div", { "className": "UF_FW_userName", "innerHTML": UIF.UserNickName }, _UDBD);
- // $$("div", { "className": "UF_FW_os UF_FW_CloseButton", "onclick": [[U.M.StopBubble], [U.F.W.CML, [UIF.UserId, UDOD, _UDBD]]], "onmousedown": [U.M.StopBubble] }, _UDBD); //阻止冒泡
- // _UDYD.parentNode.insertBefore(_UDTD, _UDYD); UDOD.ChildrenWindow.push(_UDTD); U.D.Tb.changeRestoreName(UIF.UserId, UDOD.ChildrenWindow.length + 1 + '个对话'); //修改任务栏名
- // U.D.PopupWindow(UDOD); U.F.W.CMW(_UDTD, UDOD); //显示
- //}
- ////聊天窗口顶部标签的切换
- //U.F.W.CMW = function (UDOD, UDPD) {
- // var i, _userid = UDOD.id.substr(13), _UDE = UDPD.ChildrenWindow;
- // for (i = 0; i < _UDE.length; i++) { (_UDE[i] != UDOD) && (_UDE[i].style.display = "none"); }
- // UDOD.style.display = "block"; UDOD.scrollTop = UDOD.scrollHeight - UDOD.offsetHeight; //显示同时滚动条到最下面
- // $("div#SendMessageImg", UDPD)[0].onclick = U.M.apply(this, [[U.F.FM.SGM, ([$("div#ChattingRichEditorDiv" + _userid, UDPD)[0].parentNode, _userid])]]); //点击发送消息事件
- // U.F.A.IframeAutoHight(UDPD); $("div@contentEditable=true", UDOD)[0].focus(); //调制好友框 同时聚焦
- //}
- ////关闭一个用户的聊天窗口
- //U.F.W.CML = function (userid, UDOD, UDTD) {
- // var i, _UDCE, _UDAE, _UDE = UDOD.ChildrenWindow;
- // if (_UDE.length == 1) { U.F.W.CWML(UDOD); }
- // else {
- // for (i = 0; i < _UDE.length; i++) {
- // if ((_UDCE = _UDE[i]) && _UDCE.id.indexOf(userid) > -1) {
- // _UDCE.parentNode.removeChild(_UDCE); UDTD.parentNode.removeChild(UDTD); _UDE.splice(i, 1);
- // _UDCE = _UDE[i]; (!_UDCE) && (_UDCE = _UDE[i - 1]); U.F.W.CMW(_UDCE, UDOD); //切换
- // U.D.Tb.changeRestoreName(UDOD.id, UDOD.ChildrenWindow.length + '个对话'); return;
- // }
- // }
- // }
- //}
- ////关闭窗体
- //U.F.W.CWML = function (UDOD) {
- // U.F.T.DW(UDOD); (UDOD.parentNode) && (U.D.Tb.PopupWinClose(UDOD, "remove"));
- //}
- ////删除窗体
- //U.F.T.DW = function (UDOD) {
- // var _UDE = U.F.W.WA, ITF = _UDE.indexOf(UDOD);
- // (ITF > -1) && (_UDE.splice(ITF, 1));
- //}
- ////查找窗体里是否有该窗体
- //U.F.T.FW = function (userid) {
- // var i, _UDE = U.F.W.WA;
- // for (i = 0; i < _UDE.length; i++) { if (_UDE[i].ChildrenWindow.length < 3) { return _UDE[i]; } }
- //}
- ////判断窗体是否存在
- //U.F.T.IW = function (userid) {
- // var i, _UCE, _UDE = U.F.W.WA;
- // for (i = 0; i < _UDE.length; i++) { if (_UCE = _$(_UDE[i].ChildrenWindow).Like({ "id": userid })[0]) { return _UCE; } }
- //}
- ////-----------------------------------------------------------------------------好友聊天和群聊天显示------------------------------------------------------------------
- ////聊天记录窗口显示和隐藏
- //U.F.W.CDC = function (userid, UDOD, UGID) {
- // var _UDTD, _UDSD, _TF = "none", _UE = $(UDOD).GetElementInfo();
- // if (userid) {
- // _UDTD = $("div#UF_FW_C", UDOD)[0];
- // if (_UDTD.style.display == "none") { _TF = "block"; }
- // _UDTD.style.display = _TF; U.F.A.IframeAutoHight(UDOD.parentNode);
- // }
- // else {
- // _UDTD = $("div#UF_GW_C", UDOD)[0];
- // _TF = _UDTD.style.display == "none" ? ["block", "none", 695] : ["none", "block", 527];
- // _UDTD.style.display = _TF[0]; $("div#GainFormation", UDOD)[0].style.display = _TF[1]; UDOD.style.minWidth = _TF[2] + "px";
- // U.F.A.GIframeAutoHight(UDOD);
- // }
- // U.F.FM.GSH(userid || UGID, _UDTD, 1, userid ? false : true);
- //}
- ////--------------------------------------------------------------------------群窗口初始化-----------------------------------------------------------------------------
- //U.F.W.GNF = []; //这是为了判断群上下线的全局
- //U.F.W.DGMW = function (UGE) {
- // var _UDSD, _UDID, _UDED, _UDTD = _$(U.F.W.GNF).Select({ "id": UGE.GroupManageID }, null, 1)[0];
- // if (_UDTD) { _UDTD.style.display = "block"; U.D.SetDTop(_UDTD); }
- // else {
- // _UDTD = $("#usestudioGroupmessagediv")[0].cloneNode(true); _UDTD.id = UGE.GroupManageID;
- // _UDSD = $("div#GroupChattingRichEditor", _UDTD)[0]; U.D.E.RichEditor(_UDSD, 453, 94, true);
- // _UDED = $("div@contentEditable=true", _UDSD).addAttrArray({ "onkeypress": [[U.M.returnkeylogin, [null, [[U.F.FM.SGM, [_UDTD, UGE.GroupManageID, true]], [U.F.FM.SEB, ["this"]]]]]] })[0];
- // _UDID = $("div#SendMessageImg", _UDTD).addAttrArray({ "onclick": [[U.F.FM.SGM, [_UDTD, UGE.GroupManageID, true]]] })[0]
- // $("div#Content", _UDTD)[0].id = "Content" + UGE.GroupManageID; $("span#usestudiomessagedivtitle", _UDTD)[0].innerHTML = UGE.GroupManageName;
- // $("div#UF_GW_DescInfodiv", _UDTD)[0].innerHTML = UGE.GroupManageDescript; $("div#messagenote", _UDTD)[0].onclick = U.M.apply(this, [[U.F.W.CDC, ["", _UDTD, UGE.GroupManageID]]]);
- // U.F.DisplayGroupMembers(UGE.GroupManageID, $("div#UF_GW_MembersDiv", _UDTD)[0]); //打印群成员
- // U.F.FM.SEB(_UDED, _UDID); U.D.Tb.WindowRestore(_UDTD, null, UGE.GroupManageName + "[群]");
- // U.F.W.GNF.push(_UDTD); U.F.FM.SMT(UGE.GroupManageID, "", "", true); $("body")[0].appendChild(_UDTD);
- // U.D.PopupWindow(_UDTD); _UDED.focus();
- // }
- //}
- ////点击关闭群
- //U.F.W.CDGMW = function (UDOD) {
- // U.D.Tb.PopupWinClose(UDOD, "remove");
- // _$(U.F.W.GNF).Delete({ "id": UDOD.id });
- //}
- ////------------------------------------------------------------------------好友聊天和群聊天辅助函数-------------------------------------------------------------------
- ////聊天body的style
- //U.F.FM.SEB = function (UDOD) {
- // var _E = event; if (_E.ctrlKey && _E.keyCode == 10) { U.D.E.GetSelectionRange(window, UDOD, { "TF": "QL" }).CTHH(); }
- //}
- ////编辑器显示显示图片
- //U.F.FM.SUIMG = function (UDOD) {
- // U.M.ImageZoom(UDOD, { "height": "80" }); UDOD.onload = null;
- //}
- ////-------------------------------------------------------------------------好友辅助函数
- ////发送消息生成最近好友
- //U.F.FM.SLF = function (userid) {
- // U.F.FM.ALMG(_$(US.Friend[1]).Select({ "UserId": userid }, null, 1)[0] || _$(US.Friend[4]).Select({ "UserId": userid }, null, 1)[0]); //生成最近联系人
- //}
- ////第一是想好友发送消息 还有就是别人对你发送消息
- //U.F.FM.ALMG = function (UIF) {
- // if (UIF) {
- // var _TF = US.Friend[4].indexOf(UIF.UserId, "UserId"); //从最近联系人的获取
- // if (_TF > -1) { US.Friend[4].unshift(US.Friend[4].splice(_TF, 1)[0]); } //最近联系人重排
- // else { US.Friend[4].unshift(new U.F.T.RecentContactsEntity[UIF.UserId, UIF.UserName, UIF.UserImageHead, UIF.UserNickName, UIF.UserThumbnailImageHead, UIF.maxMessageSendTime || U.MT.formatDateToArray(), UIF.FriendsDescript, UIF.UserIndividualitysignature, UIF.IsLogin]); } //添加新好友到最近联系人里
- // U.F.linkmantabulation($("#UF_UP_ChatRecord")[0]); //前台直接让最近联系人从新排列一次
- // }
- //}
- ////----------------------------------------------------------------------------生成消息样式---------------------------------------------------------------------------
- ////发送消息的规范
- //U.F.FM.SFGM = function (UDOD, UDPD) {
- // var i, UDE = [["*", { "style": { "position": "static"}}], ["img", { "onclick": "U.M.apply(this, [[parent.U.Img.Create, ([{ 'Thm': Element.src, 'Img': Element.src}])]])"}]];
- // for (i = 0; i < UDE.length; i++) { U.M.SetElement(UDOD, UDE[i][0], UDE[i][1]); }
- // U.F.FM.PSNS(US.userInfo.UserNickName, U.MT.formatDateToArray(), UDOD.innerHTML, UDPD, true); UDOD.innerHTML = ""; //打印消息
- //}
- ////发送消息和接受消息的样式
- //U.F.FM.PSNS = function (UN, UST, UCN, UDOD, UISU) {
- // UISU = UISU ? "#0000CC" : "#0193CE";
- // var _UDTD = $$("div", { "style": { "textIndent": "10px", "marginTop": "10px"} }, UDOD);
- // $$("span", { "style": { "color": UISU }, "innerHTML": UN + " " + UST }, _UDTD);
- // $$("div", { "style": { "cssText": "color:black; padding-left: 5px; padding-top: 5px;" }, "innerHTML": UCN }, _UDTD);
- //}
- ////好友分组显示
- //U.F.J.LG = function (UIF, UDOD) {
- // var i, _UDE = US.Friend[0];
- // for (i = 0; i < _UDE.length; i++) { $$("div", { "onclick": [[U.F.J.AFIC, [UDOD.parentNode.parentNode, UIF, _UDE[i].FriendsGroupID]]], "className": "AddFriendGroupDivs", "innerHTML": _UDE[i].FriendsGroupName }, UDOD); }
- //}
- ////确定添加好友到分组里 且把好友添加到树里
- //U.F.J.AFIC = function (UDOD, UIF, UGID) {
- // U.UI.Confirm("确认添加到此分组吗?", [U.F.J.AFICT, [UDOD, UIF, UGID]], ""); U.F.J.DFW(UDOD);
- //}
- ////确定添加好友进入好友分组
- //U.F.J.AFICT = function (UDOD, UIF, UGID) {
- // var _UFID = U.MS.produceGuid();
- // U.A.Request(US.Auth,"UseStudioManage.AddFriend", [US.userInfo.userid, UIF.UserId, _UFID, UGID, UIF.UserNickName || UIF.UserName]), U.F.J.AsynAFIC, ["", UIF, UGID, _UFID]; //发送添加好友的请求
- //}
- ////添加用户异步回调
- //U.F.J.AsynAFIC = function (r) {
- // var _UST, _UFE, context = r.context, _UIF = context[1], _UN = _UIF.FriendsDescript || _UIF.UserNickName || _UIF.UserName; r = r.value;
- // if ((_UST = r[1])) {
- // _UFE = new U.F.T.FriendEntity[_UIF.UserIndividualitysignature, _UIF.UserId, U.M.GetImgU(_UIF.UserThumbnailImageHead), US.fs + _UIF.UserThumbnailImageHead, _UN, _UN, context[3], _UN, context[2], _UST == "True" ? 1 : 0]; //创建用户实体
- // (r[0][0]) && (_$(_UFE).Add(r[0][0])); US.Friend[1].push(_UFE); (_$(US.Friend[1]).Reset({ "IsLogin": 1 })); U.F.refreshFriends(); U.F.W.DMW(context[1]); //添加好友 同时聊天
- // }
- //}
- ////点击同意滑出好友分组选择
- //U.F.J.FW = function (UDOD) {
- // var _UXL = 134, _UDL, _UDTD = $("#UF_DM_AFSWindow"), _UL = UDOD.offsetLeft, _UW = UDOD.offsetWidth; US.Width > _UL + _UW + _UXL ? (_UDL = _UL + _UW - _UXL) : (_UDL = _UL, _UXL = -_UXL);
- // _UDTD.addAttrArray({ "style": { "display": "block", "zIndex": UDOD.style.zIndex, "top": UDOD.offsetTop + 11 + "px", "left": _UDL + "px"} }).animate({ "left": _UDL + _UXL + "px" }, 200);
- //}
- ////点击不同意隐藏窗体
- //U.F.J.DFW = function (UDOD) {
- // $("#UF_DM_AFSWindow")[0].style.display = $("#addnewFriendsGroup")[0].style.display = UDOD.style.display = "none";
- //}
- ////----------------------------------------------------------------搜索网络好友--------------------------------------------------------------
- //U.F.S.TF = { "P": 0 }; //全局变量
- ////这里是点击查找的是后触发的函数。。
- //U.F.S.WC = function (ITF) {
- // var _UDOD = $("#UF_S_Div")[0];
- // U.D.PopupWindow(_UDOD); U.D.Tb.WindowRestore(_UDOD, null, "查找好友"); //显示和添加
- // $("div", _UDOD)[ITF == null ? 4 : ITF].onclick();
- //}
- ////所有用户 群 在线好友的搜索
- //U.F.S.S = function (UTK, USN, UPN) {
- // var _UE = UPN * 8, _US = _UE - 7, _UDOD = $("#UF_S_SR")[0], _userid = US.userInfo.userid || US.NU; U.F.S.TF["P"] = USN || U.F.S.TF["P"], _UDE = ["SelectUserByKeyWord", "bygroupnameselsectgroup", "HasNGetF"], _UV = [UTK, _US, _UE];
- // (U.F.S.TF["P"] == 1) && (_UV.splice(0, 0, _userid)); U.A.Request(US.Auth,"UseStudioManage." + _UDE[U.F.S.TF["P"] - 1], (_UV), U.F.S.PSUG, [_UDOD, U.F.S.TF["P"], UTK, UPN]);
- //}
- ////搜索完后的样式打印
- //U.F.S.PSUG = function (r) {
- // var context = r.context, _UDOD = context[0], _UDTD = $("#U_F_S_Pag")[0], _USN = context[1], _UTK = context[2], _P = context[3]; r = r.value; _UDTD.innerText = _UDOD.innerText = "";
- // if (r) {
- // if (r.length) {
- // U.PG.PPage(_UDTD, r[0]["DCount"] || r[1], _P, 8, { "fun": [[U.F.S.S, [_UTK, _USN, _P]]], "page": [2] }); //分页样式
- // U.F.S.SF(_USN == 3 ? r[0] : r, _USN, _UDOD); //打印出用户
- // }
- // else { U.Alert("搜索无结果"); }
- // }
- //}
- ////这里时点击搜索后的函数
- //U.F.S.SF = function (UDE, USN, UDOD) {
- // var i, _UFE, _UVE = [];
- // for (i = 0; i < UDE.length; i++) { _UFE = UDE[i]; _UVE.push((USN == 2 ? { "UserName": _UFE.GroupManageName, "UserTotal": "这群主有点懒,什么也没写", "TA": _UFE.GroupUserCount + "个成员", "Sex": "", "Address": U.MT.formatDateToArray(_UFE.GroupManageCreateDate), "ImageHead": US.ms + "img/chatgroup.png", "AF": [[U.M.StopBubble], [U.F.J.AFG, [_UFE.GroupManageID, _UFE.GroupManageName]]], "MF": [[U.M.StopBubble], [U.F.S.DGI, [_UFE]]]} : { "UserName": _UFE.UserNickName, "Age": _UFE.Birthday ? U.MT.getYearMonthDay(new Date(), "Array")[0] - U.MT.getYearMonthDay(_UFE.Birthday, "Array")[0] : "0", "UserTotal": (_UFE.UserTatolNum || "-") + "个共同好友", "Sex": _UFE.UserSex == 1 ? "-576px -30px" : "-576px -8px", "Address": _UFE.Country || "-", "IsLogin": _UFE.IsLogin == false ? 'filter:gray;-moz-opacity:.3;opacity:0.3;' : "", "ImageHead": U.M.GetImgU(_UFE.UserThumbnailImageHead), "AF": [[U.M.StopBubble], [U.F.J.ANF, [_UFE, "add"]]], "MF": [[U.M.StopBubble], [U.U.I.POUW, [_UFE.UserId]]] })); }
- // U.F.S.SS(UDOD, _UVE);
- //}
- ////创建搜索后用户的样式
- //U.F.S.SS = function (UDOD, UDE) {
- // var i, _UDTD, _UDSD, _UDGD, _UDND, _UDMD, _UDFD = $$("frag");
- // for (i = 0; i < UDE.length; i++) {
- // _UDTD = $$("div", { "className": "UF_SUT" }, _UDFD);
- // $$("img", { "onerror": U.M.ImgError, "src": UDE[i]["ImageHead"], "style": { "cssText": UDE[i]["IsLogin"] }, "className": "UF_SIMG", "onclick": UDE[i]["MF"] }, _UDTD);
- // _UDSD = $$("div", { "style": { "cssText": "float:left;width:90px;"} }, _UDTD);
- // $$("span", { "className": "UF_SUN", "innerHTML": UDE[i]["UserName"] }, _UDSD);
- // if (UDE[i]["TA"]) { $$("span", { "innerHTML": UDE[i]["TA"], "className": "UF_SUE", "style": { "whiteSpace": "normal"} }, _UDSD); }
- // else { _UDGD = $$("div", { "className": "UF_SOS UF_SUA" }, _UDTD); _UDND = $$("div", { "className": "UF_SAT" }, _UDGD); $$("div", { "className": "UF_SOS UF_SIC", "style": { "cssText": "background-position:" + UDE[i]["Sex"]} }, _UDND); $$("span", { "innerHTML": UDE[i]["Age"] }, _UDND); $$("div", { "className": "UF_SCT UTDF", "innerHTML": UDE[i]["Address"] }, _UDTD); $$("div", { "className": "UF_SMF", "innerHTML": UDE[i]["UserTotal"] }, _UDTD); }
- // _UDMD = $$("div", { "className": "UF_SDTN" }, _UDTD);
- // $$("div", { "className": "UF_SOS UF_SADTN", "onclick": UDE[i]["AF"] }, _UDMD);
- // }
- // UDOD.appendChild(_UDFD);
- //}
- ////点击查看群资料
- //U.F.S.DGI = function (UGE) {
- // var _UDAD, _UDOD = $("#GroupInfo_" + UGE.GroupManageID)[0];
- // if (_UDOD) { U.D.PopupWindow(_UDOD); }
- // else {
- // _UDOD = parent.$("#UF_GI_ALL")[0].cloneNode(true); //群消息div
- // _UDOD.id = "GroupInfo_" + FIF.GroupManageID; //群ID
- // _UDAD = $("div", _UDOD); _UDAD["UF_S_GroupPic"].style.backgroundImage = ""; _UDAD["UF_S_GroupName"].innerText = "群名称:" + UGE.GroupManageName; _UDAD["UF_S_Mgr"].innerText = "管理员:" + (UGE.UserNickName || UGE.UserName); _UDAD["UF_S_Mgr"].onclick = U.M.apply(this, [[U.M.StopBubble], [U.U.I.POUW, [UGE.GroupManageCreateUserID]]]); _UDAD["UF_S_GroupSummary"].innerText = "群简介:" + "这群主有点懒,什么也没写"; _UDAD["UF_S_PeopleCount"].innerText = "成员数量:" + UGE.GroupUserCount + "人"; _UDAD["UF_S_CreateTime"].innerText = "创建时间:" + U.MT.formatDateToArray(UGE.GroupManageCreateDate); _UDAD["UF_GI_JoinGroup"].onclick = U.M.apply(this, [[U.F.J.AFG, [UGE.GroupManageID, UGE.GroupManageName]]]);
- // }
- //}
- ////----------------------------------------------------------------------本地好友的搜索-----------------------------------------------------------------
- ////本地搜索的接口
- //U.F.S.FFS = function (UDOD) {
- // var _UDE, _UDTD = $("#UF_FC_FriendUserDiv").addAttrArray({ "innerHTML": "", "style": { "display": "none"} }), _UN = UDOD.value.removeP();
- // if (_UN != "") {
- // _UDE = _$(US.Friend[1]).Like({ "FriendsDescript": _UN, "UserNickName": _UN, "UserName": _UN });
- // (_UDE.length) && (U.F.S.DFFS(_UDE, _UDTD[0]), _UDTD[0].style.display = 'block');
- // }
- //}
- ////这里是搜索后用户
- //U.F.S.DFFS = function (UDE, UDOD) {
- // var i, _UDTD, _UDID = $("input", UDOD.parentNode)[0], _UDFD = $$("frag");
- // for (var i = 0; i < UDE.length; i++) {
- // _UDTD = $$("li", { "onclick": [[U.F.W.DMW, [UDE[i]]], [U.F.S.NFFS, [_UDID]]], "unselectable": "on" }, _UDFD);
- // $$("img", { "onerror": U.M.ImgError, "alt": UDE[i].UserName, "src": U.M.GetImgU(UDE[i].UserThumbnailImageHead), "unselectable": "on" }, _UDTD);
- // $$("a", { "innerHTML": UDE[i].FriendsDescript, "unselectable": "on" }, _UDTD)
- // }
- // UDOD.appendChild(_UDFD);
- //}
- ////隐藏好友搜索
- //U.F.S.NFFS = function (UDOD) {
- // (UDOD.value == "") && (UDOD.value = "请输入关键字");
- // $("#UF_FC_FriendUserDiv").addAttrArray({ "style": { "display": "none" }, "innerHTML": "" });
- //}
- ////-------------------------------------------------------------------------------辅助函数-----------------------------------------------------------------------------
- ////切换
- //U.F.S.DGGS = function (UDOD) {
- // var i, _UDAD = $("div", UDOD.parentNode); //获取变化
- // for (i = 0; i < _UDAD.length; i++) { (_UDAD[i] != UDOD) && (_UDAD[i].style.backgroundPositionY = "-61px"); }
- // UDOD.style.backgroundPositionY = "-2px";
- //}
- ////精确查找切换
- //U.F.S.JDS = function (UDOD) {
- // var i, _UTF, _UDAD = $("div", UDOD.parentNode), _UDE = [165, 135];
- // for (i = 0; i < 2; i++) { if (_UDAD[i] != UDOD) { _UTF = i; } else { _UTF = 1 - i; } _UDAD[i].style.backgroundPositionY = (-_UDE[_UTF]) + "px"; }
- //}
- /**
- * 发送消息生成最近好友
- * @param {string} 用户id
- */
- U.F.FM.SLF = function (userid) {
- var i, _UDE, _UFE = US.Friend; //好友数据集合
- for (i = 1; i < _UFE.length; i++) { //判断该用户是否在好友集合里
- if (((i !== 2) && (_UDE = _$(_UFE[i]).Select({ "UserId": userid })[0])) || (_UDE = _$(_UFE[i]).Select({ "GroupManageID": userid })[0])) { break; } //获取好友资料
- }
- (_UDE) && (U.F.FM.RecentContacts(_UDE)); //生成最近联系人
- }
- /**
- * 统一使用上传回调
- * @param {function} 上传统一回调函数
- */
- U.F.FM.SCTP = function (URE) {
- U.D.SY.ET["UL"]["FUP"].push(URE);
- }
- /**
- * 所有文件上传了发送信息
- * @param {object} 群或者用户信息
- * @param {element} 上传统一回调函数
- * @param {boolean} 判断消息
- ---------- true 获取群消息 或者发送 群消息
- ---------- flase 获取好友消息或者 获取好友消息
- * @param {string} 图片的小图
- * @param {string} 图片原图
- */
- U.F.FM.SendImageMessage = function (UGE, UDPD, UTF, USIM, UIMG) {
- var _UDOD = $$("div", {});
- USIM = U.M.GetImgU(USIM); //补全后的小图 http://fs.1473.cn/guid
- UIMG = U.M.GetImgU(UIMG); //补全后的原图 http://fs.1473.cn/guid.png
- $$("img", { "className": "UD_SYFCI", "src": USIM, "title": UIMG }, _UDOD).onclick = "U.M.StopBubble();U.D.Img.Img(US.userInfo, { 'Thm': '" + UIMG + "', 'Img': '" + UIMG + "'})"; //图片内容
- U.F.FM.SendFriendOrGroupChatMessage(UGE, _UDOD, UDPD, UTF, true); //发送内容发送生成样式
- }
- //打开好友聊天列表
- U.F.W.QHFM = function (el, UTF) {
- var _UDTD = $("div", el)[0],
- _UDCD = U.F.W.IsCreateForm("GFG"),
- _UDE = _UDCD["childs"];
- (UTF == "block") && (U.F.W.DYQHFM(_UDTD, _UDE.slice(4), _UDCD));
- _UDTD.style.display = UTF;
- }
- //打印聊天好友列表
- U.F.W.DYQHFM = function (el, friendinfo, UDPD) {
- var i, _UFE, _UDTD, _UDSD, _UDFD = $$("frag");
- el.innerText = "";
- for (i = 0; i < friendinfo.length; i++) {
- _UFE = friendinfo[i]["ET"][2];
- _UDTD = $$("div", { "className": "UD_SYFTGOO", "onclick": [[U.F.W.LDYQHFM, [friendinfo[i], UDPD["childs"], el]]] }, _UDFD);
- _UDSD = $$("div", { "className": "UD_SYFTGOOI" }, _UDTD);
- if (_UFE.UserId) { $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "src": U.M.GetImgU(_UFE.UserThumbnailImageHead), "alt": _UFE.UserNickName }, _UDSD); }
- else { U.F.PrintGroupHeadImage(_UFE, _UDSD, 4, [25, 25]); }
- $$("div", { "className": "UD_SYFTGOON UTDF", "innerHTML": _UFE.GroupManageName || _UFE.FriendsDescript || _UFE.UserNickName }, _UDTD);
- $$("div", { "className": "UD_SYFTOC UD_SYI", "onclick": [[U.F.W.DelteFriendChat, [(_UFE.GroupManageID || _UFE.UserId), UDPD, _UFE]], [el.removeChild, [_UDTD]]] }, _UDTD);
- }
- el.appendChild(_UDFD);
- }
- //点击查看列表信息
- U.F.W.LDYQHFM = function (friendinfo, UPE, el) {
- var i, UDTD, _UCE = friendinfo["ET"],
- _UIE = UPE.indexOf(friendinfo);
- for (i = 0; i < 2; i++) {
- $(UDTD = _UCE[i].parentNode).append(_UCE[i], 0, UDTD.firstChild);
- }
- UPE.unshift(UPE.splice(_UIE, 1)[0]);
- U.F.W.SwitchFriendsChat(_UCE, friendinfo[2]);
- U.F.W.QHFM($(el).Parent(), "block");
- }
- ////删除消息提示
- //U.F.N.QXXHFXT = function (UDOD, UDPD, userid, UDE) {
- // (UDOD == null) && (UDOD = $("div@TID=" + userid, UDPD)[0]);
- // $(UDOD).remove();
- //}
- ////滚动加载
- //U.F.S.GDJZ = function (UDSO) {
- // if (U.F.S.SFXT(this.P + 2, UDSO)) {
- // this.P--;
- // };
- //}
- ////搜索好友异步
- //U.F.S.AsynSFXT = function (r) {
- // var context = r.context;
- // r = r.value;
- // (context[1] == 1) && (context[3].innerText = "");
- // (r) && (U.F.S.PrintSearchFriends(r, context[3], U.U.I.ViewOtherUserInfo)); //打印搜索好友
- //}
|