Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions js/jquery.fn.gantt.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
navigate: "buttons",
navigationPosition : "bottom",
scrollToToday: true,
horizMouseScroll: true,
// cookie options
useCookie: false,
cookieKey: "jquery.fn.gantt",
Expand Down Expand Up @@ -301,7 +302,7 @@
var nameRow = $('<div>').addClass('row name').addClass('row' + i).addClass(entry.desc ? '' : 'fn-wide')
.attr('id', 'rowheader' + i).data('offset', i % settings.itemsPerPage * tools.getCellSize()).data('id', entry.id)
.append(
$('<span>').addClass('fn-label').addClass(entry.cssClass ? entry.cssClass : '').text(entry.name || '')
$('<span>').addClass('fn-label').addClass(entry.cssClass ? entry.cssClass : '').html(entry.name || '')
);

core.setRowClick(element, nameRow, i);
Expand All @@ -311,7 +312,7 @@
if (entry.desc) {
var descRow = $('<div>').addClass('row desc').addClass('row' + i).attr('id', 'RowdId_' + i).data('id', entry.id)
.append(
$('<span>').addClass('fn-label').addClass(entry.cssClass ? entry.cssClass : '').text(entry.desc)
$('<span>').addClass('fn-label').addClass(entry.cssClass ? entry.cssClass : '').html(entry.desc)
);
core.setRowClick(element, descRow, i);

Expand All @@ -328,10 +329,12 @@
var dataPanel = $('<div class="dataPanel" style="width: ' + width + 'px;"/>');

// Handle mousewheel events for scrolling the data panel
var wheel = 'onwheel' in element ?
'wheel' : document.onmousewheel !== undefined ?
'mousewheel' : 'DOMMouseScroll';
$(element).on(wheel, function (e) { core.wheelScroll(element, e); });
if (settings.horizMouseScroll) {
var wheel = 'onwheel' in element ?
'wheel' : document.onmousewheel !== undefined ?
'mousewheel' : 'DOMMouseScroll';
$(element).on(wheel, function (e) { core.wheelScroll(element, e); });
}

// Handle click events and dispatch to registered `onAddClick` function
dataPanel.click(function (e) {
Expand Down Expand Up @@ -1394,8 +1397,9 @@
var minDate = null;
$.each(element.data, function (i, entry) {
$.each(entry.values, function (i, date) {
minDate = minDate > tools.dateDeserialize(date.from) ||
minDate === null ? tools.dateDeserialize(date.from) : minDate;
var fromDate = tools.dateDeserialize(date.from);
if (isNaN(fromDate)) { return; }
minDate = minDate > fromDate || minDate === null ? fromDate : minDate;
});
});
minDate = minDate || new Date();
Expand Down
Loading