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
Labels
Merge Requests
140
Merge Requests
140
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
8fcfe975
Commit
8fcfe975
authored
Feb 28, 2020
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_project_ui: don't show number of elements (0) until info is fetch
parent
6eb5b706
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
43 deletions
+43
-43
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_css.css
...eItem/web_page_module/project_gadget_page_project_css.css
+2
-9
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_css.xml
...eItem/web_page_module/project_gadget_page_project_css.xml
+2
-2
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_front_page_js.js
..._page_module/project_gadget_page_project_front_page_js.js
+37
-30
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_front_page_js.xml
...page_module/project_gadget_page_project_front_page_js.xml
+2
-2
No files found.
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_css.css
View file @
8fcfe975
...
@@ -102,7 +102,8 @@ div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .ui-icon-spinne
...
@@ -102,7 +102,8 @@ div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .ui-icon-spinne
animation
:
spin
0.5s
infinite
linear
;
animation
:
spin
0.5s
infinite
linear
;
}
}
div
[
data-gadget-url
$
=
"gadget_erp5_page_project_front_page.html"
]
.ui-icon-spinner.ui-hidden
{
div
[
data-gadget-url
$
=
"gadget_erp5_page_project_page.html"
]
.ui-hidden
,
div
[
data-gadget-url
$
=
"gadget_erp5_page_project_front_page.html"
]
.ui-hidden
{
visibility
:
hidden
;
visibility
:
hidden
;
}
}
...
@@ -152,14 +153,6 @@ input[type="submit"] {
...
@@ -152,14 +153,6 @@ input[type="submit"] {
min-width
:
8em
;
min-width
:
8em
;
}
}
.gadget-content
svg
.test-result.ui-hidden
{
visibility
:
hidden
;
}
.gadget-content
svg
.test-result
path
.ui-hidden
{
visibility
:
hidden
;
}
.gadget-content
svg
.test-result
{
.gadget-content
svg
.test-result
{
margin-right
:
7px
;
margin-right
:
7px
;
}
}
...
...
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_css.xml
View file @
8fcfe975
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.9
353.43613.6587
</string>
</value>
<value>
<string>
982.9
523.61078.50312
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -260,7 +260,7 @@
...
@@ -260,7 +260,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15828
83147.24
</float>
<float>
15828
94069.61
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_front_page_js.js
View file @
8fcfe975
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
const
STATUS_SPAN
=
"
status
"
;
const
STATUS_SPAN
=
"
status
"
;
const
TOTAL_SPAN
=
"
total
"
;
const
TOTAL_SPAN
=
"
total
"
;
const
OUTDATED_SPAN
=
"
outdated
"
;
const
OUTDATED_SPAN
=
"
outdated
"
;
const
NUMBER_SPAN
=
"
number
"
;
const
QUERY_LIMIT
=
100000
;
const
QUERY_LIMIT
=
100000
;
const
SUPERVISOR_FIELD_TITLE
=
"
Supervisor
"
;
const
SUPERVISOR_FIELD_TITLE
=
"
Supervisor
"
;
//XXX hardcoded one year old date to define outdated elements
//XXX hardcoded one year old date to define outdated elements
...
@@ -104,7 +105,8 @@
...
@@ -104,7 +105,8 @@
function
renderProjectLine
(
project_id
,
portal_type
,
total_count
,
outdated_count
)
{
function
renderProjectLine
(
project_id
,
portal_type
,
total_count
,
outdated_count
)
{
var
total_span
=
document
.
getElementById
(
getProjectSpanId
(
project_id
,
portal_type
,
TOTAL_SPAN
)),
var
total_span
=
document
.
getElementById
(
getProjectSpanId
(
project_id
,
portal_type
,
TOTAL_SPAN
)),
outdated_span
=
document
.
getElementById
(
getProjectSpanId
(
project_id
,
portal_type
,
OUTDATED_SPAN
)),
outdated_span
=
document
.
getElementById
(
getProjectSpanId
(
project_id
,
portal_type
,
OUTDATED_SPAN
)),
status_span
=
document
.
getElementById
(
getProjectSpanId
(
project_id
,
portal_type
,
STATUS_SPAN
));
status_span
=
document
.
getElementById
(
getProjectSpanId
(
project_id
,
portal_type
,
STATUS_SPAN
)),
number_span
=
document
.
getElementById
(
getProjectSpanId
(
project_id
,
portal_type
,
NUMBER_SPAN
));
total_span
.
textContent
=
parseInt
(
total_span
.
textContent
,
RADIX
)
+
total_count
;
total_span
.
textContent
=
parseInt
(
total_span
.
textContent
,
RADIX
)
+
total_count
;
outdated_span
.
textContent
=
parseInt
(
outdated_span
.
textContent
,
RADIX
)
+
outdated_count
;
outdated_span
.
textContent
=
parseInt
(
outdated_span
.
textContent
,
RADIX
)
+
outdated_count
;
if
(
outdated_count
>
0
)
{
if
(
outdated_count
>
0
)
{
...
@@ -113,6 +115,7 @@
...
@@ -113,6 +115,7 @@
}
else
if
(
!
status_span
.
classList
.
value
.
includes
(
STATUS_NOT_OK
))
{
}
else
if
(
!
status_span
.
classList
.
value
.
includes
(
STATUS_NOT_OK
))
{
status_span
.
classList
.
add
(
STATUS_OK
);
status_span
.
classList
.
add
(
STATUS_OK
);
}
}
number_span
.
classList
.
remove
(
"
ui-hidden
"
);
}
}
function
renderProjectList
(
gadget
,
project_list
)
{
function
renderProjectList
(
gadget
,
project_list
)
{
...
@@ -130,7 +133,7 @@
...
@@ -130,7 +133,7 @@
outdated
;
outdated
;
function
createProjectHtmlElement
(
project_id
,
project_title
,
project_url
,
supervisor
)
{
function
createProjectHtmlElement
(
project_id
,
project_title
,
project_url
,
supervisor
)
{
var
project_
element
=
document
.
createElement
(
'
li
'
),
var
project_
li
=
document
.
createElement
(
'
li
'
),
box_div
=
document
.
createElement
(
'
div
'
),
box_div
=
document
.
createElement
(
'
div
'
),
title_div
=
document
.
createElement
(
'
div
'
),
title_div
=
document
.
createElement
(
'
div
'
),
info_div
=
document
.
createElement
(
'
div
'
),
info_div
=
document
.
createElement
(
'
div
'
),
...
@@ -167,39 +170,43 @@
...
@@ -167,39 +170,43 @@
info_div
.
appendChild
(
right_div
);
info_div
.
appendChild
(
right_div
);
box_div
.
appendChild
(
title_div
);
box_div
.
appendChild
(
title_div
);
box_div
.
appendChild
(
info_div
);
box_div
.
appendChild
(
info_div
);
project_
element
.
appendChild
(
box_div
);
project_
li
.
appendChild
(
box_div
);
return
[
project_
element
,
left_info_div
];
return
[
project_
li
,
left_info_div
];
}
}
function
createProjectLineHtmlElement
(
project_id
,
portal_type
,
title
,
total_count
,
out_count
,
status_color
)
{
function
createProjectLineHtmlElement
(
project_id
,
portal_type
,
title
,
total_count
,
out_count
,
status_color
)
{
var
line_div
=
document
.
createElement
(
'
div
'
),
var
line_div
=
document
.
createElement
(
'
div
'
),
status
=
document
.
createElement
(
'
span
'
),
status_span
=
document
.
createElement
(
'
span
'
),
name
=
document
.
createElement
(
'
span
'
),
name_span
=
document
.
createElement
(
'
span
'
),
outdated
=
document
.
createElement
(
'
span
'
),
number_span
=
document
.
createElement
(
'
span
'
),
total
=
document
.
createElement
(
'
span
'
),
outdated_span
=
document
.
createElement
(
'
span
'
),
open_bracket
=
document
.
createElement
(
'
span
'
),
total_span
=
document
.
createElement
(
'
span
'
),
close_bracket
=
document
.
createElement
(
'
span
'
);
open_bracket_span
=
document
.
createElement
(
'
span
'
),
close_bracket_span
=
document
.
createElement
(
'
span
'
);
line_div
.
classList
.
add
(
"
project-line
"
);
line_div
.
classList
.
add
(
"
project-line
"
);
status
.
classList
.
add
(
STATUS_SPAN
);
status_span
.
classList
.
add
(
STATUS_SPAN
);
status
.
classList
.
add
(
status_color
);
status_span
.
classList
.
add
(
status_color
);
status
.
classList
.
add
(
"
margined
"
);
status_span
.
classList
.
add
(
"
margined
"
);
status
.
setAttribute
(
"
id
"
,
getProjectSpanId
(
project_id
,
portal_type
,
STATUS_SPAN
));
status_span
.
setAttribute
(
"
id
"
,
getProjectSpanId
(
project_id
,
portal_type
,
STATUS_SPAN
));
name
.
classList
.
add
(
"
name
"
);
name_span
.
classList
.
add
(
"
name
"
);
name
.
classList
.
add
(
"
margined
"
);
name_span
.
classList
.
add
(
"
margined
"
);
name
.
innerHTML
=
title
;
name_span
.
innerHTML
=
title
;
total
.
classList
.
add
(
"
margined
"
);
total_span
.
classList
.
add
(
"
margined
"
);
total
.
innerHTML
=
total_count
;
total_span
.
innerHTML
=
total_count
;
total
.
setAttribute
(
"
id
"
,
getProjectSpanId
(
project_id
,
portal_type
,
TOTAL_SPAN
));
total_span
.
setAttribute
(
"
id
"
,
getProjectSpanId
(
project_id
,
portal_type
,
TOTAL_SPAN
));
outdated
.
innerHTML
=
out_count
;
outdated_span
.
innerHTML
=
out_count
;
outdated
.
setAttribute
(
"
id
"
,
getProjectSpanId
(
project_id
,
portal_type
,
OUTDATED_SPAN
));
outdated_span
.
setAttribute
(
"
id
"
,
getProjectSpanId
(
project_id
,
portal_type
,
OUTDATED_SPAN
));
line_div
.
appendChild
(
status
);
open_bracket_span
.
innerHTML
=
"
(
"
;
line_div
.
appendChild
(
name
);
close_bracket_span
.
innerHTML
=
"
)
"
;
line_div
.
appendChild
(
total
);
number_span
.
appendChild
(
total_span
);
open_bracket
.
innerHTML
=
"
(
"
;
number_span
.
appendChild
(
open_bracket_span
);
close_bracket
.
innerHTML
=
"
)
"
;
number_span
.
appendChild
(
outdated_span
);
line_div
.
appendChild
(
open_bracket
);
number_span
.
appendChild
(
close_bracket_span
);
line_div
.
appendChild
(
outdated
);
number_span
.
setAttribute
(
"
id
"
,
getProjectSpanId
(
project_id
,
portal_type
,
NUMBER_SPAN
));
line_div
.
appendChild
(
close_bracket
);
number_span
.
classList
.
add
(
"
ui-hidden
"
);
line_div
.
appendChild
(
status_span
);
line_div
.
appendChild
(
name_span
);
line_div
.
appendChild
(
number_span
);
return
line_div
;
return
line_div
;
}
}
...
...
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_front_page_js.xml
View file @
8fcfe975
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.
7901.64054.59665
</string>
</value>
<value>
<string>
982.
9532.59635.1928
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1582
796562.97
</float>
<float>
1582
894107.51
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
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