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