Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
telecom
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
telecom
Commits
6658c0da
Commit
6658c0da
authored
Jul 31, 2018
by
Roque Porchetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin_telecom_UI: render metadata of csv files
parent
add91219
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
24 deletions
+38
-24
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_html.html
...eItem/web_page_module/fif_gadget_erp5_page_file_html.html
+1
-1
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_html.xml
...teItem/web_page_module/fif_gadget_erp5_page_file_html.xml
+2
-2
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_js.js
...plateItem/web_page_module/fif_gadget_erp5_page_file_js.js
+33
-19
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_js.xml
...lateItem/web_page_module/fif_gadget_erp5_page_file_js.xml
+2
-2
No files found.
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_html.html
View file @
6658c0da
...
...
@@ -22,7 +22,7 @@
<div
class=
"center"
>
<div
class=
"ui-field-contain"
style=
"margin-top:25px"
>
<label
for=
"field_my_title"
id=
"text_content_title"
></label>
<div
style=
"white-space:pre-wrap"
id=
"text_content"
/
>
<div
style=
"white-space:pre-wrap"
id=
"text_content"
><table
style=
"width:100%"
id=
"csv_table"
></table></div
>
</div>
</div>
</body>
...
...
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_html.xml
View file @
6658c0da
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
969.17
679.31334.49186
</string>
</value>
<value>
<string>
969.17
813.55030.4608
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>
15330
42241.37
</float>
<float>
15330
50893.62
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_js.js
View file @
6658c0da
...
...
@@ -41,37 +41,51 @@
var
view_dict
=
{},
group_list
=
[],
metadata
=
gadget
.
state
.
metadata
;
view_dict
[
"
my_title
"
]
=
{
view_dict
.
my_title
=
{
"
title
"
:
"
Title
"
,
"
default
"
:
gadget
.
state
.
document_title
,
"
key
"
:
"
field_my_title
"
};
group_list
.
push
([
"
left
"
,
[[
"
my_title
"
]]])
view_dict
[
"
my_reference
"
]
=
{
group_list
.
push
([
"
left
"
,
[[
"
my_title
"
]]])
;
view_dict
.
my_reference
=
{
"
title
"
:
"
Reference
"
,
"
default
"
:
gadget
.
state
.
reference
,
"
key
"
:
"
field_my_reference
"
};
group_list
.
push
([
"
right
"
,
[[
"
my_reference
"
]]])
if
(
metadata
!=
null
)
{
group_list
.
push
([
"
right
"
,
[[
"
my_reference
"
]]]);
if
(
metadata
!=
=
undefined
)
{
if
(
Object
.
keys
(
metadata
).
length
==
1
)
{
var
key
=
Object
.
keys
(
metadata
)[
0
]
document
.
getElementById
(
"
text_content_title
"
).
innerHTML
=
key
;
document
.
getElementById
(
"
text_content
"
).
innerHTML
=
metadata
[
key
];
var
akey
=
Object
.
keys
(
metadata
)[
0
];
if
(
akey
==
"
csv
"
)
{
var
table
=
document
.
getElementById
(
"
csv_table
"
),
array
=
metadata
[
akey
];
document
.
getElementById
(
"
text_content_title
"
).
innerHTML
=
"
CSV file content sample:
"
;
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
var
newRow
=
table
.
insertRow
(
table
.
length
);
for
(
var
j
=
0
;
j
<
array
[
i
].
length
;
j
++
)
{
var
cell
=
newRow
.
insertCell
(
j
);
cell
.
innerHTML
=
array
[
i
][
j
];
}
}
}
else
{
document
.
getElementById
(
"
text_content_title
"
).
innerHTML
=
akey
;
document
.
getElementById
(
"
text_content
"
).
innerHTML
=
metadata
[
akey
];
}
}
else
{
var
i
=
0
var
nkey
=
0
;
for
(
var
key
in
metadata
)
{
if
(
metadata
.
hasOwnProperty
(
key
))
{
var
side
=
(
i
%
2
==
0
)
?
"
left
"
:
"
right
"
;
view_dict
[
key
]
=
{
"
title
"
:
key
,
"
default
"
:
metadata
[
key
],
"
key
"
:
"
field_
"
+
key
};
group_list
.
push
([
side
,[[
key
]]])
}
i
++
;
if
(
metadata
.
hasOwnProperty
(
key
))
{
var
side
=
(
nkey
%
2
===
0
)
?
"
left
"
:
"
right
"
;
view_dict
[
key
]
=
{
"
title
"
:
key
,
"
default
"
:
metadata
[
key
],
"
key
"
:
"
field_
"
+
key
};
group_list
.
push
([
side
,
[[
key
]]]);
}
nkey
++
;
}
}
}
...
...
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_js.xml
View file @
6658c0da
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
969.17
646.40993.45789
</string>
</value>
<value>
<string>
969.17
819.38822.28450
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>
15330
40886.97
</float>
<float>
15330
50930.1
</float>
<string>
UTC
</string>
</tuple>
</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