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
b41b1ed2
Commit
b41b1ed2
authored
Apr 18, 2019
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_only_office] olap_wizard: add merge cells in titles
parent
9fa97e0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
5 deletions
+40
-5
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice.gadget.js.js
...tem/portal_skins/erp5_only_office/onlyoffice.gadget.js.js
+40
-5
No files found.
bt5/erp5_only_office/SkinTemplateItem/portal_skins/erp5_only_office/onlyoffice.gadget.js.js
View file @
b41b1ed2
/*global window, rJS, RSVP, DocsAPI, console, document,
Common, require, jIO, URL, FileReader, atob, ArrayBuffer,
Common,
AscCommon,
require, jIO, URL, FileReader, atob, ArrayBuffer,
Uint8Array, XMLHttpRequest, Blob, Rusha, define,
Uint8ClampedArray, Asc, History,
TextDecoder, DesktopOfflineAppDocumentEndSave*/
...
...
@@ -66,11 +66,21 @@ DocsAPI.DocEditor.version = function () {
Api
.
_onUpdateDocumentCanSave
();
}
function
setCell
(
row
,
col
,
value
)
{
function
setCell
(
row
,
col
,
value
,
row1
,
col1
)
{
// setValue on range
s
.
GetRangeByNumber
(
row
,
col
).
range
.
_foreach
(
function
(
cell
)
{
cell
.
setValue
(
value
);
});
if
(
typeof
row1
===
"
number
"
&&
typeof
col1
===
"
number
"
)
{
var
range
=
s
.
worksheet
.
getRange3
(
row
,
col
,
row1
,
col1
);
if
(
col1
!==
col
)
{
range
.
setAlignHorizontal
(
AscCommon
.
align_Center
);
}
if
(
row1
!==
row
)
{
range
.
setAlignVertical
(
Asc
.
c_oAscVAlign
.
Top
);
}
s
.
worksheet
.
mergeManager
.
add
(
range
.
bbox
,
1
);
}
}
function
print_titles
(
levels
,
begin_row
,
begin_column
,
columns
)
{
...
...
@@ -78,6 +88,9 @@ DocsAPI.DocEditor.version = function () {
member
,
i
,
m
,
col1
,
row1
,
func
,
x
,
z
,
row
,
...
...
@@ -99,7 +112,8 @@ DocsAPI.DocEditor.version = function () {
for
(
z
=
0
;
z
<
repeats
*
members
.
length
*
span
;
z
+=
(
members
.
length
*
span
))
{
for
(
m
=
0
;
m
<
members
.
length
;
m
+=
1
)
{
member
=
members
[
m
];
for
(
x
=
0
;
x
<
span
;
x
+=
1
)
{
func
=
"
=CUBEMEMBER(
"
+
connection_name
+
'
,"
'
+
member
.
uname
+
'
")
'
;
for
(
x
=
1
;
x
<
span
;
x
+=
1
)
{
if
(
columns
)
{
row
=
begin_row
+
i
;
col
=
begin_column
+
z
+
(
m
*
span
)
+
x
;
...
...
@@ -107,9 +121,30 @@ DocsAPI.DocEditor.version = function () {
row
=
begin_row
+
z
+
(
m
*
span
)
+
x
;
col
=
begin_column
+
i
;
}
setCell
(
row
,
col
,
"
=CUBEMEMBER(
"
+
connection_name
+
'
,"
'
+
member
.
uname
+
'
")
'
);
setCell
(
row
,
col
,
func
);
}
if
(
columns
)
{
row
=
begin_row
+
i
;
col
=
begin_column
+
z
+
(
m
*
span
);
if
(
span
>
1
)
{
row1
=
row
;
col1
=
col
+
span
-
1
;
}
else
{
row1
=
undefined
;
col1
=
undefined
;
}
}
else
{
row
=
begin_row
+
z
+
(
m
*
span
);
col
=
begin_column
+
i
;
if
(
span
>
1
)
{
row1
=
row
+
span
-
1
;
col1
=
col
;
}
else
{
row1
=
undefined
;
col1
=
undefined
;
}
}
setCell
(
row
,
col
,
func
,
row1
,
col1
);
}
}
}
...
...
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