1. #1
    Ext Premium User
    Join Date
    Mar 2007
    Posts
    89
    Vote Rating
    1
    Luc is on a distinguished road

      0  

    Default Image reference to YUI-EXT site in yutil.js

    Image reference to YUI-EXT site in yutil.js


    Hi,

    While experimenting with TreePanel in 0.40, I noticed that browser generates many requests for
    http://www.yui-ext.com/blog/images/s.gif

    This may be due to the following line in yutil.js:
    Code:
    YAHOO.ext.BLANK_IMAGE_URL = 'http:/'+'/www.yui-ext.com/blog/images/s.gif';
    I am new to this stuff, but I suppose there should be no hard-coded references to the YUI-EXT site in the library? Or is there another reason? Thanks for clarifying.

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    You need to set that to a blank image url on your server. When the official release comes I plan on going over it. In a nutshell, that allows for inline elements with css background images and a fixed size, which is a must for the tree and is being used in Grid 2. In the past I used various browser specific hacks (not always reliable), but this makes it a snap.

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    504
    Vote Rating
    0
    vtswingkid is on a distinguished road

      0  

    Default


    Rather than modifying the yui-ext library ourselves, could we provide a way to preconfigure with javascript prior to loading it. For example, we could define the variable YAHOO.ext.BLANK_IMAGE_URL='localurl'. When yui-ext.js loads it could varify that the variable is defined and show an alert if not. I personally would prefer not to have to modify the yui-ext js files directly.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,505
    Vote Rating
    53
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Well, no, you postconfigure it.

    Set that variable in your code after yui-ext sets it!

  5. #5
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    504
    Vote Rating
    0
    vtswingkid is on a distinguished road

      0  

    Default BLANK_IMAGE_URL is used before it can be changed.

    BLANK_IMAGE_URL is used before it can be changed.


    if I set the variable after loading the entire yui-ext.js file the tree library has already used it. and changing the variable makes no difference according to firebug.

    i suppose I could load yutils.js first and then individually load the rest. That is alot of files to get in the right order though.

    Here in lies the problem....

    YAHOO.ext.tree.TreeNodeUI.prototype = {
    emptyIcon : Ext.BLANK_IMAGE_URL,

    this gets set before there is time to change the value of BLANK_IMAGE_URL

  6. #6
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    On next check in that will be corrected.

  7. #7
    Ext User
    Join Date
    Mar 2007
    Posts
    8
    Vote Rating
    0
    jmakeig is on a distinguished road

      0  

    Default


    In the meantime, you can get around this by first setting the Ext.BLANK_IMAGE_URL constant and then setting the TreeNodeUI.prototype.emptyIcon. Here's what I have in my post-config:
    Code:
    Ext.BLANK_IMAGE_URL = '/assets/img/placeholder.gif';
    Ext.tree.TreeNodeUI.prototype.emptyIcon = Ext.BLANK_IMAGE_URL;
    (By post-config, I mean a JS file that loads after yutil.js.)

Similar Threads

  1. How to get the reference of a grid?
    By saasira in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 15 Apr 2007, 2:46 AM
  2. how add script reference?
    By skyey in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 13 Mar 2007, 6:05 PM
  3. API Reference for Ext.MessageBox.updateProgress
    By mysticav in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 10 Mar 2007, 11:37 AM
  4. Image linked to yui-ext Site
    By FuryVII in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 1 Mar 2007, 8:42 AM

Thread Participants: 4