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
f6f445d1
Commit
f6f445d1
authored
Jul 29, 2018
by
Roque Porchetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin_telecom_UI: list data streams instead of arrays
parent
a3eedef3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
29 deletions
+98
-29
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
+28
-24
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
+65
-0
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_pt_action_js.xml
...lateItem/web_page_module/fif_gadget_erp5_pt_action_js.xml
+2
-2
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/gadget_fif_page_list_file_js.js
...plateItem/web_page_module/gadget_fif_page_list_file_js.js
+1
-1
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/gadget_fif_page_list_file_js.xml
...lateItem/web_page_module/gadget_fif_page_list_file_js.xml
+2
-2
No files found.
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_js.js
View file @
f6f445d1
...
...
@@ -54,21 +54,24 @@
};
group_list
.
push
([
"
right
"
,[[
"
my_reference
"
]]])
if
(
metadata
!=
null
)
{
for
(
var
i
=
0
,
entry
;
entry
=
metadata
[
i
];
i
++
)
{
var
key
=
"
my_
"
+
entry
[
0
].
replace
(
"
"
,
"
_
"
),
side
=
(
i
%
2
==
0
)
?
"
left
"
:
"
right
"
;
view_dict
[
key
]
=
{
"
title
"
:
entry
[
0
],
"
default
"
:
entry
[
1
],
"
key
"
:
"
field_
"
+
key
};
group_list
.
push
([
side
,[[
key
]]])
var
i
=
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
++
;
}
}
else
{
view_dict
[
"
my_metadata
"
]
=
{
"
title
"
:
"
Metadata
"
,
"
default
"
:
"
No metadata available for this type of file yet
"
,
"
default
"
:
"
Could not find metadata for this file
"
,
"
key
"
:
"
field_my_metadata
"
};
group_list
.
push
([
"
left
"
,[[
"
my_metadata
"
]]])
...
...
@@ -90,9 +93,15 @@
.
declareMethod
(
"
getDescriptorContent
"
,
function
(
descriptorReference
)
{
var
url
=
"
/erp5/getDescriptorHTMLContent?reference=
"
+
descriptorReference
,
xmlHttp
=
new
XMLHttpRequest
();
xmlHttp
.
open
(
"
GET
"
,
url
,
false
);
xmlHttp
.
send
(
null
);
return
xmlHttp
.
responseText
;
try
{
xmlHttp
.
open
(
"
GET
"
,
url
,
false
);
xmlHttp
.
send
(
null
);
return
xmlHttp
.
responseText
;
}
catch
(
err
)
{
console
.
log
(
"
URL error:
"
+
err
)
return
""
;
}
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
...
...
@@ -108,19 +117,14 @@
});
})
.
declareService
(
function
()
{
var
content
=
this
.
state
.
textcontent
.
replace
(
'
<table class="table table-hover">
'
,
'
<table id="table_custom_id" class="table table-hover">
'
),
metadata
=
[];
document
.
getElementById
(
"
html_report
"
).
innerHTML
=
content
;
if
(
document
.
getElementById
(
"
table_custom_id
"
)
===
null
)
{
document
.
getElementById
(
"
html_report
"
).
innerHTML
=
""
;
return
;
try
{
var
json_dict
=
JSON
.
parse
(
this
.
state
.
textcontent
)
}
var
table
=
document
.
getElementById
(
"
table_custom_id
"
);
document
.
getElementById
(
"
html_report
"
).
innerHTML
=
""
;
for
(
var
i
=
0
,
row
;
row
=
table
.
rows
[
i
];
i
++
)
{
metadata
.
push
([
row
.
cells
[
0
].
innerHTML
,
row
.
cells
[
1
].
innerHTML
]);
catch
(
err
)
{
console
.
log
(
"
Error reading Data Descriptor JSON:
"
+
err
)
return
}
return
this
.
changeState
({
"
metadata
"
:
metadata
});
return
this
.
changeState
({
"
metadata
"
:
json_dict
});
});
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
jIO
));
...
...
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_page_file_js.xml
View file @
f6f445d1
...
...
@@ -138,6 +138,12 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -197,4 +203,63 @@
</tuple>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
969.15125.3949.58658
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1532889234.5
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/fif_gadget_erp5_pt_action_js.xml
View file @
f6f445d1
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.467.36915.6741
</string>
</value>
<value>
<string>
96
8.25389.60346.26402
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
15
08934953.6
2
</float>
<float>
15
29660655.7
2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/gadget_fif_page_list_file_js.js
View file @
f6f445d1
...
...
@@ -65,7 +65,7 @@
"
key
"
:
"
field_listbox
"
,
"
lines
"
:
15
,
"
list_method
"
:
"
portal_catalog
"
,
"
query
"
:
"
urn:jio:allDocs?query=portal_type%3A%22Data+
Array
%22+AND+validation_state%3A%22validated%22+AND+reference%3A%22
"
+
dataset
+
"
%2F%25%22
"
,
"
query
"
:
"
urn:jio:allDocs?query=portal_type%3A%22Data+
Stream
%22+AND+validation_state%3A%22validated%22+AND+reference%3A%22
"
+
dataset
+
"
%2F%25%22
"
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
column_list
,
...
...
bt5/erp5_wendelin_telecom_UI/PathTemplateItem/web_page_module/gadget_fif_page_list_file_js.xml
View file @
f6f445d1
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
969.
6188.36317.22374
</string>
</value>
<value>
<string>
969.
10372.38821.30208
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
1532
525619.7
</float>
<float>
1532
802432.68
</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