Skip to content

Commit

Permalink
Sistemato riferimento a util.js, rimossi riferimenti non usati.
Browse files Browse the repository at this point in the history
Sistemato simbolo # nei data-uri per https://www.chromestatus.com/features/5656049583390720
  • Loading branch information
francescozaia committed Jun 5, 2018
1 parent bf66973 commit 0ebaf2a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 180 deletions.
6 changes: 1 addition & 5 deletions src/js/plugins/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ $.fn.autocomplete = function (options) {
$autocomplete.empty();
}

if (q.length === 0) {
$('.autocomplete-clear').css('visibility', 'hidden');
} else {
$('.autocomplete-clear').css('visibility', 'visible');
}
$('.autocomplete-clear').toggle(q.length !== 0);
});

$autocomplete.on('click', 'li', function () {
Expand Down
2 changes: 1 addition & 1 deletion src/js/plugins/cookiebar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import $ from 'jquery'
import Util from './util'
import Util from 'node_modules/bootstrap/js/src/util.js'

/**
* --------------------------------------------------------------------------
Expand Down
31 changes: 16 additions & 15 deletions src/js/plugins/custom-select.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import $ from 'jquery'
import Util from './util'

/**
* --------------------------------------------------------------------------
* Bootstrap (v4.0.0): Select.js
* --------------------------------------------------------------------------
*/

const Select = (($) => {

Expand Down Expand Up @@ -41,7 +34,7 @@ const Select = (($) => {

class Select {

constructor(element /*, config */) {
constructor(element) {

this._elements = []
this._element = element
Expand Down Expand Up @@ -219,7 +212,7 @@ const Select = (($) => {
}

$newSelect.on({
focus: function focus(/* e */) {
focus: function focus() {
if ($('ul.select-dropdown').not(that._customElement[0]).is(':visible')) {
$('input.select-dropdown').trigger('close');
}
Expand All @@ -235,7 +228,7 @@ const Select = (($) => {
click: function click(e) {
e.stopPropagation();
},
blur: function blur(/* e */) {
blur: function blur() {
if (!that._isMultiple && !that._isSearchable) {
$(this).trigger('close');
}
Expand Down Expand Up @@ -314,7 +307,7 @@ const Select = (($) => {
}
});

$(window).on('click', function (/* e */) {
$(window).on('click', function () {
(that._isMultiple || that._isSearchable) && (that._optionsHover || $newSelect.trigger('close'));
});

Expand All @@ -336,7 +329,7 @@ const Select = (($) => {
</span>
`)
this._customElement.append(element);
element.find('.search').on('keyup', function (/* e */) {
element.find('.search').on('keyup', function () {

const $this = $(this);
var ul = $this.closest('ul');
Expand Down Expand Up @@ -391,11 +384,19 @@ const Select = (($) => {

if (this._isMultiple) {
this._customElement.append($(`
<li class="${disabledClass}"><span class="filtrable"><input type="checkbox"${disabledClass}/><label></label>${option.html()}</span></li>
<li class="${disabledClass}">
<span class="filtrable">
<input type="checkbox"${disabledClass}/>
<label></label>
${option.html()}
</span>
</li>
`));
} else {
this._customElement.append($(`
<li class="${disabledClass}${optgroupClass}"><span class="filtrable">${option.html()}</span></li>
<li class="${disabledClass}${optgroupClass}">
<span class="filtrable">${option.html()}</span>
</li>
`));
}
}
Expand Down Expand Up @@ -440,7 +441,7 @@ const Select = (($) => {

// static

static _jQueryInterface(/* config */) {
static _jQueryInterface() {
return this.each(function () {
var $this = $(this)
var data = $this.data(DATA_KEY)
Expand Down
2 changes: 0 additions & 2 deletions src/js/plugins/date-picker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Util from './util'

/**
* --------------------------------------------------------------------------
* Bootstrap (v4.0.0): DatePicker.js
Expand Down
152 changes: 0 additions & 152 deletions src/js/plugins/util.js

This file was deleted.

6 changes: 3 additions & 3 deletions src/scss/custom/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,20 @@ input[type="date"], input[type="datetime-local"], input[type="email"], input[typ
background-position: center right !important;
background-repeat: no-repeat !important;
background-size: 45px 45% !important;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#00cc85' viewBox='0 0 192 512'%3E%3Cpath d='M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z'/%3E%3C/svg%3E");
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2300cc85' viewBox='0 0 192 512'%3E%3Cpath d='M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z'/%3E%3C/svg%3E");
}
.custom-select.is-invalid, .form-control.is-invalid, .was-validated .custom-select:invalid, .was-validated .form-control:invalid {
background-position: center right !important;
background-repeat: no-repeat !important;
background-size: 45px 45% !important;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#f73e5a' viewBox='0 0 384 512'%3E%3Cpath d='M231.6 256l130.1-130.1c4.7-4.7 4.7-12.3 0-17l-22.6-22.6c-4.7-4.7-12.3-4.7-17 0L192 216.4 61.9 86.3c-4.7-4.7-12.3-4.7-17 0l-22.6 22.6c-4.7 4.7-4.7 12.3 0 17L152.4 256 22.3 386.1c-4.7 4.7-4.7 12.3 0 17l22.6 22.6c4.7 4.7 12.3 4.7 17 0L192 295.6l130.1 130.1c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17L231.6 256z'/%3E%3C/svg%3E");
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23f73e5a' viewBox='0 0 384 512'%3E%3Cpath d='M231.6 256l130.1-130.1c4.7-4.7 4.7-12.3 0-17l-22.6-22.6c-4.7-4.7-12.3-4.7-17 0L192 216.4 61.9 86.3c-4.7-4.7-12.3-4.7-17 0l-22.6 22.6c-4.7 4.7-4.7 12.3 0 17L152.4 256 22.3 386.1c-4.7 4.7-4.7 12.3 0 17l22.6 22.6c4.7 4.7 12.3 4.7 17 0L192 295.6l130.1 130.1c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17L231.6 256z'/%3E%3C/svg%3E");
}
.custom-select.warning, .form-control.warning {
background-position: center right !important;
background-repeat: no-repeat !important;
background-size: 25px 45% !important;
border-color: #ff9900;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#ff9900' viewBox='0 0 192 512'%3E%3Cpath d='M176 432c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zM25.26 25.199l13.6 272C39.499 309.972 50.041 320 62.83 320h66.34c12.789 0 23.331-10.028 23.97-22.801l13.6-272C167.425 11.49 156.496 0 142.77 0H49.23C35.504 0 24.575 11.49 25.26 25.199z'/%3E%3C/svg%3E");
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ff9900' viewBox='0 0 192 512'%3E%3Cpath d='M176 432c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zM25.26 25.199l13.6 272C39.499 309.972 50.041 320 62.83 320h66.34c12.789 0 23.331-10.028 23.97-22.801l13.6-272C167.425 11.49 156.496 0 142.77 0H49.23C35.504 0 24.575 11.49 25.26 25.199z'/%3E%3C/svg%3E");
}
.custom-select.is-valid~.warning-feedback, .form-control.is-valid~.warning-feedback {
display: block;
Expand Down
4 changes: 2 additions & 2 deletions src/scss/custom/_password.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
cursor: pointer;
}
.eye-on {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#5c6f82' viewBox='0 0 576 512'%3E%3Cpath d='M272.702 359.139c-80.483-9.011-136.212-86.886-116.93-167.042l116.93 167.042zM288 392c-102.556 0-192.092-54.701-240-136 21.755-36.917 52.1-68.342 88.344-91.658l-27.541-39.343C67.001 152.234 31.921 188.741 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.004 376.006 168.14 440 288 440a332.89 332.89 0 0 0 39.648-2.367l-32.021-45.744A284.16 284.16 0 0 1 288 392zm281.354-111.631c-33.232 56.394-83.421 101.742-143.554 129.492l48.116 68.74c3.801 5.429 2.48 12.912-2.949 16.712L450.23 509.83c-5.429 3.801-12.912 2.48-16.712-2.949L102.084 33.399c-3.801-5.429-2.48-12.912 2.949-16.712L125.77 2.17c5.429-3.801 12.912-2.48 16.712 2.949l55.526 79.325C226.612 76.343 256.808 72 288 72c119.86 0 224.996 63.994 281.354 159.631a48.002 48.002 0 0 1 0 48.738zM528 256c-44.157-74.933-123.677-127.27-216.162-135.007C302.042 131.078 296 144.83 296 160c0 30.928 25.072 56 56 56s56-25.072 56-56l-.001-.042c30.632 57.277 16.739 130.26-36.928 171.719l26.695 38.135C452.626 346.551 498.308 306.386 528 256z'/%3E%3C/svg%3E");
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%235c6f82' viewBox='0 0 576 512'%3E%3Cpath d='M272.702 359.139c-80.483-9.011-136.212-86.886-116.93-167.042l116.93 167.042zM288 392c-102.556 0-192.092-54.701-240-136 21.755-36.917 52.1-68.342 88.344-91.658l-27.541-39.343C67.001 152.234 31.921 188.741 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.004 376.006 168.14 440 288 440a332.89 332.89 0 0 0 39.648-2.367l-32.021-45.744A284.16 284.16 0 0 1 288 392zm281.354-111.631c-33.232 56.394-83.421 101.742-143.554 129.492l48.116 68.74c3.801 5.429 2.48 12.912-2.949 16.712L450.23 509.83c-5.429 3.801-12.912 2.48-16.712-2.949L102.084 33.399c-3.801-5.429-2.48-12.912 2.949-16.712L125.77 2.17c5.429-3.801 12.912-2.48 16.712 2.949l55.526 79.325C226.612 76.343 256.808 72 288 72c119.86 0 224.996 63.994 281.354 159.631a48.002 48.002 0 0 1 0 48.738zM528 256c-44.157-74.933-123.677-127.27-216.162-135.007C302.042 131.078 296 144.83 296 160c0 30.928 25.072 56 56 56s56-25.072 56-56l-.001-.042c30.632 57.277 16.739 130.26-36.928 171.719l26.695 38.135C452.626 346.551 498.308 306.386 528 256z'/%3E%3C/svg%3E");
}
.eye-off {
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#5c6f82' viewBox='0 0 576 512'%3E%3Cpath d='M569.354 231.631C512.97 135.949 407.81 72 288 72 168.14 72 63.004 135.994 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.031 376.051 168.19 440 288 440c119.86 0 224.996-63.994 281.354-159.631a47.997 47.997 0 0 0 0-48.738zM288 392c-102.556 0-192.091-54.701-240-136 44.157-74.933 123.677-127.27 216.162-135.007C273.958 131.078 280 144.83 280 160c0 30.928-25.072 56-56 56s-56-25.072-56-56l.001-.042C157.794 179.043 152 200.844 152 224c0 75.111 60.889 136 136 136s136-60.889 136-136c0-31.031-10.4-59.629-27.895-82.515C451.704 164.638 498.009 205.106 528 256c-47.908 81.299-137.444 136-240 136z'/%3E%3C/svg%3E");
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%235c6f82' viewBox='0 0 576 512'%3E%3Cpath d='M569.354 231.631C512.97 135.949 407.81 72 288 72 168.14 72 63.004 135.994 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.031 376.051 168.19 440 288 440c119.86 0 224.996-63.994 281.354-159.631a47.997 47.997 0 0 0 0-48.738zM288 392c-102.556 0-192.091-54.701-240-136 44.157-74.933 123.677-127.27 216.162-135.007C273.958 131.078 280 144.83 280 160c0 30.928-25.072 56-56 56s-56-25.072-56-56l.001-.042C157.794 179.043 152 200.844 152 224c0 75.111 60.889 136 136 136s136-60.889 136-136c0-31.031-10.4-59.629-27.895-82.515C451.704 164.638 498.009 205.106 528 256c-47.908 81.299-137.444 136-240 136z'/%3E%3C/svg%3E");
}

/* Password Strength Meter */
Expand Down

0 comments on commit 0ebaf2a

Please sign in to comment.