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
Levin Zimmermann
erp5
Commits
3c35e24e
Commit
3c35e24e
authored
May 17, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: update export site to have full application in one zip
parent
60b28416
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
182 additions
and
60 deletions
+182
-60
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_appcachestorage_js.js
...web_page_module/gadget_officejs_jio_appcachestorage_js.js
+13
-12
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_appcachestorage_js.xml
...eb_page_module/gadget_officejs_jio_appcachestorage_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_html.html
...tem/web_page_module/gadget_officejs_page_export_html.html
+13
-8
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_html.xml
...Item/web_page_module/gadget_officejs_page_export_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_js.js
...ateItem/web_page_module/gadget_officejs_page_export_js.js
+137
-17
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_js.xml
...teItem/web_page_module/gadget_officejs_page_export_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_filesystemstorage_js.js
...hTemplateItem/web_page_module/jio_filesystemstorage_js.js
+11
-15
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_filesystemstorage_js.xml
...TemplateItem/web_page_module/jio_filesystemstorage_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_appcachestorage_js.js
View file @
3c35e24e
...
...
@@ -12,19 +12,20 @@
((
spec
.
version
!==
undefined
)
?
(
spec
.
version
+
(
spec
.
version
.
endsWith
(
'
/
'
)
?
''
:
'
/
'
))
:
""
));
this
.
_relative_url_list
=
[
this
.
_origin_url
,
spec
.
manifest
];
this
.
_prefix
=
spec
.
prefix
;
if
(
this
.
_take_installer
)
{
this
.
_relative_url_list
=
[
this
.
_
origin_url
,
"
development/
"
+
spec
.
manifest
,
this
.
_
origin_url
+
"
development/
"
,
"
gadget_officejs_bootloader.js
"
,
"
gadget_officejs_bootloader.appcache
"
,
"
gadget_officejs_bootloader_presentation.html
"
,
"
gadget_officejs_bootloader_presentation.js
"
,
"
gadget_officejs_bootloader_presentation.css
"
,
"
gadget_officejs_bootloader_serviceworker.js
"
,
"
gadget_erp5_nojqm.css
"
,
"
jio_appcachestorage.js
"
this
.
_
prefix
||
"
/
"
,
this
.
_prefix
+
"
development/
"
+
spec
.
manifest
,
this
.
_
prefix
+
"
development/
"
,
this
.
_prefix
+
"
gadget_officejs_bootloader.js
"
,
this
.
_prefix
+
"
gadget_officejs_bootloader.appcache
"
,
this
.
_prefix
+
"
gadget_officejs_bootloader_presentation.html
"
,
this
.
_prefix
+
"
gadget_officejs_bootloader_presentation.js
"
,
this
.
_prefix
+
"
gadget_officejs_bootloader_presentation.css
"
,
this
.
_prefix
+
"
gadget_officejs_bootloader_serviceworker.js
"
,
this
.
_prefix
+
"
gadget_erp5_nojqm.css
"
,
this
.
_prefix
+
"
jio_appcachestorage.js
"
];
}
}
...
...
@@ -67,7 +68,7 @@
AppCacheStorage
.
prototype
.
repair
=
function
()
{
var
storage
=
this
,
prefix
=
storage
.
_take_installer
?
"
development/
"
:
""
;
prefix
=
storage
.
_take_installer
?
this
.
_prefix
+
"
development/
"
:
""
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
jIO
.
util
.
ajax
({
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_appcachestorage_js.xml
View file @
3c35e24e
...
...
@@ -239,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
8.64585.2539.29713
</string>
</value>
<value>
<string>
95
9.27850.19778.42888
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
149
3380404.
6
</float>
<float>
149
5022155.1
6
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_html.html
View file @
3c35e24e
...
...
@@ -32,14 +32,19 @@
<form
class=
"export-form"
>
<div
class=
"ui-form"
>
<div
class=
"ui-field-contain"
>
<label
data-i18n=
"Cache File:"
>
Cache File:
</label>
<input
name=
"cachefile"
required
/>
</div>
</div>
<div
class=
"ui-form"
>
<div
class=
"ui-field-contain"
>
<label
data-i18n=
"Site Url:"
>
Site Url:
</label>
<input
name=
"site_url"
required
/>
<label
data-i18n=
"Site:"
>
Site:
</label>
<select
name=
"web_site"
>
<option>
Text Editor
</option>
<option>
Illustration Editor
</option>
<option>
PDF Viewer
</option>
<option>
Cribjs
</option>
<option>
Bookmark Manager
</option>
<option>
Onlyoffice Text
</option>
<option>
Onlyoffice Spreadsheet
</option>
<option>
Onlyoffice Presentation
</option>
<option>
Web Table Editor
</option>
<option>
Image Editor
</option>
</select>
</div>
</div>
<div
class=
"ui-form"
>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_html.xml
View file @
3c35e24e
...
...
@@ -231,7 +231,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
8.33099.10317.11264
</string>
</value>
<value>
<string>
95
9.28004.53691.26077
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -249,7 +249,7 @@
</tuple>
<state>
<tuple>
<float>
149
1491237.19
</float>
<float>
149
5031755.24
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_js.js
View file @
3c35e24e
/*globals window, RSVP, rJS, loopEventListener, URL, document
FileReader, console */
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
RSVP
,
rJS
,
jIO
)
{
(
function
(
window
,
RSVP
,
rJS
,
jIO
,
URL
)
{
"
use strict
"
;
function
exportZip
(
gadget
)
{
var
cache_file
=
gadget
.
props
.
element
.
querySelector
(
'
form input[name="cachefile"]
'
).
value
,
site_url
=
gadget
.
props
.
element
.
querySelector
(
'
form input[name="site_url"]
'
).
value
;
return
gadget
.
exportZip
(
cache_file
,
site_url
)
var
origin_url
=
(
window
.
location
.
origin
+
window
.
location
.
pathname
).
replace
(
"
officejs_export/
"
,
""
),
application_dict
=
{
"
Text Editor
"
:
{
"
url
"
:
"
officejs_text_editor/
"
,
"
cache
"
:
"
gadget_officejs_text_editor.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_ckeditor_gadget
"
,
"
officejs_setting_gadget
"
]
},
"
Illustration Editor
"
:
{
"
url
"
:
"
officejs_svg_editor/
"
,
"
cache
"
:
"
gadget_officejs_illustration.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_svg_editor_gadget
"
,
"
officejs_setting_gadget
"
]
},
"
PDF Viewer
"
:
{
"
url
"
:
"
officejs_pdf_viewer/
"
,
"
cache
"
:
"
gadget_officejs_pdf_viewer.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_pdf_viewer_gadget
"
,
"
officejs_setting_gadget
"
]
},
"
Cribjs
"
:
{
"
url
"
:
"
officejs_cribjs/
"
,
"
cache
"
:
"
gadget_officejs_crib.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_codemirror
"
,
"
officejs_setting_gadget
"
]
},
"
Bookmark Manager
"
:
{
"
url
"
:
"
officejs_bookmark_manager/
"
,
"
cache
"
:
"
gadget_officejs_bookmark_manager.appcache
"
,
"
sub_gadget
"
:
[]
},
"
Onlyoffice Text
"
:
{
"
url
"
:
"
ooffice_text/
"
,
"
cache
"
:
"
gadget_ooffice_text.appcache
"
,
"
sub_gadget
"
:
[
"
ooffice_text_gadget
"
,
"
officejs_setting_gadget
"
]
},
"
Onlyoffice Spreadsheet
"
:
{
"
url
"
:
"
ooffice_spreadsheet/
"
,
"
cache
"
:
"
gadget_ooffice_spreadsheet.appcache
"
,
"
sub_gadget
"
:
[
"
ooffice_spreadsheet_gadget
"
,
"
officejs_setting_gadget
"
]
},
"
Onlyoffice Presentation
"
:
{
"
url
"
:
"
ooffice_presentation/
"
,
"
cache
"
:
"
gadget_ooffice_presentation.appcache
"
,
"
sub_gadget
"
:
[
"
ooffice_presentation_gadget
"
,
"
officejs_setting_gadget
"
]
},
"
Web Table Editor
"
:
{
"
url
"
:
"
officejs_web_table_editor/
"
,
"
cache
"
:
"
gadget_officejs_web_table.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_web_table_editor_gadget
"
,
"
officejs_setting_gadget
"
]
},
"
Image Editor
"
:
{
"
url
"
:
"
officejs_image_editor/
"
,
"
cache
"
:
"
gadget_officejs_image_editor.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_image_editor_gadget
"
,
"
officejs_setting_gadget
"
]
},
"
officejs_ckeditor_gadget
"
:
{
"
cache
"
:
"
gadget_ckeditor.appcache
"
},
"
officejs_setting_gadget
"
:
{
"
cache
"
:
"
gadget_officejs_setting.appcache
"
},
"
officejs_svg_editor_gadget
"
:
{
"
cache
"
:
"
gadget_officejs_svg_editor.appcache
"
},
"
officejs_pdf_viewer_gadget
"
:
{
"
cache
"
:
"
gadget_officejs_pdf_viewer_gadget.appcache
"
},
"
officejs_codemirror
"
:
{
"
cache
"
:
"
gadget_officejs_codemirror.appcache
"
},
"
ooffice_text_gadget
"
:
{
"
cache
"
:
"
gadget_ooffice_text_gadget.appcache
"
},
"
ooffice_spreadsheet_gadget
"
:
{
"
cache
"
:
"
gadget_ooffice_spreadsheet_gadget.appcache
"
},
"
ooffice_presentation_gadget
"
:
{
"
cache
"
:
"
gadget_ooffice_presentation_gadget.appcache
"
},
"
officejs_web_table_editor_gadget
"
:
{
"
cache
"
:
"
gadget_officejs_web_table_editor.appcache
"
},
"
officejs_image_editor_gadget
"
:
{
"
cache
"
:
"
gadget_officejs_image_editor_gadget.appcache
"
}
};
function
exportZip
(
gadget
,
event
)
{
var
j
,
zip_name
,
i
=
0
,
form_result
=
{},
len
=
event
.
target
.
length
,
app
;
for
(
j
=
0
;
j
<
len
;
j
+=
1
)
{
form_result
[
event
.
target
[
j
].
name
]
=
event
.
target
[
j
].
value
;
}
app
=
application_dict
[
form_result
.
web_site
];
zip_name
=
form_result
.
filename
;
len
=
app
.
sub_gadget
.
length
;
function
fill
(
zip_file
)
{
if
(
i
<
len
)
{
var
sub_app
=
app
.
sub_gadget
[
i
];
return
gadget
.
fillZip
(
application_dict
[
sub_app
].
cache
,
origin_url
+
app
.
url
,
zip_file
,
sub_app
+
"
/
"
)
.
push
(
function
(
zip_file
)
{
i
+=
1
;
return
fill
(
zip_file
);
});
}
return
zip_file
;
}
return
gadget
.
fillZip
(
app
.
cache
,
origin_url
+
app
.
url
)
.
push
(
function
(
zip_file
)
{
return
fill
(
zip_file
);
})
.
push
(
function
(
zip_file
)
{
var
element
=
gadget
.
props
.
element
,
a
=
document
.
createElement
(
"
a
"
),
url
=
URL
.
createObjectURL
(
zip_file
),
zip_name
=
gadget
.
props
.
element
.
querySelector
(
'
form input[name="filename"]
'
).
value
||
"
source_code
"
;
url
=
URL
.
createObjectURL
(
zip_file
);
element
.
appendChild
(
a
);
a
.
style
=
"
display: none
"
;
a
.
href
=
url
;
...
...
@@ -34,12 +152,12 @@
g
.
props
.
element
=
element
;
});
})
.
declareMethod
(
"
exportZip
"
,
function
(
cache_file
,
site_url
)
{
.
declareMethod
(
"
fillZip
"
,
function
(
cache_file
,
site_url
,
zip_file
,
prefix
)
{
var
gadget
=
this
,
file_storage
=
jIO
.
createJIO
({
type
:
"
replicate
"
,
parallel_operation_attachment_amount
:
400
,
parallel_operation_amount
:
400
,
conflict_handling
:
2
,
check_remote_attachment_creation
:
true
,
check_local_creation
:
false
,
check_local_modification
:
false
,
...
...
@@ -53,14 +171,16 @@
type
:
"
appcache
"
,
take_installer
:
true
,
manifest
:
cache_file
,
origin_url
:
site_url
origin_url
:
site_url
,
prefix
:
prefix
||
""
}
},
signature_storage
:
{
type
:
"
memory
"
},
local_sub_storage
:
{
type
:
"
zipfile
"
type
:
"
zipfile
"
,
file
:
zip_file
}
});
return
file_storage
.
repair
()
...
...
@@ -81,10 +201,10 @@
'
submit
'
,
true
,
function
(
event
)
{
return
exportZip
(
gadget
);
return
exportZip
(
gadget
,
event
);
}
);
});
});
}(
window
,
RSVP
,
rJS
,
jIO
));
\ No newline at end of file
}(
window
,
RSVP
,
rJS
,
jIO
,
URL
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_js.xml
View file @
3c35e24e
...
...
@@ -227,7 +227,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
8.64457.39610.6026
2
</string>
</value>
<value>
<string>
95
9.28011.47989.4275
2
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>
149
3379956.25
</float>
<float>
149
5097433.8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_filesystemstorage_js.js
View file @
3c35e24e
...
...
@@ -6,10 +6,7 @@
function
FileSystemStorage
(
spec
)
{
this
.
_document
=
spec
.
document
;
this
.
_sub_storage
=
jIO
.
createJIO
(
spec
.
sub_storage
);
this
.
_id_dict
=
{
"
/
"
:
{
"
index.html
"
:
{}},
"
/development/
"
:
{
"
index.html
"
:
{}}
};
this
.
_id_dict
=
{};
}
FileSystemStorage
.
prototype
.
get
=
function
(
url
)
{
...
...
@@ -23,9 +20,8 @@
FileSystemStorage
.
prototype
.
getAttachment
=
function
(
doc_id
,
attachment_id
)
{
return
this
.
_sub_storage
.
getAttachment
(
this
.
_document
,
(
attachment_id
===
"
index.html
"
)
?
((
doc_id
===
"
/
"
)
?
"
/
"
:
"
development/
"
)
:
((
doc_id
===
"
/
"
)
?
attachment_id
:
doc_id
+
attachment_id
)
doc_id
+
((
attachment_id
===
"
index.html
"
)
?
(
doc_id
.
endsWith
(
"
imagelib/
"
)
?
"
index.html
"
:
""
)
:
attachment_id
)
);
};
...
...
@@ -51,19 +47,19 @@
return
context
.
_sub_storage
.
allAttachments
(
context
.
_document
);
})
.
push
(
function
(
result
)
{
var
id
,
path
,
last_
slash_
index
,
filename
;
var
id
,
path
,
last_index
,
filename
;
for
(
id
in
result
)
{
if
(
result
.
hasOwnProperty
(
id
))
{
last_
slash_
index
=
id
.
lastIndexOf
(
"
/
"
)
+
1
;
if
(
last_
slash_index
===
0
)
{
path
=
"
/
"
;
filename
=
id
;
last_index
=
id
.
lastIndexOf
(
"
/
"
)
+
1
;
if
(
last_
index
===
id
.
length
)
{
path
=
id
||
"
/
"
;
filename
=
"
index.html
"
;
}
else
{
path
=
id
.
substring
(
0
,
last_
slash_
index
);
filename
=
id
.
substring
(
last_
slash_
index
);
path
=
id
.
substring
(
0
,
last_index
);
filename
=
id
.
substring
(
last_index
);
}
}
if
(
!
path
.
startsWith
(
"
http
"
)
&&
id
!==
"
/
"
)
{
if
(
!
id
.
includes
(
"
http
"
)
)
{
if
(
path
.
charAt
(
0
)
!==
'
/
'
)
{
path
=
'
/
'
+
path
;
}
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_filesystemstorage_js.xml
View file @
3c35e24e
...
...
@@ -239,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
8.64589.19815.17083
</string>
</value>
<value>
<string>
95
9.27838.40575.32000
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
149
3382071.8
9
</float>
<float>
149
5033483.2
9
</float>
<string>
UTC
</string>
</tuple>
</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