-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Splits the AJAX complete method into complete, success, and error. * Cleans up 404 (e.g. gone/deleted) handling. * Adds 5XX error handling. * Adds client-side alert message templating. * Adds client-side conf (debug and static_url) loaded from backend. Fixes bug 957461. Change-Id: I5114430d35e2d20603e817651540b2db1f8a4d07
- Loading branch information
1 parent
9ba9d97
commit 3a6ffe8
Showing
8 changed files
with
94 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% extends "horizon/client_side/template.html" %} | ||
{% load horizon %} | ||
|
||
{% block id %}alert_message_template{% endblock %} | ||
|
||
{% block template %} | ||
{% jstemplate %} | ||
<div class="alert alert-block fade in alert-[[type]]"> | ||
<a class="close" data-dismiss="alert" href="#">×</a> | ||
<p><strong>[[type_capitalized]]: </strong>[[message]]</p> | ||
</div> | ||
{% endjstemplate %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script type='text/javascript' charset='utf-8'> | ||
/* Storage for backend configuration variables which the frontend | ||
* should be aware of. | ||
*/ | ||
horizon.conf = { | ||
debug: {{ debug|yesno:"true,false" }}, | ||
static_url: "{{ STATIC_URL }}" | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% include "horizon/client_side/_modal.html" %} | ||
{% include "horizon/client_side/_table_row.html" %} | ||
{% include "horizon/client_side/_alert_message.html" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters