Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#565 closed defect (fixed)

bug & fix - custom templatePath attribute not processed properly by DomWidget.js (current trunk version 3375)

Reported by: [email protected] Owned by: alex
Priority: high Milestone:
Component: Widgets Version: 0.2
Keywords: custom templatePath Cc:
Blocked By: Blocking:


When a custom templatePath attribute is provided, as in tests/widget/test_template_customization.html, the path (aside from the deprecated string argument), is not used, but the default template is used instead

Fix follows:

Change lines 62 & 65 as follows:

	if(!obj.templateString && !avoidCache){  // added --> && !avoidCache
		obj.templateString = templateString || ts["string"];
	if(!obj.templateNode  && !avoidCache){ // added --> && !avoidCache
		obj.templateNode = ts["node"];

After this change, the node cache is erroneously updated with the custom template, so we must also do this: Replace line 466:

				ts.node = this.templateNode;


					ts.node = this.templateNode;

Then tests/widget/test_template_customization.html runs properly.

Change History (4)

comment:1 Changed 16 years ago by alex

Owner: changed from anonymous to alex

comment:2 Changed 16 years ago by alex

Milestone: 0.3release0.3.1
Version: 0.2

comment:3 Changed 16 years ago by alex

Resolution: fixed
Status: newclosed

good catch. thanks for spotting that.

fixed in [4125]

comment:4 Changed 15 years ago by (none)

Milestone: 0.3.1

Milestone 0.3.1 deleted

Note: See TracTickets for help on using tickets.