Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member watrboy00's Avatar
    Join Date
    Aug 2007
    Location
    Minneapolis, MN
    Posts
    473
    Vote Rating
    0
    watrboy00 is on a distinguished road

      0  

    Default 0.82 Ext.setup() should check for meta tags before it adds them.

    0.82 Ext.setup() should check for meta tags before it adds them.


    I've made comments in red where needed...

    Code:
    Ext.setup = function(config) {    
        if (Ext.isObject(config)) {
            var appendString ='',
                viewport = Ext.get(document.createElement('meta')),
                app = Ext.get(document.createElement('meta')),
                statusBar = Ext.get(document.createElement('meta')),
                startupScreen = Ext.get(document.createElement('link')),
                appIcon = Ext.get(document.createElement('link'));
    
            //does user-scalable=no, user-scalable=0 translate different on different platforms?
            viewport.set({
                name: 'viewport',
                content: 'width=device-width, user-scalable=no, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;'
            });
    
            if (config.fullscreen !== false) {
                app.set({
                    name: 'apple-mobile-web-app-capable',
                    content: 'yes'
                });
                
                if (Ext.isString(config.statusBarStyle)) {
                    statusBar.set({
                        name: 'apple-mobile-web-app-status-bar-style',
                        content: config.statusBarStyle
                    })
                }
            }
    
            if (Ext.isString(config.tabletStartupScreen) && Ext.platform.isTablet) {
                startupScreen.set({
                    rel: 'apple-touch-startup-image',
                    href: config.tabletStartupScreen
                });
            } else if (Ext.isString(config.phoneStartupScreen) && Ext.platform.isPhone) {
                startupScreen.set({
                    rel: 'apple-touch-startup-image',
                    href: config.phoneStartupScreen
                });
            }
    
            if (config.icon) {
                config.phoneIcon = config.tabletIcon = config.icon;
            }
            
            var precomposed = (config.glossOnIcon == false) ? '-precomposed' : '';
            if (Ext.isString(config.tabletIcon) && Ext.platform.isTablet) {
                appIcon.set({
                    rel: 'apple-touch-icon' + precomposed,
                    href: config.tabletIcon
                });
            } else if (Ext.isString(config.phoneIcon) && Ext.platform.isPhone) {
                appIcon.set({
                    rel: 'apple-touch-icon' + precomposed,
                    href: config.phoneIcon
                });
            }
            
            if (Ext.isArray(config.preloadImages)) {
                for (var i = config.preloadImages.length - 1; i >= 0; i--) {
                    (new Image()).src = config.preloadImages[i];
                };
            }
            
            //I have an app that is already built that I am layering Touch on top of. Because of this I already have the meta viewport tag setup. With this block it duplicates the tag. Same *could* be said about the others.
            var attachTags = function(){
                var head = Ext.get(document.getElementsByTagName('head')[0]);
                head.appendChild(viewport);
                if (app.getAttribute('name')) head.appendChild(app);
                if (statusBar.getAttribute('name')) head.appendChild(statusBar);
                
                if (appIcon.getAttribute('href')) head.appendChild(appIcon);
                if (startupScreen.getAttribute('href')) head.appendChild(startupScreen);
            };
    
            if (Ext.platform.isAndroidOS) {
                attachTags();
            }
            else {
                Ext.onReady(attachTags);
            }
            
            if (Ext.isFunction(config.onReady)) {
                Ext.onReady(config.onReady, config.scope || window);
            }
        }
    };
    Eric Berens
    Intranet Systems Manager @ Best Buy
    You should follow me on twitter here.

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    Good idea. Will look into doing this.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    For now I have added an addMetaTags configuration option to setup. It defaults to true. Somehow looping over all meta tags and check for attributes felt a bit dirty.

  4. #4
    Ext JS Premium Member watrboy00's Avatar
    Join Date
    Aug 2007
    Location
    Minneapolis, MN
    Posts
    473
    Vote Rating
    0
    watrboy00 is on a distinguished road

      0  

    Default


    I like. Def better than individual checks.

    Tommy, any idea about the user-scalable = 0|no? Is it a requirement to have both? Like does 0 only work on iPhone|iPad and no works on Android or something like that?
    Eric Berens
    Intranet Systems Manager @ Best Buy
    You should follow me on twitter here.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    No, that was a bug. Also the mixing of semicolons and commas was wrong. This is al
    Fixed in the next release.

  6. #6
    Ext JS Premium Member watrboy00's Avatar
    Join Date
    Aug 2007
    Location
    Minneapolis, MN
    Posts
    473
    Vote Rating
    0
    watrboy00 is on a distinguished road

      0  

    Default


    I believe they are suppose to be commas correct? and which one is correct the 0 or the no?
    Eric Berens
    Intranet Systems Manager @ Best Buy
    You should follow me on twitter here.

  7. #7
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


    I think "no" is the correct one, and commas.

Similar Threads

  1. Meta form with monitorValid and formBind fails in ext 2.2x but it's working in ext 3
    By danutungureanu.dgs in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 4 Jan 2010, 4:25 AM
  2. Replies: 46
    Last Post: 10 Nov 2009, 1:32 PM
  3. Replies: 5
    Last Post: 26 Feb 2009, 9:32 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