Refactoring symbol table: change sdk method
This commit is contained in:
parent
9cca3321ad
commit
9199b69881
|
@ -682,7 +682,7 @@ define([
|
|||
var nFontId = parseInt(cellId.split('_')[2]);
|
||||
sFont = aFontSelects[nFontId].displayValue;
|
||||
}
|
||||
return {font: sFont, symbol: this.encodeSurrogateChar(nCurrentSymbol), updateRecents: bUpdateRecents};
|
||||
return {font: sFont, symbol: this.encodeSurrogateChar(nCurrentSymbol), code: nCurrentSymbol, updateRecents: bUpdateRecents};
|
||||
},
|
||||
|
||||
onBtnClick: function(event) {
|
||||
|
@ -930,7 +930,7 @@ define([
|
|||
var settings = this.getPasteSymbol($(e.target).attr('id'));
|
||||
settings.updateRecents && this.checkRecent(nCurrentSymbol, settings.font);
|
||||
settings.updateRecents && this.updateView(false, undefined, undefined, true);
|
||||
this.fireEvent('symbol:dblclick', this, settings);
|
||||
this.fireEvent('symbol:dblclick', this, 'ok', settings);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -2487,14 +2487,14 @@ define([
|
|||
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
|
||||
handler: function(dlg, result, settings) {
|
||||
if (result == 'ok') {
|
||||
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
||||
} else
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
}
|
||||
});
|
||||
me.dlgSymbolTable.show();
|
||||
me.dlgSymbolTable.on('symbol:dblclick', function(cmp, settings) {
|
||||
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
||||
me.dlgSymbolTable.on('symbol:dblclick', function(cmp, result, settings) {
|
||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1849,14 +1849,14 @@ define([
|
|||
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
|
||||
handler: function(dlg, result, settings) {
|
||||
if (result == 'ok') {
|
||||
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
||||
} else
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
}
|
||||
});
|
||||
win.show();
|
||||
win.on('symbol:dblclick', function(cmp, settings) {
|
||||
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
||||
win.on('symbol:dblclick', function(cmp, result, settings) {
|
||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2785,14 +2785,14 @@ define([
|
|||
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
|
||||
handler: function(dlg, result, settings) {
|
||||
if (result == 'ok') {
|
||||
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
||||
} else
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
}
|
||||
});
|
||||
win.show();
|
||||
win.on('symbol:dblclick', function(cmp, settings) {
|
||||
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
||||
win.on('symbol:dblclick', function(cmp, result, settings) {
|
||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue