mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Small improvements
This commit is contained in:
parent
5123841540
commit
c99a46a118
29 changed files with 459 additions and 26 deletions
|
|
@ -283,6 +283,11 @@
|
|||
|
||||
AbstractApp.prototype.bootstart = function ()
|
||||
{
|
||||
if (window.console && Utils.isFunc(window.console.log))
|
||||
{
|
||||
window.console.log('Psss, hacker! There is nothing interesting :)');
|
||||
}
|
||||
|
||||
Events.pub('rl.bootstart');
|
||||
|
||||
var
|
||||
|
|
@ -293,10 +298,11 @@
|
|||
ko.components.register('SaveTrigger', require('Component/SaveTrigger'));
|
||||
ko.components.register('Input', require('Component/Input'));
|
||||
ko.components.register('Select', require('Component/Select'));
|
||||
ko.components.register('TextArea', require('Component/TextArea'));
|
||||
ko.components.register('Radio', require('Component/Radio'));
|
||||
ko.components.register('TextArea', require('Component/TextArea'));
|
||||
|
||||
ko.components.register('x-script', require('Component/Script'));
|
||||
ko.components.register('svg-icon', require('Component/SvgIcon'));
|
||||
|
||||
if (/**false && /**/Settings.settingsGet('MaterialDesign') && Globals.bAnimationSupported)
|
||||
{
|
||||
|
|
|
|||
35
dev/Component/SvgIcon.js
Normal file
35
dev/Component/SvgIcon.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
$ = require('$'),
|
||||
sUrl = null,
|
||||
getUtl = function () {
|
||||
if (!sUrl)
|
||||
{
|
||||
sUrl = 'rainloop/v/' + ($('#rlAppVersion').attr('content') || '0.0.0') + '/static/css/svg/icons.svg';
|
||||
}
|
||||
|
||||
return sUrl;
|
||||
}
|
||||
;
|
||||
|
||||
module.exports = {
|
||||
viewModel: {
|
||||
createViewModel: function(oParams, oComponentInfo) {
|
||||
var icon = oParams.icon || 'null';
|
||||
if (oComponentInfo.element && oComponentInfo.element)
|
||||
{
|
||||
$(oComponentInfo.element).replaceWith(
|
||||
'<svg class="svg-icon svg-icon-' + icon + '"><use xlink:href="' + getUtl() + '#svg-icon-' + icon + '"></use></svg>');
|
||||
}
|
||||
}
|
||||
},
|
||||
'template': '<b></b>'
|
||||
};
|
||||
|
||||
}());
|
||||
|
||||
|
||||
|
|
@ -43,6 +43,9 @@
|
|||
this.actionValueSecond = ko.observable('');
|
||||
this.actionValueThird = ko.observable('');
|
||||
|
||||
this.actionValueFourth = ko.observable('');
|
||||
this.actionValueFourth.error = ko.observable(false);
|
||||
|
||||
this.actionMarkAsRead = ko.observable(false);
|
||||
|
||||
this.actionKeep = ko.observable(true);
|
||||
|
|
@ -55,6 +58,8 @@
|
|||
this.actionValue.error(false);
|
||||
this.actionValueSecond('');
|
||||
this.actionValueThird('');
|
||||
this.actionValueFourth('');
|
||||
this.actionValueFourth.error(false);
|
||||
}, this);
|
||||
|
||||
var fGetRealFolderName = function (sFolderFullNameRaw) {
|
||||
|
|
@ -189,6 +194,14 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
if (Enums.FiltersAction.Vacation === this.actionType() &&
|
||||
('' === this.actionValueFourth() || -1 === this.actionValueFourth().indexOf('@'))
|
||||
)
|
||||
{
|
||||
this.actionValueFourth.error(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.name.error(false);
|
||||
this.actionValue.error(false);
|
||||
|
||||
|
|
@ -209,6 +222,7 @@
|
|||
'ActionValue': this.actionValue(),
|
||||
'ActionValueSecond': this.actionValueSecond(),
|
||||
'ActionValueThird': this.actionValueThird(),
|
||||
'ActionValueFourth': this.actionValueFourth(),
|
||||
'ActionType': this.actionType(),
|
||||
|
||||
'Stop': this.actionNoStop() ? '0' : '1',
|
||||
|
|
@ -228,6 +242,11 @@
|
|||
Utils.delegateRunOnDestroy(oConditionToDelete);
|
||||
};
|
||||
|
||||
FilterModel.prototype.setRecipients = function ()
|
||||
{
|
||||
this.actionValueFourth(require('Stores/User/Account').accountsEmails().join(', '));
|
||||
};
|
||||
|
||||
FilterModel.prototype.parse = function (oItem)
|
||||
{
|
||||
var bResult = false;
|
||||
|
|
@ -255,6 +274,7 @@
|
|||
this.actionValue(Utils.pString(oItem['ActionValue']));
|
||||
this.actionValueSecond(Utils.pString(oItem['ActionValueSecond']));
|
||||
this.actionValueThird(Utils.pString(oItem['ActionValueThird']));
|
||||
this.actionValueFourth(Utils.pString(oItem['ActionValueFourth']));
|
||||
|
||||
this.actionNoStop(!oItem['Stop']);
|
||||
this.actionKeep(!!oItem['Keep']);
|
||||
|
|
@ -288,6 +308,7 @@
|
|||
|
||||
oClone.actionValueSecond(this.actionValueSecond());
|
||||
oClone.actionValueThird(this.actionValueThird());
|
||||
oClone.actionValueFourth(this.actionValueFourth());
|
||||
|
||||
oClone.actionKeep(this.actionKeep());
|
||||
oClone.actionNoStop(this.actionNoStop());
|
||||
|
|
|
|||
|
|
@ -10,5 +10,10 @@
|
|||
.button-delete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.setRecipientsBtn {
|
||||
margin-top: -2px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,13 @@
|
|||
}
|
||||
|
||||
.open-pgp-key-img {
|
||||
font-size: 12px;
|
||||
margin-right: 5px;
|
||||
|
||||
margin-right: 10px;
|
||||
|
||||
.svg-icon {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.open-pgp-key-id, .open-pgp-key-user {
|
||||
|
|
@ -49,7 +54,11 @@
|
|||
|
||||
.delete-open-pgp-key, .view-open-pgp-key {
|
||||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
opacity: 0.7;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -67,6 +67,10 @@ select {
|
|||
width: 223px;
|
||||
}
|
||||
|
||||
.btn .svg-icon {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.btn-small.btn-small-small {
|
||||
padding: 3px 9px;
|
||||
font-size: 11px;
|
||||
|
|
|
|||
|
|
@ -69,3 +69,22 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
svg-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.svg-icon {
|
||||
border: 0;
|
||||
outline: 0;
|
||||
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
display: inline-block;
|
||||
fill: #333;
|
||||
|
||||
&.svg-icon-archive {
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
var self = this;
|
||||
|
||||
this.optionsCaption = Translator.i18n('@i18n/Add a public key');
|
||||
this.optionsCaption = Translator.i18n('PGP_NOTIFICATIONS/ADD_A_PUBLICK_KEY');
|
||||
|
||||
this.notification = ko.observable('');
|
||||
|
||||
|
|
@ -208,6 +208,10 @@
|
|||
|
||||
}, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.submitRequest(false);
|
||||
}
|
||||
|
||||
return bResult;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue