Changed JS extension support to be more flexible.
Review Request #5375 — Created Feb. 1, 2014 and submitted
This replaces the old
Extension.js_model_classattribute with a list
ofJSExtensionsubclasses stored inExtension.js_extensions.Each
JSExtensionsubclass lists a JS model class. It also has an
apply_tofield that works like those in bundles andTemplateHook. If not
provided, the extension will be initialized on all pages.
get_js_model_datahas also moved toJSExtension, renamed to
get_model_data.Extensions taking advantage of
js_model_classin the Djblets 0.8 alphas
will need to be updated for this change.
Updated the rbseverity extension for this change, taking advantage of
apply_to, and saw the extension's initialization appear only on the
pages listed.
| Description | From | Last Updated |
|---|---|---|
|
This might be more readable as: return url_name in (self.apply_to or []) |
|