Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
@@ -13,6 +13,7 @@ _forums.prototype.forums = {
|
||||
totalChecked: 0,
|
||||
showMod: [],
|
||||
fetchMore: {},
|
||||
existingTidValue: '',
|
||||
modOptionsUnapproved: 0,
|
||||
modOptionsPinned: 0,
|
||||
modOptionsUnpinned: 0,
|
||||
@@ -29,6 +30,7 @@ _forums.prototype.forums = {
|
||||
ipb.forums.initEvents();
|
||||
});
|
||||
},
|
||||
|
||||
initEvents: function()
|
||||
{
|
||||
if( $('forum_load_more') ){
|
||||
@@ -36,6 +38,11 @@ _forums.prototype.forums = {
|
||||
$('more_topics').show();
|
||||
}
|
||||
|
||||
if( $('selectedtids') )
|
||||
{
|
||||
ipb.forums.existingTidValue = $('selectedtids').value;
|
||||
}
|
||||
|
||||
/* Set up mod checkboxes */
|
||||
if( $('tmod_all') )
|
||||
{
|
||||
@@ -54,7 +61,12 @@ _forums.prototype.forums = {
|
||||
Event.stop(e);
|
||||
if( !ipb.forums.fetchMore ){ return; }
|
||||
|
||||
ipb.forums.fetchMore['st'] = parseInt(ipb.forums.fetchMore['st']) + parseInt(ipb.forums.fetchMore['max_topics']);
|
||||
if( ipb.forums.fetchMore['page'] == 0 )
|
||||
{
|
||||
ipb.forums.fetchMore['page'] = 1;
|
||||
}
|
||||
|
||||
ipb.forums.fetchMore['page'] = parseInt(ipb.forums.fetchMore['page']) + 1;
|
||||
|
||||
var url = ipb.vars['base_url'] + "app=forums&module=ajax§ion=forums&do=getTopics&md5check="+ipb.vars['secure_hash'] + "&" + $H(ipb.forums.fetchMore).toQueryString();
|
||||
Debug.write( url );
|
||||
@@ -428,7 +440,7 @@ _forums.prototype.forums = {
|
||||
updateTopicModButton: function( )
|
||||
{
|
||||
/* Do we have any checked? */
|
||||
if( ipb.forums.totalChecked > 0 )
|
||||
if( ipb.forums.totalChecked > 0 && ipb.templates['topic_moderation'] )
|
||||
{
|
||||
/* Yes! Have we loaded in the HTML for the box? */
|
||||
if( !$('comment_moderate_box') )
|
||||
@@ -454,43 +466,53 @@ _forums.prototype.forums = {
|
||||
/* Update the available options */
|
||||
$('tactInPopup').select('option').invoke('remove');
|
||||
|
||||
if ( ipb.forums.modOptionsUnapproved )
|
||||
if ( ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modOptionsUnapproved ) && ipb.forums.modPerms['approve'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'approve' } ).update( ipb.lang['cpt_approve_f'] ) );
|
||||
}
|
||||
|
||||
if ( ipb.forums.modOptionsUnpinned )
|
||||
if ( ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modOptionsUnpinned ) && ipb.forums.modPerms['pin'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'pin' } ).update( ipb.lang['cpt_pin_f'] ) );
|
||||
}
|
||||
|
||||
if ( ipb.forums.modOptionsPinned )
|
||||
if ( ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modOptionsPinned ) && ipb.forums.modPerms['unpin'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'unpin' } ).update( ipb.lang['cpt_unpin_f'] ) );
|
||||
}
|
||||
|
||||
if ( ipb.forums.modOptionsLocked )
|
||||
if ( ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modOptionsLocked ) && ipb.forums.modPerms['open'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'open' } ).update( ipb.lang['cpt_open_f'] ) );
|
||||
}
|
||||
if ( ipb.forums.modOptionsUnlocked )
|
||||
if ( ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modOptionsUnlocked ) && ipb.forums.modPerms['close'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'close' } ).update( ipb.lang['cpt_close_f'] ) );
|
||||
}
|
||||
|
||||
$('tactInPopup').insert( new Element('option', { value: 'move' } ).update( ipb.lang['cpt_move_f'] ) );
|
||||
$('tactInPopup').insert( new Element('option', { value: 'merge' } ).update( ipb.lang['cpt_merge_f'] ) );
|
||||
if ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modPerms['move'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'move' } ).update( ipb.lang['cpt_move_f'] ) );
|
||||
}
|
||||
|
||||
if ( ipb.forums.modOptionsNotHidden )
|
||||
if ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modPerms['merge'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'merge' } ).update( ipb.lang['cpt_merge_f'] ) );
|
||||
}
|
||||
|
||||
if ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modOptionsNotHidden && ipb.forums.modPerms['hide'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'delete' } ).update( ipb.lang['cpt_hide_f'] ) );
|
||||
}
|
||||
if ( ipb.forums.modOptionsHidden )
|
||||
if ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modOptionsHidden && ipb.forums.modPerms['unhide'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'sundelete' } ).update( ipb.lang['cpt_unhide_f'] ) );
|
||||
}
|
||||
|
||||
$('tactInPopup').insert( new Element('option', { value: 'deletedo' } ).update( ipb.lang['cpt_delete_f'] ) );
|
||||
if ( ipb.forums.existingTidValue.length > 0 || ipb.forums.modPerms['delete'] )
|
||||
{
|
||||
$('tactInPopup').insert( new Element('option', { value: 'deletedo' } ).update( ipb.lang['cpt_delete_f'] ) );
|
||||
}
|
||||
|
||||
$('multiModOptions').select('option').each( function( item ){
|
||||
$('tactInPopup').insert( $( item ).clone().update( item.innerHTML ) );
|
||||
|
||||
Reference in new issue
Block a user