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
653d6db3
Commit
653d6db3
authored
Mar 30, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Отладка изменения имени таблицы.
parent
4e85243c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
apps/spreadsheeteditor/main/app/template/TableSettings.template
...preadsheeteditor/main/app/template/TableSettings.template
+1
-1
apps/spreadsheeteditor/main/app/view/TableSettings.js
apps/spreadsheeteditor/main/app/view/TableSettings.js
+21
-14
No files found.
apps/spreadsheeteditor/main/app/template/TableSettings.template
View file @
653d6db3
...
...
@@ -58,7 +58,7 @@
</tr>
<tr>
<td colspan=2 class="padding-small">
<div id="table-txt-name" class="input-row" style="width: 100%;"
/
>
<div id="table-txt-name" class="input-row" style="width: 100%;"
></div
>
</td>
</tr>
<tr>
...
...
apps/spreadsheeteditor/main/app/view/TableSettings.js
View file @
653d6db3
...
...
@@ -126,7 +126,7 @@ define([
this
.
txtTableName
=
new
Common
.
UI
.
InputField
({
el
:
$
(
'
#table-txt-name
'
),
name
:
'
name
'
,
name
:
'
table
name
'
,
style
:
'
width: 100%;
'
,
validateOnBlur
:
false
});
...
...
@@ -144,19 +144,19 @@ define([
menu
:
new
Common
.
UI
.
Menu
({
menuAlign
:
'
tr-br
'
,
items
:
[
{
caption
:
this
.
selectRowText
,
value
:
c_oAscChangeSelectionFormatTable
.
row
,
idx
:
0
},
{
caption
:
this
.
selectRowText
,
value
:
c_oAscChangeSelectionFormatTable
.
row
,
idx
:
0
},
{
caption
:
this
.
selectColumnText
,
value
:
c_oAscChangeSelectionFormatTable
.
column
,
idx
:
1
},
{
caption
:
this
.
selectDataText
,
value
:
c_oAscChangeSelectionFormatTable
.
data
,
idx
:
2
},
{
caption
:
this
.
selectTableText
,
value
:
c_oAscChangeSelectionFormatTable
.
all
,
idx
:
3
},
{
caption
:
this
.
selectDataText
,
value
:
c_oAscChangeSelectionFormatTable
.
data
,
idx
:
2
},
{
caption
:
this
.
selectTableText
,
value
:
c_oAscChangeSelectionFormatTable
.
all
,
idx
:
3
},
{
caption
:
'
--
'
},
{
caption
:
this
.
insertRowAboveText
,
value
:
c_oAscInsertOptions
.
InsertTableRowAbove
,
idx
:
4
},
{
caption
:
this
.
insertRowBelowText
,
value
:
c_oAscInsertOptions
.
InsertTableRowBelow
,
idx
:
5
},
{
caption
:
this
.
insertColumnLeftText
,
value
:
c_oAscInsertOptions
.
InsertTableColLeft
,
idx
:
6
},
{
caption
:
this
.
insertColumnRightText
,
value
:
c_oAscInsertOptions
.
InsertTableColRight
,
idx
:
7
},
{
caption
:
this
.
insertRowAboveText
,
value
:
c_oAscInsertOptions
.
InsertTableRowAbove
,
idx
:
4
},
{
caption
:
this
.
insertRowBelowText
,
value
:
c_oAscInsertOptions
.
InsertTableRowBelow
,
idx
:
5
},
{
caption
:
this
.
insertColumnLeftText
,
value
:
c_oAscInsertOptions
.
InsertTableColLeft
,
idx
:
6
},
{
caption
:
this
.
insertColumnRightText
,
value
:
c_oAscInsertOptions
.
InsertTableColRight
,
idx
:
7
},
{
caption
:
'
--
'
},
{
caption
:
this
.
deleteRowText
,
value
:
c_oAscDeleteOptions
.
DeleteRows
,
idx
:
8
},
{
caption
:
this
.
deleteColumnText
,
value
:
c_oAscDeleteOptions
.
DeleteColumns
,
idx
:
9
},
{
caption
:
this
.
deleteTableText
,
value
:
c_oAscDeleteOptions
.
Delete
Columns
,
idx
:
10
}
{
caption
:
this
.
deleteRowText
,
value
:
c_oAscDeleteOptions
.
DeleteRows
,
idx
:
8
},
{
caption
:
this
.
deleteColumnText
,
value
:
c_oAscDeleteOptions
.
DeleteColumns
,
idx
:
9
},
{
caption
:
this
.
deleteTableText
,
value
:
c_oAscDeleteOptions
.
Delete
Table
,
idx
:
10
}
]
})
});
...
...
@@ -199,7 +199,14 @@ define([
},
onTableNameChanged
:
function
(
input
,
newValue
,
oldValue
)
{
var
oldName
=
this
.
_state
.
TableName
;
this
.
_state
.
TableName
=
''
;
if
(
oldName
.
toLowerCase
()
==
newValue
.
toLowerCase
())
{
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
return
;
}
var
me
=
this
,
isvalid
=
this
.
api
.
asc_checkDefinedName
(
newValue
,
null
);
if
(
isvalid
.
asc_getStatus
()
===
true
)
isvalid
=
true
;
...
...
@@ -209,7 +216,7 @@ define([
isvalid
=
this
.
textIsLocked
;
break
;
case
c_oAscDefinedNameReason
.
Existed
:
isvalid
=
(
oldValue
.
toLowerCase
()
==
newValue
.
toLowerCase
())
?
true
:
this
.
textExistName
;
isvalid
=
this
.
textExistName
;
break
;
case
c_oAscDefinedNameReason
.
NameReserved
:
isvalid
=
this
.
textReservedName
;
...
...
@@ -219,7 +226,7 @@ define([
}
}
if
(
isvalid
===
true
)
{
// this.api.asc_editDefinedNames(this._state.TableName, new Asc.asc_CDefName(newValue, this._state.Range, null, true)
);
this
.
api
.
asc_changeDisplayNameTable
(
oldName
,
newValue
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
}
else
if
(
!
this
.
_state
.
TableNameError
)
{
this
.
_state
.
TableNameError
=
true
;
...
...
@@ -421,7 +428,7 @@ define([
textTableName
:
'
Table Name
'
,
textResize
:
'
Resize table
'
,
textSelectData
:
'
Select Data
'
,
textInvalidName
:
'
ERROR! Invalid
rang
e name
'
,
textInvalidName
:
'
ERROR! Invalid
tabl
e name
'
,
textExistName
:
'
ERROR! Range with such a name already exists
'
,
textIsLocked
:
'
This element is being edited by another user.
'
,
notcriticalErrorTitle
:
'
Warning
'
,
...
...
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