Fix non-modal mode for symbol table dialog. Update translation
This commit is contained in:
parent
eb19033e23
commit
5d74f76d4d
|
@ -391,7 +391,7 @@ define([
|
||||||
'<div style="width: 100%;">',
|
'<div style="width: 100%;">',
|
||||||
'<div id="id-preview">',
|
'<div id="id-preview">',
|
||||||
'<div>',
|
'<div>',
|
||||||
'<div style="position: absolute; top: 0;"><div id="id-preview-data" tabindex="0"></div></div>',
|
'<div style="position: absolute; top: 0;"><div id="id-preview-data" tabindex="0" oo_editor_input="true"></div></div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
|
@ -401,7 +401,7 @@ define([
|
||||||
'<tr>',
|
'<tr>',
|
||||||
'<td colspan="2" style="padding-bottom: 16px;">',
|
'<td colspan="2" style="padding-bottom: 16px;">',
|
||||||
'<label class="input-label">' + this.textRecent + '</label>',
|
'<label class="input-label">' + this.textRecent + '</label>',
|
||||||
'<div style="width: 100%; padding-right: 10px;"><div id="symbol-table-recent" tabindex="0"></div>',
|
'<div style="width: 100%; padding-right: 10px;"><div id="symbol-table-recent" tabindex="0" oo_editor_input="true"></div>',
|
||||||
'</td>',
|
'</td>',
|
||||||
'</tr>',
|
'</tr>',
|
||||||
'<tr>',
|
'<tr>',
|
||||||
|
@ -413,7 +413,7 @@ define([
|
||||||
'</tr>',
|
'</tr>',
|
||||||
'<tr>',
|
'<tr>',
|
||||||
'<td style="padding-right: 10px;">',
|
'<td style="padding-right: 10px;">',
|
||||||
'<div id="symbol-table-text-code"></div>',
|
'<div id="symbol-table-text-code" oo_editor_input="true"></div>',
|
||||||
'</td>',
|
'</td>',
|
||||||
'<td>',
|
'<td>',
|
||||||
'<div id="symbol-table-label-font" style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;max-width: 160px;"></div>',
|
'<div id="symbol-table-label-font" style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;max-width: 160px;"></div>',
|
||||||
|
@ -561,7 +561,9 @@ define([
|
||||||
}
|
}
|
||||||
bMainFocus = true;
|
bMainFocus = true;
|
||||||
me.updateView();
|
me.updateView();
|
||||||
|
setTimeout(function(){
|
||||||
me.previewPanel.focus();
|
me.previewPanel.focus();
|
||||||
|
}, 1);
|
||||||
});
|
});
|
||||||
this.cmbFonts.setValue(nCurrentFont);
|
this.cmbFonts.setValue(nCurrentFont);
|
||||||
|
|
||||||
|
@ -575,7 +577,9 @@ define([
|
||||||
nCurrentSymbol = oCurrentRange.Start;
|
nCurrentSymbol = oCurrentRange.Start;
|
||||||
bMainFocus = true;
|
bMainFocus = true;
|
||||||
me.updateView(undefined, undefined, undefined, undefined, false);
|
me.updateView(undefined, undefined, undefined, undefined, false);
|
||||||
|
setTimeout(function(){
|
||||||
me.previewPanel.focus();
|
me.previewPanel.focus();
|
||||||
|
}, 1);
|
||||||
});
|
});
|
||||||
this.updateRangeSelector();
|
this.updateRangeSelector();
|
||||||
|
|
||||||
|
@ -1149,32 +1153,28 @@ define([
|
||||||
var bFill = true;
|
var bFill = true;
|
||||||
if(bMainFocus){
|
if(bMainFocus){
|
||||||
var nCode = -1;
|
var nCode = -1;
|
||||||
if ( value === 37 ){//left
|
if ( value === Common.UI.Keys.LEFT ){//left
|
||||||
nCode = this.getCodeByLinearIndex(aRanges, this.getLinearIndexByCode(aRanges, nCurrentSymbol) - 1);
|
nCode = this.getCodeByLinearIndex(aRanges, this.getLinearIndexByCode(aRanges, nCurrentSymbol) - 1);
|
||||||
}
|
}
|
||||||
else if ( value === 38 ){//top
|
else if ( value === Common.UI.Keys.UP ){//top
|
||||||
nCode = this.getCodeByLinearIndex(aRanges, this.getLinearIndexByCode(aRanges, nCurrentSymbol) - this.getColsCount());
|
nCode = this.getCodeByLinearIndex(aRanges, this.getLinearIndexByCode(aRanges, nCurrentSymbol) - this.getColsCount());
|
||||||
}
|
}
|
||||||
else if ( value === 39 ){//right
|
else if ( value === Common.UI.Keys.RIGHT ){//right
|
||||||
nCode = this.getCodeByLinearIndex(aRanges, this.getLinearIndexByCode(aRanges, nCurrentSymbol) + 1);
|
nCode = this.getCodeByLinearIndex(aRanges, this.getLinearIndexByCode(aRanges, nCurrentSymbol) + 1);
|
||||||
}
|
}
|
||||||
else if ( value === 40 ){//bottom
|
else if ( value === Common.UI.Keys.DOWN ){//bottom
|
||||||
nCode = this.getCodeByLinearIndex(aRanges, this.getLinearIndexByCode(aRanges, nCurrentSymbol) + this.getColsCount());
|
nCode = this.getCodeByLinearIndex(aRanges, this.getLinearIndexByCode(aRanges, nCurrentSymbol) + this.getColsCount());
|
||||||
}
|
}
|
||||||
else if(value === 36){//home
|
else if(value === Common.UI.Keys.HOME){//home
|
||||||
if(aRanges.length > 0){
|
if(aRanges.length > 0){
|
||||||
nCode = aRanges[0].Start;
|
nCode = aRanges[0].Start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(value === 35){//end
|
else if(value === Common.UI.Keys.END){//end
|
||||||
if(aRanges.length > 0){
|
if(aRanges.length > 0){
|
||||||
nCode = aRanges[aRanges.length - 1].End;
|
nCode = aRanges[aRanges.length - 1].End;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(value === 13){//enter
|
|
||||||
this.checkRecent(nCurrentSymbol, aFontSelects[nCurrentFont].displayValue);
|
|
||||||
this.fireEvent('symbol:dblclick', this, {font: aFontSelects[nCurrentFont].displayValue, symbol: this.encodeSurrogateChar(nCurrentSymbol)});
|
|
||||||
}
|
|
||||||
else{
|
else{
|
||||||
bFill = false;
|
bFill = false;
|
||||||
}
|
}
|
||||||
|
@ -1186,7 +1186,7 @@ define([
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var oSelectedCell, aStrings;
|
var oSelectedCell, aStrings;
|
||||||
if ( value === 37 ){//left
|
if ( value === Common.UI.Keys.LEFT ){//left
|
||||||
oSelectedCell = this.$window.find('.cell-selected')[0];
|
oSelectedCell = this.$window.find('.cell-selected')[0];
|
||||||
if(oSelectedCell && oSelectedCell.id[0] === 'r'){
|
if(oSelectedCell && oSelectedCell.id[0] === 'r'){
|
||||||
var oPresCell = this.$window.find(oSelectedCell).prev();
|
var oPresCell = this.$window.find(oSelectedCell).prev();
|
||||||
|
@ -1198,7 +1198,7 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( value === 39 ){//right
|
else if ( value === Common.UI.Keys.RIGHT ){//right
|
||||||
oSelectedCell = this.$window.find('.cell-selected')[0];
|
oSelectedCell = this.$window.find('.cell-selected')[0];
|
||||||
if(oSelectedCell && oSelectedCell.id[0] === 'r'){
|
if(oSelectedCell && oSelectedCell.id[0] === 'r'){
|
||||||
var oNextCell = this.$window.find(oSelectedCell).next();
|
var oNextCell = this.$window.find(oSelectedCell).next();
|
||||||
|
@ -1210,7 +1210,7 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(value === 36){//home
|
else if(value === Common.UI.Keys.HOME){//home
|
||||||
var oFirstCell = this.$window.find('#recent-table').children()[0];
|
var oFirstCell = this.$window.find('#recent-table').children()[0];
|
||||||
if(oFirstCell){
|
if(oFirstCell){
|
||||||
aStrings = oFirstCell.id.split('_');
|
aStrings = oFirstCell.id.split('_');
|
||||||
|
@ -1219,7 +1219,7 @@ define([
|
||||||
this.updateView(false);
|
this.updateView(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(value === 35){//end
|
else if(value === Common.UI.Keys.END){//end
|
||||||
var aChildren = this.recentPanel.children();
|
var aChildren = this.recentPanel.children();
|
||||||
var oLastCell = aChildren[aChildren.length - 1];
|
var oLastCell = aChildren[aChildren.length - 1];
|
||||||
if(oLastCell){
|
if(oLastCell){
|
||||||
|
@ -1229,9 +1229,6 @@ define([
|
||||||
this.updateView(false);
|
this.updateView(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(value === 13){//enter
|
|
||||||
this.fireEvent('symbol:dblclick', this, {font: aFontSelects[nFontNameRecent].displayValue, symbol: this.encodeSurrogateChar(nCurrentSymbol)});
|
|
||||||
}
|
|
||||||
else{
|
else{
|
||||||
bFill = false;
|
bFill = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2480,13 +2480,13 @@ define([
|
||||||
win = new Common.Views.SymbolTableDialog({
|
win = new Common.Views.SymbolTableDialog({
|
||||||
api: me.api,
|
api: me.api,
|
||||||
lang: me.mode.lang,
|
lang: me.mode.lang,
|
||||||
// modal: false,
|
modal: false,
|
||||||
// type: 1,
|
type: 1,
|
||||||
// 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.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
||||||
}
|
} else
|
||||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2495,7 +2495,6 @@ define([
|
||||||
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar, this.toolbar.btnInsertSymbol);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiMathTypes: function(equation) {
|
onApiMathTypes: function(equation) {
|
||||||
|
|
|
@ -996,6 +996,7 @@
|
||||||
"DE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis",
|
"DE.Controllers.Toolbar.txtSymbol_vdots": "Vertical ellipsis",
|
||||||
"DE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
|
"DE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
|
||||||
"DE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
|
"DE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
|
||||||
|
"DE.Controllers.Toolbar.textInsert": "Insert",
|
||||||
"DE.Controllers.Viewport.textFitPage": "Fit to Page",
|
"DE.Controllers.Viewport.textFitPage": "Fit to Page",
|
||||||
"DE.Controllers.Viewport.textFitWidth": "Fit to Width",
|
"DE.Controllers.Viewport.textFitWidth": "Fit to Width",
|
||||||
"DE.Views.AddNewCaptionLabelDialog.textLabel": "Label:",
|
"DE.Views.AddNewCaptionLabelDialog.textLabel": "Label:",
|
||||||
|
|
Loading…
Reference in a new issue