Merge pull request #2626 from jakemcdermott/fix-multicred

always recompile multicredential lists

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2018-11-07 20:27:20 +00:00 committed by GitHub
commit 03169a96ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,17 +44,24 @@ function MultiCredentialModal(
selectedCredentials: '=',
},
link: (scope, element, attrs, controllers) => {
const compiledList = $compile(listHtml)(scope);
const compiledVaultList = $compile(vaultHtml)(scope);
const modalBodyElement = $('#multi-credential-modal-body');
const modalElement = $('#multi-credential-modal');
scope.showModal = () => modalElement.modal('show');
scope.hideModal = () => modalElement.modal('hide');
scope.createList = () => modalBodyElement.append(compiledList);
scope.createVaultList = () => modalBodyElement.append(compiledVaultList);
scope.createList = () => {
const compiledList = $compile(listHtml)(scope);
modalBodyElement.append(compiledList);
};
scope.createVaultList = () => {
const compiledVaultList = $compile(vaultHtml)(scope);
modalBodyElement.append(compiledVaultList);
};
scope.destroyList = () => modalBodyElement.empty();
modalElement.on('hidden.bs.modal', () => {