upgraded jquery and jquery.gantt

This commit is contained in:
Rushabh Mehta 2012-11-16 11:46:43 +05:30
parent 04b9579b24
commit 601199db6e
2 changed files with 24 additions and 21 deletions

View File

@ -1,10 +1,11 @@
erpnext.updates = [ erpnext.updates = [
["14th November 2012", [ ["16th November 2012", [
"Appraisal: Cleaned up form and logic. Removed complex and unnecessary approval logic, \ "Appraisal: Cleaned up form and logic. Removed complex and unnecessary approval logic, \
the appraiser can select the template and role and make an appraisal. \ 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.", 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.", "Customer Issue: Moved all allocations to 'Assigned' so that there is avoid duplication fo features.",
"Letter Head: Show preview, make upload button more visible.", "Letter Head: Show preview, make upload button more visible.",
"Price List: Removed import, now import from Data Import Tool.", "Price List: Removed import, now import from Data Import Tool.",

View File

@ -27,24 +27,26 @@ erpnext.show_task_gantt = function(parent, project) {
var source = []; var source = [];
// projects // projects
$.each(r.message, function(i,v) { $.each(r.message, function(i,v) {
source.push({ if(v.exp_start_date && v.exp_end_date) {
name: v.project, source.push({
desc: v.subject, name: v.project,
values: [{ desc: v.subject,
label: v.subject, values: [{
desc: v.description || v.subject, label: v.subject,
from: '/Date("'+v.exp_start_date+'")/', desc: v.description || v.subject,
to: '/Date("'+v.exp_end_date+'")/', from: '/Date("'+v.exp_start_date+'")/',
customClass: { to: '/Date("'+v.exp_end_date+'")/',
'Open':'ganttRed', customClass: {
'Pending Review':'ganttOrange', 'Open':'ganttRed',
'Working':'', 'Pending Review':'ganttOrange',
'Completed':'ganttGreen', 'Working':'',
'Cancelled':'ganttGray' 'Completed':'ganttGreen',
}[v.status], 'Cancelled':'ganttGray'
dataObj: v }[v.status],
}] dataObj: v
}) }]
})
}
}); });
return source return source
} }
@ -63,7 +65,7 @@ erpnext.show_task_gantt = function(parent, project) {
source: get_source(r), source: get_source(r),
navigate: project ? "button" : "scroll", navigate: project ? "button" : "scroll",
scale: "weeks", scale: "weeks",
minScale: "weeks", minScale: "day",
maxScale: "months", maxScale: "months",
onItemClick: function(data) { onItemClick: function(data) {
wn.set_route('Form', 'Task', data.name); wn.set_route('Form', 'Task', data.name);