Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
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
nexedi/erp5!313
parent
bf94f426
Changes
4
Expand all
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
This diff is collapsed.
Click to expand it.
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