Login Register

title

dijit.form.Button overwrites "title" attribute if "showLabel" is false

UPDATE 2008-07-15
Created a bug report / ticket for this, see http://bugs.dojotoolkit.org/ticket/7185

---

Dojo version: Dojo 1.1.1
Component: dijit.form.Button
Browser: tested on FF3.0 and IE7.0

Button overwrites the attribute "title" if "showLabel" is set to false. I suppose this is a defect in method "postCreate".

Example:

var button = new dijit.form.Button(
  {
    title: "MyTitle",
    iconClass: "myIconClass",
    label: "MyLabel",
    showLabel: false
  }
);

This will render a button showing the title "MyLabel" rather than "MyTitle".

Setting a Dialog's Title dynamically

I've seen the question asked a number of times on how to set a Title on things like Dialog and TitlePane after parsing. There is currently no public method to do this, but it's uber easy, so lets take a peek:

the template for Dialog has something like:

${title}

in it. this attaches a "titleNode" attribute to our dijit. Its a pointer to the actual domNode where the text
is:

// what's the current title of the dialog? the innerHTML of the titlenode.
console.log(dijit.byIt("myDialog").titleNode.innerHTML);

Localization nowhere near robust enough - proposed solution

I've been working with Dojo/Dijit for a few weeks now. Part of the requirements of the project I'm working on is a robust localization theme - every piece of text on the site needs to be localized. Perhaps I'm missing something, but the localization that Dojo seems to have available seems woefully inadequate.

Syndicate content