123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597 |
- Namespace.register("U.MD.O.E.Panel");
- U.MD.O.E.Panel.isSynergy = function (fun) {
- if (!top.U.MD.U.L.isLogin()) {
- var _fileinfo = U.MD.O.E.fileinfo;
- var _filegroupid = _fileinfo.UserDirectoryEncrypt || _fileinfo.GroupID;
- if (_filegroupid == US.userInfo.userid) {
- _filegroupid = false;
- }
- if (_filegroupid) {
- if (U.UF.C.isFunction(fun)) {
- fun(_fileinfo);
- }
- return true;
- } else {
- var _filename = top.$('#UD_Excel' + _fileinfo.UserDirectoryID + ' .U_MD_O_H_head_navigation_Title')[0];
- if (_fileinfo.UserDirectoryID && _fileinfo.UserId && _fileinfo.UserallDirectoryName) {
- new U.UF.UI.confirm("是否将此文档转成互联办公文档", function () {
- top.U.MD.DK.VW.saveSynergy('ue', _fileinfo, _filename.value, 'move', function (_fileinfo) {
- U.MD.O.E.Panel.isSynergy.async(_fileinfo, fun);
- });
- });
- } else {
- top.U.MD.DK.VW.saveSynergy('ue', _fileinfo, _filename.value, 'new', function (_fileinfo) {
- U.MD.O.E.Panel.isSynergy.async(_fileinfo, fun);
- });
- }
- }
- }
- return false;
- }
- U.MD.O.E.Panel.isSynergy.async = function (fileinfo, fun) {
- var _fileinfo = U.MD.O.E.fileinfo;
- U.MD.O.E.Panel.disPlayUser(_fileinfo);
- var _jsondata = JSON.stringify(U.MD.O.E.data);
- U.A.Request(US.SCOKET, ["newExcelSave", _fileinfo.UserDirectoryID, _jsondata, _fileinfo.UserDirectoryName, US.userInfo.userid, US.pageId], function (r) {
- top.$('#UD_Excel' + _fileinfo.UserDirectoryID + ' .U_MD_O_H_head_navigation_Title')[0].value = _fileinfo.UserDirectoryName;
- U.Alert("保存成功");
- U.MD.O.E.web = true;
- });
- if (U.UF.C.isFunction(fun)) {
- fun(_fileinfo);
- }
- }
- U.MD.O.E.Panel.loadPlayUser = function (fileinfo) {
- var _coopwindow, _frienddiv, _example, _excelsize, _marginleft;
- if (!$("#U_MD_O_E_body_left_invite_user")[0]) {
-
- _excelsize = U.UF.EL.getElementInfo($(".U_MD_O_E_excelBox")[0]);
- _marginleft = _excelsize["OW"] + 50;
- _coopwindow = $("#U_MD_O_E_body_left")[0];
- _cbox = $$("div", {});
- _sharelink = $$("div", {
- className: 'U_MD_O_E_body_left_invite_linkTxt',
- "onclick": function () {
- U.MD.O.E.Panel.isSynergy(U.MD.O.E.Panel.shareLink);
- },
-
- innerText: "第三方链接邀请"
- }, _cbox);
- _frienddiv = $$("div", { "className": "U_MD_O_E_body_left_invite_user", "id": "U_MD_O_E_body_left_invite_user" }, _cbox);
- _example = $$("div", {
- "className": "U_MD_O_E_body_left_invite_user_a",
- "onclick": function () {
- U.MD.O.E.Panel.disPlayInsertUser();
- }
- },
- _frienddiv);
- var _friendimg = $$("div", { "className": "U_MD_O_E_body_left_invite_user_a_img" }, _example);
- var _friendcon = $$("div", { "className": "U_MD_O_E_body_left_invite_user_a_div", "innerHTML": "邀请" }, _example);
-
- var _titlehtml = " <span>邀请协作人员</span>\n" +
- " <div class=\"U_MD_O_E_body_left_close\">关闭</div>";
- new U.UF.UI.form(_titlehtml, _cbox, { style: { border: "none", "border-radius": "1px", position: "absolute", "box-shadow": "rgb(30, 85, 85) 0px 0px 12px -3px", width: "285px", height: "225px", top: "130px", right: "30px", "border-radius": "5px"} }, { isenlarge: false, isnarrow: false }, { style: { margin: "0px 5px", "border-bottom": "1px solid #d6def0", color: "#000", background: "#fff"} }, null, null, _coopwindow);
- }
- U.MD.O.E.Panel.disPlayUser(fileinfo);
- }
- U.MD.O.E.Panel.loadOfficeHistory = function (fileinfo) {
- var _el, _udtd, _usm, _uw;
- if (!$("#U_MD_O_E_body_left_invite_history")[0]) {
- _udtd = $("#U_MD_O_E_body_left")[0];
- _usm = U.UF.EL.getElementInfo($(".U_MD_O_E_excelBox")[0]);
- _uw = _usm["OW"] + 50;
- _el = $$("div", { "className": "U_MD_O_E_body_left_invite_user", "id": "U_MD_O_E_body_left_invite_history" });
-
- var _titlehtml = " <span>编辑历史</span>\n" +
- " <div class=\"U_MD_O_E_body_left_close\">关闭</div>";
- new U.UF.UI.form(_titlehtml, _el, { style: { "border-radius": "1px", width: "286px", height: "300px", position: "absolute", top: "375px", right: "30px", border: "none", "box-shadow": "rgb(30, 85, 85) 0px 0px 12px -3px", "border-radius": "5px"} }, { isenlarge: false, isnarrow: false }, { style: { margin: "0px 5px", "border-bottom": "1px solid #d6def0", color: "#000", background: "#fff"} }, null, null, _udtd);
- }
- if (fileinfo) {
- U.MD.O.E.Panel.viewEditHistory(fileinfo.UserDirectoryID, U.MD.O.E.historyid, 1, 10);
- } else {
- var _nohistory = $$("div", { "innerHTML": "暂无历史", "style": { "text-align": "center", "margin-top": "50px"} }, _el);
- }
- }
- U.MD.O.E.Panel.loadLink = function (excelinfo) {
- var _rightwindow,
- _excelsize,
- _linkdiv,
- _marginleft;
- if (!$("#U_MD_O_E_body_left_href_pay_a")[0]) {
- _rightwindow = $("#U_MD_O_E_body_left")[0];
- _excelsize = U.UF.EL.getElementInfo($(".U_MD_O_E_excelBox")[0]);
- _marginleft = _excelsize["OW"] + 50;
- _linkdiv = $$("div", { "className": "U_MD_O_E_body_left_href_pay_a", id: "U_MD_O_E_body_left_href_pay_a", "innerHTML": "将此站点生成链接", "onclick": function () {
- var _excelinfo = U.MD.O.E.fileinfo;
- if (_excelinfo.UserDirectoryID && _excelinfo.UserId && _excelinfo.UserallDirectoryName) {
- top.U.MD.DS.createDefaultDomainInit(_excelinfo, "excel");
- } else {
- U.MD.O.E.Save(top.US.disk.Disks[US.userInfo.userid]);
- }
- }
- });
- var _titlehtml = " <span>生成链接</span>\n" +
- " <div class=\"U_MD_O_E_body_left_close\">关闭</div>";
- new U.UF.UI.form(_titlehtml, _linkdiv, { style: { "border": "none", "border-radius": "1px", position: "absolute", width: "286px", height: "80px", top: "30px", "border-radius": "5px", "right": "30px", "box-shadow": "rgb(30, 85, 85) 0px 0px 12px -3px"} }, { isenlarge: false, isnarrow: false }, { style: { margin: "0px 5px", "border-bottom": "1px solid #d6def0", color: "#000", background: "#fff"} }, null, null, _rightwindow);
- }
- }
- U.MD.O.E.Panel.disPlayUser = function (fileinfo, el) {
- var _el = _el || $("#U_MD_O_E_body_left_invite_user")[0];
- var _elchild = _el.children[0];
- _el.innerHTML = ""
- $(_el).append(_elchild);
- if (fileinfo) {
- var _userinfo = U.Json.select(US.friend.groupusers, { "GroupManageID": fileinfo.UserDirectoryEncrypt || fileinfo.GroupID });
- if (_userinfo) {
- for (_i = 0; _i < _userinfo.length; _i++) {
- var _elparent = $$("div",
- {
- "className": "U_MD_O_E_body_left_invite_user_a"
- },
- _el);
- var _elcontant = $$("div",
- {
- "className": "U_MD_O_E_body_left_invite_user_a_img",
- "style":
- {
- "background": ""
- }
- },
- _elparent);
- var _elimg = $$("img",
- {
- "src": top.U.MD.C.getHeadImage(_userinfo[i].UserThumbnailImageHead)
- },
- _elcontant);
- var _elname = $$("div",
- {
- "className": "U_MD_O_E_body_left_invite_user_a_div",
- "innerHTML": _userinfo[i].UserNickName
- },
- _elparent);
- }
- }
- }
- }
- U.MD.O.E.Panel.disPlayInsertUser = function () {
- if (U.MD.O.E.Panel.isSynergy()) {
- var _fileinfo = U.MD.O.E["fileinfo"];
- top.U.MD.F.J.selectFriendForm(function (groupid) {
- var _filegroupid = _fileinfo.GroupID || _fileinfo.UserDirectoryEncrypt;
- var _groupinfo = U.Json.select(US.friend.group, { "GroupManageID": _filegroupid })[0];
- var _needuser = top.U.MD.F.J.selectUserInfo.NeedUser;
- var _groupname = _groupinfo.GroupManageName;
- var _groupdesc = _groupinfo.GroupManageDescript;
- var _selectfriend = U.Json.select(US.friend.groupusers, { "GroupManageID": _filegroupid });
-
- for (i = 0; i < _selectfriend.length; i++) {
- U.Json.del(_needuser, { "UserId": _selectfriend[i].UserId });
- }
- top.U.MD.F.J.determineCreateGroupAndAddGroupUser(_filegroupid, null, null, false, _groupname, _groupdesc, function (groupid) {
- U.MD.O.E.Panel.disPlayUser(_fileinfo);
- });
- }, null, _fileinfo);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- U.MD.O.E.Panel.createHis = function (data) {
- var _hisblock = $$('div', { style: { cssText: 'min-height: 85px; border-bottom: 1px solid silver; margin: 0 3px'} }),
- _hisimgel = $$('div', { style: { margin: '22px 12px 0', float: 'left'} }, _hisblock),
- _hisimg = $$('img', { "onerror": U.MD.C.imgError, style: { cssText: 'width:40px; height: 40px;' }, src: top.U.MD.C.getHeadImage(data.UserThumbnailImageHead) }, _hisimgel),
- _hisinfo = $$('div', { style: { cssText: 'margin-left: 62px;'} }, _hisBlock),
- _hisinfotext = $$('div', { style: { 'padding-top': '25px', 'white-space': 'nowrap'} }, _hisinfo),
- _hisinfoname = $$('span', { innerText: data.UserName }, _hisInfoText),
- _hisinfodate = $$('span', { innerText: U.UF.D.getDateInterval(new Date()) + '保存一次', style: { 'padding-left': '10px'} }, _hisinfotext),
- _hisinfobtn = $$('div', { style: { 'margin-top': '10px', 'white-space': 'nowrap'} }, _hisinfo),
- _data = data;
- _hisinfodialogue;
- if (US.disk.UserDisk && data.UserId != US.disk.UserDisk.userInfo.UserId) {
- _hisInfodialogue = $$('button', { innerText: '对话', style: { cssText: 'color: #fff; background-color:#6d81a4; border-radius: 4px; border:none; outline:none; padding: 4px 8px; cursor: pointer;' }, onclick: function () {
- var _hasf = U.Json.select(US.friend.friends, { UserId: _data.UserId }),
- _data = !_hasf.length ? U.Json.select(US.friend.recentcontacts, { UserId: _data.UserId }) : _hasf;
- top.U.MD.F.W.popupFriendsForm(_data[0]);
- }
- }, _hisinfobtn);
- }
- var _hisinfodetailed = $$('button', { innerText: '详细', style: { cssText: 'color: #fff; background-color:#6d81a4; border-radius: 4px; border:none; outline:none; padding: 4px 8px; margin-left: 4px;cursor: pointer;' },
- onclick: function () {
- U.MD.O.E.Panel.editHistory(_data)
- }
- }, _hisinfobtn);
- return _hisblock
- }
- U.MD.O.E.Panel.editHistoryC = function (ude) {
- var _el = $$("div"),
- _ude = ude,
-
- _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, _UDTD);
- var _i, _udbd, _udtd, _udsd;
- for (var _a = 0; _a < _ude.length; a++) {
- _udbd = $$("div", { "className": "U_MD_O_E_History_all", "id": _ude[_a].HistoryId + "-" + _a }, _el);
- _udtd = $$("div", { "className": "U_MD_O_E_History_Head" }, _udbd);
- var _udbb = $$("div", {
- "className": "U_MD_O_E_body_btn",
- "innerHTML": "展开",
- "onclick": U.MD.O.E.Panel.btn
- },
- _udbd);
- var _udbe = $$("div", { "className": "U_MD_O_E_body_btn_img1" }, _udbb);
- var _udbi = $$("img",
- {
- "src": U.MD.C.getHeadImage(_ude[_a].UserThumbnailImageHead),
- "onerror": U.MD.C.imgError,
- "alt": _ude[_a].UserName,
- "title": _ude[_a].UserName
- },
- _udtd);
- var _udbt = $$("div", { "innerHTML": (_ude[_a].UserNickName) + " " + U.UF.D.getDateInterval(_ude[_a].CreateTime) + " 更改了以下内容" }, _udtd);
- var _udbc = $$("div", { "className": "U_MD_O_E_body_right_user_o_r_all_nr", "innerHTML": _ude[_a].OfficeContent }, _udtd);
- }
- }
- U.MD.O.E.Panel.editHistoryOnC = function () {
- var _excel = U.MD.O.E;
- var _fileinfo = _excel["fileinfo"];
- var _fileid = _fileinfo.UserDirectoryID;
- var _udod = $("#U_MD_O_E_body_left_invite_history")[0];
- U.A.Request(US.CD, [US.DB, "UseStudio_Office", "SelectOfficeHistory", _fileid, "00000000-0000-0000-0000-000000000000", 1, 10], U.MD.O.E.Panel.onDisplayD, [null, _udod]);
- }
- U.MD.O.E.Panel.onDisplayD = function (r) {
- var _r = r;
- if ($(".U_MD_O_E_body_right_user_o_r_all")) {
- $(".U_MD_O_E_body_right_user_o_r_all").remove();
- }
- _divall = $$("div", { "className": "U_MD_O_E_body_right_user_o_r_all" }, _r.context[1].parentNode.parentNode);
- var _historyall = $$("div",
- {
- "className": "U_MD_O_E_body_right_user_o_r_all_a",
- "innerHTML": "显示全部",
- "onclick": [U.MD.O.E.Panel.editHistoryOnC]
- },
- _divall);
- U.MD.O.E.Panel.editHistoryC(_r.value);
- }
- U.MD.O.E.Panel.btn = function () {
- if (this.parentNode.children[0].lastChild.children[0].scrollHeight > 100) {
- if (this.innerText == "展开") {
- this.innerHTML = "收起<div class='U_MD_O_E_body_btn_img2'></div>";
- this.parentNode.style.cssText = "height:100%;min-height:100px;overflow:visible;float:left;width:95%;"
- this.style.cssText = "margin-right:-7px;"
- }
- else if (this.innerText == "收起") {
- this.innerHTML = "展开<div class='U_MD_O_E_body_btn_img1'></div>";
- this.parentNode.style.cssText = "height:100px;overflow:hidden;float:none;width:none";
- this.style.cssText = "margin-right: 0px; "
- }
- } else {
- if (this.innerText == "展开") {
- this.innerHTML = "收起<div class='U_MD_O_E_body_btn_img2'></div>";
- this.parentNode.style.cssText = "height:100%;min-height:100px;overflow:visible;float:left;width:95%;"
- this.style.cssText = "margin-right:-7px;"
- }
- else if (this.innerText == "收起") {
- this.innerHTML = "展开<div class='U_MD_O_E_body_btn_img1'></div>";
- this.parentNode.style.cssText = "height:100px;overflow:hidden;";
- this.style.cssText = "margin-right: 0px;"
- }
- }
- }
- U.MD.O.E.Panel.editHistory = function (ude) {
- var _el = $$("div", { style: { cssText: "padding: 0 10px;"} }),
- _ude = ude,
- _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'} });
- if (_ude.OfficeContent == undefined) {
- U.A.Request(US.CD, [US.DB, "Usestudio_Office", "SelectHistoryDetails", _ude.HistoryId], function (r) {
- var _r = r;
- _ude.OfficeContent = _r.value[0].OfficeContent.unEscapeQuotes().unEscapeQuotes();
- U.MD.O.E.Panel.asynEditHistory(_ude, _el);
- }, [_el]);
- } else {
- U.MD.O.E.Panel.asynEditHistory(_ude, _el);
- }
- }
- U.MD.O.E.Panel.asynEditHistory = function (docinfo, element) {
- var _docinfo = docinfo;
- var _element = element;
- var _udbd = $$("div", { "class": "U_MD_O_W_History" }, _element);
- var _udtd = $$("div", { "class": "U_MD_O_W_History_Head" }, _element);
- var _udbi = $$("img",
- {
- "src": (top.U.MD.C.getHeadImage(_docinfo.UserThumbnailImageHead) || '/img/UserHead/UseHead.jpg'),
- "alt": _docinfo.UserNickName || _docinfo.UserName,
- "title": _docinfo.UserNickName || _docinfo.UserName
- },
- _udtd);
- var _udch = $$("div", { "innerHTML": (_docinfo.UserNickName || _docinfo.UserName) + " " + U.UF.D.getDateInterval(_docinfo.CreateTime || new Date()) + " 更改了以下内容", style: { cssText: "display: inline-block; margin-left:10px"} }, _udtd);
- var _udti = $$("div", { "className": "U_MD_O_E_body_right_user_o_r_nr", "innerHTML": _docinfo.OfficeContent }, _udtd);
- }
- U.MD.O.E.Panel.viewEditHistory = function (udid, uoid, s, e, udod) {
-
- var _udod = udod || $("#U_MD_O_E_body_left_invite_history")[0];
- var _udid = udid;
- var _uoid = uoid;
- var _s = s;
- var _e = e;
- U.A.Request(US.CD, [US.DB, "UseStudio_Office", "SelectOfficeHistory", _udid, _uoid || "00000000-0000-0000-0000-000000000000", _s, _e], U.MD.O.E.Panel.asynViewEditHistory, [null, _udod]);
-
- }
- U.MD.O.E.Panel.shareLink = function (fileinfo) {
- var _template = U.MD.O.E.Panel.shareLinkTemplate(fileinfo);
- new U.UF.UI.form("邀请协助链接", _template, { id: "U_MD_O_E_Panel_InviteForm", style: { cssText: "width:600px; height:450px;"} });
- }
- U.MD.O.E.Panel.shareLinkTemplate = function (fileinfo) {
- var _fileinfo = fileinfo,
- _cbox = $$('div', { className: "U_MD_O_H_body_left_invite_form" }),
- _sharelinkel = $$('div', { className: "U_MD_O_H_body_left_invite_formShare" }, _cbox),
- _qrcodeel = $$('div', { className: "U_MD_O_H_body_left_invite_formQRCode" }, _cbox);
- var _adoptshare = $$('p', { innerText: "通过链接邀请:", style: { cssText: "font-size:18px; font-weight: bold;"} }, _sharelinkel)
- var _sharelinkinpblock = $$('div', { className: "U_MD_O_H_body_left_invite_shareInpMargin" }, _sharelinkel);
- var _anoshark = $$('p', { innerText: "将下面的邀请链接通过QQ或微信发送给需要邀请的人" }, _sharelinkinpblock)
- var _filetype = _fileinfo.UserDirectoryExtendType == 'uw' ? 'word' : 'excel';
- var _sharelinkinpblockshow = $$('input', { value: "/#" + _filetype + '/join/' + _fileinfo.UserDirectoryID, className: "U_MD_O_H_body_left_invite_shareInp", disabled: "disabled" }, _sharelinkinpblock),
- _sharelinkinpblockbtn = $$('div', { className: "U_MD_O_H_body_left_invite_shareBtn", innerText: "复制", onclick: function () {
- var _inp = $$('input', { value: _sharelinkinpblockshow.value }, $('body')[0]);
- _inp.select();
- document.execCommand("Copy");
- $(_inp).remove();
- U.Alert('复制成功,赶紧分享给小伙伴吧!');
- }
- }, _sharelinkinpblock);
- var _qrcodeshare = $$('p', { innerText: "通过二维码邀请:", style: { cssText: "font-size:18px; font-weight: bold;"} }, _qrcodeel);
- var _qrcodeimg = $$('div', { style: { cssText: "margin-left:60px;position:absolute;"} }, _qrcodeel);
- var _qrcodetitle = $$('div', { innerHTML: "<span style='font-size:16px'>通过扫码,邀请好友</span><br>扫描二维码获取邀请函,转发给微信好友/群,<br/>即可邀请他们加入你的文档", style: { cssText: "margin-left: 270px;margin-top:40px;line-height:30px;"} }, _qrcodeel);
- top.U.UF.QR.generate("150", "150", "black", "white", _shareLinkInpBlockShow.value, _qrcodeimg);
- return _cbox;
- }
|