[SSE] Refactoring watch dialog
This commit is contained in:
parent
fbc99d7b5e
commit
4e2af2ab44
|
@ -9,17 +9,17 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label class="header" style="width: 70px;"><%= scope.textBook %></label>
|
<label class="header" style="width: 76px;"><%= scope.textBook %></label><!--
|
||||||
<label class="header" style="width: 70px;"><%= scope.textSheet %></label>
|
--><label class="header" style="width: 70px;"><%= scope.textSheet %></label><!--
|
||||||
<label class="header" style="width: 70px;"><%= scope.textName %></label>
|
--><label class="header" style="width: 70px;"><%= scope.textName %></label><!--
|
||||||
<label class="header" style="width: 70px;"><%= scope.textCell %></label>
|
--><label class="header" style="width: 70px;"><%= scope.textCell %></label><!--
|
||||||
<label class="header" style="width: 100px;"><%= scope.textValue %></label>
|
--><label class="header" style="width: 110px;"><%= scope.textValue %></label><!--
|
||||||
<label class="header" style=""><%= scope.textFormula %></label>
|
--><label class="header" style=""><%= scope.textFormula %></label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="padding-small">
|
<td class="padding-small">
|
||||||
<div id="watch-dialog-list" class="" style="width:100%; height: 143px;"></div>
|
<div id="watch-dialog-list" class="range-tableview" style="width:100%; height: 143px;"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -89,12 +89,12 @@ define([ 'text!spreadsheeteditor/main/app/template/WatchDialog.template',
|
||||||
simpleAddMode: true,
|
simpleAddMode: true,
|
||||||
itemTemplate: _.template([
|
itemTemplate: _.template([
|
||||||
'<div id="<%= id %>" class="list-item" style="width: 100%;display:inline-block;pointer-events:none;">',
|
'<div id="<%= id %>" class="list-item" style="width: 100%;display:inline-block;pointer-events:none;">',
|
||||||
'<div style="width:141px;padding-right: 5px;"><%= Common.Utils.String.htmlEncode(book) %></div>',
|
'<div style="width:70px;padding-right: 5px;"><%= Common.Utils.String.htmlEncode(book) %></div>',
|
||||||
'<div style="width:141px;padding-right: 5px;"><%= Common.Utils.String.htmlEncode(sheet) %></div>',
|
'<div style="width:70px;padding-right: 5px;"><%= Common.Utils.String.htmlEncode(sheet) %></div>',
|
||||||
'<div style="width:141px;padding-right: 5px;"><%= Common.Utils.String.htmlEncode(name) %></div>',
|
'<div style="width:70px;padding-right: 5px;"><%= Common.Utils.String.htmlEncode(name) %></div>',
|
||||||
'<div style="width:141px;padding-right: 5px;"><%= cell %></div>',
|
'<div style="width:70px;padding-right: 5px;"><%= cell %></div>',
|
||||||
'<div style="width:141px;padding-right: 5px;"><%= value %></div>',
|
'<div style="width:110px;padding-right: 5px;"><%= value %></div>',
|
||||||
'<div style="width:117px;"><%= formula %></div>',
|
'<div style="width:135px;"><%= formula %></div>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join('')),
|
].join('')),
|
||||||
tabindex: 1
|
tabindex: 1
|
||||||
|
@ -129,7 +129,7 @@ define([ 'text!spreadsheeteditor/main/app/template/WatchDialog.template',
|
||||||
|
|
||||||
_setDefaults: function (props) {
|
_setDefaults: function (props) {
|
||||||
this.refreshList();
|
this.refreshList();
|
||||||
this.api.asc_registerCallback('asc_onRefreshWatchList', this.wrapEvents.onRefreshWatchList);
|
this.api.asc_registerCallback('asc_onUpdateCellWatches', this.wrapEvents.onRefreshWatchList);
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshList: function() {
|
refreshList: function() {
|
||||||
|
@ -185,7 +185,7 @@ define([ 'text!spreadsheeteditor/main/app/template/WatchDialog.template',
|
||||||
onDeleteWatch: function() {
|
onDeleteWatch: function() {
|
||||||
var rec = this.watchList.getSelectedRec();
|
var rec = this.watchList.getSelectedRec();
|
||||||
if (rec) {
|
if (rec) {
|
||||||
this.api.asc_deleteCellWatches(rec.get(props));
|
this.api.asc_deleteCellWatches([rec.get('props')]);
|
||||||
}
|
}
|
||||||
this.refreshList();
|
this.refreshList();
|
||||||
},
|
},
|
||||||
|
@ -205,7 +205,7 @@ define([ 'text!spreadsheeteditor/main/app/template/WatchDialog.template',
|
||||||
},
|
},
|
||||||
|
|
||||||
close: function () {
|
close: function () {
|
||||||
this.api.asc_unregisterCallback('asc_onRefreshWatchList', this.wrapEvents.onRefreshWatchList);
|
this.api.asc_unregisterCallback('asc_onUpdateCellWatches', this.wrapEvents.onRefreshWatchList);
|
||||||
|
|
||||||
Common.Views.AdvancedSettingsWindow.prototype.close.call(this);
|
Common.Views.AdvancedSettingsWindow.prototype.close.call(this);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue