@@ -729,10 +729,9 @@ define([
729
729
$ ( '.move-button' ) . css ( 'display' , 'none' ) ;
730
730
}
731
731
732
- // Download is only visible when one item is selected, and it is not a
733
- // running notebook or a directory
734
- // TODO(nhdaly): Add support for download multiple items at once.
735
- if ( selected . length === 1 && ! has_running_notebook && ! has_directory ) {
732
+ // Download is only visible when items are selected, and none are
733
+ // running notebooks or a directories
734
+ if ( selected . length > 0 && ! has_running_notebook && ! has_directory ) {
736
735
$ ( '.download-button' ) . css ( 'display' , 'inline-block' ) ;
737
736
} else {
738
737
$ ( '.download-button' ) . css ( 'display' , 'none' ) ;
@@ -1150,15 +1149,11 @@ define([
1150
1149
1151
1150
NotebookList . prototype . download_selected = function ( ) {
1152
1151
var that = this ;
1153
-
1154
- // TODO(nhdaly): Support download multiple items at once.
1155
- if ( that . selected . length !== 1 ) {
1156
- return ;
1157
- }
1158
-
1159
- var item_path = that . selected [ 0 ] . path ;
1160
-
1161
- window . open ( utils . url_path_join ( that . base_url , 'files' , utils . encode_uri_components ( item_path ) ) + '?download=1' , IPython . _target ) ;
1152
+
1153
+ that . selected . forEach ( function ( item ) {
1154
+ var item_path = utils . encode_uri_components ( item . path ) ;
1155
+ window . open ( utils . url_path_join ( that . base_url , 'files' , utils . encode_uri_components ( item_path ) ) + '?download=1' , IPython . _target ) ;
1156
+ } ) ;
1162
1157
} ;
1163
1158
1164
1159
NotebookList . prototype . delete_selected = function ( ) {
0 commit comments