1. #1
    Ext User
    Join Date
    Jun 2009
    Posts
    7
    Vote Rating
    0
    sol is on a distinguished road

      0  

    Default [Doc System][Suggestion] Filter methods

    [Doc System][Suggestion] Filter methods


    Looking for a class via the doc system is an easy task, but locating a certain method/property/etc from hundreds of them is not that entertaining.

    So how about putting a "filter" field to the 'DocPanel' (docs.js)?

    Here i got a quick mock-up to show this - add this text field to DocPanel.tbar[]:

    method-filter-field.png

    Code:
    {
        xtype: 'textfield',
        emptyText: 'Filter Methods',
        listeners: {
            specialkey: function(field, e) {
                switch (e.getKey()) {
                    case e.ENTER:
                        field.doFilter(field.getValue());
                    break;
                   
                    case e.ESC:
                        field.setValue('');
                        field.doFilter(field.getValue());
                    break;
                }
            }
        },
        doFilter: function(term) {
            $('.member-table tr').hide();
            $('.member-table tr:first').show();
            $('.member-table').each(function(i){
                $('tr td', this).each(function(){
                    var $td = $(this);
                    if ($td.index() == 1) {
                        var text = $('b:first', $td).text();
                        var pattern = new RegExp('.*' + term + '.*', 'i');
                        if (pattern.test(text)) {
                            $td.parent().show();
                            $td.show();
                        }
                    }
                });
            });
        }
    }
    For demo's sake, i choose jQuery for low-level dom operation (i'm more familiar with it at the low-level part), you may wish to use ext-core instead.

    HTH
    Last edited by sol; 16 Jul 2010 at 12:51 AM. Reason: screenshot

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2009
    Posts
    309
    Vote Rating
    2
    azuroff will become famous soon enough

      0  

    Default


    +1

    I like it.

Similar Threads

  1. Replies: 4
    Last Post: 11 Oct 2011, 1:20 PM
  2. How To switch Development System to Production System
    By extjs_mahendra in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 22 Dec 2009, 8:47 AM
  3. API Doc: What are the methods for Object?
    By wyattbiker in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 24 Jun 2009, 1:05 PM
  4. [2.2] Minor, Docs - Class filter field inappropriately applies filter
    By jay@moduscreate.com in forum Ext 2.x: Bugs
    Replies: 0
    Last Post: 5 Nov 2008, 4:01 AM

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar