Skip to content

Commit ad68d5e

Browse files
committed
Added support for Select2
1 parent 13f00af commit ad68d5e

52 files changed

Lines changed: 12376 additions & 25 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/less/AdminLTE.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
//--------
5959
@import "bootstrap-social.less";
6060
@import "fullcalendar.less";
61+
@import "select2.less";
6162

6263
//Miscellaneous
6364
//-------------

build/less/select2.less

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
/*
2+
* Plugin: Select2
3+
* ---------------
4+
*/
5+
6+
//Signle select
7+
.select2-container--default,
8+
.select2-selection {
9+
&.select2-container--focus,
10+
&:focus,
11+
&:active {
12+
outline: none;
13+
}
14+
.select2-selection--single {
15+
border: 1px solid @gray;
16+
border-radius: @input-radius;
17+
padding: 6px 12px;
18+
height: 34px;
19+
}
20+
}
21+
.select2-container--default.select2-container--open {
22+
border-color: @light-blue;
23+
}
24+
.select2-dropdown {
25+
border: 1px solid @gray;
26+
border-radius: @input-radius;
27+
}
28+
.select2-container--default .select2-results__option--highlighted[aria-selected] {
29+
background-color: @light-blue;
30+
color: white;
31+
}
32+
.select2-results__option {
33+
padding: 6px 12px;
34+
user-select: none;
35+
-webkit-user-select: none; }
36+
.select2-container .select2-selection--single .select2-selection__rendered {
37+
padding-left: 0;
38+
padding-right: 0;
39+
height: auto;
40+
margin-top: -4px;
41+
}
42+
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
43+
padding-right: 6px;
44+
padding-left: 20px;
45+
}
46+
.select2-container--default .select2-selection--single .select2-selection__arrow {
47+
height: 28px;
48+
right: 3px;
49+
}
50+
.select2-container--default .select2-selection--single .select2-selection__arrow b {
51+
margin-top: 0;
52+
}
53+
.select2-dropdown,
54+
.select2-search--inline {
55+
.select2-search__field {
56+
border: 1px solid @gray;
57+
&:focus {
58+
outline: none;
59+
border: 1px solid @light-blue;
60+
}
61+
}
62+
}
63+
.select2-container--default .select2-results__option[aria-disabled=true] {
64+
color: #999;
65+
}
66+
.select2-container--default .select2-results__option[aria-selected=true] {
67+
background-color: #ddd;
68+
&,
69+
&:hover {
70+
color: #444;
71+
}
72+
}
73+
74+
//Multiple select
75+
.select2-container--default {
76+
.select2-selection--multiple {
77+
border: 1px solid @gray;
78+
border-radius: @input-radius;
79+
height: 34px;
80+
&:focus {
81+
border-color: @light-blue;
82+
}
83+
}
84+
&.select2-container--focus .select2-selection--multiple {
85+
border-color: @gray;
86+
}
87+
}
88+
.select2-container--default .select2-selection--multiple .select2-selection__choice {
89+
background-color: @light-blue;
90+
border-color: darken(@light-blue, 5%);
91+
padding: 1px 10px;
92+
color: #fff;
93+
}
94+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
95+
margin-right: 5px;
96+
color: rgba(255,255,255,.7);
97+
&:hover {
98+
color: #fff;
99+
}
100+
}

dist/css/AdminLTE.css

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3631,6 +3631,101 @@ table.text-center th {
36313631
.external-event:hover {
36323632
box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.2);
36333633
}
3634+
/*
3635+
* Plugin: Select2
3636+
* ---------------
3637+
*/
3638+
.select2-container--default.select2-container--focus,
3639+
.select2-selection.select2-container--focus,
3640+
.select2-container--default:focus,
3641+
.select2-selection:focus,
3642+
.select2-container--default:active,
3643+
.select2-selection:active {
3644+
outline: none;
3645+
}
3646+
.select2-container--default .select2-selection--single,
3647+
.select2-selection .select2-selection--single {
3648+
border: 1px solid #d2d6de;
3649+
border-radius: 0px;
3650+
padding: 6px 12px;
3651+
height: 34px;
3652+
}
3653+
.select2-container--default.select2-container--open {
3654+
border-color: #3c8dbc;
3655+
}
3656+
.select2-dropdown {
3657+
border: 1px solid #d2d6de;
3658+
border-radius: 0px;
3659+
}
3660+
.select2-container--default .select2-results__option--highlighted[aria-selected] {
3661+
background-color: #3c8dbc;
3662+
color: white;
3663+
}
3664+
.select2-results__option {
3665+
padding: 6px 12px;
3666+
user-select: none;
3667+
-webkit-user-select: none;
3668+
}
3669+
.select2-container .select2-selection--single .select2-selection__rendered {
3670+
padding-left: 0;
3671+
padding-right: 0;
3672+
height: auto;
3673+
margin-top: -4px;
3674+
}
3675+
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
3676+
padding-right: 6px;
3677+
padding-left: 20px;
3678+
}
3679+
.select2-container--default .select2-selection--single .select2-selection__arrow {
3680+
height: 28px;
3681+
right: 3px;
3682+
}
3683+
.select2-container--default .select2-selection--single .select2-selection__arrow b {
3684+
margin-top: 0;
3685+
}
3686+
.select2-dropdown .select2-search__field,
3687+
.select2-search--inline .select2-search__field {
3688+
border: 1px solid #d2d6de;
3689+
}
3690+
.select2-dropdown .select2-search__field:focus,
3691+
.select2-search--inline .select2-search__field:focus {
3692+
outline: none;
3693+
border: 1px solid #3c8dbc;
3694+
}
3695+
.select2-container--default .select2-results__option[aria-disabled=true] {
3696+
color: #999;
3697+
}
3698+
.select2-container--default .select2-results__option[aria-selected=true] {
3699+
background-color: #ddd;
3700+
}
3701+
.select2-container--default .select2-results__option[aria-selected=true],
3702+
.select2-container--default .select2-results__option[aria-selected=true]:hover {
3703+
color: #444;
3704+
}
3705+
.select2-container--default .select2-selection--multiple {
3706+
border: 1px solid #d2d6de;
3707+
border-radius: 0px;
3708+
height: 34px;
3709+
}
3710+
.select2-container--default .select2-selection--multiple:focus {
3711+
border-color: #3c8dbc;
3712+
}
3713+
.select2-container--default.select2-container--focus .select2-selection--multiple {
3714+
border-color: #d2d6de;
3715+
}
3716+
.select2-container--default .select2-selection--multiple .select2-selection__choice {
3717+
background-color: #3c8dbc;
3718+
border-color: #367fa9;
3719+
padding: 1px 10px;
3720+
color: #fff;
3721+
}
3722+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
3723+
margin-right: 5px;
3724+
color: rgba(255, 255, 255, 0.7);
3725+
}
3726+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
3727+
color: #fff;
3728+
}
36343729
/*
36353730
* General: Miscellaneous
36363731
* ----------------------

dist/css/AdminLTE.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)