Commit 13f2c519 authored by Frank Bergmann's avatar Frank Bergmann

- Fixed issue with baselines leading to wrong bar getting the dndConfig

parent 6d5821a3
......@@ -133,6 +133,7 @@ function launchGanttEditor(debug){
fieldLabel: 'Baseline',
labelWidth: 50,
emptyText: 'Select a baseline',
allowBlank: true,
store: baselineStore,
displayField: 'baseline_name',
idField: 'baseline_id',
......@@ -507,7 +508,15 @@ Ext.onReady(function() {
format: 'json',
query: "baseline_project_id = @project_id@"
};
baselineStore.load({callback: function(r, op, success) { if (!success) PO.Utilities.reportStoreError("BaselineStore", op); }});
// add a blank option to store every time it is loaded
baselineStore.on('load', function(r, op, success) {
baselineStore.insert(0, [{'baseline_id': '0', 'baseline_name': 'none'}]);
});
baselineStore.load({callback: function(r, op, success) {
if (!success) PO.Utilities.reportStoreError("BaselineStore", op);
}});
}
// Load stores that need parameters
......
......@@ -769,7 +769,7 @@ Ext.define('GanttEditor.view.GanttBarPanel', {
var endX = me.date2x(baselineEndDate); // X position based on time scale
// A baseline shadow
var spriteBar = surface.add({
var baselineSpriteBar = surface.add({
type: 'rect', x: startX, y: y, width: endX - startX, height: h, radius: 3,
stroke: 'red',
'stroke-width': 0.3,
......
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