diff --git a/extscheduler/resources/module.xml b/extscheduler/resources/module.xml
index c67e137ca..8313e9f71 100644
--- a/extscheduler/resources/module.xml
+++ b/extscheduler/resources/module.xml
@@ -23,7 +23,7 @@
A comma separated list of column names to display for the EventForm.js file. Column Names(Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate)
true
true
- Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate
+ Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate,project,fasting,delivery,remainingtissues,animalid
ADMIN
diff --git a/extscheduler/resources/queries/extscheduler/events/.qview.xml b/extscheduler/resources/queries/extscheduler/events/.qview.xml
new file mode 100644
index 000000000..ba1d7c4cb
--- /dev/null
+++ b/extscheduler/resources/queries/extscheduler/events/.qview.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-23.002-23.003.sql b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-23.002-23.003.sql
new file mode 100644
index 000000000..6f597fb63
--- /dev/null
+++ b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-23.002-23.003.sql
@@ -0,0 +1,16 @@
+-- Created: 6-13-2023 R. Blasa
+
+ALTER TABLE extscheduler.Events ADD fasting VARCHAR(500);
+GO
+
+ALTER TABLE extscheduler.Events ADD delivery VARCHAR(500);
+GO
+
+ALTER TABLE extscheduler.Events ADD project INT;
+GO
+
+ALTER TABLE extscheduler.Events ADD remainingtissues VARCHAR(50);
+GO
+
+ALTER TABLE extscheduler.Events ADD animalid VARCHAR(50);
+GO
\ No newline at end of file
diff --git a/extscheduler/resources/schemas/extscheduler.xml b/extscheduler/resources/schemas/extscheduler.xml
index 5656d835d..4eb4fc8ca 100644
--- a/extscheduler/resources/schemas/extscheduler.xml
+++ b/extscheduler/resources/schemas/extscheduler.xml
@@ -54,6 +54,28 @@
+
+ Center Project
+ true
+
+ /ONPRC/EHR
+ project
+ ehr
+ project
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
User
diff --git a/extscheduler/resources/views/NecropsyLauncher.html b/extscheduler/resources/views/NecropsyLauncher.html
new file mode 100644
index 000000000..84f97dd16
--- /dev/null
+++ b/extscheduler/resources/views/NecropsyLauncher.html
@@ -0,0 +1,44 @@
+
\ No newline at end of file
diff --git a/extscheduler/resources/views/NecropsyLauncher.view.xml b/extscheduler/resources/views/NecropsyLauncher.view.xml
new file mode 100644
index 000000000..4e405f2bd
--- /dev/null
+++ b/extscheduler/resources/views/NecropsyLauncher.view.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extscheduler/resources/views/NecropsyLauncher.webpart.xml b/extscheduler/resources/views/NecropsyLauncher.webpart.xml
new file mode 100644
index 000000000..2a80f2dc5
--- /dev/null
+++ b/extscheduler/resources/views/NecropsyLauncher.webpart.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.html b/extscheduler/resources/views/NecropsyWeeklyScheduler.html
new file mode 100644
index 000000000..e5db6ac3c
--- /dev/null
+++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.html
@@ -0,0 +1,75 @@
+
+
+
+Resources
+
+
+My Events
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml
new file mode 100644
index 000000000..e60575888
--- /dev/null
+++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml
new file mode 100644
index 000000000..4a619a188
--- /dev/null
+++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extscheduler/resources/views/weeklyNecropsyTest.html b/extscheduler/resources/views/weeklyNecropsyTest.html
new file mode 100644
index 000000000..37a59be8b
--- /dev/null
+++ b/extscheduler/resources/views/weeklyNecropsyTest.html
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Scheduler Week View
+
+
+
+
+
\ No newline at end of file
diff --git a/extscheduler/resources/views/weeklyNecropsyTest.view.xml b/extscheduler/resources/views/weeklyNecropsyTest.view.xml
new file mode 100644
index 000000000..aaab33201
--- /dev/null
+++ b/extscheduler/resources/views/weeklyNecropsyTest.view.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js
new file mode 100644
index 000000000..d60041774
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js
@@ -0,0 +1,356 @@
+Ext.define('App.view.EventFormAmended', {
+ extend : 'Ext.form.Panel',
+ alias : 'widget.eventformAmended',
+ reference : 'eventformAmended',
+ cls : 'eventformAmended',
+ width : 340,
+ bodyPadding : 15,
+ defaults : {
+ anchor : '100%',
+ labelWidth : 80
+ },
+
+ editable : false,
+ scheduler : null,
+
+ eventPeriodLength: 30,
+
+ initComponent: function()
+ {
+ var context = LABKEY.getModuleContext('extscheduler');
+ this.eventPeriodLength = parseInt(context['ExtSchedulerEventPeriodLength']);
+ this.eventFormColumns = context['ExtSchedulerEventFormColumns'].split(',');
+
+ this.items = [
+
+ {
+ xtype : 'resourcecombo',
+ fieldLabel : 'Resource',
+ name : 'ResourceId',
+ reference : 'eventResourceField',
+ allowBlank : !this.editable,
+ hidden : this.eventFormColumns.indexOf('ResourceId') === -1,
+ bind : {
+ value : '{eventRecord.ResourceId}',
+ readOnly : !this.editable
+ }
+ },
+
+ {
+ xtype : 'textfield',
+ fieldLabel : 'Animal ID',
+ name : 'Alias',
+ reference : 'eventAliasField',
+ //allowBlank : !this.editable,
+ allowBlank: true,
+ hidden : this.eventFormColumns.indexOf('Alias') === -1,
+ bind : {
+ value : '{eventRecord.Alias}',
+ readOnly : !this.editable
+ }
+ },
+
+ {
+ xtype : 'textfield',
+ labelAlign: 'left',
+ width: 120,
+ height: 20,
+ fieldLabel : 'Center Project',
+ name : 'location',
+ reference : 'eventProjectField',
+ style: 'margin-top: 20px;',
+ allowBlank : true,
+ hidden : this.eventFormColumns.indexOf('project') === -1,
+ bind : {
+ value : '{eventRecord.project}',
+ readOnly : !this.editable
+ }
+ },
+ {
+ xtype : 'textfield',
+ labelAlign: 'left',
+ width: 120,
+ height: 20,
+ fieldLabel : 'Type of Fasting Requested',
+ name : 'fasting',
+ reference : 'eventFastingField',
+ style: 'margin-top: 20px;',
+ allowBlank : true,
+ hidden : this.eventFormColumns.indexOf('fasting') === -1,
+ bind : {
+ value : '{eventRecord.fasting}',
+ readOnly : !this.editable
+ }
+ },
+ {
+ xtype : 'textfield',
+ labelAlign: 'left',
+ width: 120,
+ height: 20,
+ fieldLabel : 'Animal Delivery Requested',
+ name : 'delivery',
+ reference : 'eventDeliveryField',
+ style: 'margin-top: 20px;',
+ allowBlank : true,
+ hidden : this.eventFormColumns.indexOf('delivery') === -1,
+ bind : {
+ value : '{eventRecord.delivery}',
+ readOnly : !this.editable
+ }
+ },
+ // {
+ // xtype : 'textfield',
+ // labelAlign: 'top',
+ // width: 320,
+ // height: 20,
+ // fieldLabel : 'Necropsy Location',
+ // name : 'location',
+ // reference : 'eventLocationField',
+ // style: 'margin-top: 20px;',
+ // allowBlank : true,
+ // hidden : this.eventFormColumns.indexOf('location') === -1,
+ // bind : {
+ // value : '{eventRecord.location}',
+ // readOnly : !this.editable
+ // }
+ // },
+ {
+ xtype: 'textarea',
+ labelAlign: 'top',
+ width: 320,
+ height: 50,
+ fieldLabel: 'Comments',
+ name: 'Comments',
+ reference: 'eventCommentsField',
+ style: 'margin-top: 20px;',
+ allowBlank: true,
+ hidden: this.eventFormColumns.indexOf('Comments') === -1,
+ bind: {
+ value: '{eventRecord.Comments}',
+ readOnly: !this.editable
+ }
+ },
+
+ {
+ xtype : 'fieldcontainer',
+ layout : 'hbox',
+ hidden : this.eventFormColumns.indexOf('StartDate') === -1,
+ items : [
+ this.getStartDateField(),
+ this.getStartTimeField()
+ ]
+ },
+ {
+ xtype : 'fieldcontainer',
+ layout : 'hbox',
+ hidden : this.eventFormColumns.indexOf('EndDate') === -1,
+ items : [
+ this.getEndDateField(),
+ this.getEndTimeField()
+ ]
+ },
+
+ ];
+
+ if (this.editable)
+ {
+ this.buttons = [
+ {
+ text: 'Cancel',
+ scope: this,
+ handler: function()
+ {
+ this.up('window').close();
+ }
+ },
+ {
+ text: 'Create',
+ formBind: true,
+ scope: this,
+ handler: function()
+ {
+ var values = this.getValues();
+
+ // concat the start/end date and times
+ values.StartDate = values.StartDate + ' ' + values.StartTime;
+ values.EndDate = values.EndDate + ' ' + values.EndTime;
+
+ var userRecord = Ext.getStore('users').findRecord('UserId', values.UserId);
+ values.UserID = userRecord.get('UserId');
+
+ if (values.Name == null || values.Name == '')
+ {
+ if (userRecord.get('LastName') != null && userRecord.get('LastName') != '')
+ values.Name = userRecord.get('FirstName') + ' ' + userRecord.get('LastName'); //updated 9/2/2016 per user request
+ else
+ values.Name = userRecord.get('DisplayName')
+ }
+
+ LABKEY.Query.insertRows({
+ schemaName: 'extscheduler',
+ queryName: 'events',
+ rows: [values],
+ scope: this,
+ success: function(response)
+ {
+ window.location.reload();
+ },
+ failure: function(response)
+ {
+ Ext.Msg.alert('Error', response.exception);
+ }
+ });
+
+ }
+ }
+ ];
+ }
+
+ this.callParent();
+ },
+
+ getStartDateField : function()
+ {
+ if (!this.startDateField)
+ {
+ this.startDateField = Ext.create('Ext.form.field.Date', {
+ fieldLabel : 'Starts',
+ labelWidth : 80,
+ flex : 1,
+ name : 'StartDate',
+ format : 'Y-m-d',
+ allowBlank : !this.editable,
+ bind : {
+ value : '{StartDate}',
+ readOnly : !this.editable
+ }
+ });
+
+ this.startDateField.on('change', function(datefield, newValue){
+ this.getEndDateField().setMinValue(newValue);
+ if (this.getEndDateField().getValue() < newValue)
+ this.getEndDateField().setValue(newValue);
+ this.getEndDateField().clearInvalid();
+
+ if (this.getStartTimeField().getValue() == null)
+ this.getStartTimeField().setValue('8:00');
+
+ this.ensureEndTimeAfterStart();
+
+ this.getStartTimeField().enable();
+ this.getEndDateField().enable();
+ this.getEndTimeField().enable();
+ }, this);
+ }
+
+ return this.startDateField;
+ },
+
+ getStartTimeField : function()
+ {
+ if (!this.startTimeField)
+ {
+ this.startTimeField = Ext.create('Ext.form.field.Time', {
+ margin : '0 0 0 10',
+ width : 90,
+ name : 'StartTime',
+ format : 'H:i',
+ increment : this.eventPeriodLength,
+ allowBlank : !this.editable,
+ bind : {
+ minValue : '{defaultMinTime}',
+ maxValue : '{defaultMaxTime}',
+ value : '{StartTime}',
+ readOnly : !this.editable,
+ disabled : this.editable
+ }
+ });
+
+ this.startTimeField.on('change', function(timefield, newValue){
+ if (this.getEndTimeField().getValue() == null)
+ this.getEndTimeField().setValue(new Date(newValue.getTime() + (this.eventPeriodLength*60*1000)));
+
+ this.ensureEndTimeAfterStart();
+ }, this);
+ }
+
+ return this.startTimeField;
+ },
+
+ getEndDateField : function()
+ {
+ if (!this.endDateField)
+ {
+ this.endDateField = Ext.create('Ext.form.field.Date', {
+ fieldLabel : 'Ends',
+ labelWidth : 80,
+ flex : 1,
+ name : 'EndDate',
+ format : 'Y-m-d',
+ allowBlank : !this.editable,
+ bind : {
+ minValue : '{minEndDate}',
+ value : '{EndDate}',
+ readOnly : !this.editable,
+ disabled : this.editable
+ }
+ });
+
+ this.endDateField.on('change', function(dateField, newValue){
+ this.ensureEndTimeAfterStart();
+ }, this);
+ }
+
+ return this.endDateField;
+ },
+
+ getEndTimeField : function()
+ {
+ if (!this.endTimeField)
+ {
+ this.endTimeField = Ext.create('Ext.form.field.Time', {
+ margin : '0 0 0 10',
+ name : 'EndTime',
+ width : 90,
+ format : 'H:i',
+ increment : this.eventPeriodLength,
+ allowBlank : !this.editable,
+ bind : {
+ minValue : '{minEndTime}',
+ maxValue : '{defaultMaxTime}',
+ value : '{EndTime}',
+ readOnly : !this.editable,
+ disabled : this.editable
+ }
+ });
+
+ this.endTimeField.on('change', function(timefield, newValue){
+ this.ensureEndTimeAfterStart();
+ }, this);
+ }
+
+ return this.endTimeField;
+ },
+
+ ensureEndTimeAfterStart : function()
+ {
+ var startDate = this.getStartDateField().getValue(),
+ startTime = this.getStartTimeField().getValue(),
+ endDate = this.getEndDateField().getValue(),
+ endTime = this.getEndTimeField().getValue(),
+ allNonNull = startDate != null && startTime != null && endDate != null && endTime != null;
+
+ if (allNonNull && startDate.getTime() == endDate.getTime())
+ {
+ var d = new Date(startTime.getTime() + (this.eventPeriodLength*60*1000));
+ this.getEndTimeField().setMinValue(d);
+
+ if (startTime.getTime() >= endTime.getTime())
+ this.getEndTimeField().setValue(d);
+ }
+ else
+ {
+ this.getEndTimeField().setMinValue('0:00');
+ }
+ }
+});
diff --git a/extscheduler/resources/web/extscheduler/App/view/Header.js b/extscheduler/resources/web/extscheduler/App/view/Header.js
index f0031d2d7..1d6b18a1f 100644
--- a/extscheduler/resources/web/extscheduler/App/view/Header.js
+++ b/extscheduler/resources/web/extscheduler/App/view/Header.js
@@ -4,7 +4,7 @@ Ext.define('App.view.Header', {
cls : 'app-header',
height : 40,
padding : '5 10 5 5',
- tpl : 'Schedule for ',
+ tpl : 'Schedule for: ',
bind : {
//each bind should have corresponding setter
date: '{endDate}'
diff --git a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js
new file mode 100644
index 000000000..3a1f03617
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js
@@ -0,0 +1,24 @@
+Ext.define('App.view.HeaderAmended', {
+ extend : 'Ext.panel.Header',
+ alias : 'widget.appheaderAmended',
+ cls : 'app-headeramended',
+ height : 40,
+ layout: {
+ pack: 'center'
+ },
+ padding : '5 10 5 5',
+ // tpl : 'Schedule for : ',
+ tpl : 'Schedule for ',
+ bind : {
+ //each bind should have corresponding setter
+ date: '{endDate}'
+ },
+ setDate : function (date) {
+ this.setData(
+ {
+ month : Ext.Date.format(date, 'F'),
+ year : Ext.Date.format(date, 'Y')
+ }
+ );
+ }
+});
diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js
new file mode 100644
index 000000000..d86196a5a
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js
@@ -0,0 +1,23 @@
+Ext.define('App.view.InfoPanelAmended', {
+ extend : 'Ext.Container',
+ alias : 'widget.infopanelAmended',
+ requires : [
+ 'App.view.InfoPanelModelAmended'
+ ],
+ viewModel : 'infopanelamended',
+ reference : 'infopanelamended',
+ cls : 'infopanelamended',
+ width : 340,
+ layout : {
+ type : 'vbox',
+ align : 'stretch'
+ },
+ items : [
+ {
+ xtype : 'eventformAmended',
+ title : 'Necropsy Calendar Schedule',
+ editable : false
+ }
+
+ ]
+});
diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js
new file mode 100644
index 000000000..91c8680db
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js
@@ -0,0 +1,109 @@
+Ext.define('App.view.InfoPanelModelAmended', {
+ extend : 'Ext.app.ViewModel',
+ alias : 'viewmodel.infopanelamended',
+ data : {
+ //eventRecord should be defined here because otherwise we can't bind {!eventRecord}
+ eventRecord : null,
+ defaultMinTime : null,
+ defaultMaxTime : null,
+ startDateValue : null
+ },
+ formulas : {
+ StartDate : {
+ bind : '{eventRecord.StartDate}',
+ get : function (date) {
+ // this notify needs to be sure minValue will be bound before value
+ this.set('startDateValue', date);
+ this.notify();
+
+ return date;
+ },
+ set : function (date) {
+ var eventRecord = this.get('eventRecord');
+ if (!eventRecord || !date) return;
+
+ var time = eventRecord.getStartDate();
+ // use time from original record
+ Sch.util.Date.copyTimeValues(date, time);
+
+ // this notify needs to be sure minValue will be bound before value
+ this.set('startDateValue', date);
+ this.notify();
+
+ // true to keep duration
+ eventRecord.setStartDate(date, true);
+ }
+ },
+
+ StartTime : {
+ bind : '{eventRecord.StartDate}',
+ get : function (time) {
+ return time;
+ },
+ set : function (time) {
+ var eventRecord = this.get('eventRecord');
+ if (!eventRecord || !time) return;
+
+ var date = Ext.Date.clone(eventRecord.getStartDate());
+ // use date from original record
+ Sch.util.Date.copyTimeValues(date, time);
+ // true to keep duration
+ eventRecord.setStartDate(date, true);
+ }
+ },
+
+ EndDate : {
+ bind : '{eventRecord.EndDate}',
+ get : function (date) {
+ return date;
+ },
+ set : function (date) {
+ var eventRecord = this.get('eventRecord');
+ if (!eventRecord || !date) return;
+
+ var time = eventRecord.getEndDate();
+ // use time from original record
+ Sch.util.Date.copyTimeValues(date, time);
+ eventRecord.setEndDate(date);
+ }
+ },
+
+ EndTime : {
+ bind : '{eventRecord.EndDate}',
+ get : function (time) {
+ return time;
+ },
+ set : function (time) {
+ var eventRecord = this.get('eventRecord');
+ if (!eventRecord || !time) return;
+
+ var date = Ext.Date.clone(eventRecord.getEndDate());
+ // use date from original record
+ Sch.util.Date.copyTimeValues(date, time);
+ eventRecord.setEndDate(date);
+ }
+ },
+
+ minEndDate : function (get) {
+ var date = get('startDateValue');
+ // true to clone the date before time clearing
+ return date ? Ext.Date.clearTime(date, true) : null;
+ },
+
+ minEndTime : function (get) {
+ var startDate = get('StartDate'),
+ endDate = get('EndDate');
+
+ if (startDate && endDate) {
+ var cleanStartDate = Ext.Date.clearTime(startDate, true),
+ cleanEndDate = Ext.Date.clearTime(endDate, true);
+
+ if (Ext.Date.isEqual(cleanStartDate, cleanEndDate)) {
+ return Ext.Date.clone(startDate);
+ }
+ }
+
+ return get('defaultMinTime');
+ }
+ }
+});
diff --git a/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js
new file mode 100644
index 000000000..fb5988e62
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js
@@ -0,0 +1,21 @@
+Ext.define('App.view.NavigationBarAmended', {
+ extend : 'Ext.panel.Header',
+ alias : 'widget.navigationbarAmended',
+ cls : 'navigationbarAmended',
+ // padding : '0 10 0 5',
+ height : 0,
+ border : false,
+ title : '
',
+ items : [
+ {
+ // xtype : 'button',
+ // text : 'Return to ' + window.location.host,
+ // handler : function() {
+ // if (LABKEY.ActionURL.getParameter('returnUrl'))
+ // window.location = LABKEY.ActionURL.getParameter('returnUrl');
+ // else
+ // window.location = LABKEY.ActionURL.buildURL('project', 'begin');
+ // }
+ }
+ ]
+});
\ No newline at end of file
diff --git a/extscheduler/resources/web/extscheduler/App/view/ProjectCombo.js b/extscheduler/resources/web/extscheduler/App/view/ProjectCombo.js
new file mode 100644
index 000000000..7161a3df5
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/ProjectCombo.js
@@ -0,0 +1,10 @@
+
+Ext.define('App.view.ProjectCombo', {
+ extend : 'Ext.form.field.ComboBox',
+ alias : 'widget.projectcombo',
+ store : 'projectst',
+ queryMode : 'local',
+ valueField : 'project',
+ displayField : 'displayName',
+ editable : false
+});
\ No newline at end of file
diff --git a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js
new file mode 100644
index 000000000..ecebe4744
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js
@@ -0,0 +1,84 @@
+Ext.define('App.view.SchedulerAmended', {
+ extend : 'Sch.panel.SchedulerGrid',
+ alias : 'widget.schedulerAmended',
+ reference : 'schedulerAmended',
+ startDate : new Date(),
+ //endDate : new Date(),
+ startTime : 6,
+ endTime : 20,
+ resourceStore : 'resource',
+ eventStore : 'event',
+ style : 'border: 1px solid #d0d0d0;',
+
+ readOnly : true, // disables the abilitiy to click in calendar to create event
+ showTodayLine : true,
+ calendarViewPreset : 'week',
+ mode : 'calendar',
+ eventResizeHandles : 'none',
+ eventBodyTemplate :'{ResourceName:htmlEncode}
{Alias:htmlEncode}
{Project:htmlEncode}
{fasting:htmlEncode}
{delivery:htmlEncode}',
+ snapToIncrement : true,
+ allowOverlap : true,
+ highlightCurrentTime : true,
+ calendarTimeAxisCfg : {
+ height : 30
+ },
+
+ tbar: [
+ {
+ text : 'Previous',
+ iconCls: 'x-fa fa-arrow-circle-left',
+ handler: function (btn) {
+ var scheduler = btn.up('schedulerAmended');
+ scheduler.timeAxis.shift(-7, Sch.util.Date.DAY);
+ }
+ },
+ {
+ text : 'Today',
+ handler: function (btn) {
+ var scheduler = btn.up('schedulerAmended');
+ // Clear time here so date adjustment wouldn't result in 2 days span
+ scheduler.setStart(Sch.util.Date.clearTime(new Date()));
+ }
+ },
+ {
+ text : 'Next',
+ iconCls: 'x-fa fa-arrow-circle-right',
+ iconAlign: 'right',
+ handler: function (btn) {
+ var scheduler = btn.up('schedulerAmended');
+ scheduler.timeAxis.shift(7, Sch.util.Date.DAY);
+ }
+ },
+ '',
+ {
+ text : 'Select Date...',
+ scope : this,
+ menu : Ext.create('Ext.menu.DatePicker', {
+ handler : function (dp, date) {
+ var scheduler = dp.up('schedulerAmended');
+ scheduler.setStart(Sch.util.Date.clearTime(date));
+ }
+ })
+ }, '->',
+ {
+
+ }
+ ],
+
+ eventRenderer : function (event, resource, data) {
+ data.style = 'background-image:linear-gradient(45deg, #fdfefe, #8c001a)';
+ // data.style = 'background-color:' + resource.get('Color');
+ event.data['ResourceName'] = resource.get('Name');
+ event.data['Project'] = event.get('project');
+ event.data['fasting'] = event.get('fasting');
+ event.data['delivery'] = event.get('delivery');
+ // event.data['Alias'] = event.get('Alias');
+ var userRecord = Ext.getStore('users').findRecord('UserId', event.get('UserId'));
+ event.data['UserDisplayName'] = userRecord != null ? userRecord.get('DisplayName') : event.get('UserId');
+ return event.data;
+ },
+
+ onEventCreated : function (newEventRecord) {
+ this.getEventSelectionModel().select(newEventRecord);
+ }
+});
diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js
new file mode 100644
index 000000000..b7e5406d5
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js
@@ -0,0 +1,29 @@
+//This viewport takes a role of container that contains a scheduler.
+//If you need more than one scheduler on the page, you need to wrap viewport items in your own view.
+Ext.define('App.view.ViewportAmended', {
+ extend : 'Ext.Viewport',
+ requires : [
+ 'App.view.ViewportControllerAmended'
+ ],
+ controller : 'viewportAmended',
+ viewModel : {},
+ layout : 'border',
+ items : [
+ {
+ xtype : 'navigationbarAmended',
+ region : 'north'
+ },
+ {
+ xtype : 'appheaderAmended',
+ region : 'north'
+ },
+ {
+ xtype : 'infopanelAmended',
+ region : 'east'
+ },
+ {
+ xtype : 'schedulerAmended',
+ region : 'center'
+ }
+ ]
+});
\ No newline at end of file
diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js
new file mode 100644
index 000000000..a97b77558
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js
@@ -0,0 +1,58 @@
+//This controller is watching for viewport and child views which don't have their own viewController.
+Ext.define('App.view.ViewportControllerAmended', {
+ extend : 'Ext.app.ViewController',
+ alias : 'controller.viewportAmended',
+
+ control : {
+ 'schedulergrid' : {
+ eventselect : 'onEventSelect',
+ eventdeselect : 'onEventDeselect',
+ viewchange : 'onViewChange'
+ }
+ },
+
+ onEventSelect : function (selectionModel, eventRecord) {
+ var refs = this.getReferences(),
+ infopanelVM = refs.infopanelamended.getViewModel(),
+ scheduler = selectionModel.view.ownerGrid;
+
+ infopanelVM.set({
+ 'eventRecord' : eventRecord,
+ 'defaultMinTime' : scheduler.getStart(),
+ 'defaultMaxTime' : scheduler.getEnd()
+ });
+
+ //refs.eventResourceField.focus();
+ },
+
+ onEventDeselect : function () {
+ var refs = this.getReferences(),
+ infopanelVM = refs.infopanelamended.getViewModel();
+
+ infopanelVM.set({
+ 'eventRecord' : null,
+ 'defaultMinTime' : null,
+ 'defaultMaxTime' : null
+ });
+
+ //refs.eventResourceField.focus();
+ },
+
+ onViewChange : function (timelinePanel) {
+ var vm = this.getViewModel();
+
+ vm.set('endDate', timelinePanel.getEndDate());
+ },
+
+ onResourceFilterChange : function (combo, selectedResourceIds) {
+ // Both schedulers share store, so we can use event store from any of them
+ var eventStore = this.getReferences().schedulerAmended.eventStore;
+
+ //true to avoid double full view repaints
+ eventStore.clearFilter(true);
+
+ eventStore.filterBy(function (eventRecord) {
+ return eventRecord.getResourceId() in selectedResourceIds;
+ });
+ }
+});
\ No newline at end of file
diff --git a/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css b/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css
new file mode 100644
index 000000000..d853e2290
--- /dev/null
+++ b/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css
@@ -0,0 +1,69 @@
+.app-headeramended {
+ background : transparent;
+ color : #0072BB;
+ font-size : 1.5em;
+ line-height : 1.4;
+ padding-left : 80px !important;
+}
+.header-month {
+ font-weight : bold;
+ color:blue;
+ font-size: 24px;
+ margin-right : 20px;
+}
+
+.header-year {
+ font-weight : bold;
+ font-size: 24px;
+ color:blue;
+}
+
+
+.infopanelamended {
+ border-top : 1px solid #d0d0d0;,
+}
+
+.infopanelamended,
+.infopanelamended .x-panel-body,
+.infopanelamended .x-panel-header-default {
+ background : transparent;
+}
+
+.resources .x-panel-header-default {
+ padding-top : 0;
+}
+
+.resources .x-form-cb-label {
+ cursor: pointer;
+}
+
+.infopanelamended .x-title-text {
+ color : #999;
+ /*color : #8c001a;*/
+}
+
+
+
+.navigationbaramended {
+ background : #0072BB;
+}
+
+.navigationbaramended .x-btn {
+ background : transparent !important;
+ border : 0 none !important;
+}
+
+.navigationbarAmended .x-title-text {
+ color : #fff;
+ font-size : 1.4em;
+ line-height : 1.5;
+ padding-left : 5px;
+}
+
+
+
+
+
+body.x-body {
+ background : #f5f5f5;
+}
\ No newline at end of file
diff --git a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java
index be8aa0d4f..bda2d507a 100644
--- a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java
+++ b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java
@@ -1,5 +1,4 @@
//update to add new data set
-//update to trigger change
package org.labkey.extscheduler;
import org.jetbrains.annotations.NotNull;
@@ -27,7 +26,7 @@ public String getName()
@Override
public @Nullable Double getSchemaVersion()
{
- return 23.002;
+ return 23.003;
}
@Override