Refactor API.

This commit is contained in:
Lars Jung 2015-05-05 01:58:50 +02:00
parent e31028f5a9
commit 7c4f9d574c
5 changed files with 53 additions and 36 deletions

View file

@ -42,10 +42,14 @@ modulejs.define('ext/download', ['_', '$', 'core/event', 'core/location', 'core/
action: 'download',
as: name + '.' + extension,
type: type,
baseHref: location.getAbsHref(),
hrefs: _.pluck(selectedItems, 'absHref').join('|:|')
baseHref: location.getAbsHref()
};
_.each(selectedItems, function (item, idx) {
query['hrefs[' + idx + ']'] = item.absHref;
});
server.formRequest(query);
}