1. #1
    Ext User
    Join Date
    Mar 2008
    Posts
    9
    Vote Rating
    0
    Javiera is on a distinguished road

      0  

    Default Custom Boolean Toggle for Editor Grid

    Custom Boolean Toggle for Editor Grid


    Anyone interested in an iphone-style toggle? Perhaps for editor /property grids? I think it would be a neat alternative to a check or combo box. Thoughts?

    PHP Code:
    <html><head>
            <
    script type="text/javascript">
                
    Ext.onReady(function(){
                    var 
    toggle 'off';
                    var 
    tpl = {
                        
    on: new Ext.Template('<img src="btn_on.jpg">'),
                        
    off: new Ext.Template('<img src="btn_off.jpg">')
                    };
                    
    Ext.get("btn").on('click', function() {
                        
    tpl[toggle].overwrite('btn');
                        
    toggle = (toggle == 'on') ? 'off' 'on';
                    });
                });
            
    </script>
    </head>
    <body>
            <a id="btn"><img src="btn_off.jpg"></a>
    </body>
    </html> 
    Attached Images

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    87
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    You could modify the CSS for Ext.grid.CheckColumn and Ext.ux.form.Combobox to use these images.

    ps. The images are a bit large. They won't fit nicely into the Ext JS theme.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."