From 9b8dcfb9dd0d8931cfa865ef948f21fae53f2b17 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Tue, 18 Feb 2014 03:55:04 -0500 Subject: [PATCH] AC-564 added new method to codemirror wrapper to enable replacing textarea fields with an editor. Implemented in inventory, groups, hosts, and templates. Solved issues with groups related to two potential textareas at the same time. Found and fixed an error in the way ReturnToCaller() utility was being called. Finished implementing angular-md5. Adding or saving a job template now shows a pop-up on save when a callback is enabled. The pop-up shows the callback url and host key. Before user had to save and then re-open the template to get the URL. With the pop-up we're now showing it immmediately on save. --- awx/ui/static/lib/ansible/Utilities.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/awx/ui/static/lib/ansible/Utilities.js b/awx/ui/static/lib/ansible/Utilities.js index c05b81c5b9..2ea94c3ec8 100644 --- a/awx/ui/static/lib/ansible/Utilities.js +++ b/awx/ui/static/lib/ansible/Utilities.js @@ -84,17 +84,15 @@ angular.module('Utilities', ['RestServices', 'Utilities']) backdrop: 'static' }); $rootScope.disableButtons2 = (disableButtons) ? true : false; - if (action) { - $('#alert-modal2').on('hidden.bs.modal', function () { + + $('#alert-modal2').on('hidden.bs.modal', function () { + if (action) { action(); - }); - } + } + }); $(document).bind('keydown', function (e) { if (e.keyCode === 27) { $('#alert-modal2').modal('hide'); - if (action) { - action(); - } } }); } else { @@ -108,9 +106,7 @@ angular.module('Utilities', ['RestServices', 'Utilities']) }); $('#alert-modal').on('hidden.bs.modal', function () { - console.log('modal closed'); if (action) { - console.log('attempting callback'); action(); } }); @@ -118,14 +114,10 @@ angular.module('Utilities', ['RestServices', 'Utilities']) $(document).bind('keydown', function (e) { if (e.keyCode === 27) { $('#alert-modal').modal('hide'); - if (action) { - action(); - } } }); $rootScope.disableButtons = (disableButtons) ? true : false; - } }; }