// Based on jQuery.ganttView v.0.8.8 Copyright (c) 2010 JC Grubbs - jc.grubbs@devmynd.com - MIT License function Gantt(app) { this.app = app; this.data = []; this.options = { container: "#gantt-chart", showWeekends: true, allowMoves: true, allowResizes: true, cellWidth: 21, cellHeight: 31, slideWidth: 1000, vHeaderWidth: 200 }; } // Save record after a resize or move Gantt.prototype.saveRecord = function(record) { this.app.showLoadingIcon(); $.ajax({ cache: false, url: $(this.options.container).data("save-url"), contentType: "application/json", type: "POST", processData: false, data: JSON.stringify(record), complete: this.app.hideLoadingIcon.bind(this) }); }; // Build the Gantt chart Gantt.prototype.execute = function() { this.data = this.prepareData($(this.options.container).data('records')); var minDays = Math.floor((this.options.slideWidth / this.options.cellWidth) + 5); var range = this.getDateRange(minDays); var startDate = range[0]; var endDate = range[1]; var container = $(this.options.container); var chart = jQuery("
" + $(this.options.container).data("label-" + type) + "
" + list[0].outerHTML; } } } return tooltip; }; // Get tooltip for bars Gantt.prototype.getBarTooltip = function(record) { var tooltip = ""; if (record.not_defined) { tooltip = $(this.options.container).data("label-not-defined"); } else { if (record.type == "task") { tooltip = "" + record.progress + "