js/datetime/timesheet/timesheet.js in rsence-pre-2.2.0.2 vs js/datetime/timesheet/timesheet.js in rsence-pre-2.2.0.3

- old
+ new

@@ -43,10 +43,11 @@ notchesPerHour: 4, // by default 1/4 of an hour precision (15 minutes) itemOffsetLeft: 64, // Theme settings; don't enter in options itemOffsetRight: 0, // Theme settings; don't enter in options itemOffsetTop: 20, // Theme settings; don't enter in options itemOffsetBottom: 0, // Theme settings; don't enter in options + itemDisplayTime: true, hourOffsetTop: -4, // Theme settings; don't enter in options constructor: function( _ctrl ){ if( this.defaultLabel === undefined ){ this.defaultLabel = _ctrl.localeStrings.newItemLabel; } @@ -227,11 +228,12 @@ this.minDuration = _minDuration; this.dragPreview = HTimeSheetItem.nu( this.dragPreviewRect, this, { value: _dummyValue, - visible: false + visible: false, + displayTime: this.options.itemDisplayTime } ); this.dragPreview.setStyleOfPart('state','color','#fff'); }, @@ -245,11 +247,11 @@ clickCreate: function(x,y){ var _startTime = this.pxToTime( y-this.pageY() ), _endTime = _startTime + this.minDuration; - console.log('start:',(new Date(_startTime*1000)).toUTCString(),', end:',(new Date(_endTime*1000)).toUTCString()); + // console.log('start:',(new Date(_startTime*1000)).toUTCString(),', end:',(new Date(_endTime*1000)).toUTCString()); this.refreshDragPreview( _startTime, _endTime ); this.dragPreview.bringToFront(); this.dragPreview.show(); if( this.activateEditor( this.dragPreview ) ){ this.editor.createItem( HVM.clone( this.dragPreview.value ) ); @@ -476,9 +478,10 @@ } _item = HTimeSheetItem.nu( _rect, this, { value: _value, + displayTime: this.options.itemDisplayTime, events: { draggable: true, // click: true, doubleClick: true }