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
d854c883
Commit
d854c883
authored
May 05, 2016
by
GoshaZotov
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add functions for clear option
parent
5a0f3f84
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
0 deletions
+72
-0
cell/api.js
cell/api.js
+5
-0
cell/model/autofilters.js
cell/model/autofilters.js
+51
-0
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+16
-0
No files found.
cell/api.js
View file @
d854c883
...
...
@@ -568,6 +568,11 @@ var editor;
return
ws
.
clearFilter
();
};
spreadsheet_api
.
prototype
.
asc_clearFilterColumn
=
function
(
cellId
,
displayName
)
{
var
ws
=
this
.
wb
.
getWorksheet
();
return
ws
.
clearFilterColumn
(
cellId
,
displayName
);
};
spreadsheet_api
.
prototype
.
asc_changeSelectionFormatTable
=
function
(
tableName
,
optionType
)
{
var
ws
=
this
.
wb
.
getWorksheet
();
return
ws
.
af_changeSelectionFormatTable
(
tableName
,
optionType
);
...
...
cell/model/autofilters.js
View file @
d854c883
...
...
@@ -2416,6 +2416,39 @@
return
res
;
},
_getColIdColumn
:
function
(
filter
,
cellId
)
{
var
res
=
null
;
var
autoFilter
=
filter
&&
filter
.
getType
()
===
g_nFiltersType
.
tablePart
?
filter
.
AutoFilter
:
filter
;
if
(
autoFilter
&&
autoFilter
.
FilterColumns
&&
autoFilter
.
FilterColumns
.
length
)
{
var
rangeCellId
=
this
.
_idToRange
(
cellId
);
var
colId
=
autoFilter
.
Ref
.
c2
-
rangeCellId
.
c1
;
res
=
this
.
_getTrueColId
(
filter
,
colId
);
}
return
res
;
},
_getIndexByColId
:
function
(
autoFilter
,
cellId
)
{
var
res
=
null
;
for
(
var
i
=
0
;
i
<
autoFilter
.
FilterColumns
.
length
;
i
++
)
{
if
(
autoFilter
.
FilterColumns
[
i
].
ColId
===
colId
)
{
index
=
i
;
break
;
}
}
return
res
;
},
_hiddenAnotherFilter
:
function
(
filterColumns
,
cellId
,
r
,
c
)
{
var
worksheet
=
this
.
worksheet
;
...
...
@@ -4292,6 +4325,24 @@
return
oldFilter
.
Ref
;
},
clearFilterColumn
:
function
(
cellId
,
displayName
)
{
var
filter
=
this
.
_getFilterByDisplayName
(
displayName
);
var
autoFilter
=
filter
&&
filter
.
getType
()
===
g_nFiltersType
.
tablePart
?
filter
.
AutoFilter
:
filter
;
var
colId
=
this
.
_getColIdColumn
(
filter
,
cellId
);
if
(
colId
!==
null
)
{
var
index
=
this
.
_getIndexByColId
(
filter
,
colId
);
this
.
_openHiddenRowsAfterDeleteColumn
(
autoFilter
,
colId
);
autoFilter
.
FilterColumns
.
splice
(
index
,
1
);
}
return
filter
.
Ref
;
},
_checkValueInCells
:
function
(
n
,
k
,
cloneActiveRange
)
{
var
worksheet
=
this
.
worksheet
;
...
...
cell/view/WorksheetView.js
View file @
d854c883
...
...
@@ -12064,6 +12064,22 @@
this
.
_isLockedAll
(
onChangeAutoFilterCallback
);
};
WorksheetView
.
prototype
.
clearFilterColumn
=
function
(
cellId
,
displayName
)
{
var
t
=
this
;
var
onChangeAutoFilterCallback
=
function
(
isSuccess
)
{
if
(
false
===
isSuccess
)
{
return
;
}
var
updateRange
=
t
.
model
.
autoFilters
.
clearFilterColumn
(
cellId
,
displayName
);
if
(
false
!==
updateRange
)
t
.
_onUpdateFormatTable
(
updateRange
,
false
,
true
);
};
this
.
_isLockedAll
(
onChangeAutoFilterCallback
);
};
/**
* Обновление при изменениях форматированной таблицы
* @param range - обновляемый диапазон (он же диапазон для выделения)
...
...
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