Файл: view/profile/js/js_profile_index.js
Строк: 118
__lq = layerQueue = {
push: function(onShow) {
var clayer, last = __lq.count() ? __lq._layers[__lq._layers.length - 1] : false;
if (cur.pvShown && cur.pvListId != 'temp') {
clayer = ['photo', cur.pvData[cur.pvListId][cur.pvIndex].id, cur.pvListId, {onHide: cur.pvOptions.onHide, scroll: layerWrap.scrollTop, onShow: onShow, noHistory: !!cur.pvNoHistory, histLen: cur.pvHistoryLength}];
} else if (window.mvcur && mvcur.mvShown && !mvcur.minimized) {
clayer = ['video', mvcur.videoRaw, mvcur.listId, {scroll: mvLayerWrap.scrollTop, noHistory: !!mvcur.noHistory, nomin: true, prevLoc: mvcur.mvPrevLoc}];
} else if (window.wkcur && wkcur.shown) {
clayer = ['wiki', wkcur.wkRaw, false, {toScroll: wkLayerWrap.scrollTop, prevLoc: wkcur.prevLoc, myLoc: wkcur.myLoc}];
} else {
return false;
}
if (!last || clayer[0] != last[0] || clayer[1] != last[1] || clayer[2] != last[2]) {
__lq._layers.push(clayer);
}
__lq.skipVideo = false;
return true;
},
noHistory: function() {
for (var a = __lq._layers, i = a.length; i > 0; --i) {
if (a[i - 1][0] == 'photo') {
a[i - 1][3].noHistory = 1;
} else if (a[i - 1][0] == 'video') {
a[i - 1][3].noHistory = 1;
}
}
},
hide: function() {
__lq._bl = true;
if (window.WkView && layers.fullhide == WkView.hide) {
debugLog('hiding only wkLayerWrap');
hide(wkLayerWrap);
clearTimeout(wkcur.showT);
} else {
debugLog('hiding full in layerQueue.hide');
if (layers.fullhide) layers.fullhide(true, true);
}
setTimeout(layerQueue.unblock, 5);
},
unblock: function() {
__lq._bl = false;
},
pop: function() {
if (!__lq.count() || __lq._bl) return;
debugLog('popping..');
var last = __lq._layers.pop();
if (__lq.skipVideo) {
__lq.skipVideo = false;
if (last[0] == 'video') {
debugLog('no video pop');
__lq._layers.push(last);
__lq.skipVideo = false;
return;
}
}
if (last[0] == 'photo') {
extend(last[3], {fromQueue: true});
showPhoto(last[1], last[2], last[3], false);
} else if (last[0] == 'video') {
extend(last[3], {fromQueue: true});
showVideo(last[1], last[2], last[3], false);
} else if (last[0] == 'wiki') {
showWiki({w: last[1]}, false, false, last[3]);
}
},
back: function(type, id, type2, id2) {
debugLog('pop from back');
for (var a = __lq._layers, i = a.length; i > 0; --i) {
if ((a[i - 1][0] == type && a[i - 1][1] == id) || (a[i - 1][0] == type2 && a[i - 1][1] == id2)) {
__lq._layers = a.slice(0, i);
__lq.pop();
return true;
}
}
debugLog('not found: ' + type + ' ' + id + ' ' + type2 + ' ' + id2);
return false;
},
count: function() {
return __lq._layers.length;
},
clear: function() {
debugLog('clearing..');
__lq._layers = [];
},
_layers: []
};
cur.lang = extend(cur.lang || {}, {
wall_my_friends_only: '<?=Lang::get("wall_my_friends_only")?>',
show_full: '<?=Lang::get("show_full")?>',
hide_full: '<?=Lang::get("hide_full")?>',
change_current_info: '<?=Lang::get("change_current_info")?>',
share_current_info: '<?=Lang::get("share_current_info")?>',
wall_link_label: '<?=Lang::get("wall_link_label")?>',
create_poll: '<?=Lang::get("create_poll")?>',
dont_attach: '<?=Lang::get("dont_attach")?>',
publish_postponed_title: '<?=Lang::get("publish_postponed_title")?>',
publish_postponed_confirm: '<?=Lang::get("publish_postponed_confirm")?>',
publish_postponed_btn: '<?=Lang::get("publish_postponed_btn")?>',
profile_gifts_hide_button: '<?=Lang::get("profile_gifts_hide_button")?>',
profile_sure_hide_gifts: '<?=Lang::get("profile_sure_hide_gifts")?>',
profile_photo_hide: '<?=Lang::get("profile_photo_hide")?>'
});
Profile.init({
"user_id":<?=Cur::get('id')?>,
"loc":"<?=Cur::get('loc')?>",
"share":{
"url":"http://cs6077.vk.com/upload.php",
"hash":"83915f0690d381a53138c18def9a3e6f",
"rhash":"1c32ee281c2d6cf5a10e0f96eaa2967f",
"timehash":"1370440132_73c8d0284ef5ec9580"
},
"upload":{
"url":"http://cs416518.vk.com/upload.php",
"params":{
"act":"do_add",
"aid":-14,
"gid":0,
"mid":10239827,
"hash":"3851a071906f38ca4ba34577a2317df6",
"rhash":"6079d3b5ddc99afa1f25c5c8da2fc011",
"vk":1,
"from_host":"vk.com"
}
},
"info_hash":"<?=Cur::get('info_hash')?>",
"photo_hash":"07cd37ecbdb6fd3ebe",
"profph_hash":"cb9eb6706818635605",
"photos_upload":{
"url":"http://cs416518.vk.com/upload.php",
"params":{
"act":"do_add",
"aid":-7,
"gid":0,
"mid":10239827,
"hash":"2618a1b02f5b8716bf9b8bcf53d8439f",
"rhash":"d4d586c5852582053d8035f753965776",
"vk":1,
"from_host":"vk.com"
}
}
});
cur.module = 'profile';