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