Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sencha-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
sencha-core
Commits
6316ffc5
Commit
6316ffc5
authored
Jun 01, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Beautified order of fields
parent
23e39bb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
17 deletions
+16
-17
GanttTreePanel.js
www/view/gantt/GanttTreePanel.js
+16
-17
No files found.
www/view/gantt/GanttTreePanel.js
View file @
6316ffc5
...
...
@@ -122,15 +122,15 @@ Ext.define('PO.view.gantt.GanttTreePanel', {
}},
*/
{
text
:
'Task'
,
xtype
:
'treecolumn'
,
flex
:
2
,
sortable
:
true
,
dataIndex
:
'project_name'
,
editor
:
true
,
renderer
:
function
(
v
,
context
,
model
,
d
,
e
)
{
editor
:
true
,
renderer
:
function
(
v
,
context
,
model
,
d
,
e
)
{
context
.
style
=
'cursor: pointer;'
;
var
children
=
model
.
childNodes
;
if
(
0
==
children
.
length
)
{
return
model
.
get
(
'project_name'
);
}
else
{
return
"<b>"
+
model
.
get
(
'project_name'
)
+
"</b>"
;
}
}},
{
text
:
'Work'
,
width
:
55
,
align
:
'right'
,
dataIndex
:
'planned_units'
,
editor
:
{
xtype
:
'numberfield'
,
minValue
:
0
},
renderer
:
function
(
value
,
context
,
model
)
{
{
text
:
'Work'
,
width
:
55
,
align
:
'right'
,
dataIndex
:
'planned_units'
,
editor
:
{
xtype
:
'numberfield'
,
minValue
:
0
},
renderer
:
function
(
value
,
context
,
model
)
{
// Calculate the UoM unit
var
planned_units
=
model
.
get
(
'planned_units'
);
if
(
0
==
model
.
childNodes
.
length
)
{
...
...
@@ -154,11 +154,9 @@ Ext.define('PO.view.gantt.GanttTreePanel', {
return
"<b>"
+
plannedUnits
+
"h</b>"
;
}
}},
{
text
:
'Done %'
,
width
:
50
,
align
:
'right'
,
dataIndex
:
'percent_completed'
,
editor
:
{
xtype
:
'numberfield'
,
minValue
:
0
,
maxValue
:
100
},
renderer
:
function
(
value
,
context
,
model
)
{
{
text
:
'Done %'
,
width
:
50
,
align
:
'right'
,
dataIndex
:
'percent_completed'
,
editor
:
{
xtype
:
'numberfield'
,
minValue
:
0
,
maxValue
:
100
},
renderer
:
function
(
value
,
context
,
model
)
{
var
percent_completed
=
model
.
get
(
'percent_completed'
);
var
isLeaf
=
(
0
==
model
.
childNodes
.
length
);
if
(
0
==
model
.
childNodes
.
length
)
{
// A leaf task - just show the units
...
...
@@ -192,23 +190,23 @@ Ext.define('PO.view.gantt.GanttTreePanel', {
var
isLeaf
=
(
0
==
model
.
childNodes
.
length
);
if
(
isLeaf
)
{
return
value
.
substring
(
0
,
10
);
}
else
{
return
"<b>"
+
value
.
substring
(
0
,
10
)
+
"</b>"
;
}
}},
{
text
:
'Resources'
,
flex
:
1
,
hidden
:
false
,
dataIndex
:
'assignees'
,
editor
:
'potaskassignment'
,
renderer
:
function
(
value
,
context
,
model
)
{
{
text
:
'Resources'
,
flex
:
1
,
hidden
:
false
,
dataIndex
:
'assignees'
,
editor
:
'potaskassignment'
,
renderer
:
function
(
value
,
context
,
model
)
{
var
isLeaf
=
(
0
==
model
.
childNodes
.
length
);
var
result
=
PO
.
view
.
field
.
POTaskAssignment
.
formatAssignments
(
value
);
if
(
isLeaf
)
{
return
result
;
}
else
{
return
"<b>"
+
result
+
"</b>"
;
}
}},
{
text
:
''
,
flex
:
1
,
hidden
:
true
},
{
text
:
'CostCenter'
,
flex
:
1
,
hidden
:
true
,
dataIndex
:
'cost_center_id'
,
sortable
:
true
,
editor
:
{
xtype
:
'combo'
,
store
:
'taskCostCenterStore'
,
displayField
:
'cost_center_name'
,
valueField
:
'cost_center_id'
},
renderer
:
function
(
value
)
{
editor
:
{
xtype
:
'combo'
,
store
:
'taskCostCenterStore'
,
displayField
:
'cost_center_name'
,
valueField
:
'cost_center_id'
},
renderer
:
function
(
value
)
{
var
ccStore
=
Ext
.
StoreManager
.
get
(
'taskCostCenterStore'
);
var
model
=
ccStore
.
getById
(
value
);
return
model
.
get
(
'cost_center_name'
);
}},
{
text
:
'Description'
,
flex
:
1
,
hidden
:
true
,
dataIndex
:
'description'
,
editor
:
{
allowBlank
:
true
}},
{
text
:
'Material'
,
flex
:
1
,
hidden
:
true
,
dataIndex
:
'material_id'
,
sortable
:
true
,
editor
:
{
xtype
:
'combo'
,
store
:
'taskMaterialStore'
,
displayField
:
'material_name'
,
valueField
:
'material_id'
},
renderer
:
function
(
value
)
{
editor
:
{
xtype
:
'combo'
,
store
:
'taskMaterialStore'
,
displayField
:
'material_name'
,
valueField
:
'material_id'
},
renderer
:
function
(
value
)
{
var
materialStore
=
Ext
.
StoreManager
.
get
(
'taskMaterialStore'
);
var
model
=
materialStore
.
getById
(
value
);
return
model
.
get
(
'material_name'
);
...
...
@@ -221,7 +219,8 @@ Ext.define('PO.view.gantt.GanttTreePanel', {
maxValue
:
1000
}},
{
text
:
'Status'
,
flex
:
1
,
hidden
:
true
,
dataIndex
:
'project_status_id'
,
sortable
:
true
,
editor
:
{
xtype
:
'combo'
,
store
:
'taskStatusStore'
,
displayField
:
'category'
,
valueField
:
'category_id'
},
renderer
:
function
(
value
)
{
editor
:
{
xtype
:
'combo'
,
store
:
'taskStatusStore'
,
displayField
:
'category'
,
valueField
:
'category_id'
},
renderer
:
function
(
value
)
{
var
statusStore
=
Ext
.
StoreManager
.
get
(
'taskStatusStore'
);
var
model
=
statusStore
.
getById
(
value
);
return
model
.
get
(
'category'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment