WordPanel.js 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  1. //此处放置iframe中的word中的功能面板,包括包括创建邀请协作人员,创建编辑历史,创建生成链接.创建热门模板。
  2. Namespace.register("U.MD.O.W.Panel");
  3. window.onload = function () {
  4. U.MD.O.W.Panel.wordDirectory();
  5. }
  6. //协作统一命名为Collaborative,但牵涉的地方太多,暂时还是用Synergy
  7. //#region 本地转协同文档及新建保存为协同文档操作
  8. /**
  9. * 本地转协同文档及新建保存为协同文档操作,此函数逻辑不清,需要改写!
  10. *
  11. * @param fun {element} 回调函数
  12. */
  13. U.MD.O.W.Panel.isSynergy = function (fun) {
  14. //判断是登录
  15. if (!top.U.MD.U.L.isLogin()) {
  16. var _fileinfo = U.MD.O.W.fileinfo, //文件信息
  17. ////或者是什么意思?不严谨
  18. _filegroupid = _fileinfo.GroupID; //获取_filegroupid群id,判断是否是在自己的ftp下的文档
  19. //判断是否为互联办公文档,此处有问题。互联办公的权限有问题。
  20. if (U.MD.O.W.permission.web) {
  21. if (U.UF.C.isFunction(fun)) {//判断是否有点击事件的方法,如果有,运行它
  22. fun(_fileinfo);
  23. }
  24. return true;
  25. }
  26. else {
  27. var _filename = top.$('#UD_Word' + _fileinfo.UserDirectoryID + ' .U_MD_O_H_head_navigation_Title')[0]; //获取文件名
  28. //判断文档是否是保持文档,是否是可编辑文档
  29. if (U.MD.O.W.isSave() && U.MD.O.W.permission.edit) {
  30. //如果是保持的文档,那么直接提示是否转成系统文档
  31. new U.UF.UI.confirm("是否将此文档转成互联办公文档", function () {
  32. //保存到群里
  33. top.U.MD.DK.VW.saveSynergy(_fileinfo.UserDirectoryExtendType || "uw", _fileinfo, _filename.value, 'move', function (fileinfo) {
  34. U.MD.O.W.Panel.isSynergy.async(fileinfo, fun);
  35. });
  36. });
  37. }
  38. //新建保存为协同
  39. else {
  40. //否则是新建文档
  41. top.U.MD.DK.VW.saveSynergy(_fileinfo.UserDirectoryExtendType || "uw", _fileinfo, _filename.value, 'new', function (fileinfo) {
  42. U.MD.O.W.Panel.isSynergy.async(fileinfo, fun);
  43. });
  44. }
  45. }
  46. }
  47. return false;
  48. }
  49. /**
  50. * 本地转协同文档及新建保存为协同文档操作
  51. *
  52. * @param fileinfo {object} 文件信息
  53. * @param fun {element} 回调函数
  54. */
  55. U.MD.O.W.Panel.isSynergy.async = function (fileinfo, fun) {
  56. U.MD.O.W.fileinfo = fileinfo; //设置文件信息
  57. U.MD.O.W.Panel.disPlayUser(fileinfo); //获取协作人员
  58. var _eidtorel = $('#U_MD_O_H_wordEditor')[0]; //获取编辑器
  59. //导航文件转成互联
  60. if (fileinfo.UserDirectoryExtendType == 'un') {
  61. //保存文件到后台
  62. U.MD.O.W.T.N.saveAllPage(function () {
  63. U.MD.O.W.T.N.saveNav.asyn(true, fileinfo, _eidtorel);
  64. }, 0, true, _eidtorel.innerHTML);
  65. }
  66. else {
  67. //保存文件到后台
  68. U.A.Request(US.SCOKET, ["newWordSave", fileinfo.UserDirectoryID, _eidtorel.innerHTML.escapeQuotes(), fileinfo.UserDirectoryName, US.userInfo.UserId, top.US.pageId], U.MD.O.W.Panel.isSynergy.saveAsync, [null, fileinfo, _eidtorel]);
  69. }
  70. if (U.UF.C.isFunction(fun)) {//判断是否有点击事件的方法,如果有,运行它
  71. fun(fileinfo);
  72. }
  73. }
  74. U.MD.O.W.Panel.isSynergy.saveAsync = function (r) {
  75. var _fileinfo = r.context[1];
  76. var _eidtorel = r.context[2];
  77. U.MD.O.W.permission.edit = true;
  78. U.MD.O.W.permission.web = true;
  79. top.$('#UD_Word' + _fileinfo.UserDirectoryID + ' .U_MD_O_H_head_navigation_Title')[0].value = _fileinfo.UserDirectoryName; //设置文件名
  80. U.Alert("保存成功"); //提示保存成功
  81. U.MD.O.W.fileinfo.UsOffice = _eidtorel.innerHTML; //设置内容
  82. _eidtorel.editor.operaNotice = U.MD.O.W.E.operationNotice; //设置协同监听回调
  83. }
  84. //#endregion
  85. //#region 团队成员
  86. /**
  87. * 创建团队成员的窗体
  88. *
  89. * @param fileinfo {object} 文件信息
  90. */
  91. U.MD.O.W.Panel.loadPlayUser = function (fileinfo) {
  92. var _coopwindow, _frienddiv, _example, _shareLink, _cBox, _person;
  93. console.log(fileinfo);
  94. //如果不存在团队成员窗口,则创建一个团队成员窗口。
  95. if (!$("#U_MD_O_H_body_left_invite_user")[0]) {
  96. //创建邀请协助人员窗口
  97. _coopwindow = $("#U_MD_O_H_body_left")[0];
  98. _cBox = $$("div", {});
  99. _shareLink = $$("div", {
  100. className: 'U_MD_O_H_body_left_invite_linkTxt', "onclick": function () {
  101. // U.MD.O.W.Panel.isSynergy(U.MD.O.W.Panel.shareLink);
  102. U.MD.D.I.isOpenRoomConfirm();
  103. }, "innerText": "第三方链接邀请"
  104. }, _cBox);
  105. _frienddiv = $$("div", { "className": "U_MD_O_H_body_left_invite_user", "id": "U_MD_O_H_body_left_invite_user" }, _cBox); //好友内容区域
  106. // _example = $$("div", {
  107. // "className": "U_MD_O_H_body_left_invite_user_a", "onclick": function () {
  108. // U.MD.O.W.Panel.displayInsertUser();
  109. // }
  110. // }, _frienddiv); //默认邀请按钮
  111. _example = $$("div", {
  112. "className": "U_MD_O_H_body_left_invite_user_a",
  113. }, _frienddiv);
  114. for (i = 0; i <= 2; i++) {
  115. _person = $$("div", { "className": "U_MD_O_H_body_left_person", }, _example);
  116. $$("div", { "className": "U_MD_O_H_body_left_invite_user_a_img" }, _person);
  117. $$("div", { "className": "U_MD_O_H_body_left_invite_user_a_div", "innerHTML": "陈慧" }, _person);
  118. }
  119. _person = $$("div", { "className": "U_MD_O_H_body_left_person", }, _example);
  120. $$("div", {
  121. "className": "U_MD_O_H_body_left_invite_user_a_img_add", "onclick": function () {
  122. U.MD.D.I.addPerson();
  123. }
  124. }, _person);
  125. new U.UF.UI.form("邀请协作人员", _cBox, { id: "LoadPlayUser", style: { border: "none", position: "absolute", width: "300px", "min-width": "200px", height: "250px", top: "310px", left: "auto", "box-shadow": "none" } },
  126. { isenlarge: false, isnarrow: false }, { style: { margin: "0px 5px", "border-bottom": "1px solid #d6def0", color: "#000", background: "#fff" } }, null, null, _coopwindow);
  127. }
  128. U.MD.O.W.Panel.disPlayUser(fileinfo); //获取协作人员
  129. }
  130. /**
  131. * 创建目录的窗体
  132. *
  133. * @param fileinfo {object} 文件信息
  134. */
  135. U.MD.O.W.Panel.wordDirectory = function (fileinfo) {
  136. var _coopwindow, _frienddiv, _example, _shareLink, _cBox;
  137. //如果不存在团队成员窗口,则创建一个团队成员窗口。
  138. if (!$("#U_MD_O_H_body_left_book")[0]) {
  139. //创建邀请协助人员窗口
  140. _coopwindow = $("#U_MD_O_H_body_left")[0];
  141. _cBox = $$("div",);
  142. // _shareLink = $$("div", {
  143. // className: 'U_MD_O_H_body_left_invite_linkTxt', "onclick": function () {
  144. // U.MD.O.W.Panel.isSynergy(U.MD.O.W.Panel.shareLink);
  145. // }, "innerText": "第三方链接邀请"
  146. // }, _cBox);
  147. _frienddiv = $$("div", { "className": "U_MD_O_H_body_left_book", "id": "U_MD_O_H_body_left_book" }, _cBox); //目录内容
  148. _example = $$("div", {
  149. "className": "U_MD_O_H_body_left_book_a",
  150. }, _frienddiv); //默认邀请按钮
  151. $$("div", { "innerHTML": "一、项目概述" }, _example);
  152. $$("div", { "innerHTML": "二、业务流程" }, _example);
  153. $$("div", { "innerHTML": "三、系统角色" }, _example);
  154. $$("div", { "innerHTML": "四、产品功能场景描述" }, _example);
  155. $$("div", { "innerHTML": "五、功能模块" }, _example);
  156. // $$("div", { "className": "U_MD_O_H_body_left_book_a_img" }, _example);
  157. // $$("div", { "className": "U_MD_O_H_body_left_book_a_div", "innerHTML": "邀请" }, _example);
  158. new U.UF.UI.form("目录", _cBox, { id: "wordDirectory", style: { border: "none", position: "absolute", width: "300px", "min-width": "200px", height: "250px", top: "50px", left: "auto", "box-shadow": "none" } },
  159. { isenlarge: false, isnarrow: false }, { style: { height: "40px", "border-bottom": "1px solid #d6def0", color: "#000", background: "#f1f1f1" } }, null, null, _coopwindow);
  160. }
  161. }
  162. /**
  163. * 初始化查看团队成员
  164. *
  165. * @param fileinfo {object} 文件信息
  166. */
  167. U.MD.O.W.Panel.disPlayUser = function (fileinfo, el) {
  168. el = $("#U_MD_O_H_body_left_invite_user")[0]; //获取团队成员初始化的位置
  169. var _elchild = el.children[0] //获取元素的子元素;
  170. el.innerHTML = ""//清空内容
  171. $(el).append(_elchild);
  172. if (fileinfo) {//判断是否有文件信息
  173. var _userinfo = [];// U.Json.select(US.friend.groupusers, { "GroupManageID": fileinfo.GroupID }); //获取所有在群里的成员
  174. if (_userinfo) {//判断是否拥有群成员
  175. for (i = 0; i < _userinfo.length; i++) {//循环打印所有的群成员
  176. U.MD.O.W.Panel.createUser(_userinfo[i], el);
  177. }
  178. }
  179. }
  180. }
  181. /**
  182. * 打印团队编辑成员
  183. *
  184. * @param fileinfo {object} 文件信息
  185. */
  186. U.MD.O.W.Panel.createUser = function (userinfo, el) {
  187. var _elparent = $$("div", {
  188. "className": "U_MD_O_H_body_left_invite_user_a", "onclick": U.UF.C.closure(function (userid) {
  189. top.U.MD.U.V.ViewOtherUserInfo(userid);
  190. }, [userinfo.UserId])
  191. }, el); //好友头像父级元素
  192. var _elcontant = $$("div", { "className": "U_MD_O_H_body_left_invite_user_a_user", "style": { "background": "" } }, _elparent); //好友头像元素
  193. $$("img", { "onerror": U.MD.C.imgError, "src": top.U.MD.C.getHeadImage(userinfo.UserThumbnailImageHead) }, _elcontant); //好友头像图片
  194. $$("div", { "className": "U_MD_O_H_body_left_invite_user_a_div", "innerHTML": userinfo.UserNickName }, _elparent); //好友名称
  195. }
  196. /**
  197. * 单击邀请时,从普通文档转换为协同文档的过程!
  198. * 判断是否是已经新建过 弹出添加成员 异步回调
  199. *
  200. * @param {element} Wrod信息数组
  201. */
  202. U.MD.O.W.Panel.displayInsertUser = function () {
  203. //判断是否是协同文档
  204. if (U.MD.O.W.Panel.isSynergy()) {
  205. var _fileinfo = U.MD.O.W["fileinfo"];
  206. top.U.MD.F.J.selectFriendForm(function (groupid) {
  207. //或者是什么意思?不严谨
  208. var _filegroupid = _fileinfo.GroupID; //获取_filegroupid群id,判断是否是在自己的ftp下的文档
  209. var _groupinfo = U.Json.select(US.friend.group, { "GroupManageID": _filegroupid })[0]; //群信息
  210. var _needuser = top.U.MD.F.J.selectUserInfo.NeedUser; //选中好友集合
  211. var _groupname = _groupinfo.GroupManageName; // 群名
  212. var _groupdesc = _groupinfo.GroupManageDescript; //群描述
  213. var _selectfriend = U.Json.select(US.friend.groupusers, { "GroupManageID": _filegroupid }); //选择的好友信息
  214. //已经在群里的就不添加了
  215. var i;
  216. for (i = 0; i < _selectfriend.length; i++) {
  217. U.Json.del(_needuser, { "UserId": _selectfriend[i].UserId }); //删除所有在群里的用户id
  218. }
  219. //创建及添加群处理
  220. top.U.MD.F.J.determineCreateGroupAndAddGroupUser(_filegroupid, null, null, false, _groupname, _groupdesc, function (groupid, groupinfo) {
  221. var i, _userids = "";
  222. //U.MD.O.W.Panel.disPlayUser(_fileinfo);
  223. for (i = 0; i < _needuser.length; i++) {//循环打印所有的群成员
  224. _userids += _needuser[i].UserId + (i < _needuser.length - 1 ? "," : "");
  225. U.MD.O.W.Panel.createUser(_needuser[i]);
  226. }
  227. U.MD.O.W.Panel.addUser(_userids);
  228. });
  229. }, null, _fileinfo); //调用打印函数
  230. }
  231. }
  232. U.MD.O.W.Panel.addUser = function (userids) {
  233. var _type = U.MD.O.W["fileinfo"].UserDirectoryExtendType == "un" ? "nav" : "word";
  234. top.U.A.Request(US.SCOKET, ["addUser", _type, U.MD.O.W["fileinfo"].UserDirectoryID, userids, US.userInfo.UserId, top.US.pageId], function () { });
  235. }
  236. U.MD.O.W.Panel.syncAddUser = function (userids, senduserid) {
  237. userids = userids.split(",");
  238. var i, _userinfo;
  239. for (i = 0; i < userids.length; i++) {
  240. _userinfo = U.Json.selectOne(US.friend.groupusers, { UserId: userids[i] });
  241. if (!_userinfo) {
  242. top.U.A.Request(US.CD, [US.DB, "UseStudio_Users", "GetUserinfoByUserId", userids[i]], function (r) {
  243. _userinfo = r.value[0];
  244. U.MD.O.W.Panel.createUser(_userinfo);
  245. })
  246. }
  247. }
  248. }
  249. //#endregion
  250. //#region 分享文档链接
  251. /**
  252. * ----------------------------添加团队成员
  253. *
  254. * @param {object} 文件信息
  255. * @param {string} 文件提交到哪个群的id
  256. * @param {array} 用户id的数组
  257. */
  258. //U.MD.O.W.Panel.insertUser = function (fileinfo, groupid) {
  259. // // if (!fileinfo.UserId && !fileinfo.UserallDirectoryName) {
  260. // // fileinfo.GroupId = fileinfo.UserDirectoryEncrypt = groupid;
  261. // // var _groupuserid = U.Json.select(US.friend.group, { 'GroupManageID': groupid })[0].GroupManageUserID;
  262. // // var _dirinfo, _dirid, _diskinfo = US.disk.Disks[US.userInfo.UserId];
  263. // // if (_groupuserid == US.userInfo.UserId) {
  264. // // _dirinfo = U.Json.select(_diskinfo.directoryOrFiles, { 'UserDirectoryName': "我的协同" })[0];
  265. // // } else {
  266. // // _dirinfo = U.Json.select(_diskinfo.directoryOrFiles, { 'UserDirectoryName': "他人邀请" })[0];
  267. // // }
  268. // // var _dirchild = top.$('#L' + _dirinfo.UserDirectoryID).Child();
  269. // // !_dirchild[1] && _dirchild[0].onclick()
  270. // // top.$('#L' + groupid).Child()[0].onclick();
  271. // // } else if ((fileinfo.UserDirectoryEncrypt || fileinfo.GroupID) == US.userInfo.UserId) { //如果是新创建的文件,同时文件不在群里 就把文件拷贝到群里进行处理
  272. // // var _userid = fileinfo.UserId,
  273. // // _diskinfo = US.disk.Disks[US.userInfo.UserId],
  274. // // _dirinfo = U.Json.select(_diskinfo.directoryOrFiles, { "UserDirectoryID": groupid }, 1)[0]; //当前目录的信息
  275. // // var _pastecontent = US.disk.Disks[_userid].pasteDirOrFile = {
  276. // // "type": "shear", //复制或者剪切 "copy" || "shear"
  277. // // "UserDirectoryID": groupid, //在哪个目录复制或者剪切
  278. // // "dirorfile": fileinfo, //复制的内容
  279. // // "userid": _userid //用户id
  280. // // }
  281. // // top.U.A.Request(US.AUTH, ["CutAndPasteFiles", fileinfo.UserId, groupid, fileinfo.UserDirectoryID, groupid, groupid],
  282. // // top.U.MD.DK.RE.asynPaste, ["", _dirinfo, groupid, _pastecontent, _diskinfo]
  283. // // );
  284. // // fileinfo.GroupId = fileinfo.UserDirectoryEncrypt = groupid;
  285. // // }
  286. // // U.MD.O.W.Panel.disPlayUser(fileinfo);
  287. //}
  288. /**
  289. * 分享文档链接
  290. *
  291. * @param fileinfo {object} 文件信息
  292. */
  293. U.MD.O.W.Panel.shareLink = function (fileinfo) {
  294. var _template = U.MD.O.W.Panel.shareLinkTemplate(fileinfo); //生成窗体内容
  295. new U.UF.UI.form("邀请协助链接", _template, { id: "U_MD_O_W_Panel_InviteForm", style: { cssText: "width:600px; height:450px;" } }); //创建窗体
  296. }
  297. /**
  298. * 创建分享链接窗体内容模板
  299. *
  300. * @param {fileinfo} 文件信息
  301. */
  302. U.MD.O.W.Panel.shareLinkTemplate = function (fileinfo) {
  303. var _cBox = $$('div', { className: "U_MD_O_H_body_left_invite_form" }), //创建最外层元素
  304. _shareLinkEl = $$('div', { className: "U_MD_O_H_body_left_invite_formShare" }, _cBox), //分享链接盒子元素
  305. _QRCodeEl = $$('div', { className: "U_MD_O_H_body_left_invite_formQRCode" }, _cBox); //二维码元素
  306. $$('p', { innerText: "通过链接邀请:", style: { cssText: "font-size:18px; font-weight: bold;" } }, _shareLinkEl) //文字提示
  307. var _shareLinkInpBlock = $$('div', { className: "U_MD_O_H_body_left_invite_shareInpMargin" }, _shareLinkEl); //分享链接文本框
  308. $$('p', { style: { cssText: "margin-top: 8px;" }, innerText: "将下面的邀请链接通过QQ或微信发送给需要邀请的人" }, _shareLinkInpBlock); //文字提示
  309. var _fileType; //文档类型
  310. switch (fileinfo.UserDirectoryExtendType.toLowerCase()) { //字符串转换
  311. case 'uw':
  312. _fileType = 'word'; break;
  313. case 'ue':
  314. _fileType = 'execl'; break;
  315. case 'un':
  316. _fileType = 'word'; break;
  317. default:
  318. _fileType = false; break;
  319. }
  320. var _shareLinkInpBlockShow = $$('input', { style: { cssText: "margin-top: 5px;" }, className: "U_MD_O_H_body_left_invite_shareInp", value: "http://www.1473.cn/#" + _fileType + '/join/' + fileinfo.UserDirectoryID, disabled: "disabled" }, _shareLinkInpBlock), //输出
  321. _shareLinkInpBlockBtn = $$('div', {
  322. style: { cssText: "margin-top: 5px;" }, className: "U_MD_O_H_body_left_invite_shareBtn", innerText: "复制", onclick: function () { //复制按钮
  323. var _inp = $$('input', { value: _shareLinkInpBlockShow.value }, $('body')[0]); //创建复制文本框
  324. _inp.select(); //选中
  325. document.execCommand("Copy"); //复制
  326. $(_inp).remove();
  327. U.Alert('复制成功,赶紧分享给小伙伴吧!'); //提示
  328. }
  329. }, _shareLinkInpBlock)
  330. $$('p', { innerText: "通过二维码邀请:", style: { cssText: "font-size:18px; font-weight: bold;" } }, _QRCodeEl); //文字
  331. var _QRCodeImg = $$('div', { style: { cssText: "margin-left:40px;margin-top: 20px;position:absolute;" } }, _QRCodeEl);
  332. $$('div', { innerHTML: "<span style='font-size:16px'>通过扫码,邀请好友</span><br>扫描二维码获取邀请函,转发给微信好友/群,<br/>即可邀请他们加入你的文档", style: { cssText: "margin-left: 270px;margin-top:40px;line-height:30px;" } }, _QRCodeEl);
  333. top.U.UF.QR.generate("150", "150", "black", "white", _shareLinkInpBlockShow.value, _QRCodeImg); //调用生成二维码函数
  334. return _cBox; //返回最外层元素
  335. }
  336. //#endregion
  337. //#region 热门模板
  338. /**
  339. * 创建热门模板窗体
  340. *
  341. * @param {element} 换页元素
  342. */
  343. U.MD.O.W.Panel.loadHotTemplates = function (fileinfo) {
  344. var _leftel, _el;
  345. //判断是否加载热门模板
  346. if (!$("#U_MD_O_H_body_left_template_hot")[0]) {
  347. _leftel = $("#U_MD_O_H_body_left")[0];
  348. //创建热门模板窗体
  349. _el = $$("div", { "className": "U_MD_O_H_body_left_template_user", id: "U_MD_O_H_body_left_template_hot" });
  350. new U.UF.UI.form("热门模板提供", _el, { id: "LoadHotTemplates", style: { border: "none", width: "300px", height: "477px", position: "absolute", top: "695px", left: "auto", "box-shadow": "none" } }, { isenlarge: false, isnarrow: false }, { style: { margin: "0px 5px", "border-bottom": "1px solid #d6def0", color: "#000", background: "#fff" } }, null, null, _leftel);
  351. }
  352. U.MD.O.W.Panel.getHotTemplates("00000000-0000-0000-0000-000000000000", 1, 10); //热门模板
  353. }
  354. /**
  355. * 初始化加载模板
  356. *
  357. * @param {element} 换页元素
  358. */
  359. U.MD.O.W.Panel.getHotTemplates = function (hid, start, end) {
  360. var _el = $("#U_MD_O_H_body_left_template_hot")[0];
  361. U.A.Request(US.CD, [US.DB, "UseStudio_Office", "SelectHotTemplate", hid, start, end], U.MD.O.W.Panel.asynGetHotTemplates, [null, _el]);
  362. }
  363. /**
  364. * 获取热门模板
  365. *
  366. * @param {element} 换页元素
  367. */
  368. U.MD.O.W.Panel.asynGetHotTemplates = function (r) {
  369. var i, _el,
  370. _frag = $$("frag"),
  371. _hel = r.context[1];
  372. r = r.value;
  373. //循环答应热门模板
  374. for (i = 0; i < r.length; i++) {
  375. _el = $$("div", {
  376. "className": "U_MD_O_H_body_left_template_user_m",
  377. "onclick": U.UF.C.closure(function (info) {
  378. parent.U.A.Request(US.DISK, ["GetFileContent", info.FileId], function (r) {
  379. //获取到内容
  380. if (r.value && r.value.UsOffice !== undefined) {
  381. r = r.value.UsOffice;
  382. }
  383. //打开新的word处理
  384. top.U.MD.O.word(US.userInfo, { UserDirectoryID: Guid.newGuid(), UsOffice: r || "" });
  385. });
  386. }, [r[i]])
  387. }, _frag);
  388. $$("div", { "className": "U_MD_O_H_body_left_template_user_m_s", "style": { "background-image": "url(" + (r[i].UseFilesServerThumbnailName || "http://www.1473.cn/Boomyun/img/pc/NImg.png") + ")" } }, _el);
  389. $$("div", { "className": "U_MD_O_H_body_left_template_user_m_x", "innerHTML": r[i]["UserFilesName"] }, _el);
  390. }
  391. $(_hel).append(_frag);
  392. }
  393. //#endregion
  394. //#region 链接查看
  395. /**
  396. *
  397. * 加载,生成连接区域
  398. *
  399. * @param wordinfo {object} 当前文档信息
  400. */
  401. U.MD.O.W.Panel.loadlink = function (wordinfo) {
  402. var _linkareael = $("#U_MD_O_H_body_left_href_pay_a")[0];
  403. //如果不存在添加链接区域,则创建。
  404. if (!_linkareael || (_linkareael && _linkareael.innerHTML == "")) {
  405. U.MD.O.W.Panel.formloadlink([]); //加载链接,这里有可能没有设置过短连接
  406. //加载word文件的短链接
  407. // U.A.Request('http://cd.1473.cn/php', ["db.1473.cn", "UseStudio_DNS", 'GetDnsInfoByFileId', wordinfo.UserDirectoryID], function (r) {
  408. // var _date = r.value; //获取短连接信息
  409. // U.MD.O.W.Panel.formloadlink(_date); //加载链接,这里有可能没有设置过短连接
  410. // });
  411. }
  412. }
  413. /**
  414. *
  415. * 加载,生成连接区域
  416. *
  417. * @param wordinfo {object} 当前文档信息
  418. */
  419. U.MD.O.W.Panel.formloadlink = function (date) {
  420. var _url,
  421. _linkdiv,
  422. _wordinfo = U.MD.O.W.fileinfo,
  423. _rightwindow = $("#U_MD_O_H_body_left")[0], //右边功能区
  424. _linkareael = $("#U_MD_O_H_body_left_href_pay_a")[0]
  425. ;
  426. //设置过域名的加载
  427. if (date.length) {
  428. _url = date[0].AppId + ".1473.cn/" + date[0].Domain
  429. _linkdiv = $$("div", { "className": "U_MD_O_H_body_left_href_pay_a", id: "U_MD_O_H_body_left_href_pay_a" });
  430. $$("a", { className: "U_MD_O_H_body_left_href_pay_aText", href: "//" + _url, innerText: _url, target: "_Blank" }, _linkdiv);
  431. //只有编辑权限才显示修改和分享按钮
  432. if (U.MD.O.W.permission.edit) {
  433. $$('div', {
  434. innerText: '分享', className: "U_MD_O_H_body_left_href_pay_Btn", onclick: function () {
  435. //判断是否保持文档
  436. if (U.MD.O.W.isSave()) {
  437. var _iframe = $$('iframe', { src: '//domain.1473.cn/DomainSystem.aspx/?fileId=' + _wordinfo.UserDirectoryID + '&type=word&mode=share', frameborder: "0", style: { cssText: "width:100%;height:100%;border:0px" } });
  438. new U.UF.UI.form("域名管理", _iframe, { id: "U_MD_DS_DomainShare", style: { "width": "370px", "height": "390px" } });
  439. }
  440. //点击保存处理
  441. else {
  442. $('#U_MD_O_H_save')[0].onclick();
  443. }
  444. }
  445. }, _linkdiv);
  446. $$("div", {
  447. innerText: '修改', className: "U_MD_O_H_body_left_href_pay_Btn", onclick: function () {
  448. //判断是否保持文档
  449. if (U.MD.O.W.isSave()) {
  450. var _iframe = $$('iframe', { src: '//domain.1473.cn/DomainSystem.aspx/?fileId=' + _wordinfo.UserDirectoryID + '&type=word&mode=base', frameborder: "0", style: { cssText: "width:100%;height:100%;border:0px" } });
  451. new U.UF.UI.form("域名管理", _iframe, { id: "U_MD_DS_DomainManage", style: { cssText: 'width: 1040px; height: 555px' } });
  452. }
  453. //点击保存处理
  454. else {
  455. $('#U_MD_O_H_save')[0].onclick();
  456. }
  457. }
  458. }, _linkdiv);
  459. }
  460. }
  461. //未设置过的
  462. else {
  463. // _linkdiv = $$("div", {
  464. // "className": "U_MD_O_H_body_left_href_pay_a", id: "U_MD_O_H_body_left_href_pay_a", "innerHTML": "将此站点生成链接", "onclick": function () { //生成链接
  465. // //判断文件是否保存,此判断未成功
  466. // if (U.MD.O.W.isSave()) { //如果保存的文档,点击直接弹出网页
  467. // //得到编辑器
  468. // var _wordContent = document.getElementById("U_MD_O_H_wordEditor");
  469. // //如果文件变量中的word内容存在,编辑器内容不同于文件变量中的内容,则保存内容,否则,返回true
  470. // if (_wordinfo.UsOffice && _wordinfo.UsOffice != _wordContent.innerHTML) {
  471. // //保存到数据库
  472. // top.U.A.Request(US.DISK, ["SaveFileContent", US.userInfo.UserId, _wordinfo.UserDirectoryID, _wordContent.innerHTML.escapeQuotes(), _wordinfo.UserallDirectoryName, "uw"], function (r) {
  473. // //跳转新页面显示word内容
  474. // window.open("http://" + U.MD.O.W.fileinfo.UserDirectoryID + ".1473.cn");
  475. // }, ([''])); //保存到数据库
  476. // }
  477. // else {
  478. // //先判断数据库是否存在该文件
  479. // parent.U.A.Request(US.DISK, ["GetFileContent", _wordinfo.UserDirectoryID], function (r) {
  480. // //能够获取到内容
  481. // if (r.value && r.value.UsOffice !== null) {
  482. // //跳转新页面显示word内容
  483. // window.open("http://" + U.MD.O.W.fileinfo.UserDirectoryID + ".1473.cn");
  484. // }
  485. // else {
  486. // //保存到数据库
  487. // top.U.A.Request(US.DISK, ["SaveFileContent", US.userInfo.UserId, _wordinfo.UserDirectoryID, _wordContent.innerHTML.escapeQuotes(), _wordinfo.UserallDirectoryName, "uw"], function (r) {
  488. // //跳转新页面显示word内容
  489. // window.open("http://" + U.MD.O.W.fileinfo.UserDirectoryID + ".1473.cn");
  490. // }, ([''])); //保存到数据库
  491. // }
  492. // });
  493. // }
  494. // }
  495. // else { //未保存的文档查看站点,触发保存事件
  496. // $('#U_MD_O_H_save')[0].onclick();
  497. // }
  498. // }
  499. // });
  500. }
  501. //如果已经创建
  502. if (_linkareael && _linkareael.innerHTML == "") {
  503. _linkareael.appendChild(_linkdiv);
  504. }
  505. //如果生成链接的处理
  506. else {
  507. // new U.UF.UI.form("生成链接", _linkdiv, { style: { border: "none", position: "absolute", width: "300px", height: "70px", top: "60px", left: "auto", "box-shadow": "none" } }, { isenlarge: false, isnarrow: false }, { style: { margin: "0px 5px", "border-bottom": "1px solid #d6def0", color: "#000", background: "#fff" } }, null, null, _rightwindow);
  508. }
  509. }
  510. //#endregion
  511. //#region 历史记录
  512. /**
  513. * 初始化历史记录
  514. *
  515. * @param
  516. */
  517. U.MD.O.W.Panel.loadOfficeHistory = function (fileinfo) {
  518. var _el, _leftel;
  519. //判断是否有历史记录
  520. if (!$("#U_MD_O_H_body_left_invite_history")[0]) {
  521. _leftel = $("#U_MD_O_H_body_left")[0];
  522. //编辑历史
  523. _el = $$("div", { "className": "U_MD_O_H_body_left_invite_user", "id": "U_MD_O_H_body_left_invite_history" });
  524. new U.UF.UI.form("编辑历史", _el, { id: "LoadOfficeHistory", style: { width: "300px", height: "284px", position: "absolute", top: "400px", left: "auto", "border-radius": "0px", border: "none", "box-shadow": "none", "border-radius": "5px" } }, { isenlarge: false, isnarrow: false }, { style: { margin: "0px 5px", "border-bottom": "1px solid #d6def0", color: "#000", background: "#fff" } }, null, null, _leftel);
  525. }
  526. //判断文件是否保持的文件,如果保持的文件则有历史记录,未保存的没有
  527. if (U.MD.O.W.isSave()) {
  528. U.MD.O.W.Panel.viewEditHistory(fileinfo.UserDirectoryID, U.MD.O.W.historyid, 1, 100); //历史记录
  529. }
  530. //没有历史记录
  531. else {
  532. $$("div", { "innerHTML": "暂无历史", "style": { "text-align": "center", "margin-top": "50px" } }, _el);
  533. }
  534. }
  535. /**
  536. * 查看编辑历史
  537. *
  538. * @param {element} 换页元素
  539. * 创始人id 文件id 空的id 选取开始 选取长度 获取编辑历史的框
  540. */
  541. U.MD.O.W.Panel.viewEditHistory = function (id, hid, start, end) {
  542. var _el = $("#U_MD_O_H_body_left_invite_history")[0];
  543. U.A.Request(US.CD, [US.DB, "UseStudio_Office", "SelectOfficeHistory", id, hid, start, end], U.MD.O.W.Panel.asynViewEditHistory, [null, _el]);
  544. }
  545. /**
  546. * 查看编辑历史异步
  547. *
  548. * @param {element} 换页元素
  549. */
  550. U.MD.O.W.Panel.asynViewEditHistory = function (r) {
  551. $('#U_MD_O_H_body_left_invite_history')[0].innerHTML = '';
  552. var _value = r.value,
  553. _el = $('#U_MD_O_H_body_left_invite_history')[0]
  554. for (var i = 0; i < _value.length; i++) {
  555. _el.appendChild(U.MD.O.W.Panel.createHis(_value[i]))
  556. }
  557. }
  558. /**
  559. * 添加详细历史记录布局
  560. *
  561. * @param {object} data 数据
  562. */
  563. U.MD.O.W.Panel.createHis = function (data) {
  564. var _hisel, _imgel, _infoel, _textel, _btnel;
  565. _hisel = $$('div', { style: { cssText: 'min-height: 85px; border-bottom: 1px solid silver; margin: 0 3px' } });
  566. _imgel = $$('div', { style: { margin: '22px 12px 0', float: 'left' } }, _hisel);
  567. $$('img', { "onerror": U.MD.C.imgError, style: { cssText: 'width:40px; height: 40px;' }, src: top.U.MD.C.getHeadImage(data.UserThumbnailImageHead) }, _imgel);
  568. _infoel = $$('div', { style: { cssText: 'margin-left: 62px;' } }, _hisel);
  569. _textel = $$('div', { style: { 'padding-top': '25px', 'white-space': 'nowrap' } }, _infoel);
  570. $$('span', { innerText: data.UserName }, _textel);
  571. $$('span', { innerText: U.UF.D.getDateInterval(data.CreateTime) + '保存一次', style: { 'padding-left': '10px' } }, _textel);
  572. _btnel = $$('div', { style: { 'margin-top': '10px', 'white-space': 'nowrap' } }, _infoel);
  573. //判断是否是自己编辑历史记录,是则不打印对话
  574. if (data.UserId != U.MD.O.W.userinfo.UserId) {
  575. $$('button', {
  576. innerText: '对话', style: { cssText: 'color: #fff; background-color:#6d81a4; border-radius: 4px; border:none; outline:none; padding: 4px 8px; cursor: pointer;' }, onclick: function () {
  577. //这里有问题,这样获取不一定能获取用户数据,同时数据没有分离
  578. var _friendel = U.Json.select(US.friend.friends, { UserId: data.UserId });
  579. //如果未添加好友,则弹出添加好友框,否则直接弹出聊天窗口
  580. if (_friendel.length == 0) {
  581. top.U.MD.U.V.ViewOtherUserInfo(data.UserId);
  582. } else {
  583. _data = !_friendel.length ? U.Json.select(US.friend.recentcontacts, { UserId: data.UserId }) : _friendel;
  584. top.U.MD.F.W.popupFriendsForm(_data[0], this);
  585. }
  586. }
  587. }, _btnel);
  588. }
  589. $$('button', {
  590. innerText: '详细', style: { cssText: 'color: #fff; background-color:#6d81a4; border-radius: 4px; border:none; outline:none; padding: 4px 8px; margin-left: 4px;cursor: pointer;' },
  591. onclick: function () {
  592. U.MD.O.W.Panel.EditHistory(data)
  593. }
  594. }, _btnel);
  595. //返回最外的元素
  596. return _hisel
  597. }
  598. /**
  599. * 插入历史
  600. *
  601. * @param _fileinfo {string} 文件信息
  602. * @param {string} 历史记录内容
  603. *
  604. */
  605. U.MD.O.W.Panel.InsertOfficeHistory = function (fileinfo, html, name, contentel) {
  606. var _fileid = fileinfo.UserDirectoryID; //文件ID
  607. if (U.MD.O.W.permission.web) {
  608. //html,
  609. top.U.A.Request(US.SCOKET, ["insertModifyRecord", "word", _fileid, name, html, US.userInfo.UserId, US.pageId], function (r) {
  610. if (r.value) {
  611. var _historyid = r.value;
  612. U.MD.O.W.Panel.syncHistory(US.userInfo.UserId, _historyid);
  613. U.MD.O.W.fileinfo.UsOffice = contentel.innerHTML;
  614. U.Alert("保存成功");
  615. } else {
  616. U.Alert("系统有误,请稍后重试..");
  617. }
  618. });
  619. } else {
  620. //插入历史
  621. U.A.Request(US.CD, [US.DB, "UseStudio_Office", "InsertDocumentModifyRecord", US.userInfo.UserId, _fileid, html, name], function (r) {
  622. if (r.value[0]) {
  623. U.MD.O.W.Panel.syncHistory(US.userInfo.UserId, r.value[0].historyid);
  624. U.MD.O.W.fileinfo.UsOffice = contentel.innerHTML;
  625. U.Alert("保存成功");
  626. } else {
  627. U.Alert("系统有误,请稍后重试..");
  628. }
  629. });
  630. }
  631. }
  632. U.MD.O.W.Panel.syncHistory = function (userid, historyid, isbool) {
  633. if (!isbool) {
  634. var _data, _fileinfo = U.MD.O.W.fileinfo;
  635. _fileinfo.HistoryId = historyid; //记录历史ID
  636. if (userid == US.userInfo.UserId) {
  637. _data = U.MD.O.W.dataStructure(_fileinfo.UserDirectoryModifyTime, US.userInfo.UserName, US.userInfo.UserThumbnailImageHead, historyid, US.userInfo.UserId);
  638. } else {
  639. var _userinfo = U.Json.select(US.friend.groupusers, { UserId: userid })[0];
  640. _data = U.MD.O.W.dataStructure(_fileinfo.UserDirectoryModifyTime, _userinfo.UserName, _userinfo.UserThumbnailImageHead, historyid, _userinfo);
  641. }
  642. var _el = U.MD.O.W.Panel.createHis(_data), //创建历史记录
  643. _addel = $('#U_MD_O_H_body_left_invite_history')[0]; //历史记录区域
  644. $(_el).appendTo(_addel, 0, _addel.firstElementChild); //置顶插入
  645. }
  646. }
  647. /**
  648. * 历史数据结构
  649. *
  650. * @param creattime {string} 创建时间
  651. * @param username {string} 用户名
  652. * @param userbgimg {string} 用户头像
  653. * @param historyid {string} 历史ID
  654. * @param userid {string} 用户ID
  655. *
  656. */
  657. U.MD.O.W.dataStructure = function (creattime, username, userbgimg, historyid, userid) {
  658. return {
  659. CreateTime: creattime || U.UF.D.toTimeStamp(new Date()), //创建时间
  660. UserName: username, //用户名
  661. UserThumbnailImageHead: userbgimg, //用户头像
  662. HistoryId: historyid, //历史ID
  663. UserId: userid //用户ID
  664. }
  665. }
  666. /**
  667. * 添加详细历史记录
  668. *
  669. * @param {element} e 子元素
  670. * @param {element} el 父亲元素
  671. * @param {object} data 数据
  672. */
  673. U.MD.O.W.Panel.AddDetailedHis = function (e, el, data) {
  674. var _conEl = e.lastElementChild,
  675. _hisInfoDate = $$('span', {
  676. innerText: U.UF.D.getDateInterval(new Date(parseInt(data.CreateTime.replace(/[^0-9]/ig, "")))) + '修改了一次',
  677. style: { 'padding-left': '10px' }
  678. }, _conEl.firstElementChild),
  679. _conText = $$('div', { innerHTML: data.OfficeContent }, _conEl)
  680. el.appendChild(e);
  681. }
  682. /**
  683. * 编辑历史弹出全部
  684. *
  685. */
  686. U.MD.O.W.Panel.EditHistoryc = function (UDE) {//此参数为历史记录的信息
  687. var _el = $$("div"),
  688. // _UCT = new U.UF.UI.form("<div _el='U_MD_F_S_TI'>历史记录</div>",_el,{"className": "Bjlsall", "style": {"width": "950px", "height": "550px","overflow": "hidden"} },{isdrag: false,isenlarge: false, isnarrow: false }, null, null, null, _UDTD);
  689. _UCT = new U.UF.UI.form("历史记录", _el, { className: 'Bjlsall', style: { width: "950px", height: "550px", overflow: "hidden" } }, { isdrag: false, isenlarge: false, isnarrow: false }, null, null, null);
  690. var i, _UDBD, _UDTD, _UDSD;
  691. for (var a = 0; a < UDE.length; a++) {//循环历史记录的长度 用来显示多个历史记录在"显示按钮"的打开的窗体上
  692. _UDBD = $$("div", { "className": "U_MD_O_W_History_all", "id": UDE[a].HistoryId + "-" + a }, _el);
  693. _UDTD = $$("div", { "className": "U_MD_O_W_History_Head" }, _UDBD);
  694. _UDBB = $$("div", {
  695. "className": "U_MD_O_H_body_btn",
  696. "innerHTML": "展开",
  697. "onclick": U.MD.O.W.Panel.btn
  698. },
  699. _UDBD);
  700. $$("div", { "className": "U_MD_O_H_body_btn_img1" }, _UDBB);
  701. $$("img",
  702. {
  703. "src": U.MD.C.getHeadImage(UDE[a].UserThumbnailImageHead),
  704. "onerror": U.MD.C.imgError,
  705. "alt": UDE[a].UserName,
  706. "title": UDE[a].UserName
  707. },
  708. _UDTD);
  709. $$("div", { "innerHTML": (UDE[a].UserNickName) + " " + U.UF.D.getDateInterval(UDE[a].CreateTime) + " 更改了以下内容" }, _UDTD);
  710. $$("div", { "className": "U_MD_O_H_body_right_user_o_r_all_nr", "innerHTML": UDE[a].OfficeContent }, _UDTD);
  711. }
  712. }
  713. /**
  714. * 点击显示全部
  715. *
  716. */
  717. U.MD.O.W.Panel.EditHistoryonc = function () {
  718. var _wordinfo = U.MD.O.W; //word全局变量 包含了uw文件的文件信息 等
  719. var _fileinfo = _wordinfo["fileinfo"]; //uw文件的文件信息
  720. var _fileid = _fileinfo.UserDirectoryID;
  721. var UDOD = $("#U_MD_O_H_body_left_invite_history")[0]; //历史记录框
  722. U.A.Request(US.CD, [US.DB, "UseStudio_Office", "SelectOfficeHistory", _fileid, "00000000-0000-0000-0000-000000000000", 1, 10], U.MD.O.W.Panel.OnDisplayD, [null, UDOD]); //
  723. }
  724. /**
  725. * 更新历史弹出全部
  726. *
  727. */
  728. U.MD.O.W.Panel.OnDisplayD = function (r) {
  729. if ($(".U_MD_O_H_body_right_user_o_r_all")) {//如果存在则删除
  730. $(".U_MD_O_H_body_right_user_o_r_all").remove();
  731. }
  732. divall = $$("div", { "className": "U_MD_O_H_body_right_user_o_r_all" }, r.context[1].parentNode.parentNode);
  733. $$("div",
  734. {
  735. "className": "U_MD_O_H_body_right_user_o_r_all_a",
  736. "innerHTML": "显示全部",
  737. "onclick": [U.MD.O.W.Panel.EditHistoryonc]
  738. },
  739. divall);
  740. U.MD.O.W.Panel.EditHistoryc(r.value);
  741. }
  742. /**
  743. * 编辑历史的展开与关闭
  744. *
  745. */
  746. U.MD.O.W.Panel.btn = function () {//编辑历史记录底端的显示全部的展开与关闭
  747. if (this.parentNode.children[0].lastChild.children[0].scrollHeight > 100) {//根据内容的高度来判断
  748. if (this.innerText == "展开") {
  749. this.innerHTML = "收起<div class='U_MD_O_H_body_btn_img2'></div>";
  750. this.parentNode.style.cssText = "height:100%;min-height:100px;overflow:visible;float:left;width:95%;"
  751. this.style.cssText = "margin-right:-7px;"
  752. }
  753. else if (this.innerText == "收起") {
  754. this.innerHTML = "展开<div class='U_MD_O_H_body_btn_img1'></div>";
  755. this.parentNode.style.cssText = "height:100px;overflow:hidden;float:none;width:none";
  756. this.style.cssText = "margin-right: 0px; "
  757. }
  758. } else {
  759. if (this.innerText == "展开") {
  760. this.innerHTML = "收起<div class='U_MD_O_H_body_btn_img2'></div>";
  761. this.parentNode.style.cssText = "height:100%;min-height:100px;overflow:visible;float:left;width:95%;"
  762. this.style.cssText = "margin-right:-7px;"
  763. }
  764. else if (this.innerText == "收起") {
  765. this.innerHTML = "展开<div class='U_MD_O_H_body_btn_img1'></div>";
  766. this.parentNode.style.cssText = "height:100px;overflow:hidden;";
  767. this.style.cssText = "margin-right: 0px;"
  768. }
  769. }
  770. }
  771. /**
  772. * 编辑历史弹出
  773. *
  774. */
  775. U.MD.O.W.Panel.EditHistory = function (UDE) {//此参数为历史记录的信息
  776. var _el = $$("div", { style: { cssText: "padding: 0 10px;" } }),
  777. _UCT = new U.UF.UI.form("历史记录", _el, { id: "Bjls", style: { width: "680px", height: "550px", overflow: "hidden", 'box-shadow': 'rgb(180, 180, 180) 1px 1px 5px 2px', 'border-radius': '0', 'border': 'none' } }, { isdrag: false, isenlarge: false, isnarrow: false }, { style: { 'background-color': '#3c475b', 'padding': '4px' } });
  778. if (UDE.OfficeContent == undefined) {
  779. U.A.Request(US.CD, [US.DB, "Usestudio_Office", "SelectHistoryDetails", UDE.HistoryId], function (r) {
  780. UDE.OfficeContent = r.value[0].OfficeContent.unEscapeQuotes().unEscapeQuotes();
  781. U.MD.O.W.Panel.AsynEditHistory(UDE, _el);
  782. }, [_el]);
  783. } else {
  784. U.MD.O.W.Panel.AsynEditHistory(UDE, _el);
  785. }
  786. }
  787. /**
  788. * 编辑历史弹出异步
  789. *
  790. */
  791. U.MD.O.W.Panel.AsynEditHistory = function (docinfo, element) {
  792. var _UDBD = $$("div", { "class": "U_MD_O_W_History" }, element);
  793. var _UDTD = $$("div", { "class": "U_MD_O_W_History_Head" }, element);
  794. $$("img",
  795. {
  796. "onerror": U.MD.C.imgError,
  797. "src": (top.U.MD.C.getHeadImage(docinfo.UserThumbnailImageHead) || 'http://www.1473.cn/img/UserHead/UseHead.jpg'),
  798. "alt": docinfo.UserNickName || docinfo.UserName,
  799. "title": docinfo.UserNickName || docinfo.UserName
  800. },
  801. _UDTD);
  802. $$("div", { "innerHTML": (docinfo.UserNickName || docinfo.UserName) + " " + U.UF.D.getDateInterval(docinfo.CreateTime || new Date()) + " 更改了以下内容", style: { cssText: "display: inline-block; margin-left:10px" } }, _UDTD);
  803. $$("div", { "className": "U_MD_O_H_body_right_user_o_r_nr", "innerHTML": docinfo.OfficeContent }, _UDTD);
  804. }
  805. //#endregion