Lists and Templates overviews refactored to use ajax. Before the refactoring, they behaved and looked a bit different to the other (Ajax) tables. The main difference in the behavior was in the row numbers (1st column) when sort order was switched. The non-ajax tables rearranged the numbers in the 1st column while the ajax-tables didn't.

Some small tweaks in table-helpers to allow selecting which fields are pulled from DB (and how they are renamed).
This commit is contained in:
Tomas Bures 2017-04-16 03:22:32 -04:00
parent e5190c9b20
commit 9fdf52674e
12 changed files with 246 additions and 192 deletions

View file

@ -345,7 +345,7 @@ module.exports.filterSubscribers = (trigger, request, columns, callback) => {
values: [trigger.list]
};
tableHelpers.filter('subscription__' + trigger.list + ' JOIN trigger__' + trigger.id + ' ON trigger__' + trigger.id + '.subscription=subscription__' + trigger.list + '.id', request, columns, ['email', 'first_name', 'last_name'], 'email ASC', queryData, callback);
tableHelpers.filter('subscription__' + trigger.list + ' JOIN trigger__' + trigger.id + ' ON trigger__' + trigger.id + '.subscription=subscription__' + trigger.list + '.id', ['*'], request, columns, ['email', 'first_name', 'last_name'], 'email ASC', queryData, callback);
};
function createTriggerTable(id, callback) {