Kacper Wojciechowski
- Mentor MyBB
- 858 119 156 43
wersja skryptu MyBB: 1.6.16
adres forum: http://gvs-p4s.cba.pl/index.php
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu): Nie działa zwijanie działów, mój forumbit_depth1_cat
oraz newfunctions.js :
adres forum: http://gvs-p4s.cba.pl/index.php
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu): Nie działa zwijanie działów, mój forumbit_depth1_cat
<div id="cat_{$forum['fid']}" class="content">
<div class="thead" id="th{$forum['fid']}">
<span class="forumtitle"><a href="{$forum_url}">{$forum['name']}</a></span><span class="forumdesc">{$forum['description']}</span>
<span class="expcolimage expcol_close"><img src="images/neonglow/collapse.gif" /></span>
<span class="expcolimage expcol_open"><img src="images/neonglow/collapse_collapsed.gif" /></span>
</div>
<div id="expcol_box{$forum['fid']}">
<table border="0" cellspacing="0" cellpadding="4" class="tborder tborder_2">
<tbody style="">
{$sub_forums}
</tbody>
</table>
</div>
<br />
</div>
oraz newfunctions.js :
$(document).ready(function () {
var file_name, file_end, file_page, ucplink, dicon, ucpbox, sidebar, sidebarToggle, expopen, expclose, thead2, thead, thead_id, n, cookies, name, thnum, quoted, quoted_split;
// Animated expand/collapse
expopen = '.expcol_open';
expclose = '.expcol_close';
thead2 = '.thead_2';
$(expclose).on("click", function () {
thead = $(this).parent(thead2);
thead_id = $(this).parent(thead2).attr("id");
n = parseInt(thead_id.replace('th', ''), 10);
$("#expcol_box" + n).slideUp();
$(this).hide();
thead.children(expopen).show();
thead.animate({
"border-radius": "5px",
"opacity": "0.4"
});
$.cookie(n, "closed", {
expires: 365
});
return false;
});
$(expopen).on("click", function () {
thead = $(this).parent(thead2);
thead_id = $(this).parent(thead2).attr("id");
n = parseInt(thead_id.replace('th', ''), 10);
$("#expcol_box" + n).slideDown();
$(this).hide();
thead.children(expclose).show();
thead.animate({
"border-radius": "5px",
"opacity": "1"
});
$.cookie(n, "open", {
expires: 365
});
return false;
});
// Restore collapses
function get_cookies() {
cookies = {};
if (document.cookie && document.cookie !== '') {
var split, i, name_value;
split = document.cookie.split(';');
for (i = 0; i < split.length; i += 1) {
name_value = split[i].split("=");
name_value[0] = name_value[0].replace(/^ /, '');
cookies[decodeURIComponent(name_value[0])] = decodeURIComponent(name_value[1]);
}
}
return cookies;
}
cookies = get_cookies();
for (name in cookies) {
if (cookies[name] === 'closed') {
$("#expcol_box" + name).hide();
thnum = $("#th" + name);
thnum.css('opacity', '0.4');
thnum.find('.expcol_open').show();
thnum.find('.expcol_close').hide();
}
}
// Multiquote fix
if ($.cookie('multiquote') !== null) {
quoted = $.cookie("multiquote");
quoted_split = quoted.split('|');
$.each(quoted_split, function () {
$('#multiquote_link_' + this).addClass('multiquote_on');
});
}
$('a.postbit_multiquote').click(function () {
if ($(this).hasClass('multiquote_on')) {
$(this).removeClass('multiquote_on');
} else {
$(this).addClass('multiquote_on');
}
});
});