mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 04:24:45 -04:00
Refactor API.
This commit is contained in:
parent
e31028f5a9
commit
7c4f9d574c
5 changed files with 53 additions and 36 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue