AC-322 Job list now presents either a Delete or Cancel button based on the job's status. Changed delete icon from icon-remove to icon-trash throughout application.

This commit is contained in:
chouseknecht 2013-07-31 11:53:36 -04:00
parent b1fd10c924
commit 4b8f0c2829
22 changed files with 41 additions and 31 deletions

View File

@ -121,7 +121,7 @@ angular.module('CredentialFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},

View File

@ -61,7 +61,7 @@ angular.module('GroupFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},

View File

@ -75,7 +75,7 @@ angular.module('HostFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},

View File

@ -91,7 +91,7 @@ angular.module('InventoryFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},
@ -166,7 +166,7 @@ angular.module('InventoryFormDefinition', [])
},
"delete": {
ngClick: "deleteHost(\{\{ host.id \}\}, '\{\{ host.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
label: 'Delete',
"class": 'btn-danger',
awToolTip: 'Permanently remove this host from the inventory'

View File

@ -231,7 +231,7 @@ angular.module('JobTemplateFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},

View File

@ -42,7 +42,7 @@ angular.module('OrganizationFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},
@ -87,7 +87,7 @@ angular.module('OrganizationFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('users', \{\{ user.id \}\}, '\{\{ user.username \}\}', 'users')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger',
awToolTip: 'Remove user'
}
@ -130,7 +130,7 @@ angular.module('OrganizationFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('admins', \{\{ admin.id \}\}, '\{\{ admin.username \}\}', 'administrators')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger',
awToolTip: 'Remove administrator'
}

View File

@ -97,7 +97,7 @@ angular.module('PermissionFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},

View File

@ -82,7 +82,7 @@ angular.module('ProjectFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},
@ -123,7 +123,7 @@ angular.module('ProjectFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('organizations', \{\{ organization.id \}\}, '\{\{ organization.name \}\}', 'organizations')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger',
awToolTip: 'Delete the organization'
}

View File

@ -56,7 +56,7 @@ angular.module('TeamFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},
@ -98,7 +98,7 @@ angular.module('TeamFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}', 'credentials')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger',
awToolTip: 'Remove the credential'
}
@ -154,7 +154,7 @@ angular.module('TeamFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('permissions', \{\{ permission.id \}\}, '\{\{ permission.name \}\}', 'permissions')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger',
awToolTip: 'Delete the permission'
}
@ -196,7 +196,7 @@ angular.module('TeamFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('projects', \{\{ project.id \}\}, '\{\{ project.name \}\}', 'projects')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger',
awToolTip: 'Remove the project'
}
@ -241,7 +241,7 @@ angular.module('TeamFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('users', \{\{ user.id \}\}, '\{\{ user.username \}\}', 'users')",
icon: 'icon-remove',
icon: 'icon-terash',
"class": 'btn-danger',
awToolTip: 'Remove user'
}

View File

@ -97,7 +97,7 @@ angular.module('UserFormDefinition', [])
reset: {
ngClick: 'formReset()',
label: 'Reset',
icon: 'icon-remove',
icon: 'icon-trash',
ngDisabled: true //Disabled when $pristine
}
},
@ -139,7 +139,7 @@ angular.module('UserFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('credentials', \{\{ credential.id \}\}, '\{\{ credential.name \}\}', 'credentials')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger',
awToolTip: 'Delete the credential'
}
@ -197,7 +197,7 @@ angular.module('UserFormDefinition', [])
"delete": {
label: 'Delete',
ngClick: "delete('permissions', \{\{ permission.id \}\}, '\{\{ permission.name \}\}', 'permissions')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger',
awToolTip: 'Delete the permission'
}

View File

@ -65,7 +65,7 @@ angular.module('CredentialsListDefinition', [])
"delete": {
ngClick: "deleteCredential(\{\{ credential.id \}\},'\{\{ credential.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
label: 'Delete',
"class": 'btn-small btn-danger',
awToolTip: 'Delete credential'

View File

@ -64,7 +64,7 @@ angular.module('GroupListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deleteGroup(\{\{ group.id \}\},'\{\{ group.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-small btn-danger',
awToolTip: 'Delete group'
}

View File

@ -55,7 +55,7 @@ angular.module('HostListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-small btn-danger',
awToolTip: 'Delete host'
}

View File

@ -70,7 +70,7 @@ angular.module('InventoriesListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deleteInventory(\{\{ inventory.id \}\},'\{\{ inventory.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-small btn-danger',
awToolTip: 'Delete inventory'
}

View File

@ -59,7 +59,7 @@ angular.module('JobTemplatesListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deleteJobTemplate(\{\{ job_template.id \}\},'\{\{ job_template.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-danger btn-small',
awToolTip: 'Delete template'
}

View File

@ -103,7 +103,15 @@ angular.module('JobsListDefinition', [])
ngClick: 'deleteJob(\{\{ job.id \}\})',
"class": 'btn-danger btn-small',
awToolTip: 'Cancel job',
ngDisabled: "job.status != 'new' && job.status != 'pending' && job.status != 'running'"
ngShow: "job.status == 'pending' || job.status == 'running'"
},
"delete": {
icon: 'icon-trash',
mode: 'all',
ngClick: 'deleteJob(\{\{ job.id \}\})',
"class": 'btn-danger btn-small',
awToolTip: 'Delete this job',
ngShow: "job.status != 'pending' && job.status != 'running'"
}
}
});

View File

@ -50,7 +50,7 @@ angular.module('OrganizationListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deleteOrganization(\{\{ organization.id \}\},'\{\{ organization.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-small btn-danger',
awToolTip: 'Delete organization'
}

View File

@ -64,7 +64,7 @@ angular.module('PermissionListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deletePermission(\{\{ permission.id \}\},'\{\{ permission.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-small btn-danger',
awToolTip: 'Delete permission'
}

View File

@ -52,7 +52,7 @@ angular.module('ProjectsListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deleteProject(\{\{ project.id \}\},'\{\{ project.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-small btn-danger',
awToolTip: 'Delete project'
}

View File

@ -57,7 +57,7 @@ angular.module('TeamsListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deleteTeam(\{\{ team.id \}\},'\{\{ team.name \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-small btn-danger',
awToolTip: 'Delete team'
}

View File

@ -57,7 +57,7 @@ angular.module('UserListDefinition', [])
"delete": {
label: 'Delete',
ngClick: "deleteUser(\{\{ user.id \}\},'\{\{ user.username \}\}')",
icon: 'icon-remove',
icon: 'icon-trash',
"class": 'btn-small btn-danger',
awToolTip: 'Delete user'
}

View File

@ -45,6 +45,8 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
html += (btn.dataPlacement) ? this.attr(btn, 'dataPlacement') : "";
html += (btn.dataContainer) ? this.attr(btn, 'dataContainer') : "";
html += (btn.dataTitle) ? this.attr(btn, 'dataTitle') : "";
html += (btn.ngShow) ? this.attr(btn, 'ngShow') : "";
html += (btn.ngHide) ? this.attr(btn, 'ngHide') : "";
html += " >" + this.attr(btn,'icon');
html += (btn.label) ? " " + btn.label : "";
html += "</button> ";