mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Inputosaurus small fixes
This commit is contained in:
parent
c28f82a3b9
commit
93c7e05994
10 changed files with 72 additions and 41 deletions
|
|
@ -14,20 +14,28 @@
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
padding: 2px 4px;
|
padding: 2px 15px 2px 5px;
|
||||||
margin: 2px 2px 2px;
|
margin: 2px 2px 2px;
|
||||||
color: #555;
|
color: #555;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #999;
|
color: #999;
|
||||||
float: right;
|
font-size: 12px;
|
||||||
font-size: 14px;
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
right: 2px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.inputosaurus-required {
|
||||||
|
padding-rigth: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
&.inputosaurus-selected {
|
&.inputosaurus-selected {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
@ -41,7 +49,7 @@
|
||||||
|
|
||||||
.inputosaurus-input {
|
.inputosaurus-input {
|
||||||
|
|
||||||
margin: 2px 10px 2px 0px;
|
margin: 1px 10px 1px 0px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
|
|
||||||
|
|
@ -153,8 +153,8 @@ function PopupsComposeViewModel()
|
||||||
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.to.subscribe(function (aValue) {
|
this.to.subscribe(function (sValue) {
|
||||||
if (this.emptyToError() && 0 < aValue.length)
|
if (this.emptyToError() && 0 < sValue.length)
|
||||||
{
|
{
|
||||||
this.emptyToError(false);
|
this.emptyToError(false);
|
||||||
}
|
}
|
||||||
|
|
@ -217,7 +217,7 @@ function PopupsComposeViewModel()
|
||||||
|
|
||||||
this.sendCommand = Utils.createCommand(this, function () {
|
this.sendCommand = Utils.createCommand(this, function () {
|
||||||
var
|
var
|
||||||
sTo = this.to(),
|
sTo = Utils.trim(this.to()),
|
||||||
sSentFolder = RL.data().sentFolder(),
|
sSentFolder = RL.data().sentFolder(),
|
||||||
aFlagsCache = []
|
aFlagsCache = []
|
||||||
;
|
;
|
||||||
|
|
@ -557,6 +557,7 @@ PopupsComposeViewModel.prototype.saveMessageResponse = function (sResult, oData)
|
||||||
|
|
||||||
PopupsComposeViewModel.prototype.onHide = function ()
|
PopupsComposeViewModel.prototype.onHide = function ()
|
||||||
{
|
{
|
||||||
|
this.reset();
|
||||||
kn.routeOn();
|
kn.routeOn();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5621,18 +5621,24 @@ html.no-rgba .modal {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
padding: 2px 4px;
|
padding: 2px 15px 2px 5px;
|
||||||
margin: 2px 2px 2px;
|
margin: 2px 2px 2px;
|
||||||
color: #555;
|
color: #555;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.inputosaurus-container li a {
|
.inputosaurus-container li a {
|
||||||
color: #999;
|
color: #999;
|
||||||
float: right;
|
font-size: 12px;
|
||||||
font-size: 14px;
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
right: 2px;
|
||||||
}
|
}
|
||||||
.inputosaurus-container li a:hover {
|
.inputosaurus-container li a:hover {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
.inputosaurus-container li.inputosaurus-required {
|
||||||
|
padding-rigth: 5px;
|
||||||
|
}
|
||||||
.inputosaurus-container li.inputosaurus-selected {
|
.inputosaurus-container li.inputosaurus-selected {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
@ -5642,7 +5648,7 @@ html.no-rgba .modal {
|
||||||
left: -5000px;
|
left: -5000px;
|
||||||
}
|
}
|
||||||
.inputosaurus-container .inputosaurus-input {
|
.inputosaurus-container .inputosaurus-input {
|
||||||
margin: 2px 10px 2px 0px;
|
margin: 1px 10px 1px 0px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
}
|
}
|
||||||
.inputosaurus-container .inputosaurus-input input {
|
.inputosaurus-container .inputosaurus-input input {
|
||||||
|
|
|
||||||
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
2
rainloop/v/0.0.0/static/css/app.min.css
vendored
File diff suppressed because one or more lines are too long
|
|
@ -3468,18 +3468,24 @@ html.no-rgba .modal {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
padding: 2px 4px;
|
padding: 2px 15px 2px 5px;
|
||||||
margin: 2px 2px 2px;
|
margin: 2px 2px 2px;
|
||||||
color: #555;
|
color: #555;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.inputosaurus-container li a {
|
.inputosaurus-container li a {
|
||||||
color: #999;
|
color: #999;
|
||||||
float: right;
|
font-size: 12px;
|
||||||
font-size: 14px;
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
right: 2px;
|
||||||
}
|
}
|
||||||
.inputosaurus-container li a:hover {
|
.inputosaurus-container li a:hover {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
.inputosaurus-container li.inputosaurus-required {
|
||||||
|
padding-rigth: 5px;
|
||||||
|
}
|
||||||
.inputosaurus-container li.inputosaurus-selected {
|
.inputosaurus-container li.inputosaurus-selected {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
@ -3489,7 +3495,7 @@ html.no-rgba .modal {
|
||||||
left: -5000px;
|
left: -5000px;
|
||||||
}
|
}
|
||||||
.inputosaurus-container .inputosaurus-input {
|
.inputosaurus-container .inputosaurus-input {
|
||||||
margin: 2px 10px 2px 0px;
|
margin: 1px 10px 1px 0px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
}
|
}
|
||||||
.inputosaurus-container .inputosaurus-input input {
|
.inputosaurus-container .inputosaurus-input input {
|
||||||
|
|
|
||||||
|
|
@ -7716,8 +7716,8 @@ function PopupsComposeViewModel()
|
||||||
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.to.subscribe(function (aValue) {
|
this.to.subscribe(function (sValue) {
|
||||||
if (this.emptyToError() && 0 < aValue.length)
|
if (this.emptyToError() && 0 < sValue.length)
|
||||||
{
|
{
|
||||||
this.emptyToError(false);
|
this.emptyToError(false);
|
||||||
}
|
}
|
||||||
|
|
@ -7780,7 +7780,7 @@ function PopupsComposeViewModel()
|
||||||
|
|
||||||
this.sendCommand = Utils.createCommand(this, function () {
|
this.sendCommand = Utils.createCommand(this, function () {
|
||||||
var
|
var
|
||||||
sTo = this.to(),
|
sTo = Utils.trim(this.to()),
|
||||||
sSentFolder = RL.data().sentFolder(),
|
sSentFolder = RL.data().sentFolder(),
|
||||||
aFlagsCache = []
|
aFlagsCache = []
|
||||||
;
|
;
|
||||||
|
|
@ -8120,6 +8120,7 @@ PopupsComposeViewModel.prototype.saveMessageResponse = function (sResult, oData)
|
||||||
|
|
||||||
PopupsComposeViewModel.prototype.onHide = function ()
|
PopupsComposeViewModel.prototype.onHide = function ()
|
||||||
{
|
{
|
||||||
|
this.reset();
|
||||||
kn.routeOn();
|
kn.routeOn();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
4
rainloop/v/0.0.0/static/js/app.min.js
vendored
4
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
37
vendors/inputosaurus/inputosaurus.js
vendored
37
vendors/inputosaurus/inputosaurus.js
vendored
|
|
@ -236,21 +236,15 @@
|
||||||
|
|
||||||
// the input dynamically resizes based on the length of its value
|
// the input dynamically resizes based on the length of its value
|
||||||
_resizeInput : function(ev) {
|
_resizeInput : function(ev) {
|
||||||
var
|
var widget = (ev && ev.data.widget) || this;
|
||||||
mixWidth = 50,
|
|
||||||
maxWidth = 400,
|
|
||||||
widget = (ev && ev.data.widget) || this,
|
|
||||||
// maxWidth = widget.elements.ul.width(),
|
|
||||||
txtWidth = 0
|
|
||||||
;
|
|
||||||
|
|
||||||
widget.elements.fakeSpan.text(widget.elements.input.val());
|
widget.elements.fakeSpan.text(widget.elements.input.val());
|
||||||
txtWidth = 20 + widget.elements.fakeSpan.width();
|
|
||||||
|
|
||||||
txtWidth = txtWidth < maxWidth ? txtWidth : maxWidth;
|
|
||||||
txtWidth = txtWidth < mixWidth ? mixWidth : txtWidth;
|
|
||||||
|
|
||||||
|
// window.setTimeout(function () {
|
||||||
|
var txtWidth = 25 + widget.elements.fakeSpan.width();
|
||||||
|
txtWidth = txtWidth > 50 ? txtWidth : 50;
|
||||||
|
txtWidth = txtWidth < 500 ? txtWidth : 500;
|
||||||
widget.elements.input.width(txtWidth);
|
widget.elements.input.width(txtWidth);
|
||||||
|
// }, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
// resets placeholder on representative input
|
// resets placeholder on representative input
|
||||||
|
|
@ -317,7 +311,9 @@
|
||||||
$li.after(widget.elements.inputCont);
|
$li.after(widget.elements.inputCont);
|
||||||
|
|
||||||
widget.elements.input.val(tagName);
|
widget.elements.input.val(tagName);
|
||||||
|
window.setTimeout(function () {
|
||||||
widget.elements.input.select();
|
widget.elements.input.select();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
widget._removeTag(ev);
|
widget._removeTag(ev);
|
||||||
widget._resizeInput(ev);
|
widget._resizeInput(ev);
|
||||||
|
|
@ -336,7 +332,7 @@
|
||||||
|
|
||||||
// 'e' - edit tag (removes tag and places value into visible input
|
// 'e' - edit tag (removes tag and places value into visible input
|
||||||
case 69:
|
case 69:
|
||||||
// case $.ui.keyCode.ENTER:
|
case $.ui.keyCode.ENTER:
|
||||||
widget._editTag(ev);
|
widget._editTag(ev);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -440,6 +436,13 @@
|
||||||
self._renderTags();
|
self._renderTags();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (valArr.length === 1 && valArr[0] === '' && self.elements.lastEdit !== '')
|
||||||
|
{
|
||||||
|
self.elements.lastEdit = '';
|
||||||
|
self._renderTags();
|
||||||
|
}
|
||||||
|
|
||||||
self._setValue(self._buildValue());
|
self._setValue(self._buildValue());
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -473,7 +476,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
_renderTags : function() {
|
_renderTags : function() {
|
||||||
var self = this ;
|
var self = this;
|
||||||
|
|
||||||
this.elements.ul.find('li:not(.inputosaurus-required)').remove();
|
this.elements.ul.find('li:not(.inputosaurus-required)').remove();
|
||||||
|
|
||||||
|
|
@ -500,7 +503,13 @@
|
||||||
widget._setValue(widget._buildValue());
|
widget._setValue(widget._buildValue());
|
||||||
|
|
||||||
$(ev.currentTarget).closest('li').remove();
|
$(ev.currentTarget).closest('li').remove();
|
||||||
|
window.setTimeout(function () {
|
||||||
widget.elements.input.focus();
|
widget.elements.input.focus();
|
||||||
|
}, 100);
|
||||||
|
},
|
||||||
|
|
||||||
|
focus : function () {
|
||||||
|
this.elements.input.focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
_focus : function(ev) {
|
_focus : function(ev) {
|
||||||
|
|
|
||||||
2
vendors/inputosaurus/inputosaurus.min.js
vendored
2
vendors/inputosaurus/inputosaurus.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue