summaryrefslogtreecommitdiff
path: root/horizon/static/horizon/js/horizon.modals.js
diff options
context:
space:
mode:
Diffstat (limited to 'horizon/static/horizon/js/horizon.modals.js')
-rw-r--r--horizon/static/horizon/js/horizon.modals.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js
index f8fff01fd..87e546ca2 100644
--- a/horizon/static/horizon/js/horizon.modals.js
+++ b/horizon/static/horizon/js/horizon.modals.js
@@ -346,7 +346,7 @@ horizon.addInitFunction(horizon.modals.init = function() {
} else if (redirect_header) {
location.href = redirect_header;
} else if (add_to_field_header) {
- json_data = $.parseJSON(data);
+ json_data = JSON.parse(data);
field_to_update = $("#" + add_to_field_header);
field_to_update.append("<option value='" + json_data[0] + "'>" + json_data[1] + "</option>");
field_to_update.change();
@@ -417,7 +417,7 @@ horizon.addInitFunction(horizon.modals.init = function() {
// Position modal so it's in-view even when scrolled down.
$document.on('show.bs.modal', '.modal', function (evt) {
// avoid closing the modal when escape is pressed on a select input
- $("select", evt.target).keyup(function (e) {
+ $("select", evt.target).on('keyup', function (e) {
if (e.keyCode === 27) {
// remove the focus on the select, so double escape close the modal
e.target.blur();