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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
1c2f03a3
Commit
1c2f03a3
authored
6 years ago
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update zipfilestorage-with-jszip.js
parent
21583f45
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
12 deletions
+56
-12
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_zipfilestorage-with-jszip_js.js
...eItem/web_page_module/jio_zipfilestorage-with-jszip_js.js
+24
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_zipfilestorage-with-jszip_js.xml
...Item/web_page_module/jio_zipfilestorage-with-jszip_js.xml
+2
-2
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/zipfilestorage-with-jszip.js.js
...al_skins/erp5_only_office/zipfilestorage-with-jszip.js.js
+24
-4
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/zipfilestorage-with-jszip.js.xml
...l_skins/erp5_only_office/zipfilestorage-with-jszip.js.xml
+6
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_zipfilestorage-with-jszip_js.js
View file @
1c2f03a3
...
...
@@ -139,6 +139,26 @@ for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2
});
};
ZipFileStorage
.
prototype
.
hasCapacity
=
function
(
name
)
{
return
(
name
===
"
list
"
);
};
ZipFileStorage
.
prototype
.
buildQuery
=
function
()
{
return
loadZip
(
this
)
.
push
(
function
(
zip
)
{
var
dirname
,
dir_list
=
[{
id
:
'
/
'
,
value
:
{}}];
for
(
dirname
in
zip
.
files
)
{
if
(
zip
.
files
.
hasOwnProperty
(
dirname
))
{
if
(
zip
.
files
[
dirname
].
dir
)
{
dir_list
.
push
({
id
:
'
/
'
+
dirname
,
value
:
{}});
}
}
}
return
dir_list
;
});
};
ZipFileStorage
.
prototype
.
allAttachments
=
function
(
id
)
{
id
=
restrictDocumentId
(
id
);
return
loadZip
(
this
)
...
...
@@ -204,8 +224,8 @@ for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find document
"
,
404
);
}
if
(
!
(
zip
.
files
.
hasOwnProperty
(
attachId
)
&&
!
zip
.
files
[
attachId
].
dir
))
{
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment:
"
+
'
/
'
+
id
+
"
,
"
+
name
,
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment:
"
+
'
/
'
+
id
+
"
,
"
+
name
,
404
);
}
return
zip
.
file
(
attachId
).
async
(
'
blob
'
);
...
...
@@ -222,8 +242,8 @@ for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find document
"
,
404
);
}
if
(
!
(
zip
.
files
.
hasOwnProperty
(
attachId
)
&&
!
zip
.
files
[
attachId
].
dir
))
{
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment:
"
+
'
/
'
+
id
+
"
,
"
+
name
,
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment:
"
+
'
/
'
+
id
+
"
,
"
+
name
,
404
);
}
zip
.
remove
(
attachId
);
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_zipfilestorage-with-jszip_js.xml
View file @
1c2f03a3
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
0.14254.57744.3293
</string>
</value>
<value>
<string>
96
8.64417.14775.57582
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1
498139912.86
</float>
<float>
1
531915725.03
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/zipfilestorage-with-jszip.js.js
View file @
1c2f03a3
...
...
@@ -139,6 +139,26 @@ for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2
});
};
ZipFileStorage
.
prototype
.
hasCapacity
=
function
(
name
)
{
return
(
name
===
"
list
"
);
};
ZipFileStorage
.
prototype
.
buildQuery
=
function
()
{
return
loadZip
(
this
)
.
push
(
function
(
zip
)
{
var
dirname
,
dir_list
=
[{
id
:
'
/
'
,
value
:
{}}];
for
(
dirname
in
zip
.
files
)
{
if
(
zip
.
files
.
hasOwnProperty
(
dirname
))
{
if
(
zip
.
files
[
dirname
].
dir
)
{
dir_list
.
push
({
id
:
'
/
'
+
dirname
,
value
:
{}});
}
}
}
return
dir_list
;
});
};
ZipFileStorage
.
prototype
.
allAttachments
=
function
(
id
)
{
id
=
restrictDocumentId
(
id
);
return
loadZip
(
this
)
...
...
@@ -204,8 +224,8 @@ for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find document
"
,
404
);
}
if
(
!
(
zip
.
files
.
hasOwnProperty
(
attachId
)
&&
!
zip
.
files
[
attachId
].
dir
))
{
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment:
"
+
'
/
'
+
id
+
"
,
"
+
name
,
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment:
"
+
'
/
'
+
id
+
"
,
"
+
name
,
404
);
}
return
zip
.
file
(
attachId
).
async
(
'
blob
'
);
...
...
@@ -222,8 +242,8 @@ for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find document
"
,
404
);
}
if
(
!
(
zip
.
files
.
hasOwnProperty
(
attachId
)
&&
!
zip
.
files
[
attachId
].
dir
))
{
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment:
"
+
'
/
'
+
id
+
"
,
"
+
name
,
throw
new
jIO
.
util
.
jIOError
(
"
Cannot find attachment:
"
+
'
/
'
+
id
+
"
,
"
+
name
,
404
);
}
zip
.
remove
(
attachId
);
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/zipfilestorage-with-jszip.js.xml
View file @
1c2f03a3
...
...
@@ -6,13 +6,17 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
http_cache
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
zipfilestorage-with-jszip.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application
/javascript
</string>
</value>
<value>
<string>
text
/javascript
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
...
...
@@ -20,7 +24,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
zipfilestorage-with-jszip.js
</string>
</value>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
...
...
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