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
ea6b2f1f
Commit
ea6b2f1f
authored
Apr 20, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete obscure check
fix #32273
parent
251415e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
29 deletions
+12
-29
cell/model/autofilters.js
cell/model/autofilters.js
+11
-28
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+1
-1
No files found.
cell/model/autofilters.js
View file @
ea6b2f1f
...
@@ -3302,8 +3302,8 @@
...
@@ -3302,8 +3302,8 @@
var
worksheet
=
this
.
worksheet
,
temp
=
{},
isDateTimeFormat
,
/*dataValue,*/
values
=
[];
var
worksheet
=
this
.
worksheet
,
temp
=
{},
isDateTimeFormat
,
/*dataValue,*/
values
=
[];
colId
=
this
.
_getTrueColId
(
filter
,
colId
);
colId
=
this
.
_getTrueColId
(
filter
,
colId
);
var
current
ElemArray
=
this
.
_getFilterColumnNum
(
filterColumns
,
colId
);
//номер данного фильтра в массиве фильтров
var
current
FilterColumn
=
this
.
_getFilterColumn
(
filter
,
colId
);
var
addValueToMenuObj
=
function
(
tempResult
,
count
)
var
addValueToMenuObj
=
function
(
tempResult
,
count
)
{
{
...
@@ -3343,10 +3343,8 @@
...
@@ -3343,10 +3343,8 @@
}
}
var
individualCount
,
count
,
tempResult
;
var
individualCount
,
count
,
tempResult
;
var
isCustomFilters
=
currentElemArray
!==
null
&&
filterColumns
[
currentElemArray
]
&&
filterColumns
[
currentElemArray
].
CustomFiltersObj
;
// ToDo Нужно проверить, я не очень понял, зачем тут была проверка...
var
isColorFilter
=
currentElemArray
!==
null
&&
filterColumns
[
currentElemArray
]
&&
filterColumns
[
currentElemArray
].
ColorFilter
;
if
(
true
)
{
if
(
currentElemArray
===
null
||
(
filterColumns
[
currentElemArray
]
&&
(
filterColumns
[
currentElemArray
].
Filters
||
filterColumns
[
currentElemArray
].
Top10
||
filterColumns
[
currentElemArray
].
ShowButton
===
false
)
||
isCustomFilters
||
isColorFilter
))
{
individualCount
=
0
;
individualCount
=
0
;
count
=
0
;
count
=
0
;
for
(
var
i
=
ref
.
r1
+
1
;
i
<=
maxFilterRow
;
i
++
)
for
(
var
i
=
ref
.
r1
+
1
;
i
<=
maxFilterRow
;
i
++
)
...
@@ -3356,7 +3354,7 @@
...
@@ -3356,7 +3354,7 @@
break
;
break
;
//not apply filter by current button
//not apply filter by current button
if
(
currentElemArray
===
null
&&
worksheet
.
getRowHidden
(
i
)
===
true
)
if
(
null
===
currentFilterColumn
&&
worksheet
.
getRowHidden
(
i
)
===
true
)
{
{
individualCount
++
;
individualCount
++
;
continue
;
continue
;
...
@@ -3376,7 +3374,7 @@
...
@@ -3376,7 +3374,7 @@
continue
;
continue
;
//apply filter by current button
//apply filter by current button
if
(
currentElemArray
!==
null
)
if
(
null
!==
currentFilterColumn
)
{
{
if
(
!
this
.
_hiddenAnotherFilter
(
filterColumns
,
colId
,
i
,
ref
.
c1
))
//filter another button
if
(
!
this
.
_hiddenAnotherFilter
(
filterColumns
,
colId
,
i
,
ref
.
c1
))
//filter another button
{
{
...
@@ -3387,7 +3385,8 @@
...
@@ -3387,7 +3385,8 @@
//filter current button
//filter current button
var
checkValue
=
isDateTimeFormat
?
val
:
text
;
var
checkValue
=
isDateTimeFormat
?
val
:
text
;
if
(
!
filterColumns
[
currentElemArray
].
Top10
&&
!
isCustomFilters
&&
!
isColorFilter
&&
!
filterColumns
[
currentElemArray
].
isHideValue
(
checkValue
,
isDateTimeFormat
))
if
(
!
currentFilterColumn
.
Top10
&&
!
currentFilterColumn
.
CustomFiltersObj
&&
!
currentFilterColumn
.
ColorFilter
&&
!
currentFilterColumn
.
isHideValue
(
checkValue
,
isDateTimeFormat
))
{
{
if
(
isOpenHiddenRows
)
if
(
isOpenHiddenRows
)
worksheet
.
setRowHidden
(
false
,
i
,
i
);
worksheet
.
setRowHidden
(
false
,
i
,
i
);
...
@@ -4286,6 +4285,7 @@
...
@@ -4286,6 +4285,7 @@
_getFilterColumn
:
function
(
autoFilter
,
colId
)
_getFilterColumn
:
function
(
autoFilter
,
colId
)
{
{
var
res
=
null
;
var
filters
;
var
filters
;
if
(
autoFilter
&&
autoFilter
.
FilterColumns
)
if
(
autoFilter
&&
autoFilter
.
FilterColumns
)
{
{
...
@@ -4294,29 +4294,12 @@
...
@@ -4294,29 +4294,12 @@
{
{
if
(
filters
[
k
].
ColId
==
colId
)
if
(
filters
[
k
].
ColId
==
colId
)
{
{
filters
=
filters
[
k
];
res
=
filters
[
k
];
break
;
}
}
}
return
filters
;
},
_getFilterColumnNum
:
function
(
filterColumns
,
colId
)
{
var
currentElemArray
=
null
;
if
(
filterColumns
&&
filterColumns
.
length
)
{
for
(
var
i
=
0
;
i
<
filterColumns
.
length
;
i
++
)
{
if
(
colId
===
filterColumns
[
i
].
ColId
)
{
currentElemArray
=
i
;
break
;
break
;
}
}
}
}
}
}
return
currentElemArray
;
return
res
;
},
},
_isEmptyCellsUnderRange
:
function
(
range
)
_isEmptyCellsUnderRange
:
function
(
range
)
...
...
cell/view/WorksheetView.js
View file @
ea6b2f1f
...
@@ -12609,7 +12609,7 @@
...
@@ -12609,7 +12609,7 @@
var
colId
=
filterProp
.
colId
;
var
colId
=
filterProp
.
colId
;
var
openAndClosedValues
=
ws
.
autoFilters
.
_getOpenAndClosedValues
(
autoFilter
,
colId
);
var
openAndClosedValues
=
ws
.
autoFilters
.
_getOpenAndClosedValues
(
autoFilter
,
colId
);
var
values
=
openAndClosedValues
.
values
;
var
values
=
openAndClosedValues
.
values
;
var
automaticRowCount
=
openAndClosedValues
.
automaticRowCount
var
automaticRowCount
=
openAndClosedValues
.
automaticRowCount
;
var
filters
=
ws
.
autoFilters
.
_getFilterColumn
(
autoFilter
,
colId
);
var
filters
=
ws
.
autoFilters
.
_getFilterColumn
(
autoFilter
,
colId
);
var
rangeButton
=
Asc
.
Range
(
autoFilter
.
Ref
.
c1
+
colId
,
autoFilter
.
Ref
.
r1
,
autoFilter
.
Ref
.
c1
+
colId
,
autoFilter
.
Ref
.
r1
);
var
rangeButton
=
Asc
.
Range
(
autoFilter
.
Ref
.
c1
+
colId
,
autoFilter
.
Ref
.
r1
,
autoFilter
.
Ref
.
c1
+
colId
,
autoFilter
.
Ref
.
r1
);
...
...
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