##// END OF EJS Templates
add badge to each menu item...
Mathieu -
Show More
@@ -499,7 +499,11 define([
499 if (selected_nums[i] === 0) {
499 if (selected_nums[i] === 0) {
500 $('#'+checkbox_ids[i])[0].indeterminate = false;
500 $('#'+checkbox_ids[i])[0].indeterminate = false;
501 $('#'+checkbox_ids[i]).prop('checked', false);
501 $('#'+checkbox_ids[i]).prop('checked', false);
502 } else if (selected_nums[i] === total_nums[i]) {
502 $('#badge-'+checkbox_ids[i]).text('');
503 } else {
504 // Update badge
505 $('#badge-'+checkbox_ids[i]).text(selected_nums[i]);
506 if (selected_nums[i] === total_nums[i]) {
503 $('#'+checkbox_ids[i])[0].indeterminate = false;
507 $('#'+checkbox_ids[i])[0].indeterminate = false;
504 $('#'+checkbox_ids[i]).prop('checked', true);
508 $('#'+checkbox_ids[i]).prop('checked', true);
505 } else {
509 } else {
@@ -507,6 +511,7 define([
507 $('#'+checkbox_ids[i])[0].indeterminate = true;
511 $('#'+checkbox_ids[i])[0].indeterminate = true;
508 }
512 }
509 }
513 }
514 }
510 };
515 };
511
516
512 NotebookList.prototype.add_link = function (model, item) {
517 NotebookList.prototype.add_link = function (model, item) {
@@ -88,6 +88,7 data-terminals-available="{{terminals_available}}"
88 <label for="select-folders">
88 <label for="select-folders">
89 <i class="item_icon folder_icon icon-fixed-width"></i>
89 <i class="item_icon folder_icon icon-fixed-width"></i>
90 Folders
90 Folders
91 <span class="badge" id="badge-select-folders"></span>
91 </label>
92 </label>
92 </li>
93 </li>
93 <li role="presentation">
94 <li role="presentation">
@@ -95,6 +96,7 data-terminals-available="{{terminals_available}}"
95 <label for="select-notebooks">
96 <label for="select-notebooks">
96 <i class="item_icon notebook_icon icon-fixed-width"></i>
97 <i class="item_icon notebook_icon icon-fixed-width"></i>
97 All Notebooks
98 All Notebooks
99 <span class="badge" id="badge-select-notebooks"></span>
98 </label>
100 </label>
99 </li>
101 </li>
100 <li role="presentation">
102 <li role="presentation">
@@ -102,6 +104,7 data-terminals-available="{{terminals_available}}"
102 <label for="select-running-notebooks">
104 <label for="select-running-notebooks">
103 <i class="item_icon running_notebook_icon icon-fixed-width"></i>
105 <i class="item_icon running_notebook_icon icon-fixed-width"></i>
104 Running
106 Running
107 <span class="badge" id="badge-select-running-notebooks"></span>
105 </label>
108 </label>
106 </li>
109 </li>
107 <li role="presentation">
110 <li role="presentation">
@@ -109,6 +112,7 data-terminals-available="{{terminals_available}}"
109 <label for="select-files">
112 <label for="select-files">
110 <i class="item_icon file_icon icon-fixed-width"></i>
113 <i class="item_icon file_icon icon-fixed-width"></i>
111 Files
114 Files
115 <span class="badge" id="badge-select-files"></span>
112 </label>
116 </label>
113 </li>
117 </li>
114 </ul>
118 </ul>
General Comments 0
You need to be logged in to leave comments. Login now