Adding custom javascript

Bug #1195712 reported by Jiri Tomasek
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Jiri Tomasek

Bug Description

Currently Horizon does not provide the way to add custom javascript for the application that is built on top of it. All the javascript files have to be included in horizon/templates/horizon/_scripts.html.

The solution: add the {% block custom_js %}{% endblock %} before the end of list of scripts in horizon/templates/horizon/_scripts.html. Dashboard's base.html then overrides "block js" with inclusion of its own _scripts.html which extends horizon/_scripts.html and overrides "block custom_js" including all js files needed by given dashboard. Result is single compressed js file consisting both Horizon and Dashboard's custom scripts.

I belive implementing this is also one of the steps in making Horizon standalone (http://lists.openstack.org/pipermail/openstack-dev/2013-June/010808.html)

Jiri Tomasek (jtomasek)
Changed in horizon:
assignee: nobody → Jiri Tomasek (jtomasek)
Jiri Tomasek (jtomasek)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/34878

Changed in horizon:
status: New → In Progress
Revision history for this message
Ekaterina Chernova (efedorova) wrote :

Are you guys stop working on that?

Revision history for this message
Julie Pichon (jpichon) wrote :

This was merged, but it looks like the automated hook to update the status didn't work in this case.

Changed in horizon:
status: In Progress → Fix Committed
importance: Undecided → Medium
David Lyle (david-lyle)
Changed in horizon:
milestone: none → havana-3
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.