1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Fixed login dialog so that it now submits when Enter pressed in password field. Fixed more button more button labels.

This commit is contained in:
chouseknecht 2013-05-24 09:55:52 -04:00
parent b4709c5138
commit fd25d68ffe
16 changed files with 41 additions and 33 deletions

View File

@ -25,12 +25,19 @@ function Authenticate($scope, $rootScope, $location, Authorization, ToggleClass,
$scope.sessionExpired = Authorization.didSessionExpire(); //Display session timeout message
$scope.sessionTimeout = ($AnsibleConfig.session_timeout / 60).toFixed(2)
$('#login-password').bind('keypress', function(e) {
var code = (e.keyCode ? e.keyCode : e.which);
if (code == 13) {
$('#login-button').click();
}
});
// Display the login dialog
$('#login-modal').modal({ show: true, keyboard: false, backdrop: false });
$scope.reset = function() {
$('#login-form input').each( function(index) { $(this).val(''); });
};
$('#login-form input').each( function(index) { $(this).val(''); });
};
// Call the API to get an auth token
$scope.systemLogin = function(username, password) {
@ -70,5 +77,5 @@ function Authenticate($scope, $rootScope, $location, Authorization, ToggleClass,
$('#alert-modal').modal({ show: true, keyboard: true, backdrop: 'static' });
}
});
}
}
}

View File

@ -21,7 +21,7 @@ angular.module('JobEventFormDefinition', [])
readonly: true,
class: 'span2'
},
event: {
event_display: {
label: 'Event',
type: 'text',
readonly: true

View File

@ -154,7 +154,8 @@ angular.module('JobFormDefinition', [])
type: 'textarea',
readonly: true,
rows: 10,
class: 'span12'
class: 'span12',
ngShow: "result_traceback != ''"
}
},
@ -169,7 +170,7 @@ angular.module('JobFormDefinition', [])
},
summary: {
label: 'Hosts',
icon: 'icon-filter',
icon: 'icon-th-large',
ngClick: "jobSummary()",
class: 'btn-info btn-small',
awToolTip: 'View host summary',
@ -180,7 +181,7 @@ angular.module('JobFormDefinition', [])
icon: 'icon-list-ul',
ngClick: "jobEvents()",
class: 'btn-info btn-small',
awToolTip: 'View job events',
awToolTip: 'Edit job events',
mode: 'all',
}
},

View File

@ -58,7 +58,7 @@ angular.module('CredentialsListDefinition', [])
ngClick: "editCredential(\{\{ credential.id \}\})",
icon: 'icon-edit',
label: 'Edit',
class: 'btn-small',
class: 'btn-small btn-success',
awToolTip: 'View/Edit credential'
},

View File

@ -43,7 +43,7 @@ angular.module('GroupListDefinition', [])
label: 'Edit',
ngClick: "editGroup(\{\{ group.id \}\})",
icon: 'icon-edit',
class: 'btn-small',
class: 'btn-small btn-success',
awToolTip: 'View/Edit group'
},

View File

@ -42,7 +42,7 @@ angular.module('HostListDefinition', [])
edit: {
label: 'Edit',
ngClick: "editHost(\{\{ host.id \}\})",
icon: 'icon-edit',
icon: 'icon-edit btn-success',
class: 'btn-small',
awToolTip: 'View/Edit host'
},

View File

@ -49,7 +49,7 @@ angular.module('InventoriesListDefinition', [])
label: 'Edit',
ngClick: "editInventory(\{\{ inventory.id \}\})",
icon: 'icon-edit',
class: 'btn-small',
class: 'btn-small btn-success',
awToolTip: 'View/Edit inventory'
},

View File

@ -23,7 +23,7 @@ angular.module('JobEventsListDefinition', [])
desc: true,
searchType: 'int'
},
event: {
event_display: {
label: 'Event',
link: true
},
@ -57,16 +57,16 @@ angular.module('JobEventsListDefinition', [])
mode: 'all'
},
edit: {
label: 'View',
label: 'Edit',
ngClick: "jobDetails()",
icon: 'icon-edit',
class: 'btn-small btn-success',
awToolTip: 'View/Edit detail',
awToolTip: 'Edit job details',
mode: 'all'
},
summary: {
label: 'Hosts',
icon: 'icon-filter',
icon: 'icon-th-large',
ngClick: "jobSummary()",
class: 'btn-info btn-small',
awToolTip: 'View host summary',
@ -78,9 +78,9 @@ angular.module('JobEventsListDefinition', [])
edit: {
label: 'View',
ngClick: "editJobEvent(\{\{ jobevent.id \}\})",
icon: 'icon-edit',
icon: 'icon-zoom-in',
class: 'btn-small',
awToolTip: 'View event detail',
awToolTip: 'View event details',
},
}
});

View File

@ -62,11 +62,11 @@ angular.module('JobHostDefinition', [])
mode: 'all'
},
edit: {
label: 'View',
label: 'Edit',
icon: 'icon-edit',
ngClick: "jobDetails()",
class: 'btn-success btn-small',
awToolTip: 'View job detail',
awToolTip: 'Edit job details',
mode: 'all'
},
events: {

View File

@ -44,8 +44,8 @@ angular.module('JobTemplatesListDefinition', [])
label: 'Edit',
ngClick: "editJobTemplate(\{\{ job_template.id \}\})",
icon: 'icon-edit',
awToolTip: 'View/Edit template',
class: 'btn-small'
awToolTip: 'Edit template',
class: 'btn-small btn-success'
},
submit: {
label: 'Launch',
@ -53,7 +53,7 @@ angular.module('JobTemplatesListDefinition', [])
mode: 'all',
class: 'btn-small btn-success',
ngClick: 'submitJob(\{\{ job_template.id \}\})',
awToolTip: 'Create and run a job using this template'
awToolTip: 'Start a job using this template'
},
delete: {
label: 'Delete',

View File

@ -62,14 +62,14 @@ angular.module('JobsListDefinition', [])
fieldActions: {
edit: {
icon: 'icon-edit',
label: 'View',
label: 'Edit',
ngClick: "editJob(\{\{ job.id \}\}, '\{\{ job.name \}\}')",
class: 'btn-success btn-small',
awToolTip: 'View/Edit detail',
awToolTip: 'Edit job details',
},
summary: {
label: 'Hosts',
icon: 'icon-filter',
icon: 'icon-th-large',
ngClick: "viewSummary(\{{ job.id \}\}, '\{\{ job.name \}\}')",
class: 'btn-info btn-small',
awToolTip: 'View host summary',

View File

@ -42,7 +42,7 @@ angular.module('OrganizationListDefinition', [])
label: 'Edit',
ngClick: "editOrganization(\{\{ organization.id \}\})",
icon: 'icon-edit',
class: 'btn-small',
class: 'btn-small btn-success',
awToolTip: 'View/Edit organization'
},

View File

@ -43,7 +43,7 @@ angular.module('ProjectsListDefinition', [])
label: 'Edit',
ngClick: "editProject(\{\{ project.id \}\})",
icon: 'icon-edit',
class: 'btn-small',
class: 'btn-small btn-success',
awToolTip: 'View/edit project'
},

View File

@ -49,7 +49,7 @@ angular.module('TeamsListDefinition', [])
label: 'Edit',
ngClick: "editTeam(\{\{ team.id \}\})",
icon: 'icon-edit',
class: 'btn-small',
class: 'btn-small btn-success',
awToolTip: 'View/Edit team'
},

View File

@ -48,7 +48,7 @@ angular.module('UserListDefinition', [])
label: 'Edit',
ngClick: "editUser(\{\{ user.id \}\})",
icon: 'icon-edit',
class: 'btn-small',
class: 'btn-small btn-success',
awToolTip: 'View/Edit user'
},

View File

@ -11,7 +11,7 @@
<div class="control-group">
<label class="control-label">Username:</label>
<div class="controls">
<input type="text" name="username" ng-model="username" required><br />
<input type="text" name="username" ng-model="username" id="login-username" required><br />
<span class="error" ng-show="loginForm.username.$dirty && loginForm.username.$error.required">A value is required!</span>
<span class="errora api-error" ng-bind="usernameError"></span>
</div>
@ -19,7 +19,7 @@
<div class="control-group">
<label class="control-label">Password:</label>
<div class="controls">
<input type="password" name="password" ng-model="password" required><br />
<input type="password" name="password" id="login-password" ng-model="password"><br />
<span class="error" ng-show="loginForm.password.$dirty && loginForm.password.$error.required">A value is required!</span>
<span class="error api-error" ng-bind="passwordError"></span>
</div>
@ -29,7 +29,7 @@
<div class="modal-footer">
<button ng-click="systemLogin(loginForm.username.$modelValue,loginForm.password.$modelValue)"
ng-disabled="loginForm.$invalid || $loginForm.$pristine"
class="btn btn-primary">Sign In</button>
id="login-button" class="btn btn-primary">Sign In</button>
</div>
</div><!-- modal -->