Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#4383 closed defect (worksforme)

Top level tree icon not displayed in IE

Reported by: guest Owned by: bill
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: tree icon Cc:
Blocked By: Blocking:

Description

If icons are added to trees (for example, using the code below), IE does not display top level icons while Firefox, for example, does.

To the test_Tree.html file make the tree code look like

<div dojoType="dijit.Tree" id="mytree" store="continentStore" query="{type:'continent'}"

labelAttr="name" typeAttr="type">

<script type="dojo/method" event="getIconClass" args="item">

return "testTree";

</script>

</div>

by adding the script and the add the style

<style type="text/css">

.testTree {

background-image: url('images/note.gif'); background-repeat: no-repeat; width: 20px; height: 20px;

}

</style>

In IE, icons display for child nodes, but not for the parents. In Firefox, they display for both.

Attachments (3)

4383.html (1.4 KB) - added by bill 12 years ago.
TreeTestIE7.JPG (29.6 KB) - added by guest 12 years ago.
Tree in IE7 without top level icons
TreeTestFirefox.JPG (59.2 KB) - added by guest 12 years ago.
Tree in Firefox with top level icons

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by bill

Attachment: 4383.html added

comment:1 Changed 12 years ago by bill

Resolution: worksforme
Status: newclosed

Works for me on IE6. I followed your instructions (and I attached the testcase). I'll check in your change so that we get icons in the test file.

comment:2 Changed 12 years ago by bill

(In [10506]) Add icons to test. Refs #4383.

Changed 12 years ago by guest

Attachment: TreeTestIE7.JPG added

Tree in IE7 without top level icons

Changed 12 years ago by guest

Attachment: TreeTestFirefox.JPG added

Tree in Firefox with top level icons

comment:3 Changed 12 years ago by guest

Resolution: worksforme
Status: closedreopened

Try IE7. I'm attaching screen shots this time for IE7 and Firefox. Here is the code that works on my directory structure without all the test stuff.

<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01EN"

"http://www.w3.org/TR/html4/strict.dtd">

<html> <head>

<title>Dijit Tree Test</title>

<style type="text/css">

@import "../dojoAjax/dijit/themes/tundra/tundra.css";

</style>

<script type="text/javascript" src="../dojoAjax/dojo/dojo.js"

djConfig="parseOnLoad: true, isDebug: true"></script>

<script language="JavaScript?" type="text/javascript">

dojo.require("dojo.data.ItemFileReadStore?"); dojo.require("dijit.Tree"); dojo.require("dijit.ColorPalette?"); dojo.require("dijit.Menu"); dojo.require("dojo.parser"); scan page for widgets and instantiate them

</script>

<style type="text/css">

.testTree {

background-image: url('images/note.gif'); background-repeat: no-repeat; width: 20px; height: 20px;

}

</style>

</head> <body class="tundra">

<div dojoType="dojo.data.ItemFileReadStore?" jsId="continentStore"

url="./data/countries.json"></div>

<div dojoType="dijit.Tree" id="mytree" store="continentStore" query="{type:'continent'}"

labelAttr="name" typeAttr="type">

<script type="dojo/method" event="getIconClass" args="item">

return "testTree";

</script>

</div>

</body> </html>

comment:4 Changed 12 years ago by bill

Try attaching the testcase using the "attach file" button. And supply a link if you can, to a testcase demonstrating the problem. Are you accessing via http://, or file:// ?

comment:5 Changed 12 years ago by bill

Milestone: 1.0
Owner: set to bill
Status: reopenednew

I'll take a look although may have to close as "worksforme". Maybe we need a zoom: 1 in the CSS because the element is being treated as inline, and width and height don't work on inline elements.

comment:6 Changed 12 years ago by bill

Resolution: worksforme
Status: newclosed

Sorry, I tried both IE6 and IE7, and can't reproduce.

Note: See TracTickets for help on using tickets.