Version 3.1.4

This commit is contained in:
Neo committed 2025-12-19 00:32:22 -08:00
1 parent 1d4720f3e2
commit ae5c01cc78
2563 files changed
+283048 -240689

No files matched your search

+201 -10
View File
@@ -39,8 +39,11 @@ _idx.prototype.board = {
{
if ( ! ipb.board._statusClick )
{
$('hookStatusTextField').value = '';
$('hookStatusTextField').setStyle( { color: 'black' } );
if( $('hookStatusTextField') )
{
$('hookStatusTextField').value = '';
//$('hookStatusTextField').setStyle( { color: 'black' } );
}
ipb.board._statusClick = 1;
}
@@ -79,25 +82,42 @@ _idx.prototype.board = {
$(cat).select('.toggle')[0].observe( 'click', ipb.board.toggleCat );
});
cookie = ipb.Cookie.get('toggleCats');
cookie = ipb.Cookie.get('toggleCats');
if( cookie )
{
var cookies = cookie.split( ',' );
var cookies = cookie.split( ',' );
var newCookies = new Array();
var resetCookie = false;
//-------------------------
// Little fun for you...
//-------------------------
for( var abcdefg=0; abcdefg < cookies.length; abcdefg++ )
{
if( cookies[ abcdefg ] )
{
var wrapper = $( 'category_' + cookies[ abcdefg ] ).up('.category_block').down('.table_wrap');
wrapper.hide();
$( 'category_' + cookies[ abcdefg ] ).addClassName('collapsed');
if( $( 'category_' + cookies[ abcdefg ] ) )
{
var wrapper = $( 'category_' + cookies[ abcdefg ] ).up('.category_block').down('.table_wrap');
wrapper.hide();
$( 'category_' + cookies[ abcdefg ] ).addClassName('collapsed');
newCookies.push( cookies[ abcdefg ] );
}
else
{
resetCookie = true;
}
}
}
if( resetCookie )
{
ipb.Cookie.set( 'toggleCats', newCookies.join( ',' ) );
}
}
},
@@ -169,6 +189,8 @@ _idx.prototype.board = {
Debug.write("Stats are visible");
$('open_sidebar').hide();
$('close_sidebar').show();
ipb.board.setUpSideBarBlocks();
}
else
{
@@ -207,7 +229,7 @@ _idx.prototype.board = {
new Effect.Morph( $('categories'), { style: 'with_sidebar', duration: 0.4, afterFinish: function(){
$('categories').removeClassName('with_sidebar').removeClassName('no_sidebar');
new Effect.Appear( $('index_stats'), { duration: 0.4, queue: 'end', afterFinish: function(){
ipb.board.animating = false;
ipb.board.animating = false; $('index_stats').show(); ipb.board.setUpSideBarBlocks();
} } );
} } );
@@ -226,6 +248,175 @@ _idx.prototype.board = {
}
},
/**
* Add in collapsable icons
*/
setUpSideBarBlocks: function()
{
if( $('index_stats').visible() && ! $$('.index_stats_collapse').length )
{
$$('#index_stats h3').each( function(h3)
{
$( h3 ).identify();
/* Set title - fugly
Here we run through escape first to change foreign chars to %xx with xx being latin, and then we remove % after */
title = escape( $( h3 ).innerHTML.replace( /<(\/)?([^>]+?)>/g, '' ) ).replace( /%/g, '' );
title = title.replace( / /g, '' ).replace( /[^a-zA-Z0-9]/, '' ).toLowerCase();
$( h3 ).up('div').addClassName( '__xX' + title );
/* insert the image */
$( h3 ).update( '<a href="#" class="index_stats_collapse open">-</a>' + h3.innerHTML );
});
cookie = ipb.Cookie.get('toggleSBlocks');
if( cookie )
{
var cookies = cookie.split( ',' );
for( var abcdefg=0; abcdefg < cookies.length; abcdefg++ )
{
if( cookies[ abcdefg ] )
{
var top = $('index_stats').down('.__xX' + cookies[ abcdefg ] );
if ( top )
{
var wrapper = top.down('._sbcollapsable');
if ( ! wrapper )
{
wrapper = top.down('ul');
}
if ( ! wrapper )
{
wrapper = top.down('ol');
}
if ( ! wrapper )
{
wrapper = top.down('div');
}
if ( ! wrapper )
{
wrapper = top.down('table');
}
if ( wrapper )
{
if ( top.hasClassName('alt') )
{
top._isAlt = true;
top.removeClassName('alt');
}
wrapper.hide();
}
top.down('.index_stats_collapse').removeClassName('open').addClassName('close');
}
}
}
}
}
ipb.delegate.register(".index_stats_collapse", ipb.board.toggleSideBarBlock);
},
/**
* Toggle the block
*/
toggleSideBarBlock: function( e, elem )
{
Event.stop(e);
elem.identify();
var remove = $A();
cookie = ipb.Cookie.get('toggleSBlocks');
if( cookie == null )
{
cookie = $A();
}
else
{
cookie = cookie.split(',');
}
/* Test for known class name */
var top = elem.up('div');
moo = top.className.match('__xX([0-9А-Яа-яA-Za-z]+)');
topId = moo[1];
block = top.down('._sbcollapsable');
if ( ! $( block ) )
{
block = elem.up('div').down('ul');
}
if ( ! $( block ) )
{
block = elem.up('div').down('ol');
}
if ( ! $( block ) )
{
block = elem.up('div').down('div');
}
if ( ! $( block ) )
{
block = elem.up('div').down('table');
}
if ( $( block ) )
{
$( block ).identify();
ipb.board.animating = true;
if ( $( block ).visible() )
{
if ( $( top ).hasClassName('alt') )
{
$( top )._isAlt = true;
$( top ).removeClassName('alt');
}
top.down('.index_stats_collapse').removeClassName('open').addClassName('close');
Debug.write( "Adding " + topId );
cookie.push( topId );
}
else
{
if ( $( top )._isAlt )
{
$( top ).addClassName('alt');
}
top.down('.index_stats_collapse').removeClassName('close').addClassName('open');
Debug.write( "Removing " + topId );
remove.push( topId );
}
Effect.toggle( block, 'blind', {duration: 0.4, afterFinish: function(){ ipb.board.animating = false; } } );
}
cookie = "," + cookie.uniq().without( remove ).join(',') + ",";
ipb.Cookie.set('toggleSBlocks', cookie, 1);
},
/**
* Check for DST
*/
@@ -250,6 +441,6 @@ _idx.prototype.board = {
);
}
}
}
};
ipb.board.init();