Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Файл - fansbox.js (Старый размер - 18442 | Новый - 0):
- 0. - var FansBox = {
- 1. - init: function(box, opts) {
- 2. - if (cur.lSTL) re(cur.lSTL);
- 3. - extend(cur, {
- 4. - fnbxOffsets: cur.fnbxOffsets || {},
- 5. - fnbxPhCache: cur.fnbxPhCache || {},
- 6. - fnbxPhShown: cur.fnbxPhShown || {},
- 7. - fnbxIdolsList: cur.fnbxIdolsList || {},
- 8. - fnbxIdolsCache: cur.fnbxIdolsCache || {},
- 9. - fnbxIdolsIndex: cur.fnbxIdolsIndex || {},
- 10. - fnbxIdolsProcessed: cur.fnbxIdolsProcessed || {},
- 11. - fnbxIdolsQuery: cur.fnbxIdolsQuery || '',
- 12. -
- 13. - fnbxAutoload: true,
- 14. - fnbxWasScroll: false,
- 15. - fnbxHash: opts.hash,
- 16. - fnbxOwnerId: opts.ownerId,
- 17. - fnbxId: box.tbId,
- 18. - fnbxSearchLink: opts.searchLink || '',
- 19. - fnbxPage: opts.address || 'al_fans.php',
- 20. -
- 21. - lSTL: boxLayerWrap.appendChild(ce('div', {id: 'layer_stl', innerHTML: '<div id="layer_stl_bg" class="fixed"></div><div id="layer_stl_cl"></div><nobr id="layer_stl_text" class="fixed">' + getLang('global_to_top') + '</nobr>', el: box.bodyNode, onclick: cancelEvent, onmousedown: FansBox.lSTLDown, sc: FansBox.onScroll})),
- 22. - lSTLShown: 0,
- 23. - lSTLWas: 0,
- 24. - lSTLWasSet: 0
- 25. - });
- 26. - cur.fnbxOffsets[opts.tab] = opts.offset;
- 27. -
- 28. - ajax.preload(cur.fnbxPage, {
- 29. - act: cur.fnbxAct || 'box',
- 30. - tab: opts.tab,
- 31. - oid: opts.ownerId,
- 32. - offset: opts.offset
- 33. - }, opts.preload);
- 34. -
- 35. - box.setOptions({width: opts.intro ? 630 : 620, bodyStyle: opts.intro ? 'padding: 0px' : 'margin-top: 50px', onShow: function() {
- 36. - if (cur.fnbxWasScroll) {
- 37. - boxLayerWrap.scrollTop = cur.fnbxWasScroll;
- 38. - cur.fnbxWasScroll = false;
- 39. - }
- 40. - addEvent(boxLayerWrap, 'scroll', FansBox.onScroll);
- 41. - setTimeout(FansBox.onScroll, 0);
- 42. - }, onHide: function() {
- 43. - removeEvent(boxLayerWrap, 'scroll', FansBox.onScroll);
- 44. - hide(cur.lSTL);
- 45. - cur.lSTLShown = 0;
- 46. - if (opts.onHide) {
- 47. - opts.onHide();
- 48. - }
- 49. - }});
- 50. -
- 51. - if (!box.tbDeinit) {
- 52. - extend(box, {
- 53. - tbDeinit: function() {
- 54. - cur.fnbxOwnerId = cur.fnbxOffsets = cur.fnbxPhShown = false;
- 55. - re(cur.lSTL);
- 56. - removeEvent(boxLayerWrap, 'scroll', FansBox.onScroll);
- 57. - },
- 58. - tbcShowProgress: function() {
- 59. - hide('fans_idol_search');
- 60. - if (cur.fnbxSearchLink) hide(cur.fnbxSearchLink);
- 61. - },
- 62. - tbcOnLoad: function() {
- 63. - if (curBox().tbVis == 'idols') {
- 64. - if (ge('fans_rowsidols') && ge('fans_rowsidols').childNodes.length > 10) {
- 65. - show('fans_idol_search');
- 66. - var oid = cur.fnbxOwnerId;
- 67. - if (!cur.fnbxIdolsList[oid]) {
- 68. - cur.fnbxIdolsList[oid] = 'loading';
- 69. - ajax.post(cur.fnbxPage, {act: 'load_idols', oid: oid}, {onDone: function(result) {
- 70. - if (!cur.fnbxIdolsList) return;
- 71. -
- 72. - var rf = (cur.fnbxIdolsList[oid] == 'update'), upd = rf || (cur.fnbxIdolsList[oid] == 'more');
- 73. - cur.fnbxIdolsCache[oid] = {all: []};
- 74. - var processed = cur.fnbxIdolsProcessed;
- 75. - for (var i = 0, count = result.length; i < count; ++i) {
- 76. - if (processed[result[i][0]] !== undefined) {
- 77. - result[i][1] = processed[result[i][0]];
- 78. - }
- 79. - cur.fnbxIdolsCache[oid].all.push(i);
- 80. - }
- 81. - cur.fnbxIdolsList[oid] = result;
- 82. -
- 83. - cur.fnbxIdolsIndex[oid] = new vkIndexer(cur.fnbxIdolsCache[oid].all, function(obj) {
- 84. - return cur.fnbxIdolsList[oid][obj][2];
- 85. - }, upd ? function() {
- 86. - if (cur.fnbxOwnerId == oid && curBox().tbId == cur.fnbxId && curBox().tbVis == 'idols') {
- 87. - FansBox.moreIdols(rf);
- 88. - }
- 89. - } : function() {});
- 90. - }});
- 91. - } else if (cur.fnbxIdolsQuery) {
- 92. - FansBox.moreIdols(true);
- 93. - }
- 94. - }
- 95. - } else {
- 96. - hide('fans_idol_search');
- 97. - if (cur.fnbxSearchLink) show(cur.fnbxSearchLink);
- 98. - }
- 99. - }
- 100. - });
- 101. - addEvent(boxLayerWrap, 'scroll', FansBox.onScroll);
- 102. - }
- 103. -
- 104. - placeholderSetup('fans_idol_search_inp', {back: true});
- 105. - box.tbcOnLoad();
- 106. -
- 107. - if (cur.fnbxLoaded) cur.fnbxLoaded();
- 108. - onBodyResize();
- 109. - FansBox.onScroll();
- 110. - },
- 111. - getHighlight: function(q) {
- 112. - var indxr = cur.fnbxIdolsIndex[cur.fnbxOwnerId], delimiter = indxr.delimiter, trimmer = indxr.trimmer;
- 113. -
- 114. - q += ' ' + (parseLatin(q) || '');
- 115. - q = escapeRE(q).replace(/&/g, '&');
- 116. - q = q.replace(trimmer, '').replace(delimiter, '|');
- 117. - return {
- 118. - re: new RegExp('(' + q + ')', 'gi'),
- 119. - val: '<span class="fans_row_highlight">$1</span>'
- 120. - }
- 121. - },
- 122. - moreIdols: function(force) {
- 123. - var oid = cur.fnbxOwnerId, list = cur.fnbxIdolsList[oid];
- 124. - if (curBox().tbId != cur.fnbxId) return;
- 125. -
- 126. - if (!list || list == 'loading' || list == 'update' || list == 'more') {
- 127. - if (list == 'loading') cur.fnbxIdolsList[oid] = 'more';
- 128. - return;
- 129. - }
- 130. -
- 131. - var list = cur.fnbxIdolsCache[oid].all, q = trim(val('fans_idol_search_inp'));
- 132. - toggle('fans_reset_search', !!q);
- 133. -
- 134. - if (!isVisible('fans_idol_search')) {
- 135. - q = '';
- 136. - }
- 137. -
- 138. - var refresh = (force || q != cur.fnbxIdolsQuery), highlight = false;
- 139. - cur.fnbxIdolsQuery = q;
- 140. - if (q) {
- 141. - list = cur.fnbxIdolsCache[oid]['_' + q];
- 142. - if (list === undefined) {
- 143. - var tmp = cur.fnbxIdolsIndex[oid].search(q), mp = {};
- 144. - list = [];
- 145. - for (var i = 0, l = tmp.length; i < l; ++i) {
- 146. - if (!mp[tmp[i]]) {
- 147. - mp[tmp[i]] = true;
- 148. - list.push(tmp[i]);
- 149. - }
- 150. - }
- 151. - list.sort(function(a,b){return a-b;});
- 152. - cur.fnbxIdolsCache[oid]['_' + q] = list;
- 153. - }
- 154. - highlight = FansBox.getHighlight(q);
- 155. - }
- 156. -
- 157. - var len = list.length, cont = ge('fans_rowsidols'), more = ge('fans_more_linkidols');
- 158. - if (!len) {
- 159. - hide(more);
- 160. - val(cont, FansBox.genIdolEmpty(val('fans_idol_search_inp')));
- 161. - return;
- 162. - }
- 163. -
- 164. - var start = refresh ? 0 : cont.childNodes.length, end = Math.min(len, start + 32), html = [];
- 165. - for (var i = start; i < end; ++i) {
- 166. - var row = cur.fnbxIdolsList[oid][list[i]], name = row[2];
- 167. - if (!row) continue;
- 168. - row = FansBox.genIdolRow(row, highlight ? name.replace(highlight.re, highlight.val) : name);
- 169. - if (refresh) {
- 170. - html.push(row);
- 171. - } else {
- 172. - cont.appendChild(se(row));
- 173. - }
- 174. - }
- 175. - if (refresh) {
- 176. - val(cont, html.join(''));
- 177. - curBox().tbToTop();
- 178. - }
- 179. - toggle(more, end < len);
- 180. - },
- 181. - genIdolEmpty: function(q) {
- 182. - var lnk = '<a href="/search?c[section]=groups&c[q]=' + encodeURIComponent(q) + '">';
- 183. - var text = trim(q) ? (getLang('fans_idols_not_found') + '<br><br>' + getLang('groups_you_can_find').replace('{term}', lnk + clean(q) + '</a>').replace('{link}', lnk).replace('{/link}', '</a>')) : getLang('fans_no_idols');
- 184. - return '<div class="fans_no_rows">' + text + '</div>';
- 185. - },
- 186. - genIdolRow: function(row, name) {
- 187. - var oid = row[0], evs = row[6] ? ' onmouseover="FansBox.bigphOver(this, ' + oid + ')"' : '', href = '/' + (row[4] ? row[4] : (oid > 0 ? 'id' + oid : 'public' + (-oid))), photo = row[3], size = getLang('public_N_followers', row[5], true), non = ' style="display: none"', status = row[7].length ? row[7] : getLang(oid > 0 ? 'profile_own_profile' : 'groups_type_public'), btns = vk.id && vk.id != oid;
- 188. - var feed_act = row[8] ? '<a onclick="FansBox.feedToggle(this, ' + oid + ')">'+getLang('public_feedunblock')+'</a>' : '';
- 189. - return ['\
- 190. - <div class="fans_idol_row inl_bl">\
- 191. - <div class="fans_idolph_wrap fl_l"', evs, '>\
- 192. - <a class="fans_idol_ph" href="', href, '">\
- 193. - <img class="fans_idol_img" src="', photo, '" />\
- 194. - </a>\
- 195. - </div>\
- 196. - <div class="fans_idol_info fl_l">\
- 197. - <div class="fans_idol_name"><a class="fans_idol_lnk" href="', href, '">', name, '</a></div>\
- 198. - <div class="fans_idol_status">', status, '</div><div class="fans_idol_size">', size, '</div>\
- 199. - <div id="fans_idol_sub', oid, '" class="button_blue fans_idol_sub"', ((row[1] || !btns) ? non : ''), '>\
- 200. - <button onclick="FansBox.subscribe(this, ', oid, ')">', getLang('public_subscribe'), '</button>\
- 201. - </div>\
- 202. - <div id="fans_idol_feedact', oid, '" class="fans_idol_space"', (row[1] && btns ? '' : non), '>', feed_act,'</div>\
- 203. - <div id="fans_idol_unsub', oid, '" class="fans_idol_unsub"', (row[1] && btns ? '' : non), '>\
- 204. - <a onclick="FansBox.unsubscribe(this, ', oid, ')">', getLang('public_unsubscribe'), '</a>\
- 205. - </div>\
- 206. - </div>\
- 207. - </div>'].join('');
- 208. - },
- 209. -
- 210. - resetSearch: function() {
- 211. - val('fans_idol_search_inp', '');
- 212. - FansBox.moreIdols(true);
- 213. - setTimeout(elfocus.pbind('fans_idol_search_inp'), 0);
- 214. - },
- 215. - more: function() {
- 216. - var t = curBox().tbCur;
- 217. - if (t == 'idols') return FansBox.moreIdols();
- 218. - if (isVisible('fans_more_prg' + t)) return;
- 219. - ajax.post(cur.fnbxPage, {act: cur.fnbxAct || 'box', tab: t, oid: cur.fnbxOwnerId, offset: cur.fnbxOffsets[t]}, {
- 220. - onDone: function(rows, newOffset, needMore) {
- 221. - var el = ce('div', {innerHTML: rows}), cnt = ge('fans_rows' + t);
- 222. - if (!cnt) return;
- 223. -
- 224. - for (var e = domFC(el); e; e = domFC(el)) {
- 225. - cnt.appendChild(e);
- 226. - }
- 227. - cur.fnbxOffsets[t] = newOffset;
- 228. - if (needMore) {
- 229. - FansBox.preload();
- 230. - } else {
- 231. - hide('fans_more_link' + t);
- 232. - }
- 233. - }, showProgress: function() {
- 234. - hide('fans_more_link' + t);
- 235. - show('fans_more_prg' + t);
- 236. - }, hideProgress: function() {
- 237. - show('fans_more_link' + t);
- 238. - hide('fans_more_prg' + t);
- 239. - }, cache: 1
- 240. - });
- 241. - cur.fnbxAutoload = true;
- 242. - },
- 243. - preload: function() {
- 244. - var t = curBox().tbCur;
- 245. - ajax.post(cur.fnbxPage, {act: cur.fnbxAct || 'box', tab: t, oid: cur.fnbxOwnerId, offset: cur.fnbxOffsets[t]}, {
- 246. - cache: 1
- 247. - });
- 248. - },
- 249. - markSubsc: function(oid, v) {
- 250. - cur.fnbxIdolsProcessed[oid] = v;
- 251. - var lst = cur.fnbxIdolsList[cur.fnbxOwnerId];
- 252. - if (lst && lst.length) {
- 253. - for (var i = 0, l = lst.length; i < l; ++i) {
- 254. - if (lst[i][0] == oid) {
- 255. - cur.fnbxIdolsList[cur.fnbxOwnerId][i][1] = v;
- 256. - break;
- 257. - }
- 258. - }
- 259. - }
- 260. - },
- 261. -
- 262. - subscribe: function(el, oid) {
- 263. - ajax.post('al_feed.php', {act: 'subscr', oid: oid, hash: cur.fnbxHash}, {
- 264. - onDone: function() {
- 265. - hide('fans_idol_sub' + oid);
- 266. - show('fans_idol_unsub' + oid);
- 267. - show('fans_idol_feedact' + oid);
- 268. - if (cur.fnbxOwnerId == vk.id) {
- 269. - FansBox.recache(1);
- 270. - }
- 271. - FansBox.markSubsc(oid, 1);
- 272. - },
- 273. - showProgress: lockButton.pbind(el),
- 274. - hideProgress: unlockButton.pbind(el)
- 275. - });
- 276. - },
- 277. - blacklistTip: function(el) {
- 278. - showTooltip(el, {
- 279. - text: getLang('fans_block_fan'),
- 280. - shift: [13, 1, 1],
- 281. - black: 1
- 282. - });
- 283. - },
- 284. - blacklist: function(el, oid, ev) {
- 285. - if (el.tt && el.tt.destroy) el.tt.destroy();
- 286. - cur.fnbxWasScroll = boxLayerWrap.scrollTop;
- 287. - showBox(cur.fnbxPage, {act: 'block', oid: oid});
- 288. - return cancelEvent(ev);
- 289. - },
- 290. - unsubscribe: function(el, oid) {
- 291. - ajax.post(cur.fnbxPage, {act: 'unsub', oid: oid, hash: cur.fnbxHash, from: 'box'}, {
- 292. - onDone: function() {
- 293. - show('fans_idol_sub' + oid);
- 294. - hide('fans_idol_unsub' + oid);
- 295. - hide('fans_idol_feedact' + oid);
- 296. - if (cur.fnbxOwnerId == vk.id) {
- 297. - FansBox.recache(-1);
- 298. - }
- 299. - FansBox.markSubsc(oid, 0);
- 300. - },
- 301. - showProgress: function() {
- 302. - hide(el);
- 303. - show(domNS(el) || domPN(el).appendChild(ce('span', {className: 'progress_inline fans_idol_unsub_p'})));
- 304. - },
- 305. - hideProgress: function() {
- 306. - show(el);
- 307. - re(domNS(el));
- 308. - }
- 309. - })
- 310. - },
- 311. - feedToggle: function(el, oid) {
- 312. - ajax.post(cur.fnbxPage, {act: 'feedtgl', oid: oid, hash: cur.fnbxHash, from: 'box'}, {
- 313. - onDone: function(val, str) {
- 314. - el.innerHTML = str;
- 315. - if (cur.fnbxOwnerId == vk.id) {
- 316. - FansBox.recache(-1);
- 317. - }
- 318. - var lst = cur.fnbxIdolsList[cur.fnbxOwnerId];
- 319. - if (lst && lst.length) {
- 320. - for (var i = 0, l = lst.length; i < l; ++i) {
- 321. - if (lst[i][0] == oid) {
- 322. - cur.fnbxIdolsList[cur.fnbxOwnerId][i][0] = val;
- 323. - break;
- 324. - }
- 325. - }
- 326. - }
- 327. - },
- 328. - showProgress: function() {
- 329. - el.innerHTML = '<span class="progress_inline"></span>';
- 330. - }
- 331. - });
- 332. - },
- 333. - lSTLDown: function(e) {
- 334. - e = e || window.event;
- 335. - if (checkEvent(e)) return;
- 336. -
- 337. - if (!__afterFocus) {
- 338. - var to = 0, st = boxLayerWrap.scrollTop;
- 339. - if (cur.lSTLWasSet && cur.lSTLWas) {
- 340. - to = cur.lSTLWas;
- 341. - cur.lSTLWas = 0;
- 342. - } else {
- 343. - cur.lSTLWas = st;
- 344. - }
- 345. - boxLayerWrap.scrollTop = to;
- 346. - /* var diff = st - to;
- 347. - if (Math.abs(diff) > 6) {
- 348. - boxLayerWrap.scrollTop = (to + (diff > 0 ? 6 : -6));
- 349. - }
- 350. - setTimeout(function() {
- 351. - animate(boxLayerWrap, {scrollTop: to, transition: Fx.Transitions.easeInCirc}, 100);
- 352. - }, 0);/**/
- 353. - }
- 354. - return cancelEvent(e);
- 355. - },
- 356. - onScroll: function() {
- 357. - var st = boxLayerWrap.scrollTop, mx = 200, vis = cur.lSTLWas || (st > mx), o = 0;
- 358. - cur.lSTL.style.marginTop = st + 'px';
- 359. - if (!vis) {
- 360. - if (cur.lSTLShown !== 0) {
- 361. - hide(cur.lSTL);
- 362. - cur.lSTLShown = 0;
- 363. - }
- 364. - } else {
- 365. - if (cur.lSTLShown !== 1) {
- 366. - show(cur.lSTL);
- 367. - cur.lSTLShown = 1;
- 368. - }
- 369. - if (cur.lSTLWas && st > 500) {
- 370. - cur.lSTLWas = 0;
- 371. - }
- 372. - if (st > mx) {
- 373. - o = (st - mx) / mx;
- 374. - if (cur.lSTLWasSet) {
- 375. - cur.lSTLWasSet = 0;
- 376. - val(domLC(cur.lSTL), getLang('global_to_top'));
- 377. - removeClass(domLC(cur.lSTL), 'down');
- 378. - }
- 379. - } else {
- 380. - o = (mx - st) / mx;
- 381. - if (cur.lSTLWas) {
- 382. - if (!cur.lSTLWasSet) {
- 383. - cur.lSTLWasSet = 1;
- 384. - val(domLC(cur.lSTL), '');
- 385. - addClass(domLC(cur.lSTL), 'down');
- 386. - }
- 387. - }
- 388. - }
- 389. - }
- 390. - setStyle(cur.lSTL, {opacity: Math.min(Math.max(o, 0), 1)});
- 391. - if (!cur.fnbxAutoload) return;
- 392. - var bt = lastWindowHeight, objMore = ge('fans_more_link' + curBox().tbCur);
- 393. - if (isVisible(objMore) && (bt > getXY(objMore, true)[1])) {
- 394. - objMore.click();
- 395. - }
- 396. - },
- 397. - recache: function(d) {
- 398. - cur.fnbxOffsets[curBox().tbCur] += d;
- 399. - for (var i in ajaxCache) {
- 400. - if (i.match(new RegExp('^\\/' + cur.fnbxPage + '\\#act=' + (cur.fnbxAct || 'box'), ''))) {
- 401. - delete(ajaxCache[i]);
- 402. - }
- 403. - }
- 404. - },
- 405. - remove: function(oid) {
- 406. - re('fans_fan_row' + oid);
- 407. - FansBox.recache(-1);
- 408. - FansBox.onScroll();
- 409. - if (!domFC(ge('fans_rowsfans'))) {
- 410. - oid = cur.fnbxOwnerId;
- 411. - curBox().hide();
- 412. - showBox(cur.fnbxPage, {act: cur.fnbxAct || 'box', tab: 'fans', oid: oid});
- 413. - }
- 414. - },
- 415. -
- 416. - bigphOver: function(obj, uid) {
- 417. - if (!cur.lang || !cur.lang.global_photo_full_size || !cur.fnbxPhShown || browser.mobile) return;
- 418. - var o = obj.firstChild, ch = cur.fnbxPhCache[uid];
- 419. - if (o.tagName != 'A' || o.className != 'fans_fanph') {
- 420. - (o = obj.insertBefore(ce('a', {className: 'fans_fanph', href: ch && ch._id ? ('/photo' + ch._id + '?all=1') : ('/albums' + uid), innerHTML: '<span class="fans_fanph_label">' + getLang('global_photo_full_size') + '</span>'}), obj.firstChild)).onclick = FansBox.bigphClick.pbind(uid);
- 421. - o._uid = uid;
- 422. - }
- 423. -
- 424. - clearTimeout(o.hideTO);
- 425. - animate(o, {marginTop: 75}, {duration: 200, transition: Fx.Transitions.easeOutCirc});
- 426. - cur.fnbxPhShown[uid] = o;
- 427. -
- 428. - if (!obj.onmouseout) obj.onmouseout = FansBox.bigphOut.pbind(obj);
- 429. - },
- 430. - bigphOut: function(obj) {
- 431. - var o = obj.firstChild;
- 432. - if (!o || o.tagName != 'A' || o.className != 'fans_fanph') return;
- 433. -
- 434. - clearTimeout(o.hideTO);
- 435. - o.hideTO = setTimeout(function() {
- 436. - animate(o, {marginTop: 100}, 200);
- 437. - delete(cur.fnbxPhShown[o._uid]);
- 438. - }, 150);
- 439. - },
- 440. - bigphClick: function(uid, ev) {
- 441. - if (checkEvent(ev) !== false) return;
- 442. -
- 443. - var ch = cur.fnbxPhCache[uid], t = curBox().tbCur, o = cur.fnbxPhShown[uid], obj = domPN(o);
- 444. - if (!o || !obj) return;
- 445. - if (ch === undefined) {
- 446. - ch = cur.fnbxPhCache[uid] = 'show';
- 447. - ajax.post('al_photos.php', {act: 'fast_get_photo', oid: uid}, {onDone: function(res) {
- 448. - if (!res) {
- 449. - obj.onmouseover = function() {};
- 450. - re(o);
- 451. - return;
- 452. - }
- 453. - var sh = (cur.fnbxPhCache[uid] == 'show');
- 454. - cur.fnbxPhCache[uid] = res;
- 455. - o.href = '/photo' + res._id + '?all=1';
- 456. - if (sh) FansBox.bigphClick(uid);
- 457. - }, onFail: function() {
- 458. - obj.onmouseover = function() {};
- 459. - re(o);
- 460. - return true;
- 461. - }});
- 462. - }
- 463. - if (ch == 'show') {
- 464. - return cancelEvent(ev);
- 465. - }
- 466. - if (!ch) return;
- 467. -
- 468. - for (var i in cur.fnbxPhShown) {
- 469. - animate(cur.fnbxPhShown[i], {marginTop: 100}, 0);
- 470. - }
- 471. - cur.fnbxPhShown = false;
- 472. - extend(cur, {
- 473. - fnbxBack: {
- 474. - tab: t,
- 475. - initial: curBox().tbInitial,
- 476. - oid: cur.fnbxOwnerId,
- 477. - offsets: cur.fnbxOffsets,
- 478. - scroll: boxLayerWrap.scrollTop,
- 479. - query: cur.fnbxIdolsQuery,
- 480. - vis: isVisible('fans_more_link' + t) || isVisible('fans_more_prg' + t),
- 481. - cont: ge('fans_rows' + t)
- 482. - }
- 483. - });
- 484. - extend(ch, {
- 485. - jumpTo: {z: 'albums' + uid},
- 486. - onHide: function() {
- 487. - cur.fnbxLoaded = function() {
- 488. - var t = curBox().tbVis, cont = ge('fans_rows' + t), s = cur.fnbxBack.scroll;
- 489. - if (t != cur.fnbxBack.tab) {
- 490. - curBox().tbTab(cur.fnbxBack.tab);
- 491. - return;
- 492. - }
- 493. - extend(cur, {
- 494. - fnbxOffsets: cur.fnbxBack.offsets,
- 495. - fnbxIdolsQuery: cur.fnbxBack.query
- 496. - });
- 497. - domPN(cont).replaceChild(cur.fnbxBack.cont, cont);
- 498. - toggle('fans_more_link' + t, !!cur.fnbxBack.vis);
- 499. - hide('fans_more_prg' + t);
- 500. - cur.fnbxLoaded = cur.fnbxBack = false;
- 501. -
- 502. - boxLayerWrap.scrollTop = s;
- 503. - val('fans_idol_search_inp', cur.fnbxIdolsQuery);
- 504. - if (t == 'idols' && cur.fnbxIdolsQuery) {
- 505. - elfocus('fans_idol_search_inp');
- 506. - show('fans_reset_search');
- 507. - }
- 508. - setTimeout(function() { boxLayerWrap.scrollTop = s; onBodyResize(); FansBox.onScroll(); }, 0);
- 509. - }
- 510. - showBox(cur.fnbxPage, {act: cur.fnbxAct || 'box', tab: cur.fnbxBack.initial, oid: cur.fnbxBack.oid}, {cache: 1});
- 511. - }
- 512. - });
- 513. - cur.fnbxAutoload = false;
- 514. - return showPhoto(ch._id, 'album' + uid + '_0/rev', ch, ev);
- 515. - }
- 516. - };
- 517. -
- 518. - try{stManager.done('fansbox.js');}catch(e){}
- ------
Advertisement
Add Comment
Please, Sign In to add comment