mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 05:59:21 +03:00
Interface optimizations
moment js update
This commit is contained in:
parent
be8c186f87
commit
f36cb72b82
104 changed files with 5869 additions and 1180 deletions
|
|
@ -70,6 +70,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));
|
||||
|
|
|
|||
|
|
@ -319,12 +319,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 () {
|
||||
|
|
|
|||
|
|
@ -999,6 +999,7 @@ Utils.createMomentDate = function (oObject)
|
|||
Utils.createMomentShortDate = function (oObject)
|
||||
{
|
||||
return ko.computed(function () {
|
||||
|
||||
var
|
||||
sResult = '',
|
||||
oMomentNow = moment(),
|
||||
|
|
@ -1022,7 +1023,6 @@ Utils.createMomentShortDate = function (oObject)
|
|||
'TIME': oMoment.format('LT')
|
||||
});
|
||||
}
|
||||
|
||||
else if (oMomentNow.year() === oMoment.year())
|
||||
{
|
||||
sResult = oMoment.format('D MMM.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue