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
31082d6c
Commit
31082d6c
authored
May 16, 2016
by
GoshaZotov
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change function applyAutoFilterByType
parent
c5d17452
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+27
-26
No files found.
cell/view/WorksheetView.js
View file @
31082d6c
...
...
@@ -12014,41 +12014,25 @@
var
ar
=
t
.
activeRange
.
clone
(
true
);
var
isStartRangeIntoFilterOrTable
=
t
.
model
.
autoFilters
.
isStartRangeContainIntoTableOrFilter
(
ar
);
var
isApplyAutoFilter
=
null
,
iaAddAutoFilter
=
null
,
cellId
,
filterProps
;
var
isApplyAutoFilter
=
null
,
iaAddAutoFilter
=
null
,
cellId
=
null
;
if
(
null
!==
isStartRangeIntoFilterOrTable
)
//into autofilter or format table
{
if
(
-
1
===
isStartRangeIntoFilterOrTable
)
//autofilter
{
var
autoFilter
=
t
.
model
.
AutoFilter
;
var
colId
=
ar
.
c1
-
autoFilter
.
Ref
.
c1
;
filterProps
=
{
id
:
null
,
colId
:
colId
};
isApplyAutoFilter
=
true
;
}
else
if
(
t
.
model
.
TableParts
[
isStartRangeIntoFilterOrTable
])
//format table
var
isFromatTable
=
!
(
-
1
===
isStartRangeIntoFilterOrTable
);
var
filterRef
=
isFromatTable
?
t
.
model
.
TableParts
[
isStartRangeIntoFilterOrTable
].
Ref
:
t
.
model
.
AutoFilter
.
Ref
;
cellId
=
t
.
model
.
autoFilters
.
_rangeToId
(
Asc
.
Range
(
ar
.
c1
,
filterRef
.
r1
,
ar
.
c1
,
filterRef
.
r1
));
isApplyAutoFilter
=
true
;
if
(
isFromatTable
&&
!
t
.
model
.
TableParts
[
isStartRangeIntoFilterOrTable
].
AutoFilter
)
//add autofilter to tablepart
{
var
formatTable
=
t
.
model
.
TableParts
[
isStartRangeIntoFilterOrTable
];
if
(
formatTable
.
AutoFilter
)
{
var
autoFilter
=
t
.
model
.
AutoFilter
;
var
colId
=
ar
.
c1
-
autoFilter
.
Ref
.
c1
;
filterProps
=
{
id
:
null
,
colId
:
colId
};
isApplyAutoFilter
=
true
;
}
else
{
}
iaAddAutoFilter
=
true
;
}
}
else
//without filter
{
iaAddAutoFilter
=
true
;
}
var
onChangeAutoFilterCallback
=
function
(
isSuccess
)
{
if
(
false
===
isSuccess
)
{
return
;
...
...
@@ -12060,11 +12044,28 @@
if
(
null
!==
isAddAutoFilter
)
{
t
.
model
.
autoFilters
.
addAutoFilter
(
null
,
ar
,
addFormatTableOptionsObj
);
if
(
null
===
cellId
)
{
cellId
=
t
.
model
.
autoFilters
.
_rangeToId
(
Asc
.
Range
(
ar
.
startCol
,
t
.
model
.
AutoFilter
.
Ref
.
r1
,
ar
.
startCol
,
t
.
model
.
AutoFilter
.
Ref
.
r1
));
}
}
if
(
null
!==
isApplyAutoFilter
)
{
var
autoFilterObject
=
t
.
af_setDialogProp
(
filterProps
,
true
);
autoFilterObject
.
asc_setCellId
(
cellId
);
if
(
c_oAscAutoFilterTypes
.
Filters
===
autoFilterObject
.
filter
.
type
)
{
var
autoFiltersOptionsElement
=
new
AutoFiltersOptionsElements
();
var
cell
=
t
.
model
.
_getCell
(
ar
.
startRow
,
ar
.
startCol
);
var
text
=
cell
.
getValueWithFormat
();
var
val
=
cell
.
getValueWithoutFormat
();
autoFiltersOptionsElement
.
visible
=
true
;
autoFiltersOptionsElement
.
val
=
val
;
autoFiltersOptionsElement
.
text
=
text
;
autoFiltersOptionsElement
.
isDateFormat
=
cell
.
getNumFormat
().
isDateTimeFormat
();
autoFilterObject
.
values
.
push
(
autoFiltersOptionsElement
);
}
var
applyFilterProps
=
t
.
model
.
autoFilters
.
applyAutoFilter
(
autoFilterObject
,
ar
);
...
...
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