Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Ext experts: quick question on window and style

Reply
Thread Tools

Ext experts: quick question on window and style

 
 
DL
Guest
Posts: n/a
 
      07-01-2009
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.

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      07-01-2009
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" by their
authors nevertheless, are not supported here.


PointedEars
 
Reply With Quote
 
 
 
 
Don84
Guest
Posts: n/a
 
      07-01-2009
On Jul 1, 11:27*am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
> 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" 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.
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      07-02-2009
Don84 wrote:
> Thomas 'PointedEars' Lahn wrote:
>> 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" by their
>> authors nevertheless, are not supported here.
>> [...]


Learn to quote. <http://jibbering.com/faq/#posting>

> 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
 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      07-02-2009
On Jul 1, 11:27*am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
> 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" 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.
 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      07-02-2009
On Jul 2, 6:09*am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
> Don84 wrote:
> > Thomas 'PointedEars' Lahn wrote:
> >> 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. *<http://jibbering.com/faq/#posting>
>
> > 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing modules '_ssl', 'ext.IsDOMString', 'ext.SplitQName' uid09012_ti@collinsrealtime.com Python 11 10-27-2005 12:01 PM
Quick question, hopefully quick answer. ~misfit~ NZ Computing 114 01-06-2005 01:36 PM
['ext.IsDOMString', 'ext.SplitQName'] Jindal, Pankaj Python 0 12-22-2004 10:27 AM
Quick Question Quick Answer JKop C++ 11 05-24-2004 09:46 PM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57