Вход Регистрация
Файл: IPBMafia.ru_IPB_3.4.6_Final_Rus _Nulled/board/upload/admin/js/acp.permissions.js
Строк: 65
<?php
//------------------------------------------------------------------------------
// IPS JS: Permissions
// (c) 2008 Invision Power Services, Inc.
// http://www.invisionpower.com
// Brandon Farber - 16th December
//------------------------------------------------------------------------------

ACPPermissions = {
    
hasBeenLoaded:    false,
    
    
/*------------------------------*/
    /* Constructor                     */
    /*------------------------------*/
    
init: function()
    {
        
Debug.write("Initializing acp.permissions.js");
        
        
document.observe("dom:loaded", function(){
            
Event.observe
                            
'adminform'
                            
'submit'
                            function( 

                            { 
                                var 
checkboxes = $('perm-matrix').getElementsByTagName'input' );
                                
                                for( var 
0checkboxes.lengthi++ )
                                {
                                    if( 
checkboxes[i].checked )
                                    {
                                        return 
true;
                                    }
                                }
                                
                                if( 
confirm'Вы не выбрали никаких прав доступа. Хотите продолжить ?' ) )
                                {
                                    return 
true;
                                }
                                else
                                {
                                    
Event.stop);
                                }
                            }                     
                        );

            $$(
'.column_header').each( function(elem){
                
elem.observe"click"ACPPermissions.checkColumn );
            });
        });
    },
    
    
checkColumn: function(e)
    {
        
// Conditional to see if checkbox or cell was clicked...
        
        
try
        {
            var 
master    Event.findElemente'input' ).id;
            var 
checked    = $(master).checked 0;
            
            $(
master).checked    checked;
        }
        catch( 
error )
        {
            var 
master    Event.findElemente'td' ).down('input').id;
            var 
checked    = $(master).checked 1;
            $(
master).checked    checked;
        }

        var 
column    master.replace( /col_/, '' );
        
        var 
checkboxes = $('perm-matrix').getElementsByTagName'input' );
        
        for( var 
0checkboxes.lengthi++ )
        {
            var 
cbox checkboxes[i];
            
            if( 
cbox.id.match"^perm_(.+?)_" column ) )
            {
                
cbox.checked checked;
            }
        }
        
        
Event.stop(e);
        return 
false;
    },
    
    
checkRow: function( rowvalue )
    {
        var 
checkboxes = $('perm-matrix').getElementsByTagName'input' );
        
        for( var 
0checkboxes.lengthi++ )
        {
            var 
cbox checkboxes[i];
            
            if( 
cbox.id.match"^perm_" row "_(.+?)" ) )
            {
                
cbox.checked value;
            }
        }
    }
};

ACPPermissions.init();
?>
Онлайн: 3
Реклама