Commit afef66a5 authored by Frank Bergmann's avatar Frank Bergmann

- Updated GanttEditor read-only handling

parent 9e263ee2
......@@ -18,6 +18,7 @@ Ext.define('PO.view.gantt.GanttTaskPropertyPanel', {
title: 'Task Properties',
id: 'ganttTaskPropertyPanel',
senchaPreferenceStore: null,
debug: false,
width: 500,
......@@ -322,6 +323,15 @@ console.log('POTaskAssignment.pickerController.onAssigButtonDel');
var me = this;
if (me.debug) console.log('PO.view.gantt.GanttTaskPropertyPanel.onButtonOK');
// Check if read-only
var readOnly = me.senchaPreferenceStore.getPreferenceBoolean('read_only',true);
var dirty = me.taskModel.dirty;
if (readOnly && dirty) {
me.ganttTreePanelController.readOnlyWarning();
me.hide();
return;
}
// Write timestamp to make sure that data are modified and redrawn.
me.taskModel.set('last_modified', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment