Quelques premières modifs esthétiques
BIN
local/media/images/carousel/atelier-4-1.png
Normal file
|
After Width: | Height: | Size: 600 KiB |
BIN
local/media/images/carousel/atelier2-5-2.png
Normal file
|
After Width: | Height: | Size: 752 KiB |
BIN
local/media/images/store/600715983e0f2-logo.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
local/media/images/store/600715983f83d-logo.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
local/media/images/store/6007159840565-logo.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
templates/frontOffice/aomc/assets/dist/img/logo.png
vendored
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -2989,7 +2989,6 @@ select[multiple].input-lg {
|
||||
line-height: 1.42857143;
|
||||
border-radius: 3px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
@@ -5052,14 +5051,6 @@ a.thumbnail.active {
|
||||
.alert-danger .alert-link {
|
||||
color: #843534;
|
||||
}
|
||||
@-webkit-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
@keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
@@ -5095,7 +5086,6 @@ a.thumbnail.active {
|
||||
}
|
||||
.progress.active .progress-bar,
|
||||
.progress-bar.active {
|
||||
-webkit-animation: progress-bar-stripes 2s linear infinite;
|
||||
animation: progress-bar-stripes 2s linear infinite;
|
||||
}
|
||||
.progress-bar-success {
|
||||
@@ -5806,14 +5796,11 @@ button.close {
|
||||
outline: 0;
|
||||
}
|
||||
.modal.fade .modal-dialog {
|
||||
-webkit-transform: translate(0, -25%);
|
||||
-ms-transform: translate(0, -25%);
|
||||
transform: translate(0, -25%);
|
||||
transition: -webkit-transform 0.3s ease-out;
|
||||
transition: transform 0.3s ease-out;
|
||||
}
|
||||
.modal.in .modal-dialog {
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
@@ -6170,29 +6157,23 @@ button.close {
|
||||
}
|
||||
@media all and (transform-3d), (-webkit-transform-3d) {
|
||||
.carousel-inner > .item {
|
||||
transition: -webkit-transform 0.6s ease-in-out;
|
||||
transition: transform 0.6s ease-in-out;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
-webkit-perspective: 1000px;
|
||||
perspective: 1000px;
|
||||
}
|
||||
.carousel-inner > .item.next,
|
||||
.carousel-inner > .item.active.right {
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
left: 0;
|
||||
}
|
||||
.carousel-inner > .item.prev,
|
||||
.carousel-inner > .item.active.left {
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
left: 0;
|
||||
}
|
||||
.carousel-inner > .item.next.left,
|
||||
.carousel-inner > .item.prev.right,
|
||||
.carousel-inner > .item.active {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
left: 0;
|
||||
}
|
||||
@@ -6684,9 +6665,8 @@ button.close {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
/* makes the font 33% larger relative to the icon container */
|
||||
.fa-lg {
|
||||
@@ -6746,60 +6726,41 @@ button.close {
|
||||
margin-left: .3em;
|
||||
}
|
||||
.fa-spin {
|
||||
-webkit-animation: fa-spin 2s infinite linear;
|
||||
animation: fa-spin 2s infinite linear;
|
||||
}
|
||||
.fa-pulse {
|
||||
-webkit-animation: fa-spin 1s infinite steps(8);
|
||||
animation: fa-spin 1s infinite steps(8);
|
||||
}
|
||||
@-webkit-keyframes fa-spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes fa-spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
.fa-rotate-90 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
|
||||
-webkit-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.fa-rotate-180 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
|
||||
-webkit-transform: rotate(180deg);
|
||||
-ms-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.fa-rotate-270 {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
|
||||
-webkit-transform: rotate(270deg);
|
||||
-ms-transform: rotate(270deg);
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
.fa-flip-horizontal {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
|
||||
-webkit-transform: scale(-1, 1);
|
||||
-ms-transform: scale(-1, 1);
|
||||
transform: scale(-1, 1);
|
||||
}
|
||||
.fa-flip-vertical {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
|
||||
-webkit-transform: scale(1, -1);
|
||||
-ms-transform: scale(1, -1);
|
||||
transform: scale(1, -1);
|
||||
}
|
||||
@@ -6808,8 +6769,7 @@ button.close {
|
||||
:root .fa-rotate-270,
|
||||
:root .fa-flip-horizontal,
|
||||
:root .fa-flip-vertical {
|
||||
-webkit-filter: none;
|
||||
filter: none;
|
||||
filter: none;
|
||||
}
|
||||
.fa-stack {
|
||||
position: relative;
|
||||
@@ -8595,9 +8555,8 @@ header .header .language-container .currency-switch .select {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f078";
|
||||
}
|
||||
.navbar .navbar-cart .dropdown > a:after,
|
||||
@@ -8957,9 +8916,8 @@ header .header .language-container .currency-switch .select {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f071";
|
||||
display: block;
|
||||
font-size: 2.2em;
|
||||
@@ -9087,9 +9045,8 @@ a {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f105";
|
||||
}
|
||||
.btn {
|
||||
@@ -9320,9 +9277,8 @@ a {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f078";
|
||||
}
|
||||
.panel-heading {
|
||||
@@ -9498,9 +9454,8 @@ a {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f071";
|
||||
display: block;
|
||||
font-size: 2.2em;
|
||||
@@ -9558,9 +9513,8 @@ a {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f054";
|
||||
color: #f49a17;
|
||||
margin-left: -15px;
|
||||
@@ -9613,9 +9567,8 @@ a {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f068";
|
||||
}
|
||||
.block-nav .block-content li a.accordion-toggle.collapsed:after {
|
||||
@@ -9998,9 +9951,8 @@ a.label-delivered:focus {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f00d";
|
||||
margin-right: .3em;
|
||||
}
|
||||
@@ -10048,7 +10000,6 @@ label {
|
||||
content: "\f002";
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
line-height: 0;
|
||||
@@ -10063,7 +10014,6 @@ label {
|
||||
}
|
||||
.overlay:hover:after,
|
||||
.overlay:focus:after {
|
||||
-webkit-transform: translate(0, 50%);
|
||||
-ms-transform: translate(0, 50%);
|
||||
transform: translate(0, 50%);
|
||||
}
|
||||
@@ -10074,9 +10024,8 @@ label {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f015";
|
||||
color: #c9c9c9;
|
||||
font-size: 26px;
|
||||
@@ -10092,9 +10041,8 @@ label {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f007";
|
||||
color: #f49a17;
|
||||
font-size: 19px;
|
||||
@@ -10126,9 +10074,8 @@ label {
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f07a";
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
@@ -10249,7 +10196,6 @@ td.product .name > a:focus,
|
||||
text-decoration: line-through;
|
||||
}
|
||||
#products-new .products-grid .overlay:after {
|
||||
-webkit-transform: translate(0, 40%);
|
||||
-ms-transform: translate(0, 40%);
|
||||
transform: translate(0, 40%);
|
||||
}
|
||||
@@ -10465,9 +10411,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f005";
|
||||
}
|
||||
#product-details .product-promo .sale-period {
|
||||
@@ -10547,9 +10492,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f002";
|
||||
font-size: 30px;
|
||||
float: left;
|
||||
@@ -10617,9 +10561,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f0e0";
|
||||
color: #8b8b8b;
|
||||
font-size: 18px;
|
||||
@@ -10659,9 +10602,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f041";
|
||||
font-size: 34px;
|
||||
}
|
||||
@@ -10672,9 +10614,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f10b";
|
||||
font-size: 30px;
|
||||
margin-top: -8px;
|
||||
@@ -10687,9 +10628,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f0e0";
|
||||
font-size: 17px;
|
||||
margin-left: 2px;
|
||||
@@ -10707,9 +10647,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f1d8";
|
||||
font-size: 17px;
|
||||
}
|
||||
@@ -10875,9 +10814,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f077";
|
||||
color: #f49a17;
|
||||
display: block;
|
||||
@@ -10913,9 +10851,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f078";
|
||||
float: left;
|
||||
width: 20px;
|
||||
@@ -10942,9 +10879,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f10b";
|
||||
font-size: 30px;
|
||||
}
|
||||
@@ -10955,9 +10891,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f095";
|
||||
font-size: 22px;
|
||||
}
|
||||
@@ -10968,9 +10903,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f0e0";
|
||||
font-size: 18px;
|
||||
}
|
||||
@@ -11035,7 +10969,6 @@ td.product .name > a:focus,
|
||||
margin-bottom: 20px;
|
||||
width: 100%;
|
||||
height: 350px;
|
||||
-webkit-filter: grayscale(100%);
|
||||
-moz-filter: grayscale(100%);
|
||||
-ms-filter: grayscale(100%);
|
||||
-o-filter: grayscale(100%);
|
||||
@@ -11057,9 +10990,8 @@ td.product .name > a:focus,
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
content: "\f005";
|
||||
}
|
||||
#sale-details .sale-discount-information .sale-period {
|
||||
@@ -11073,3 +11005,30 @@ td.product .name > a:focus,
|
||||
#sale-details .sale-information .description {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Modifs spécifiques au client */
|
||||
header img {
|
||||
height: 50px;
|
||||
}
|
||||
header #nom-site {
|
||||
color: #545776;
|
||||
font-size: 36px;
|
||||
font-family: inherit;
|
||||
}
|
||||
#products-new .products-grid .item > article {
|
||||
border-bottom: 4px solid #545776;
|
||||
}
|
||||
#products-new .products-grid .item > article .product-info {
|
||||
background-color: #696d94;
|
||||
}
|
||||
.navbar-default .navbar-nav>.active>a,
|
||||
.navbar-default .navbar-nav>.active>a:focus,
|
||||
.navbar-default .navbar-nav>.active>a:hover,
|
||||
.navbar-default .navbar-nav>li>a:focus,
|
||||
.navbar-default .navbar-nav>li>a:hover {
|
||||
background-color: #545776;
|
||||
color: #fff;
|
||||
}
|
||||
a:hover, a:focus {
|
||||
color: #343649;
|
||||
}
|
||||
@@ -150,6 +150,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
{local_media type="logo"}
|
||||
<img src="{$MEDIA_URL}" alt="{$store_name}">
|
||||
{/local_media}
|
||||
<span id="nom-site">Outils 82</span>
|
||||
</a>
|
||||
</h1>
|
||||
{hook name="main.navbar-primary"}
|
||||
@@ -181,6 +182,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
{/ifhook}
|
||||
{elsehook rel="main.footer-top"}
|
||||
<section class="footer-banner">
|
||||
<!--
|
||||
<div class="container">
|
||||
<div class="banner row banner-col-3">
|
||||
<div class="col col-sm-4">
|
||||
@@ -197,7 +199,9 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section><!-- /.footer-banner -->
|
||||
//-->
|
||||
</section><!-- /.footer-banner
|
||||
//-->
|
||||
{/elsehook}
|
||||
|
||||
{ifhook rel="main.footer-body"}
|
||||
|
||||
4353
templates/frontOffice/aomc/package-lock.json
generated
Normal file
@@ -0,0 +1 @@
|
||||
e3bec8e4c4dc309474fe9fb0f292853c
|
||||
@@ -0,0 +1,6 @@
|
||||
$(function() {
|
||||
// Set proper image ID in delete from
|
||||
$('a.image-delete').click(function(ev) {
|
||||
$('#image_delete_id').val($(this).data('id'));
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,709 @@
|
||||
/*!
|
||||
* bootstrap-select v1.3.1
|
||||
* http://silviomoreto.github.io/bootstrap-select/
|
||||
*
|
||||
* Copyright 2013 bootstrap-select
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
!function($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
$.expr[":"].icontains = $.expr.createPseudo(function(arg) {
|
||||
return function( elem ) {
|
||||
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
|
||||
};
|
||||
});
|
||||
|
||||
var Selectpicker = function(element, options, e) {
|
||||
if (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
this.$element = $(element);
|
||||
this.$newElement = null;
|
||||
this.$button = null;
|
||||
this.$menu = null;
|
||||
|
||||
//Merge defaults, options and data-attributes to make our options
|
||||
this.options = $.extend({}, $.fn.selectpicker.defaults, this.$element.data(), typeof options == 'object' && options);
|
||||
|
||||
//If we have no title yet, check the attribute 'title' (this is missed by jq as its not a data-attribute
|
||||
if (this.options.title == null) {
|
||||
this.options.title = this.$element.attr('title');
|
||||
}
|
||||
|
||||
//Expose public methods
|
||||
this.val = Selectpicker.prototype.val;
|
||||
this.render = Selectpicker.prototype.render;
|
||||
this.refresh = Selectpicker.prototype.refresh;
|
||||
this.setStyle = Selectpicker.prototype.setStyle;
|
||||
this.selectAll = Selectpicker.prototype.selectAll;
|
||||
this.deselectAll = Selectpicker.prototype.deselectAll;
|
||||
this.init();
|
||||
};
|
||||
|
||||
Selectpicker.prototype = {
|
||||
|
||||
constructor: Selectpicker,
|
||||
|
||||
init: function(e) {
|
||||
this.$element.hide();
|
||||
this.multiple = this.$element.prop('multiple');
|
||||
var id = this.$element.attr('id');
|
||||
this.$newElement = this.createView();
|
||||
this.$element.after(this.$newElement);
|
||||
this.$menu = this.$newElement.find('> .dropdown-menu');
|
||||
this.$button = this.$newElement.find('> button');
|
||||
this.$searchbox = this.$newElement.find('input');
|
||||
|
||||
if (id !== undefined) {
|
||||
var that = this;
|
||||
this.$button.attr('data-id', id);
|
||||
$('label[for="' + id + '"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
that.$button.focus();
|
||||
});
|
||||
}
|
||||
|
||||
this.checkDisabled();
|
||||
this.checkTabIndex();
|
||||
this.clickListener();
|
||||
this.liveSearchListener();
|
||||
this.render();
|
||||
this.liHeight();
|
||||
this.setStyle();
|
||||
this.setWidth();
|
||||
if (this.options.container) {
|
||||
this.selectPosition();
|
||||
}
|
||||
this.$menu.data('this', this);
|
||||
this.$newElement.data('this', this);
|
||||
},
|
||||
|
||||
createDropdown: function() {
|
||||
//If we are multiple, then add the show-tick class by default
|
||||
var multiple = this.multiple ? ' show-tick' : '';
|
||||
var header = this.options.header ? '<h3 class="popover-title">' + this.options.header + '<button type="button" class="close" aria-hidden="true">×</button></h3>' : '';
|
||||
var searchbox = this.options.liveSearch ? '<div class="bootstrap-select-searchbox"><input type="text" class="input-block-level form-control" /></div>' : '';
|
||||
var drop =
|
||||
"<div class='btn-group bootstrap-select" + multiple + "'>" +
|
||||
"<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'>" +
|
||||
"<div class='filter-option pull-left'></div> " +
|
||||
"<div class='caret'></div>" +
|
||||
"</button>" +
|
||||
"<div class='dropdown-menu open'>" +
|
||||
header +
|
||||
searchbox +
|
||||
"<ul class='dropdown-menu inner' role='menu'>" +
|
||||
"</ul>" +
|
||||
"</div>" +
|
||||
"</div>";
|
||||
|
||||
return $(drop);
|
||||
},
|
||||
|
||||
createView: function() {
|
||||
var $drop = this.createDropdown();
|
||||
var $li = this.createLi();
|
||||
$drop.find('ul').append($li);
|
||||
return $drop;
|
||||
},
|
||||
|
||||
reloadLi: function() {
|
||||
//Remove all children.
|
||||
this.destroyLi();
|
||||
//Re build
|
||||
var $li = this.createLi();
|
||||
this.$menu.find('ul').append( $li );
|
||||
},
|
||||
|
||||
destroyLi: function() {
|
||||
this.$menu.find('li').remove();
|
||||
},
|
||||
|
||||
createLi: function() {
|
||||
var that = this,
|
||||
_liA = [],
|
||||
_liHtml = '';
|
||||
|
||||
this.$element.find('option').each(function(index) {
|
||||
var $this = $(this);
|
||||
|
||||
//Get the class and text for the option
|
||||
var optionClass = $this.attr("class") || '';
|
||||
var inline = $this.attr("style") || '';
|
||||
var text = $this.data('content') ? $this.data('content') : $this.html();
|
||||
var subtext = $this.data('subtext') !== undefined ? '<small class="muted">' + $this.data('subtext') + '</small>' : '';
|
||||
var icon = $this.data('icon') !== undefined ? '<i class="glyphicon '+$this.data('icon')+'"></i> ' : '';
|
||||
if (icon !== '' && ($this.is(':disabled') || $this.parent().is(':disabled'))) {
|
||||
icon = '<span>'+icon+'</span>';
|
||||
}
|
||||
|
||||
if (!$this.data('content')) {
|
||||
//Prepend any icon and append any subtext to the main text.
|
||||
text = icon + '<span class="text">' + text + subtext + '</span>';
|
||||
}
|
||||
|
||||
if (that.options.hideDisabled && ($this.is(':disabled') || $this.parent().is(':disabled'))) {
|
||||
_liA.push('<a style="min-height: 0; padding: 0"></a>');
|
||||
} else if ($this.parent().is('optgroup') && $this.data('divider') != true) {
|
||||
if ($this.index() == 0) {
|
||||
//Get the opt group label
|
||||
var label = $this.parent().attr('label');
|
||||
var labelSubtext = $this.parent().data('subtext') !== undefined ? '<small class="muted">'+$this.parent().data('subtext')+'</small>' : '';
|
||||
var labelIcon = $this.parent().data('icon') ? '<i class="'+$this.parent().data('icon')+'"></i> ' : '';
|
||||
label = labelIcon + '<span class="text">' + label + labelSubtext + '</span>';
|
||||
|
||||
if ($this[0].index != 0) {
|
||||
_liA.push(
|
||||
'<div class="div-contain"><div class="divider"></div></div>'+
|
||||
'<dt>'+label+'</dt>'+
|
||||
that.createA(text, "opt " + optionClass, inline )
|
||||
);
|
||||
} else {
|
||||
_liA.push(
|
||||
'<dt>'+label+'</dt>'+
|
||||
that.createA(text, "opt " + optionClass, inline ));
|
||||
}
|
||||
} else {
|
||||
_liA.push(that.createA(text, "opt " + optionClass, inline ));
|
||||
}
|
||||
} else if ($this.data('divider') == true) {
|
||||
_liA.push('<div class="div-contain"><div class="divider"></div></div>');
|
||||
} else if ($(this).data('hidden') == true) {
|
||||
_liA.push('');
|
||||
} else {
|
||||
_liA.push(that.createA(text, optionClass, inline ));
|
||||
}
|
||||
});
|
||||
|
||||
$.each(_liA, function(i, item) {
|
||||
_liHtml += "<li rel=" + i + ">" + item + "</li>";
|
||||
});
|
||||
|
||||
//If we are not multiple, and we dont have a selected item, and we dont have a title, select the first element so something is set in the button
|
||||
if (!this.multiple && this.$element.find('option:selected').length==0 && !this.options.title) {
|
||||
this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected');
|
||||
}
|
||||
|
||||
return $(_liHtml);
|
||||
},
|
||||
|
||||
createA: function(text, classes, inline) {
|
||||
return '<a tabindex="0" class="'+classes+'" style="'+inline+'">' +
|
||||
text +
|
||||
'<i class="glyphicon glyphicon-ok icon-ok check-mark"></i>' +
|
||||
'</a>';
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var that = this;
|
||||
|
||||
//Update the LI to match the SELECT
|
||||
this.$element.find('option').each(function(index) {
|
||||
that.setDisabled(index, $(this).is(':disabled') || $(this).parent().is(':disabled') );
|
||||
that.setSelected(index, $(this).is(':selected') );
|
||||
});
|
||||
|
||||
var selectedItems = this.$element.find('option:selected').map(function(index,value) {
|
||||
var $this = $(this);
|
||||
var icon = $this.data('icon') && that.options.showIcon ? '<i class="glyphicon ' + $this.data('icon') + '"></i> ' : '';
|
||||
var subtext;
|
||||
if (that.options.showSubtext && $this.attr('data-subtext') && !that.multiple) {
|
||||
subtext = ' <small class="muted">'+$this.data('subtext') +'</small>';
|
||||
} else {
|
||||
subtext = '';
|
||||
}
|
||||
if ($this.data('content') && that.options.showContent) {
|
||||
return $this.data('content');
|
||||
} else if ($this.attr('title') != undefined) {
|
||||
return $this.attr('title');
|
||||
} else {
|
||||
return icon + $this.html() + subtext;
|
||||
}
|
||||
}).toArray();
|
||||
|
||||
//Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled
|
||||
//Convert all the values into a comma delimited string
|
||||
var title = !this.multiple ? selectedItems[0] : selectedItems.join(", ");
|
||||
|
||||
//If this is multi select, and the selectText type is count, the show 1 of 2 selected etc..
|
||||
if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) {
|
||||
var max = this.options.selectedTextFormat.split(">");
|
||||
var notDisabled = this.options.hideDisabled ? ':not([disabled])' : '';
|
||||
if ( (max.length>1 && selectedItems.length > max[1]) || (max.length==1 && selectedItems.length>=2)) {
|
||||
title = this.options.countSelectedText.replace('{0}', selectedItems.length).replace('{1}', this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+notDisabled).length);
|
||||
}
|
||||
}
|
||||
|
||||
//If we dont have a title, then use the default, or if nothing is set at all, use the not selected text
|
||||
if (!title) {
|
||||
title = this.options.title != undefined ? this.options.title : this.options.noneSelectedText;
|
||||
}
|
||||
|
||||
this.$newElement.find('.filter-option').html(title);
|
||||
},
|
||||
|
||||
setStyle: function(style, status) {
|
||||
if (this.$element.attr('class')) {
|
||||
this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device/gi, ''));
|
||||
}
|
||||
|
||||
var buttonClass = style ? style : this.options.style;
|
||||
|
||||
if (status == 'add') {
|
||||
this.$button.addClass(buttonClass);
|
||||
} else if (status == 'remove') {
|
||||
this.$button.removeClass(buttonClass);
|
||||
} else {
|
||||
this.$button.removeClass(this.options.style);
|
||||
this.$button.addClass(buttonClass);
|
||||
}
|
||||
},
|
||||
|
||||
liHeight: function() {
|
||||
var selectClone = this.$newElement.clone();
|
||||
selectClone.appendTo('body');
|
||||
var $menuClone = selectClone.addClass('open').find('> .dropdown-menu');
|
||||
var liHeight = $menuClone.find('li > a').outerHeight();
|
||||
var headerHeight = this.options.header ? $menuClone.find('.popover-title').outerHeight() : 0;
|
||||
selectClone.remove();
|
||||
this.$newElement.data('liHeight', liHeight).data('headerHeight', headerHeight);
|
||||
},
|
||||
|
||||
setSize: function() {
|
||||
var that = this,
|
||||
menu = this.$menu,
|
||||
menuInner = menu.find('.inner'),
|
||||
menuA = menuInner.find('li > a'),
|
||||
selectHeight = this.$newElement.outerHeight(),
|
||||
liHeight = this.$newElement.data('liHeight'),
|
||||
headerHeight = this.$newElement.data('headerHeight'),
|
||||
divHeight = menu.find('li .divider').outerHeight(true),
|
||||
menuPadding = parseInt(menu.css('padding-top')) +
|
||||
parseInt(menu.css('padding-bottom')) +
|
||||
parseInt(menu.css('border-top-width')) +
|
||||
parseInt(menu.css('border-bottom-width')),
|
||||
notDisabled = this.options.hideDisabled ? ':not(.disabled)' : '',
|
||||
$window = $(window),
|
||||
menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2,
|
||||
menuHeight,
|
||||
selectOffsetTop,
|
||||
selectOffsetBot,
|
||||
posVert = function() {
|
||||
selectOffsetTop = that.$newElement.offset().top - $window.scrollTop();
|
||||
selectOffsetBot = $window.height() - selectOffsetTop - selectHeight;
|
||||
};
|
||||
posVert();
|
||||
if (this.options.header) menu.css('padding-top', 0);
|
||||
|
||||
if (this.options.size == 'auto') {
|
||||
var getSize = function() {
|
||||
var minHeight;
|
||||
posVert();
|
||||
menuHeight = selectOffsetBot - menuExtras;
|
||||
that.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && (menuHeight - menuExtras) < menu.height() && that.options.dropupAuto);
|
||||
if (that.$newElement.hasClass('dropup')) {
|
||||
menuHeight = selectOffsetTop - menuExtras;
|
||||
}
|
||||
if ((menu.find('li').length + menu.find('dt').length) > 3) {
|
||||
minHeight = liHeight*3 + menuExtras - 2;
|
||||
} else {
|
||||
minHeight = 0;
|
||||
}
|
||||
menu.css({'max-height' : menuHeight + 'px', 'overflow' : 'hidden', 'min-height' : minHeight + 'px'});
|
||||
menuInner.css({'max-height' : menuHeight - headerHeight- menuPadding + 'px', 'overflow-y' : 'auto', 'min-height' : minHeight - menuPadding + 'px'});
|
||||
}
|
||||
getSize();
|
||||
$(window).resize(getSize);
|
||||
$(window).scroll(getSize);
|
||||
} else if (this.options.size && this.options.size != 'auto' && menu.find('li'+notDisabled).length > this.options.size) {
|
||||
var optIndex = menu.find("li"+notDisabled+" > *").filter(':not(.div-contain)').slice(0,this.options.size).last().parent().index();
|
||||
var divLength = menu.find("li").slice(0,optIndex + 1).find('.div-contain').length;
|
||||
menuHeight = liHeight*this.options.size + divLength*divHeight + menuPadding;
|
||||
this.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && menuHeight < menu.height() && this.options.dropupAuto);
|
||||
menu.css({'max-height' : menuHeight + headerHeight + 'px', 'overflow' : 'hidden'});
|
||||
menuInner.css({'max-height' : menuHeight - menuPadding + 'px', 'overflow-y' : 'auto'});
|
||||
}
|
||||
},
|
||||
|
||||
setWidth: function() {
|
||||
if (this.options.width == 'auto') {
|
||||
this.$menu.css('min-width', '0');
|
||||
|
||||
// Get correct width if element hidden
|
||||
var selectClone = this.$newElement.clone().appendTo('body');
|
||||
var ulWidth = selectClone.find('> .dropdown-menu').css('width');
|
||||
selectClone.remove();
|
||||
|
||||
this.$newElement.css('width', ulWidth);
|
||||
} else if (this.options.width == 'fit') {
|
||||
// Remove inline min-width so width can be changed from 'auto'
|
||||
this.$menu.css('min-width', '');
|
||||
this.$newElement.css('width', '').addClass('fit-width');
|
||||
} else if (this.options.width) {
|
||||
// Remove inline min-width so width can be changed from 'auto'
|
||||
this.$menu.css('min-width', '');
|
||||
this.$newElement.css('width', this.options.width);
|
||||
} else {
|
||||
// Remove inline min-width/width so width can be changed
|
||||
this.$menu.css('min-width', '');
|
||||
this.$newElement.css('width', '');
|
||||
}
|
||||
// Remove fit-width class if width is changed programmatically
|
||||
if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {
|
||||
this.$newElement.removeClass('fit-width');
|
||||
}
|
||||
},
|
||||
|
||||
selectPosition: function() {
|
||||
var that = this,
|
||||
drop = "<div />",
|
||||
$drop = $(drop),
|
||||
pos,
|
||||
actualHeight,
|
||||
getPlacement = function($element) {
|
||||
$drop.addClass($element.attr('class')).toggleClass('dropup', $element.hasClass('dropup'));
|
||||
pos = $element.offset();
|
||||
actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight;
|
||||
$drop.css({'top' : pos.top + actualHeight, 'left' : pos.left, 'width' : $element[0].offsetWidth, 'position' : 'absolute'});
|
||||
};
|
||||
this.$newElement.on('click', function(e) {
|
||||
getPlacement($(this));
|
||||
$drop.appendTo(that.options.container);
|
||||
$drop.toggleClass('open', !$(this).hasClass('open'));
|
||||
$drop.append(that.$menu);
|
||||
});
|
||||
$(window).resize(function() {
|
||||
getPlacement(that.$newElement);
|
||||
});
|
||||
$(window).on('scroll', function(e) {
|
||||
getPlacement(that.$newElement);
|
||||
});
|
||||
$('html').on('click', function(e) {
|
||||
if ($(e.target).closest(that.$newElement).length < 1) {
|
||||
$drop.removeClass('open');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
mobile: function() {
|
||||
this.$element.addClass('mobile-device').appendTo(this.$newElement);
|
||||
if (this.options.container) this.$menu.hide();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
this.reloadLi();
|
||||
this.render();
|
||||
this.setWidth();
|
||||
this.setStyle();
|
||||
this.checkDisabled();
|
||||
this.liHeight();
|
||||
},
|
||||
|
||||
setSelected: function(index, selected) {
|
||||
this.$menu.find('li').eq(index).toggleClass('selected', selected);
|
||||
},
|
||||
|
||||
setDisabled: function(index, disabled) {
|
||||
if (disabled) {
|
||||
this.$menu.find('li').eq(index).addClass('disabled').find('a').attr('href','#').attr('tabindex',-1);
|
||||
} else {
|
||||
this.$menu.find('li').eq(index).removeClass('disabled').find('a').removeAttr('href').attr('tabindex',0);
|
||||
}
|
||||
},
|
||||
|
||||
isDisabled: function() {
|
||||
return this.$element.is(':disabled');
|
||||
},
|
||||
|
||||
checkDisabled: function() {
|
||||
var that = this;
|
||||
if (this.isDisabled()) {
|
||||
this.$button.addClass('disabled');
|
||||
this.$button.attr('tabindex','-1');
|
||||
} else if (this.$button.hasClass('disabled')) {
|
||||
this.$button.removeClass('disabled');
|
||||
this.$button.removeAttr('tabindex');
|
||||
}
|
||||
this.$button.click(function() {
|
||||
return !that.isDisabled();
|
||||
});
|
||||
},
|
||||
|
||||
checkTabIndex: function() {
|
||||
if (this.$element.is('[tabindex]')) {
|
||||
var tabindex = this.$element.attr("tabindex");
|
||||
this.$button.attr('tabindex', tabindex);
|
||||
}
|
||||
},
|
||||
|
||||
clickListener: function() {
|
||||
var that = this;
|
||||
|
||||
$('body').on('touchstart.dropdown', '.dropdown-menu', function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
this.$newElement.on('click', function() {
|
||||
that.setSize();
|
||||
});
|
||||
|
||||
this.$menu.on('click', 'li a', function(e) {
|
||||
var clickedIndex = $(this).parent().index(),
|
||||
$this = $(this).parent(),
|
||||
prevValue = that.$element.val();
|
||||
|
||||
//Dont close on multi choice menu
|
||||
if (that.multiple) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
//Dont run if we have been disabled
|
||||
if (!that.isDisabled() && !$(this).parent().hasClass('disabled')) {
|
||||
var $options = that.$element.find('option');
|
||||
var $option = $options.eq(clickedIndex);
|
||||
|
||||
//Deselect all others if not multi select box
|
||||
if (!that.multiple) {
|
||||
$options.prop('selected', false);
|
||||
$option.prop('selected', true);
|
||||
}
|
||||
//Else toggle the one we have chosen if we are multi select.
|
||||
else {
|
||||
var state = $option.prop('selected');
|
||||
|
||||
$option.prop('selected', !state);
|
||||
}
|
||||
|
||||
that.$button.focus();
|
||||
|
||||
// Trigger select 'change'
|
||||
if (prevValue != that.$element.val()) {
|
||||
that.$element.change();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.$menu.on('click', 'li.disabled a, li dt, li .div-contain, h3.popover-title', function(e) {
|
||||
if (e.target == this) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
that.$button.focus();
|
||||
}
|
||||
});
|
||||
|
||||
this.$searchbox.on('click', function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
this.$element.change(function() {
|
||||
that.render()
|
||||
});
|
||||
},
|
||||
|
||||
liveSearchListener: function() {
|
||||
var that = this;
|
||||
|
||||
this.$newElement.on('click.dropdown.data-api', function(e){
|
||||
if(that.options.liveSearch) {
|
||||
setTimeout(function() {
|
||||
that.$searchbox.focus();
|
||||
}, 10);
|
||||
}
|
||||
});
|
||||
|
||||
this.$searchbox.on('input', function() {
|
||||
that.$newElement.find('li').show().not(':icontains(' + that.$searchbox.val() + ')').hide();
|
||||
});
|
||||
},
|
||||
|
||||
val: function(value) {
|
||||
|
||||
if (value != undefined) {
|
||||
this.$element.val( value );
|
||||
|
||||
this.$element.change();
|
||||
return this.$element;
|
||||
} else {
|
||||
return this.$element.val();
|
||||
}
|
||||
},
|
||||
|
||||
selectAll: function() {
|
||||
this.$element.find('option').prop('selected', true).attr('selected', 'selected');
|
||||
this.render();
|
||||
},
|
||||
|
||||
deselectAll: function() {
|
||||
this.$element.find('option').prop('selected', false).removeAttr('selected');
|
||||
this.render();
|
||||
},
|
||||
|
||||
keydown: function(e) {
|
||||
var $this,
|
||||
$items,
|
||||
$parent,
|
||||
index,
|
||||
next,
|
||||
first,
|
||||
last,
|
||||
prev,
|
||||
nextPrev,
|
||||
that;
|
||||
|
||||
$this = $(this);
|
||||
|
||||
$parent = $this.parent();
|
||||
|
||||
that = $parent.data('this');
|
||||
|
||||
if (that.options.container) $parent = that.$menu;
|
||||
|
||||
$items = $('[role=menu] li:not(.divider):visible a', $parent);
|
||||
|
||||
if (!$items.length) return;
|
||||
|
||||
if (/(38|40)/.test(e.keyCode)) {
|
||||
|
||||
index = $items.index($items.filter(':focus'));
|
||||
first = $items.parent(':not(.disabled)').first().index();
|
||||
last = $items.parent(':not(.disabled)').last().index();
|
||||
next = $items.eq(index).parent().nextAll(':not(.disabled)').eq(0).index();
|
||||
prev = $items.eq(index).parent().prevAll(':not(.disabled)').eq(0).index();
|
||||
nextPrev = $items.eq(next).parent().prevAll(':not(.disabled)').eq(0).index();
|
||||
|
||||
if (e.keyCode == 38) {
|
||||
if (index != nextPrev && index > prev) index = prev;
|
||||
if (index < first) index = first;
|
||||
}
|
||||
|
||||
if (e.keyCode == 40) {
|
||||
if (index != nextPrev && index < next) index = next;
|
||||
if (index > last) index = last;
|
||||
if (index == -1) index = 0;
|
||||
}
|
||||
|
||||
$items.eq(index).focus();
|
||||
} else {
|
||||
var keyCodeMap = {
|
||||
48:"0", 49:"1", 50:"2", 51:"3", 52:"4", 53:"5", 54:"6", 55:"7", 56:"8", 57:"9", 59:";",
|
||||
65:"a", 66:"b", 67:"c", 68:"d", 69:"e", 70:"f", 71:"g", 72:"h", 73:"i", 74:"j", 75:"k", 76:"l",
|
||||
77:"m", 78:"n", 79:"o", 80:"p", 81:"q", 82:"r", 83:"s", 84:"t", 85:"u", 86:"v", 87:"w", 88:"x", 89:"y", 90:"z",
|
||||
96:"0", 97:"1", 98:"2", 99:"3", 100:"4", 101:"5", 102:"6", 103:"7", 104:"8", 105:"9"
|
||||
}
|
||||
|
||||
var keyIndex = [];
|
||||
|
||||
$items.each(function() {
|
||||
if ($(this).parent().is(':not(.disabled)')) {
|
||||
if ($.trim($(this).text().toLowerCase()).substring(0,1) == keyCodeMap[e.keyCode]) {
|
||||
keyIndex.push($(this).parent().index());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var count = $(document).data('keycount');
|
||||
count++;
|
||||
$(document).data('keycount',count);
|
||||
|
||||
var prevKey = $.trim($(':focus').text().toLowerCase()).substring(0,1);
|
||||
|
||||
if (prevKey != keyCodeMap[e.keyCode]) {
|
||||
count = 1;
|
||||
$(document).data('keycount',count);
|
||||
} else if (count >= keyIndex.length) {
|
||||
$(document).data('keycount',0);
|
||||
}
|
||||
|
||||
$items.eq(keyIndex[count - 1]).focus();
|
||||
}
|
||||
|
||||
// select focused option if "Enter" or "Spacebar" are pressed
|
||||
if (/(13|32)/.test(e.keyCode)) {
|
||||
e.preventDefault();
|
||||
$(':focus').click();
|
||||
$(document).data('keycount',0);
|
||||
}
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
this.$newElement.hide();
|
||||
},
|
||||
|
||||
show: function() {
|
||||
this.$newElement.show();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.$newElement.remove();
|
||||
this.$element.remove();
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.selectpicker = function(option, event) {
|
||||
//get the args of the outer function..
|
||||
var args = arguments;
|
||||
var value;
|
||||
var chain = this.each(function() {
|
||||
if ($(this).is('select')) {
|
||||
var $this = $(this),
|
||||
data = $this.data('selectpicker'),
|
||||
options = typeof option == 'object' && option;
|
||||
|
||||
if (!data) {
|
||||
$this.data('selectpicker', (data = new Selectpicker(this, options, event)));
|
||||
} else if (options) {
|
||||
for(var i in options) {
|
||||
data.options[i] = options[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof option == 'string') {
|
||||
//Copy the value of option, as once we shift the arguments
|
||||
//it also shifts the value of option.
|
||||
var property = option;
|
||||
if (data[property] instanceof Function) {
|
||||
[].shift.apply(args);
|
||||
value = data[property].apply(data, args);
|
||||
} else {
|
||||
value = data.options[property];
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (value != undefined) {
|
||||
return value;
|
||||
} else {
|
||||
return chain;
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.selectpicker.defaults = {
|
||||
style: 'btn-default',
|
||||
size: 'auto',
|
||||
title: null,
|
||||
selectedTextFormat : 'values',
|
||||
noneSelectedText : 'Nothing selected',
|
||||
countSelectedText: '{0} of {1} selected',
|
||||
width: false,
|
||||
container: false,
|
||||
hideDisabled: false,
|
||||
showSubtext: false,
|
||||
showIcon: true,
|
||||
showContent: true,
|
||||
dropupAuto: true,
|
||||
header: false,
|
||||
liveSearch: false
|
||||
}
|
||||
|
||||
$(document)
|
||||
.data('keycount', 0)
|
||||
.on('keydown', '[data-toggle=dropdown], [role=menu]' , Selectpicker.prototype.keydown)
|
||||
|
||||
}(window.jQuery);
|
||||
@@ -1 +1 @@
|
||||
74f9266027b725af26a7ff05e707e4d8
|
||||
4b012404654a5775a06f782ac735319e
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |