Current state
This commit is contained in:
285
public/legacy/js/sbcode.js
Normal file
285
public/legacy/js/sbcode.js
Normal file
@@ -0,0 +1,285 @@
|
||||
var m_browser=0;
|
||||
var m_browser2=0;
|
||||
var m_browser3=0;
|
||||
var selected_tab = 0;
|
||||
var m_html = '<br/><br/><div align="center"><img src="/gfx/loading.gif" alt="" /></div><br/><br/>';
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$(".selectme").select2();
|
||||
|
||||
var $container = $('.gallery_container');
|
||||
$container.imagesLoaded( function(){
|
||||
$container.isotope({
|
||||
itemSelector : '.photo_frame',
|
||||
layoutMode : 'masonry'
|
||||
});
|
||||
});
|
||||
|
||||
if ($("#boks").length>0) {
|
||||
InitChat();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function expw(listID)
|
||||
{
|
||||
if (document.getElementById(listID).style.display=="none")
|
||||
{
|
||||
document.getElementById(listID).style.display="";
|
||||
document.getElementById(listID).style.visibility="visible";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById(listID).style.display="none";
|
||||
document.getElementById(listID).style.visibility="hidden";
|
||||
}
|
||||
}
|
||||
|
||||
function contw(listID)
|
||||
{
|
||||
if (listID.style.display=="show") {listID.style.display="";}
|
||||
else {listID.style.display="none";}
|
||||
window.event.cancelBubble=true;
|
||||
}
|
||||
|
||||
function Confirm(link,text) {
|
||||
if(confirm(text))
|
||||
window.location=link
|
||||
}
|
||||
|
||||
function fixLeftNav(pos) {
|
||||
return;
|
||||
}
|
||||
|
||||
function fixRightNav(pos) {
|
||||
return;
|
||||
}
|
||||
|
||||
function getWinWidth()
|
||||
{
|
||||
var myWidth = 0, myHeight = 0;
|
||||
if( typeof( window.innerWidth ) == 'number' )
|
||||
{
|
||||
//Non-IE
|
||||
myWidth = window.innerWidth;
|
||||
myHeight = window.innerHeight;
|
||||
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
|
||||
//IE 6+ in 'standards compliant mode'
|
||||
myWidth = document.documentElement.clientWidth;
|
||||
myHeight = document.documentElement.clientHeight;
|
||||
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
|
||||
//IE 4 compatible
|
||||
myWidth = document.body.clientWidth;
|
||||
myHeight = document.body.clientHeight;
|
||||
}
|
||||
//window.alert( 'Width = ' + myWidth );
|
||||
//window.alert( 'Height = ' + myHeight );
|
||||
return myWidth;
|
||||
}
|
||||
|
||||
function DeleteMessage(id,box)
|
||||
{
|
||||
$("#msgList").html(m_html);
|
||||
$("#msgShow").html('');
|
||||
$("#msgList").load("GET", "/privmsg.php?ajax=true&action=DelMsg&box="+box+"&id="+id);
|
||||
}
|
||||
|
||||
function showCategories2(namek)
|
||||
{
|
||||
if(namek == 0)
|
||||
{
|
||||
visina = 430;
|
||||
levo = 160;
|
||||
}
|
||||
else if(namek == 1)
|
||||
{
|
||||
visina = 140;
|
||||
levo = 52;
|
||||
}
|
||||
else
|
||||
{
|
||||
visina = findPosY(namek) + 23;
|
||||
levo = findPosY(namek) + 30;
|
||||
}
|
||||
document.getElementById('mainDisplay2').style.top = visina+"px";
|
||||
document.getElementById('mainDisplay2').style.left = levo+"px";
|
||||
m_browser2 = m_browser2+1;
|
||||
if(m_browser2==2)
|
||||
{
|
||||
document.getElementById("mainDisplay2").style.visibility = "hidden";
|
||||
m_browser2 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("mainDisplay2").style.visibility = "visible";
|
||||
updateSkinBrowser("displayCategories2",0,0);
|
||||
}
|
||||
}
|
||||
|
||||
function checkMovement()
|
||||
{
|
||||
return;
|
||||
width = getWinWidth();
|
||||
if(width>1036)
|
||||
{
|
||||
document.getElementById("mainContent").style.marginLeft = '150px';
|
||||
document.getElementById("mainNav").style.visibility = "visible";
|
||||
document.getElementById("leftMain").style.width = 140+'px';
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("mainContent").style.marginLeft = '20px';
|
||||
document.getElementById("leftMain").style.width = 10+'px';
|
||||
document.getElementById("mainNav").style.visibility = "hidden";
|
||||
}
|
||||
|
||||
if(width<894)
|
||||
{
|
||||
document.getElementById("mainContent").style.marginRight = '20px';
|
||||
document.getElementById("rightMain").style.width = 10+'px';
|
||||
document.getElementById("rightNav").style.visibility = "hidden";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("mainContent").style.marginRight = '150px';
|
||||
document.getElementById("rightNav").style.visibility = "visible";
|
||||
document.getElementById("rightMain").style.width = 140+'px';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ShowOnlineList()
|
||||
{
|
||||
$("#onlineList").load("/include/showOnline.php");
|
||||
}
|
||||
|
||||
function updateSkinBrowser(divID,id,subid)
|
||||
{
|
||||
$(divID).html(m_html);
|
||||
$(divID).load("/include/skinBrowser.php?id="+id+"&subid="+subid+"&divID="+divID);
|
||||
}
|
||||
|
||||
function findPosX(obj)
|
||||
{
|
||||
var curleft = 0;
|
||||
if(obj.offsetParent)
|
||||
while(1)
|
||||
{
|
||||
curleft += obj.offsetLeft;
|
||||
if(!obj.offsetParent)
|
||||
break;
|
||||
obj = obj.offsetParent;
|
||||
}
|
||||
else if(obj.x)
|
||||
curleft += obj.x;
|
||||
return curleft;
|
||||
}
|
||||
|
||||
function findPosY(obj)
|
||||
{
|
||||
var curtop = 0;
|
||||
if(obj.offsetParent)
|
||||
while(1)
|
||||
{
|
||||
curtop += obj.offsetTop;
|
||||
if(!obj.offsetParent)
|
||||
break;
|
||||
obj = obj.offsetParent;
|
||||
}
|
||||
else if(obj.y)
|
||||
curtop += obj.y;
|
||||
return curtop;
|
||||
}
|
||||
|
||||
// *** Chat ***
|
||||
function InitChat()
|
||||
{
|
||||
$("#boks").load("/show_chat.php");
|
||||
setTimeout("InitChat()", 2000);
|
||||
}
|
||||
|
||||
// Private Message
|
||||
function ShowPrivateMessage(id)
|
||||
{
|
||||
$("#msgShow").html(m_html);
|
||||
$("#msgShow").load("/privmsg.php?ajax=true&action=ShowMsg&id="+id);
|
||||
}
|
||||
|
||||
function ShowPrivateMessageList(box,id)
|
||||
{
|
||||
if(box !== 'new')
|
||||
{
|
||||
$("#msgList").html(m_html);
|
||||
$("#msgShow").html();
|
||||
}
|
||||
if(box == 'new')
|
||||
$("#mshShow").load("/privmsg.php?ajax=true&action=msgList&box="+box+"&id="+id);
|
||||
else
|
||||
$("#mshList").load("/privmsg.php?ajax=true&action=msgList&box="+box+"&id="+id);
|
||||
}
|
||||
|
||||
function SaveMessage(id)
|
||||
{
|
||||
$("#msgList").html(m_html);
|
||||
$("#msgShow").html('');
|
||||
$("#msgList").load("/privmsg.php?ajax=true&action=SaveMsg&id="+id);
|
||||
}
|
||||
|
||||
// Daily Uploads
|
||||
function showDailySkins(datums,x)
|
||||
{
|
||||
$("#myContent").html(m_html);
|
||||
if(selected_tab>0)
|
||||
{
|
||||
$('#tab-'+selected_tab).css("font-weight","normal");
|
||||
$('#tab-'+selected_tab).css("background","#eee");
|
||||
//document.getElementById('tab-'+selected_tab).style.backgroundColor = '#eee';
|
||||
}
|
||||
$('#tab-'+selected_tab).css("font-weight","bold");
|
||||
$('#tab-'+selected_tab).css("background","#ccc");
|
||||
|
||||
/*
|
||||
document.getElementById('tab-'+x).style.fontWeight = 'bold';
|
||||
document.getElementById('tab-'+x).style.backgroundColor = '#ccc';
|
||||
*/
|
||||
selected_tab = x;
|
||||
|
||||
$("#myContent").load("/recent.php?ajax=true&datum="+datums);
|
||||
}
|
||||
|
||||
//uploads manager
|
||||
function ShowSkin(id)
|
||||
{
|
||||
$("#msgShow").html(m_html);
|
||||
$("#msgShow").load("/manul.php?ajax=true&action=ShowSkin&id="+id);
|
||||
}
|
||||
|
||||
function put_smiley(smiley,outp)
|
||||
{
|
||||
var data = $("#"+outp).val();
|
||||
$("#"+outp).val(data + smiley);
|
||||
//document.forms['newMsg'].comment.value += ' ' + smiley + ' ';
|
||||
//document.forms['newMsg'].comment.focus();
|
||||
}
|
||||
|
||||
function put_smiley2(smiley,outp)
|
||||
{
|
||||
document.forms['newMsg'].Review.value += ' ' + smiley + ' ';
|
||||
document.forms['newMsg'].Review.focus();
|
||||
}
|
||||
|
||||
function UpdateCategoriesBox() {
|
||||
var id = document.forma.section_filter.options[document.forma.section_filter.selectedIndex].value;
|
||||
$("#mySectionList").load("/uploads.php?ajax=true&action=updateCats&id="+id);
|
||||
}
|
||||
|
||||
function updateSubgroups() {
|
||||
var id = document.browser.groups.options[document.browser.groups.selectedIndex].value;
|
||||
$("#skinGroups").load("/include/get_groups.php?id="+id);
|
||||
}
|
||||
|
||||
function removeNotice(id) {
|
||||
alert(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user