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
0484c140
Commit
0484c140
authored
Apr 05, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Изменение диапазона для форматированной таблицы.
parent
a3b8ab09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
18 deletions
+26
-18
apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js
apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js
+23
-15
apps/spreadsheeteditor/main/app/view/TableSettings.js
apps/spreadsheeteditor/main/app/view/TableSettings.js
+3
-3
No files found.
apps/spreadsheeteditor/main/app/view/TableOptionsDialog.js
View file @
0484c140
...
...
@@ -31,8 +31,8 @@ define([
this
.
template
=
[
'
<div class="box">
'
,
'
<div id="id-dlg-tableoptions-range" class="input-row"
style="margin-bottom: 10
px;"></div>
'
,
'
<div class="input-row" id="id-dlg-tableoptions-title"></div>
'
,
'
<div id="id-dlg-tableoptions-range" class="input-row"
style="margin-bottom: 5
px;"></div>
'
,
'
<div class="input-row" id="id-dlg-tableoptions-title"
style="margin-top: 5px;"
></div>
'
,
'
</div>
'
,
'
<div class="footer right">
'
,
'
<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">
'
+
this
.
okButtonText
+
'
</button>
'
,
...
...
@@ -41,6 +41,7 @@ define([
].
join
(
''
);
this
.
options
.
tpl
=
_
.
template
(
this
.
template
,
this
.
options
);
this
.
checkRangeType
=
c_oAscSelectionDialogType
.
FormatTable
;
Common
.
UI
.
Window
.
prototype
.
initialize
.
call
(
this
,
this
.
options
);
},
...
...
@@ -82,30 +83,37 @@ define([
if
(
settings
.
api
)
{
me
.
api
=
settings
.
api
;
var
options
=
me
.
api
.
asc_getAddFormatTableOptions
();
this
.
inputRange
.
setValue
(
options
.
asc_getRange
());
this
.
cbTitle
.
setValue
(
options
.
asc_getIsTitle
());
if
(
settings
.
range
)
{
me
.
cbTitle
.
setVisible
(
false
);
me
.
setHeight
(
130
);
me
.
checkRangeType
=
c_oAscSelectionDialogType
.
FormatTableChangeRange
;
me
.
inputRange
.
setValue
(
settings
.
range
);
me
.
api
.
asc_setSelectionDialogMode
(
c_oAscSelectionDialogType
.
FormatTable
,
settings
.
range
);
}
else
{
var
options
=
me
.
api
.
asc_getAddFormatTableOptions
();
me
.
inputRange
.
setValue
(
options
.
asc_getRange
());
me
.
cbTitle
.
setValue
(
options
.
asc_getIsTitle
());
me
.
api
.
asc_setSelectionDialogMode
(
c_oAscSelectionDialogType
.
FormatTable
,
options
.
asc_getRange
());
}
me
.
api
.
asc_setSelectionDialogMode
(
c_oAscSelectionDialogType
.
FormatTable
,
options
.
asc_getRange
());
me
.
api
.
asc_unregisterCallback
(
'
asc_onSelectionRangeChanged
'
,
_
.
bind
(
me
.
onApiRangeChanged
,
me
));
me
.
api
.
asc_registerCallback
(
'
asc_onSelectionRangeChanged
'
,
_
.
bind
(
me
.
onApiRangeChanged
,
me
));
Common
.
NotificationCenter
.
trigger
(
'
cells:range
'
,
c_oAscSelectionDialogType
.
FormatTable
);
}
me
.
inputRange
.
validation
=
function
(
value
)
{
var
isvalid
=
me
.
api
.
asc_checkDataRange
(
c_oAscSelectionDialogType
.
FormatTabl
e
,
value
,
false
);
var
isvalid
=
me
.
api
.
asc_checkDataRange
(
me
.
checkRangeTyp
e
,
value
,
false
);
return
(
isvalid
==
c_oAscError
.
ID
.
DataRangeError
)
?
me
.
txtInvalidRange
:
true
;
};
},
getSettings
:
function
()
{
var
options
=
this
.
api
.
asc_getAddFormatTableOptions
(
this
.
inputRange
.
getValue
());
// options.asc_setRange(this.inputRange.getValue()
);
options
.
asc_setIsTitle
(
this
.
cbTitle
.
checked
)
;
return
options
;
if
(
this
.
checkRangeType
==
c_oAscSelectionDialogType
.
FormatTable
)
{
var
options
=
this
.
api
.
asc_getAddFormatTableOptions
(
this
.
inputRange
.
getValue
());
options
.
asc_setIsTitle
(
this
.
cbTitle
.
checked
);
return
options
;
}
else
return
this
.
inputRange
.
getValue
()
;
},
onApiRangeChanged
:
function
(
info
)
{
...
...
@@ -115,7 +123,7 @@ define([
},
isRangeValid
:
function
()
{
var
isvalid
=
this
.
api
.
asc_checkDataRange
(
c_oAscSelectionDialogType
.
FormatTabl
e
,
this
.
inputRange
.
getValue
(),
true
);
var
isvalid
=
this
.
api
.
asc_checkDataRange
(
this
.
checkRangeTyp
e
,
this
.
inputRange
.
getValue
(),
true
);
if
(
isvalid
==
c_oAscError
.
ID
.
No
)
return
true
;
else
{
...
...
apps/spreadsheeteditor/main/app/view/TableSettings.js
View file @
0484c140
...
...
@@ -382,13 +382,12 @@ define([
},
onSelectData
:
function
()
{
return
;
var
me
=
this
;
if
(
me
.
api
)
{
var
handlerDlg
=
function
(
dlg
,
result
)
{
if
(
result
==
'
ok
'
)
{
me
.
api
.
asc_setSelectionDialogMode
(
c_oAscSelectionDialogType
.
None
);
// me.api.asc_changeAutoFilter(me._state.TableName, c_oAscChangeFilterOptions.style, fmtname
);
me
.
api
.
asc_changeTableRange
(
me
.
_state
.
TableName
,
dlg
.
getSettings
()
);
}
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
toolbar
);
...
...
@@ -399,7 +398,8 @@ define([
win
.
show
();
win
.
setSettings
({
api
:
me
.
api
api
:
me
.
api
,
range
:
me
.
_state
.
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