Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2905 closed defect (fixed)

use dojo.string.substitute in TemplatedWidget

Reported by: Adam Peller Owned by: Adam Peller
Priority: high Milestone: 0.9beta
Component: Widgets Version: 0.4.2
Keywords: bill Cc:
Blocked By: Blocking:

Description

Get rid of all of the "this." references and use this method instead to implement.

Attachments (1)

template-substitute.patch (18.1 KB) - added by Adam Peller 13 years ago.
Bill, can you review? Thanks

Download all attachments as: .zip

Change History (5)

comment:1 Changed 13 years ago by Adam Peller

Keywords: bill added
Status: newassigned

This will hopefully simplify the code in TemplatedWidget?. I removed this.strings logic from the code since I didn't see it used anywhere, though you could implicitly do that by saying ${strings.xxx} I put the default hash strings in a uri object, though I question whether we need that either. Path references seem to be something we try to avoid, given the CSS info hack. Bill, what do you think?

All of the templates had to be changed to remove "this.", which makes them simpler and shorter.

This patch will have the side effect of causing an exception any time there is an unresolved reference in the template. Again, I think this is a good thing. I haven't done extensive testing, so more exceptions of this nature may arise.

Changed 13 years ago by Adam Peller

Attachment: template-substitute.patch added

Bill, can you review? Thanks

comment:2 Changed 13 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed

(In [8623]) Use dojo.string.substitute for TemplatedWidget?. No more "this." prefix in ${} notation. Fixes #2905

comment:3 Changed 13 years ago by Adam Peller

(In [8624]) Document the changes. Refs #2905

comment:4 Changed 13 years ago by Adam Peller

(In [8647]) Pass in thisObject for ${} notation so format functions on widget may be used. Refs #2905.

Note: See TracTickets for help on using tickets.