Skip to content
Permalink
Browse files

[IMP] website: improve UX of change logo/font size

in this commit, we have removed the 'V' box and when the user click outside the box, or tab, it validate the size entered

Task ID: 1952964
  • Loading branch information...
jpr-odoo committed Mar 20, 2019
1 parent 8b7f88e commit fdd92a11af6bcfd8f7e6472918b63e5f1a3a7bdb
@@ -18,8 +18,8 @@ var QuickEdit = Widget.extend({
template: 'website.theme_customize_active_input',
events: {
'keydown input': '_onInputKeydown',
'click .btn-primary': '_onSaveClick',
'click .btn-secondary': '_onResetClick',
'focusout': '_onFocusOut',
},

/**
@@ -29,6 +29,7 @@ var QuickEdit = Widget.extend({
this._super.apply(this, arguments);
this.value = value;
this.unit = unit;
this._onFocusOut = _.debounce(this._onFocusOut, 100);
},
/**
* @override
@@ -92,8 +93,10 @@ var QuickEdit = Widget.extend({
/**
* @private
*/
_onSaveClick: function () {
this._save();
_onFocusOut: function () {
if (!this.$el.has(document.activeElement).length) {
this._save();
}
},
/**
* @private
@@ -66,7 +66,6 @@
<input type="text" class="form-control" t-att-value="widget.value"/>
<div class="input-group-append">
<div t-if="widget.unit" class="input-group-text"><t t-esc="widget.unit"/></div>
<button type="button" class="btn btn-primary fa fa-check" title="Save"/>
<button type="button" class="btn btn-secondary fa fa-undo" title="Reset"/>
</div>
</div>

0 comments on commit fdd92a1

Please sign in to comment.
You can’t perform that action at this time.