Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
2a7c937c
Commit
2a7c937c
authored
Dec 12, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug(add new format table without title into 1 row)
parent
c62cd0e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
cell/model/autofilters.js
cell/model/autofilters.js
+20
-0
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+6
-6
No files found.
cell/model/autofilters.js
View file @
2a7c937c
...
...
@@ -387,6 +387,26 @@
worksheet
.
_moveRange
(
rangeWithoutDiff
,
new
Asc
.
Range
(
filterRange
.
c1
,
filterRange
.
r1
+
1
,
filterRange
.
c2
,
filterRange
.
r2
));
}
}
else
if
(
!
addNameColumn
)
{
if
(
filterRange
.
r1
===
filterRange
.
r2
)
{
if
(
t
.
_isEmptyCellsUnderRange
(
rangeWithoutDiff
))
{
filterRange
.
r2
++
;
}
else
{
filterRange
.
r2
++
;
//shift down not empty range and move
if
(
!
isTurnOffHistory
)
{
worksheet
.
getRange3
(
filterRange
.
r2
,
filterRange
.
c1
,
filterRange
.
r2
,
filterRange
.
c2
).
addCellsShiftBottom
();
}
}
}
}
//add to model
var
newTablePart
=
t
.
_addNewFilter
(
filterRange
,
styleName
,
bWithoutFilter
,
tablePartDisplayName
,
pasteStyleObj
);
...
...
cell/view/WorksheetView.js
View file @
2a7c937c
...
...
@@ -11342,10 +11342,11 @@
t
.
handlers
.
trigger
(
"
selectionChanged
"
);
return
;
}
var
addNameColumn
,
filterRange
;
if
(
addFormatTableOptionsObj
&&
isChangeAutoFilterToTablePart
(
addFormatTableOptionsObj
)
===
true
)
//CHANGE FILTER TO TABLEPART
{
var
filterRange
=
t
.
model
.
AutoFilter
.
Ref
.
clone
();
filterRange
=
t
.
model
.
AutoFilter
.
Ref
.
clone
();
var
addFilterCallBack
=
function
()
{
History
.
Create_NewPoint
();
...
...
@@ -11357,7 +11358,7 @@
History
.
EndTransaction
();
};
var
addNameColumn
=
false
;
addNameColumn
=
false
;
if
(
addFormatTableOptionsObj
===
false
)
{
addNameColumn
=
true
;
}
else
if
(
typeof
addFormatTableOptionsObj
==
'
object
'
)
{
...
...
@@ -11370,7 +11371,6 @@
t
.
_isLockedCells
(
filterRange
,
/*subType*/
null
,
addFilterCallBack
);
}
else
//ADD
{
var
addNameColumn
;
var
addFilterCallBack
=
function
()
{
History
.
Create_NewPoint
();
History
.
StartTransaction
();
...
...
@@ -11390,8 +11390,8 @@
addFilterCallBack
();
}
else
{
var
filterInfo
=
t
.
model
.
autoFilters
.
_getFilterInfoByAddTableProps
(
ar
,
addFormatTableOptionsObj
);
var
filterRange
=
filterInfo
.
filterRange
var
addNameColumn
=
filterInfo
.
addNameColumn
;
filterRange
=
filterInfo
.
filterRange
addNameColumn
=
filterInfo
.
addNameColumn
;
t
.
_isLockedCells
(
filterRange
,
null
,
addFilterCallBack
)
}
...
...
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