Changed JS extension support to be more flexible.

Review Request #5375 — Created Feb. 1, 2014 and submitted — Latest diff uploaded

Information

Djblets
master

Reviewers

This replaces the old Extension.js_model_class attribute with a list
of JSExtension subclasses stored in Extension.js_extensions.

Each JSExtension subclass lists a JS model class. It also has an
apply_to field that works like those in bundles and TemplateHook. If not
provided, the extension will be initialized on all pages.

get_js_model_data has also moved to JSExtension, renamed to
get_model_data.

Extensions taking advantage of js_model_class in 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.