1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    4
    Vote Rating
    0
    sppiii is on a distinguished road

      0  

    Default Updating Portal to 4.0 with Viewport Override

    Updating Portal to 4.0 with Viewport Override


    I am working on application that previously utilized the portal aspect of the ExtJS. I found this set of code that worked for ExtJS 3 (Provided in another ExtJS Forum a year or so ago):
    Code:
    Ext.override(Ext.container.Viewport, {
        initComponent : function() {
            Ext.container.Viewport.superclass.initComponent.call(this);
            this.el = Ext.get(this.el) || Ext.getBody();
            if (this.el.dom === document.body) {
                this.el.dom.parentNode.className += ' x-viewport';
            }
            this.el.setHeight = Ext.emptyFn;
            this.el.setWidth = Ext.emptyFn;
            this.el.setSize = Ext.emptyFn;
            this.el.dom.scroll = 'no';
            this.allowDomMove = false;
            this.autoWidth = true;
            this.autoHeight = true;
            Ext.EventManager.onWindowResize(this.fireResize, this);
            this.renderTo = this.el;
        }
    });
    And as for the Portal/Viewport Setup:
    Code:
    Ext.onReady(function(){
        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
    
        var viewport = new Ext.Viewport({
            el: "PaulsPortal",
            layout: 'anchor',
            items:[{
                xtype:'portal',
    ....................
    Can someone help with the equivalent for ExtJS 4? I would like to use the draw function in the portlets can cant seem to have the two version interact efficiently.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    4
    Vote Rating
    0
    sppiii is on a distinguished road

      0  

    Default


    I know it uses Viewport, and so does my old version. I just override the way it renders to the page.

    Is there a way to render a Viewport to a DIV specifically with ExtJS4 versus the entire page like it does by default?

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Yeah, use a Container instead.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    4
    Vote Rating
    0
    sppiii is on a distinguished road

      0  

    Default


    I am a noob to ExtJS and with javascript in general. Can you provide an example using the ExtJS 4 source?

Similar Threads

  1. portal (Viewport) in ajax tab
    By nuno.s in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 14 Dec 2009, 10:18 AM
  2. ViewPort, Portal & Single Scrollbar
    By LovingIt in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 27 Aug 2008, 7:18 AM
  3. [Ext 2.1] Portal + viewport : JS error in IE after reload
    By milou in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 15 Jul 2008, 11:41 PM
  4. portal example in a panel (not viewport)?
    By aktxyz in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 2 Jan 2008, 3:59 AM

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