ahhhhh
This commit is contained in:
commit
dc2bc9c1a7
236 changed files with 57278 additions and 0 deletions
138
vendors/nice-select/css/nice-select.css
vendored
Normal file
138
vendors/nice-select/css/nice-select.css
vendored
Normal file
|
@ -0,0 +1,138 @@
|
|||
.nice-select {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
border: solid 1px #e8e8e8;
|
||||
box-sizing: border-box;
|
||||
clear: both;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
float: left;
|
||||
font-family: inherit;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
height: 42px;
|
||||
line-height: 40px;
|
||||
outline: none;
|
||||
padding-left: 18px;
|
||||
padding-right: 30px;
|
||||
position: relative;
|
||||
text-align: left !important;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
width: auto; }
|
||||
.nice-select:hover {
|
||||
border-color: #dbdbdb; }
|
||||
.nice-select:active, .nice-select.open, .nice-select:focus {
|
||||
border-color: #999; }
|
||||
.nice-select:after {
|
||||
border-bottom: 2px solid #999;
|
||||
border-right: 2px solid #999;
|
||||
content: '';
|
||||
display: block;
|
||||
height: 5px;
|
||||
margin-top: -4px;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
-webkit-transform-origin: 66% 66%;
|
||||
-ms-transform-origin: 66% 66%;
|
||||
transform-origin: 66% 66%;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
-webkit-transition: all 0.15s ease-in-out;
|
||||
transition: all 0.15s ease-in-out;
|
||||
width: 5px; }
|
||||
.nice-select.open:after {
|
||||
-webkit-transform: rotate(-135deg);
|
||||
-ms-transform: rotate(-135deg);
|
||||
transform: rotate(-135deg); }
|
||||
.nice-select.open .list {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
-webkit-transform: scale(1) translateY(0);
|
||||
-ms-transform: scale(1) translateY(0);
|
||||
transform: scale(1) translateY(0); }
|
||||
.nice-select.disabled {
|
||||
border-color: #ededed;
|
||||
color: #999;
|
||||
pointer-events: none; }
|
||||
.nice-select.disabled:after {
|
||||
border-color: #cccccc; }
|
||||
.nice-select.wide {
|
||||
width: 100%; }
|
||||
.nice-select.wide .list {
|
||||
left: 0 !important;
|
||||
right: 0 !important; }
|
||||
.nice-select.right {
|
||||
float: right; }
|
||||
.nice-select.right .list {
|
||||
left: auto;
|
||||
right: 0; }
|
||||
.nice-select.small {
|
||||
font-size: 12px;
|
||||
height: 36px;
|
||||
line-height: 34px; }
|
||||
.nice-select.small:after {
|
||||
height: 4px;
|
||||
width: 4px; }
|
||||
.nice-select.small .option {
|
||||
line-height: 34px;
|
||||
min-height: 34px; }
|
||||
.nice-select .list {
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 0 0 1px rgba(68, 68, 68, 0.11);
|
||||
box-sizing: border-box;
|
||||
margin-top: 4px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
-webkit-transform-origin: 50% 0;
|
||||
-ms-transform-origin: 50% 0;
|
||||
transform-origin: 50% 0;
|
||||
-webkit-transform: scale(0.75) translateY(-21px);
|
||||
-ms-transform: scale(0.75) translateY(-21px);
|
||||
transform: scale(0.75) translateY(-21px);
|
||||
-webkit-transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
|
||||
transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
|
||||
z-index: 9; }
|
||||
.nice-select .list:hover .option:not(:hover) {
|
||||
background-color: transparent !important; }
|
||||
.nice-select .option {
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
list-style: none;
|
||||
min-height: 40px;
|
||||
outline: none;
|
||||
padding-left: 18px;
|
||||
padding-right: 29px;
|
||||
text-align: left;
|
||||
-webkit-transition: all 0.2s;
|
||||
transition: all 0.2s; }
|
||||
.nice-select .option:hover, .nice-select .option.focus, .nice-select .option.selected.focus {
|
||||
background-color: #f6f6f6; }
|
||||
.nice-select .option.selected {
|
||||
font-weight: bold; }
|
||||
.nice-select .option.disabled {
|
||||
background-color: transparent;
|
||||
color: #999;
|
||||
cursor: default; }
|
||||
|
||||
.no-csspointerevents .nice-select .list {
|
||||
display: none; }
|
||||
|
||||
.no-csspointerevents .nice-select.open .list {
|
||||
display: block; }
|
372
vendors/nice-select/css/style.css
vendored
Normal file
372
vendors/nice-select/css/style.css
vendored
Normal file
|
@ -0,0 +1,372 @@
|
|||
.nice-select {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
border: solid 1px #e0e7ee;
|
||||
box-sizing: border-box;
|
||||
clear: both;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
float: left;
|
||||
font-family: inherit;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
height: 42px;
|
||||
line-height: 40px;
|
||||
outline: none;
|
||||
padding-left: 18px;
|
||||
padding-right: 30px;
|
||||
position: relative;
|
||||
text-align: left !important;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
width: auto; }
|
||||
.nice-select:hover {
|
||||
border-color: #d0dae5; }
|
||||
.nice-select:active, .nice-select.open, .nice-select:focus {
|
||||
border-color: #88bfff; }
|
||||
.nice-select:after {
|
||||
border-bottom: 2px solid #90a1b5;
|
||||
border-right: 2px solid #90a1b5;
|
||||
content: '';
|
||||
display: block;
|
||||
height: 5px;
|
||||
margin-top: -4px;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
-webkit-transform-origin: 66% 66%;
|
||||
-ms-transform-origin: 66% 66%;
|
||||
transform-origin: 66% 66%;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
-webkit-transition: all 0.15s ease-in-out;
|
||||
transition: all 0.15s ease-in-out;
|
||||
width: 5px; }
|
||||
.nice-select.open:after {
|
||||
-webkit-transform: rotate(-135deg);
|
||||
-ms-transform: rotate(-135deg);
|
||||
transform: rotate(-135deg); }
|
||||
.nice-select.open .list {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
-webkit-transform: scale(1) translateY(0);
|
||||
-ms-transform: scale(1) translateY(0);
|
||||
transform: scale(1) translateY(0); }
|
||||
.nice-select.disabled {
|
||||
border-color: #e7ecf2;
|
||||
color: #90a1b5;
|
||||
pointer-events: none; }
|
||||
.nice-select.disabled:after {
|
||||
border-color: #cdd5de; }
|
||||
.nice-select.wide {
|
||||
width: 100%; }
|
||||
.nice-select.wide .list {
|
||||
left: 0 !important;
|
||||
right: 0 !important; }
|
||||
.nice-select.right {
|
||||
float: right; }
|
||||
.nice-select.right .list {
|
||||
left: auto;
|
||||
right: 0; }
|
||||
.nice-select.small {
|
||||
font-size: 12px;
|
||||
height: 36px;
|
||||
line-height: 34px; }
|
||||
.nice-select.small:after {
|
||||
height: 4px;
|
||||
width: 4px; }
|
||||
.nice-select.small .option {
|
||||
line-height: 34px;
|
||||
min-height: 34px; }
|
||||
.nice-select .list {
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 0 0 1px rgba(68, 88, 112, 0.11);
|
||||
box-sizing: border-box;
|
||||
margin-top: 4px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
-webkit-transform-origin: 50% 0;
|
||||
-ms-transform-origin: 50% 0;
|
||||
transform-origin: 50% 0;
|
||||
-webkit-transform: scale(0.75) translateY(-21px);
|
||||
-ms-transform: scale(0.75) translateY(-21px);
|
||||
transform: scale(0.75) translateY(-21px);
|
||||
-webkit-transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
|
||||
transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
|
||||
z-index: 9; }
|
||||
.nice-select .list:hover .option:not(:hover) {
|
||||
background-color: transparent !important; }
|
||||
.nice-select .option {
|
||||
cursor: pointer;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
list-style: none;
|
||||
min-height: 40px;
|
||||
outline: none;
|
||||
padding-left: 18px;
|
||||
padding-right: 29px;
|
||||
text-align: left;
|
||||
-webkit-transition: all 0.2s;
|
||||
transition: all 0.2s; }
|
||||
.nice-select .option:hover, .nice-select .option.focus, .nice-select .option.selected.focus {
|
||||
background-color: #f6f7f9; }
|
||||
.nice-select .option.selected {
|
||||
font-weight: bold; }
|
||||
.nice-select .option.disabled {
|
||||
background-color: transparent;
|
||||
color: #90a1b5;
|
||||
cursor: default; }
|
||||
|
||||
.no-csspointerevents .nice-select .list {
|
||||
display: none; }
|
||||
|
||||
.no-csspointerevents .nice-select.open .list {
|
||||
display: block; }
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
border-radius: 2px;
|
||||
color: #445870;
|
||||
-webkit-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
line-height: 1.5;
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-break: normal;
|
||||
word-spacing: normal;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
font-family: Inconsolata, monospace;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0; }
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 18px 24px;
|
||||
margin: 0 0 24px;
|
||||
overflow: auto; }
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f6f7f9; }
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: 0 2px 1px; }
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: #90a1b5; }
|
||||
|
||||
.token.punctuation {
|
||||
color: #999; }
|
||||
|
||||
.namespace {
|
||||
opacity: .7; }
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #EC4444; }
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #4ABF60; }
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #a67f59;
|
||||
background: rgba(255, 255, 255, 0.5); }
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #55a1fb; }
|
||||
|
||||
.token.function {
|
||||
color: #DD4A68; }
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90; }
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold; }
|
||||
|
||||
.token.italic {
|
||||
font-style: italic; }
|
||||
|
||||
.token.entity {
|
||||
cursor: help; }
|
||||
|
||||
body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #445870;
|
||||
font-family: 'Work Sans', sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
letter-spacing: -0.25px;
|
||||
margin: 0;
|
||||
padding: 0 18px; }
|
||||
|
||||
p {
|
||||
line-height: 1.6;
|
||||
margin: 0 0 1.6em; }
|
||||
|
||||
h1 {
|
||||
font-size: 36px;
|
||||
font-weight: 300;
|
||||
letter-spacing: -2px;
|
||||
margin: 0 0 24px; }
|
||||
|
||||
h2 {
|
||||
font-size: 22px;
|
||||
font-weight: 400;
|
||||
margin: 0 0 12px;
|
||||
padding-top: 48px; }
|
||||
|
||||
h3 {
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
margin: 0 0 12px;
|
||||
padding-top: 12px; }
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding-left: 16px; }
|
||||
|
||||
a:not(.button) {
|
||||
color: #55a1fb;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
border-bottom: 1px solid transparent; }
|
||||
a:not(.button):hover, a:not(.button):focus {
|
||||
border-bottom: 1px solid #88bfff; }
|
||||
|
||||
::-moz-selection {
|
||||
background: #f3f4f7; }
|
||||
|
||||
::selection {
|
||||
background: #f3f4f7; }
|
||||
|
||||
.container {
|
||||
margin: 96px auto 60px;
|
||||
max-width: 40em; }
|
||||
|
||||
.box {
|
||||
background-color: #f6f7f9;
|
||||
border-radius: 2px;
|
||||
margin-bottom: 30px;
|
||||
padding: 24px 30px; }
|
||||
.box:before, .box:after {
|
||||
content: "";
|
||||
display: table; }
|
||||
.box:after {
|
||||
clear: both; }
|
||||
|
||||
label {
|
||||
color: #90a1b5;
|
||||
font-size: 11px;
|
||||
margin: 0 2px 4px;
|
||||
text-transform: uppercase;
|
||||
float: left; }
|
||||
label.right {
|
||||
float: right; }
|
||||
|
||||
.button {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
background-color: #55a1fb;
|
||||
border-radius: 5px;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: 600;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
outline: none;
|
||||
padding: 0 24px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
white-space: nowrap;
|
||||
width: auto; }
|
||||
.button:hover, .button:focus {
|
||||
background-color: #4196fb; }
|
||||
.button:active, .button.nice-select.open {
|
||||
background-color: #2d8bfa; }
|
||||
.button.light {
|
||||
background-color: #fff;
|
||||
border: 1px solid #e0e7ee;
|
||||
color: #55a1fb;
|
||||
line-height: 40px;
|
||||
margin-left: 24px; }
|
||||
.button.light:hover {
|
||||
border-color: #d0dae5; }
|
||||
.button.light:active, .button.light.nice-select.open, .button.light:focus {
|
||||
border-color: #88bfff; }
|
||||
@media screen and (max-width: 360px) {
|
||||
.button {
|
||||
width: 100%; }
|
||||
.button.light {
|
||||
margin: 18px 0 0; } }
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 60px; }
|
||||
@media screen and (min-width: 600px) {
|
||||
.header {
|
||||
padding: 0 18px; } }
|
||||
.header p {
|
||||
color: #90a1b5;
|
||||
font-size: 18px;
|
||||
margin-bottom: 36px; }
|
||||
|
||||
.footer {
|
||||
text-align: center; }
|
||||
.footer p {
|
||||
margin-bottom: 90px; }
|
||||
|
||||
.credit {
|
||||
color: #90a1b5;
|
||||
clear: both;
|
||||
font-size: 12px;
|
||||
margin-top: 90px; }
|
190
vendors/nice-select/js/jquery.nice-select.js
vendored
Normal file
190
vendors/nice-select/js/jquery.nice-select.js
vendored
Normal file
|
@ -0,0 +1,190 @@
|
|||
/* jQuery Nice Select - v1.1.0
|
||||
https://github.com/hernansartorio/jquery-nice-select
|
||||
Made by Hernán Sartorio */
|
||||
|
||||
(function($) {
|
||||
|
||||
$.fn.niceSelect = function(method) {
|
||||
|
||||
// Methods
|
||||
if (typeof method == 'string') {
|
||||
if (method == 'update') {
|
||||
this.each(function() {
|
||||
var $select = $(this);
|
||||
var $dropdown = $(this).next('.nice-select');
|
||||
var open = $dropdown.hasClass('open');
|
||||
|
||||
if ($dropdown.length) {
|
||||
$dropdown.remove();
|
||||
create_nice_select($select);
|
||||
|
||||
if (open) {
|
||||
$select.next().trigger('click');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (method == 'destroy') {
|
||||
this.each(function() {
|
||||
var $select = $(this);
|
||||
var $dropdown = $(this).next('.nice-select');
|
||||
|
||||
if ($dropdown.length) {
|
||||
$dropdown.remove();
|
||||
$select.css('display', '');
|
||||
}
|
||||
});
|
||||
if ($('.nice-select').length == 0) {
|
||||
$(document).off('.nice_select');
|
||||
}
|
||||
} else {
|
||||
console.log('Method "' + method + '" does not exist.')
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
// Hide native select
|
||||
this.hide();
|
||||
|
||||
// Create custom markup
|
||||
this.each(function() {
|
||||
var $select = $(this);
|
||||
|
||||
if (!$select.next().hasClass('nice-select')) {
|
||||
create_nice_select($select);
|
||||
}
|
||||
});
|
||||
|
||||
function create_nice_select($select) {
|
||||
$select.after($('<div></div>')
|
||||
.addClass('nice-select')
|
||||
.addClass($select.attr('class') || '')
|
||||
.addClass($select.attr('disabled') ? 'disabled' : '')
|
||||
.attr('tabindex', $select.attr('disabled') ? null : '0')
|
||||
.html('<span class="current"></span><ul class="list"></ul>')
|
||||
);
|
||||
|
||||
var $dropdown = $select.next();
|
||||
var $options = $select.find('option');
|
||||
var $selected = $select.find('option:selected');
|
||||
|
||||
$dropdown.find('.current').html($selected.data('display') || $selected.text());
|
||||
|
||||
$options.each(function(i) {
|
||||
var $option = $(this);
|
||||
var display = $option.data('display');
|
||||
|
||||
$dropdown.find('ul').append($('<li></li>')
|
||||
.attr('data-value', $option.val())
|
||||
.attr('data-display', (display || null))
|
||||
.addClass('option' +
|
||||
($option.is(':selected') ? ' selected' : '') +
|
||||
($option.is(':disabled') ? ' disabled' : ''))
|
||||
.html($option.text())
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/* Event listeners */
|
||||
|
||||
// Unbind existing events in case that the plugin has been initialized before
|
||||
$(document).off('.nice_select');
|
||||
|
||||
// Open/close
|
||||
$(document).on('click.nice_select', '.nice-select', function(event) {
|
||||
var $dropdown = $(this);
|
||||
|
||||
$('.nice-select').not($dropdown).removeClass('open');
|
||||
$dropdown.toggleClass('open');
|
||||
|
||||
if ($dropdown.hasClass('open')) {
|
||||
$dropdown.find('.option');
|
||||
$dropdown.find('.focus').removeClass('focus');
|
||||
$dropdown.find('.selected').addClass('focus');
|
||||
} else {
|
||||
$dropdown.focus();
|
||||
}
|
||||
});
|
||||
|
||||
// Close when clicking outside
|
||||
$(document).on('click.nice_select', function(event) {
|
||||
if ($(event.target).closest('.nice-select').length === 0) {
|
||||
$('.nice-select').removeClass('open').find('.option');
|
||||
}
|
||||
});
|
||||
|
||||
// Option click
|
||||
$(document).on('click.nice_select', '.nice-select .option:not(.disabled)', function(event) {
|
||||
var $option = $(this);
|
||||
var $dropdown = $option.closest('.nice-select');
|
||||
|
||||
$dropdown.find('.selected').removeClass('selected');
|
||||
$option.addClass('selected');
|
||||
|
||||
var text = $option.data('display') || $option.text();
|
||||
$dropdown.find('.current').text(text);
|
||||
|
||||
$dropdown.prev('select').val($option.data('value')).trigger('change');
|
||||
});
|
||||
|
||||
// Keyboard events
|
||||
$(document).on('keydown.nice_select', '.nice-select', function(event) {
|
||||
var $dropdown = $(this);
|
||||
var $focused_option = $($dropdown.find('.focus') || $dropdown.find('.list .option.selected'));
|
||||
|
||||
// Space or Enter
|
||||
if (event.keyCode == 32 || event.keyCode == 13) {
|
||||
if ($dropdown.hasClass('open')) {
|
||||
$focused_option.trigger('click');
|
||||
} else {
|
||||
$dropdown.trigger('click');
|
||||
}
|
||||
return false;
|
||||
// Down
|
||||
} else if (event.keyCode == 40) {
|
||||
if (!$dropdown.hasClass('open')) {
|
||||
$dropdown.trigger('click');
|
||||
} else {
|
||||
var $next = $focused_option.nextAll('.option:not(.disabled)').first();
|
||||
if ($next.length > 0) {
|
||||
$dropdown.find('.focus').removeClass('focus');
|
||||
$next.addClass('focus');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
// Up
|
||||
} else if (event.keyCode == 38) {
|
||||
if (!$dropdown.hasClass('open')) {
|
||||
$dropdown.trigger('click');
|
||||
} else {
|
||||
var $prev = $focused_option.prevAll('.option:not(.disabled)').first();
|
||||
if ($prev.length > 0) {
|
||||
$dropdown.find('.focus').removeClass('focus');
|
||||
$prev.addClass('focus');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
// Esc
|
||||
} else if (event.keyCode == 27) {
|
||||
if ($dropdown.hasClass('open')) {
|
||||
$dropdown.trigger('click');
|
||||
}
|
||||
// Tab
|
||||
} else if (event.keyCode == 9) {
|
||||
if ($dropdown.hasClass('open')) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Detect CSS pointer-events support, for IE <= 10. From Modernizr.
|
||||
var style = document.createElement('a').style;
|
||||
style.cssText = 'pointer-events:auto';
|
||||
if (style.pointerEvents !== 'auto') {
|
||||
$('html').addClass('no-csspointerevents');
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
};
|
||||
|
||||
}(jQuery));
|
4
vendors/nice-select/js/jquery.nice-select.min.js
vendored
Normal file
4
vendors/nice-select/js/jquery.nice-select.min.js
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
/* jQuery Nice Select - v1.0
|
||||
https://github.com/hernansartorio/jquery-nice-select
|
||||
Made by Hernán Sartorio */
|
||||
!function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);
|
Loading…
Add table
Add a link
Reference in a new issue