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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Vincent Bechu
erp5
Commits
ef83c38b
Commit
ef83c38b
authored
Oct 28, 2016
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: add empty panel to contributor
parent
63e2db68
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
342 additions
and
29 deletions
+342
-29
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_no_panel.html.html
...mplateItem/web_page_module/gadget_erp5_no_panel.html.html
+23
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_no_panel.html.xml
...emplateItem/web_page_module/gadget_erp5_no_panel.html.xml
+115
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_no_panel.js.js
...thTemplateItem/web_page_module/gadget_erp5_no_panel.js.js
+52
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_no_panel.js.xml
...hTemplateItem/web_page_module/gadget_erp5_no_panel.js.xml
+111
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_contributor.js.html
...Item/web_page_module/gadget_erp5_page_contributor.js.html
+40
-28
bt5/erp5_officejs/PathTemplateItem/web_site_module/renderjs_contributor.xml
...PathTemplateItem/web_site_module/renderjs_contributor.xml
+1
-1
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_no_panel.html.html
0 → 100644
View file @
ef83c38b
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
ERP5 Panel
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_erp5_no_panel.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"jqm-navmenu-panel"
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_no_panel.html.xml
0 → 100644
View file @
ef83c38b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_no_panel.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_erp5_no_panel.html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget ERP5 No Panel
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_no_panel.js.js
0 → 100644
View file @
ef83c38b
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS */
(
function
(
window
,
rJS
)
{
"
use strict
"
;
/////////////////////////////////////////////////////////////////
// temlates
/////////////////////////////////////////////////////////////////
// Precompile templates while loading the first gadget instance
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
// Init local properties
.
ready
(
function
(
g
)
{
g
.
props
=
{};
})
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
// Assign the element to a variable
.
ready
(
function
(
g
)
{
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
toggle
'
,
function
()
{
return
;
})
.
declareMethod
(
'
close
'
,
function
()
{
return
;
})
.
declareMethod
(
'
render
'
,
function
()
{
return
;
});
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
}(
window
,
rJS
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_no_panel.js.xml
0 → 100644
View file @
ef83c38b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_no_panel.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_erp5_no_panel.js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget ERP5 No Panel JS
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_erp5_page_contributor.js.html
View file @
ef83c38b
...
...
@@ -15,7 +15,7 @@
url_list =
param.url_list.split('\n');
for
(i =
0;
i
<
url_list
.
length
;
i
+=
1
)
{
if
(
i
>
0) {
query += "
AND
";
query += "
OR
";
}
query += 'id: "' + url_list[i] + '"';
}
...
...
@@ -25,17 +25,30 @@
return gadget.notifySubmitting();
})
.push(function () {
var query_b = {
query:'portal_type: ("Web Illustration",'
+ '"Web Manifest","Web Script","Web Style","Web Page")',
limit: [0, 2713]};
if (param.version_a !== "") {
query_b.query += ' AND version: "' + param.version_a + '"';
}
return gadget.props.storage.createJio({
type: "replicate",
conflict_handling: param.reverse ? 1 : 2,
query: {query: query, limit: [0,2713]},
signature_storage: {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: "contributor-hash"
}
},
remote_sub_storage: {
type: "mapping",
map_all_property: true,
query: query_b,
mapping_dict: {
"id": {"equal": "reference"},
"text_content": {"equal": "text_content"},
"parent_relative_url": {"equal": "parent_relative_url"},
"portal_type": {"equal": "portal_type"},
"title": {"equal": "title"},
"description": {"equal": "description"}
},
sub_storage: {
type: "erp5",
...
...
@@ -45,17 +58,13 @@
},
local_sub_storage: {
type: "mapping",
map_all_property: true,
query: {
"query": 'validation_state: "Draft"
AND version:"'
+ param.version_b + '"'
"query": 'validation_state: "Draft"
',
"limit": [0, 2713]
},
mapping_dict: {
"id": {"equal": "reference"},
"parent_relative_url": {"equal": "parent_relative_url"},
"portal_type": {"equal": "portal_type"},
"text_content": {"equal": "text_content"},
"title": {"equal": "title"},
"description": {"equal": "description"},
"version": {"default_value": param.version_b}
},
sub_storage: {
...
...
@@ -63,27 +72,18 @@
url: param.url_b + "/erp5/web_site_module/hateoas",
default_view_reference: "jio_view"
}
},
conflict_handling: param.reverse ? 1 : 2,
query: {query: query},
signature_storage: {
type: "uuid",
sub_storage: {
type: "indexeddb",
database: "contributor-hash"
}
}
});
})
.push(function () {
return
RSVP.all([
gadget.props.storage.repair(),
gadget.props.storage.allDocs()
]
);
return
gadget.props.storage.repair();
})
.push(function () {
return gadget.props.storage.allDocs({query: query, limit: [0, 2713]}
);
})
.push(function (result) {
gadget.props.element.querySelector(".result").innerHTML =
result
[1]
.data.total_rows + " documents loaded";
result.data.total_rows + " documents loaded";
return gadget.notifySubmitted();
});
}
...
...
@@ -134,6 +134,7 @@
g.props.param.url_a = option.url_a || "";
g.props.param.url_b = option.url_b || "";
g.props.param.version_b = option.version_b || "";
g.props.param.version_a = option.version_a || "";
return g.declareGadget("gadget_jio.html", {scope: "storage_local"})
.push(function (storage_gadget) {
g.props.storage = storage_gadget;
...
...
@@ -174,6 +175,17 @@
"hidden": 0,
"type": "StringField"
},
"version_a": {
"description": "",
"title": "Version",
"default": g.props.param.version_a,
"css_class": "",
"required": 0,
"editable": 1,
"key": "version_a",
"hidden": 0,
"type": "StringField"
},
"url_list": {
"description": "",
"title": "References",
...
...
@@ -231,7 +243,7 @@
"group_list": [
[
"left",
[["erp_a"], ["url_a"]]
[["erp_a"], ["url_a"]
, ["version_a"]
]
],
[
"right",
...
...
bt5/erp5_officejs/PathTemplateItem/web_site_module/renderjs_contributor.xml
View file @
ef83c38b
...
...
@@ -377,7 +377,7 @@
</item>
<item>
<key>
<string>
configuration_panel_gadget_url
</string>
</key>
<value>
<string>
gadget_erp5_panel.html
</string>
</value>
<value>
<string>
gadget_erp5_
no_
panel.html
</string>
</value>
</item>
<item>
<key>
<string>
configuration_router_gadget_url
</string>
</key>
...
...
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