Interface optimizations

moment js update
This commit is contained in:
RainLoop Team 2014-04-30 20:24:45 +04:00
parent be8c186f87
commit f36cb72b82
104 changed files with 5869 additions and 1180 deletions

View file

@ -6428,6 +6428,9 @@ select {
.nav-tabs > li > a {
color: #555;
}
.popover {
z-index: 2000;
}
html.no-rgba .modal {
border-width: 0px !important;
}
@ -7018,7 +7021,7 @@ html.ssm-state-desktop-large .b-compose.modal {
width: 1000px;
}
html.ssm-state-desktop-large .b-contacts-content.modal {
width: 1000px;
width: 800px;
}
html.ssm-state-desktop #rl-left {
width: 200px;
@ -7036,7 +7039,7 @@ html.ssm-state-desktop .b-compose.modal {
width: 1000px;
}
html.ssm-state-desktop .b-contacts-content.modal {
width: 1000px;
width: 800px;
}
html.ssm-state-tablet #rl-left,
html.ssm-state-mobile #rl-left {
@ -8406,6 +8409,14 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
color: #fff;
background-color: #333;
background-color: rgba(0, 0, 0, 0.8) !important;
/*
.button-new-message {
margin-left: 8px;
}
.button-delete {
margin-left: 8px;
}*/
}
.b-contacts-content.modal .b-header-toolbar .close {
color: #fff;
@ -8415,12 +8426,6 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
.b-contacts-content.modal .b-header-toolbar .btn {
margin-top: 4px;
}
.b-contacts-content.modal .b-header-toolbar .button-new-message {
margin-left: 8px;
}
.b-contacts-content.modal .b-header-toolbar .button-delete {
margin-left: 8px;
}
.b-contacts-content.modal .b-list-toopbar {
padding: 0;
height: 45px;

File diff suppressed because one or more lines are too long

View file

@ -1721,6 +1721,7 @@ Utils.createMomentDate = function (oObject)
Utils.createMomentShortDate = function (oObject)
{
return ko.computed(function () {
var
sResult = '',
oMomentNow = moment(),
@ -1744,7 +1745,6 @@ Utils.createMomentShortDate = function (oObject)
'TIME': oMoment.format('LT')
});
}
else if (oMomentNow.year() === oMoment.year())
{
sResult = oMoment.format('D MMM.');
@ -2693,6 +2693,44 @@ ko.bindingHandlers.tooltip2 = {
}
};
ko.bindingHandlers.tooltip3 = {
'init': function (oElement) {
var $oEl = $(oElement);
$oEl.tooltip({
'container': 'body',
'trigger': 'hover manual',
'title': function () {
return $oEl.data('tooltip3-data') || '';
}
});
Globals.dropdownVisibility.subscribe(function (bValue) {
if (bValue)
{
$oEl.tooltip('hide');
}
});
$document.click(function () {
$oEl.tooltip('hide');
});
},
'update': function (oElement, fValueAccessor) {
var sValue = ko.utils.unwrapObservable(fValueAccessor());
if ('' === sValue)
{
$(oElement).data('tooltip3-data', '').tooltip('hide');
}
else
{
$(oElement).data('tooltip3-data', sValue).tooltip('show');
}
}
};
ko.bindingHandlers.registrateBootstrapDropdown = {
'init': function (oElement) {
BootstrapDropdowns.push($(oElement));
@ -4880,6 +4918,25 @@ function PopupsDomainViewModel()
this.testingDone = ko.observable(false);
this.testingImapError = ko.observable(false);
this.testingSmtpError = ko.observable(false);
this.testingImapErrorDesc = ko.observable('');
this.testingSmtpErrorDesc = ko.observable('');
this.testingImapError.subscribe(function (bValue) {
if (!bValue)
{
this.testingImapErrorDesc('');
}
}, this);
this.testingSmtpError.subscribe(function (bValue) {
if (!bValue)
{
this.testingSmtpErrorDesc('');
}
}, this);
this.testingImapErrorDesc = ko.observable('');
this.testingSmtpErrorDesc = ko.observable('');
this.imapServerFocus = ko.observable(false);
this.smtpServerFocus = ko.observable(false);
@ -5034,8 +5091,18 @@ PopupsDomainViewModel.prototype.onTestConnectionResponse = function (sResult, oD
if (Enums.StorageResultType.Success === sResult && oData.Result)
{
this.testingDone(true);
this.testingImapError(false === oData.Result.Imap);
this.testingSmtpError(false === oData.Result.Smtp);
this.testingImapError(true !== oData.Result.Imap);
this.testingSmtpError(true !== oData.Result.Smtp);
if (this.testingImapError() && oData.Result.Imap)
{
this.testingImapErrorDesc(oData.Result.Imap);
}
if (this.testingSmtpError() && oData.Result.Smtp)
{
this.testingSmtpErrorDesc(oData.Result.Smtp);
}
}
else
{

File diff suppressed because one or more lines are too long

View file

@ -1725,6 +1725,7 @@ Utils.createMomentDate = function (oObject)
Utils.createMomentShortDate = function (oObject)
{
return ko.computed(function () {
var
sResult = '',
oMomentNow = moment(),
@ -1748,7 +1749,6 @@ Utils.createMomentShortDate = function (oObject)
'TIME': oMoment.format('LT')
});
}
else if (oMomentNow.year() === oMoment.year())
{
sResult = oMoment.format('D MMM.');
@ -2697,6 +2697,44 @@ ko.bindingHandlers.tooltip2 = {
}
};
ko.bindingHandlers.tooltip3 = {
'init': function (oElement) {
var $oEl = $(oElement);
$oEl.tooltip({
'container': 'body',
'trigger': 'hover manual',
'title': function () {
return $oEl.data('tooltip3-data') || '';
}
});
Globals.dropdownVisibility.subscribe(function (bValue) {
if (bValue)
{
$oEl.tooltip('hide');
}
});
$document.click(function () {
$oEl.tooltip('hide');
});
},
'update': function (oElement, fValueAccessor) {
var sValue = ko.utils.unwrapObservable(fValueAccessor());
if ('' === sValue)
{
$(oElement).data('tooltip3-data', '').tooltip('hide');
}
else
{
$(oElement).data('tooltip3-data', sValue).tooltip('show');
}
}
};
ko.bindingHandlers.registrateBootstrapDropdown = {
'init': function (oElement) {
BootstrapDropdowns.push($(oElement));
@ -4281,12 +4319,13 @@ Selector.prototype.init = function (oContentVisible, oContentScrollable, sKeySco
;
key('enter', sKeyScope, function () {
if (self.focusedItem())
if (self.focusedItem() && !self.focusedItem().selected())
{
self.actionClick(self.focusedItem());
return false;
}
return false;
return true;
});
key('ctrl+up, command+up, ctrl+down, command+down', sKeyScope, function () {
@ -8766,12 +8805,11 @@ PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
{
sSignature = sSignature.replace(/{{FROM}}/, sFrom);
}
else
{
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}[\n]?/gm, '');
}
sSignature = sSignature.replace(/{{FROM}}[\n]?/, '').replace(/{{IF:FROM}}[\n]?/, '').replace(/{{\/IF:FROM}}[\n]?/, '');
sSignature = sSignature.replace(/[\s]{1,2}{{FROM}}/, '{{FROM}}');
sSignature = sSignature.replace(/{{FROM}}/, '');
sSignature = sSignature.replace(/{{DATE}}/, moment().format('llll'));
if (!bHtml)
{
@ -9709,6 +9747,10 @@ function PopupsContactsViewModel()
return Enums.ContactPropertyType.Email === oProperty.type();
});
this.viewPropertiesWeb = this.viewProperties.filter(function(oProperty) {
return Enums.ContactPropertyType.Web === oProperty.type();
});
this.viewHasNonEmptyRequaredProperties = ko.computed(function() {
var
@ -9740,6 +9782,11 @@ function PopupsContactsViewModel()
return '' === Utils.trim(oProperty.value()) && !bF;
});
this.viewPropertiesWebEmptyAndOnFocused = this.viewPropertiesWeb.filter(function(oProperty) {
var bF = oProperty.focused();
return '' === Utils.trim(oProperty.value()) && !bF;
});
this.viewPropertiesEmailsEmptyAndOnFocused.subscribe(function(aList) {
fFastClearEmptyListHelper(aList);
});
@ -9748,6 +9795,10 @@ function PopupsContactsViewModel()
fFastClearEmptyListHelper(aList);
});
this.viewPropertiesWebEmptyAndOnFocused.subscribe(function(aList) {
fFastClearEmptyListHelper(aList);
});
this.viewSaving = ko.observable(false);
this.useCheckboxesInList = RL.data().useCheckboxesInList;
@ -9973,6 +10024,11 @@ PopupsContactsViewModel.prototype.addNewPhone = function ()
this.addNewProperty(Enums.ContactPropertyType.Phone, 'Mobile');
};
PopupsContactsViewModel.prototype.addNewWeb = function ()
{
this.addNewProperty(Enums.ContactPropertyType.Web);
};
PopupsContactsViewModel.prototype.exportVcf = function ()
{
RL.download(RL.link().exportContactsVcf());
@ -10144,8 +10200,8 @@ PopupsContactsViewModel.prototype.populateViewContact = function (oContact)
this.viewReadOnly(!!oContact.readOnly);
}
aList.unshift(new ContactPropertyModel(Enums.ContactPropertyType.LastName, '', sLastName, !oContact, 'CONTACTS/PLACEHOLDER_ENTER_LAST_NAME'));
aList.unshift(new ContactPropertyModel(Enums.ContactPropertyType.FirstName, '', sFirstName, false, 'CONTACTS/PLACEHOLDER_ENTER_FIRST_NAME'));
aList.unshift(new ContactPropertyModel(Enums.ContactPropertyType.LastName, '', sLastName, false, 'CONTACTS/PLACEHOLDER_ENTER_LAST_NAME'));
aList.unshift(new ContactPropertyModel(Enums.ContactPropertyType.FirstName, '', sFirstName, !oContact, 'CONTACTS/PLACEHOLDER_ENTER_FIRST_NAME'));
this.viewID(sId);
this.viewProperties([]);
@ -10415,7 +10471,7 @@ function PopupsAddAccountViewModel()
this.passwordError(false);
}, this);
this.allowCustomLogin = ko.observable(false);
this.allowCustomLogin = RL.data().allowCustomLogin;
this.submitRequest = ko.observable(false);
this.submitError = ko.observable('');
@ -10455,7 +10511,7 @@ function PopupsAddAccountViewModel()
this.submitError(Utils.getNotification(Enums.Notification.UnknownError));
}
}, this), this.email(), this.login(), this.password());
}, this), this.email(), this.allowCustomLogin() ? this.login() : '', this.password());
return true;
@ -10498,11 +10554,6 @@ PopupsAddAccountViewModel.prototype.onFocus = function ()
{
this.emailFocus(true);
};
PopupsAddAccountViewModel.prototype.onBuild = function ()
{
this.allowCustomLogin(!!RL.settingsGet('AllowCustomLogin'));
};
/**
* @constructor
@ -11507,7 +11558,7 @@ function LoginViewModel()
this.submitError(Utils.getNotification(Enums.Notification.UnknownError));
}
}, this), this.email(), this.login(), this.password(), !!this.signMe(),
}, this), this.email(), this.allowCustomLogin() ? this.login() : '', this.password(), !!this.signMe(),
this.bSendLanguage ? this.mainLanguage() : '',
this.additionalCode.visibility() ? this.additionalCode() : '',
this.additionalCode.visibility() ? !!this.additionalCodeSignMe() : false

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long