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
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
preetwinder
erp5
Commits
d89dbc08
Commit
d89dbc08
authored
Aug 16, 2017
by
preetwinder
Committed by
preetwinder
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs] Add wrapper storage to cache allDocs call and then service get requests.
parent
2f622c5f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
393 additions
and
10 deletions
+393
-10
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_wrapperstorage_js.js
...PathTemplateItem/web_page_module/jio_wrapperstorage_js.js
+48
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_wrapperstorage_js.xml
...athTemplateItem/web_page_module/jio_wrapperstorage_js.xml
+325
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_js.js
...plateItem/web_page_module/ojs_facebook_configurator_js.js
+8
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_js.xml
...lateItem/web_page_module/ojs_facebook_configurator_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
...athTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
+7
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_html.html
...thTemplateItem/web_page_module/ojs_fb_posts_jio_html.html
+1
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_html.xml
...athTemplateItem/web_page_module/ojs_fb_posts_jio_html.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_wrapperstorage_js.js
0 → 100644
View file @
d89dbc08
/*jslint nomen: true */
/*global RSVP, UriTemplate*/
(
function
(
jIO
,
RSVP
)
{
"
use strict
"
;
var
posts
;
function
resultToDict
(
result
)
{
var
i
,
resultDict
=
{};
for
(
i
=
0
;
i
<
result
.
length
;
i
++
)
{
resultDict
[
result
[
i
].
id
]
=
result
[
i
].
value
;
}
return
resultDict
;
}
function
WrapperStorage
(
spec
)
{
this
.
_sub_storage
=
jIO
.
createJIO
(
spec
.
sub_storage
);
this
.
_default_field_list
=
spec
.
default_field_list
;
}
WrapperStorage
.
prototype
.
get
=
function
(
id
)
{
var
that
=
this
;
if
(
posts
)
{
return
posts
[
id
];
}
return
this
.
_sub_storage
.
get
(
id
);
};
WrapperStorage
.
prototype
.
buildQuery
=
function
(
query
)
{
var
that
=
this
;
query
.
select_list
=
that
.
_default_field_list
;
return
this
.
_sub_storage
.
buildQuery
(
query
)
.
push
(
function
(
result
)
{
posts
=
resultToDict
(
result
);
return
result
;
});
};
WrapperStorage
.
prototype
.
hasCapacity
=
function
(
name
)
{
var
this_storage_capacity_list
=
[
"
list
"
,
"
select
"
,
"
include
"
,
"
limit
"
];
if
(
this_storage_capacity_list
.
indexOf
(
name
)
!==
-
1
)
{
return
true
;
}
};
jIO
.
addStorage
(
'
wrapper
'
,
WrapperStorage
);
}(
jIO
,
RSVP
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_wrapperstorage_js.xml
0 → 100644
View file @
d89dbc08
<?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>
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>
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/javascript
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
jio_wrapperstorage.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
jio_wrapperstorage_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<string>
Wrapper Storage
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Wrapper Storage
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<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>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></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>
1502875938.04
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published
</string>
</value>
</item>
</dictionary>
</list>
</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>
961.29118.7130.30566
</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>
1502876057.97
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
empty
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</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>
1502875843.15
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_js.js
View file @
d89dbc08
...
@@ -43,6 +43,9 @@
...
@@ -43,6 +43,9 @@
},
},
remote_sub_storage
:
{
remote_sub_storage
:
{
type
:
"
query
"
,
type
:
"
query
"
,
sub_storage
:
{
type
:
"
wrapper
"
,
default_field_list
:
[
'
id
'
,
'
message
'
,
'
created_time
'
,
'
link
'
,
'
story
'
],
sub_storage
:
{
sub_storage
:
{
type
:
"
facebook
"
,
type
:
"
facebook
"
,
access_token
:
access_token
,
access_token
:
access_token
,
...
@@ -51,6 +54,7 @@
...
@@ -51,6 +54,7 @@
}
}
}
}
}
}
}
return
gadget
.
setSetting
(
'
jio_storage_description
'
,
configuration
);
return
gadget
.
setSetting
(
'
jio_storage_description
'
,
configuration
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_facebook_configurator_js.xml
View file @
d89dbc08
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.2
0848.25415.9847
</string>
</value>
<value>
<string>
961.2
6541.35617.5188
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1502
381591.58
</float>
<float>
1502
876105.87
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_appcache.xml
View file @
d89dbc08
...
@@ -197,8 +197,13 @@ gadget_erp5_page_ojs_fb_posts_document_list.js\n
...
@@ -197,8 +197,13 @@ gadget_erp5_page_ojs_fb_posts_document_list.js\n
gadget_erp5_page_ojs_fb_posts_panel.html\n
gadget_erp5_page_ojs_fb_posts_panel.html\n
gadget_erp5_page_ojs_fb_posts_panel.js\n
gadget_erp5_page_ojs_fb_posts_panel.js\n
jio_fbstorage.js\n
jio_fbstorage.js\n
jio_wrapperstorage.js\n
gadget_erp5_page_ojs_fb_posts_jio.html\n
gadget_erp5_page_ojs_fb_posts_jio.html\n
gadget_ojs_fb_posts_jio.js\n
gadget_ojs_fb_posts_jio.js\n
gadget_erp5_sort_editor.html\n
gadget_erp5_sort_editor.js\n
gadget_erp5_search_editor.js\n
gadget_erp5_search_editor.html\n
GADGET:\n
GADGET:\n
NETWORK:\n
NETWORK:\n
*
</string>
</value>
*
</string>
</value>
...
@@ -342,7 +347,7 @@ NETWORK:\n
...
@@ -342,7 +347,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.2
0841.15763.31249
</string>
</value>
<value>
<string>
961.2
6541.35617.5188
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -360,7 +365,7 @@ NETWORK:\n
...
@@ -360,7 +365,7 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1502
440236.9
</float>
<float>
1502
876355.62
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_html.html
View file @
d89dbc08
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
<script
src=
"jio_mappingstorage.js"
type=
"text/javascript"
></script>
<script
src=
"jio_mappingstorage.js"
type=
"text/javascript"
></script>
<script
src=
"jio_fixstorage.js"
type=
"text/javascript"
></script>
<script
src=
"jio_fixstorage.js"
type=
"text/javascript"
></script>
<script
src=
"jio_fbstorage.js"
type=
"text/javascript"
></script>
<script
src=
"jio_fbstorage.js"
type=
"text/javascript"
></script>
<script
src=
"jio_wrapperstorage.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<!-- custom script -->
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_fb_posts_jio_html.xml
View file @
d89dbc08
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
16340.21976.5934
0
</string>
</value>
<value>
<string>
961.
29117.52664.5905
0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1502
286442.68
</float>
<float>
1502
876063.05
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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