//此处放置iframe中的word中的功能面板,包括包括创建邀请协作人员,创建编辑历史,创建生成链接.创建热门模板。 Namespace.register("U.Word.Panel"); //#region 初始化区域 //初始化区域 //U.Word.Tool = function (UDE) { // //初始化页面 // var _UDSD, _UDGD, _USM, _UW, _UDOD, _UDKD, // _UOFD, //邀请好友窗体 // _UHD, //编辑历史窗体 // _UDNSD, //生成链接窗体 // _UHTD, //邀请好友窗体 // _UDTD = $("#UD_SYQXR_Parent")[0]; // if ($(_UDTD).Child().length == 0) { // _USM = U.M.GetElementInfo(_UDSD); // _UW = _USM["OW"] + 50; // } //} /** * 加载编辑区域 * * @param {element} * @param {element} */ U.Word.Panel.Loadeditor = function () { var _worddiv, _UDTD, _UDGD, _wordeditor, _UDKD; //$("#UD_SYQXR")[0] 是word的编辑区域,如果不存在,则创建一个。 if (!$("#UD_SYQXR")[0]) { _worddiv = $("#UD_SYQXR_Parent")[0];//包含word编辑区域的div _wordeditor = $$("div", { "id": "UD_SYQXR" }); //创建word编辑器区域 _pagediv = $$("div", { "className": "U_Boom_CO_Editor_body_main_m" }, _wordeditor); //由于是多页,所以需要另外建立一个div,包含下面的头部,内容,底部 _header = $$("div", { "className": "U_Boom_CO_Editor_body_main_border" }, _pagediv); //头部信息 $$("div", { "className": "U_Boom_CO_Editor_body_main_bordero" }, _header); //头部的左上角 $$("div", { "className": "U_Boom_CO_Editor_body_main_bordert" }, _header); //头部的右上角 $$("div", { "className": "U_Boom_CO_Editor_body_main_text", contentEditable: "true", spellcheck: "false", "innerHTML": "", "id": "Txt" + Guid.NewGuid() }, _pagediv); //编辑器区域 _footer = $$("div", { "className": "U_Boom_CO_Editor_body_main_border" }, _pagediv); $$("div", { "className": "U_Boom_CO_Editor_body_main_borders" }, _footer); $$("div", { "className": "U_Boom_CO_Editor_body_main_borderf" }, _footer); //把编辑器区域放入窗体。 U.UI.Form({ min: false, max: false, close: false, draw: false, className: "UD_SYF_S", SO: _worddiv, content: _wordeditor, title: false, hst: false, bst: { "style": { "overflow": "hidden" } }, style: { "backgroundColor": "transparent", "border": "0", "width": "auto", "top": "15px", "left": "30px" } }); } } // //#endregion //#region 团队成员 /** * 创建团队成员的窗体 * * @param {element} * @param {element} */ U.Word.Panel.LoadPlayUser = function (fileinfo) { var _coopwindow, _frienddiv, _example, _wordsize, _marginleft; //如果不存在团队成员窗口,则创建一个团队成员窗口。 if (!$("#U_Boom_CO_Editor_body_left_invite_user")[0]) { _wordsize = U.M.GetElementInfo($("#UD_SYQXR")[0]);//获取编辑器域的父亲。用于获取长度大小,用于定位 _marginleft = _wordsize["OW"] + 50;//团队窗口的位置间距编辑器50像素 //创建邀请协助人员窗口 _coopwindow = $("#U_Boom_CO_Editor_body_left")[0]; _frienddiv = $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user", "id": "U_Boom_CO_Editor_body_left_invite_user" });//好友内容区域 _example = $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a", "onclick": [[U.Word.Panel.DisplayInsertUser, ([])]] }, _frienddiv);//默认邀请按钮 $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a_img" }, _example); $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a_div", "innerHTML": "邀请" }, _example); U.UI.Form({ min: false, max: false, draw: false, SO: _coopwindow, content: _frienddiv, title: "
邀请协作人员
", className: "UD_SYF_S", hst: { style: { "padding": "0" }, "className": "U_Boom_CO_Editor_body_left_invite_name" }, style: { "border": "1px #d6dff0 solid", "position": "absolute", "width": "300px", "height": "250px", "top": "25px", "left": _marginleft + "px" } }); } U.Word.Panel.DisPlayUser(fileinfo); //获取协作人员 } /** * 初始化查看团队成员 * * @param {element} 换页元素 */ U.Word.Panel.DisPlayUser = function (UDE, UDOD) { UDOD = UDOD || $("#U_Boom_CO_Editor_body_left_invite_user")[0]; var HYD = UDOD.children[0]; UDOD.innerHTML = "" $(UDOD).append(HYD); if (UDE) { var UGF = _$(US.Friend[3]).Select({ "GroupManageID": UDE.UserDirectoryEncrypt || UDE.GroupID }); for (i = 0; i < UGF.length; i++) { _UDOD = $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a" }, UDOD); _UDTD = $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a_img", "style": { "background": "" } }, _UDOD); $$("img", { "src": U.M.GetImgU(UGF[i].UserThumbnailImageHead) }, _UDTD); $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a_div", "innerHTML": UGF[i].UserNickName }, _UDOD); } } } /** * 弹出添加成员 * * @param {element} Wrod信息数组 */ U.Word.Panel.DisplayInsertUser = function () { var _UGE = U.Word.TF, //object参数值 _UID = _UGE["UID"], _UFID = _UGE["ID"], _UET = _UGE["ET"], //文件实体 _UQID = _UET.UserDirectoryEncrypt || _UET.GroupID; if (_UQID == US.userInfo.userid) { _UQID = ""; } if (_UET && _UET.UserDirectoryID) { //是否为已经新建过的uw文件 top.U.F.J.ANewQZ(null, { fun: U.M.apply(this, [[top.U.F.J.CXNEWTJ, ([_UQID, _UET.UserDirectoryName || _UET.UserFilesName, "由文档" + (_UET.UserDirectoryName || _UET.UserFilesName) + "发起的互联办公群组。", _UFID, U.M.apply(null, [[U.Word.Panel.InsertUser, ([_UET])]])])]]) }); //调用创建群的弹窗函数 //top.U.F.J.CXNEWTJ, ([[U.Word.Panel.InsertUser, ([$("#U_Boom_CO_Editor_body_left_invite_user")[0], _UET]), _UET.UserDirectoryName } else { //未新建过的文件需要先保存到网盘 U.Word.Save(); } } /** * 添加团队成员 * * @param {element} 换页元素 */ U.Word.Panel.InsertUser = function (UET, GroupID, _FriendUser, groupid, _UGN) { //找到硬盘复制粘贴的函数, 先调用复制然后调用粘贴 //top.U.Dk.RE.WPFZ(UET, "Copy") //top.U.Dk.RE.UFStick(GroupID, function () { //粘贴回调 //}, UET.UserId); if (!(UET.UserDirectoryEncrypt && UET.UserId != UET.UserDirectoryEncrypt)) { //如果是新创建的文件,同时文件不在群里 就把文件拷贝到群里进行处理 /* //用户id 群id 文件id 群id 判断 U.A.Request("UseStudioDisk.CopyFile", ([US.userInfo.userid, GroupID.GroupManageID, UET.UserFilesID || UET.UserDirectoryID, GroupID.GroupManageID, 1]), function (r) { //重新打开 U.D.Office.Word(); }, ([])); */ U.A.Request("UseStudioDisk.CopyFile", ([US.userInfo.userid, GroupID.GroupManageID, UET.UserFilesID || UET.UserDirectoryID, GroupID.GroupManageID, 1]), top.U.Dk.RE.AsynUFStick, (["", GroupID.GroupManageID, [UET], [UET], U.M.apply(null, [[U.Word.Panel.AsynInsertUser, ([UET, _FriendUser, groupid, _UGN])]]), US.userInfo.userid, GroupID.GroupManageID, "Copy", UET.UserDirectoryParentID])); } //把所有添加进来的好友打印在office窗体里 // U.Word.Panel.DisPlayUser(UET) /* if (UET[1].UserDirectoryEncrypt) { //判断文件是否已经是群文件 } else { //如果不是群文件,把当前uw文件复制到群里 // var _UME = top.U.Dk.RE, _UCE = top.U.Dk.HP.MLWJSY(UET), _UGE = top.U.Dk.DiskOperatingSwitch(US.userInfo.userid); // U.A.Request("UseStudioDisk.CopyFile", ([US.userInfo.userid, UGID, UET[1]["UserDirectoryID"], US.userInfo.userid, (_UCE[2].length ? _UME.UEI[0][0].UserDirectoryDeep : "")]), top.U.Dk.RE.AsynUFStick, (["", UGID, [UET[1]], _UCE[1], null, _UGE[1][2], UGID, "Copy", UGID])); } */ } /** * 异步添加好友 * * @param {element} 换页元素 */ U.Word.Panel.AsynInsertUser = function (UET, _FriendUser, groupid, _UGN, arr) { //弹出窗体 //console.log(arr); top.U.D.Office.Word(US.userInfo, arr[0]) U.A.Request(US.CD, ([US.DB, "UseStudio_Friends", "UF_D_A_AFMS", US.userInfo.userid, _FriendUser, US.userInfo.UserNickName || US.userInfo.username, '' + groupid + ',' + _UGN + ',' + UET.UserDirectoryModifyTime + ',' + arr[0].UserDirectoryID + ',' + UET.UserDirectoryName + '.UW', 5, false]), U.M.apply(), ([""])); /* var i, _UDTD, context = request.context, _UDOD = context[1], _UOE = context[2], _UDE = context[3], _UDFD = $$("frag"); request = request.value; if (request > -1) { for (i = 0; UDE.length; i++) { _UDTD = $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a" }, _UDFD); $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a_img" }, _UDTD); $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user_a_div", "innerHTML": "邀请" }, _UDTD); } $(UDOD).append(_UDFD); U.Alert("添加成功"); } */ } //#endregion //#region 热门模板 /** * 创建历史记录窗体 * * @param {element} 换页元素 */ U.Word.Panel.LoadHotTemplates = function (fileinfo) { var _UDTD, _UDOD, _USM, _UW; if (!$("#U_Boom_CO_Editor_body_left_template_hot")[0]) { _UDTD = $("#U_Boom_CO_Editor_body_left")[0]; _USM = U.M.GetElementInfo($("#UD_SYQXR")[0]); _UW = _USM["OW"] + 50; //热门模板提供 _UDOD = $$("div", { "className": "U_Boom_CO_Editor_body_left_template_user", id: "U_Boom_CO_Editor_body_left_template_hot" }); U.UI.Form({ min: false, max: false, draw: false, SO: _UDTD, content: _UDOD, title: "
热门模板提供
", className: "UD_SYF_S", hst: { style: { "padding": "0" }, "className": "U_Boom_CO_Editor_body_left_invite_name" }, style: { "border": "1px #d6dff0 solid", "width": "300px", "height": "270px", "position": "absolute", "top": "840px", "left": _UW + "px" } }); } U.Word.Panel.GetHotTemplates("00000000-0000-0000-0000-000000000000", 1, 10); //热门模板 } /** * 初始化加载模板 * * @param {element} 换页元素 */ U.Word.Panel.GetHotTemplates = function (UDID, S, E, UDOD) { UDOD = UDOD || $("#U_Boom_CO_Editor_body_left_template_hot")[0]; U.A.Request(US.CD, ([US.DB, "UseStudio_Office", "UD_A_SelectHotTemplate", UDID, S, E]), U.Word.Panel.AsynGetHotTemplates, ([null, UDOD])); } /** * 获取热门模板 * * @param {element} 换页元素 */ U.Word.Panel.AsynGetHotTemplates = function (request) { var i, _UDOD, _UDFD = $$("frag"), context = request.context, request = request.value; context[1].innerHTML = ""; for (i = 0; i < request.length; i++) { _UDOD = $$("div", { "className": "U_Boom_CO_Editor_body_left_template_user_m", "onclick": [[U.Word.Panel.OpenHotTemplates, ([request[i].TemplateId])]] }, _UDFD); $$("div", { "className": "U_Boom_CO_Editor_body_left_template_user_m_s", "style": { "background-image": "url(" + request[i].UseFilesServerThumbnailName + ")" } }, _UDOD); $$("div", { "className": "U_Boom_CO_Editor_body_left_template_user_m_x", "innerHTML": request[i]["UserFilesName"] }, _UDOD); } $(context[1]).append(_UDFD); } /** * 点击模板处理 * @参数:模板分类id * @param {element} 换页元素 */ U.Word.Panel.OpenHotTemplates = function (ArrTD) { top.U.Boom.I.GetHomeTemp.particulars(ArrTD); } //#endregion //#region 链接查看 /** * 查看链接 * * @param {element} */ U.Word.Panel.Loadlink = function (fileinfo) { var _rightwindow, _linkdiv, _wordsize, _marginleft; //如果不存在添加链接区域,则创建。 if (!$("#U_Boom_CO_Editor_body_left_href_pay_a")[0]) { //右侧功能区域,链接区域要追加到这里 _rightwindow = $("#U_Boom_CO_Editor_body_left")[0]; _wordsize = U.M.GetElementInfo($("#UD_SYQXR")[0]); _marginleft = _wordsize["OW"] + 50; //生成链接 _linkdiv = $$("div", { "className": "U_Boom_CO_Editor_body_left_href_pay_a", id: "U_Boom_CO_Editor_body_left_href_pay_a", "innerHTML": "将此站点生成链接", "onclick": [[U.Word.Panel.SetDNS]] }); U.UI.Form({ min: false, max: false, draw: false, SO: _rightwindow, content: _linkdiv, title: "
查看目录
", className: "UD_SYF_S", hst: { style: { "padding": "0" }, "className": "U_Boom_CO_Editor_body_left_invite_name" }, style: { "border": "1px #d6dff0 solid", "position": "absolute", "width": "300px", "height": "250px", "top": "570px", "left": _marginleft + "px" } }); } // U.Word.Panel.Getlink(fileinfo.UserDirectoryID); } /** * 查看链接 * * @param {element} 换页元素 */ U.Word.Panel.Getlink = function (UDID, UDOD) { UDOD = UDOD || $("#U_Boom_CO_Editor_body_left_href_pay_a")[0]; U.A.Request(US.CD, ([US.DB, "UseStudio_Office", "UD_A_SelectHotTemplate", UDID, UOID, US, UE]), U.Word.Panel.AsynGetlink, ([null, UDOD])); } /** * 查看链接异步 * * @param {element} 换页元素 */ U.Word.Panel.AsynGetlink = function (request) { var context = request.context; request.value; if (request) { context[1].innerHTML = request; } } U.Word.Panel.SetDNS = function () { var _UGE = U.Word.TF, //object参数值 _UFID = _UGE.ID, _USID = _UGE.UID, _UFNM = _UGE.ET.UserDirectoryName; if (_UFID) { var _UDOD = $$("div", { "class": "U_Boom_CO_Popup_18" }), _UDSBD, _UDNA, _UDRT, _UDYM, _UDSD = $$("div", { "class": "U_Boom_CO_Popup_18_Set" }, _UDOD), _UDQCD, _UDUR, _UDQBD, _UDBG, _UDQD = $$("div", { "class": "U_Boom_CO_Popup_18_Que" }, _UDOD); //设置 $$("div", { "class": "U_Boom_CO_Popup_18_Set_Tag", "innerHTML": "目前默认域名 设置个性域名,让好友同事更快记住链接" }, _UDSD), _UDNA = $$("div", { "class": "U_Boom_CO_Popup_18_Set_Name", "innerHTML": "等待域名生成" }, _UDSD), _UDSBD = $$("div", { "class": "U_Boom_CO_Popup_18_Btn" }, _UDSD), //设置成功 _UDRT = $$("div", { "class": "U_Boom_CO_Popup_18_Que_Right", "style": { "display": "none" } }, _UDQD); $$("div", { "class": "U_Boom_CO_Popup_18_Que_Tag", "innerHTML": "设置成功" }, _UDRT); _UDUR = $$("input", { "type": "text", "class": "U_Boom_CO_Popup_18_Que_Url" }, _UDRT); //二维码 _UDQCD = $$("div", { "class": "U_Boom_CO_Popup_18_Que_Code", "style": { "display": "none" } }, _UDQD); _UDBG = $$("div", { "class": "U_Boom_CO_Popup_18_Que_QR" }, _UDQCD); $$("div", { "class": "U_Boom_CO_Popup_18_Que_Con", "innerHTML": "扫一扫
分享此文档给好友" }, _UDQCD); //域名管理中心 _UDYM = $$("div", { "class": "U_Boom_CO_Popup_18_Set_Yu" }, _UDOD); $$("div", { "class": "U_Boom_CO_Popup_18_Set_Yu_Text", "innerHTML": "对域名不满意?可以到" }, _UDYM), $$("div", { "class": "U_Boom_CO_Popup_18_Set_Yu_Ming", "innerHTML": "域名管理中心", "onclick": [[U.Word.Panel.Yuming]] }, _UDYM), _UDQBD = $$("div", { "class": "U_Boom_CO_Popup_18_Btn", "style": { "display": "none" } }, _UDQD); $$("div", { "innerHTML": "取消", "onclick": [[U.Word.Panel.Close, ([_UDOD])]] }, _UDSBD), $$("div", { "innerHTML": "设置", "onclick": [[U.Word.Panel.QDSZ, ([_UDRT, _UDSD, _UDUR, _UDNA, _UDQBD])]] }, _UDSBD), $$("div", { "innerHTML": "取消", "onclick": [[U.Word.Panel.Close, ([_UDOD])]] }, _UDQBD); $$("div", { "innerHTML": "生成二维码", "onclick": [[U.Word.Panel.CodeSet, ([_UDUR, _UDBG, _UDQCD])]] }, _UDQBD); $$("div", { "innerHTML": "复制链接分享", "onclick": [[U.Word.CopySet, ([_UDUR])]] }, _UDQBD); top.U.UI.From({ min: false, max: false, id: "U_Boom_CO_Popup_18", style: { "width": "580px", "height": "auto" }, content: _UDOD, title: "提示", hst: {}, bst: {} }); U.Word.Panel.eaDomain(_UFID, _UDNA, _UDRT, _UDSD, _UDUR, _UDNA, _UDYM, _UDQBD, _USID, _UFNM); } else { U.Word.Save(); } } /* * @作用:确定申请域名 * @参数一:文件ID * @参数二:域名生成内容 * @参数三:设置成功内容 * @参数四:设置的总体盒子 * @参数五:域名内容 * @参数六:域名生成内容 * @参数七:域名管理中心 * @参数七:复制二维码按钮 * @参数八:用户ID * @参数九:文件名 */ U.Word.Panel.eaDomain = function (UDID, UDOD, _UDRT, _UDSD, _UDUR, _UDNA, _UDYM, _UDQBD, _USID, _UFNM) { var fid = UDID; //获取文件ID var fname = _UFNM; //获取文件名 var UserID = _USID; //获取用户ID var d = new Date(); //获取当前系统时间 d.setMonth(d.getMonth() + 1); //月数+1 var yy1 = d.getFullYear(); //获取年份 var mm1 = d.getMonth() + 1; //因为getMonth()返回值是 0(一月) 到 11(十二月) 之间的一个整数。所以要给其加1 var dd1 = d.getDate(); //获取哪一天 if (mm1 < 10) { mm1 = '0' + mm1; } if (dd1 < 10) { dd1 = '0' + dd1; } var ExTime = yy1 + '-' + mm1 + '-' + dd1; //时间组合 年-月-日 _UDUR.value = Math.ceil(Math.random() * 1000) + ".boomyun.com"; //域名生成规则 //fid:文件id //查询数据库,域名表是否有这个文件,查看该文件是否存在域名 U.A.Request("http://cd.1473.cn/php", (["db.1473.cn", "UseStudio_DNS", 'GetDnsInfoByFileId', fid]), function (r) { if (r.value.length == 0) { //fid:文件id fname:文件名 .com:域名类型 ExTime:到期时间 0:类别 _UDUR.value:域名内容 UserID:用户ID 1:是否需要跳转页面展示内容 //插入域名到数据库 U.A.Request("http://cd.1473.cn/php", (["db.1473.cn", "UseStudio_DNS", 'DNS_InsertDnsInformation', fid, fname, '.' + 'com', ExTime, '0', _UDUR.value, UserID, "1"]), function (r) { //fid:文件ID //查询域名是否存在 U.A.Request("http://cd.1473.cn/php", (["db.1473.cn", "UseStudio_DNS", 'GetDnsInfoByFileId', fid]), function (r) { _UDNA.innerHTML = r.value[0].Domain; //显示域名至HTML页面 }); }); } else { _UDRT.style.display = "block"; //设置成功的页面显示 _UDSD.style.display = "none"; //点击设置页面隐藏 _UDQBD.style.display = "block"; //复制生成等按钮显示 _UDYM.style.display = "block"; //域名管理中心显示 _UDUR.value = r.value[0].Domain; //获取域名生成内容 } }); } //域名生成二维码 U.Word.Panel.CodeSet = function (_UDUR, _UDBG, _UDQCD) { //长 - 宽 - 二维码颜色 - 背景颜色 - 输入的文字或者URL - 生成到的地方 top.U.QR.Code.generate("180", "180", "black", "white", $(_UDUR)[0].value, $(_UDBG)[0]); _UDQCD.style.display = "block"; //二维码显示 } //域名复制链接分享 /*U.Word.CopySet = function (_UDUR) { // $(_UDUR)[0].select(); //_UDUR.select(); top.$(".U_Boom_CO_Popup_18_Que_Url")[0].select(); return document.execCommand('copy'); U.Alert("复制成功"); }*/ //申请域名异步 /*U.Word.AsyneaDomain = function (request) { var context = request.context, _UDID = context[1], _UDOD = context[2]; request = request.value; if (request[0]) { $(_UDOD).addAttrArray({ "innerHTML": "http://" + request[0].UserDomain + ".boomyun.com", style: { cursor: "pointer" }, title: "点击跳转", "onclick": U.M.apply(null, "window.open('" + "http://" + request[0].UserDomain + ".boomyun.com" + "')") }); } else { U.Alert("你建站超过指定次数请您重新建立。"); } }*/ /** * 确定设置按钮 * * @param {element} 换页元素 * @参数一:设置成功内容 * @参数二:设置的总体盒子 * @参数三:域名内容 * @参数四:域名生成内容 * @参数五:复制二维码按钮 */ U.Word.Panel.QDSZ = function (_UDRT, _UDSD, _UDUR, _UDNA, _UDQBD) { _UDRT.style.display = "block"; _UDSD.style.display = "none"; _UDQBD.style.display = "block"; _UDUR.innerHTML = _UDNA.innerHTML; //显示域名内容 } /** * 创建链接分享 * * @param {element} 换页元素 */ U.Word.Panel.Createlink = function (UDE, UDOD) { U.A.Request(US.CD, ([US.DB, "UseStudio_Disk", "UD_I_AddDns", UDE.UserFileId, US.userInfo.userid, 1]), U.Word.Panel.AsynCreatelink, ([null, UDOD])); } /** * 创建链接分享 * * @param {element} 换页元素 */ U.Word.Panel.AsynCreatelink = function (request) { var context = request.context; request.value; if (request) { context[1].innerHTML = request.UserDomain + ".1473.cn"; } } /** * 关闭弹窗 * * @param {element} 换页元素 */ U.Word.Panel.Close = function (UDOD) { $(UDOD)[0].parentElement.parentElement.parentElement.style.display = "none"; } //点击弹出域名管理系统 U.Word.Panel.Yuming = function () { if (!top.$("#U_Boom_Y_B_Manage_Pop")[0]) { top.U.Yuming.MC.StateBox(U.Word.TF["ET"].UserallDirectoryName); top.U.D.SetDTop(top.$("#U_Boom_Y_B_Manage_Pop")[0]); } else { top.$("#U_Boom_Y_B_Manage_Pop")[0].style.display = "block"; top.U.D.SetDTop(top.$("#U_Boom_Y_B_Manage_Pop")[0]); } } //#endregion //#region 历史记录 /** * 初始化加载模板 * * @param */ U.Word.Panel.LoadOfficeHistory = function (fileinfo, uid) { var _UDOD, _UDTD, _USM, _UW; if (!$("#U_Boom_CO_Editor_body_left_invite_history")[0]) { _UDTD = $("#U_Boom_CO_Editor_body_left")[0]; _USM = U.M.GetElementInfo($("#UD_SYQXR")[0]); _UW = _USM["OW"] + 50; //编辑历史 _UDOD = $$("div", { "className": "U_Boom_CO_Editor_body_left_invite_user", "id": "U_Boom_CO_Editor_body_left_invite_history" }); U.UI.Form({ min: false, max: false, draw: false, SO: _UDTD, content: _UDOD, title: "
编辑历史
", className: "UD_SYF_S", hst: { style: { "padding": "0" }, "className": "U_Boom_CO_Editor_body_left_invite_name" }, bst: {}, style: { "width": "300px", "height": "250px", "position": "absolute", "top": "300px", "left": _UW + "px", "border-radius": "0px", "border": "1px #d6dff0 solid" } }); } if (fileinfo) { U.Word.Panel.ViewEditHistory(uid, fileinfo.UserDirectoryID, "00000000-0000-0000-0000-000000000000", 1, 10); //历史记录 } } /** * 插入历史 * * @param {element} 换页元素 */ U.Word.Panel.InsertOfficeHistory = function (UFID, UID, UTH, UDOD) { var UDOD = UDOD || $("#U_Boom_CO_Editor_body_left_invite_history")[0]; var UHID = Guid.NewGuid(); U.A.Request(US.CD, ([US.DB, "UseStudio_Office", "UD_A_InsertOfficeHistory", UHID, UID, UTH, UFID]), U.Word.Panel.AsynViewEditHistory, ([null, UDOD, UID])); } /** * 查看编辑历史 * * @param {element} 换页元素 */ U.Word.Panel.ViewEditHistory = function (UID, UDID, UOID, S, E, UDOD) {//创始人id 文件id 空的id 选取开始 选取长度 获取编辑历史的框 setInterval(function () { UDOD = UDOD || $("#U_Boom_CO_Editor_body_left_invite_history")[0]; U.A.Request(US.CD, ([US.DB, "UseStudio_Office", "UD_A_SelectOfficeHistory", UDID, UOID, S, E]), U.Word.Panel.AsynViewEditHistory, ([null, UDOD, UID])); }, 1000) } /** * 查看编辑历史异步 * * @param {element} 换页元素 */ U.Word.Panel.AsynViewEditHistory = function (request) { var i, _UDOD, _UDTD, _UDSD, _UDFDC, context = request.context, _UDE = request.value, _UDFD = $(context[1]), _UID = context[2]; _UDFD[0].innerHTML = ""; if (_UDE.length == 0 && !$("#U_Boom_CO_Editor_History_N")[0]) { $$("div", { "innerHTML": "暂无历史", "style": { "text-align": "center", "margin-top": "50px" } }, _UDFD[0]); } else { // $("#U_Boom_CO_Editor_History_N")[0] && $("#U_Boom_CO_Editor_History_N").remove(); for (i = 0; i < _UDE.length; i++) { _UDOD = $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o" }, _UDFD[0]); _UDTD = $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o_l" }, _UDOD); $$("img", { "src": U.M.GetImgU(_UDE[i].UseFilesServerThumbnailName) }, _UDTD); _UDTD = $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o_r" }, _UDOD); _UDSD = $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o_r_s" }, _UDTD); $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o_r_s_l", "innerHTML": _UDE[i].UserNickName || _UDE[i].UserName }, _UDSD); $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o_r_s_r", "innerHTML": U.MT.getTDInterval(_UDE[i].CreateTime, "String") + "保存更新" }, _UDSD); _UDSD = $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o_r_x" }, _UDTD); (_UDE[i].UserId != _UID) && $$("div", { "innerHTML": "对话", "style": { "margin-right": "10px" }, "onclick": [[]] }, _UDSD); $$("div", { "innerHTML": "详情", "onclick": [[U.Word.EditHistory, ([_UDE[i]])]] }, _UDSD); } _xzqb = $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o_r_all" }, _UDFD[0]); $$("div", { "className": "U_Boom_CO_Editor_body_right_user_o_r_all_a", "innerHTML": "显示全部", "onclick": [[U.Word.EditHistoryq, ([_UDE])]] }, _xzqb); if (_UDE.length == 1 && (_UDFDC = _UDFD.Child()).length > 0) { _UDFD.append(_UDFDC[_UDFDC.length - 1], "", _UDFDC[0]); } } } /** * 编辑历史弹出 * */ U.Word.Panel.EditHistory = function (UDE) { var _UDOD = $$("div"), _UCT = top.U.UI.Form({ content: _UDOD, id: "EditHistor", bst: { "style": { "overflow": "hidden" } }, "style": { "width": "750px", "height": "550px", "overflow": "hidden" }, title: "历史记录", draw: false, max: false, min: false }); U.A.Request(US.CD, ([US.DB, "Usestudio_Office", "UD_A_SelectHistoryDetails", UDE.HistoryId]), U.Word.Panel.AsynEditHistory, ([_UDOD, UDE])); } /** * 编辑历史查看全部 * */ U.Word.EditHistoryq = function (UDE) { var _UDOD = $$("div"), _UCT = top.U.UI.Form({ content: _UDOD, id: "EditHistorq", bst: { "style": { "overflow": "hidden" } }, "style": { "width": "750px", "height": "550px", "overflow": "hidden" }, title: "历史记录", draw: true, max: true, min: true }); var _UDOD, _UDBD, _UDTD, _UDSD; for (g = 0; g < UDE.length; g++) { //_UDOD = $$("div", { "class": "U_Boom_Forms_Other_EditHistory" }); _UDBD = $$("div", { "class": "U_Boom_Forms_Other_EditHistory_Container" }, _UDOD); _UDTD = $$("div", { "class": "U_Boom_Forms_Other_EditHistory_Container_Head" }, _UDBD); $$("img", { "src": U.M.GetImgU(UDE[g].UserThumbnailImageHead), "onerror": U.M.ImgError, "alt": UDE[g].UserName, "title": UDE[g].UserName }, _UDTD); $$("div", { "innerHTML": UDE[g].UserNickName + " " + U.MT.getTDInterval(UDE[g].CreateTime) + " 更改了以下内容" + "

" }, _UDTD); $$("div", { "innerHTML": UDE[g].OfficeContent }, _UDTD); //U.A.Request(US.CD, ([US.DB, "Usestudio_Office", "UD_A_SelectHistoryDetails", UDE.HistoryId]), U.Word.AsynEditHistoryq, ([_UDOD, UDE[i]])); } } /** * 编辑历史弹出异步 * */ U.Word.Panel.AsynEditHistory = function (request) { var i, _UDOD = request.context[0], _UDBD, _UDTD, _UDSD, _UDATA = request.value, _L = _UDATA.length; for (i = 0; i < _L; i++) { _UDBD = $$("div", { "class": "U_Boom_Forms_Other_EditHistory_Container" }, _UDOD); _UDTD = $$("div", { "class": "U_Boom_Forms_Other_EditHistory_Container_Head" }, _UDBD); $$("img", { "src": U.M.GetImgU(_UDATA[i].UserThumbnailImageHead), "onerror": U.M.ImgError, "alt": request.context[1].UserName /*_UDATA[i].UserName*/, "title": request.context[1].UserName/*_UDATA[i].UserName*/ }, _UDTD); $$("div", { "innerHTML": (request.context[1].UserNickName/*_UDATA[i].UserNickName || _UDATA[i].UserName*/) + " " + U.MT.getTDInterval(_UDATA[i].CreateTime) + " 更改了以下内容" }, _UDTD); $$("div", { "innerHTML": _UDATA[i].OfficeContent }, _UDTD); } } /** * 编辑历史查看全部弹出异步 * */ U.Word.AsynEditHistoryq = function (request) { var i, _UDOD = request.context[0], _UDBD, _UDTD, _UDSD, _UDATA = request.value, _L = _UDATA.length; for (i = 0; i < UDE; i++) { _UDBD = $$("div", { "class": "U_Boom_Forms_Other_EditHistory_Container" }, _UDOD); _UDTD = $$("div", { "class": "U_Boom_Forms_Other_EditHistory_Container_Head" }, _UDBD); $$("img", { "src": U.M.GetImgU(_UDATA[i].UserThumbnailImageHead), "onerror": U.M.ImgError, "alt": request.context[1].UserName /*_UDATA[i].UserName*/, "title": request.context[1].UserName/*_UDATA[i].UserName*/ }, _UDTD); $$("div", { "innerHTML": (request.context[1].UserNickName/*_UDATA[i].UserNickName || _UDATA[i].UserName*/) + " " + U.MT.getTDInterval(request.context[1].CreateTime) + " 更改了以下内容" }, _UDTD); $$("div", { "innerHTML": request.context[1].OfficeContent }, _UDTD); } } /** * 打开历史记录 * * @param {element} 换页元素 */ //U.Word.Openhistory = function (UDE) { // U.UI.Form({ draw: false, max: false, id: "U_Boom_CO_History", content: "", title: "历史记录", hst: { style: { "padding": "0 0 0 10px"} }, bst: { "style": { overflow: "hidden"}} }); //创建窗体 // U.A.Request(US.CD, ([US.DB, "UseStudio_Disk", "UD_A_SelectHistoryDetails", UDE.HistoryId]), U.Word.AsynOpenhistory, ([])); //} /** * 打开异步 * * @param {element} 换页元素 */ //U.Word.AsynOpenhistory = function (request) { // var context = request.context, // _UDOD = context[0]; // request = request.value; // if (request != -1) { // _UDOD.inenrHTML = request.OfficeContent; // } //} //#endregion