Skip to content

Commit

Permalink
Added select2 javascript library
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis Igoumenos committed May 13, 2022
1 parent 5958c48 commit e04e139
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/templates/element/javascript.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@
$("input:submit").addClass("spin submit-button btn btn-primary");

// Make all select form controls Bootstrappy
$("select").addClass("form-select");
$("select").addClass("form-select").select2({
width: '100%',
tags: true,
placeholder: "-- Select --"
});

// Enable Bootstrap Popovers. Unless needed elsewhere, constrain this to #content
// XXX Enable when/if needed
Expand Down
8 changes: 8 additions & 0 deletions app/webroot/css/co-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1558,3 +1558,11 @@ footer {
text-align: center;
padding: 2em 2em 1em;
}
/*Select2*/
.select2-container--default .select2-selection--single {
border: 1px solid var(--cmg-color-lightgray-006);
background-color: var(--cmg-color-white);
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
color: var(--cmg-color-gray-003);
}
1 change: 1 addition & 0 deletions app/webroot/css/select2/select2.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions app/webroot/js/select2/select2.min.js

Large diffs are not rendered by default.

0 comments on commit e04e139

Please sign in to comment.