diff --git a/src/resource/gantt/HAgendaView.js b/src/resource/gantt/HAgendaView.js index 7335cb7..4a954e8 100644 --- a/src/resource/gantt/HAgendaView.js +++ b/src/resource/gantt/HAgendaView.js @@ -40,6 +40,7 @@ function generateAgendaTimeFormat(options, langData) { function HAgendaView(calendar) { + debugger; View.call(this, calendar); // call the super-constructor this.timeGrid = new HTimeGrid(this); diff --git a/src/resource/gantt/HResourceTimeGrid.js b/src/resource/gantt/HResourceTimeGrid.js index bb2f726..a1c934c 100644 --- a/src/resource/gantt/HResourceTimeGrid.js +++ b/src/resource/gantt/HResourceTimeGrid.js @@ -3,11 +3,11 @@ ----------------------------------------------------------------------------------------------------------------------*/ function HResourceTimeGrid(view) { - TimeGrid.call(this, view); // call the super-constructor + HTimeGrid.call(this, view); // call the super-constructor } -HResourceTimeGrid.prototype = createObject(TimeGrid.prototype); // define the super-class +HResourceTimeGrid.prototype = createObject(HTimeGrid.prototype); // define the super-class $.extend(HResourceTimeGrid.prototype, { // Slices up a date range into a segment for each column // Each column represents a resource. An event can be assigned to multiple resources diff --git a/src/resource/gantt/HTimeGrid.js b/src/resource/gantt/HTimeGrid.js index 3e971f8..c72e84a 100644 --- a/src/resource/gantt/HTimeGrid.js +++ b/src/resource/gantt/HTimeGrid.js @@ -66,7 +66,6 @@ $.extend(HTimeGrid.prototype, { // Generates the HTML for the horizontal "slats" that run width-wise. Has a time axis on a side. Depends on RTL. slatRowHtml: function() { - debugger; var view = this.view; var calendar = view.calendar; var isRTL = view.opt('isRTL'); @@ -77,16 +76,15 @@ $.extend(HTimeGrid.prototype, { var minutes; var axisHtml; - // Calculate the time for each slot - while (slotTime < this.maxTime) { - slotDate = view.start.clone().time(slotTime); // will be in UTC but that's good. to avoid DST issues - minutes = slotDate.minutes(); + var resources = calendar.fetchResources(); + for(var i = 0; i < resources.length - 1; i++){ axisHtml = '' + ((!slotNormal || !minutes) ? // if irregular slot duration, or on the hour, then display the time '' + // for matchCellWidths - htmlEscape(calendar.formatDate(slotDate, view.opt('axisFormat'))) + + //htmlEscape(calendar.formatDate(slotDate, view.opt('axisFormat'))) + + resources[i].name + '' : '' ) + @@ -98,8 +96,6 @@ $.extend(HTimeGrid.prototype, { '' + (isRTL ? axisHtml : '') + ""; - - slotTime.add(this.slotDuration); } return html; diff --git a/tests/resourceDayView.html b/tests/resourceDayView.html index d802eae..736c2b8 100644 --- a/tests/resourceDayView.html +++ b/tests/resourceDayView.html @@ -42,8 +42,8 @@ - + @@ -71,7 +71,7 @@ center: 'title', right: 'agendaDay,resourceDay' }, - defaultView: 'resourceDay', + defaultView: 'hResourceDay', resources: [ { 'id': 'resource1', 'name': 'Resource 1', 'className': 'css-class-as-string' }, { 'id': 'resource2', 'name': 'Resource 2', 'className': ['green', 'another-css-class-name'] },