chg: Removed unused commented code

pull/93/head
Sami Mokaddem 2022-02-22 14:07:01 +01:00
parent 4e4cb34b22
commit c0b6925aa5
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
3 changed files with 0 additions and 68 deletions

View File

@ -75,14 +75,6 @@ echo $this->element('genericElements/IndexTable/index_table', [
'sort' => 'deleted',
'element' => 'boolean',
],
// [
// 'name' => __('Members'),
// 'data_path' => 'alignments',
// 'element' => 'count_summary',
// 'url' => '/sharingGroups/view/{{id}}',
// 'url_data_path' => 'id'
// ]
],
'title' => __('Mailing Lists Index'),
'description' => __('Mailing list are email distribution lists containing individuals.'),

View File

@ -2,7 +2,6 @@
echo $this->element('genericElements/IndexTable/index_table', [
'data' => [
'data' => $individuals,
// 'skip_pagination' => 1,
'top_bar' => [
'children' => [
[

View File

@ -67,64 +67,5 @@ echo $this->Bootstrap->modal([
'size' => $modalSize,
'type' => $modalType,
'confirmText' => __('Update meta-templates'),
// 'confirmFunction' => 'updateMetaTemplate',
]);
?>
<script>
// function updateMetaTemplate(idList, selectedData, $table) {
// const successCallback = function([data, modalObject]) {
// location.reload()
// }
// const failCallback = ([data, modalObject]) => {
// const tableData = selectedData.map(row => {
// entryInError = data.filter(error => error.data.id == row.id)[0]
// $faIcon = $('<i class="fa"></i>').addClass(entryInError.success ? 'fa-check text-success' : 'fa-times text-danger')
// return [row.id, row.first_name, row.last_name, row.email, entryInError.message, JSON.stringify(entryInError.errors), $faIcon]
// });
// handleMessageTable(
// modalObject.$modal,
// ['<?= __('ID') ?>', '<?= __('First name') ?>', '<?= __('Last name') ?>', '<?= __('email') ?>', '<?= __('Message') ?>', '<?= __('Error') ?>', '<?= __('State') ?>'],
// tableData
// )
// const $footer = $(modalObject.ajaxApi.statusNode).parent()
// modalObject.ajaxApi.statusNode.remove()
// const $cancelButton = $footer.find('button[data-bs-dismiss="modal"]')
// $cancelButton.text('<?= __('OK') ?>').removeClass('btn-secondary').addClass('btn-primary')
// }
// UI.submissionModal('[URL_HERE]', successCallback, failCallback).then(([modalObject, ajaxApi]) => {
// const $idsInput = modalObject.$modal.find('form').find('input#ids-field')
// $idsInput.val(JSON.stringify(idList))
// const tableData = selectedData.map(row => {
// return [row.id, row.first_name, row.last_name, row.email]
// });
// handleMessageTable(
// modalObject.$modal,
// ['<?= __('ID') ?>', '<?= __('First name') ?>', '<?= __('Last name') ?>', '<?= __('email') ?>'],
// tableData
// )
// })
// function constructMessageTable(header, data) {
// return HtmlHelper.table(
// header,
// data, {
// small: true,
// borderless: true,
// tableClass: ['message-table', 'mt-4 mb-0'],
// }
// )
// }
// function handleMessageTable($modal, header, data) {
// const $modalBody = $modal.find('.modal-body')
// const $messageTable = $modalBody.find('table.message-table')
// const messageTableHTML = constructMessageTable(header, data)[0].outerHTML
// if ($messageTable.length) {
// $messageTable.html(messageTableHTML)
// } else {
// $modalBody.append(messageTableHTML)
// }
// }
// }
</script>