1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Merge pull request #3955 from mabashian/jshint-fixes

Fixed lingering jshint errors
This commit is contained in:
Michael Abashian 2016-11-11 11:37:21 -05:00 committed by GitHub
commit b9927edccd
5 changed files with 34 additions and 36 deletions

View File

@ -22,7 +22,6 @@ export default [
'CreateSelect2',
'GenerateForm',
'ParseTypeChange',
'Wait',
function(
$scope,
$state,
@ -40,8 +39,7 @@ export default [
ConfigurationUtils,
CreateSelect2,
GenerateForm,
ParseTypeChange,
Wait
ParseTypeChange
) {
var authVm = this;

View File

@ -122,6 +122,30 @@ export default [
$scope.configDataResolve = configDataResolve;
var triggerModal = function(msg, title, buttons) {
if ($scope.removeModalReady) {
$scope.removeModalReady();
}
$scope.removeModalReady = $scope.$on('ModalReady', function() {
// $('#lookup-save-button').attr('disabled', 'disabled');
$('#FormModal-dialog').dialog('open');
});
$('#FormModal-dialog').html(msg);
CreateDialog({
scope: $scope,
buttons: buttons,
width: 600,
height: 200,
minWidth: 500,
title: title,
id: 'FormModal-dialog',
resizable: false,
callback: 'ModalReady'
});
};
function activeTabCheck(setForm) {
if(!$scope[formTracker.currentFormName()].$dirty) {
active(setForm);
@ -212,7 +236,7 @@ export default [
payload[key] = $scope.configDataResolve[key].default;
ConfigurationService.patchConfiguration(payload)
.then(function(data) {
.then(function() {
$scope[key] = $scope.configDataResolve[key].default;
})
.catch(function(error) {
@ -228,30 +252,6 @@ export default [
});
};
var triggerModal = function(msg, title, buttons) {
if ($scope.removeModalReady) {
$scope.removeModalReady();
}
$scope.removeModalReady = $scope.$on('ModalReady', function() {
// $('#lookup-save-button').attr('disabled', 'disabled');
$('#FormModal-dialog').dialog('open');
});
$('#FormModal-dialog').html(msg);
CreateDialog({
scope: $scope,
buttons: buttons,
width: 600,
height: 200,
minWidth: 500,
title: title,
id: 'FormModal-dialog',
resizable: false,
callback: 'ModalReady'
});
};
function clearApiErrors() {
var currentForm = formDefs[formTracker.getCurrent()];
for (var fld in currentForm.fields) {
@ -332,7 +332,7 @@ export default [
var payload = {};
payload[key] = $scope[key];
ConfigurationService.patchConfiguration(payload)
.then(function(results) {
.then(function() {
//TODO consider updating form values with returned data here
})
.catch(function(error, status) {
@ -352,7 +352,7 @@ export default [
var resetAll = function() {
Wait('start');
ConfigurationService.resetAll()
.then(function(results) {
.then(function() {
populateFromApi();
$scope[formTracker.currentFormName].$setPristine();
})

View File

@ -4,8 +4,8 @@
* All Rights Reserved
*************************************************/
export default ['GetBasePath', 'ProcessErrors', '$q', '$http', 'Rest', '$rootScope', '$timeout', 'Wait',
function(GetBasePath, ProcessErrors, $q, $http, Rest, $rootScope, $timeout, Wait) {
export default ['GetBasePath', 'ProcessErrors', '$q', '$http', 'Rest',
function(GetBasePath, ProcessErrors, $q, $http, Rest) {
var url = GetBasePath('settings');
return {

View File

@ -8,7 +8,7 @@ export default [
function() {
return {
listToArray: function(input, key) {
listToArray: function(input) {
if (input.indexOf('\n') !== -1) {
//Parse multiline input
return input.replace(/^\s+|\s+$/g, "").split('\n');
@ -17,7 +17,7 @@ export default [
}
},
arrayToList: function(input, key) {
arrayToList: function(input) {
var multiLineInput = false;
_.each(input, function(statement) {
if (statement.indexOf(',') !== -1) {
@ -40,7 +40,7 @@ export default [
return true;
},
formatPlaceholder: function(input, key) {
formatPlaceholder: function(input) {
if(input !== null && typeof input === 'object') {
if(Array.isArray(input)) {
var multiLineInput = false;

View File

@ -41,7 +41,7 @@ export function JobsListController($state, $rootScope, $log, $scope, $compile, $
};
$scope.relaunchJob = function(event, id) {
var list, job, typeId;
var job, typeId;
try {
$(event.target).tooltip('hide');
} catch (e) {