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

@ -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));

View file

@ -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 () {

View file

@ -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.');