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
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
alecs_myu
erp5
Commits
7e0db3ad
Commit
7e0db3ad
authored
Jul 04, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: commit fix_storage
/reviewed-on
!313
parent
bf94f426
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
439 additions
and
12 deletions
+439
-12
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.js
...e_module/gadget_officejs_page_jio_erp5_configurator_js.js
+20
-10
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.xml
..._module/gadget_officejs_page_jio_erp5_configurator_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_fixstorage_js.js
...ejs/PathTemplateItem/web_page_module/jio_fixstorage_js.js
+96
-0
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_fixstorage_js.xml
...js/PathTemplateItem/web_page_module/jio_fixstorage_js.xml
+321
-0
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.js
View file @
7e0db3ad
...
...
@@ -11,7 +11,8 @@
return
RSVP
.
all
([
gadget
.
getSetting
(
"
portal_type
"
),
gadget
.
getSetting
(
"
erp5_attachment_synchro
"
,
undefined
),
gadget
.
getSetting
(
"
default_view_reference
"
,
"
jio_view
"
)
gadget
.
getSetting
(
"
default_view_reference
"
,
"
jio_view
"
),
gadget
.
getSetting
(
"
storage_attachment_issue
"
,
false
)
]);
})
.
push
(
function
(
result
)
{
...
...
@@ -19,6 +20,7 @@
portal_type
=
result
[
0
],
attachment_synchro
=
result
[
1
]
!==
undefined
,
extended_attachment_url
=
result
[
1
];
configuration
=
{
type
:
"
replicate
"
,
// XXX This drop the signature lists...
...
...
@@ -41,15 +43,12 @@
check_remote_creation
:
true
,
check_remote_deletion
:
true
,
local_sub_storage
:
{
type
:
"
fix_local
"
,
type
:
"
query
"
,
sub_storage
:
{
type
:
"
query
"
,
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
uuid
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
officejs-erp5
"
}
type
:
"
indexeddb
"
,
database
:
"
officejs-erp5
"
}
}
},
...
...
@@ -72,17 +71,28 @@
sub_storage
:
{
type
:
"
erp5
"
,
url
:
(
new
URI
(
"
hateoas
"
))
.
absoluteTo
(
erp5_url
)
.
toString
(),
.
absoluteTo
(
erp5_url
)
.
toString
(),
default_view_reference
:
result
[
2
]
}
}
};
// This is only for onlyoffice
if
(
extended_attachment_url
===
"
/{+id}/Document_downloadForOnlyOfficeApp
"
)
{
configuration
=
{
type
:
"
fix_local
"
,
is_fixed
:
result
[
3
],
sub_storage
:
configuration
};
}
return
gadget
.
setSetting
(
'
jio_storage_description
'
,
configuration
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
jio_storage_name
'
,
"
ERP5
"
);
})
.
push
(
function
()
{
return
gadget
.
setSetting
(
'
storage_attachment_issue
'
,
true
);
})
.
push
(
function
()
{
return
gadget
.
setGlobalSetting
(
'
erp5_url
'
,
erp5_url
);
})
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_jio_erp5_configurator_js.xml
View file @
7e0db3ad
...
...
@@ -273,7 +273,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
960.
25496.14411.56081
</string>
</value>
<value>
<string>
960.
32726.32486.40567
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>
149
8834693.92
</float>
<float>
149
9160764.83
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_fixstorage_js.js
0 → 100644
View file @
7e0db3ad
/*globals jIO, Blob, Rusha, RSVP, URI*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(
function
(
jIO
,
Blob
,
Rusha
,
RSVP
,
URI
)
{
"
use strict
"
;
var
rusha
=
new
Rusha
(),
stringify
=
jIO
.
util
.
stringify
;
function
CompatibilityStorage
(
spec
)
{
this
.
_sub_storage
=
jIO
.
createJIO
(
spec
.
sub_storage
);
this
.
_is_fixed
=
spec
.
is_fixed
;
}
CompatibilityStorage
.
prototype
.
get
=
function
()
{
return
this
.
_sub_storage
.
get
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
put
=
function
()
{
return
this
.
_sub_storage
.
put
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
post
=
function
()
{
return
this
.
_sub_storage
.
post
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
remove
=
function
()
{
return
this
.
_sub_storage
.
remove
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
hasCapacity
=
function
()
{
return
this
.
_sub_storage
.
hasCapacity
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
repair
=
function
()
{
var
context
=
this
;
// Here fix the local storage for some cases.
if
(
!
context
.
_is_fixed
)
{
return
context
.
_sub_storage
.
allDocs
({
select_list
:
[
"
content_type
"
]
})
.
push
(
function
(
result
)
{
var
i
,
promise_list
=
[],
doc_list
=
result
.
data
.
rows
;
for
(
i
=
0
;
i
<
result
.
data
.
total_rows
;
i
+=
1
)
{
if
(
doc_list
[
i
].
value
.
content_type
!==
undefined
&&
!
doc_list
[
i
].
value
.
content_type
.
startsWith
(
"
application/x-asc
"
))
{
promise_list
.
push
(
context
.
_sub_storage
.
remove
(
doc_list
[
i
].
id
)
);
}
}
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
()
{
return
context
.
_sub_storage
.
repair
.
apply
(
context
.
_sub_storage
,
arguments
);
});
}
};
CompatibilityStorage
.
prototype
.
allAttachments
=
function
(
doc_id
)
{
return
this
.
_sub_storage
.
allAttachments
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
getAttachment
=
function
(
doc_id
)
{
var
context
=
this
;
return
context
.
_sub_storage
.
getAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
putAttachment
=
function
()
{
return
this
.
_sub_storage
.
putAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
removeAttachment
=
function
()
{
return
this
.
_sub_storage
.
removeAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
CompatibilityStorage
.
prototype
.
buildQuery
=
function
()
{
return
this
.
_sub_storage
.
buildQuery
.
apply
(
this
.
_sub_storage
,
arguments
);
};
jIO
.
addStorage
(
'
fix_local
'
,
CompatibilityStorage
);
}(
jIO
,
Blob
,
Rusha
,
RSVP
,
URI
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_fixstorage_js.xml
0 → 100644
View file @
7e0db3ad
<?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_fixstorage.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
jio_fixstorage_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>
<none/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</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>
1498817425.15
</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>
960.25570.27528.1382
</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>
1499160625.83
</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>
1498814308.48
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</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