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
Xavier Thompson
erp5
Commits
71e8f118
Commit
71e8f118
authored
Jan 18, 2018
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs] Simplify bootloader: no more separate app and editor gadget
parent
69511d90
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
159 additions
and
662 deletions
+159
-662
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bookmark_manager_appcache.xml
...page_module/gadget_officejs_bookmark_manager_appcache.xml
+7
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader.html.html
...Item/web_page_module/gadget_officejs_bootloader.html.html
+0
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader.html.xml
...eItem/web_page_module/gadget_officejs_bootloader.html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_js.js
...lateItem/web_page_module/gadget_officejs_bootloader_js.js
+51
-100
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_js.xml
...ateItem/web_page_module/gadget_officejs_bootloader_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_presentation_html.html
..._module/gadget_officejs_bootloader_presentation_html.html
+0
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_presentation_html.xml
...e_module/gadget_officejs_bootloader_presentation_html.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_presentation_js.js
...page_module/gadget_officejs_bootloader_presentation_js.js
+0
-4
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_presentation_js.xml
...age_module/gadget_officejs_bootloader_presentation_js.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_crib_appcache.xml
...ateItem/web_page_module/gadget_officejs_crib_appcache.xml
+44
-6
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_drive_app_appcache.xml
...em/web_page_module/gadget_officejs_drive_app_appcache.xml
+8
-6
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_appcachestorage_js.js
...web_page_module/gadget_officejs_jio_appcachestorage_js.js
+8
-26
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_js.js
...ateItem/web_page_module/gadget_officejs_page_export_js.js
+24
-105
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_limitalldocsstorage_js.js
...emplateItem/web_page_module/jio_limitalldocsstorage_js.js
+0
-57
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_limitalldocsstorage_js.xml
...mplateItem/web_page_module/jio_limitalldocsstorage_js.xml
+0
-334
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_wallsearch_appcache.xml
...hTemplateItem/web_page_module/ojs_wallsearch_appcache.xml
+3
-4
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bookmark_manager_appcache.xml
View file @
71e8f118
...
...
@@ -200,6 +200,7 @@ gadget_html5_textarea.js\n
gadget_erp5_configure_editor.html\n
gadget_erp5_configure_editor.js\n
\n
#bookmark\n
gadget_erp5_field_checkbox.html\n
gadget_erp5_field_checkbox.js\n
gadget_officejs_bookmark_manager_router.html\n
...
...
@@ -215,8 +216,10 @@ gadget_erp5_page_ojs_bookmark_dispatcher.html\n
gadget_erp5_page_ojs_bookmark_dispatcher.js\n
gadget_erp5_page_ojs_bookmark_preference.html\n
gadget_erp5_page_ojs_bookmark_preference.js\n
GADGET:\n
officejs_setting_gadget/\n
\n
#setting\n
gadget_officejs_setting.html\n
gadget_officejs_setting.js\n
NETWORK:\n
*
</string>
</value>
</item>
...
...
@@ -359,7 +362,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
964.4
5561.47559.9591
</string>
</value>
<value>
<string>
964.4
8513.5538.10342
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -377,7 +380,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
151
5590093.02
</float>
<float>
151
6115771.45
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader.html.html
View file @
71e8f118
...
...
@@ -8,7 +8,6 @@
<script
src=
"${latest_version}/rsvp.js"
></script>
<script
src=
"${latest_version}/renderjs.js"
></script>
<script
src=
"${latest_version}/jiodev.js"
></script>
<script
src=
"jio_limitalldocsstorage.js"
></script>
<script
src=
"jio_appcachestorage.js"
></script>
<script
src=
"gadget_officejs_bootloader.js"
></script>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader.html.xml
View file @
71e8f118
...
...
@@ -241,7 +241,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.23296.14479.51302
</string>
</value>
<value>
<string>
96
4.45561.47559.9591
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -259,7 +259,7 @@
</tuple>
<state>
<tuple>
<float>
151
0305002.75
</float>
<float>
151
5750984.26
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_js.js
View file @
71e8f118
...
...
@@ -19,14 +19,10 @@ var repair = false;
check_local_deletion
:
false
,
check_local_modification
:
false
,
signature_sub_storage
:
{
type
:
"
limitalldocs
"
,
document
:
window
.
location
.
href
,
type
:
"
query
"
,
sub_storage
:
{
type
:
"
query
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
officejs-hash
"
}
type
:
"
indexeddb
"
,
database
:
"
officejs-hash
"
}
},
local_sub_storage
:
{
...
...
@@ -41,8 +37,8 @@ var repair = false;
},
remote_sub_storage
:
{
type
:
"
appcache
"
,
manifest
:
gadget
.
state
.
cache_file
,
version
:
gadget
.
state
.
version_url
,
manifest
:
gadget
.
props
.
cache_file
,
version
:
gadget
.
props
.
version_url
,
take_installer
:
true
}
});
...
...
@@ -58,7 +54,7 @@ var repair = false;
serviceWorker
=
registration
.
active
;
}
if
(
serviceWorker
.
state
!==
"
activated
"
)
{
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
return
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
serviceWorker
.
addEventListener
(
'
statechange
'
,
function
(
e
)
{
if
(
e
.
target
.
state
===
"
activated
"
)
{
resolve
();
...
...
@@ -75,125 +71,80 @@ var repair = false;
.
setState
({
error_amount
:
0
})
.
ready
(
function
(
gadget
)
{
var
i
,
state
=
{},
element_list
=
gadget
.
element
.
querySelectorAll
(
'
[data-install-configuration]
'
);
if
(
window
.
Bootloader
===
undefined
)
{
window
.
Bootloader
=
gadget
;
}
gadget
.
props
=
{};
for
(
i
=
0
;
i
<
element_list
.
length
;
i
+=
1
)
{
state
[
element_list
[
i
].
getAttribute
(
'
data-install-configuration
'
)]
=
element_list
[
i
].
textContent
;
gadget
.
props
[
element_list
[
i
].
getAttribute
(
'
data-install-configuration
'
)]
=
element_list
[
i
].
textContent
;
}
state
.
redirect_url
=
new
URL
(
window
.
location
);
state
.
redirect_url
.
pathname
+=
state
.
version_url
;
if
(
state
.
redirect_url
.
hash
)
{
if
(
state
.
redirect_url
.
hash
.
startsWith
(
'
#access_token
'
))
{
gadget
.
props
.
redirect_url
=
new
URL
(
window
.
location
);
gadget
.
props
.
redirect_url
.
pathname
+=
gadget
.
props
.
version_url
;
if
(
gadget
.
props
.
redirect_url
.
hash
)
{
if
(
gadget
.
props
.
redirect_url
.
hash
.
startsWith
(
'
#access_token
'
))
{
// This is a bad hack to support dropbox.
state
.
redirect_url
.
hash
=
state
.
redirect_url
.
hash
.
replace
(
gadget
.
props
.
redirect_url
.
hash
=
gadget
.
props
.
redirect_url
.
hash
.
replace
(
'
#access_token
'
,
'
#/?page=ojs_dropbox_configurator&access_token
'
);
}
else
if
(
state
.
redirect_url
.
hash
}
else
if
(
gadget
.
props
.
redirect_url
.
hash
.
startsWith
(
'
#page=settings_configurator
'
))
{
// Make monitoring app still compatible with old instances setup URLs
state
.
redirect_url
.
hash
=
state
.
redirect_url
.
hash
.
replace
(
gadget
.
props
.
redirect_url
.
hash
=
gadget
.
props
.
redirect_url
.
hash
.
replace
(
'
#page=settings_configurator
'
,
'
#/?page=settings_configurator
'
);
}
}
return
gadget
.
changeState
(
state
);
})
.
allowPublicAcquisition
(
'
isChildren
'
,
function
()
{
return
true
;
})
.
declareAcquiredMethod
(
'
isChildren
'
,
'
isChildren
'
)
.
declareAcquiredMethod
(
'
renderError
'
,
'
renderError
'
)
.
declareService
(
function
()
{
var
gadget
=
this
;
return
gadget
.
isChildren
()
.
push
(
undefined
,
function
(
error
)
{
if
(
error
instanceof
rJS
.
AcquisitionError
)
{
return
RSVP
.
all
([
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
delay
(
600
);
})
.
push
(
function
()
{
return
gadget
.
changeState
({
main
:
true
});
}),
gadget
.
install
()
.
push
(
function
()
{
window
.
location
=
gadget
.
state
.
redirect_url
;
})
]);
}
throw
error
;
});
})
.
allowPublicAcquisition
(
'
renderError
'
,
function
(
param_list
)
{
param_list
[
0
].
error_amount
=
this
.
state
.
error_amount
+
1
;
return
this
.
changeState
(
param_list
[
0
]);
return
RSVP
.
all
([
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
delay
(
600
);
})
.
push
(
function
()
{
return
gadget
.
changeState
({
app_name
:
gadget
.
props
.
app_name
,
redirect_url
:
gadget
.
props
.
redirect_url
});
}),
gadget
.
install
()
.
push
(
function
()
{
window
.
location
=
gadget
.
props
.
redirect_url
;
})
]);
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
return
this
.
getDeclaredGadget
(
'
view_gadget
'
)
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
element
=
gadget
.
element
.
querySelector
(
'
.presentation
'
);
if
(
element
)
{
return
gadget
.
getDeclaredGadget
(
'
view
'
);
}
element
=
document
.
createElement
(
"
div
"
);
element
.
className
=
"
presentation
"
;
gadget
.
element
.
appendChild
(
element
);
return
gadget
.
declareGadget
(
"
gadget_officejs_bootloader_presentation.html
"
,
{
"
scope
"
:
"
view
"
,
"
element
"
:
element
}
);
})
.
push
(
function
(
view_gadget
)
{
return
view_gadget
.
render
(
options
);
});
})
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
,
element
,
options
;
if
(
modification_dict
.
main
)
{
element
=
document
.
createElement
(
"
div
"
);
element
.
className
=
"
presentation
"
;
gadget
.
element
.
insertBefore
(
element
,
gadget
.
element
.
firstChild
);
return
gadget
.
declareGadget
(
"
gadget_officejs_bootloader_presentation.html
"
,
{
"
scope
"
:
"
view_gadget
"
,
"
element
"
:
element
}
)
.
push
(
function
(
view_gadget
)
{
return
view_gadget
.
render
({
app_name
:
gadget
.
state
.
app_name
,
redirect_url
:
gadget
.
state
.
redirect_url
});
});
}
if
(
modification_dict
.
error
)
{
options
=
{
error
:
gadget
.
state
.
error
,
error_amount
:
gadget
.
state
.
error_amount
};
if
(
modification_dict
.
error_source
)
{
options
.
error_source
=
gadget
.
state
.
error_source
;
}
if
(
gadget
.
state
.
main
)
{
return
gadget
.
render
(
options
);
}
options
.
error_source
=
gadget
.
state
.
app_name
;
return
gadget
.
renderError
(
options
);
}
})
.
declareMethod
(
'
declareAndInstall
'
,
function
(
url
)
{
var
element
=
document
.
createElement
(
"
div
"
);
element
.
setAttribute
(
"
style
"
,
"
display: none
"
);
this
.
element
.
appendChild
(
element
);
return
this
.
declareGadget
(
url
,
{
"
element
"
:
element
,
"
scope
"
:
url
,
"
sandbox
"
:
"
iframe
"
})
.
push
(
function
(
sub_gadget
)
{
return
sub_gadget
.
install
();
});
return
this
.
render
(
modification_dict
);
})
.
declareMethod
(
"
install
"
,
function
()
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_js.xml
View file @
71e8f118
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.29130.48991.23978
</string>
</value>
<value>
<string>
96
4.54546.48173.5239
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
151
0654966.6
</float>
<float>
151
6029576.45
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_presentation_html.html
View file @
71e8f118
...
...
@@ -24,7 +24,6 @@
<div
class=
"loader"
></div>
<a
class=
"skip-link"
href=
"#"
>
Skip
</a>
<div
class=
"error-message"
></div>
<div
class=
"error-source"
></div>
<div
class=
"error-amount"
></div>
</div>
</center>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_presentation_html.xml
View file @
71e8f118
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
vincent
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
1.59243.21205.33843
</string>
</value>
<value>
<string>
96
4.45561.47559.9591
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
15
04683723.57
</float>
<float>
15
15751622.79
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_presentation_js.js
View file @
71e8f118
...
...
@@ -16,10 +16,6 @@
app_name_div
.
textContent
=
gadget
.
state
.
app_name
+
"
is being prepared for 100 % offline mode
"
;
}
if
(
modification_dict
.
error_source
)
{
app_name_div
=
gadget
.
element
.
querySelector
(
"
.error-source
"
);
app_name_div
.
textContent
=
"
Source:
"
+
gadget
.
state
.
error_source
;
}
if
(
modification_dict
.
error_amount
)
{
app_name_div
=
gadget
.
element
.
querySelector
(
"
.error-amount
"
);
app_name_div
.
textContent
=
"
Retry:
"
+
gadget
.
state
.
error_amount
;
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_bootloader_presentation_js.xml
View file @
71e8f118
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
vincent
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
1.59243.59705.49169
</string>
</value>
<value>
<string>
96
4.45561.47559.9591
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
15
04683865.92
</float>
<float>
15
15751635.24
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_crib_appcache.xml
View file @
71e8f118
...
...
@@ -179,9 +179,47 @@ gadget_officejs_jio_crib_from.html\n
gadget_officejs_page_jio_crib_configurator.html\n
gadget_officejs_page_jio_crib_configurator.js\n
gadget_officejs_crib_panel.html\n
GADGET:\n
officejs_codemirror/\n
officejs_setting_gadget/\n
\n
#setting\n
gadget_officejs_setting.js\n
gadget_officejs_setting.html\n
\n
#codemirror\n
codemirror/lib/codemirror.js\n
codemirror/lib/codemirror.css\n
codemirror/addon/cm_edit/matchbrackets.js\n
codemirror/addon/cm_edit/trailingspace.js\n
codemirror/addon/dialog/dialog.css\n
codemirror/addon/dialog/dialog.js\n
codemirror/addon/display/fullscreen.css\n
codemirror/addon/display/fullscreen.js\n
codemirror/addon/display/rulers.js\n
codemirror/addon/search/searchcursor.js\n
codemirror/addon/search/search.js\n
codemirror/addon/search/jump-to-line.js\n
codemirror/addon/selection/active-line.js\n
codemirror/addon/hint/show-hint.css\n
codemirror/addon/hint/show-hint.js\n
codemirror/addon/hint/anyword-hint.js\n
codemirror/addon/fold/foldgutter.css\n
codemirror/addon/fold/foldcode.js\n
codemirror/addon/fold/foldgutter.js\n
codemirror/addon/fold/indent-fold.js\n
codemirror/addon/fold/comment-fold.js\n
codemirror/addon/merge/merge.css\n
diff_match_patch/javascript/diff_match_patch_uncompressed.js\n
codemirror/addon/merge/merge.js\n
codemirror/addon/lint/lint.css\n
codemirror/addon/lint/lint.js\n
jshint.js\n
codemirror/addon/lint/javascript-lint.js\n
csslint.js\n
codemirror/addon/lint/css-lint.js\n
codemirror/mode/xml/xml.js\n
codemirror/mode/javascript/javascript.js\n
codemirror/mode/css/css.js\n
codemirror/mode/htmlmixed/htmlmixed.js\n
codemirror.gadget.js\n
NETWORK:\n
*
</string>
</value>
</item>
...
...
@@ -310,7 +348,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
vincent
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -324,7 +362,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.11887.7068.107
17
</string>
</value>
<value>
<string>
96
4.56117.35717.626
17
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -342,7 +380,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
151
5517761.42
</float>
<float>
151
6267653.77
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_drive_app_appcache.xml
View file @
71e8f118
...
...
@@ -220,8 +220,10 @@ drive_app_landing_page.html\n
gadget_officejs_drive_app_router.html\n
gadget_officejs_jio_drive_record_view.html\n
gadget_officejs_jio_drive_record_view.js\n
GADGET:\n
officejs_setting_gadget/\n
\n
#setting\n
gadget_officejs_setting.js\n
gadget_officejs_setting.html\n
NETWORK:\n
*
</string>
</value>
</item>
...
...
@@ -350,7 +352,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
vincent
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -364,7 +366,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.52711.11260.52684
</string>
</value>
<value>
<string>
96
4.45561.47559.9591
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -382,8 +384,8 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15
08137848.27
</float>
<string>
GMT+9
</string>
<float>
15
15771172.06
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_appcachestorage_js.js
View file @
71e8f118
...
...
@@ -7,12 +7,10 @@
function
AppCacheStorage
(
spec
)
{
this
.
_manifest
=
spec
.
manifest
;
this
.
_gadget
=
spec
.
gadget
;
this
.
_take_installer
=
spec
.
take_installer
||
false
;
this
.
_origin_url
=
spec
.
origin_url
!==
undefined
?
spec
.
origin_url
:
window
.
location
.
href
;
this
.
_version
=
spec
.
version
||
""
;
this
.
_gadget_list
=
[];
this
.
_prefix
=
spec
.
prefix
||
"
./
"
;
this
.
_documents
=
{};
// Harcoded here, find a better way.
...
...
@@ -26,8 +24,7 @@
this
.
_prefix
+
"
gadget_officejs_bootloader_serviceworker.js
"
,
this
.
_prefix
+
"
gadget_erp5_nojqm.css
"
,
this
.
_prefix
+
"
officejs_logo.png
"
,
this
.
_prefix
+
"
jio_appcachestorage.js
"
,
this
.
_prefix
+
"
jio_limitalldocsstorage.js
"
this
.
_prefix
+
"
jio_appcachestorage.js
"
];
}
else
{
this
.
_relative_url_list
=
[
this
.
_prefix
+
"
/
"
];
...
...
@@ -51,13 +48,6 @@
AppCacheStorage
.
prototype
.
getAttachment
=
function
(
origin_url
,
relative_url
)
{
var
storage
=
this
;
if
(
storage
.
_gadget_list
.
indexOf
(
relative_url
)
>=
0
)
{
return
window
.
Bootloader
.
declareAndInstall
(
relative_url
)
.
push
(
function
()
{
return
new
Blob
([]);
});
}
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
jIO
.
util
.
ajax
({
...
...
@@ -77,9 +67,6 @@
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
result
[
this
.
_relative_url_list
[
i
]]
=
{};
}
for
(
i
=
0
;
i
<
this
.
_gadget_list
.
length
;
i
+=
1
)
{
result
[
this
.
_gadget_list
[
i
]]
=
{};
}
return
result
;
}
return
[];
...
...
@@ -120,22 +107,17 @@
storage
.
_relative_url_list
.
push
(
storage
.
_version
+
storage
.
_manifest
);
for
(
i
=
0
;
i
<
relative_url_list
.
length
;
i
+=
1
)
{
if
(
relative_url_list
[
i
].
indexOf
(
"
NETWORK:
"
)
>=
0
)
{
take
=
3
;
}
else
if
(
relative_url_list
[
i
].
indexOf
(
'
GADGET:
'
)
>=
0
)
{
take
=
2
;
take
=
false
;
}
else
if
(
relative_url_list
[
i
]
!==
""
&&
relative_url_list
[
i
].
charAt
(
0
)
!==
'
#
'
&&
relative_url_list
[
i
].
charAt
(
0
)
!==
'
'
)
{
if
(
take
===
1
)
{
storage
.
_relative_url_list
.
push
(
storage
.
_version
+
relative_url_list
[
i
]
);
}
else
if
(
take
===
2
)
{
storage
.
_gadget_list
.
push
(
relative_url_list
[
i
]);
}
relative_url_list
[
i
].
charAt
(
0
)
!==
'
'
&&
take
)
{
storage
.
_relative_url_list
.
push
(
storage
.
_version
+
relative_url_list
[
i
]
);
}
if
(
relative_url_list
[
i
].
indexOf
(
"
CACHE:
"
)
>=
0
)
{
take
=
1
;
take
=
true
;
}
}
})
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_appcachestorage_js.xml
View file @
71e8f118
...
...
@@ -239,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
3.23286.30579.38041
</string>
</value>
<value>
<string>
96
4.50005.13436.62685
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
151
0304670.0
5
</float>
<float>
151
5753347.
5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_js.js
View file @
71e8f118
...
...
@@ -9,138 +9,85 @@
application_dict
=
{
"
Text Editor
"
:
{
"
url
"
:
"
officejs_text_editor/
"
,
"
cache
"
:
"
gadget_officejs_text_editor.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_officejs_text_editor.appcache
"
},
"
Illustration Editor
"
:
{
"
url
"
:
"
officejs_svg_editor/
"
,
"
cache
"
:
"
gadget_officejs_illustration.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_svg_editor_gadget
"
,
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_officejs_illustration.appcache
"
},
"
PDF Viewer
"
:
{
"
url
"
:
"
officejs_pdf_viewer/
"
,
"
cache
"
:
"
gadget_officejs_pdf_viewer.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_pdf_viewer_gadget
"
,
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_officejs_pdf_viewer.appcache
"
},
"
Cribjs
"
:
{
"
url
"
:
"
officejs_cribjs/
"
,
"
cache
"
:
"
gadget_officejs_crib.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_codemirror
"
,
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_officejs_crib.appcache
"
},
"
Bookmark Manager
"
:
{
"
url
"
:
"
officejs_bookmark_manager/
"
,
"
cache
"
:
"
gadget_officejs_bookmark_manager.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_officejs_bookmark_manager.appcache
"
},
"
Onlyoffice Text
"
:
{
"
url
"
:
"
ooffice_text/
"
,
"
cache
"
:
"
gadget_ooffice_text.appcache
"
,
"
sub_gadget
"
:
[
"
ooffice_onlyoffice_gadget
"
,
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_ooffice_text.appcache
"
},
"
Onlyoffice Spreadsheet
"
:
{
"
url
"
:
"
ooffice_spreadsheet/
"
,
"
cache
"
:
"
gadget_ooffice_spreadsheet.appcache
"
,
"
sub_gadget
"
:
[
"
ooffice_onlyoffice_gadget
"
,
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_ooffice_spreadsheet.appcache
"
},
"
Onlyoffice Presentation
"
:
{
"
url
"
:
"
ooffice_presentation/
"
,
"
cache
"
:
"
gadget_ooffice_presentation.appcache
"
,
"
sub_gadget
"
:
[
"
ooffice_onlyoffice_gadget
"
,
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_ooffice_presentation.appcache
"
},
"
Web Table Editor
"
:
{
"
url
"
:
"
officejs_web_table_editor/
"
,
"
cache
"
:
"
gadget_officejs_web_table.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_web_table_editor_gadget
"
,
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_officejs_web_table.appcache
"
},
"
Image Editor
"
:
{
"
url
"
:
"
officejs_image_editor/
"
,
"
cache
"
:
"
gadget_officejs_image_editor.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_image_editor_gadget
"
,
"
officejs_setting_gadget
"
]
"
cache
"
:
"
gadget_officejs_image_editor.appcache
"
},
"
Awesome Free Software Publisher List
"
:
{
"
url
"
:
"
afs/
"
,
"
cache
"
:
"
gadget_erp5_afs.appcache
"
,
"
no_installer
"
:
true
,
"
sub_gadget
"
:
[]
"
no_installer
"
:
true
},
"
Jabber Client
"
:
{
"
url
"
:
"
jabber_client/
"
,
"
cache
"
:
"
gadget_jabberclient.appcache
"
,
"
no_installer
"
:
true
,
"
sub_gadget
"
:
[
"
connection
"
]
"
no_installer
"
:
true
},
"
Monitoring App
"
:
{
"
url
"
:
"
officejs_monitoring/
"
,
"
cache
"
:
"
gadget_officejs_monitoring.appcache
"
,
"
sub_gadget
"
:
[]
"
cache
"
:
"
gadget_officejs_monitoring.appcache
"
},
"
App Store
"
:
{
"
url
"
:
"
officejsoldv1/
"
,
"
cache
"
:
"
officejs_store.appcache
"
,
"
no_installer
"
:
true
,
"
sub_gadget
"
:
[]
"
no_installer
"
:
true
},
"
MediaPlayer
"
:
{
"
url
"
:
"
officejs_audioplayer/
"
,
"
cache
"
:
"
gadget_officejs_audioplayer.appcache
"
,
"
no_installer
"
:
true
,
"
sub_gadget
"
:
[]
"
no_installer
"
:
true
},
"
Trade Application
"
:
{
"
url
"
:
"
osp-9/
"
,
"
cache
"
:
"
gadget_trade_application.appcache
"
,
"
no_installer
"
:
true
,
"
sub_gadget
"
:
[]
"
no_installer
"
:
true
},
"
Todomvc
"
:
{
"
url
"
:
"
officejs_todomvc/
"
,
"
cache
"
:
"
officejs_todomvc.appcache
"
,
"
no_installer
"
:
true
,
"
sub_gadget
"
:
[]
"
no_installer
"
:
true
},
"
Wall Search
"
:
{
"
url
"
:
"
officejs_wallsearch/
"
,
"
cache
"
:
"
gadget_erp5_page_ojs_wallsearch.appcache
"
,
"
sub_gadget
"
:
[]
"
cache
"
:
"
gadget_erp5_page_ojs_wallsearch.appcache
"
},
"
Drive App
"
:
{
"
url
"
:
"
officejs_drive_app/
"
,
"
cache
"
:
"
gadget_officejs_drive_app.appcache
"
,
"
sub_gadget
"
:
[
"
officejs_setting_gadget
"
]
},
"
connection
"
:
{
"
cache
"
:
"
gadget_jabberconnection.appcache
"
,
"
no_installer
"
:
true
},
"
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_onlyoffice_gadget
"
:
{
"
cache
"
:
"
onlyoffice.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
"
"
cache
"
:
"
gadget_officejs_drive_app.appcache
"
}
};
...
...
@@ -157,32 +104,10 @@
}
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
,
application_dict
[
sub_app
].
no_installer
,
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
,
app
.
no_installer
)
.
push
(
function
(
zip_file
)
{
return
fill
(
zip_file
);
})
.
push
(
function
(
zip_file
)
{
var
element
=
gadget
.
props
.
element
,
var
element
=
gadget
.
element
,
a
=
document
.
createElement
(
"
a
"
),
url
=
URL
.
createObjectURL
(
zip_file
),
default_name
=
form_result
.
web_site
.
toLocaleLowerCase
()
...
...
@@ -200,13 +125,8 @@
rJS
(
window
)
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
.
declareMethod
(
"
fillZip
"
,
function
(
cache_file
,
site_url
,
no_installer
,
zip_file
,
prefix
)
{
.
declareMethod
(
"
fillZip
"
,
function
(
cache_file
,
site_url
,
no_installer
)
{
var
gadget
=
this
,
file_storage
=
jIO
.
createJIO
({
type
:
"
replicate
"
,
...
...
@@ -225,7 +145,7 @@
take_installer
:
no_installer
===
undefined
,
manifest
:
cache_file
,
origin_url
:
site_url
,
prefix
:
'
./
'
+
(
prefix
||
""
)
prefix
:
'
./
'
}
},
signature_sub_storage
:
{
...
...
@@ -235,8 +155,7 @@
}
},
local_sub_storage
:
{
type
:
"
zipfile
"
,
file
:
zip_file
type
:
"
zipfile
"
}
});
return
file_storage
.
repair
()
...
...
@@ -253,7 +172,7 @@
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
loopEventListener
(
gadget
.
props
.
element
.
querySelector
(
'
form.export-form
'
),
gadget
.
element
.
querySelector
(
'
form.export-form
'
),
'
submit
'
,
true
,
function
(
event
)
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_export_js.xml
View file @
71e8f118
...
...
@@ -254,7 +254,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
964.
45862.32132.53930
</string>
</value>
<value>
<string>
964.
50048.10199.31402
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -272,7 +272,7 @@
</tuple>
<state>
<tuple>
<float>
1515
504420.2
9
</float>
<float>
1515
755593.0
9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_limitalldocsstorage_js.js
deleted
100644 → 0
View file @
69511d90
/*jslint indent:2, maxlen: 80, nomen: true */
/*global jIO */
(
function
(
jIO
)
{
"
use strict
"
;
function
LimitAllDocsStorage
(
spec
)
{
this
.
_document
=
spec
.
document
;
this
.
_sub_storage
=
jIO
.
createJIO
(
spec
.
sub_storage
);
}
LimitAllDocsStorage
.
prototype
.
get
=
function
()
{
return
this
.
_sub_storage
.
get
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
allAttachments
=
function
()
{
return
this
.
_sub_storage
.
allAttachments
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
post
=
function
()
{
return
this
.
_sub_storage
.
post
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
put
=
function
()
{
return
this
.
_sub_storage
.
put
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
remove
=
function
()
{
return
this
.
_sub_storage
.
remove
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
getAttachment
=
function
()
{
return
this
.
_sub_storage
.
getAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
putAttachment
=
function
()
{
return
this
.
_sub_storage
.
putAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
removeAttachment
=
function
()
{
return
this
.
_sub_storage
.
removeAttachment
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
repair
=
function
()
{
return
this
.
_sub_storage
.
repair
.
apply
(
this
.
_sub_storage
,
arguments
);
};
LimitAllDocsStorage
.
prototype
.
hasCapacity
=
function
(
name
)
{
return
this
.
_sub_storage
.
hasCapacity
(
name
);
};
LimitAllDocsStorage
.
prototype
.
buildQuery
=
function
(
options
)
{
var
storage
=
this
;
return
this
.
_sub_storage
.
allDocs
(
options
)
.
push
(
function
(
result
)
{
var
i
;
for
(
i
=
0
;
i
<
result
.
data
.
total_rows
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
id
===
storage
.
_document
)
{
return
[
result
.
data
.
rows
[
i
]];
}
}
return
[];
});
};
jIO
.
addStorage
(
'
limitalldocs
'
,
LimitAllDocsStorage
);
}(
jIO
));
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_limitalldocsstorage_js.xml
deleted
100644 → 0
View file @
69511d90
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs/PathTemplateItem/web_page_module/ojs_wallsearch_appcache.xml
View file @
71e8f118
...
...
@@ -198,7 +198,6 @@ gadget_erp5_search_editor.html\n
jio_cachealldocsstorage.js\n
wallsearch_privacy_policy.html\n
fb_sdk.js\n
GADGET:\n
NETWORK:\n
*
</string>
</value>
</item>
...
...
@@ -327,7 +326,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
vincent
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -341,7 +340,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.22868.65392.39372
</string>
</value>
<value>
<string>
96
4.45561.47559.9591
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -359,7 +358,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15
06433645.19
</float>
<float>
15
15773947.57
</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