Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
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
web-apps
Commits
9a5ea5d4
Commit
9a5ea5d4
authored
Mar 29, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Отладка настройки форматированных таблиц.
parent
851d24d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
121 deletions
+83
-121
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+2
-1
apps/spreadsheeteditor/main/app/controller/RightMenu.js
apps/spreadsheeteditor/main/app/controller/RightMenu.js
+6
-6
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+6
-7
apps/spreadsheeteditor/main/app/view/TableSettings.js
apps/spreadsheeteditor/main/app/view/TableSettings.js
+69
-107
No files found.
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
View file @
9a5ea5d4
...
...
@@ -1156,7 +1156,8 @@ define([
documentHolder
.
pmiClear
.
menu
.
items
[
3
].
setVisible
(
!
this
.
permissions
.
isEditDiagram
);
documentHolder
.
pmiClear
.
menu
.
items
[
4
].
setVisible
(
!
this
.
permissions
.
isEditDiagram
);
var
filterInfo
=
cellinfo
.
asc_getAutoFilterInfo
()
&&
cellinfo
.
asc_getAutoFilterInfo
().
asc_getIsApplyAutoFilter
();
var
filterInfo
=
cellinfo
.
asc_getAutoFilterInfo
();
filterInfo
=
(
filterInfo
)
?
filterInfo
.
asc_getIsApplyAutoFilter
()
:
false
;
documentHolder
.
pmiInsertCells
.
menu
.
items
[
0
].
setDisabled
(
filterInfo
);
documentHolder
.
pmiDeleteCells
.
menu
.
items
[
0
].
setDisabled
(
filterInfo
);
documentHolder
.
pmiInsertCells
.
menu
.
items
[
1
].
setDisabled
(
filterInfo
);
...
...
apps/spreadsheeteditor/main/app/controller/RightMenu.js
View file @
9a5ea5d4
...
...
@@ -73,18 +73,18 @@ define([
onSelectionChanged
:
function
(
info
)
{
var
SelectedObjects
=
[],
selectType
=
info
.
asc_getFlags
().
asc_getSelectionType
(),
f
ilterInfo
=
info
.
asc_getAutoFilter
Info
();
f
ormatTableInfo
=
info
.
asc_getFormatTable
Info
();
if
(
selectType
==
c_oAscSelectionType
.
RangeImage
||
selectType
==
c_oAscSelectionType
.
RangeShape
||
selectType
==
c_oAscSelectionType
.
RangeChart
||
selectType
==
c_oAscSelectionType
.
RangeChartText
||
selectType
==
c_oAscSelectionType
.
RangeShapeText
)
{
SelectedObjects
=
this
.
api
.
asc_getGraphicObjectProps
();
}
if
(
SelectedObjects
.
length
<=
0
&&
!
(
filterInfo
&&
filterInfo
.
asc_getTableName
()
!==
null
)
&&
!
this
.
rightmenu
.
minimizedMode
)
{
if
(
SelectedObjects
.
length
<=
0
&&
!
formatTableInfo
&&
!
this
.
rightmenu
.
minimizedMode
)
{
this
.
rightmenu
.
clearSelection
();
}
this
.
onFocusObject
(
SelectedObjects
,
f
ilter
Info
);
this
.
onFocusObject
(
SelectedObjects
,
f
ormatTable
Info
);
var
need_disable
=
info
.
asc_getLocked
(),
me
=
this
;
...
...
@@ -97,7 +97,7 @@ define([
}
},
onFocusObject
:
function
(
SelectedObjects
,
f
ilter
Info
)
{
onFocusObject
:
function
(
SelectedObjects
,
f
ormatTable
Info
)
{
if
(
!
this
.
editMode
)
return
;
...
...
@@ -135,9 +135,9 @@ define([
this
.
_settings
[
settingsType
].
locked
=
value
.
asc_getLocked
();
}
if
(
f
ilterInfo
&&
filterInfo
.
asc_getTableName
()
!==
null
)
{
if
(
f
ormatTableInfo
)
{
settingsType
=
Common
.
Utils
.
documentSettingsType
.
Table
;
this
.
_settings
[
settingsType
].
props
=
f
ilter
Info
;
this
.
_settings
[
settingsType
].
props
=
f
ormatTable
Info
;
this
.
_settings
[
settingsType
].
hidden
=
0
;
}
...
...
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
9a5ea5d4
...
...
@@ -1169,9 +1169,7 @@ define([
shortcuts
:
{
'
command+l,ctrl+l
'
:
function
(
e
)
{
if
(
me
.
editMode
)
{
var
cellinfo
=
me
.
api
.
asc_getCellInfo
(),
filterinfo
=
cellinfo
.
asc_getAutoFilterInfo
();
if
(
!
filterinfo
||
filterinfo
.
asc_getTableName
()
===
null
)
if
(
!
me
.
api
.
asc_getCellInfo
().
asc_getFormatTableInfo
())
me
.
_setTableFormat
(
me
.
toolbar
.
mnuTableTemplatePicker
.
store
.
at
(
23
).
get
(
'
name
'
));
}
...
...
@@ -1674,7 +1672,8 @@ define([
// (coauth_disable !== toolbar.btnClearStyle.isDisabled()) && toolbar.btnClearStyle.setDisabled(coauth_disable);
// (coauth_disable !== toolbar.btnCopyStyle.isDisabled()) && toolbar.btnCopyStyle.setDisabled(coauth_disable);
var
filterInfo
=
info
.
asc_getAutoFilterInfo
();
var
filterInfo
=
info
.
asc_getAutoFilterInfo
(),
formatTableInfo
=
info
.
asc_getFormatTableInfo
();
if
(
!
toolbar
.
mode
.
isEditMailMerge
)
{
/* read cell horizontal align */
fontparam
=
info
.
asc_getHorAlign
();
...
...
@@ -1751,7 +1750,7 @@ define([
}
}
need_disable
=
this
.
_state
.
controlsdisabled
.
filters
||
f
ilterInfo
&&
(
filterInfo
.
asc_getTableName
()
!==
null
||
filterInfo
.
asc_getIsAutoFilter
()
===
null
)
;
need_disable
=
this
.
_state
.
controlsdisabled
.
filters
||
f
ormatTableInfo
!==
null
||
filterInfo
&&
filterInfo
.
asc_getIsAutoFilter
()
===
null
;
// (need_disable !== toolbar.btnMerge.isDisabled()) && toolbar.btnMerge.setDisabled(need_disable);
toolbar
.
lockToolbar
(
SSE
.
enumLock
.
ruleMerge
,
need_disable
,
{
array
:[
toolbar
.
btnMerge
]});
...
...
@@ -1782,7 +1781,7 @@ define([
{
array
:
[
toolbar
.
btnSortDown
,
toolbar
.
btnSortUp
,
toolbar
.
mnuitemSortAZ
,
toolbar
.
mnuitemSortZA
,
toolbar
.
btnTableTemplate
,
toolbar
.
btnSetAutofilter
,
toolbar
.
mnuitemAutoFilter
,
toolbar
.
btnAutofilter
]
});
val
=
(
f
ilterInfo
)
?
filter
Info
.
asc_getTableStyleName
()
:
null
;
val
=
(
f
ormatTableInfo
)
?
formatTable
Info
.
asc_getTableStyleName
()
:
null
;
if
(
this
.
_state
.
tablestylename
!==
val
&&
this
.
toolbar
.
mnuTableTemplatePicker
)
{
val
=
this
.
toolbar
.
mnuTableTemplatePicker
.
store
.
findWhere
({
name
:
val
});
if
(
val
)
{
...
...
@@ -1794,7 +1793,7 @@ define([
}
}
this
.
_state
.
tablename
=
(
f
ilterInfo
)
?
filter
Info
.
asc_getTableName
()
:
undefined
;
this
.
_state
.
tablename
=
(
f
ormatTableInfo
)
?
formatTable
Info
.
asc_getTableName
()
:
undefined
;
need_disable
=
this
.
_state
.
controlsdisabled
.
filters
||
!
filterInfo
||
(
filterInfo
.
asc_getIsApplyAutoFilter
()
!==
true
);
toolbar
.
lockToolbar
(
SSE
.
enumLock
.
ruleDelFilter
,
need_disable
,
{
array
:[
toolbar
.
btnClearAutofilter
,
toolbar
.
mnuitemClearFilter
]});
...
...
apps/spreadsheeteditor/main/app/view/TableSettings.js
View file @
9a5ea5d4
...
...
@@ -36,6 +36,7 @@ define([
var
me
=
this
;
this
.
_state
=
{
TableName
:
''
,
TemplateName
:
''
,
CheckHeader
:
false
,
CheckTotal
:
false
,
...
...
@@ -48,7 +49,6 @@ define([
};
this
.
lockedControls
=
[];
this
.
_locked
=
false
;
// this._originalLook = new CTablePropLook();
this
.
_originalProps
=
null
;
this
.
_noApply
=
false
;
...
...
@@ -97,13 +97,13 @@ define([
});
this
.
lockedControls
.
push
(
this
.
chFilter
);
this
.
chHeader
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
0
));
this
.
chTotal
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
1
));
this
.
chBanded
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
2
));
this
.
chFirst
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
3
));
this
.
chLast
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
4
));
this
.
chColBanded
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
5
));
this
.
chFilter
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheck
FilterChange
,
this
));
this
.
chHeader
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
c_oAscChangeTableStyleInfo
.
rowHeader
));
this
.
chTotal
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
c_oAscChangeTableStyleInfo
.
rowTotal
));
this
.
chBanded
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
c_oAscChangeTableStyleInfo
.
rowBanded
));
this
.
chFirst
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
c_oAscChangeTableStyleInfo
.
columnFirst
));
this
.
chLast
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
c_oAscChangeTableStyleInfo
.
columnLast
));
this
.
chColBanded
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheckTemplateChange
,
this
,
c_oAscChangeTableStyleInfo
.
columnBanded
));
this
.
chFilter
.
on
(
'
change
'
,
_
.
bind
(
this
.
onCheck
TemplateChange
,
this
,
c_oAscChangeTableStyleInfo
.
filterButton
));
this
.
cmbTableTemplate
=
new
Common
.
UI
.
ComboDataView
({
itemWidth
:
61
,
...
...
@@ -142,19 +142,19 @@ define([
menu
:
new
Common
.
UI
.
Menu
({
menuAlign
:
'
tr-br
'
,
items
:
[
{
caption
:
this
.
selectRowText
,
value
:
0
},
{
caption
:
this
.
selectColumnText
,
value
:
1
},
{
caption
:
this
.
select
CellText
,
value
:
2
},
{
caption
:
this
.
selectTableText
,
value
:
3
},
{
caption
:
this
.
selectRowText
,
value
:
c_oAscChangeSelectionFormatTable
.
row
,
idx
:
0
},
{
caption
:
this
.
selectColumnText
,
value
:
c_oAscChangeSelectionFormatTable
.
column
,
idx
:
1
},
{
caption
:
this
.
select
DataText
,
value
:
c_oAscChangeSelectionFormatTable
.
data
,
idx
:
2
},
{
caption
:
this
.
selectTableText
,
value
:
c_oAscChangeSelectionFormatTable
.
all
,
idx
:
3
},
{
caption
:
'
--
'
},
{
caption
:
this
.
insertRowAboveText
,
value
:
4
},
{
caption
:
this
.
insertRowBelowText
,
value
:
5
},
{
caption
:
this
.
insertRowBelowText
,
value
:
5
},
{
caption
:
this
.
insertColumnLeftText
,
value
:
6
},
{
caption
:
this
.
insertColumnRightText
,
value
:
7
},
{
caption
:
this
.
insertColumnRightText
,
value
:
7
},
{
caption
:
'
--
'
},
{
caption
:
this
.
deleteRowText
,
value
:
8
},
{
caption
:
this
.
deleteColumnText
,
value
:
9
},
{
caption
:
this
.
deleteTableText
,
value
:
10
}
{
caption
:
this
.
deleteRowText
,
value
:
8
},
{
caption
:
this
.
deleteColumnText
,
value
:
9
},
{
caption
:
this
.
deleteTableText
,
value
:
10
}
]
})
});
...
...
@@ -170,62 +170,23 @@ define([
},
onCheckTemplateChange
:
function
(
type
,
field
,
newValue
,
oldValue
,
eOpts
)
{
if
(
this
.
api
)
{
var
properties
=
new
CTableProp
();
var
look
=
(
this
.
_originalLook
)
?
this
.
_originalLook
:
new
CTablePropLook
();
switch
(
type
)
{
case
0
:
look
.
put_FirstRow
(
field
.
getValue
()
==
'
checked
'
);
break
;
case
1
:
look
.
put_LastRow
(
field
.
getValue
()
==
'
checked
'
);
break
;
case
2
:
look
.
put_BandHor
(
field
.
getValue
()
==
'
checked
'
);
break
;
case
3
:
look
.
put_FirstCol
(
field
.
getValue
()
==
'
checked
'
);
break
;
case
4
:
look
.
put_LastCol
(
field
.
getValue
()
==
'
checked
'
);
break
;
case
5
:
look
.
put_BandVer
(
field
.
getValue
()
==
'
checked
'
);
break
;
}
properties
.
put_TableLook
(
look
);
this
.
api
.
tblApply
(
properties
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
},
onCheckFilterChange
:
function
(
field
,
newValue
,
oldValue
,
eOpts
)
{
if
(
this
.
api
)
this
.
api
.
asc_changeFormatTableInfo
(
this
.
_state
.
TableName
,
type
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
},
onTableTemplateSelect
:
function
(
combo
,
record
){
if
(
this
.
api
&&
!
this
.
_noApply
)
{
if
(
this
.
_state
.
TemplateName
)
this
.
api
.
asc_changeAutoFilter
(
this
.
_state
.
T
emplat
eName
,
c_oAscChangeFilterOptions
.
style
,
record
.
get
(
'
name
'
));
this
.
api
.
asc_changeAutoFilter
(
this
.
_state
.
T
abl
eName
,
c_oAscChangeFilterOptions
.
style
,
record
.
get
(
'
name
'
));
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
},
onEditClick
:
function
(
menu
,
item
,
e
)
{
if
(
this
.
api
)
{
switch
(
item
.
value
)
{
case
0
:
this
.
api
.
selectRow
();
break
;
case
1
:
this
.
api
.
selectColumn
();
break
;
case
2
:
this
.
api
.
selectCell
();
break
;
case
3
:
this
.
api
.
selectTable
();
break
;
case
4
:
this
.
api
.
addRowAbove
();
break
;
case
5
:
this
.
api
.
addRowBelow
();
break
;
case
6
:
this
.
api
.
addColumnLeft
();
break
;
case
7
:
this
.
api
.
addColumnRight
();
break
;
case
8
:
this
.
api
.
remRow
();
break
;
case
9
:
this
.
api
.
remColumn
();
break
;
case
10
:
this
.
api
.
remTable
();
break
;
}
if
(
item
.
idx
>=
0
&&
item
.
idx
<
4
)
this
.
api
.
asc_changeSelectionFormatTable
(
this
.
_state
.
TableName
,
item
.
value
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
},
...
...
@@ -248,12 +209,18 @@ define([
ChangeSettings
:
function
(
props
)
{
this
.
disableControls
(
this
.
_locked
);
if
(
props
)
//f
ilter
Info
if
(
props
)
//f
ormatTable
Info
{
this
.
_originalProps
=
props
;
var
value
=
props
.
asc_getTableName
();
if
(
this
.
_state
.
TableName
!==
value
)
{
this
.
txtTableName
.
setValue
(
value
);
this
.
_state
.
TableName
=
value
;
}
//for table-template
va
r
va
lue
=
props
.
asc_getTableStyleName
();
value
=
props
.
asc_getTableStyleName
();
if
(
this
.
_state
.
TemplateName
!==
value
||
this
.
_isTemplatesChanged
)
{
this
.
cmbTableTemplate
.
suspendEvents
();
var
rec
=
this
.
cmbTableTemplate
.
menuPicker
.
store
.
findWhere
({
...
...
@@ -272,52 +239,47 @@ define([
}
this
.
_isTemplatesChanged
=
false
;
/*
var look = props.get_TableLook();
if (look) {
value = look.get_FirstRow();
if (this._state.CheckHeader!==value) {
this.chHeader.setValue(value, true);
this._state.CheckHeader=value;
this._originalLook.put_FirstRow(value);
}
value
=
props
.
asc_getFirstRow
();
if
(
this
.
_state
.
CheckHeader
!==
value
)
{
this
.
chHeader
.
setValue
(
value
,
true
);
this
.
_state
.
CheckHeader
=
value
;
}
value = look.get_LastRow();
if (this._state.CheckTotal!==value) {
this.chTotal.setValue(value, true);
this._state.CheckTotal=value;
this._originalLook.put_LastRow(value);
}
value
=
props
.
asc_getLastRow
();
if
(
this
.
_state
.
CheckTotal
!==
value
)
{
this
.
chTotal
.
setValue
(
value
,
true
);
this
.
_state
.
CheckTotal
=
value
;
}
value = look.get_BandHor();
if (this._state.CheckBanded!==value) {
this.chBanded.setValue(value, true);
this._state.CheckBanded=value;
this._originalLook.put_BandHor(value);
}
value
=
props
.
asc_getBandHor
();
if
(
this
.
_state
.
CheckBanded
!==
value
)
{
this
.
chBanded
.
setValue
(
value
,
true
);
this
.
_state
.
CheckBanded
=
value
;
}
value = look.get_FirstCol();
if (this._state.CheckFirst!==value) {
this.chFirst.setValue(value, true);
this._state.CheckFirst=value;
this._originalLook.put_FirstCol(value);
}
value
=
props
.
asc_getFirstCol
();
if
(
this
.
_state
.
CheckFirst
!==
value
)
{
this
.
chFirst
.
setValue
(
value
,
true
);
this
.
_state
.
CheckFirst
=
value
;
}
value = look.get_LastCol();
if (this._state.CheckLast!==value) {
this.chLast.setValue(value, true);
this._state.CheckLast=value;
this._originalLook.put_LastCol(value);
}
value
=
props
.
asc_getLastCol
();
if
(
this
.
_state
.
CheckLast
!==
value
)
{
this
.
chLast
.
setValue
(
value
,
true
);
this
.
_state
.
CheckLast
=
value
;
}
value = look.get_BandVer();
if (this._state.CheckColBanded!==value) {
this.chColBanded.setValue(value, true);
this._state.CheckColBanded=value;
this._originalLook.put_BandVer(value);
}
value
=
props
.
asc_getBandVer
();
if
(
this
.
_state
.
CheckColBanded
!==
value
)
{
this
.
chColBanded
.
setValue
(
value
,
true
);
this
.
_state
.
CheckColBanded
=
value
;
}
value
=
props
.
asc_getFilterButton
();
if
(
this
.
_state
.
CheckFilter
!==
value
)
{
this
.
chFilter
.
setValue
(
value
,
true
);
this
.
_state
.
CheckFilter
=
value
;
}
*/
}
},
...
...
@@ -356,8 +318,8 @@ define([
var
handlerDlg
=
function
(
dlg
,
result
)
{
if
(
result
==
'
ok
'
)
{
me
.
api
.
asc_setSelectionDialogMode
(
c_oAscSelectionDialogType
.
None
);
if
(
me
.
_state
.
t
ablename
)
me
.
api
.
asc_changeAutoFilter
(
me
.
_state
.
t
ablename
,
c_oAscChangeFilterOptions
.
style
,
fmtname
);
if
(
me
.
_state
.
T
ablename
)
me
.
api
.
asc_changeAutoFilter
(
me
.
_state
.
T
ablename
,
c_oAscChangeFilterOptions
.
style
,
fmtname
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
...
...
@@ -388,8 +350,8 @@ define([
textEdit
:
'
Rows & Columns
'
,
selectRowText
:
'
Select Row
'
,
selectColumnText
:
'
Select Column
'
,
select
CellText
:
'
Select Cell
'
,
selectColumnText
:
'
Select
Entire
Column
'
,
select
DataText
:
'
Select Column Data
'
,
selectTableText
:
'
Select Table
'
,
insertRowAboveText
:
'
Insert Row Above
'
,
insertRowBelowText
:
'
Insert Row Below
'
,
...
...
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