Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
erp5
Commits
f74cc8c9
Commit
f74cc8c9
authored
May 31, 2023
by
Eteri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: add link that redirects to related manufacturing order to the gantt lightbox
parent
6e39bbdf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
12 deletions
+51
-12
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_manufacturing_gantt_js.js
...web_page_module/gadget_officejs_manufacturing_gantt_js.js
+21
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_manufacturing_gantt_js.xml
...eb_page_module/gadget_officejs_manufacturing_gantt_js.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_widget_gantt_dhtmlx_js.js
...web_page_module/gadget_officejs_widget_gantt_dhtmlx_js.js
+23
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_widget_gantt_dhtmlx_js.xml
...eb_page_module/gadget_officejs_widget_gantt_dhtmlx_js.xml
+4
-4
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_manufacturing_gantt_js.js
View file @
f74cc8c9
...
...
@@ -30,6 +30,7 @@
// acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
...
...
@@ -44,7 +45,17 @@
console
.
log
(
"
gantt option_dict
"
,
option_dict
.
value
);
gadget
.
renderGantt
();
//Launched as service, not blocking
})
return
gadget
.
getUrlFor
({
command
:
'
display
'
,
absolute_url
:
true
})
.
push
(
function
(
dialog_url
)
{
// we used getURlFor to get the whole absolute url, then we hack it
var
root_url
=
dialog_url
.
split
(
"
#
"
)[
0
];
gadget
.
property_dict
.
root_url
=
root_url
;
console
.
log
(
root_url
);
})
})
.
declareJob
(
"
renderGantt
"
,
function
()
{
var
gadget
=
this
,
option_dict
=
gadget
.
property_dict
.
option_dict
;
...
...
@@ -79,6 +90,7 @@
console
.
log
(
"
order_list.length
"
,
order_list
.
length
);
for
(
i
=
0
;
i
<
order_list
.
length
;
i
=
i
+
1
)
{
order
=
order_list
[
i
].
value
;
order
.
path
=
order_list
[
i
].
id
;
order
.
gantt_color
=
"
rgb(208, 72, 72)
"
;
empty_causality_delivery_list
.
push
(
order
);
}
...
...
@@ -107,6 +119,7 @@
delivery_list
=
delivery_list
.
data
.
rows
;
for
(
i
=
0
;
i
<
delivery_list
.
length
;
i
=
i
+
1
)
{
delivery
=
delivery_list
[
i
].
value
;
delivery
.
path
=
delivery_list
[
i
].
id
;
delivery
.
gantt_color
=
"
#3db9d3
"
;
console
.
log
(
"
delivery.causality_uid
"
,
delivery
.
causality_uid
);
if
((
delivery
.
causality_uid
||
0
)
>
0
)
{
...
...
@@ -143,7 +156,9 @@
initial_delivery_list
=
delivery_list
.
data
.
rows
;
delivery_list
=
[];
for
(
i
=
0
;
i
<
initial_delivery_list
.
length
;
i
=
i
+
1
)
{
initial_delivery_list
[
i
].
value
.
path
=
initial_delivery_list
[
i
].
id
;
delivery_list
.
push
(
initial_delivery_list
[
i
].
value
);
}
for
(
i
=
0
;
i
<
gadget
.
property_dict
.
empty_causality_delivery_list
.
length
;
i
=
i
+
1
)
{
console
.
log
(
"
pushing empty causality delivery
"
,
gadget
.
property_dict
.
empty_causality_delivery_list
[
i
]);
...
...
@@ -159,7 +174,8 @@
'
stop_date
'
:
new
Date
(
delivery
.
stop_date
),
'
title
'
:
delivery
.
causality_title
,
'
type
'
:
'
project
'
,
'
id
'
:
delivery
.
causality_uid
};
'
id
'
:
delivery
.
causality_uid
,
'
path
'
:
gadget
.
property_dict
.
root_url
+
delivery
.
path
};
causality_data
.
start_date
=
new
Date
(
Math
.
min
.
apply
(
null
,
[
causality_data
.
start_date
,
new
Date
(
delivery
.
start_date
)]));
causality_data
.
stop_date
=
new
Date
(
Math
.
max
.
apply
(
...
...
@@ -175,7 +191,9 @@
'
id
'
:
delivery
.
uid
,
'
start_date
'
:
delivery
.
start_date
,
'
stop_date
'
:
delivery
.
stop_date
,
'
background_color
'
:
delivery
.
gantt_color
};
'
background_color
'
:
delivery
.
gantt_color
,
'
path
'
:
gadget
.
property_dict
.
root_url
+
delivery
.
path
};
if
(
delivery
.
causality_uid
!==
undefined
)
{
delivery_data
.
parent_id
=
delivery
.
causality_uid
;
}
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_manufacturing_gantt_js.xml
View file @
f74cc8c9
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
superseb
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.54927.26212.30361
</string>
</value>
<value>
<string>
1008.50670.60071.10939
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
1
512117612.4
</float>
<float>
1
685525353.2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_widget_gantt_dhtmlx_js.js
View file @
f74cc8c9
...
...
@@ -42,6 +42,7 @@
data
=
data_list
[
i
];
task
.
id
=
data
.
id
;
task
.
text
=
data
.
title
;
task
.
path
=
data
.
path
.
replace
(
"
web_site_module/renderjs_runner/
"
,
""
);
// for now redirect to old UI
// Be Careful, DHTMLX seems less and less open source, and nice features when we
// have a type "project" is unfortunately available only with paid license. Though
// We will still use it to set a different color for this kind of task
...
...
@@ -186,6 +187,27 @@
}
}
// Extend the existing lightbox configuration
var
extendedSections
=
gantt
.
config
.
lightbox
.
sections
.
slice
();
// Copy the existing sections
// Add the custom link section with a label
var
linkSection
=
{
name
:
"
link_section
"
,
height
:
30
,
map_to
:
"
path
"
,
type
:
"
template
"
// Use the "template" type for the link section
};
extendedSections
.
push
(
linkSection
);
gantt
.
locale
.
labels
.
section_link_section
=
"
Manufacturing Execution
"
;
gantt
.
attachEvent
(
"
onBeforeLightbox
"
,
function
(
id
)
{
var
task
=
gantt
.
getTask
(
id
);
task
.
path
=
"
<span id='path'>Jump to </span>
"
+
'
<a href="
'
+
task
.
path
+
'
" target="_blank">related manufacturing execution</a>
'
;
return
true
;
});
gantt
.
config
.
lightbox
.
sections
=
extendedSections
;
// Interaction when a box is moved. Only for demo purpose, we might
// later find some ways to save changes
gantt
.
attachEvent
(
"
onAfterTaskDrag
"
,
function
(
id
,
mode
)
{
...
...
@@ -202,9 +224,8 @@
});
gantt
.
parse
(
gantt_configuration
.
data
);
});
}(
window
,
rJS
,
RSVP
,
gantt
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_widget_gantt_dhtmlx_js.xml
View file @
f74cc8c9
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
superseb
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.40847.2383.45909
</string>
</value>
<value>
<string>
1008.50679.60785.62600
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,8 +264,8 @@
</tuple>
<state>
<tuple>
<float>
1
511357707.47
</float>
<string>
GMT+1
</string>
<float>
1
685525515.89
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
...
...
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