123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- Namespace.register("U.MD.D.Blog.A");
- U.MD.D.Blog.A.FBCKME = function () {
- U.MD.U.L.setLoginCallBack(function () {
- U.UF.UI.EditorLoad({
- imgt: 9,
- style: {
- width: "600px",
- height: "500px"
- },
- title: false,
- name: "朋友圈",
- car: {
- onpaste: "U.MD.D.H.CPTATGBL(this);"
- },
- fcb: U.MD.D.Blog.A.FBGBL,
- upload: true
- });
- });
- }
- U.MD.D.Blog.A.BHFBGBL = function (UDOD, UTF) {
- if (!UTF || !U.MD.U.L.isLogin()) {
- var i, j, _UDTD, _UDAD,
- _UMT = UTF ? "removeClass" : "addClass",
- _UDE = ["UD_SYSXZLRSAAO", "UD_SYSXZLRSAOO", "UD_SYSXZLRSATO"];
- UDOD = UDOD.length ? UDOD : [UDOD];
- for (i = 0; i < UDOD.length; i++) {
- _UDAD = (_UDTD = $(UDOD[i])).Child();
- _UDTD[_UMT](_UDE[0], 0);
- for (j = 1; j < _UDAD.length; j++) {
- $(_UDAD[j])[_UMT](_UDE[j]);
- }
- ; if (UTF) { _UDAD[1].focus() };
- }
- }
- }
- U.MD.D.Blog.A.OKFBGBL = function (UDOD) {
- var _UHT = UDOD.innerText;
- if (!_UHT.count() > 300) {
- U.UF.EV.stopDefault();
- U.Alert("文字输入无法大于150");
- }
-
- }
- U.MD.D.Blog.A.FBGBL = function (UCT, UTI, UIMG) {
- var i;
- UCT = UCT.substrU(300);
- if (UIMG) {
- for (i = 0; i < UIMG.length; i++) {
- UCT += UIMG[i].outerHTML;
- }
- }
-
- U.Alert("发表中...");
- U.A.Request(US.AUTH, ["addArticle", US.FORUMROOTID, "", UCT, "blog"], U.MD.D.Blog.A.AsynFBGBL, ["", UCT]);
-
- }
- U.MD.D.Blog.A.AsynFBGBL = function (r) {
- var _UDE, _UKE, _UDTD, _UDOD = $("#UD_SYSXZBR")[0], _userid = US.userInfo.userid, _context = r.context;
- r = r.value;
- if (r) {
- _UDE = U.MD.D.Blog.A.BLEI([r, 0, 0, U.UF.D.toTimeStamp(new Date()), _context[1], _context[1].substr(0, 100), US.userInfo.userid, US.userInfo.username, US.userInfo.UserThumbnailImageHead, 0]);
-
- _UKE = U.MD.D.H.ET["UL"]["HY"][_userid];
- (_UKE && (_UKE = _UKE[1])) && ((!_UKE.length) && (_UDOD.innerText = ""),
- _UKE.push(_UDE));
- U.MD.D.Blog.PGBL(_UDOD, [_UDE], null, 0, true);
- U.Alert("成功发表");
- }
- }
- U.MD.D.Blog.A.BLEI = function (UTE) {
- return {
- "ArticleID": UTE[0],
- "AricitleReadNumber": UTE[1],
- "ArticleReplayNumber": UTE[2],
- "ArticleAddTime": UTE[3],
- "ArticleContent": UTE[4],
- "ArticleContentBrief": UTE[5],
- "UserID": UTE[6],
- "UserName": UTE[7],
- "UserThumbnailImageHead": UTE[8],
- "ArticleZFN": UTE[9]
- }
- }
- U.MD.D.Blog.A.PAZF = function (UDE, UDMD) {
- if (U.MD.U.L.isLogin()) {
- var _UDTD, _UDSD, _UDOD = $("#UD_SYR"), _UDAD = _UDOD.Child()
- _UDOD.css("display", "block");
- new U.UF.UI.form("<div class='UD_SYF_STI'>转发使用</div>",
- _UDOD[0],
- {
- "id": "UD_SYRA",
- "style": {
- "width": "500px",
- "height": "360px"
- }
- },
- {
- isdrag: false,
- isenlarge: false
- }).form;
- (_UDSD = $("div", _UDAD[1])[0]).innerHTML = "可添加内容...";
- U.MD.D.Blog.A.PAZFP(UDE, _UDAD[2]);
- (_UDTD = $(_UDAD[3]).Child())[1].onclick = function () {
- U.MD.D.Blog.A.SPAZFF(UDE, _UDSD, UDMD);
- _UDTD[0].onclick();
- }
- _UDSD.focus();
- }
- }
- U.MD.D.Blog.A.PAZFP = function (UDE, UDOD) {
- UDOD.innerHTML = "";
- var _UTC, _UDSD, _UDMD, _UDTD = $$("div", { "className": "UD_SYRML" }, UDOD);
- $$("img", {
- "onerror": U.MD.C.imgError,
- "title": "点击查看",
- "onclick": function () {
- U.UF.EV.stopBubble();
- U.MD.U.V.ViewOtherUserInfo(UDE.UserID);
- },
- "src": U.MD.C.getHeadImage(UDE.UserThumbnailImageHead)
- }, _UDTD);
- _UDTD = $$("div", "className": "UD_SYRMR"}, UDOD);
- _UDSD = $$("div", { "className": "UD_SYRMRS" }, _UDTD);
- $$("div", { "className": "UD_SYRMRSL", "innerHTML": UDE.UserNickName || UDE.UserName }, _UDSD);
- $$("div", { "className": "UD_SYRMRSR", "innerHTML": U.UF.D.getDateInterval(UDE.ArticleAddTime) }, _UDSD);
- _UDSD = $$("div", { "className": "UD_SYRMRX", "innerHTML": (_UTC = UDE["ArticleContentBrief"]) }, _UDTD);
- _UDSD.innerText = (_UTC = _UDSD.innerText).length > 30 ? _UTC.substr(0, 50) + "..." : _UTC
- }
- U.MD.D.Blog.A.SPAZFF = function (UDE, UDOD) {
- if (UDE.ArticleContent && !UDE["JZ"]) {
- U.MD.D.Blog.A.PAZFF(UDE, UDOD);
- }
- else {
- U.A.Request(US.CD, [US.DB, "UseStudio_Blog", "UB_P_S_SelectArticleInformation", UDE.ArticleID], U.MD.D.Blog.A.AsynSPAZFF, ["", UDE, UDOD]);
-
- }
-
- }
- U.MD.D.Blog.A.AsynSPAZFF = function (r) {
- var _context = r.context;
- var _UDE = _context[1];
- var _UDOD = _context[2];
-
- U.UF.C.AddObj(_UDE, r.value[0]);
- delete _UDE["JZ"];
- U.MD.D.Blog.A.SPAZFF(_UDE, _UDOD);
- }
- U.MD.D.Blog.A.PAZFF = function (UDE, UDOD) {
- var _UTF, _UKE = [], _UTH = UDOD.innerHTML;
- if (_UTH == "可添加内容...") { (_UTH = "") };
- U.Alert("转发中...");
- U.A.Request(US.CD, ([US.DB, "UseStudio_Blog", "UB_P_A_AddZFLR", US.userInfo.userid, Guid.newGuid(), UDE.ArticleID, US.FORUMROOTID,
- _UTH, UDOD.innerText.substr(200) + (UDOD.innerText.length > 200 ? "..." : "") + $("img", UDOD)[0].outerHTML]), U.MD.D.Blog.A.AsynSPAZFF, ["", UDE, UDOD]);
-
-
- }
- U.MD.D.Blog.A.AsynPAZFF = function (r) {
- var _UKE, _UDTD = $("#UD_SYSXZLLRTA").Child()[2];
- _userid = US.userInfo.userid,
- _UGE = U.MD.D.H.ET["UL"]["HY"],
- _context = r.context,
- _UTH = _context[1],
- _UDE = _context[2],
- _UDOD = $$("div", { "innerHTML": _UTH });
- r = r.value;
- _UKE = U.MD.D.Blog.A.BLEI[r, 0, 0, U.UF.D.toTimeStamp(new Date()), _UTH, _UDOD.innerText.substr(0, 100), US.userInfo.userid, US.userInfo.UserNickName, US.userInfo.UserThumbnailImageHead, 0];
- _UKE.Forward = _UDE["ArticleID"];
- _UKE.ZF = _UDE;
- if (_UGE = _UGE[_userid]) {
- _UGE[1] = _UGE[1] || [],
- _UGE[1].unshift(_UKE)
- };
-
- if (_UDTD.className == "UD_SYSXZLLRTO") {
- U.MD.D.Blog.PGBL($("#UD_SYSXZLRSRD")[0], [_UKE], null, 0, true);
- } else {
- U.MD.D.H.HDSY["none", "block"];
- _UDTD.onclick();
- }
-
- }
|