Merge "Fix inability to switch region via Switch Region dropdown"

This commit is contained in:
Jenkins 2015-06-26 22:33:30 +00:00 committed by Gerrit Code Review
commit 8d5d71caea
3 changed files with 11 additions and 4 deletions

View File

@ -228,8 +228,11 @@ horizon.addInitFunction(horizon.modals.init = function() {
$('.ajax-modal, .dropdown-toggle').attr('disabled', true);
horizon.modals.modal_spinner(gettext("Working"));
},
complete: function () {
horizon.modals.spinner.modal('hide');
complete: function (jqXHR) {
var redirect_header = jqXHR.getResponseHeader("X-Horizon-Location");
if (redirect_header === null) {
horizon.modals.spinner.modal('hide');
}
$("#modal_wrapper .modal").last().modal("show");
$button.prop("disabled", false);
},
@ -238,7 +241,7 @@ horizon.addInitFunction(horizon.modals.init = function() {
add_to_field_header = jqXHR.getResponseHeader("X-Horizon-Add-To-Field"),
json_data, field_to_update;
if (redirect_header === null) {
$('.ajax-modal, .dropdown-toggle').removeAttr("disabled");
$('.ajax-modal, .dropdown-toggle').removeAttr("disabled");
}
$form.closest(".modal").modal("hide");
if (redirect_header) {

View File

@ -3,7 +3,7 @@
{% load url from future %}
{% block modal-header %}{% trans "Log In" %}{% endblock %}
{% block modal_class %}login {% if hide %}modal hide{% endif %}{% endblock %}
{% block modal_class %}login {% if hide %}modal{% endif %}{% endblock %}
{% block form_action %}{% url 'login' %}{% endblock %}
{% block ng_controller %}hzLoginCtrl{% endblock %}

View File

@ -635,6 +635,10 @@ form label {
display: inline-block;
}
.login.modal .modal-dialog {
width: 390px;
}
.modal.fullscreen .modal-dialog {
width: 90%;
margin: auto;