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
3b8bb434
Commit
3b8bb434
authored
Jul 25, 2016
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_ooffice: integrate jio inside ooffice
parent
1032e833
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
215 additions
and
192 deletions
+215
-192
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_spreadsheet_view_js.js
...eb_page_module/gadget_officejs_jio_spreadsheet_view_js.js
+26
-8
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/ooffice_gadget_ooffice_js.js
...TemplateItem/web_page_module/ooffice_gadget_ooffice_js.js
+189
-184
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_jio_spreadsheet_view_js.js
View file @
3b8bb434
...
@@ -2,6 +2,12 @@
...
@@ -2,6 +2,12 @@
/*jslint indent: 2, nomen: true, maxlen: 80*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
document
,
RSVP
,
rJS
,
Handlebars
,
loopEventListener
)
{
(
function
(
window
,
document
,
RSVP
,
rJS
,
Handlebars
,
loopEventListener
)
{
"
use strict
"
;
"
use strict
"
;
function
this_func_link
(
name
)
{
return
function
()
{
return
this
[
name
].
apply
(
this
,
arguments
[
0
]);
};
}
function
saveContent
(
gadget
,
submit_event
)
{
function
saveContent
(
gadget
,
submit_event
)
{
var
i
,
var
i
,
...
@@ -22,7 +28,7 @@
...
@@ -22,7 +28,7 @@
})
})
.
push
(
function
(
data
)
{
.
push
(
function
(
data
)
{
doc
.
data
=
data
.
text_content
;
doc
.
data
=
data
.
text_content
;
return
gadget
.
put
(
gadget
.
options
.
jio_key
,
doc
);
return
gadget
.
jio_
put
(
gadget
.
options
.
jio_key
,
doc
);
});
});
}
}
...
@@ -96,11 +102,17 @@
...
@@ -96,11 +102,17 @@
})
})
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
put
"
,
"
jio_put
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
'
allDocs
'
,
'
jio_allDocs
'
)
.
allowPublicAcquisition
(
"
jio_get
"
,
this_func_link
(
"
jio_get
"
))
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_put
"
,
"
jio_put
"
)
.
allowPublicAcquisition
(
"
jio_put
"
,
this_func_link
(
"
jio_put
"
))
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
allowPublicAcquisition
(
"
jio_getAttachment
"
,
this_func_link
(
"
jio_getAttachment
"
))
.
declareAcquiredMethod
(
"
jio_putAttachment
"
,
"
jio_putAttachment
"
)
.
allowPublicAcquisition
(
"
jio_putAttachment
"
,
function
(
jio_key
,
part_name
,
blob
){
this
.
jio_putAttachment
(
jio_key
,
part_name
,
new
Blob
());
})
.
allowPublicAcquisition
(
'
setFillStyle
'
,
function
()
{
.
allowPublicAcquisition
(
'
setFillStyle
'
,
function
()
{
return
setFillStyle
(
this
);
return
setFillStyle
(
this
);
...
@@ -183,14 +195,20 @@
...
@@ -183,14 +195,20 @@
text_gadget
=
text_content_gadget
;
text_gadget
=
text_content_gadget
;
gadget
.
setFillStyle
();
gadget
.
setFillStyle
();
// switchMaximizeMode(gadget);
// switchMaximizeMode(gadget);
return
text_content_gadget
;
})
.
push
(
function
(
text_content_gadget
)
{
console
.
log
(
'
prerender
'
);
return
text_content_gadget
.
render
({
return
text_content_gadget
.
render
({
"
key
"
:
'
text_content
'
,
"
jio_key
"
:
gadget
.
options
.
jio_key
"
value
"
:
gadget
.
options
.
doc
.
data
,
"
portal_type
"
:
gadget
.
options
.
doc
.
portal_type
});
});
})
})
.
push
(
function
()
{
.
push
(
function
()
{
console
.
log
(
'
getelement
'
);
return
text_gadget
.
getElement
();
return
text_gadget
.
getElement
();
})
.
push
(
undefined
,
function
(
error
)
{
console
.
log
(
'
render subgadget error:
'
+
error
);
});
});
})
})
...
...
bt5/erp5_officejs_ooffice/PathTemplateItem/web_page_module/ooffice_gadget_ooffice_js.js
View file @
3b8bb434
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