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); $('.ajax-modal, .dropdown-toggle').attr('disabled', true);
horizon.modals.modal_spinner(gettext("Working")); horizon.modals.modal_spinner(gettext("Working"));
}, },
complete: function () { complete: function (jqXHR) {
var redirect_header = jqXHR.getResponseHeader("X-Horizon-Location");
if (redirect_header === null) {
horizon.modals.spinner.modal('hide'); horizon.modals.spinner.modal('hide');
}
$("#modal_wrapper .modal").last().modal("show"); $("#modal_wrapper .modal").last().modal("show");
$button.prop("disabled", false); $button.prop("disabled", false);
}, },

View File

@ -3,7 +3,7 @@
{% load url from future %} {% load url from future %}
{% block modal-header %}{% trans "Log In" %}{% endblock %} {% 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 form_action %}{% url 'login' %}{% endblock %}
{% block ng_controller %}hzLoginCtrl{% endblock %} {% block ng_controller %}hzLoginCtrl{% endblock %}

View File

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