Ext experts: quick question on window and style

D

DL

Question/Problem:
How to use the bodyStyle attribute?

// Ext 2

var ewin = new Ext.Window ({
// x:200,
// y:200,
width:350,
height:350,
border:true,
resizable:true,
// try 1
// bodyStyle: [{background-color:white; color:black; padding-left:
10px}]

// try 2
// bodyStyle: [{background-color:'white', color:'black', padding-
left:10px}]

});

// results
neither try 1 nor try 2 worked in IE7 nor Firefox 3.0.11 on XP SP3.

How to?

Also, when I include the x and y attributes, the window failed to be
opened, weird.

Thanks.
 
T

Thomas 'PointedEars' Lahn

DL said:
Question/Problem:
How to use the bodyStyle attribute?

You are looking for <http://extjs.com/support>. Delusions of "lightweight,
high-performance cross-browser JavaScript [libraries]" that weigh at least
"25kb" "(minified/gzipped)"(!) but are considered "Highly portable" by their
authors nevertheless, are not supported here.


PointedEars
 
D

Don84

DL said:
Question/Problem:
How to use the bodyStyle attribute?

You are looking for <http://extjs.com/support>.  Delusions of "lightweight,
high-performance cross-browser JavaScript [libraries]" that weigh at least
"25kb" "(minified/gzipped)"(!) but are considered "Highly portable" by their
authors nevertheless, are not supported here.

PointedEars

I've solved it.
items: [{bodyStyle: "background-color:white; color:black; padding-left:
10px"}]

Yes, will attempt to use extjs forum, previous question was answered
there, discouraging.
 
T

Thomas 'PointedEars' Lahn

Don84 said:
Thomas said:
DL said:
Question/Problem:
How to use the bodyStyle attribute?
You are looking for <http://extjs.com/support>. Delusions of "lightweight,
high-performance cross-browser JavaScript [libraries]" that weigh at least
"25kb" "(minified/gzipped)"(!) but are considered "Highly portable" by their
authors nevertheless, are not supported here.
[...]

Learn to quote. said:
I've solved it.
items: [{bodyStyle: "background-color:white; color:black; padding-left:
10px"}]

Yes, will attempt to use extjs forum, previous question was answered
there, discouraging.

It stands to reason that people who wrote junk like the following are eager
to promote it. Even more those script-kiddies who decided using it.

,-<http://ajax.googleapis.com/ajax/libs/ext-core/3.0.0/ext-core-debug.js>
|

/*
* Ext Core Library 3.0
* http://extjs.com/
* Copyright(c) 2006-2009, Ext JS, LLC.
*
* MIT Licensed - http://extjs.com/license/mit.txt
*
*/


// for old browsers
window.undefined = window.undefined;



Ext = {

version: '3.0'
};


Ext.apply = function(o, c, defaults){
// no "this" reference for friendly out of scope calls
if(defaults){
Ext.apply(o, defaults);
}
if(o && c && typeof c == 'object'){
for(var p in c){
o[p] = c[p];
}
}
return o;
};

(function(){
var idSeed = 0,
ua = navigator.userAgent.toLowerCase(),
check = function(r){
return r.test(ua);
},
isStrict = document.compatMode == "CSS1Compat",
isOpera = check(/opera/),
isChrome = check(/chrome/),
isWebKit = check(/webkit/),
isSafari = !isChrome && check(/safari/),
isSafari3 = isSafari && check(/version\/3/),
isSafari4 = isSafari && check(/version\/4/),
isIE = !isOpera && check(/msie/),
isIE7 = isIE && check(/msie 7/),
isIE8 = isIE && check(/msie 8/),
isIE6 = isIE && !isIE7 && !isIE8,
isGecko = !isWebKit && check(/gecko/),
isGecko3 = isGecko && check(/rv:1\.9/),
isBorderBox = isIE && !isStrict,
isWindows = check(/windows|win32/),
isMac = check(/macintosh|mac os x/),
isAir = check(/adobeair/),
isLinux = check(/linux/),
isSecure = /^https/i.test(window.location.protocol);

// remove css image flicker
if(isIE6){
try{
document.execCommand("BackgroundImageCache", false, true);
}catch(e){}
}

// ...


PointedEars
 
D

David Mark

DL said:
Question/Problem:
How to use the bodyStyle attribute?

You are looking for <http://extjs.com/support>.  Delusions of "lightweight,
high-performance cross-browser JavaScript [libraries]" that weigh at least
"25kb" "(minified/gzipped)"(!) but are considered "Highly portable" by their
authors nevertheless, are not supported here.

LOL. That rules out lightweight (and I wonder what you get for your
80K.) High-performance seems unlikely and is Ext really cross-browser
(seems doubtful?) I'm inclined to bet that searching the script(s)
for userAgent will put that to rest.
 
D

David Mark

Don84 said:
Thomas said:
DL wrote:
Question/Problem:
How to use the bodyStyle attribute?
You are looking for <http://extjs.com/support>.  Delusions of "lightweight,
high-performance cross-browser JavaScript [libraries]" that weigh at least
"25kb" "(minified/gzipped)"(!) but are considered "Highly portable" bytheir
authors nevertheless, are not supported here.
[...]

Learn to quote.   said:
I've solved it.
items: [{bodyStyle: "background-color:white; color:black; padding-left:
10px"}]
Yes, will attempt to use extjs forum, previous question was answered
there, discouraging.

It stands to reason that people who wrote junk like the following are eager
to promote it.  Even more those script-kiddies who decided using it.

,-<http://ajax.googleapis.com/ajax/libs/ext-core/3.0.0/ext-core-debug.js>
|

/*
 * Ext Core Library 3.0
 *http://extjs.com/
 * Copyright(c) 2006-2009, Ext JS, LLC.
 *
 * MIT Licensed -http://extjs.com/license/mit.txt
 *
 */

// for old browsers
window.undefined = window.undefined;

First line. Now that's a record. Continuing anyway.
Ext = {

    version: '3.0'

};

Doesn't look like a constructor to me.
Ext.apply = function(o, c, defaults){
    // no "this" reference for friendly out of scope calls

Out of scope? How about out of touch with reality?
    if(defaults){
        Ext.apply(o, defaults);
    }
    if(o && c && typeof c == 'object'){

Should not test o.
        for(var p in c){

Ahem. So much for common sense.
            o[p] = c[p];
        }
    }
    return o;

};

(function(){
    var idSeed = 0,
        ua = navigator.userAgent.toLowerCase(),

I kmew it. So much for cross-browser.
        check = function(r){
            return r.test(ua);
        },

A complete waste. Clearly trying to squeeze a few extra bytes out of
the minified version.
        isStrict = document.compatMode == "CSS1Compat",

What is meant to be inferred from *that*? Is IE < 6 considered
"strict."
        isOpera = check(/opera/),
        isChrome = check(/chrome/),
        isWebKit = check(/webkit/),
        isSafari = !isChrome && check(/safari/),
        isSafari3 = isSafari && check(/version\/3/),
        isSafari4 = isSafari && check(/version\/4/),
        isIE = !isOpera && check(/msie/),
LOL.

        isIE7 = isIE && check(/msie 7/),
        isIE8 = isIE && check(/msie 8/),
        isIE6 = isIE && !isIE7 && !isIE8,
        isGecko = !isWebKit && check(/gecko/),
        isGecko3 = isGecko && check(/rv:1\.9/),

You've got to wonder why they need all of these flags.
        isBorderBox = isIE && !isStrict,

See above. Should never need or want such a flag anyway.
        isWindows = check(/windows|win32/),
        isMac = check(/macintosh|mac os x/),
        isAir = check(/adobeair/),
        isLinux = check(/linux/),
        isSecure = /^https/i.test(window.location.protocol);

    // remove css image flicker

Never bothered me.
    if(isIE6){
        try{

Is this known to throw exceptions in IE6? How about agents with
confusing IE-like UA strings that also lack the execCommand method?
            document.execCommand("BackgroundImageCache", false, true);
        }catch(e){}
    }

// ...

So they were all DOA. Only difference is people paid for this one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top