")
if groups_infos.members:
H.extend(
[
diff --git a/app/static/css/scodoc.css b/app/static/css/scodoc.css
index e5db153a41..da2dfe36d0 100644
--- a/app/static/css/scodoc.css
+++ b/app/static/css/scodoc.css
@@ -39,6 +39,41 @@ h3 {
font-weight: bold;
}
+/* customization of multiselect style */
+.multiselect-container.dropdown-menu {
+ background-color: #e9e9e9;
+}
+.multiselect-container label.form-check-label {
+ font-weight: normal;
+ margin-left: 8px;
+}
+button.multiselect-option {
+ width: 100%;
+ text-align: left;
+ border: none;
+}
+.multiselect-container button.multiselect-option span.form-check {
+ padding-left: 2px;
+}
+.multiselect-container span.multiselect-group {
+ font-weight: bold;
+}
+.multiselect-container
+ .multiselect-all.active:not(.multiselect-active-item-fallback),
+.multiselect-container
+ .multiselect-all:not(.multiselect-active-item-fallback):active,
+.multiselect-container
+ .multiselect-group.active:not(.multiselect-active-item-fallback),
+.multiselect-container
+ .multiselect-group:not(.multiselect-active-item-fallback):active,
+.multiselect-container
+ .multiselect-option.active:not(.multiselect-active-item-fallback),
+.multiselect-container
+ .multiselect-option:not(.multiselect-active-item-fallback):active {
+ background-color: #e9e9e9;
+}
+
+/* Legacy ScoDoc pages */
div#gtrcontent {
margin-bottom: 16px;
}
@@ -61,7 +96,8 @@ div#gtrcontent {
}
.scotext {
- font-family: TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif;
+ font-family: TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia,
+ serif;
}
.sco-hidden {
@@ -176,7 +212,7 @@ tr.bandeaugtr {
text-decoration: underline;
}
-.navbar-default .navbar-nav>li.logout a {
+.navbar-default .navbar-nav > li.logout a {
color: rgb(255, 0, 0);
}
@@ -212,7 +248,6 @@ div.about-logo {
padding-top: 10px;
}
-
div.head_message {
margin-top: 12px;
margin-bottom: 8px;
@@ -289,7 +324,6 @@ p.footer {
border-top: 1px solid rgb(60, 60, 60);
}
-
/* ---- (left) SIDEBAR ----- */
div.sidebar {
@@ -403,7 +437,6 @@ div.table_etud_in_dept table.gt_table {
font-size: medium;
}
-
.etud-insidebar ul {
padding-left: 1.5em;
margin-left: 0;
@@ -571,7 +604,7 @@ table.semlist tbody tr td.modalite {
.sco_modified {
font-weight: bold;
- color: indigo
+ color: indigo;
}
/***************************/
@@ -586,7 +619,7 @@ table.semlist tbody tr td.modalite {
border-radius: 0 0 10px 10px;
background: #ec7068;
background: #90c;
- color: #FFF;
+ color: #fff;
font-size: 24px;
animation: message 3s;
transform: translate(-50%, 0);
@@ -594,15 +627,14 @@ table.semlist tbody tr td.modalite {
@keyframes message {
20% {
- transform: translate(-50%, 100%)
+ transform: translate(-50%, 100%);
}
80% {
- transform: translate(-50%, 100%)
+ transform: translate(-50%, 100%);
}
}
-
div#gtrcontent table.semlist tbody tr.css_S-1 td {
background-color: rgb(251, 250, 216);
}
@@ -643,7 +675,8 @@ div.news {
border-radius: 8px;
}
-div.news a, div.news a.stdlink {
+div.news a,
+div.news a.stdlink {
color: black;
text-decoration: none;
}
@@ -672,7 +705,6 @@ span.newstext {
font-style: normal;
}
-
span.gt_export_icons {
margin-left: 1.5em;
}
@@ -683,7 +715,7 @@ div.scoinfos {
margin-bottom: 0px;
padding: 2px;
padding-bottom: 0px;
- background-color: #F4F4B2;
+ background-color: #f4f4b2;
}
/* ----- fiches etudiants ------ */
@@ -752,17 +784,17 @@ div.etudarchive ul {
div.etudarchive ul li {
background-image: url(/ScoDoc/static/icons/bullet_arrow.png);
background-repeat: no-repeat;
- background-position: 0 .4em;
- padding-left: .6em;
+ background-position: 0 0.4em;
+ padding-left: 0.6em;
}
div.etudarchive ul li.addetudarchive {
background-image: url(/ScoDoc/static/icons/bullet_plus.png);
- padding-left: 1.2em
+ padding-left: 1.2em;
}
span.etudarchive_descr {
- margin-right: .4em;
+ margin-right: 0.4em;
}
span.deletudarchive {
@@ -871,7 +903,6 @@ div.ficheinscriptions {
color: red;
}
-
td.photocell {
padding-left: 32px;
}
@@ -989,7 +1020,6 @@ span.linktitresem a:visited {
color: red;
}
-
a.stdlink,
a.stdlink:visited {
color: blue;
@@ -1070,7 +1100,6 @@ span.trombi_box a img {
margin-bottom: 0px;
}
-
/* markup non semantique pour les cas simples */
.fontred {
@@ -1126,7 +1155,8 @@ a.discretelink:hover {
text-align: center;
}
-.expl, .help {
+.expl,
+.help {
max-width: var(--sco-content-max-width);
}
.help {
@@ -1138,7 +1168,8 @@ a.discretelink:hover {
color: red;
}
-div.sco_box, div.sco_help {
+div.sco_box,
+div.sco_help {
margin-top: 12px;
margin-bottom: 4px;
margin-left: 0px;
@@ -1208,7 +1239,7 @@ span.wtf-field ul.errors li {
display: inline-block;
}
-.configuration_logo details>*:not(summary) {
+.configuration_logo details > *:not(summary) {
margin-left: 32px;
}
@@ -1349,7 +1380,7 @@ table.notes_evaluation th.eval_incomplete {
font-size: 80%;
}
-table.notes_evaluation td.eval_incomplete>a {
+table.notes_evaluation td.eval_incomplete > a {
font-size: 80%;
color: rgb(166, 50, 159);
}
@@ -1369,7 +1400,6 @@ table.notes_evaluation td.exc a {
color: rgb(0, 131, 0);
}
-
table.notes_evaluation tr td a.discretelink:hover {
text-decoration: none;
}
@@ -1418,7 +1448,7 @@ div.jury_footer {
justify-content: space-evenly;
}
-div.jury_footer>span {
+div.jury_footer > span {
border: 2px solid rgb(90, 90, 90);
border-radius: 4px;
padding: 4px;
@@ -1444,7 +1474,6 @@ div.jury_footer>span {
color: red;
}
-
span.eval_info {
font-style: italic;
}
@@ -1592,7 +1621,7 @@ formsemestre_page_title .lock img {
}
#formnotes td.tf-ro-fieldlabel:after {
- content: '';
+ content: "";
}
#formnotes .tf-ro-field.formnote_bareme {
@@ -1639,7 +1668,7 @@ formsemestre_page_title .lock img {
margin-left: -1px;
}
-#sco_menu>li {
+#sco_menu > li {
float: left;
width: auto;
/* 120px !important; */
@@ -1648,20 +1677,20 @@ formsemestre_page_title .lock img {
text-transform: uppercase;
}
-#sco_menu>li li {
+#sco_menu > li li {
text-transform: none;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
}
-#sco_menu>li>a {
+#sco_menu > li > a {
font-weight: bold !important;
padding-left: 15px;
padding-right: 15px;
}
-#sco_menu>li>a.ui-menu-item,
-#sco_menu>li>a.ui-menu-item:visited {
+#sco_menu > li > a.ui-menu-item,
+#sco_menu > li > a.ui-menu-item:visited {
text-decoration: none;
}
@@ -1669,14 +1698,14 @@ formsemestre_page_title .lock img {
width: 200px;
}
-.sco_dropdown_menu>li {
+.sco_dropdown_menu > li {
width: auto;
/* 120px !important; */
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
}
-.menu-etudiant>li {
+.menu-etudiant > li {
width: 200px !important;
}
@@ -1731,7 +1760,7 @@ tr.formsemestre_status {
}
tr.formsemestre_status_green {
- background-color: #EFF7F2;
+ background-color: #eff7f2;
}
tr.formsemestre_status_ue {
@@ -1814,7 +1843,6 @@ span.mod_coef_indicator_zero {
border: 1px solid rgb(156, 156, 156);
}
-
span.status_ue_acro {
font-weight: bold;
}
@@ -1851,7 +1879,7 @@ ul.ue_inscr_list li.etud {
}
.sem-groups-abs {
- background-color: rgb(137,137,137);
+ background-color: rgb(137, 137, 137);
border-radius: 16px;
padding: 16px;
width: fit-content;
@@ -1867,7 +1895,7 @@ ul.ue_inscr_list li.etud {
font-size: 110%;
}
.sem-groups-partition {
- background-color: rgb(213,203,183);
+ background-color: rgb(213, 203, 183);
border-radius: 12px;
margin-bottom: 8px;
padding: 12px;
@@ -1875,7 +1903,8 @@ ul.ue_inscr_list li.etud {
grid-template-columns: 240px auto;
}
-.sem-groups-list, .sem-groups-assi {
+.sem-groups-list,
+.sem-groups-assi {
background-color: white;
border-radius: 6px;
margin: 4px;
@@ -1936,7 +1965,7 @@ div#modimpl_coefs {
font-size: 60%;
}
-.coefs_histo>div {
+.coefs_histo > div {
--height: calc(32px * var(--coef) / max(var(--max), 1));
height: var(--height);
padding: var(--height) 4px 0 4px;
@@ -1944,7 +1973,7 @@ div#modimpl_coefs {
box-sizing: border-box;
}
-.coefs_histo>div:nth-child(odd) {
+.coefs_histo > div:nth-child(odd) {
background-color: #9c0;
}
@@ -1963,7 +1992,7 @@ div.evaluation_titre {
margin-left: 4px;
}
-.evaluation_poids>div {
+.evaluation_poids > div {
display: inline-flex;
height: 12px;
width: 12px;
@@ -1974,7 +2003,7 @@ div.evaluation_titre {
justify-content: center;
}
-.evaluation_poids>div>div {
+.evaluation_poids > div > div {
height: var(--size);
width: var(--size);
background: #09c;
@@ -2028,7 +2057,6 @@ span.mievr_rattr {
margin-left: 2em;
margin-top: 1px;
margin-bottom: 2px;
- ;
border: 1px solid red;
padding: 1px 3px 1px 3px;
}
@@ -2054,15 +2082,16 @@ tr.mievr td {
background-color: white;
}
-tr.mievr.non_visible_inter td, tr.mievr.non_visible_inter th {
+tr.mievr.non_visible_inter td,
+tr.mievr.non_visible_inter th {
/* background-color: #d2cdc5; */
background: repeating-linear-gradient(
- 45deg,
- #f0f0f0,
- #f0f0f0 10px,
- #e0e0e0 10px,
- #e0e0e0 20px
-);
+ 45deg,
+ #f0f0f0,
+ #f0f0f0 10px,
+ #e0e0e0 10px,
+ #e0e0e0 20px
+ );
}
tr.mievr th {
@@ -2145,7 +2174,8 @@ span.eval_coef_ue {
margin-right: 2em;
}
-span.eval_coef_ue_titre {}
+span.eval_coef_ue_titre {
+}
/* Inscriptions modules/UE */
div.list_but_ue_inscriptions {
@@ -2201,7 +2231,6 @@ form.list_but_ue_inscriptions td {
text-align: center;
}
-
table#but_ue_inscriptions {
margin-left: 16px;
width: auto;
@@ -2355,10 +2384,11 @@ div.formation_list_ues {
div.formation_list_ues {
background-color: #b7d2fa;
- margin-top: 20px
+ margin-top: 20px;
}
-div.formation_list_ues_content {}
+div.formation_list_ues_content {
+}
div.formation_list_modules {
margin-top: 20px;
@@ -2428,7 +2458,7 @@ div.formation_parcs {
column-gap: 8px;
}
-div.formation_parcs>div {
+div.formation_parcs > div {
font-size: 100%;
color: white;
background-color: #09c;
@@ -2438,24 +2468,23 @@ div.formation_parcs>div {
padding: 4px 8px;
}
-div.formation_parcs>div.focus {
+div.formation_parcs > div.focus {
opacity: 1;
}
-div.formation_parcs>div>a:hover {
+div.formation_parcs > div > a:hover {
color: #ccc;
}
-div.formation_parcs>div>a,
-div.formation_parcs>div>a:visited {
+div.formation_parcs > div > a,
+div.formation_parcs > div > a:visited {
color: white;
}
-div.ue_choix_niveau>div.formation_parcs>div {
+div.ue_choix_niveau > div.formation_parcs > div {
font-size: 80%;
}
-
div.ue_list_tit {
font-weight: bold;
margin-top: 8px;
@@ -2516,7 +2545,7 @@ span.ue_type {
}
table.formsemestre_description td.ue_coef_nul {
- background-color: yellow!important;
+ background-color: yellow !important;
color: red;
font-weight: bold;
}
@@ -2652,7 +2681,7 @@ div.cont_ue_choix_niveau {
flex-wrap: wrap;
}
-div.cont_ue_choix_niveau>div {
+div.cont_ue_choix_niveau > div {
display: inline-flex;
margin-left: 8px;
align-items: center;
@@ -2688,7 +2717,6 @@ div#ue_list_modules {
margin-right: 15px;
}
-
span.ue_share {
font-weight: bold;
}
@@ -2734,11 +2762,11 @@ span.code_parcours.no_parcours {
background-color: firebrick;
}
-tr#tf_module_parcours>td {
+tr#tf_module_parcours > td {
background-color: rgb(229, 229, 229);
}
-tr#tf_module_app_critiques>td {
+tr#tf_module_app_critiques > td {
background-color: rgb(194, 209, 228);
}
@@ -3074,7 +3102,6 @@ a.bull_link:hover {
text-decoration: underline;
}
-
div.bulletin_menubar {
padding-left: 25px;
}
@@ -3122,9 +3149,9 @@ div.eval_description {
div.bul_foot {
max-width: 1000px;
- background: #FFE7D5;
+ background: #ffe7d5;
border-radius: 16px;
- border: 1px solid #AAA;
+ border: 1px solid #aaa;
padding: 16px 32px;
margin-left: 16px;
}
@@ -3155,7 +3182,6 @@ span.titredivsaisienote {
font-size: 115%;
}
-
.etud_dem {
color: rgb(130, 130, 130);
}
@@ -3293,7 +3319,6 @@ mark {
padding-right: 5px;
}
-
form.sco_pref table.tf {
border-spacing: 5px 15px;
}
@@ -3305,7 +3330,7 @@ td.tf-ro-fieldlabel {
}
td.tf-ro-fieldlabel:after {
- content: ' :';
+ content: " :";
}
td.tf-ro-field {
@@ -3416,7 +3441,7 @@ P.gtr_devel:before {
/* ---- Sortable tables --- */
/* Sortable tables */
table.sortable a.sortheader {
- background-color: #E6E6E6;
+ background-color: #e6e6e6;
color: black;
font-weight: bold;
text-decoration: none;
@@ -3502,7 +3527,6 @@ table.recap_parcours td {
td.rcp_dec {
color: rgb(0%, 0%, 50%);
- ;
}
td.rcp_nonass,
@@ -3541,7 +3565,13 @@ table.recap_hide_details tr.sem_precedent td.ue_acro span {
}
.recap_parcours tr.sem_autre_formation td.rcp_titre_sem {
- background-image: repeating-linear-gradient(-45deg, rgb(100, 205, 193), rgb(100, 205, 193) 2px, transparent 5px, transparent 40px);
+ background-image: repeating-linear-gradient(
+ -45deg,
+ rgb(100, 205, 193),
+ rgb(100, 205, 193) 2px,
+ transparent 5px,
+ transparent 40px
+ );
}
.rcp_l2 td {
@@ -3612,7 +3642,6 @@ th.sfv_subtitle {
font-style: italic;
}
-
tr.sfv_ass {
background-color: rgb(90%, 90%, 80%);
}
@@ -3659,7 +3688,7 @@ span.finalisationinscription {
.pas_sembox_title a {
font-weight: bold;
font-size: 100%;
- color: #1C721C;
+ color: #1c721c;
}
.pas_sembox_subtitle {
@@ -3773,20 +3802,19 @@ div.module_check_absences ul {
z-index: 1;
}
-.scoplement>div {
+.scoplement > div {
text-align: left;
display: inline-block;
white-space: nowrap;
}
-.scoplement>div:nth-child(1),
-.scoplement>div:nth-child(7) {
+.scoplement > div:nth-child(1),
+.scoplement > div:nth-child(7) {
margin-bottom: 8px;
}
/* ----------------------------------------------- */
-
/* ----------------------------- */
/* TABLES generees par gen_table */
/* ----------------------------- */
@@ -3811,7 +3839,6 @@ table.table_coldate tr td:first-child {
color: rgb(0%, 0%, 50%);
}
-
table.table_listegroupe tr td {
padding-left: 0.5em;
padding-right: 0.5em;
@@ -3827,7 +3854,6 @@ table.list_users th.roles_string {
overflow-wrap: break-word;
}
-
table.formsemestre_description tr.table_row_ue td {
font-weight: bold;
}
@@ -3847,15 +3873,15 @@ table.formsemestre_description tbody tr.evaluation td {
}
/* --- */
-tr#tf_extue_decl>td,
-tr#tf_extue_note>td {
+tr#tf_extue_decl > td,
+tr#tf_extue_note > td {
padding-top: 20px;
}
-tr#tf_extue_titre>td,
-tr#tf_extue_acronyme>td,
-tr#tf_extue_type>td,
-tr#tf_extue_ects>td {
+tr#tf_extue_titre > td,
+tr#tf_extue_acronyme > td,
+tr#tf_extue_type > td,
+tr#tf_extue_ects > td {
padding-left: 20px;
}
@@ -3866,7 +3892,6 @@ div.form_rename_partition {
margin-bottom: 2em;
}
-
td.calday {
text-align: right;
vertical-align: top;
@@ -3877,7 +3902,6 @@ div.cal_evaluations table.monthcalendar td.calcell {
width: 6em;
}
-
div.cal_evaluations table.monthcalendar td a {
color: rgb(128, 0, 0);
}
@@ -3895,12 +3919,10 @@ div.othersemlist {
border: 1px solid gray;
}
-
div.othersemlist input {
margin-left: 20px;
}
-
div#update_warning {
display: none;
border: 1px solid red;
@@ -3911,12 +3933,12 @@ div#update_warning {
padding-bottom: 1ex;
}
-div#update_warning>div:first-child:before {
+div#update_warning > div:first-child:before {
content: url(/ScoDoc/static/icons/warning_img.png);
vertical-align: -80%;
}
-div#update_warning>div:nth-child(2) {
+div#update_warning > div:nth-child(2) {
font-size: 80%;
padding-left: 8ex;
}
@@ -3959,9 +3981,8 @@ ul.main li {
padding-bottom: 2ex;
}
-
#scodoc_admin {
- background-color: #EEFFFF;
+ background-color: #eeffff;
}
#message,
@@ -4027,11 +4048,13 @@ div.apo_csv_status span {
}
div.apo_csv_status_nok {
- background: url(/ScoDoc/static/icons/bullet_warning_img.png) no-repeat left top 0px;
+ background: url(/ScoDoc/static/icons/bullet_warning_img.png) no-repeat left
+ top 0px;
}
div.apo_csv_status_missing_elems {
- background: url(/ScoDoc/static/icons/bullet_warning_img.png) no-repeat left top 0px;
+ background: url(/ScoDoc/static/icons/bullet_warning_img.png) no-repeat left
+ top 0px;
padding-left: 22px;
}
@@ -4054,7 +4077,6 @@ div.apo_csv_jury_nok li {
color: red;
}
-
pre.small_pre_acc {
font-size: 60%;
width: 90%;
@@ -4063,7 +4085,7 @@ pre.small_pre_acc {
overflow: scroll;
}
-.apo_csv_jury_ok input[type=submit] {
+.apo_csv_jury_ok input[type="submit"] {
color: green;
}
@@ -4610,7 +4632,6 @@ table.table_recap th.col_malus {
color: rgb(165, 0, 0);
}
-
table.table_recap tr.ects td {
color: rgb(160, 86, 3);
font-weight: bold;
@@ -4688,7 +4709,6 @@ table.table_recap th.evaluation.first_of_mod {
border-left: 1px dashed rgb(4, 16, 159);
}
-
table.table_recap td.evaluation.att {
color: rgb(255, 0, 217);
font-weight: bold;
@@ -4760,7 +4780,6 @@ table.evaluations_recap tr.sae td {
background-color: #d8fcc8;
}
-
table.evaluations_recap tr.module td {
font-weight: bold;
}
@@ -4823,7 +4842,7 @@ div.cas_settings {
background-color: #feb4e54f;
}
-div.cas_settings>div,
+div.cas_settings > div,
div.cas_settings div.form-group {
margin-left: 8px;
}
diff --git a/app/static/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.css b/app/static/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.css
new file mode 100644
index 0000000000..5159427ef2
--- /dev/null
+++ b/app/static/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.css
@@ -0,0 +1,44 @@
+/**
+ * Bootstrap Multiselect (http://davidstutz.de/bootstrap-multiselect/)
+ *
+ * Apache License, Version 2.0:
+ * Copyright (c) 2012 - 2022 David Stutz
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ * BSD 3-Clause License:
+ * Copyright (c) 2012 - 2022 David Stutz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * - Neither the name of David Stutz nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+span.multiselect-native-select{position:relative}span.multiselect-native-select select{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px -1px -1px -3px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;left:50%;top:30px}.multiselect.dropdown-toggle:after{display:none}.multiselect{overflow:hidden;text-overflow:ellipsis}.multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .multiselect-reset .input-group{width:93%}.multiselect-container .multiselect-filter>.fa-search{z-index:1;padding-left:.75rem}.multiselect-container .multiselect-filter>input.multiselect-search{border:none;border-bottom:1px solid #d3d3d3;padding-left:2rem;margin-left:-1.625rem;border-bottom-right-radius:0;border-bottom-left-radius:0}.multiselect-container .multiselect-filter>input.multiselect-search:focus{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.multiselect-container .multiselect-filter>.multiselect-moz-clear-filter{margin-left:-1.5rem;display:none}.multiselect-container .multiselect-option.multiselect-group-option-indented-full{padding-left:2.6rem}.multiselect-container .multiselect-option.multiselect-group-option-indented{padding-left:1.8rem}.multiselect-container .multiselect-group{cursor:pointer}.multiselect-container .multiselect-group.closed .dropdown-toggle::after{transform:rotate(-90deg)}.multiselect-container .multiselect-group .caret-container~.form-check{margin-left:.5rem}.multiselect-container .multiselect-all,.multiselect-container .multiselect-group,.multiselect-container .multiselect-option{padding:.25rem .25rem .25rem .75rem}.multiselect-container .multiselect-all.dropdown-item,.multiselect-container .multiselect-all.dropdown-toggle,.multiselect-container .multiselect-group.dropdown-item,.multiselect-container .multiselect-group.dropdown-toggle,.multiselect-container .multiselect-option.dropdown-item,.multiselect-container .multiselect-option.dropdown-toggle{cursor:pointer}.multiselect-container .multiselect-all .form-check-label,.multiselect-container .multiselect-group .form-check-label,.multiselect-container .multiselect-option .form-check-label{cursor:pointer}.multiselect-container .multiselect-all.active:not(.multiselect-active-item-fallback),.multiselect-container .multiselect-all:not(.multiselect-active-item-fallback):active,.multiselect-container .multiselect-group.active:not(.multiselect-active-item-fallback),.multiselect-container .multiselect-group:not(.multiselect-active-item-fallback):active,.multiselect-container .multiselect-option.active:not(.multiselect-active-item-fallback),.multiselect-container .multiselect-option:not(.multiselect-active-item-fallback):active{background-color:#d3d3d3;color:#000}.multiselect-container .multiselect-all:focus,.multiselect-container .multiselect-all:hover,.multiselect-container .multiselect-group:focus,.multiselect-container .multiselect-group:hover,.multiselect-container .multiselect-option:focus,.multiselect-container .multiselect-option:hover{background-color:#a9a9a9!important}.multiselect-container .multiselect-all .form-check,.multiselect-container .multiselect-group .form-check,.multiselect-container .multiselect-option .form-check{padding:0 5px 0 20px}.multiselect-container .multiselect-all:focus,.multiselect-container .multiselect-group:focus,.multiselect-container .multiselect-option:focus{outline:0}.form-inline .multiselect-container span.form-check{padding:3px 20px 3px 40px}.input-group.input-group-sm>.multiselect-native-select .multiselect{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;padding-right:1.75rem;height:calc(1.5em + .5rem + 2px)}.input-group>.multiselect-native-select{flex:1 1 auto;width:1%}.input-group>.multiselect-native-select>div.btn-group{width:100%}.input-group>.multiselect-native-select:not(:first-child) .multiselect{border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.multiselect-native-select:not(:last-child) .multiselect{border-top-right-radius:0;border-bottom-right-radius:0}
\ No newline at end of file
diff --git a/app/static/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.js b/app/static/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.js
new file mode 100644
index 0000000000..b77e0a9ce1
--- /dev/null
+++ b/app/static/libjs/bootstrap-multiselect-1.1.2/bootstrap-multiselect.min.js
@@ -0,0 +1,44 @@
+/**
+ * Bootstrap Multiselect (http://davidstutz.de/bootstrap-multiselect/)
+ *
+ * Apache License, Version 2.0:
+ * Copyright (c) 2012 - 2022 David Stutz
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ * BSD 3-Clause License:
+ * Copyright (c) 2012 - 2022 David Stutz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * - Neither the name of David Stutz nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+!function(root,factory){"function"==typeof define&&define.amd&&"function"==typeof require&&"function"==typeof require.specified&&require.specified("knockout")?define(["jquery","knockout"],factory):factory(root.jQuery,root.ko)}(this,(function($,ko){"use strict";function forEach(array,callback){for(var index=0;index
').after(this.$container),this.$select.prop("tabindex","-1"),"never"!==this.options.widthSynchronizationMode&&this.synchronizeButtonAndPopupWidth(),this.$select.data("multiselect",this),this.options.onInitialized(this.$select,this.$container)}Multiselect.prototype={defaults:{buttonText:function(selectedOptions,select){if(this.disabledText.length>0&&select.prop("disabled"))return this.disabledText;if(0===selectedOptions.length)return this.nonSelectedText;if(this.allSelectedText&&selectedOptions.length===$("option",$(select)).length&&1!==$("option",$(select)).length&&this.multiple)return this.selectAllNumber?this.allSelectedText+" ("+selectedOptions.length+")":this.allSelectedText;if(0!=this.numberDisplayed&&selectedOptions.length>this.numberDisplayed)return selectedOptions.length+" "+this.nSelectedText;var selected="",delimiter=this.delimiterText;return selectedOptions.each((function(){var label=void 0!==$(this).attr("label")?$(this).attr("label"):$(this).text();selected+=label+delimiter})),selected.substr(0,selected.length-this.delimiterText.length)},buttonTitle:function(options,select){if(0===options.length)return this.nonSelectedText;var selected="",delimiter=this.delimiterText;return options.each((function(){var label=void 0!==$(this).attr("label")?$(this).attr("label"):$(this).text();selected+=label+delimiter})),selected.substr(0,selected.length-this.delimiterText.length)},checkboxName:function(option){return!1},optionLabel:function(element){return $(element).attr("label")||$(element).text()},optionClass:function(element){return $(element).attr("class")||""},onChange:function(option,checked){},onDropdownShow:function(event){},onDropdownHide:function(event){},onDropdownShown:function(event){},onDropdownHidden:function(event){},onSelectAll:function(selectedOptions){},onDeselectAll:function(deselectedOptions){},onInitialized:function($select,$container){},onFiltering:function($filter){},enableHTML:!1,buttonClass:"custom-select",inheritClass:!1,buttonWidth:"auto",buttonContainer:'
',dropRight:!1,dropUp:!1,selectedClass:"active",maxHeight:null,includeSelectAllOption:!1,includeSelectAllIfMoreThan:0,selectAllText:" Select all",selectAllValue:"multiselect-all",selectAllName:!1,selectAllNumber:!0,selectAllJustVisible:!0,enableFiltering:!1,enableCaseInsensitiveFiltering:!1,enableFullValueFiltering:!1,enableClickableOptGroups:!1,enableCollapsibleOptGroups:!1,collapseOptGroupsByDefault:!1,filterPlaceholder:"Search",filterBehavior:"text",includeFilterClearBtn:!0,preventInputChangeEvent:!1,nonSelectedText:"None selected",nSelectedText:"selected",allSelectedText:"All selected",resetButtonText:"Reset",numberDisplayed:3,disableIfEmpty:!1,disabledText:"",delimiterText:", ",includeResetOption:!1,includeResetDivider:!1,resetText:"Reset",indentGroupOptions:!0,widthSynchronizationMode:"never",buttonTextAlignment:"center",enableResetButton:!1,templates:{button:'
',popupContainer:'',filter:'
',buttonGroup:'
',buttonGroupReset:'
',option:'
',divider:'
',optionGroup:'
',resetButton:'
'}},constructor:Multiselect,buildContainer:function(){this.$container=$(this.options.buttonContainer),"never"!==this.options.widthSynchronizationMode?this.$container.on("show.bs.dropdown",$.proxy((function(){this.synchronizeButtonAndPopupWidth(),this.options.onDropdownShow()}),this)):this.$container.on("show.bs.dropdown",this.options.onDropdownShow),this.$container.on("hide.bs.dropdown",this.options.onDropdownHide),this.$container.on("shown.bs.dropdown",this.options.onDropdownShown),this.$container.on("hidden.bs.dropdown",this.options.onDropdownHidden)},buildButton:function(){if(this.$button=$(this.options.templates.button).addClass(this.options.buttonClass),this.$select.attr("class")&&this.options.inheritClass&&this.$button.addClass(this.$select.attr("class")),this.$select.prop("disabled")?this.disable():this.enable(),this.options.buttonWidth&&"auto"!==this.options.buttonWidth&&(this.$button.css({width:"100%"}),this.$container.css({width:this.options.buttonWidth})),this.options.buttonTextAlignment)switch(this.options.buttonTextAlignment){case"left":this.$button.addClass("text-left");break;case"center":this.$button.addClass("text-center");break;case"right":this.$button.addClass("text-right")}var tabindex=this.$select.attr("tabindex");tabindex&&this.$button.attr("tabindex",tabindex),this.$container.prepend(this.$button)},buildDropdown:function(){this.$popupContainer=$(this.options.templates.popupContainer),this.options.dropRight?this.$container.addClass("dropright"):this.options.dropUp&&this.$container.addClass("dropup"),this.options.maxHeight&&this.$popupContainer.css({"max-height":this.options.maxHeight+"px","overflow-y":"auto","overflow-x":"hidden"}),"never"!==this.options.widthSynchronizationMode&&this.$popupContainer.css("overflow-x","hidden"),this.$popupContainer.on("touchstart click",(function(e){e.stopPropagation()})),this.$container.append(this.$popupContainer)},synchronizeButtonAndPopupWidth:function(){if(this.$popupContainer&&"never"!==this.options.widthSynchronizationMode){var buttonWidth=this.$button.outerWidth();switch(this.options.widthSynchronizationMode){case"always":this.$popupContainer.css("min-width",buttonWidth),this.$popupContainer.css("max-width",buttonWidth);break;case"ifPopupIsSmaller":this.$popupContainer.css("min-width",buttonWidth);break;case"ifPopupIsWider":this.$popupContainer.css("max-width",buttonWidth)}}},buildDropdownOptions:function(){if(this.$select.children().each($.proxy((function(index,element){var $element=$(element),tag=$element.prop("tagName").toLowerCase();$element.prop("value")!==this.options.selectAllValue&&("optgroup"===tag?this.createOptgroup(element):"option"===tag&&("divider"===$element.data("role")?this.createDivider():this.createOptionValue(element,!1)))}),this)),$(this.$popupContainer).off("change",'> *:not(.multiselect-group) input[type="checkbox"], > *:not(.multiselect-group) input[type="radio"]'),$(this.$popupContainer).on("change",'> *:not(.multiselect-group) input[type="checkbox"], > *:not(.multiselect-group) input[type="radio"]',$.proxy((function(event){var $target=$(event.target),checked=$target.prop("checked")||!1,isSelectAllOption=$target.val()===this.options.selectAllValue;this.options.selectedClass&&(checked?$target.closest(".multiselect-option").addClass(this.options.selectedClass):$target.closest(".multiselect-option").removeClass(this.options.selectedClass));var id=$target.attr("id"),$option=this.getOptionById(id),$optionsNotThis=$("option",this.$select).not($option),$checkboxesNotThis=$("input",this.$container).not($target);if(isSelectAllOption?checked?this.selectAll(this.options.selectAllJustVisible,!0):this.deselectAll(this.options.selectAllJustVisible,!0):(checked?($option.prop("selected",!0),this.options.multiple?$option.prop("selected",!0):(this.options.selectedClass&&$($checkboxesNotThis).closest(".dropdown-item").removeClass(this.options.selectedClass),$($checkboxesNotThis).prop("checked",!1),$optionsNotThis.prop("selected",!1),this.$button.click()),"active"===this.options.selectedClass&&$optionsNotThis.closest(".dropdown-item").css("outline","")):$option.prop("selected",!1),this.options.onChange($option,checked),this.updateSelectAll(),this.options.enableClickableOptGroups&&this.options.multiple&&this.updateOptGroups()),this.$select.change(),this.updateButtonText(),this.options.preventInputChangeEvent)return!1}),this)),$(".multiselect-option",this.$popupContainer).off("mousedown"),$(".multiselect-option",this.$popupContainer).on("mousedown",(function(e){if(e.shiftKey)return!1})),$(this.$popupContainer).off("touchstart click",".multiselect-option, .multiselect-all, .multiselect-group"),$(this.$popupContainer).on("touchstart click",".multiselect-option, .multiselect-all, .multiselect-group",$.proxy((function(event){event.stopPropagation();var $target=$(event.target),$input;if(event.shiftKey&&this.options.multiple){$target.is("input")||(event.preventDefault(),($target=$target.closest(".multiselect-option").find("input")).prop("checked",!$target.prop("checked")));var checked=$target.prop("checked")||!1;if(null!==this.lastToggledInput&&this.lastToggledInput!==$target){var from=this.$popupContainer.find(".multiselect-option:visible").index($target.closest(".multiselect-option")),to=this.$popupContainer.find(".multiselect-option:visible").index(this.lastToggledInput.closest(".multiselect-option"));if(from>to){var tmp=to;to=from,from=tmp}++to;var range=this.$popupContainer.find(".multiselect-option:not(.multiselect-filter-hidden)").slice(from,to).find("input");range.prop("checked",checked),this.options.selectedClass&&range.closest(".multiselect-option").toggleClass(this.options.selectedClass,checked);for(var i=0,j=range.length;i
0)!this.options.multiple&&$checkbox.prop("checked")||($checkbox.prop("checked",!$checkbox.prop("checked")),$checkbox.change());else if(this.options.enableClickableOptGroups&&this.options.multiple&&!$target.hasClass("caret-container")){var groupItem=$target;groupItem.hasClass("multiselect-group")||(groupItem=$target.closest(".multiselect-group")),($checkbox=groupItem.find(".form-check-input")).length>0&&($checkbox.prop("checked",!$checkbox.prop("checked")),$checkbox.change())}event.preventDefault()}$target.closest(".multiselect-option").find("input[type='checkbox'], input[type='radio']").length>0?this.lastToggledInput=$target:this.lastToggledInput=null,$target.blur()}),this)),this.$container.off("keydown.multiselect").on("keydown.multiselect",$.proxy((function(event){var $items=$(this.$container).find(".multiselect-option:not(.disabled), .multiselect-group:not(.disabled), .multiselect-all").filter(":visible"),index=$items.index($items.filter(":focus")),$search=$(".multiselect-search",this.$container);if(9===event.keyCode&&this.$container.hasClass("show"))this.$button.click();else if(13==event.keyCode){var $current=$items.eq(index);setTimeout((function(){$current.focus()}),1)}else if(38==event.keyCode)0!=index||$search.is(":focus")||setTimeout((function(){$search.focus()}),1);else if(40==event.keyCode)if($search.is(":focus")){var $first=$items.eq(0);setTimeout((function(){$search.blur(),$first.focus()}),1)}else-1==index&&setTimeout((function(){$search.focus()}),1)}),this)),this.options.enableClickableOptGroups&&this.options.multiple&&($(".multiselect-group input",this.$popupContainer).off("change"),$(".multiselect-group input",this.$popupContainer).on("change",$.proxy((function(event){event.stopPropagation();var $target,checked=$(event.target).prop("checked")||!1,$item=$(event.target).closest(".dropdown-item"),$group,$inputs=$item.nextUntil(".multiselect-group").not(".multiselect-filter-hidden").not(".disabled").find("input"),$options=[];this.options.selectedClass&&(checked?$item.addClass(this.options.selectedClass):$item.removeClass(this.options.selectedClass)),$.each($inputs,$.proxy((function(index,input){var $input=$(input),id=$input.attr("id"),$option=this.getOptionById(id);checked?($input.prop("checked",!0),$input.closest(".dropdown-item").addClass(this.options.selectedClass),$option.prop("selected",!0)):($input.prop("checked",!1),$input.closest(".dropdown-item").removeClass(this.options.selectedClass),$option.prop("selected",!1)),$options.push($option)}),this)),this.options.onChange($options,checked),this.$select.change(),this.updateButtonText(),this.updateSelectAll()}),this))),this.options.enableCollapsibleOptGroups){let clickableSelector=this.options.enableClickableOptGroups?".multiselect-group .caret-container":".multiselect-group";$(clickableSelector,this.$popupContainer).off("click"),$(clickableSelector,this.$popupContainer).on("click",$.proxy((function(event){var $group=$(event.target).closest(".multiselect-group"),$inputs=$group.nextUntil(".multiselect-group").not(".multiselect-filter-hidden"),visible=!0;$inputs.each((function(){visible=visible&&!$(this).hasClass("multiselect-collapsible-hidden")})),visible?($inputs.hide().addClass("multiselect-collapsible-hidden"),$group.get(0).classList.add("closed")):($inputs.show().removeClass("multiselect-collapsible-hidden"),$group.get(0).classList.remove("closed"))}),this))}},createCheckbox:function($item,labelContent,name,value,title,inputType,internalId){var $wrapper=$("");$wrapper.addClass("form-check");var $checkboxLabel=$('');this.options.enableHTML&&$(labelContent).length>0?$checkboxLabel.html(labelContent):$checkboxLabel.text(labelContent),$wrapper.append($checkboxLabel);var $checkbox=$('').attr("type",inputType);return $checkbox.val(value),$wrapper.prepend($checkbox),internalId&&($checkbox.attr("id",internalId),$checkboxLabel.attr("for",internalId)),name&&$checkbox.attr("name",name),$item.prepend($wrapper),$item.attr("title",title||labelContent),$checkbox},createOptionValue:function(element,isGroupOption){var $element=$(element);$element.is(":selected")&&$element.prop("selected",!0);var label=this.options.optionLabel(element),classes=this.options.optionClass(element),value=$element.val(),inputType=this.options.multiple?"checkbox":"radio",title=$element.attr("title"),$option=$(this.options.templates.option);$option.addClass(classes),isGroupOption&&this.options.indentGroupOptions&&(this.options.enableCollapsibleOptGroups?$option.addClass("multiselect-group-option-indented-full"):$option.addClass("multiselect-group-option-indented")),this.options.collapseOptGroupsByDefault&&"optgroup"===$(element).parent().prop("tagName").toLowerCase()&&($option.addClass("multiselect-collapsible-hidden"),$option.hide());var name=this.options.checkboxName($element),checkboxId=this.createAndApplyUniqueId($element),$checkbox=this.createCheckbox($option,label,name,value,title,inputType,checkboxId),selected=$element.prop("selected")||!1;value===this.options.selectAllValue&&($option.addClass("multiselect-all"),$option.removeClass("multiselect-option"),$checkbox.parent().parent().addClass("multiselect-all")),this.$popupContainer.append($option),$element.is(":disabled")&&$checkbox.attr("disabled","disabled").prop("disabled",!0).closest(".dropdown-item").addClass("disabled"),$checkbox.prop("checked",selected),selected&&this.options.selectedClass&&$checkbox.closest(".dropdown-item").addClass(this.options.selectedClass)},createDivider:function(element){var $divider=$(this.options.templates.divider);this.$popupContainer.append($divider)},createOptgroup:function(group){var $group=$(group),label=$group.attr("label"),value=$group.attr("value"),title=$group.attr("title"),$groupOption=$("");if(this.options.enableClickableOptGroups&&this.options.multiple){$groupOption=$(this.options.templates.optionGroup);var checkboxId=this.createAndApplyUniqueId($group),$checkbox=this.createCheckbox($groupOption,label,null,value,title,"checkbox",checkboxId)}else this.options.enableHTML?$groupOption.html(" "+label):$groupOption.text(" "+label);var classes=this.options.optionClass(group);$groupOption.addClass(classes),this.options.enableCollapsibleOptGroups&&($groupOption.find(".form-check").addClass("d-inline-block"),$groupOption.get(0).insertAdjacentHTML("afterbegin",'')),$group.is(":disabled")&&$groupOption.addClass("disabled"),this.$popupContainer.append($groupOption),$("option",group).each($.proxy((function($,group){this.createOptionValue(group,!0)}),this))},buildReset:function(){if(this.options.includeResetOption){if(this.options.includeResetDivider){var divider=$(this.options.templates.divider);divider.addClass("mt-0"),this.$popupContainer.prepend(divider)}var $resetButton=$(this.options.templates.resetButton);this.options.enableHTML?$("button",$resetButton).html(this.options.resetText):$("button",$resetButton).text(this.options.resetText),$("button",$resetButton).click($.proxy((function(){this.clearSelection()}),this)),this.$popupContainer.prepend($resetButton)}},buildSelectAll:function(){var alreadyHasSelectAll;if("number"==typeof this.options.selectAllValue&&(this.options.selectAllValue=this.options.selectAllValue.toString()),!this.hasSelectAll()&&this.options.includeSelectAllOption&&this.options.multiple&&$("option",this.$select).length>this.options.includeSelectAllIfMoreThan){this.options.includeSelectAllDivider&&this.$popupContainer.prepend($(this.options.templates.divider));var $option=$(this.options.templates.li||this.options.templates.option),$checkbox=this.createCheckbox($option,this.options.selectAllText,this.options.selectAllName,this.options.selectAllValue,this.options.selectAllText,"checkbox",this.createAndApplyUniqueId(null));$option.addClass("multiselect-all"),$option.removeClass("multiselect-option"),$option.find(".form-check-label").addClass("font-weight-bold"),this.$popupContainer.prepend($option),$checkbox.prop("checked",!1)}},buildFilter:function(){if(this.options.enableFiltering||this.options.enableCaseInsensitiveFiltering){var enableFilterLength=Math.max(this.options.enableFiltering,this.options.enableCaseInsensitiveFiltering);this.$select.find("option").length>=enableFilterLength&&(this.$filter=$(this.options.templates.filter),$("input",this.$filter).attr("placeholder",this.options.filterPlaceholder),this.options.includeFilterClearBtn?(this.isFirefox()&&0===this.$filter.find(".multiselect-clear-filter").length&&this.$filter.append(""),this.$filter.find(".multiselect-clear-filter").on("click",$.proxy((function(event){clearTimeout(this.searchTimeout),this.query="",this.$filter.find(".multiselect-search").val(""),$(".dropdown-item",this.$popupContainer).show().removeClass("multiselect-filter-hidden"),this.updateSelectAll(),this.options.enableClickableOptGroups&&this.options.multiple&&this.updateOptGroups()}),this))):(this.$filter.find(".multiselect-search").attr("type","text"),this.$filter.find(".multiselect-clear-filter").remove()),this.$popupContainer.prepend(this.$filter),this.$filter.val(this.query).on("click",(function(event){event.stopPropagation()})).on("input keydown",$.proxy((function(event){13===event.which&&event.preventDefault(),this.isFirefox()&&this.options.includeFilterClearBtn&&(event.target.value?this.$filter.find(".multiselect-moz-clear-filter").show():this.$filter.find(".multiselect-moz-clear-filter").hide()),clearTimeout(this.searchTimeout),this.searchTimeout=this.asyncFunction($.proxy((function(){var currentGroup,currentGroupVisible;this.query!==event.target.value&&(this.query=event.target.value,$.each($(".multiselect-option, .multiselect-group",this.$popupContainer),$.proxy((function(index,element){var value=$("input",element).length>0?$("input",element).val():"",text=$(".form-check-label",element).text(),filterCandidate="";if("text"===this.options.filterBehavior?filterCandidate=text:"value"===this.options.filterBehavior?filterCandidate=value:"both"===this.options.filterBehavior&&(filterCandidate=text+"\n"+value),value!==this.options.selectAllValue&&text){var showElement=!1;if(this.options.enableCaseInsensitiveFiltering&&(filterCandidate=filterCandidate.toLowerCase(),this.query=this.query.toLowerCase()),this.options.enableFullValueFiltering&&"both"!==this.options.filterBehavior){var valueToMatch=filterCandidate.trim().substring(0,this.query.length);this.query.indexOf(valueToMatch)>-1&&(showElement=!0)}else filterCandidate.indexOf(this.query)>-1&&(showElement=!0);showElement||($(element).css("display","none"),$(element).addClass("multiselect-filter-hidden")),showElement&&($(element).css("display","block"),$(element).removeClass("multiselect-filter-hidden")),$(element).hasClass("multiselect-group")?(currentGroup=element,currentGroupVisible=showElement):(showElement&&$(currentGroup).show().removeClass("multiselect-filter-hidden"),!showElement&¤tGroupVisible&&$(element).show().removeClass("multiselect-filter-hidden"))}}),this)));this.updateSelectAll(),this.options.enableClickableOptGroups&&this.options.multiple&&this.updateOptGroups(),this.updatePopupPosition(),this.options.onFiltering(event.target)}),this),300,this)}),this)))}},buildButtons:function(){if(this.options.enableResetButton){var $buttonGroup=$(this.options.templates.buttonGroup);this.$buttonGroupReset=$(this.options.templates.buttonGroupReset).text(this.options.resetButtonText),$buttonGroup.append(this.$buttonGroupReset),this.$popupContainer.prepend($buttonGroup),this.defaultSelection={},$("option",this.$select).each($.proxy((function(index,element){var $option=$(element);this.defaultSelection[$option.val()]=$option.prop("selected")}),this)),this.$buttonGroupReset.on("click",$.proxy((function(event){$("option",this.$select).each($.proxy((function(index,element){var $option=$(element);$option.prop("selected",this.defaultSelection[$option.val()])}),this)),this.refresh(),this.options.enableFiltering&&(this.$filter.trigger("keydown"),$("input",this.$filter).val(""))}),this))}},updatePopupPosition:function(){var transformMatrix=this.$popupContainer.css("transform"),matrixType=transformMatrix.substring(0,transformMatrix.indexOf("(")),values,valuesArray=transformMatrix.substring(transformMatrix.indexOf("(")+1,transformMatrix.length-1).split(","),valueIndex=5;if("matrix3d"===matrixType&&(valueIndex=13),!(valuesArray.length").attr({label:option.label||"Group "+groupCounter,disabled:!!option.disabled,value:option.value}),forEach(option.children,(function(subOption){var attributes={value:subOption.value,label:void 0!==subOption.label&&null!==subOption.label?subOption.label:subOption.value,title:subOption.title,selected:!!subOption.selected,disabled:!!subOption.disabled};for(var key in subOption.attributes)attributes["data-"+key]=subOption.attributes[key];$tag.append($("").attr(attributes))}));else{var attributes={value:option.value,label:void 0!==option.label&&null!==option.label?option.label:option.value,title:option.title,class:option.class,selected:!!option.selected,disabled:!!option.disabled};for(var key in option.attributes)attributes["data-"+key]=option.attributes[key];($tag=$("").attr(attributes)).text(void 0!==option.label&&null!==option.label?option.label:option.value)}$select.append($tag)})),this.rebuild()},enable:function(){this.$select.prop("disabled",!1),this.$button.prop("disabled",!1).removeClass("disabled"),this.updateButtonText()},disable:function(disableByOption){this.$select.prop("disabled",!0),this.$button.prop("disabled",!0).addClass("disabled"),disableByOption?this.$select.data("disabled-by-option",!0):this.$select.data("disabled-by-option",null),this.updateButtonText()},setOptions:function(options){this.options=this.mergeOptions(options)},mergeOptions:function(options){return $.extend(!0,{},this.defaults,this.options,options)},hasSelectAll:function(){return $(".multiselect-all",this.$popupContainer).length>0},updateOptGroups:function(){var $groups=$(".multiselect-group",this.$popupContainer),selectedClass=this.options.selectedClass;$groups.each((function(){var $options=$(this).nextUntil(".multiselect-group").not(".multiselect-filter-hidden").not(".disabled"),checked=!0;$options.each((function(){var $input;$("input",this).prop("checked")||(checked=!1)})),selectedClass&&(checked?$(this).addClass(selectedClass):$(this).removeClass(selectedClass)),$("input",this).prop("checked",checked)}))},updateSelectAll:function(notTriggerOnSelectAll){if(this.hasSelectAll()){var allBoxes=$(".multiselect-option:not(.multiselect-filter-hidden):not(.multiselect-group):not(.disabled) input:enabled",this.$popupContainer),allBoxesLength=allBoxes.length,checkedBoxesLength=allBoxes.filter(":checked").length,selectAllItem=$(".multiselect-all",this.$popupContainer),selectAllInput=selectAllItem.find("input");checkedBoxesLength>0&&checkedBoxesLength===allBoxesLength?(selectAllInput.prop("checked",!0),selectAllItem.addClass(this.options.selectedClass)):(selectAllInput.prop("checked",!1),selectAllItem.removeClass(this.options.selectedClass))}},updateButtonText:function(){var options=this.getSelected();this.options.enableHTML?$(".multiselect .multiselect-selected-text",this.$container).html(this.options.buttonText(options,this.$select)):$(".multiselect .multiselect-selected-text",this.$container).text(this.options.buttonText(options,this.$select)),$(".multiselect",this.$container).attr("title",this.options.buttonTitle(options,this.$select)),this.$button.trigger("change")},getSelected:function(){return $("option",this.$select).filter(":selected")},getOptionById:function(id){return id?this.$select.find("option[data-multiselectid="+id+"], optgroup[data-multiselectid="+id+"]"):null},getInputsByValue:function(value){for(var checkboxes=$(".multiselect-option input:not(.multiselect-search)",this.$popupContainer),valueToCompare=value.toString(),matchingCheckboxes=[],i=0;i-1},createAndApplyUniqueId:function($relatedElement){var id="multiselect_"+this.multiselectId+"_"+this.internalIdCount++;return $relatedElement&&($relatedElement[0].dataset.multiselectid=id),id},generateUniqueId:function(){return Math.random().toString(36).substr(2)}},$.fn.multiselect=function(option,parameter,extraOptions){return this.each((function(){var data=$(this).data("multiselect"),options;data||(data=new Multiselect(this,"object"==typeof option&&option)),"string"==typeof option&&data[option](parameter,extraOptions)}))},$.fn.multiselect.Constructor=Multiselect,$((function(){$("select[data-role=multiselect]").multiselect()}))}));
\ No newline at end of file
diff --git a/app/static/libjs/bootstrap-multiselect/bootstrap-multiselect.css b/app/static/libjs/bootstrap-multiselect/bootstrap-multiselect.css
deleted file mode 100644
index e6b8da9116..0000000000
--- a/app/static/libjs/bootstrap-multiselect/bootstrap-multiselect.css
+++ /dev/null
@@ -1 +0,0 @@
-.multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .input-group{margin:5px}.multiselect-container>li{padding:0}.multiselect-container>li>a.multiselect-all label{font-weight:bold}.multiselect-container>li>label.multiselect-group{margin:0;padding:3px 20px 3px 20px;height:100%;font-weight:bold}.multiselect-container>li>a>label{margin:0;height:100%;cursor:pointer;font-weight:normal}.multiselect-container>li>a>label.radio,.multiselect-container>li>a>label.checkbox{margin:0}.multiselect-container>li>a>label>input[type="checkbox"]{margin-bottom:5px}.btn-group>.btn-group:nth-child(2)>.multiselect.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}
\ No newline at end of file
diff --git a/app/static/libjs/bootstrap-multiselect/bootstrap-multiselect.js b/app/static/libjs/bootstrap-multiselect/bootstrap-multiselect.js
deleted file mode 100644
index fd08395390..0000000000
--- a/app/static/libjs/bootstrap-multiselect/bootstrap-multiselect.js
+++ /dev/null
@@ -1,899 +0,0 @@
-/**
- * bootstrap-multiselect.js
- * https://github.com/davidstutz/bootstrap-multiselect
- *
- * Copyright 2012, 2013 David Stutz
- *
- * Dual licensed under the BSD-3-Clause and the Apache License, Version 2.0.
- */
-!function($) {
-
- "use strict";// jshint ;_;
-
- if (typeof ko !== 'undefined' && ko.bindingHandlers && !ko.bindingHandlers.multiselect) {
- ko.bindingHandlers.multiselect = {
- init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {},
- update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
-
- var config = ko.utils.unwrapObservable(valueAccessor());
- var selectOptions = allBindingsAccessor().options;
- var ms = $(element).data('multiselect');
-
- if (!ms) {
- $(element).multiselect(config);
- }
- else {
- ms.updateOriginalOptions();
- if (selectOptions && selectOptions().length !== ms.originalOptions.length) {
- $(element).multiselect('rebuild');
- }
- }
- }
- };
- }
-
- /**
- * Constructor to create a new multiselect using the given select.
- *
- * @param {jQuery} select
- * @param {Object} options
- * @returns {Multiselect}
- */
- function Multiselect(select, options) {
-
- this.options = this.mergeOptions(options);
- this.$select = $(select);
-
- // Initialization.
- // We have to clone to create a new reference.
- this.originalOptions = this.$select.clone()[0].options;
- this.query = '';
- this.searchTimeout = null;
-
- this.options.multiple = this.$select.attr('multiple') === "multiple";
- this.options.onChange = $.proxy(this.options.onChange, this);
- this.options.onDropdownShow = $.proxy(this.options.onDropdownShow, this);
- this.options.onDropdownHide = $.proxy(this.options.onDropdownHide, this);
-
- // Build select all if enabled.
- this.buildContainer();
- this.buildButton();
- this.buildSelectAll();
- this.buildDropdown();
- this.buildDropdownOptions();
- this.buildFilter();
-
- this.updateButtonText();
- this.updateSelectAll();
-
- this.$select.hide().after(this.$container);
- };
-
- Multiselect.prototype = {
-
- defaults: {
- /**
- * Default text function will either print 'None selected' in case no
- * option is selected or a list of the selected options up to a length of 3 selected options.
- *
- * @param {jQuery} options
- * @param {jQuery} select
- * @returns {String}
- */
- buttonText: function(options, select) {
- if (options.length === 0) {
- return this.nonSelectedText + ' ';
- }
- else {
- if (options.length > this.numberDisplayed) {
- return options.length + ' ' + this.nSelectedText + ' ';
- }
- else {
- var selected = '';
- options.each(function() {
- var label = ($(this).attr('label') !== undefined) ? $(this).attr('label') : $(this).html();
-
- selected += label + ', ';
- });
- return selected.substr(0, selected.length - 2) + ' ';
- }
- }
- },
- /**
- * Updates the title of the button similar to the buttonText function.
- * @param {jQuery} options
- * @param {jQuery} select
- * @returns {@exp;selected@call;substr}
- */
- buttonTitle: function(options, select) {
- if (options.length === 0) {
- return this.nonSelectedText;
- }
- else {
- var selected = '';
- options.each(function () {
- selected += $(this).text() + ', ';
- });
- return selected.substr(0, selected.length - 2);
- }
- },
- /**
- * Create a label.
- *
- * @param {jQuery} element
- * @returns {String}
- */
- label: function(element){
- return $(element).attr('label') || $(element).html();
- },
- /**
- * Triggered on change of the multiselect.
- * Not triggered when selecting/deselecting options manually.
- *
- * @param {jQuery} option
- * @param {Boolean} checked
- */
- onChange : function(option, checked) {
-
- },
- /**
- * Triggered when the dropdown is shown.
- *
- * @param {jQuery} event
- */
- onDropdownShow: function(event) {
-
- },
- /**
- * Triggered when the dropdown is hidden.
- *
- * @param {jQuery} event
- */
- onDropdownHide: function(event) {
-
- },
- buttonClass: 'btn btn-default',
- dropRight: false,
- selectedClass: 'active',
- buttonWidth: 'auto',
- buttonContainer: '',
- // Maximum height of the dropdown menu.
- // If maximum height is exceeded a scrollbar will be displayed.
- maxHeight: false,
- includeSelectAllOption: false,
- selectAllText: ' Select all',
- selectAllValue: 'multiselect-all',
- enableFiltering: false,
- enableCaseInsensitiveFiltering: false,
- filterPlaceholder: 'Search',
- // possible options: 'text', 'value', 'both'
- filterBehavior: 'text',
- preventInputChangeEvent: false,
- nonSelectedText: 'None selected',
- nSelectedText: 'selected',
- numberDisplayed: 3
- },
-
- templates: {
- button: '',
- ul: '',
- filter: '
',
- li: '',
- divider: '',
- liGroup: ''
- },
-
- constructor: Multiselect,
-
- /**
- * Builds the container of the multiselect.
- */
- buildContainer: function() {
- this.$container = $(this.options.buttonContainer);
- this.$container.on('show.bs.dropdown', this.options.onDropdownShow);
- this.$container.on('hide.bs.dropdown', this.options.onDropdownHide);
- },
-
- /**
- * Builds the button of the multiselect.
- */
- buildButton: function() {
- this.$button = $(this.templates.button).addClass(this.options.buttonClass);
-
- // Adopt active state.
- if (this.$select.prop('disabled')) {
- this.disable();
- }
- else {
- this.enable();
- }
-
- // Manually add button width if set.
- if (this.options.buttonWidth && this.options.buttonWidth != 'auto') {
- this.$button.css({
- 'width' : this.options.buttonWidth
- });
- }
-
- // Keep the tab index from the select.
- var tabindex = this.$select.attr('tabindex');
- if (tabindex) {
- this.$button.attr('tabindex', tabindex);
- }
-
- this.$container.prepend(this.$button);
- },
-
- /**
- * Builds the ul representing the dropdown menu.
- */
- buildDropdown: function() {
-
- // Build ul.
- this.$ul = $(this.templates.ul);
-
- if (this.options.dropRight) {
- this.$ul.addClass('pull-right');
- }
-
- // Set max height of dropdown menu to activate auto scrollbar.
- if (this.options.maxHeight) {
- // TODO: Add a class for this option to move the css declarations.
- this.$ul.css({
- 'max-height': this.options.maxHeight + 'px',
- 'overflow-y': 'auto',
- 'overflow-x': 'hidden'
- });
- }
-
- this.$container.append(this.$ul);
- },
-
- /**
- * Build the dropdown options and binds all nessecary events.
- * Uses createDivider and createOptionValue to create the necessary options.
- */
- buildDropdownOptions: function() {
-
- this.$select.children().each($.proxy(function(index, element) {
-
- // Support optgroups and options without a group simultaneously.
- var tag = $(element).prop('tagName')
- .toLowerCase();
-
- if (tag === 'optgroup') {
- this.createOptgroup(element);
- }
- else if (tag === 'option') {
-
- if ($(element).data('role') === 'divider') {
- this.createDivider();
- }
- else {
- this.createOptionValue(element);
- }
-
- }
-
- // Other illegal tags will be ignored.
- }, this));
-
- // Bind the change event on the dropdown elements.
- $('li input', this.$ul).on('change', $.proxy(function(event) {
- var checked = $(event.target).prop('checked') || false;
- var isSelectAllOption = $(event.target).val() === this.options.selectAllValue;
-
- // Apply or unapply the configured selected class.
- if (this.options.selectedClass) {
- if (checked) {
- $(event.target).parents('li')
- .addClass(this.options.selectedClass);
- }
- else {
- $(event.target).parents('li')
- .removeClass(this.options.selectedClass);
- }
- }
-
- // Get the corresponding option.
- var value = $(event.target).val();
- var $option = this.getOptionByValue(value);
-
- var $optionsNotThis = $('option', this.$select).not($option);
- var $checkboxesNotThis = $('input', this.$container).not($(event.target));
-
- if (isSelectAllOption) {
- if (this.$select[0][0].value === this.options.selectAllValue) {
- var values = [];
- var options = $('option[value!="' + this.options.selectAllValue + '"]', this.$select);
- for (var i = 0; i < options.length; i++) {
- // Additionally check whether the option is visible within the dropcown.
- if (options[i].value !== this.options.selectAllValue && this.getInputByValue(options[i].value).is(':visible')) {
- values.push(options[i].value);
- }
- }
-
- if (checked) {
- this.select(values);
- }
- else {
- this.deselect(values);
- }
- }
- }
-
- if (checked) {
- $option.prop('selected', true);
-
- if (this.options.multiple) {
- // Simply select additional option.
- $option.prop('selected', true);
- }
- else {
- // Unselect all other options and corresponding checkboxes.
- if (this.options.selectedClass) {
- $($checkboxesNotThis).parents('li').removeClass(this.options.selectedClass);
- }
-
- $($checkboxesNotThis).prop('checked', false);
- $optionsNotThis.prop('selected', false);
-
- // It's a single selection, so close.
- this.$button.click();
- }
-
- if (this.options.selectedClass === "active") {
- $optionsNotThis.parents("a").css("outline", "");
- }
- }
- else {
- // Unselect option.
- $option.prop('selected', false);
- }
-
- this.$select.change();
- this.options.onChange($option, checked);
-
- this.updateButtonText();
- this.updateSelectAll();
-
- if(this.options.preventInputChangeEvent) {
- return false;
- }
- }, this));
-
- $('li a', this.$ul).on('touchstart click', function(event) {
- event.stopPropagation();
-
- if (event.shiftKey) {
- var checked = $(event.target).prop('checked') || false;
-
- if (checked) {
- var prev = $(event.target).parents('li:last')
- .siblings('li[class="active"]:first');
-
- var currentIdx = $(event.target).parents('li')
- .index();
- var prevIdx = prev.index();
-
- if (currentIdx > prevIdx) {
- $(event.target).parents("li:last").prevUntil(prev).each(
- function() {
- $(this).find("input:first").prop("checked", true)
- .trigger("change");
- }
- );
- }
- else {
- $(event.target).parents("li:last").nextUntil(prev).each(
- function() {
- $(this).find("input:first").prop("checked", true)
- .trigger("change");
- }
- );
- }
- }
- }
-
- $(event.target).blur();
- });
-
- // Keyboard support.
- this.$container.on('keydown', $.proxy(function(event) {
- if ($('input[type="text"]', this.$container).is(':focus')) {
- return;
- }
- if ((event.keyCode === 9 || event.keyCode === 27)
- && this.$container.hasClass('open')) {
-
- // Close on tab or escape.
- this.$button.click();
- }
- else {
- var $items = $(this.$container).find("li:not(.divider):visible a");
-
- if (!$items.length) {
- return;
- }
-
- var index = $items.index($items.filter(':focus'));
-
- // Navigation up.
- if (event.keyCode === 38 && index > 0) {
- index--;
- }
- // Navigate down.
- else if (event.keyCode === 40 && index < $items.length - 1) {
- index++;
- }
- else if (!~index) {
- index = 0;
- }
-
- var $current = $items.eq(index);
- $current.focus();
-
- if (event.keyCode === 32 || event.keyCode === 13) {
- var $checkbox = $current.find('input');
-
- $checkbox.prop("checked", !$checkbox.prop("checked"));
- $checkbox.change();
- }
-
- event.stopPropagation();
- event.preventDefault();
- }
- }, this));
- },
-
- /**
- * Create an option using the given select option.
- *
- * @param {jQuery} element
- */
- createOptionValue: function(element) {
- if ($(element).is(':selected')) {
- $(element).prop('selected', true);
- }
-
- // Support the label attribute on options.
- var label = this.options.label(element);
- var value = $(element).val();
- var inputType = this.options.multiple ? "checkbox" : "radio";
-
- var $li = $(this.templates.li);
- $('label', $li).addClass(inputType);
- $('label', $li).append('');
-
- var selected = $(element).prop('selected') || false;
- var $checkbox = $('input', $li);
- $checkbox.val(value);
-
- if (value === this.options.selectAllValue) {
- $checkbox.parent().parent()
- .addClass('multiselect-all');
- }
-
- $('label', $li).append(" " + label);
-
- this.$ul.append($li);
-
- if ($(element).is(':disabled')) {
- $checkbox.attr('disabled', 'disabled')
- .prop('disabled', true)
- .parents('li')
- .addClass('disabled');
- }
-
- $checkbox.prop('checked', selected);
-
- if (selected && this.options.selectedClass) {
- $checkbox.parents('li')
- .addClass(this.options.selectedClass);
- }
- },
-
- /**
- * Creates a divider using the given select option.
- *
- * @param {jQuery} element
- */
- createDivider: function(element) {
- var $divider = $(this.templates.divider);
- this.$ul.append($divider);
- },
-
- /**
- * Creates an optgroup.
- *
- * @param {jQuery} group
- */
- createOptgroup: function(group) {
- var groupName = $(group).prop('label');
-
- // Add a header for the group.
- var $li = $(this.templates.liGroup);
- $('label', $li).text(groupName);
-
- this.$ul.append($li);
-
- // Add the options of the group.
- $('option', group).each($.proxy(function(index, element) {
- this.createOptionValue(element);
- }, this));
- },
-
- /**
- * Build the selct all.
- * Checks if a select all ahs already been created.
- */
- buildSelectAll: function() {
- var alreadyHasSelectAll = this.hasSelectAll();
-
- // If options.includeSelectAllOption === true, add the include all checkbox.
- if (this.options.includeSelectAllOption && this.options.multiple && !alreadyHasSelectAll) {
- this.$select.prepend('');
- }
- },
-
- /**
- * Builds the filter.
- */
- buildFilter: function() {
-
- // Build filter if filtering OR case insensitive filtering is enabled and the number of options exceeds (or equals) enableFilterLength.
- if (this.options.enableFiltering || this.options.enableCaseInsensitiveFiltering) {
- var enableFilterLength = Math.max(this.options.enableFiltering, this.options.enableCaseInsensitiveFiltering);
-
- if (this.$select.find('option').length >= enableFilterLength) {
-
- this.$filter = $(this.templates.filter);
- $('input', this.$filter).attr('placeholder', this.options.filterPlaceholder);
- this.$ul.prepend(this.$filter);
-
- this.$filter.val(this.query).on('click', function(event) {
- event.stopPropagation();
- }).on('input keydown', $.proxy(function(event) {
- // This is useful to catch "keydown" events after the browser has updated the control.
- clearTimeout(this.searchTimeout);
-
- this.searchTimeout = this.asyncFunction($.proxy(function() {
-
- if (this.query !== event.target.value) {
- this.query = event.target.value;
-
- $.each($('li', this.$ul), $.proxy(function(index, element) {
- var value = $('input', element).val();
- var text = $('label', element).text();
-
- if (value !== this.options.selectAllValue && text) {
- // by default lets assume that element is not
- // interesting for this search
- var showElement = false;
-
- var filterCandidate = '';
- if ((this.options.filterBehavior === 'text' || this.options.filterBehavior === 'both')) {
- filterCandidate = text;
- }
- if ((this.options.filterBehavior === 'value' || this.options.filterBehavior === 'both')) {
- filterCandidate = value;
- }
-
- if (this.options.enableCaseInsensitiveFiltering && filterCandidate.toLowerCase().indexOf(this.query.toLowerCase()) > -1) {
- showElement = true;
- }
- else if (filterCandidate.indexOf(this.query) > -1) {
- showElement = true;
- }
-
- if (showElement) {
- $(element).show();
- }
- else {
- $(element).hide();
- }
- }
- }, this));
- }
-
- // TODO: check whether select all option needs to be updated.
- }, this), 300, this);
- }, this));
- }
- }
- },
-
- /**
- * Unbinds the whole plugin.
- */
- destroy: function() {
- this.$container.remove();
- this.$select.show();
- },
-
- /**
- * Refreshs the multiselect based on the selected options of the select.
- */
- refresh: function() {
- $('option', this.$select).each($.proxy(function(index, element) {
- var $input = $('li input', this.$ul).filter(function() {
- return $(this).val() === $(element).val();
- });
-
- if ($(element).is(':selected')) {
- $input.prop('checked', true);
-
- if (this.options.selectedClass) {
- $input.parents('li')
- .addClass(this.options.selectedClass);
- }
- }
- else {
- $input.prop('checked', false);
-
- if (this.options.selectedClass) {
- $input.parents('li')
- .removeClass(this.options.selectedClass);
- }
- }
-
- if ($(element).is(":disabled")) {
- $input.attr('disabled', 'disabled')
- .prop('disabled', true)
- .parents('li')
- .addClass('disabled');
- }
- else {
- $input.prop('disabled', false)
- .parents('li')
- .removeClass('disabled');
- }
- }, this));
-
- this.updateButtonText();
- this.updateSelectAll();
- },
-
- /**
- * Select all options of the given values.
- *
- * @param {Array} selectValues
- */
- select: function(selectValues) {
- if(selectValues && !$.isArray(selectValues)) {
- selectValues = [selectValues];
- }
-
- for (var i = 0; i < selectValues.length; i++) {
- var value = selectValues[i];
-
- var $option = this.getOptionByValue(value);
- var $checkbox = this.getInputByValue(value);
-
- if (this.options.selectedClass) {
- $checkbox.parents('li')
- .addClass(this.options.selectedClass);
- }
-
- $checkbox.prop('checked', true);
- $option.prop('selected', true);
- }
-
- this.updateButtonText();
- },
-
- /**
- * Deselects all options of the given values.
- *
- * @param {Array} deselectValues
- */
- deselect: function(deselectValues) {
- if(deselectValues && !$.isArray(deselectValues)) {
- deselectValues = [deselectValues];
- }
-
- for (var i = 0; i < deselectValues.length; i++) {
-
- var value = deselectValues[i];
-
- var $option = this.getOptionByValue(value);
- var $checkbox = this.getInputByValue(value);
-
- if (this.options.selectedClass) {
- $checkbox.parents('li')
- .removeClass(this.options.selectedClass);
- }
-
- $checkbox.prop('checked', false);
- $option.prop('selected', false);
- }
-
- this.updateButtonText();
- },
-
- /**
- * Rebuild the plugin.
- * Rebuilds the dropdown, the filter and the select all option.
- */
- rebuild: function() {
- this.$ul.html('');
-
- // Remove select all option in select.
- $('option[value="' + this.options.selectAllValue + '"]', this.$select).remove();
-
- // Important to distinguish between radios and checkboxes.
- this.options.multiple = this.$select.attr('multiple') === "multiple";
-
- this.buildSelectAll();
- this.buildDropdownOptions();
- this.buildFilter();
-
- this.updateButtonText();
- this.updateSelectAll();
- },
-
- /**
- * The provided data will be used to build the dropdown.
- *
- * @param {Array} dataprovider
- */
- dataprovider: function(dataprovider) {
- var optionDOM = "";
- dataprovider.forEach(function (option) {
- optionDOM += '';
- });
-
- this.$select.html(optionDOM);
- this.rebuild();
- },
-
- /**
- * Enable the multiselect.
- */
- enable: function() {
- this.$select.prop('disabled', false);
- this.$button.prop('disabled', false)
- .removeClass('disabled');
- },
-
- /**
- * Disable the multiselect.
- */
- disable: function() {
- this.$select.prop('disabled', true);
- this.$button.prop('disabled', true)
- .addClass('disabled');
- },
-
- /**
- * Set the options.
- *
- * @param {Array} options
- */
- setOptions: function(options) {
- this.options = this.mergeOptions(options);
- },
-
- /**
- * Merges the given options with the default options.
- *
- * @param {Array} options
- * @returns {Array}
- */
- mergeOptions: function(options) {
- return $.extend({}, this.defaults, options);
- },
-
- /**
- * Checks whether a select all option is present.
- *
- * @returns {Boolean}
- */
- hasSelectAll: function() {
- return this.$select[0][0] ? this.$select[0][0].value === this.options.selectAllValue : false;
- },
-
- /**
- * Updates the select all option based on the currently selected options.
- */
- updateSelectAll: function() {
- if (this.hasSelectAll()) {
- var selected = this.getSelected();
-
- if (selected.length === $('option', this.$select).length - 1) {
- this.select(this.options.selectAllValue);
- }
- else {
- this.deselect(this.options.selectAllValue);
- }
- }
- },
-
- /**
- * Update the button text and its title base don the currenty selected options.
- */
- updateButtonText: function() {
- var options = this.getSelected();
-
- // First update the displayed button text.
- $('button', this.$container).html(this.options.buttonText(options, this.$select));
-
- // Now update the title attribute of the button.
- $('button', this.$container).attr('title', this.options.buttonTitle(options, this.$select));
-
- },
-
- /**
- * Get all selected options.
- *
- * @returns {jQUery}
- */
- getSelected: function() {
- return $('option[value!="' + this.options.selectAllValue + '"]:selected', this.$select).filter(function() {
- return $(this).prop('selected');
- });
- },
-
- /**
- * Gets a select option by its value.
- *
- * @param {String} value
- * @returns {jQuery}
- */
- getOptionByValue: function(value) {
- return $('option', this.$select).filter(function() {
- return $(this).val() === value;
- });
- },
-
- /**
- * Get the input (radio/checkbox) by its value.
- *
- * @param {String} value
- * @returns {jQuery}
- */
- getInputByValue: function(value) {
- return $('li input', this.$ul).filter(function() {
- return $(this).val() === value;
- });
- },
-
- /**
- * Used for knockout integration.
- */
- updateOriginalOptions: function() {
- this.originalOptions = this.$select.clone()[0].options;
- },
-
- asyncFunction: function(callback, timeout, self) {
- var args = Array.prototype.slice.call(arguments, 3);
- return setTimeout(function() {
- callback.apply(self || window, args);
- }, timeout);
- }
- };
-
- $.fn.multiselect = function(option, parameter) {
- return this.each(function() {
- var data = $(this).data('multiselect');
- var options = typeof option === 'object' && option;
-
- // Initialize the multiselect.
- if (!data) {
- $(this).data('multiselect', ( data = new Multiselect(this, options)));
- }
-
- // Call multiselect method.
- if (typeof option === 'string') {
- data[option](parameter);
- }
- });
- };
-
- $.fn.multiselect.Constructor = Multiselect;
-
- $(function() {
- $("select[data-role=multiselect]").multiselect();
- });
-
-}(window.jQuery);