Show More
@@ -126,8 +126,7 b' define([' | |||||
126 | $('#tree-selector .select-running-notebooks').click($.proxy(this.select_running_notebooks, this)); |
|
126 | $('#tree-selector .select-running-notebooks').click($.proxy(this.select_running_notebooks, this)); | |
127 | $('#tree-selector .select-files').click($.proxy(this.select_files, this)); |
|
127 | $('#tree-selector .select-files').click($.proxy(this.select_files, this)); | |
128 | $('#tree-selector .select-directories').click($.proxy(this.select_directories, this)); |
|
128 | $('#tree-selector .select-directories').click($.proxy(this.select_directories, this)); | |
129 |
$('#tree-selector .select- |
|
129 | $('#tree-selector .deselect-all').click($.proxy(this.deselect_all, this)); | |
130 | $('#tree-selector .unselect-all').click($.proxy(this.unselect_all, this)); |
|
|||
131 | } |
|
130 | } | |
132 | }; |
|
131 | }; | |
133 |
|
132 | |||
@@ -379,7 +378,7 b' define([' | |||||
379 | * Select all of the notebooks in the tree. |
|
378 | * Select all of the notebooks in the tree. | |
380 | */ |
|
379 | */ | |
381 | NotebookList.prototype.select_notebooks = function() { |
|
380 | NotebookList.prototype.select_notebooks = function() { | |
382 |
this. |
|
381 | this.deselect_all(); | |
383 | $('.list_item').each(function(index, item) { |
|
382 | $('.list_item').each(function(index, item) { | |
384 | if ($(item).data('type') === 'notebook') { |
|
383 | if ($(item).data('type') === 'notebook') { | |
385 | $(item).find('input[type=checkbox]').prop('checked', true); |
|
384 | $(item).find('input[type=checkbox]').prop('checked', true); | |
@@ -392,7 +391,7 b' define([' | |||||
392 | * Select all of the running notebooks in the tree. |
|
391 | * Select all of the running notebooks in the tree. | |
393 | */ |
|
392 | */ | |
394 | NotebookList.prototype.select_running_notebooks = function() { |
|
393 | NotebookList.prototype.select_running_notebooks = function() { | |
395 |
this. |
|
394 | this.deselect_all(); | |
396 | var that = this; |
|
395 | var that = this; | |
397 | $('.list_item').each(function(index, item) { |
|
396 | $('.list_item').each(function(index, item) { | |
398 | if ($(item).data('type') === 'notebook' && that.sessions[$(item).data('path')] !== undefined) { |
|
397 | if ($(item).data('type') === 'notebook' && that.sessions[$(item).data('path')] !== undefined) { | |
@@ -406,7 +405,7 b' define([' | |||||
406 | * Select all of the files in the tree. |
|
405 | * Select all of the files in the tree. | |
407 | */ |
|
406 | */ | |
408 | NotebookList.prototype.select_files = function() { |
|
407 | NotebookList.prototype.select_files = function() { | |
409 |
this. |
|
408 | this.deselect_all(); | |
410 | $('.list_item').each(function(index, item) { |
|
409 | $('.list_item').each(function(index, item) { | |
411 | if ($(item).data('type') === 'file') { |
|
410 | if ($(item).data('type') === 'file') { | |
412 | $(item).find('input[type=checkbox]').prop('checked', true); |
|
411 | $(item).find('input[type=checkbox]').prop('checked', true); | |
@@ -419,7 +418,7 b' define([' | |||||
419 | * Select all of the directories in the tree. |
|
418 | * Select all of the directories in the tree. | |
420 | */ |
|
419 | */ | |
421 | NotebookList.prototype.select_directories = function() { |
|
420 | NotebookList.prototype.select_directories = function() { | |
422 |
this. |
|
421 | this.deselect_all(); | |
423 | $('.list_item').each(function(index, item) { |
|
422 | $('.list_item').each(function(index, item) { | |
424 | if ($(item).data('type') === 'directory') { |
|
423 | if ($(item).data('type') === 'directory') { | |
425 | $(item).find('input[type=checkbox]').prop('checked', true); |
|
424 | $(item).find('input[type=checkbox]').prop('checked', true); | |
@@ -429,19 +428,9 b' define([' | |||||
429 | }; |
|
428 | }; | |
430 |
|
429 | |||
431 | /** |
|
430 | /** | |
432 | * Select the inverse of the current selection. |
|
|||
433 | */ |
|
|||
434 | NotebookList.prototype.select_inverse = function() { |
|
|||
435 | $('.list_item input[type=checkbox]').each(function(index, item) { |
|
|||
436 | $(item).prop('checked', !$(item).prop('checked')); |
|
|||
437 | }); |
|
|||
438 | this._selection_changed(); |
|
|||
439 | }; |
|
|||
440 |
|
||||
441 | /** |
|
|||
442 | * Unselect everything selected in the tree. |
|
431 | * Unselect everything selected in the tree. | |
443 | */ |
|
432 | */ | |
444 |
NotebookList.prototype. |
|
433 | NotebookList.prototype.deselect_all = function() { | |
445 | $('.list_item input[type=checkbox]').each(function(index, item) { |
|
434 | $('.list_item input[type=checkbox]').each(function(index, item) { | |
446 | $(item).prop('checked', false); |
|
435 | $(item).prop('checked', false); | |
447 | }); |
|
436 | }); |
@@ -76,23 +76,21 b' data-terminals-available="{{terminals_available}}"' | |||||
76 | </div> |
|
76 | </div> | |
77 | <div id="notebook_list"> |
|
77 | <div id="notebook_list"> | |
78 | <div id="notebook_list_header" class="row list_header"> |
|
78 | <div id="notebook_list_header" class="row list_header"> | |
79 |
|
79 | <div class="dropdown" id='tree-selector'> | ||
80 | <div class="dropdown" id='tree-selector'> |
|
80 | <button class="btn btn-default btn-xs dropdown-toggle" type="button" id="tree-selector-btn" data-toggle="dropdown" aria-expanded="true"> | |
81 | <button class="btn btn-default btn-xs dropdown-toggle" type="button" id="tree-selector-btn" data-toggle="dropdown" aria-expanded="true"> |
|
81 | <input type='checkbox'></input> | |
82 | <input type='checkbox'></input> |
|
82 | <span class="caret"></span> | |
83 | <span class="caret"></span> |
|
83 | </button> | |
84 | </button> |
|
84 | <ul class="dropdown-menu" role="menu" aria-labelledby="tree-selector-btn"> | |
85 | <ul class="dropdown-menu" role="menu" aria-labelledby="tree-selector-btn"> |
|
85 | <li role="presentation" class="select-all"><a role="menuitem" tabindex="-1" href="#">Select all</a></li> | |
86 |
<li role="presentation" class="select- |
|
86 | <li role="presentation" class="select-notebooks"><a role="menuitem" tabindex="-1" href="#">Select notebooks</a></li> | |
87 | <li role="presentation" class="select-notebooks"><a role="menuitem" tabindex="-1" href="#">Select notebooks</a></li> |
|
87 | <li role="presentation" class="select-running-notebooks"><a role="menuitem" tabindex="-1" href="#">Select running notebooks</a></li> | |
88 |
<li role="presentation" class="select- |
|
88 | <li role="presentation" class="select-files"><a role="menuitem" tabindex="-1" href="#">Select files</a></li> | |
89 |
<li role="presentation" class="select- |
|
89 | <li role="presentation" class="select-directories"><a role="menuitem" tabindex="-1" href="#">Select directories</a></li> | |
90 | <li role="presentation" class="select-directories"><a role="menuitem" tabindex="-1" href="#">Select directories</a></li> |
|
90 | <li role="presentation" class="divider"></li> | |
91 |
<li role="presentation" class="select- |
|
91 | <li role="presentation" class="deselect-all"><a role="menuitem" tabindex="-1" href="#">Deselect all</a></li> | |
92 | <li role="presentation" class="unselect-all"><a role="menuitem" tabindex="-1" href="#">Unselect all</a></li> |
|
92 | </ul> | |
93 | </ul> |
|
93 | </div> | |
94 | </div> |
|
|||
95 |
|
||||
96 | <div id="project_name"> |
|
94 | <div id="project_name"> | |
97 | <ul class="breadcrumb"> |
|
95 | <ul class="breadcrumb"> | |
98 | <li><a href="{{breadcrumbs[0][0]}}"><i class="fa fa-home"></i></a></li> |
|
96 | <li><a href="{{breadcrumbs[0][0]}}"><i class="fa fa-home"></i></a></li> |
General Comments 0
You need to be logged in to leave comments.
Login now