#12275 closed task (fixed)
_Templated: split into _TemplatedMixin and _WidgetsInTemplateMixin
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Dijit | Version: | 1.6.0b1 |
Keywords: | 1.7-mobile | Cc: | |
Blocked By: | Blocking: |
Description
Split the current _Templated mixin into two mixins:
- a _TemplatedMixin which doesn't support the widgetsInTemplate feature
- a _WidgetsInTemplateMixin to add that support
Modify existing widgets to use _TemplatedMixin and, if necessary, _WidgetsInTemplateMixin.
_Templated will simply extend _TemplatedMixin and _WidgetsInTemplateMixin, and contain support for the deprecated waiRole/waiState template attributes. New widgets should directly use attributes, ex: role=foo aria-labelledby=bar
. Everything in dijit already does this.
The goal of this change is to allow lightweight widgets to get template support without pulling in the parser.
Attachments (1)
Change History (17)
Changed 10 years ago by
Attachment: | templatedMixin.patch added |
---|
comment:1 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [23940]) Split _Templated mixin into a lightweight _TemplatedMixin which doesn't support the widgetsInTemplate feature, and a _WidgetsInTemplateMixin to add that support.
Modified existing dijit widgets to extends _TemplatedMixin and, if necessary, _WidgetsInTemplateMixin.
_Templated keeps the same API (until 2.0, when it will be removed). It extends _TemplatedMixin and _WidgetsInTemplateMixin, and adds support for deprecated waiRole/waiState.
Fixes #12275 !strict.
comment:3 Changed 10 years ago by
Keywords: | 1.7-mobile added |
---|
comment:4 Changed 10 years ago by
comment:5 Changed 10 years ago by
comment:6 Changed 10 years ago by
comment:7 Changed 10 years ago by
comment:10 follow-up: 11 Changed 10 years ago by
comment:11 follow-up: 12 Changed 10 years ago by
Replying to liucougar:
(In [24258]) refs #12275: make dojox.dtl._DomTemplated work with dijit 1.6+
does this need to be ported to the 1.6 branch for 1.6.1 or did you mean 1.7+?
also, how does this behave when doing a build:
if(!templateString){ templateString = dojo.cache(templatePath, {sanitize: true}); }
does the dojo.cache interning break during the build? if not, does the built version end up making an extra xhr call to get the template?
maybe completely drop support for templatePath in dtl if there is not support for it in dijit? as a side note, it's unfortunate that dtl seems largely abandoned.
comment:12 Changed 10 years ago by
Replying to neonstalwart:
also, how does this behave when doing a build:
if(!templateString){ templateString = dojo.cache(templatePath, {sanitize: true}); }does the dojo.cache interning break during the build? if not, does the built version end up making an extra xhr call to get the template?
sorry... i see this same line in _TemplatedMixin so i assume it works ok in a build. however, you've brought to my attention at least one other bug in dtl which i've reported in #12644.
comment:13 Changed 10 years ago by
it should probably be committed to 1.6 branch (if there is a 1.6.1)
before applying patch, do "svn cp _Templated.js _TemplatedMixin.js"