File: doc/js/template.js

Recommend this page to a friend!
  Classes of Everton da Rosa  >  PHP4Console  >  doc/js/template.js  >  Download  
File: doc/js/template.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP4Console
Render text and shapes in a terminal console
Author: By
Last change:
Date: 5 years ago
Size: 1,255 bytes
 

Contents

Download
function filterElements() {
    inherited = !$('#show-inherited').hasClass('deselected');
    public = !$('#show-public').hasClass('deselected');
    protected = !$('#show-protected').hasClass('deselected');
    private = !$('#show-private').hasClass('deselected');

    $('div.public').each(function(index, val) {
        $(val).toggle(public && !($(val).hasClass('inherited_from') && !inherited));
    });
    $('div.protected').each(function(index, val) {
        $(val).toggle(protected && !($(val).hasClass('inherited_from') && !inherited));
    });
    $('div.private').each(function(index, val) {
        $(val).toggle(private && !($(val).hasClass('inherited_from') && !inherited));
    });
}

$(document).ready(function() {
    $('#show-public, #show-protected, #show-private, #show-inherited')
            .css('cursor', 'pointer')
            .click(function() {
                $(this).toggleClass('deselected');
                if ($(this).hasClass('deselected')) {
                    $(this).fadeTo('fast', '0.4');
                } else {
                    $(this).fadeTo('fast', '1.0');
                }
                filterElements();
                return false;
            });
    $('#show-protected, #show-private').click();
});

For more information send a message to info at phpclasses dot org.