Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mynij
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
Mynij
mynij
Commits
996f19b9
Commit
996f19b9
authored
Oct 04, 2021
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_mynij_search: Show magnet URI in html link element
parent
2fcf047d
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
968 additions
and
1 deletion
+968
-1
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_field_link_html.html
...em/web_page_module/gadget_erp5_mynij_field_link_html.html
+17
-0
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_field_link_html.xml
...tem/web_page_module/gadget_erp5_mynij_field_link_html.xml
+334
-0
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_field_link_js.js
...teItem/web_page_module/gadget_erp5_mynij_field_link_js.js
+40
-0
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_field_link_js.xml
...eItem/web_page_module/gadget_erp5_mynij_field_link_js.xml
+330
-0
bt5/erp5_web_mynij_search/SkinTemplateItem/portal_skins/erp5_mynij/MynijSearchCollection_view.xml
...em/portal_skins/erp5_mynij/MynijSearchCollection_view.xml
+1
-1
bt5/erp5_web_mynij_search/SkinTemplateItem/portal_skins/erp5_mynij/MynijSearchCollection_view/your_magnet_uri.xml
...erp5_mynij/MynijSearchCollection_view/your_magnet_uri.xml
+246
-0
No files found.
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_field_link_html.html
0 → 100644
View file @
996f19b9
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
ERP5 Link
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_erp5_mynij_field_link.js"
type=
"text/javascript"
></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_field_link_html.xml
0 → 100644
View file @
996f19b9
This diff is collapsed.
Click to expand it.
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_field_link_js.js
0 → 100644
View file @
996f19b9
/*global window, rJS, document*/
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
document
)
{
"
use strict
"
;
rJS
(
window
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
state_dict
=
{
href
:
options
.
value
||
options
.
default
,
alt
:
options
.
description
||
options
.
key
};
return
this
.
changeState
(
state_dict
);
})
.
onStateChange
(
function
()
{
var
gadget
=
this
,
link
=
document
.
createElement
(
'
a
'
),
uri
=
gadget
.
state
.
href
.
slice
(
0
,
60
);
if
(
uri
.
length
<
gadget
.
state
.
href
.
length
)
uri
+=
"
...
"
;
link
.
href
=
gadget
.
state
.
href
;
link
.
title
=
gadget
.
state
.
alt
;
link
.
textContent
=
gadget
.
state
.
title
||
uri
;
while
(
gadget
.
element
.
firstChild
)
{
gadget
.
element
.
removeChild
(
gadget
.
element
.
lastChild
);
}
gadget
.
element
.
append
(
link
);
})
.
declareMethod
(
'
getContent
'
,
function
()
{
// An Link field never modifies a document
return
{};
})
.
declareMethod
(
'
checkValidity
'
,
function
()
{
return
true
;
});
}(
window
,
rJS
,
document
));
\ No newline at end of file
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_field_link_js.xml
0 → 100644
View file @
996f19b9
This diff is collapsed.
Click to expand it.
bt5/erp5_web_mynij_search/SkinTemplateItem/portal_skins/erp5_mynij/MynijSearchCollection_view.xml
View file @
996f19b9
...
...
@@ -82,7 +82,7 @@
<string>
my_logo
</string>
<string>
your_logo
</string>
<string>
my_seed
</string>
<string>
my
_magnet_uri
</string>
<string>
your
_magnet_uri
</string>
<string>
my_status
</string>
</list>
</value>
...
...
bt5/erp5_web_mynij_search/SkinTemplateItem/portal_skins/erp5_mynij/MynijSearchCollection_view/your_magnet_uri.xml
0 → 100644
View file @
996f19b9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"GadgetField"
module=
"Products.ERP5Form.GadgetField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_magnet_uri
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
<item>
<key>
<string>
no_validator
</string>
</key>
<value>
<string>
Does not support this operation.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
data_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
js_sandbox
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
validator_field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
validator_form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
data_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
js_sandbox
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
validator_field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
validator_form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
data_url
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Magnet URI
</string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string>
gadget_erp5_mynij_field_link.html
</string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
js_sandbox
</string>
</key>
<value>
<string>
magnet_link
</string>
</value>
</item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Magnet URI
</string>
</value>
</item>
<item>
<key>
<string>
validator_field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
validator_form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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