From 7b7d7664e10cefed4a45950b9fbc64e65f4a6386 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 4 Oct 2019 11:18:07 +0200 Subject: [PATCH 1/4] disabled autoload on stowaway model #1747 --- modules/ticket/front/descriptor/addStowaway.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/front/descriptor/addStowaway.html b/modules/ticket/front/descriptor/addStowaway.html index 74554d2bed..3efaedc8df 100644 --- a/modules/ticket/front/descriptor/addStowaway.html +++ b/modules/ticket/front/descriptor/addStowaway.html @@ -12,7 +12,7 @@
Stowaways to add
- + Ticket id From b4c23b86a2a7d20be71ce144fa0a250ed4f9d5fd Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 4 Oct 2019 11:39:24 +0200 Subject: [PATCH 2/4] fixed summary button --- modules/ticket/front/summary/index.html | 6 +++++- modules/ticket/front/summary/style.scss | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index 383d02ec9e..d97c3125af 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -1,5 +1,9 @@ -
Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} ({{$ctrl.summary.client.id}}) - {{$ctrl.summary.nickname}} +
+ + Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} + ({{$ctrl.summary.client.id}}) - {{$ctrl.summary.nickname}} + Date: Fri, 4 Oct 2019 12:33:16 +0200 Subject: [PATCH 3/4] New: vnToggle, vnField, vnCheck & vnRadio refactor --- front/core/components/check/index.html | 2 +- front/core/components/check/index.js | 47 +--- front/core/components/check/style.scss | 45 +--- front/core/components/field/index.html | 36 +++ front/core/components/field/index.js | 178 ++++++++++++++ front/core/components/field/style.scss | 227 ++++++++++++++++++ front/core/components/index.js | 5 +- front/core/components/radio/index.js | 69 ++---- front/core/components/radio/index.spec.js | 47 +--- front/core/components/radio/style.scss | 41 +--- .../components/{radio => toggle}/index.html | 2 +- front/core/components/toggle/index.js | 62 +++++ front/core/components/toggle/style.scss | 50 ++++ front/core/components/treeview/style.scss | 2 +- front/salix/styles/variables.scss | 3 + package-lock.json | 127 +++++----- 16 files changed, 672 insertions(+), 271 deletions(-) create mode 100644 front/core/components/field/index.html create mode 100644 front/core/components/field/index.js create mode 100644 front/core/components/field/style.scss rename front/core/components/{radio => toggle}/index.html (78%) create mode 100644 front/core/components/toggle/index.js create mode 100644 front/core/components/toggle/style.scss diff --git a/front/core/components/check/index.html b/front/core/components/check/index.html index dd0a5d0126..8c81714104 100644 --- a/front/core/components/check/index.html +++ b/front/core/components/check/index.html @@ -1,4 +1,4 @@ -
+
diff --git a/front/core/components/check/index.js b/front/core/components/check/index.js index 471be638a8..35ff07e8ad 100644 --- a/front/core/components/check/index.js +++ b/front/core/components/check/index.js @@ -1,29 +1,16 @@ import ngModule from '../../module'; -import Component from '../../lib/component'; +import Toggle from '../toggle'; import './style.scss'; /** * Basic element for user input. You can use this to supply a way for the user * to toggle an option. * - * @property {String} label Label to display along the component - * @property {any} field The value with which the element is linked - * @property {Boolean} checked Whether the checkbox is checked - * @property {Boolean} disabled Put component in disabled mode * @property {Boolean} tripleState Switch between three states when clicked * @property {Boolean} indeterminate Sets the element into indeterminate state * @property {String} info Shows a text information tooltip to the user */ -export default class Controller extends Component { - constructor($element, $, $attrs) { - super($element, $); - - let element = this.element; - element.addEventListener('click', e => this.onClick(e)); - element.addEventListener('keydown', e => this.onKeydown(e)); - element.tabIndex = 0; - } - +export default class Check extends Toggle { set field(value) { this._field = value; this.element.classList.toggle('checked', Boolean(value)); @@ -34,14 +21,12 @@ export default class Controller extends Component { return this._field; } - set disabled(value) { - this.element.tabIndex = !value ? 0 : -1; - this.element.classList.toggle('disabled', Boolean(value)); - this._disabled = value; + set checked(value) { + this.field = Boolean(value); } - get disabled() { - return this._disabled; + get checked() { + return Boolean(this.field); } set indeterminate(value) { @@ -63,9 +48,7 @@ export default class Controller extends Component { } onClick(event) { - event.preventDefault(); - - if (this.disabled) return; + if (super.onClick(event)) return; if (this.tripleState) { if (this.field == null) @@ -77,28 +60,18 @@ export default class Controller extends Component { } else this.field = !this.field; - this.$.$applyAsync(); - this.element.dispatchEvent(new Event('change')); - this.emit('change', {value: this.field}); - } - - onKeydown(event) { - if (event.code == 'Space') - this.onClick(event); + this.changed(); } } -Controller.$inject = ['$element', '$scope', '$attrs']; - ngModule.component('vnCheck', { template: require('./index.html'), - controller: Controller, - + controller: Check, bindings: { label: '@?', field: '=?', - checked: ' .check { - position: relative; - box-sizing: border-box; - display: inline-block; - vertical-align: middle; + & > .btn { border-radius: 2px; - width: 20px; - height: 20px; transition: background 250ms; - border: 2px solid #666; - margin: 6px 0; - margin-right: .4em; & > .mark { box-sizing: border-box; @@ -29,13 +12,10 @@ vn-check { border-width: 0; } } - &.checked > .check { - background-color: $color-main; + &.checked > .btn { border-color: $color-main; + background-color: $color-main; - & > .focus-mark { - background-color: rgba($color-main, .15); - } & > .mark { top: 0; left: 4px; @@ -47,7 +27,7 @@ vn-check { border-left: 0; } } - &.indeterminate > .check > .mark { + &.indeterminate > .btn > .mark { top: 50%; left: 50%; transform: translate(-50%, -50%); @@ -55,23 +35,6 @@ vn-check { height: 2px; border-bottom: 2px solid #666; } - & > .check > .focus-mark { - position: absolute; - top: 50%; - left: 50%; - height: 38px; - width: 38px; - margin-top: -19px; - margin-left: -19px; - border-radius: 50%; - transform: scale3d(0, 0, 0); - transition: background 250ms; - transition: transform 250ms; - background-color: rgba(0, 0, 0, .1); - } - &:focus:not(.disabled) > .check > .focus-mark { - transform: scale3d(1, 1, 1); - } & > vn-icon { margin-left: 5px; color: $color-font-secondary; diff --git a/front/core/components/field/index.html b/front/core/components/field/index.html new file mode 100644 index 0000000000..a2401ee4f8 --- /dev/null +++ b/front/core/components/field/index.html @@ -0,0 +1,36 @@ +
+
+
+
+
+
+ +
+
+ +
+
+ + + + +
+
+
+
+
+
+
diff --git a/front/core/components/field/index.js b/front/core/components/field/index.js new file mode 100644 index 0000000000..5d78f0d66c --- /dev/null +++ b/front/core/components/field/index.js @@ -0,0 +1,178 @@ +import ngModule from '../../module'; +import Component from '../../lib/component'; +import './style.scss'; + +export default class Field extends Component { + constructor($element, $scope) { + super($element, $scope); + this._value = undefined; + this.prefix = null; + this.suffix = null; + + this.input = this.element.querySelector('input'); + this.classList = this.element.classList; + this.classList.add('vn-field'); + + this.element.addEventListener('focusin', + () => this.onFocus(true)); + this.element.addEventListener('focusout', + () => this.onFocus(false)); + this.element.addEventListener('click', + () => this.onClick()); + } + + $onInit() { + if (this.info) this.classList.add('has-icons'); + } + + set field(value) { + this._field = value; + this.classList.toggle('not-empty', value != null && value !== ''); + } + + get field() { + return this._field; + } + + set type(value) { + this.input.type = value; + } + + get type() { + return this.input.type; + } + + set disabled(value) { + this._disabled = boolTag(value); + this.input.disabled = this._disabled; + this.classList.toggle('disabled', this._disabled); + } + + get disabled() { + return this._disabled; + } + + set readonly(value) { + this._readonly = boolTag(value); + this.input.readOnly = this._readonly; + this.classList.toggle('readonly', this._readonly); + } + + get readonly() { + return this._readonly; + } + + set required(value) { + this._required = boolTag(value); + let required = this.element.querySelector('.required'); + display(required, this._required); + } + + get required() { + return this._required; + } + + set prefix(value) { + this._prefix = value; + this.refreshFix('.prefix', value); + } + + get prefix() { + return this._prefix; + } + + set suffix(value) { + this._suffix = value; + this.refreshFix('.suffix', value); + } + + get suffix() { + return this._suffix; + } + + set hint(value) { + this._hint = value; + this.refreshHint(); + } + + get hint() { + return this._hint; + } + + set error(value) { + this._error = value; + this.refreshHint(); + this.classList.toggle('invalid', Boolean(value)); + } + + get error() { + return this._error; + } + + refreshHint() { + let hint = this.error || this.hint || ''; + let hintEl = this.element.querySelector('.hint'); + hintEl.innerText = hint; + hintEl.classList.toggle('filled', Boolean(hint)); + } + + refreshFix(selector, text) { + let fix = this.element.querySelector(selector); + display(fix, text); + fix.innerText = text || ''; + } + + onClick() { + if (this.input !== document.activeElement) + this.input.focus(); + } + + onFocus(hasFocus) { + this.classList.toggle('focused', hasFocus); + } + + onClear() { + this.input.value = ''; + this.input.dispatchEvent(new Event('change')); + } + + focus() { + this.input.focus(); + } + + select() { + this.input.select(); + } +} +Field.$inject = ['$element', '$scope']; + +ngModule.component('vnField', { + template: require('./index.html'), + transclude: { + prepend: '?prepend', + append: '?append' + }, + controller: Field, + bindings: { + field: '=?', + label: '@?', + name: '@?', + type: '@?', + info: '@?', + disabled: '@?', + readonly: '@?', + required: '@?', + prefix: '@?', + suffix: '@?', + hint: '@?', + error: ' .container { + display: flex; + align-items: stretch; + position: relative; + height: 56px; + + & > .infix { + position: relative; + display: flex; + flex: auto; + width: 100%; + min-width: 0; + + & > label { + position: absolute; + left: 0; + top: 18px; + line-height: 20px; + pointer-events: none; + color: $color-font-secondary; + transition-property: top, color, font-size; + transition-duration: 400ms; + transition-timing-function: cubic-bezier(.4, 0, .2, 1); + + & > .required { + display: none; + color: $color-alert + } + } + & > .fix { + padding-top: 24px; + line-height: 24px; + font-size: $input-font-size; + opacity: 0; + transition: opacity 200ms ease-in-out; + + &.prefix { + padding-right: 5px; + } + &.suffix { + padding-left: 5px; + } + } + & > .control { + height: 100%; + flex: auto; + } + & > .control > input { + padding-top: 24px; + padding-bottom: 8px; + height: inherit; + outline: none; + border: none; + font-family: Arial, sans-serif; + display: block; + font-size: $input-font-size; + width: 100%; + background: 0; + color: inherit; + box-sizing: border-box; + + &[type=time], + &[type=date] { + clip-path: inset(0 20px 0 0); + } + &[type=number] { + -moz-appearance: textfield; + + &::-webkit-outer-spin-button, + &::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + } + &:invalid { + box-shadow: none; + } + } + } + & > .prepend, + & > .append, + & > .icons { + display: flex; + align-items: center; + color: $color-font-secondary; + } + & > .prepend > prepend, + & > .append > append, + & > .icons { + display: flex; + + & > vn-icon { + font-size: 24px; + } + } + & > .prepend > prepend { + padding-right: 12px; + } + & > .append > append { + padding-left: 12px; + } + & > .icons > vn-icon[icon=clear] { + display: none; + cursor: pointer; + } + & > .underline { + position: absolute; + bottom: 0; + content: ' '; + pointer-events: none; + width: 100%; + + &.blur { + border-bottom: 1px solid $color-input-underline; + transition: border-color 200ms ease-in-out; + } + &.focus { + height: 2px; + background-color: $color-main; + left: 50%; + width: 0; + transition-property: width, left, background-color; + transition-duration: 300ms; + transition-timing-function: cubic-bezier(.4, 0, .2, 1); + } + } + } + &.not-empty > .container, + &.focused > .container { + & > .infix { + & > .fix { + opacity: 1; + } + & > label { + top: 5px; + color: $color-main; + padding: 0; + font-size: 12px; + } + } + } + &.has-icons, + &.not-empty:hover, + &.not-empty.focused { + & > .container > .append > append { + padding-left: 0; + } + & > .container > .icons { + padding-left: 12px; + } + } + &:not(.disabled):not(.readonly) { + &.focused > .container > .underline.focus { + left: 0; + width: 100%; + } + & > .container:hover > .underline.blur { + border-color: $color-input-underline-hover; + } + &.not-empty:hover, + &.not-empty.focused { + & > .container > .icons > vn-icon[icon=clear] { + display: initial; + } + } + } + &:not(.not-empty):not(.focused) > .container > .infix > .control > input { + &[type=time], + &[type=date] { + opacity: 0; + } + } + &.readonly > .container { + & > .infix > .control > input { + caret-color: transparent; + } + & > .underline.blur { + border-bottom-style: dashed; + } + } + & > .hint { + z-index: -1; + padding-top: 8px; + height: 20px; + color: rgba(0, 0, 0, .4); + font-size: 12px; + transform: translateY(-28px); + transition-property: opacity, transform, color; + transition-duration: 200ms; + transition-timing-function: ease-in-out; + opacity: 0; + + &.filled { + z-index: 0; + opacity: 1; + transform: translateY(0); + } + } + &.invalid { + & > .container { + & > .infix > label { + color: $color-alert; + } + & > .underline.focus { + background-color: $color-alert; + } + & > .underline.blur { + border-bottom-color: $color-alert; + opacity: 1; + } + } + & > .hint { + color: $color-alert; + } + } +} +vn-table { + .vn-field { + margin: 0; + } +} diff --git a/front/core/components/index.js b/front/core/components/index.js index ff063ad24b..1cfb18dcae 100644 --- a/front/core/components/index.js +++ b/front/core/components/index.js @@ -29,18 +29,19 @@ import './label-value/label-value'; import './pagination/pagination'; import './searchbar/searchbar'; import './scroll-up/scroll-up'; -import './table'; -import './td-editable'; import './input-range'; import './calendar'; import './check'; import './chip'; import './color-legend'; import './data-viewer'; +import './field'; import './input-number'; import './input-time'; import './input-file'; import './radio'; +import './table'; +import './td-editable'; import './th'; import './treeview'; import './treeview/child'; diff --git a/front/core/components/radio/index.js b/front/core/components/radio/index.js index a8475c2568..e965196c8b 100644 --- a/front/core/components/radio/index.js +++ b/front/core/components/radio/index.js @@ -1,29 +1,14 @@ import ngModule from '../../module'; -import Component from '../../lib/component'; +import Toggle from '../toggle'; import './style.scss'; /** * Basic element for user input. You can use this to supply a way for the user * to pick an option from multiple choices. * - * @property {String} label Label to display along the component - * @property {any} field The value with which the element is linked - * @property {Boolean} checked Whether the radio is checked * @property {String} val The actual value of the option - * @property {Boolean} disabled Put component in disabled mode */ -export default class Controller extends Component { - constructor($element, $, $attrs) { - super($element, $); - this.hasInfo = Boolean($attrs.info); - this.info = $attrs.info || null; - - let element = this.element; - element.addEventListener('click', e => this.onClick(e)); - element.addEventListener('keydown', e => this.onKeydown(e)); - element.tabIndex = 0; - } - +export default class Radio extends Toggle { set field(value) { this._field = value; this.element.classList.toggle('checked', @@ -34,6 +19,14 @@ export default class Controller extends Component { return this._field; } + set checked(value) { + this.field = value ? this.val : null; + } + + get checked() { + return this.field == this.val; + } + set val(value) { this._val = value; this.field = this.field; @@ -43,51 +36,21 @@ export default class Controller extends Component { return this._val; } - set checked(value) { - this.field = value ? this.val : null; - this.$.$applyAsync(); - } - - get checked() { - return this.field == this.val; - } - - set disabled(value) { - this.element.tabIndex = !value ? 0 : -1; - this.element.classList.toggle('disabled', Boolean(value)); - this._disabled = value; - } - - get disabled() { - return this._disabled; - } - onClick(event) { - if (this.disabled) return; - event.preventDefault(); - + if (super.onClick(event)) return; this.field = this.val; - this.$.$applyAsync(); - this.element.dispatchEvent(new Event('change')); - } - - onKeydown(event) { - if (event.code == 'Space') - this.onClick(event); + this.changed(); } } -Controller.$inject = ['$element', '$scope', '$attrs']; - ngModule.component('vnRadio', { - template: require('./index.html'), - controller: Controller, - + template: require('../toggle/index.html'), + controller: Radio, bindings: { label: '@?', field: '=?', + disabled: ' { +describe('Component vnRadio', () => { let $element; let $ctrl; let element; @@ -8,8 +8,8 @@ describe('Component vnCheck', () => { })); beforeEach(inject(($compile, $rootScope) => { - $element = $compile(` { }); describe('field() setter', () => { - it(`should set model value`, () => { - $ctrl.field = true; - - expect($ctrl.field).toEqual(true); - }); - - it(`should uncheck value and change to true when clicked`, () => { - $ctrl.field = false; + it(`should change field value when clicked`, () => { element.click(); - expect($ctrl.field).toEqual(true); - }); - - it(`should check value and change to false when clicked`, () => { - $ctrl.field = true; - element.click(); - - expect($ctrl.field).toEqual(false); - }); - - it(`should uncheck value and change to null when clicked`, () => { - $ctrl.field = false; - $ctrl.tripleState = true; - element.click(); - - expect($ctrl.field).toEqual(null); - }); - - it(`should set value to null and change to true when clicked`, () => { - $ctrl.field = null; - $ctrl.tripleState = true; - element.click(); - - expect($ctrl.field).toEqual(true); - }); - - it(`should cast value to boolean when clicked`, () => { - $ctrl.field = 0; - element.click(); - - expect($ctrl.field).toEqual(true); + expect($ctrl.field).toEqual('myVal'); }); }); }); diff --git a/front/core/components/radio/style.scss b/front/core/components/radio/style.scss index a459cb96f8..dd1555b7f5 100644 --- a/front/core/components/radio/style.scss +++ b/front/core/components/radio/style.scss @@ -1,31 +1,14 @@ @import "variables"; vn-radio { - position: relative; - cursor: pointer; - display: inline-block; - outline: none; - - &.disabled { - cursor: inherit; - } - & > .radio { - position: relative; - box-sizing: border-box; - display: inline-block; - vertical-align: middle; + & > .btn { border-radius: 50%; - width: 20px; - height: 20px; - border: 2px solid #666; - margin: 6px 0; - margin-right: .4em; & > .mark { transition: background 250ms; } } - &.checked > .radio { + &.checked > .btn { border-color: $color-main; & > .mark { @@ -38,25 +21,5 @@ vn-radio { height: 10px; background-color: $color-main; } - & > .focus-mark { - background-color: rgba($color-main, .15); - } - } - & > .radio > .focus-mark { - position: absolute; - top: 50%; - left: 50%; - height: 38px; - width: 38px; - margin-top: -19px; - margin-left: -19px; - border-radius: 50%; - transform: scale3d(0, 0, 0); - transition: background 250ms; - transition: transform 250ms; - background-color: rgba(0, 0, 0, .1); - } - &:focus:not(.disabled) > .radio > .focus-mark { - transform: scale3d(1, 1, 1); } } diff --git a/front/core/components/radio/index.html b/front/core/components/toggle/index.html similarity index 78% rename from front/core/components/radio/index.html rename to front/core/components/toggle/index.html index 8a8e12b8fd..3ec11242eb 100644 --- a/front/core/components/radio/index.html +++ b/front/core/components/toggle/index.html @@ -1,4 +1,4 @@ -
+
diff --git a/front/core/components/toggle/index.js b/front/core/components/toggle/index.js new file mode 100644 index 0000000000..7642c8973d --- /dev/null +++ b/front/core/components/toggle/index.js @@ -0,0 +1,62 @@ +import ngModule from '../../module'; +import Component from '../../lib/component'; +import './style.scss'; + +/** + * Base component with common logic and styles for checkbox and radio button. + * + * @property {String} label Label to display along the component + * @property {any} field The value with which the element is linked + * @property {Boolean} checked Whether the checkbox is checked + * @property {Boolean} disabled Put component in disabled mode + */ +export default class Toggle extends Component { + constructor($element, $) { + super($element, $); + + let element = this.element; + element.tabIndex = 0; + element.addEventListener('click', e => this.onClick(e)); + element.addEventListener('keydown', e => this.onKeydown(e)); + element.classList.add('vn-toggle'); + } + + set disabled(value) { + this.element.tabIndex = !value ? 0 : -1; + this.element.classList.toggle('disabled', Boolean(value)); + this._disabled = value; + } + + get disabled() { + return this._disabled; + } + + onKeydown(event) { + if (event.code == 'Space') + this.onClick(event); + } + + onClick(event) { + if (this.disabled || event.defaultPrevented) + return true; + + event.preventDefault(); + } + + changed() { + this.$.$applyAsync(); + this.element.dispatchEvent(new Event('change')); + this.emit('change', {value: this.field}); + } +} +Toggle.$inject = ['$element', '$scope']; + +ngModule.component('vnToggle', { + controller: Toggle, + bindings: { + label: '@?', + field: '=?', + disabled: ' span { + font-size: $input-font-size; + } + & > .btn { + position: relative; + box-sizing: border-box; + display: inline-block; + vertical-align: middle; + width: 20px; + height: 20px; + margin: 6px 0; + margin-right: .4em; + border: 2px solid #666; + } + &.checked > .btn { + border-color: $color-main; + + & > .focus-mark { + background-color: rgba($color-main, .15); + } + } + & > .btn > .focus-mark { + position: absolute; + top: 50%; + left: 50%; + height: 38px; + width: 38px; + margin-top: -19px; + margin-left: -19px; + border-radius: 50%; + transform: scale3d(0, 0, 0); + transition: background 250ms; + transition: transform 250ms; + background-color: rgba(0, 0, 0, .1); + } + &:focus:not(.disabled) > .btn > .focus-mark { + transform: scale3d(1, 1, 1); + } +} diff --git a/front/core/components/treeview/style.scss b/front/core/components/treeview/style.scss index 6370d02741..0ea1074a96 100644 --- a/front/core/components/treeview/style.scss +++ b/front/core/components/treeview/style.scss @@ -28,7 +28,7 @@ vn-treeview { & > vn-check:not(.indeterminate) { color: $color-main; - & > .check { + & > .btn { border-color: $color-main; } } diff --git a/front/salix/styles/variables.scss b/front/salix/styles/variables.scss index 932596ef9a..ba77cd2741 100644 --- a/front/salix/styles/variables.scss +++ b/front/salix/styles/variables.scss @@ -2,6 +2,7 @@ $menu-width: 16em; $topbar-height: 4em; $mobile-width: 800px; +$input-font-size: 14px; // Width @@ -49,6 +50,7 @@ $color-alert: #f42121; $color-spacer: rgba(0, 0, 0, .3); $color-spacer-light: rgba(0, 0, 0, .12); $color-input-underline: rgba(0, 0, 0, .12); +$color-input-underline-hover: rgba(0, 0, 0, .6); $color-shadow: rgba(0, 0, 0, .2); $color-hightlight: rgba(0, 0, 0, .05); $color-hover-cd: rgba(0, 0, 0, .1); @@ -86,6 +88,7 @@ $color-secondary: #ccc; $color-success: #a3d131; $color-notice: #32b1ce; $color-alert: #f42121; + $color-spacer: rgba(255, 255, 255, .3); $color-spacer-light: rgba(255, 255, 255, .12); $color-input-underline: rgba(255, 255, 255, .12); diff --git a/package-lock.json b/package-lock.json index 535c5229df..7b4445337b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2166,7 +2166,7 @@ }, "util": { "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -2960,7 +2960,7 @@ "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { "cache-base": "^1.0.1", @@ -3293,7 +3293,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { @@ -3352,7 +3352,7 @@ }, "buffer": { "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "requires": { "base64-js": "^1.0.2", @@ -3490,7 +3490,7 @@ "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { "collection-visit": "^1.0.0", @@ -3528,7 +3528,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -3667,7 +3667,7 @@ "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -4769,7 +4769,7 @@ "dot-prop": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "requires": { "is-obj": "^1.0.0" } @@ -4801,7 +4801,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -4924,7 +4924,7 @@ "dependencies": { "fs-extra": { "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { @@ -4937,7 +4937,7 @@ }, "jsonfile": { "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "dev": true, "requires": { @@ -5840,7 +5840,7 @@ }, "file-loader": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "resolved": "http://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "dev": true, "requires": { @@ -6204,7 +6204,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -6225,12 +6226,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6245,17 +6248,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -6372,7 +6378,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6384,6 +6391,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6398,6 +6406,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6405,12 +6414,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -6429,6 +6440,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6509,7 +6521,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6521,6 +6534,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6606,7 +6620,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6642,6 +6657,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6661,6 +6677,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6704,12 +6721,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -6992,7 +7011,7 @@ "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { "global-prefix": "^1.0.1", @@ -7029,7 +7048,7 @@ }, "globby": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "resolved": "http://registry.npmjs.org/globby/-/globby-5.0.0.tgz", "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { @@ -7133,7 +7152,7 @@ }, "got": { "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { @@ -7466,7 +7485,7 @@ }, "kind-of": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", "dev": true }, @@ -7686,7 +7705,7 @@ "dependencies": { "es6-promise": { "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=", "dev": true }, @@ -8720,7 +8739,7 @@ }, "is-obj": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, "is-path-cwd": { @@ -8750,7 +8769,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -9101,7 +9120,7 @@ }, "jasmine-core": { "version": "2.99.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", + "resolved": "http://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=", "dev": true }, @@ -10224,7 +10243,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -11013,7 +11032,7 @@ }, "media-typer": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "mem": { @@ -11038,7 +11057,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -11161,7 +11180,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "minstache": { @@ -11273,7 +11292,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" @@ -11281,7 +11300,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } @@ -11482,7 +11501,7 @@ }, "multipipe": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "resolved": "http://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", "dev": true, "requires": { @@ -11688,7 +11707,7 @@ }, "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, @@ -12330,7 +12349,7 @@ "dependencies": { "minimist": { "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true }, @@ -12392,7 +12411,7 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, @@ -12408,7 +12427,7 @@ }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -12931,7 +12950,7 @@ }, "pretty-bytes": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", + "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", "dev": true, "requires": { @@ -13022,7 +13041,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -13040,7 +13059,7 @@ }, "through2": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz", "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", "dev": true, "requires": { @@ -13859,7 +13878,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -13984,7 +14003,7 @@ "dependencies": { "source-map": { "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "dev": true, "requires": { @@ -14404,7 +14423,7 @@ "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { "define-property": "^1.0.0", @@ -14455,7 +14474,7 @@ "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { "kind-of": "^3.2.0" @@ -14736,7 +14755,7 @@ "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { "extend-shallow": "^3.0.0" @@ -14745,7 +14764,7 @@ "split2": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha1-GGsldbz4PoW30YRldWI47k7kJJM=", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", "dev": true, "requires": { "through2": "^2.0.2" @@ -15671,7 +15690,7 @@ }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { @@ -15866,7 +15885,7 @@ "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "dev": true, "requires": { "nopt": "~1.0.10" @@ -15964,7 +15983,7 @@ }, "tty-browserify": { "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "resolved": "http://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "dev": true }, From 9b385f4b90f321ba7025d2fa7aea6941a59d6265 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 4 Oct 2019 13:12:53 +0200 Subject: [PATCH 4/4] #1749 Fixed --- front/salix/styles/variables.scss | 2 +- modules/worker/front/time-control/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/front/salix/styles/variables.scss b/front/salix/styles/variables.scss index ba77cd2741..5b96973f23 100644 --- a/front/salix/styles/variables.scss +++ b/front/salix/styles/variables.scss @@ -2,7 +2,7 @@ $menu-width: 16em; $topbar-height: 4em; $mobile-width: 800px; -$input-font-size: 14px; +$input-font-size: 16px; // Width diff --git a/modules/worker/front/time-control/index.js b/modules/worker/front/time-control/index.js index 551d5531da..a13a1d3845 100644 --- a/modules/worker/front/time-control/index.js +++ b/modules/worker/front/time-control/index.js @@ -218,9 +218,9 @@ class Controller { const timed = new Date(weekday.dated); const now = new Date(); - now.setHours(now.getHours(), now.getMinutes(), 0, 0); now.setMonth(timed.getMonth()); now.setDate(timed.getDate()); + now.setHours(0, 0, 0, 0); this.newTime = now; this.selectedWeekday = weekday;