Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin-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
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
Paul Graydon
wendelin-telecom
Commits
d7867c93
Commit
d7867c93
authored
Mar 31, 2023
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ors_wendelin: front page
parent
2913f03d
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1318 additions
and
4 deletions
+1318
-4
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_front_html.html
...TemplateItem/web_page_module/ors_wendelin_front_html.html
+26
-0
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_front_html.xml
...hTemplateItem/web_page_module/ors_wendelin_front_html.xml
+340
-0
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_front_js.js
...PathTemplateItem/web_page_module/ors_wendelin_front_js.js
+270
-0
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_front_js.xml
...athTemplateItem/web_page_module/ors_wendelin_front_js.xml
+336
-0
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_home_page_html.html
...lateItem/web_page_module/ors_wendelin_home_page_html.html
+4
-0
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_home_page_html.xml
...plateItem/web_page_module/ors_wendelin_home_page_html.xml
+338
-0
bt5/ors_wendelin/PathTemplateItem/web_site_module/ors_runner.xml
..._wendelin/PathTemplateItem/web_site_module/ors_runner.xml
+4
-4
No files found.
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_front_html.html
0 → 100644
View file @
d7867c93
<!DOCTYPE html>
<html>
<!--
data-i18n=Others
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
ERP5 PT Frontpage
</title>
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"interface_page.html"
>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"jiodev.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
<script
src=
"domsugar.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_ors_wendelin_front.js"
type=
"text/javascript"
></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_front_html.xml
0 → 100644
View file @
d7867c93
This diff is collapsed.
Click to expand it.
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_front_js.js
0 → 100644
View file @
d7867c93
/*global window, rJS, RSVP, domsugar, SimpleQuery, ComplexQuery, Query,
console, URL, Error */
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80, continue:true */
(
function
()
{
"
use strict
"
;
var
MAIN_SCOPE
=
'
child_scope
'
,
document_reference_matching
=
/^
[
a-zA-Z0-9_.
]
+-.+/
,
document_relative_url_matching
=
/^
[
a-z
]
+
[
a-z_
]
*_module
\/[
a-zA-Z0-9_
]
+/
;
function
SearchError
(
message
,
status_code
)
{
if
((
message
!==
undefined
)
&&
(
typeof
message
!==
"
string
"
))
{
throw
new
TypeError
(
'
You must pass a string.
'
);
}
this
.
message
=
message
||
"
Default Message
"
;
this
.
status_code
=
status_code
||
500
;
}
SearchError
.
prototype
=
new
Error
();
SearchError
.
prototype
.
constructor
=
SearchError
;
function
loadChildGadget
(
gadget
,
gadget_url
,
must_declare
,
callback
)
{
var
queue
,
child_gadget
;
if
(
must_declare
)
{
queue
=
gadget
.
declareGadget
(
gadget_url
,
{
scope
:
MAIN_SCOPE
});
}
else
{
queue
=
gadget
.
getDeclaredGadget
(
MAIN_SCOPE
);
}
return
queue
.
push
(
function
(
result
)
{
child_gadget
=
result
;
if
(
callback
)
{
return
callback
(
result
);
}
})
.
push
(
function
(
result
)
{
if
(
must_declare
)
{
domsugar
(
gadget
.
element
,
[
domsugar
(
'
div
'
,
{
'
class
'
:
'
page
'
},
[
child_gadget
.
element
])
]);
}
return
result
;
});
}
function
createMultipleSimpleOrQuery
(
key
,
value_list
)
{
var
i
,
query_list
=
[];
if
(
!
Array
.
isArray
(
value_list
))
{
value_list
=
[
value_list
];
}
for
(
i
=
0
;
i
<
value_list
.
length
;
i
+=
1
)
{
query_list
.
push
(
new
SimpleQuery
({
key
:
key
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
value_list
[
i
]
}));
}
if
(
value_list
.
len
===
1
)
{
return
query_list
[
0
];
}
return
new
ComplexQuery
({
operator
:
"
OR
"
,
query_list
:
query_list
,
type
:
"
complex
"
});
}
function
getFirstDocumentValue
(
gadget
,
select_list
,
search_dict
)
{
var
query_list
=
Object
.
entries
(
search_dict
).
map
(
function
(
tuple
)
{
return
createMultipleSimpleOrQuery
(
tuple
[
0
],
tuple
[
1
]);
});
return
gadget
.
jio_allDocs
({
select_list
:
select_list
,
query
:
Query
.
objectToSearchText
(
new
ComplexQuery
({
operator
:
"
AND
"
,
type
:
"
complex
"
,
query_list
:
query_list
})
),
limit
:
[
0
,
2
]
})
.
push
(
function
(
result
)
{
if
(
result
.
data
.
rows
.
length
===
0
)
{
throw
new
SearchError
(
'
Can find document matching
'
+
JSON
.
stringify
(
search_dict
),
404
);
}
return
result
.
data
.
rows
[
0
].
value
;
});
}
function
rewriteHTMLPageContent
(
gadget
,
html
)
{
var
container
=
domsugar
(
'
div
'
,
{
html
:
html
}),
i
,
a_list
=
container
.
querySelectorAll
(
'
a
'
),
url_options_list
=
[],
to_modify_a_list
=
[],
href
;
for
(
i
=
0
;
i
<
a_list
.
length
;
i
+=
1
)
{
href
=
a_list
[
i
].
getAttribute
(
'
href
'
);
if
(
href
!==
null
)
{
if
(
document_reference_matching
.
test
(
href
)
&&
(
!
href
.
includes
(
'
/
'
)))
{
// search for a document by reference reference
to_modify_a_list
.
push
(
a_list
[
i
]);
url_options_list
.
push
({
command
:
'
push_history
'
,
options
:
{
page
:
gadget
.
state
.
page
,
jio_key
:
href
}
});
}
else
if
(
document_relative_url_matching
.
test
(
href
)
&&
(
!
href
.
includes
(
'
view
'
)))
{
// search for a document by reference reference
to_modify_a_list
.
push
(
a_list
[
i
]);
url_options_list
.
push
({
command
:
'
push_history
'
,
options
:
{
jio_key
:
href
}
});
}
else
if
((
href
.
indexOf
(
'
#!
'
)
===
0
)
||
(
href
.
indexOf
(
'
#/
'
)
===
0
))
{
// ERP5JS anchor links
a_list
[
i
].
href
=
new
URL
(
href
,
window
.
location
.
href
);
}
else
{
// Compatibility layer with previous site
a_list
[
i
].
href
=
new
URL
(
href
,
'
https://www.erp5.com/group_section/
'
);
}
}
}
return
gadget
.
getUrlForList
(
url_options_list
)
.
push
(
function
(
result_list
)
{
for
(
i
=
0
;
i
<
to_modify_a_list
.
length
;
i
+=
1
)
{
to_modify_a_list
[
i
].
href
=
new
URL
(
result_list
[
i
],
window
.
location
.
href
).
href
;
}
return
container
.
innerHTML
;
});
}
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
updatePanel
"
,
"
updatePanel
"
)
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
return
;
})
////////////////////////////////////////////////////////////////////
// Go
////////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
'
updateHeader
'
,
function
()
{
return
;
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
return
this
.
changeState
({
first_render
:
true
,
page
:
options
.
page
,
jio_key
:
options
.
jio_key
||
'
ORS-WENDELIN.Home.Page
'
,
// Force updating the content
render_timestamp
:
new
Date
().
getTime
()
});
})
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
,
doc
;
return
loadChildGadget
(
gadget
,
"
gadget_editor.html
"
,
modification_dict
.
hasOwnProperty
(
'
first_render
'
),
function
(
editor_gadget
)
{
return
getFirstDocumentValue
(
gadget
,
[
'
relative_url
'
,
'
title
'
,
'
asStrippedHTML
'
],
{
reference
:
gadget
.
state
.
jio_key
,
portal_type
:
'
Web Page
'
,
validation_state
:
[
'
shared
'
,
'
shared_alive
'
,
'
released
'
,
'
released_alive
'
,
'
published
'
,
'
published_alive
'
]
})
.
push
(
function
(
result_dict
)
{
doc
=
result_dict
;
return
rewriteHTMLPageContent
(
gadget
,
result_dict
.
asStrippedHTML
);
})
.
push
(
function
(
text_content
)
{
return
editor_gadget
.
render
({
"
editor
"
:
"
fck_editor
"
,
"
editable
"
:
false
,
"
maximize
"
:
"
auto
"
,
"
value
"
:
text_content
});
})
.
push
(
function
()
{
return
gadget
.
getUrlForList
([
{
command
:
'
history_previous
'
},
{
command
:
'
display_erp5_action_with_history
'
,
options
:
{
jio_key
:
doc
.
relative_url
,
page
:
'
view_editor
'
,
editable
:
true
}}
]);
})
.
push
(
function
(
url_list
)
{
return
gadget
.
updateHeader
({
page_title
:
'
Wiki:
'
+
doc
.
title
,
page_icon
:
'
puzzle-piece
'
,
front_url
:
url_list
[
0
],
edit_url
:
url_list
[
1
]
});
})
/*
.push(function () {
return gadget.updatePanel({
erp5_document: {
'_links': {
'action_object_view': [{
"name": "view",
"title": "View",
"href": "view",
"icon": null
}]
}
},
jio_key: doc.relative_url,
editable: true,
view: null
});
})
*/
.
push
(
undefined
,
function
(
error
)
{
if
((
error
instanceof
SearchError
)
&&
(
error
.
status_code
===
404
))
{
// redirect to a search, to allow people understanding
// why the list is broken
return
gadget
.
redirect
({
command
:
"
display_with_history
"
,
options
:
{
page
:
"
search
"
,
extended_search
:
Query
.
objectToSearchText
(
createMultipleSimpleOrQuery
(
'
reference
'
,
gadget
.
state
.
jio_key
)
)
}
},
false
);
}
throw
error
;
});
}
);
});
}());
\ No newline at end of file
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_front_js.xml
0 → 100644
View file @
d7867c93
This diff is collapsed.
Click to expand it.
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_home_page_html.html
0 → 100644
View file @
d7867c93
<h1>
Welcome to ORS Wendelin
</h1>
<li>
ORS Device List:
<a
href=
"#!push_history?p.editable=true&n.jio_key=data_acquisition_unit_module"
>
Link
</a></li>
\ No newline at end of file
bt5/ors_wendelin/PathTemplateItem/web_page_module/ors_wendelin_home_page_html.xml
0 → 100644
View file @
d7867c93
This diff is collapsed.
Click to expand it.
bt5/ors_wendelin/PathTemplateItem/web_site_module/ors_runner.xml
View file @
d7867c93
...
...
@@ -344,7 +344,7 @@
</item>
<item>
<key>
<string>
configuration_frontpage_gadget_url
</string>
</key>
<value>
<string>
worklis
t
</string>
</value>
<value>
<string>
ors_wendelin_fron
t
</string>
</value>
</item>
<item>
<key>
<string>
configuration_hateoas_url
</string>
</key>
...
...
@@ -651,7 +651,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<
string>
zope
</string
>
</value>
<value>
<
unicode>
zope
</unicode
>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -665,7 +665,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1007.2
3969.29369.58589
</string>
</value>
<value>
<string>
1007.2
7209.27755.44270
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -685,7 +685,7 @@
</tuple>
<state>
<tuple>
<float>
1680
077049.55
</float>
<float>
1680
271528.11
</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