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
f7973779
Commit
f7973779
authored
Oct 27, 2016
by
Boris Kocherov
Committed by
Boris Kocherov
Nov 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: gadget_officejs_router_js.js jslint fix
parent
4aa4bfc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
112 deletions
+112
-112
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.js
...TemplateItem/web_page_module/gadget_officejs_router_js.js
+110
-110
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml
...emplateItem/web_page_module/gadget_officejs_router_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.js
View file @
f7973779
/*global window, rJS, jIO, URI, location, console, document, RSVP, loopEventListener, navigator */
/*jslint nomen: true, indent: 2, maxerr:
3
*/
/*global window, rJS, jIO, URI, location, console, document, RSVP, loopEventListener, navigator
, XMLHttpRequest, ProgressEvent
*/
/*jslint nomen: true, indent: 2, maxerr:
15
*/
(
function
(
window
,
rJS
)
{
"
use strict
"
;
...
...
@@ -31,23 +31,23 @@
"
ooffice/sdkjs/common/%
"
];
switch
(
name
)
{
case
"
spreadsheet
"
:
sdk_name
=
"
cell
"
;
erp5_query
.
push
(
"
ooffice/apps/
"
+
name
+
"
editor/main/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/word/%
"
);
break
;
case
"
text
"
:
sdk_name
=
"
word
"
;
erp5_query
.
push
(
"
ooffice/apps/documenteditor/main/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/cell/model/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/cell/utils/%
"
);
break
;
case
"
presentation
"
:
sdk_name
=
"
slide
"
;
erp5_query
.
push
(
"
ooffice/apps/
"
+
name
+
"
editor/main/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/word/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/cell/%
"
);
break
;
case
"
spreadsheet
"
:
sdk_name
=
"
cell
"
;
erp5_query
.
push
(
"
ooffice/apps/
"
+
name
+
"
editor/main/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/word/%
"
);
break
;
case
"
text
"
:
sdk_name
=
"
word
"
;
erp5_query
.
push
(
"
ooffice/apps/documenteditor/main/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/cell/model/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/cell/utils/%
"
);
break
;
case
"
presentation
"
:
sdk_name
=
"
slide
"
;
erp5_query
.
push
(
"
ooffice/apps/
"
+
name
+
"
editor/main/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/word/%
"
);
erp5_query
.
push
(
"
ooffice/sdkjs/cell/%
"
);
break
;
}
erp5_query
.
push
(
"
ooffice/sdkjs/
"
+
sdk_name
+
"
/%
"
);
...
...
@@ -55,83 +55,83 @@
return
'
url_string: "
'
+
currentValue
+
'
"
'
;
}).
join
(
'
OR
'
);
erp5_query
=
erp5_query
+
'
OR
'
+
[
"
ooffice/gadget_ooffice.js
"
,
"
ooffice/gadget_ooffice.html
"
,
"
ooffice/apps/require.js
"
,
"
ooffice/apps/css.js
"
,
"
ooffice/apps/underscore.js
"
,
"
ooffice/apps/backbone.js
"
,
"
ooffice/apps/bootstrap.js
"
,
"
ooffice/apps/text.js
"
,
"
ooffice/apps/xregexp-all-min.js
"
,
"
ooffice/apps/jquery.mousewheel.js
"
].
map
(
function
(
currentValue
)
{
return
'
url_string: ="
'
+
currentValue
+
'
"
'
;
}).
join
(
'
OR
'
);
"
ooffice/gadget_ooffice.js
"
,
"
ooffice/gadget_ooffice.html
"
,
"
ooffice/apps/require.js
"
,
"
ooffice/apps/css.js
"
,
"
ooffice/apps/underscore.js
"
,
"
ooffice/apps/backbone.js
"
,
"
ooffice/apps/bootstrap.js
"
,
"
ooffice/apps/text.js
"
,
"
ooffice/apps/xregexp-all-min.js
"
,
"
ooffice/apps/jquery.mousewheel.js
"
].
map
(
function
(
currentValue
)
{
return
'
url_string: ="
'
+
currentValue
+
'
"
'
;
}).
join
(
'
OR
'
);
erp5_query
=
erp5_query
+
'
OR
'
+
[
"
gadget_officejs_
"
+
name
+
"
_router.html
"
,
"
gadget_officejs_router.js
"
,
"
gadget_officejs_page_document_list.html
"
,
"
gadget_officejs_page_document_list.js
"
,
"
gadget_officejs_jio_
"
+
name
+
"
_view.html
"
,
"
gadget_officejs_jio_spreadsheet_view.js
"
,
"
gadget_officejs_page_add_document.html
"
,
"
gadget_officejs_page_add_document.js
"
,
"
gadget_erp5_editor_panel.html
"
,
"
gadget_erp5_editor_panel.js
"
,
"
URI.js
"
,
"
dygraph.js
"
,
"
gadget_erp5.css
"
,
"
gadget_global.js
"
,
"
gadget_jio.html
"
,
"
gadget_jio.js
"
,
"
gadget_translate.html
"
,
"
gadget_translate.js
"
,
"
i18next.js
"
,
"
jiodev.js
"
,
"
jquery.js
"
,
"
jquerymobile.css
"
,
"
jquerymobile.js
"
,
"
renderjs.js
"
,
"
rsvp.js
"
,
"
gadget_officejs_header.html
"
,
"
gadget_officejs_jio.html
"
,
"
gadget_officejs_page_add_document.html
"
,
"
gadget_officejs_page_jio_configurator.html
"
,
"
gadget_officejs_page_jio_dav_configurator.html
"
,
"
gadget_officejs_page_login.html
"
,
"
gadget_officejs_page_logout.html
"
,
"
gadget_officejs_page_share_webrtc_jio.html
"
,
"
gadget_officejs_page_sync.html
"
,
"
gadget_translation.html
"
,
"
gadget_officejs_webrtc_jio.html
"
,
"
gadget_officejs_widget_listbox.html
"
,
"
gadget_officejs_header.js
"
,
"
gadget_officejs_jio.js
"
,
"
gadget_officejs_page_add_document.js
"
,
"
gadget_officejs_page_jio_configurator.js
"
,
"
gadget_officejs_page_jio_dav_configurator.js
"
,
"
gadget_officejs_page_login.js
"
,
"
gadget_officejs_page_logout.js
"
,
"
gadget_officejs_page_share_webrtc_jio.js
"
,
"
gadget_officejs_page_sync.js
"
,
"
gadget_officejs_application_panel.html
"
,
"
gadget_officejs_application_panel.js
"
,
"
gadget_translation.js
"
,
"
gadget_translation_data.js
"
,
"
gadget_officejs_webrtc_jio.js
"
,
"
gadget_officejs_widget_listbox.js
"
,
"
erp5_launcher.js
"
,
"
erp5_launcher.html
"
].
map
(
function
(
currentValue
)
{
return
'
(reference: ="
'
+
currentValue
+
'
")
'
;
}).
join
(
'
OR
'
);
"
gadget_officejs_
"
+
name
+
"
_router.html
"
,
"
gadget_officejs_router.js
"
,
"
gadget_officejs_page_document_list.html
"
,
"
gadget_officejs_page_document_list.js
"
,
"
gadget_officejs_jio_
"
+
name
+
"
_view.html
"
,
"
gadget_officejs_jio_spreadsheet_view.js
"
,
"
gadget_officejs_page_add_document.html
"
,
"
gadget_officejs_page_add_document.js
"
,
"
gadget_erp5_editor_panel.html
"
,
"
gadget_erp5_editor_panel.js
"
,
"
URI.js
"
,
"
dygraph.js
"
,
"
gadget_erp5.css
"
,
"
gadget_global.js
"
,
"
gadget_jio.html
"
,
"
gadget_jio.js
"
,
"
gadget_translate.html
"
,
"
gadget_translate.js
"
,
"
i18next.js
"
,
"
jiodev.js
"
,
"
jquery.js
"
,
"
jquerymobile.css
"
,
"
jquerymobile.js
"
,
"
renderjs.js
"
,
"
rsvp.js
"
,
"
gadget_officejs_header.html
"
,
"
gadget_officejs_jio.html
"
,
"
gadget_officejs_page_add_document.html
"
,
"
gadget_officejs_page_jio_configurator.html
"
,
"
gadget_officejs_page_jio_dav_configurator.html
"
,
"
gadget_officejs_page_login.html
"
,
"
gadget_officejs_page_logout.html
"
,
"
gadget_officejs_page_share_webrtc_jio.html
"
,
"
gadget_officejs_page_sync.html
"
,
"
gadget_translation.html
"
,
"
gadget_officejs_webrtc_jio.html
"
,
"
gadget_officejs_widget_listbox.html
"
,
"
gadget_officejs_header.js
"
,
"
gadget_officejs_jio.js
"
,
"
gadget_officejs_page_add_document.js
"
,
"
gadget_officejs_page_jio_configurator.js
"
,
"
gadget_officejs_page_jio_dav_configurator.js
"
,
"
gadget_officejs_page_login.js
"
,
"
gadget_officejs_page_logout.js
"
,
"
gadget_officejs_page_share_webrtc_jio.js
"
,
"
gadget_officejs_page_sync.js
"
,
"
gadget_officejs_application_panel.html
"
,
"
gadget_officejs_application_panel.js
"
,
"
gadget_translation.js
"
,
"
gadget_translation_data.js
"
,
"
gadget_officejs_webrtc_jio.js
"
,
"
gadget_officejs_widget_listbox.js
"
,
"
erp5_launcher.js
"
,
"
erp5_launcher.html
"
].
map
(
function
(
currentValue
)
{
return
'
(reference: ="
'
+
currentValue
+
'
")
'
;
}).
join
(
'
OR
'
);
erp5_query
=
"
(
"
+
erp5_query
+
"
)
"
;
if
(
modification_date
)
{
modification_date
=
'
AND modification_date:>="
'
+
modification_date
+
'
"
'
+
modification_date
+
'
"
'
;
}
else
{
modification_date
=
""
;
}
...
...
@@ -140,7 +140,7 @@
type
:
"
replicate
"
,
query
:
{
query
:
'
(portal_type: ("Web Style", "Web Page", "Web Script")) AND
'
+
erp5_query
+
modification_date
,
erp5_query
+
modification_date
,
limit
:
[
0
,
1234567890
]
},
use_remote_post
:
true
,
...
...
@@ -246,8 +246,7 @@
if
(
options
!==
undefined
&&
options
.
toExternal
)
{
window
.
location
.
replace
(
options
.
url
);
return
RSVP
.
timeout
(
REDIRECT_TIMEOUT
);
// timeout if not redirected
}
else
{
}
else
{
return
this
.
getCommandUrlFor
(
options
)
.
push
(
function
(
hash
)
{
window
.
location
.
replace
(
hash
);
...
...
@@ -290,8 +289,8 @@
}
return
{
url
:
MAIN_PAGE_PREFIX
+
"
jio_
"
+
base_portal_type
+
"
_
"
+
args
.
page
+
"
.html
"
,
+
base_portal_type
+
"
_
"
+
args
.
page
+
"
.html
"
,
options
:
sub_options
};
});
...
...
@@ -311,7 +310,7 @@
function
push
(
a
,
b
)
{
queue
.
push
(
function
()
{
if
(
a
==
"
portal_type
"
)
{
if
(
a
==
=
"
portal_type
"
)
{
NAME
=
b
.
toLowerCase
();
}
return
gadget
.
setSetting
(
a
,
b
);
...
...
@@ -332,30 +331,31 @@
return
gadget
.
props
.
start_deferred
.
promise
;
})
.
push
(
function
()
{
if
((
'
serviceWorker
'
in
navigator
)
&&
(
NAME
!=
"
web page
"
))
{
if
((
'
serviceWorker
'
in
navigator
)
&&
(
NAME
!=
=
"
web page
"
))
{
return
jIO
.
createJIO
(
get_jio_cache_storage
(
NAME
)).
allDocs
({
query
:
''
,
sort_on
:
[
[
'
modification_date
'
,
'
descending
'
]
],
limit
:
[
0
,
1
],
select_list
:
[
'
modification_date
'
]
})
query
:
''
,
sort_on
:
[
[
'
modification_date
'
,
'
descending
'
]
],
limit
:
[
0
,
1
],
select_list
:
[
'
modification_date
'
]
})
.
push
(
function
(
data
)
{
var
modification_date
,
jio_store
;
if
(
data
.
data
.
total_rows
==
1
)
{
modification_date
=
data
.
data
.
rows
[
0
].
value
.
modification_date
if
(
data
.
data
.
total_rows
==
=
1
)
{
modification_date
=
data
.
data
.
rows
[
0
].
value
.
modification_date
;
}
jio_store
=
get_jio_replicate_storage
(
NAME
);
return
gadget
.
getSetting
(
'
jio_
'
+
NAME
+
'
_cache_description
'
)
.
push
(
function
(
query
)
{
if
(
jio_store
.
__storage
.
_query_options
.
query
==
query
)
{
if
(
jio_store
.
__storage
.
_query_options
.
query
==
=
query
)
{
return
get_jio_replicate_storage
(
NAME
,
modification_date
).
repair
();
}
else
{
return
gadget
.
setSetting
(
'
jio_
'
+
NAME
+
'
_cache_description
'
,
jio_store
.
__storage
.
_query_options
.
query
)
'
jio_
'
+
NAME
+
'
_cache_description
'
,
jio_store
.
__storage
.
_query_options
.
query
)
.
push
(
function
()
{
return
jio_store
.
repair
();
});
...
...
@@ -381,7 +381,7 @@
// registration failed
console
.
log
(
'
Registration failed with
'
+
error
);
});
return
{}
return
{}
;
});
});
}
else
{
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_router_js.xml
View file @
f7973779
...
...
@@ -224,7 +224,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
3.49230.16074.49851
</string>
</value>
<value>
<string>
95
4.57717.26579.17015
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -242,7 +242,7 @@
</tuple>
<state>
<tuple>
<float>
147
3230498.18
</float>
<float>
147
7585369.16
</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