From 601199db6ed17f6e9f0955d74c4fe4e6d3d49960 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 16 Nov 2012 11:46:43 +0530 Subject: [PATCH] upgraded jquery and jquery.gantt --- home/page/latest_updates/latest_updates.js | 5 +-- public/js/gantt_task.js | 40 ++++++++++++---------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js index 93e38d867e..2f52e7f56b 100644 --- a/home/page/latest_updates/latest_updates.js +++ b/home/page/latest_updates/latest_updates.js @@ -1,10 +1,11 @@ erpnext.updates = [ - ["14th November 2012", [ + ["16th November 2012", [ "Appraisal: Cleaned up form and logic. Removed complex and unnecessary approval logic, \ the appraiser can select the template and role and make an appraisal. \ Normal user can see self created Appraisals. HR Manager can see all Appraisals.", + "Project: Bugfix in Gantt Chart (caused due to jquery conflict)", ]], - ["14th November 2012", [ + ["15th November 2012", [ "Customer Issue: Moved all allocations to 'Assigned' so that there is avoid duplication fo features.", "Letter Head: Show preview, make upload button more visible.", "Price List: Removed import, now import from Data Import Tool.", diff --git a/public/js/gantt_task.js b/public/js/gantt_task.js index 29c0beff36..066ad34a0a 100644 --- a/public/js/gantt_task.js +++ b/public/js/gantt_task.js @@ -27,24 +27,26 @@ erpnext.show_task_gantt = function(parent, project) { var source = []; // projects $.each(r.message, function(i,v) { - source.push({ - name: v.project, - desc: v.subject, - values: [{ - label: v.subject, - desc: v.description || v.subject, - from: '/Date("'+v.exp_start_date+'")/', - to: '/Date("'+v.exp_end_date+'")/', - customClass: { - 'Open':'ganttRed', - 'Pending Review':'ganttOrange', - 'Working':'', - 'Completed':'ganttGreen', - 'Cancelled':'ganttGray' - }[v.status], - dataObj: v - }] - }) + if(v.exp_start_date && v.exp_end_date) { + source.push({ + name: v.project, + desc: v.subject, + values: [{ + label: v.subject, + desc: v.description || v.subject, + from: '/Date("'+v.exp_start_date+'")/', + to: '/Date("'+v.exp_end_date+'")/', + customClass: { + 'Open':'ganttRed', + 'Pending Review':'ganttOrange', + 'Working':'', + 'Completed':'ganttGreen', + 'Cancelled':'ganttGray' + }[v.status], + dataObj: v + }] + }) + } }); return source } @@ -63,7 +65,7 @@ erpnext.show_task_gantt = function(parent, project) { source: get_source(r), navigate: project ? "button" : "scroll", scale: "weeks", - minScale: "weeks", + minScale: "day", maxScale: "months", onItemClick: function(data) { wn.set_route('Form', 'Task', data.name);