1. #21
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,649
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    btw - i really like the $(), so this can be done also:
    var $ = Ext.select;

    Why isn't that used in ExtJS? Many newcomers know that from the other libraries.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  2. #22
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Answers
    13
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by evant View Post
    A filter method that accepts a function would be good. I'm playing around with some code now:

    Code:
    Ext.onReady(function(){
        for(var i = 0; i < 10; ++i){
            Ext.getBody().createChild({
                tag: 'div',
                cls: i % 2 == 0 ? 'foo' : 'bar'
            });
        }
        console.log(Ext.select('div').filter('.foo').getCount());
        console.log(Ext.select('div').filter(function(el){
            return el.is('.foo');
        }).getCount());
    });
    Obvoiusly both return the same results.
    That's good. What about maintaining functional parity with jQuery with those other things? nextAll and andSelf were pretty easy to add in. If there are any others, they could go in too.

    I also think the ability to add pseudos should be highlighted in the "textual" Core Manual.

    The following is an intuitive way of selecting external links:

    Code:
    Ext.select("a:external");

  3. #23
    Sencha User
    Join Date
    Aug 2009
    Posts
    41
    Vote Rating
    0
    Dig4Fire is on a distinguished road

      0  

    Default


    PHP Code:
    $('body').removeClass(); 
    How to remove all classes from body (for example) in Ext?

  4. #24
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Answers
    28
    Vote Rating
    8
    TommyMaintz will become famous soon enough

      0  

    Default


    Quote Originally Posted by Dig4Fire View Post
    PHP Code:
    $('body').removeClass(); 
    How to remove all classes from body (for example) in Ext?
    PHP Code:
    document.body.className ''
    For some things you just dont need a library hehe. Please lets not forget we are still doing Javascript development, and doing things as trivial as this should really be straightforward for any developer using javascript.

  5. #25
    Sencha User
    Join Date
    Aug 2009
    Posts
    41
    Vote Rating
    0
    Dig4Fire is on a distinguished road

      0  

    Default Remove an event handler

    Remove an event handler


    PHP Code:
    $(document).ready(function() {
      $(
    '#switcher').click(function(event) {
        if (!$(
    event.target).is('.button')) {
          $(
    '#switcher .button').toggleClass('hidden');
        }
      });
      
      $(
    '#switcher-narrow, #switcher-large').click(function() {
        $(
    '#switcher').unbind('click');
      });
    }); 
    How to remove (unbind) the event handler in Ext?

    This code doesn't work:
    PHP Code:
        Ext.select('#switcher').un('click'this.handlerFn); 

  6. #26
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Answers
    28
    Vote Rating
    8
    TommyMaintz will become famous soon enough

      0  

    Default


    PHP Code:
    Ext.onReady(function() {
      var 
    handlerFn = function(ev) {
        if (!
    ev.getTarget('.button')) {
          
    Ext.select('.button''switcher').toggleClass('hidden');
        }
      }

      
    Ext.fly('switcher').on('click'handlerFn);
      
      
    Ext.select('#switcher-narrow, #switcher-large').on('click', function() {
        
    Ext.fly('switcher').un('click'handlerFn);
      });
    }); 

  7. #27
    Sencha User
    Join Date
    Aug 2009
    Posts
    41
    Vote Rating
    0
    Dig4Fire is on a distinguished road

      0  

    Default Event Namespacing

    Event Namespacing


    Thank you. What about Event Namespacing to manage specific event handlers?
    PHP Code:
    $(document).ready(function() {
      $(
    '#switcher').bind('click.collapse', function(event) {
        if (!$(
    event.target).is('.button')) {
          $(
    '#switcher .button').toggleClass('hidden');
        }
      });
      
      $(
    '#switcher-narrow, #switcher-large').click(function() {
        $(
    '#switcher').unbind('click.collapse');
      });
    }); 

  8. #28
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Answers
    13
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    What does using an event name like "click.collapse" mean?

  9. #29
    Ext JS Premium Member
    Join Date
    Jun 2009
    Location
    Eastern WA, US
    Posts
    78
    Vote Rating
    0
    jnicora is on a distinguished road

      0  

    Default


    jQuery uses event namespaces to filter bindings. Event namespaces work like this: ("type.namespace"). This link explains it: http://www.learningjquery.com/2007/0...ce-your-events

    I haven't personally had a situation where this functionality is useful.

  10. #30
    Sencha User
    Join Date
    Aug 2009
    Posts
    41
    Vote Rating
    0
    Dig4Fire is on a distinguished road

      0  

    Default


    The .collapse suffix is invisible to the event handling system. The addition of the namespace means that you can unbind just this handler. Event namespacing is especially handy in the creation of plugins.

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