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
7834eb98
Commit
7834eb98
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 asc_setSortColor and asc_getSortColor
parent
418d775c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
60 deletions
+83
-60
cell/model/autofilters.js
cell/model/autofilters.js
+62
-56
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+21
-4
No files found.
cell/model/autofilters.js
View file @
7834eb98
...
...
@@ -137,6 +137,7 @@
this
.
isTextFilter
=
null
;
this
.
colorsFill
=
null
;
this
.
colorsFont
=
null
;
this
.
sortColor
=
null
;
return
this
;
}
...
...
@@ -159,6 +160,7 @@
case
this
.
Properties
.
isTextFilter
:
return
this
.
isTextFilter
;
break
;
case
this
.
Properties
.
colorsFill
:
return
this
.
colorsFill
;
break
;
case
this
.
Properties
.
colorsFont
:
return
this
.
colorsFont
;
break
;
case
this
.
Properties
.
sortColor
:
return
this
.
sortColor
;
break
;
}
return
null
;
...
...
@@ -173,6 +175,7 @@
case
this
.
Properties
.
isTextFilter
:
this
.
IsTextFilter
=
value
;
break
;
case
this
.
Properties
.
colorsFill
:
this
.
colorsFill
=
value
;
break
;
case
this
.
Properties
.
colorsFont
:
this
.
colorsFont
=
value
;
break
;
case
this
.
Properties
.
sortColor
:
this
.
sortColor
=
value
;
break
;
}
},
...
...
@@ -187,16 +190,18 @@
asc_setIsTextFilter
:
function
(
val
)
{
this
.
isTextFilter
=
val
;
},
asc_setColorsFill
:
function
(
val
)
{
this
.
colorsFill
=
val
;
},
asc_setColorsFont
:
function
(
val
)
{
this
.
colorsFont
=
val
;
},
asc_setSortColor
:
function
(
val
)
{
this
.
sortColor
=
val
;
},
asc_getCellId
:
function
()
{
return
this
.
cellId
;
},
asc_getValues
:
function
()
{
return
this
.
values
;
},
asc_getFilterObj
:
function
()
{
return
this
.
filter
;
},
asc_getSortState
:
function
()
{
return
this
.
sortVal
;
},
asc_getDisplayName
:
function
(
val
)
{
return
this
.
displayName
;
},
asc_getIsTextFilter
:
function
(
val
)
{
return
this
.
isTextFilter
;
},
asc_getColorsFill
:
function
(
val
)
{
return
this
.
colorsFill
;
},
asc_getColorsFont
:
function
(
val
)
{
return
this
.
colorsFont
;
}
asc_getDisplayName
:
function
()
{
return
this
.
displayName
;
},
asc_getIsTextFilter
:
function
()
{
return
this
.
isTextFilter
;
},
asc_getColorsFill
:
function
()
{
return
this
.
colorsFill
;
},
asc_getColorsFont
:
function
()
{
return
this
.
colorsFont
;
},
asc_getSortColor
:
function
()
{
return
this
.
sortColor
;
}
};
var
g_oAutoFilterObj
=
{
...
...
@@ -4710,6 +4715,7 @@
prot
[
"
asc_getIsTextFilter
"
]
=
prot
.
asc_getIsTextFilter
;
prot
[
"
asc_getColorsFill
"
]
=
prot
.
asc_getColorsFill
;
prot
[
"
asc_getColorsFont
"
]
=
prot
.
asc_getColorsFont
;
prot
[
"
asc_getSortColor
"
]
=
prot
.
asc_getSortColor
;
window
[
"
AscCommonExcel
"
].
AutoFilterObj
=
AutoFilterObj
;
prot
=
AutoFilterObj
.
prototype
;
...
...
cell/view/WorksheetView.js
View file @
7834eb98
...
...
@@ -12674,22 +12674,27 @@
filterObj
.
type
=
c_oAscAutoFilterTypes
.
Filters
;
//get sort
var
sortVal
=
false
;
var
sortVal
=
null
;
var
sortColor
=
null
;
if
(
filter
&&
filter
.
SortState
&&
filter
.
SortState
.
SortConditions
&&
filter
.
SortState
.
SortConditions
[
0
])
{
if
(
rangeButton
.
r1
==
filter
.
SortState
.
SortConditions
[
0
].
Ref
.
r1
&&
rangeButton
.
c1
==
filter
.
SortState
.
SortConditions
[
0
].
Ref
.
c1
)
var
SortConditions
=
filter
.
SortState
.
SortConditions
[
0
];
if
(
rangeButton
.
r1
==
SortConditions
.
Ref
.
r1
&&
rangeButton
.
c1
==
SortConditions
.
Ref
.
c1
)
{
var
conditionSortBy
=
filter
.
SortState
.
SortConditions
[
0
].
ConditionSortBy
;
var
conditionSortBy
=
SortConditions
.
ConditionSortBy
;
switch
(
conditionSortBy
)
{
case
Asc
.
ESortBy
.
sortbyCellColor
:
{
sortVal
=
Asc
.
c_oAscSortOptions
.
ByColorFill
;
sortColor
=
SortConditions
.
dxf
&&
SortConditions
.
dxf
.
fill
?
SortConditions
.
dxf
.
fill
.
bg
:
null
;
break
;
}
case
Asc
.
ESortBy
.
sortbyFontColor
:
{
sortVal
=
Asc
.
c_oAscSortOptions
.
ByColorFont
;
sortColor
=
SortConditions
.
dxf
&&
SortConditions
.
dxf
.
font
?
SortConditions
.
dxf
.
font
.
c
:
null
;
break
;
}
default
:
...
...
@@ -12705,6 +12710,17 @@
}
}
var
ascColor
=
null
;
if
(
null
!==
sortColor
)
{
ascColor
=
new
Asc
.
asc_CColor
();
ascColor
.
asc_putR
(
sortColor
.
getR
());
ascColor
.
asc_putG
(
sortColor
.
getG
());
ascColor
.
asc_putB
(
sortColor
.
getB
());
ascColor
.
asc_putA
(
sortColor
.
getA
());
}
//set menu object
var
autoFilterObject
=
new
AscCommonExcel
.
AutoFiltersOptions
();
...
...
@@ -12714,6 +12730,7 @@
autoFilterObject
.
asc_setFilterObj
(
filterObj
);
autoFilterObject
.
asc_setAutomaticRowCount
(
automaticRowCount
);
autoFilterObject
.
asc_setDiplayName
(
displayName
);
autoFilterObject
.
asc_setSortColor
(
ascColor
);
var
columnRange
=
Asc
.
Range
(
rangeButton
.
c1
,
autoFilter
.
Ref
.
r1
+
1
,
rangeButton
.
c1
,
autoFilter
.
Ref
.
r2
);
...
...
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