1. #1
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    474
    Vote Rating
    5
    mysticav is on a distinguished road

      0  

    Default How to mimic the maximize function used by Sencha Code Preview on examples

    How to mimic the maximize function used by Sencha Code Preview on examples


    For instance, if you check this:
    http://docs.sencha.com/extjs/4.2.1/#...une/#tree-grid

    You have a Code Preview panel on the east region of a border layout. The interesting thing is that the panel has a maximizable button, a function that is only available in Ext Window Component.

    I would like to implement that functionality in my east region.

    Any idea ?

    Thanks.
    Using Ext with cachefly
    Working on LAMPExt

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,801
    Vote Rating
    605
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      1  

    Default


    All the source is there:

    Code:
        'codePreview tool[type=maximize]': {
            click: 'onMaximizeClick'
        },
    
        onMaximizeClick: function(){
            var preview = this.getCodePreview(),
                code = preview.getEl().down('.prettyprint').dom.innerHTML;
    
            var w = new Ext.window.Window({
                rtl: false,
                baseCls: 'x-panel',
                maximized: true,
                title: 'Code Preview',
                plain: true,
                cls: 'preview-container',
                autoScroll: true,
                bodyStyle: 'background-color:white',
                html: '<pre class="prettyprint">' + code + '</pre>',
                closable: false,
                tools: [{
                    type: 'close',
                    handler: function() {
                        w.hide(preview, function() {
                            w.destroy();
                        });
                    }
                }]
            });
            w.show(preview);
        },
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Brazil, Goias, Goiânia
    Posts
    427
    Vote Rating
    6
    wemerson.januario is on a distinguished road

      0  

    Default


    how to add the CodePreview panel to window maximized instead of the innerHTML?
    Wemerson Januario
    Twitter:
    @wemersonjanuar
    Skype:
    wemerson.januario
    Email: wemerson.januario@gmail.com
    Fone:
    62 9106-6689
    From: Goiânia, Brazil
    Desenvolvedor ExtJS/ ExtJS Developer

Thread Participants: 2

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..." hd porno faketaxi