Calendar - fix sorting users in day view would sometimes disconnect header from day

This commit is contained in:
nathangray 2017-03-21 09:17:31 -06:00
parent 983a72b3ab
commit 8aa4628f76
2 changed files with 5 additions and 1 deletions

View File

@ -608,6 +608,9 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
parent = widget._parent;
children.splice(idx,0,widget);
},this,et2_calendar_daycol);
parent.day_widgets.sort(function(a,b) {
return children.indexOf(a) - children.indexOf(b);
});
}
else
{
@ -625,6 +628,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend(
// Directly update, since there is no other changes needed,
// and we don't want the current sort order applied
app.calendar.state.owner = sortedArr;
parent.options.owner = sortedArr;
}
}
});

View File

@ -465,7 +465,7 @@ var et2_calendar_event = (function(){ "use strict"; return et2_valueWidget.exten
* @return {String}
*/
_tooltip: function() {
if(!this.div) return '';
if(!this.div || !this.options.value || !this.options.value.app_id) return '';
var border = this.div.css('borderTopColor');
var bg_color = this.div.css('background-color');