Merge pull request #373 from ONLYOFFICE/feature/special-characters
Feature/special characters
This commit is contained in:
commit
ce47befbf4
|
@ -366,14 +366,24 @@ define([
|
||||||
options: {
|
options: {
|
||||||
resizable : true,
|
resizable : true,
|
||||||
minwidth : 448,
|
minwidth : 448,
|
||||||
minheight : 396,
|
minheight : 434,
|
||||||
width: 448,
|
width: 448,
|
||||||
height: 396,
|
height: 434,
|
||||||
cls: 'modal-dlg',
|
cls: 'modal-dlg',
|
||||||
buttons: ['ok', 'cancel']
|
buttons: ['ok', 'cancel']
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
|
var config = {
|
||||||
|
resizable : true,
|
||||||
|
minwidth : 448,
|
||||||
|
minheight : 434,
|
||||||
|
width: 448,
|
||||||
|
height: 434,
|
||||||
|
cls: 'modal-dlg',
|
||||||
|
buttons: ['ok', 'cancel']
|
||||||
|
};
|
||||||
|
|
||||||
var filter = Common.localStorage.getKeysFilter();
|
var filter = Common.localStorage.getKeysFilter();
|
||||||
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||||
|
|
||||||
|
@ -385,70 +395,96 @@ define([
|
||||||
}
|
}
|
||||||
size = size ? JSON.parse(size) : [];
|
size = size ? JSON.parse(size) : [];
|
||||||
|
|
||||||
_.extend(this.options, {
|
this.options = _.extend(config, {
|
||||||
title: this.textTitle,
|
title: this.textTitle,
|
||||||
width : size[0] || 448,
|
width : size[0] || 448,
|
||||||
height : size[1] || 396
|
height : size[1] || 434
|
||||||
}, options || {});
|
}, options || {});
|
||||||
|
|
||||||
|
this.api = this.options.api;
|
||||||
|
this.type = this.options.type || 0; // 0 - close on OK, single adding symbol
|
||||||
|
this.special = this.options.special || false; // true - show special tab
|
||||||
|
this.showShortcutKey = this.options.showShortcutKey || false;
|
||||||
|
!this.special && (this.options.height -= 38);
|
||||||
|
!this.special && (this.options.minheight -= 38);
|
||||||
|
|
||||||
this.template = [
|
this.template = [
|
||||||
'<div class="box">',
|
'<div class="box">',
|
||||||
'<table cols="2" style="width: 100%;max-width: 497px;">',
|
'<div style="margin-bottom: 16px;" class="'+ (this.special ? '' : 'hidden') +'">',
|
||||||
'<tr>',
|
'<button type="button" class="btn btn-text-default auto" id="symbol-table-symbols" style="border-top-right-radius: 0;border-bottom-right-radius: 0;">', this.textSymbols,'</button>',
|
||||||
'<td style="padding-right: 5px;padding-bottom: 8px;width: 50%;">',
|
'<button type="button" class="btn btn-text-default auto" id="symbol-table-special" style="border-top-left-radius: 0;border-bottom-left-radius: 0;">', this.textSpecial,'</button>',
|
||||||
'<label class="input-label">' + this.textFont + '</label>',
|
'</div>',
|
||||||
'<div id="symbol-table-cmb-fonts"></div>',
|
'<div id="symbol-table-pnl-symbols">',
|
||||||
'</td>',
|
'<table cols="2" style="width: 100%;max-width: 497px;">',
|
||||||
'<td style="padding-left: 5px;padding-bottom: 8px;">',
|
'<tr>',
|
||||||
'<label class="input-label">' + this.textRange + '</label>',
|
'<td style="padding-right: 5px;padding-bottom: 8px;width: 50%;">',
|
||||||
'<div id="symbol-table-cmb-range"></div>',
|
'<label class="input-label">' + this.textFont + '</label>',
|
||||||
'</td>',
|
'<div id="symbol-table-cmb-fonts"></div>',
|
||||||
'</tr>',
|
'</td>',
|
||||||
'</table>',
|
'<td style="padding-left: 5px;padding-bottom: 8px;">',
|
||||||
'<table cols="1" style="width: 100%;">',
|
'<label class="input-label">' + this.textRange + '</label>',
|
||||||
'<tr>',
|
'<div id="symbol-table-cmb-range"></div>',
|
||||||
'<td style="padding-bottom: 16px;">',
|
'</td>',
|
||||||
'<div id="symbol-table-scrollable-div" style="position: relative;height:'+ (this.options.height-264) + 'px;">',
|
'</tr>',
|
||||||
'<div style="width: 100%;">',
|
'</table>',
|
||||||
'<div id="id-preview">',
|
'<table cols="1" style="width: 100%;">',
|
||||||
'<div>',
|
'<tr>',
|
||||||
'<div style="position: absolute; top: 0;"><div id="id-preview-data" tabindex="0" oo_editor_input="true"></div></div>',
|
'<td style="padding-bottom: 16px;">',
|
||||||
|
'<div id="symbol-table-scrollable-div" style="position: relative;height:'+ (this.options.height-302 + 38*(this.special ? 0 : 1)) + 'px;">',
|
||||||
|
'<div style="width: 100%;">',
|
||||||
|
'<div id="id-preview">',
|
||||||
|
'<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>',
|
'</div>',
|
||||||
'</div>',
|
'</td>',
|
||||||
'</td>',
|
'</tr>',
|
||||||
'</tr>',
|
'<tr>',
|
||||||
'<tr>',
|
'<td style="padding-bottom: 16px;">',
|
||||||
'<td style="padding-bottom: 16px;">',
|
'<label class="input-label">' + this.textRecent + '</label>',
|
||||||
'<label class="input-label">' + this.textRecent + '</label>',
|
'<div id="symbol-table-recent" tabindex="0" oo_editor_input="true" style="width: 100%;"></div>',
|
||||||
'<div id="symbol-table-recent" tabindex="0" oo_editor_input="true" style="width: 100%;"></div>',
|
'</td>',
|
||||||
'</td>',
|
'</tr>',
|
||||||
'</tr>',
|
'</table>',
|
||||||
'</table>',
|
'<table cols="2" style="width: 100%;max-width: 497px;">',
|
||||||
'<table cols="2" style="width: 100%;max-width: 497px;">',
|
'<tr>',
|
||||||
'<tr>',
|
'<td style="padding-right: 5px; width: 50%;">',
|
||||||
'<td style="padding-right: 5px; width: 50%;">',
|
'<label class="input-label">' + this.textCode + '</label>',
|
||||||
'<label class="input-label">' + this.textCode + '</label>',
|
'</td>',
|
||||||
'</td>',
|
'<td style="padding-left: 5px;">',
|
||||||
'<td style="padding-left: 5px;">',
|
'</td>',
|
||||||
'</td>',
|
'</tr>',
|
||||||
'</tr>',
|
'<tr>',
|
||||||
'<tr>',
|
'<td style="padding-right: 5px;">',
|
||||||
'<td style="padding-right: 5px;">',
|
'<div id="symbol-table-text-code" oo_editor_input="true"></div>',
|
||||||
'<div id="symbol-table-text-code" oo_editor_input="true"></div>',
|
'</td>',
|
||||||
'</td>',
|
'<td style="padding-left: 5px;">',
|
||||||
'<td style="padding-left: 5px;">',
|
'<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>',
|
'</td>',
|
||||||
'</td>',
|
'</tr>',
|
||||||
'</tr>',
|
'</table>',
|
||||||
'</table>',
|
'</div>',
|
||||||
|
'<div id="symbol-table-pnl-special">',
|
||||||
|
'<table cols="1" style="width: 100%;">',
|
||||||
|
'<tr>',
|
||||||
|
'<td>',
|
||||||
|
'<label>' + this.textCharacter + '</label>',
|
||||||
|
'<label id="symbol-table-lbl-shortcut" style="float: right; width: 107px;">' + this.textShortcut + '</label>',
|
||||||
|
'</td>',
|
||||||
|
'</tr>',
|
||||||
|
'<tr>',
|
||||||
|
'<td>',
|
||||||
|
'<div id="symbol-table-special-list" class="no-borders" style="width:100%; height: '+ (this.options.height-156 + 38*(this.special ? 0 : 1)) + 'px;"></div>',
|
||||||
|
'</td>',
|
||||||
|
'</tr>',
|
||||||
|
'</table>',
|
||||||
|
'</div>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join('');
|
].join('');
|
||||||
|
|
||||||
this.options.tpl = _.template(this.template)(this.options);
|
this.options.tpl = _.template(this.template)(this.options);
|
||||||
this.api = this.options.api;
|
|
||||||
this.type = this.options.type || 0; // 0 - close on OK, single adding symbol
|
|
||||||
|
|
||||||
var init = (aFontSelects.length<1);
|
var init = (aFontSelects.length<1);
|
||||||
init && this.initFonts();
|
init && this.initFonts();
|
||||||
|
@ -579,6 +615,25 @@ define([
|
||||||
var $border = $window.find('.resize-border');
|
var $border = $window.find('.resize-border');
|
||||||
$border.css({'background': 'none', 'border': 'none'});
|
$border.css({'background': 'none', 'border': 'none'});
|
||||||
|
|
||||||
|
this.btnSymbols = new Common.UI.Button({
|
||||||
|
el: $window.find('#symbol-table-symbols'),
|
||||||
|
enableToggle: true,
|
||||||
|
toggleGroup: 'hyperlink-type',
|
||||||
|
allowDepress: false,
|
||||||
|
pressed: true
|
||||||
|
});
|
||||||
|
this.btnSymbols.on('click', _.bind(this.onModeClick, this, false));
|
||||||
|
|
||||||
|
this.btnSpecial = new Common.UI.Button({
|
||||||
|
el: $window.find('#symbol-table-special'),
|
||||||
|
enableToggle: true,
|
||||||
|
toggleGroup: 'hyperlink-type',
|
||||||
|
allowDepress: false
|
||||||
|
});
|
||||||
|
this.btnSpecial.on('click', _.bind(this.onModeClick, this, true));
|
||||||
|
|
||||||
|
// symbols
|
||||||
|
|
||||||
this.cmbFonts = new Common.UI.ComboBox({
|
this.cmbFonts = new Common.UI.ComboBox({
|
||||||
el : $window.find('#symbol-table-cmb-fonts'),
|
el : $window.find('#symbol-table-cmb-fonts'),
|
||||||
cls : 'input-group-nr',
|
cls : 'input-group-nr',
|
||||||
|
@ -663,7 +718,51 @@ define([
|
||||||
this.boxPanel = $window.find('.box');
|
this.boxPanel = $window.find('.box');
|
||||||
this.updateView(undefined, undefined, undefined, true);
|
this.updateView(undefined, undefined, undefined, true);
|
||||||
|
|
||||||
|
// special
|
||||||
|
var data = [{symbol: '—', description: this.textEmDash, shortcutKey: 'Alt+Ctrl+Num -', code: '2014'},
|
||||||
|
{symbol: '–', description: this.textEnDash, shortcutKey: '', code: '2013'},
|
||||||
|
{symbol: '‑', description: this.textNBHyphen, shortcutKey: 'Ctrl+Shift+_', code: '2011'},
|
||||||
|
{symbol: '', description: this.textSHyphen, shortcutKey: 'Alt+-', code: '00AD'},
|
||||||
|
{symbol: '', description: this.textEmSpace, shortcutKey: '', code: '2003'},
|
||||||
|
{symbol: '', description: this.textEnSpace, shortcutKey: '', code: '2002'},
|
||||||
|
{symbol: '', description: this.textQEmSpace, shortcutKey: '', code: '2005'},
|
||||||
|
{symbol: '°', description: this.textNBSpace, shortcutKey: 'Ctrl+Shift+Space', code: '00A0'},
|
||||||
|
{symbol: '©', description: this.textCopyright, shortcutKey: '', code: '00A9'},
|
||||||
|
{symbol: '®', description: this.textRegistered, shortcutKey: '', code: '00AE'},
|
||||||
|
{symbol: '™', description: this.textTradeMark, shortcutKey: '', code: '2122'},
|
||||||
|
{symbol: '§', description: this.textSection, shortcutKey: '', code: '00A7'},
|
||||||
|
{symbol: '¶', description: this.textPilcrow, shortcutKey: '', code: '00B6'},
|
||||||
|
{symbol: '…', description: this.textEllipsis, shortcutKey: 'Alt+Ctrl+.', code: '2026'},
|
||||||
|
{symbol: '‛', description: this.textSOQuote, shortcutKey: '', code: '2018'},
|
||||||
|
{symbol: '’', description: this.textSCQuote, shortcutKey: '', code: '2019'},
|
||||||
|
{symbol: '‟', description: this.textDOQuote, shortcutKey: '', code: '201C'},
|
||||||
|
{symbol: '”', description: this.textDCQuote, shortcutKey: '', code: '201D'}
|
||||||
|
];
|
||||||
|
this.specialList = new Common.UI.ListView({
|
||||||
|
el: $window.find('#symbol-table-special-list'),
|
||||||
|
store: new Common.UI.DataViewStore(data),
|
||||||
|
simpleAddMode: true,
|
||||||
|
template: _.template(['<div class="listview inner" style=""></div>'].join('')),
|
||||||
|
itemTemplate: _.template([
|
||||||
|
'<div id="<%= id %>" class="list-item" style="pointer-events:none;width: 100%;display:flex;">',
|
||||||
|
'<div style="width:70px;text-align: center; padding-right: 5px;"><%= symbol %></div>',
|
||||||
|
'<div style="flex-grow:1;padding-right: 5px;"><%= description %></div>',
|
||||||
|
'<% if (' + this.showShortcutKey + ') { %>',
|
||||||
|
'<div style="width:100px;"><%= shortcutKey %></div>',
|
||||||
|
'<% } %>',
|
||||||
|
'</div>'
|
||||||
|
].join(''))
|
||||||
|
});
|
||||||
|
this.specialList.on('item:dblclick', _.bind(this.onDblClickSpecialItem, this))
|
||||||
|
.on('entervalue', _.bind(this.onDblClickSpecialItem, this));
|
||||||
|
this.specialList.selectByIndex(0);
|
||||||
|
|
||||||
|
this.lblShortCut = $window.find('#symbol-table-lbl-shortcut');
|
||||||
|
this.lblShortCut.toggleClass('hidden', !this.showShortcutKey);
|
||||||
|
|
||||||
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||||
|
this.symbolsPanel = $window.find('#symbol-table-pnl-symbols');
|
||||||
|
this.specialPanel = $window.find('#symbol-table-pnl-special');
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
|
@ -676,16 +775,17 @@ define([
|
||||||
$(document).on('keydown.' + this.cid, '#symbol-table-scrollable-div #id-preview-data, #symbol-table-recent', this.binding.keydownSymbols);
|
$(document).on('keydown.' + this.cid, '#symbol-table-scrollable-div #id-preview-data, #symbol-table-recent', this.binding.keydownSymbols);
|
||||||
$(document).on('keypress.' + this.cid, '#symbol-table-scrollable-div #id-preview-data, #symbol-table-recent', this.binding.keypressSymbols);
|
$(document).on('keypress.' + this.cid, '#symbol-table-scrollable-div #id-preview-data, #symbol-table-recent', this.binding.keypressSymbols);
|
||||||
|
|
||||||
var me = this;
|
var special = this.special && !!Common.Utils.InternalSettings.get(this.appPrefix + "symbol-table-special");
|
||||||
_.delay(function(){
|
special ? this.btnSpecial.toggle(true) : this.btnSymbols.toggle(true);
|
||||||
me.previewPanel.focus();
|
this.ShowHideElem(special);
|
||||||
},50);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
close: function(suppressevent) {
|
close: function(suppressevent) {
|
||||||
$(document).off('keydown.' + this.cid, this.binding.keydownSymbols);
|
$(document).off('keydown.' + this.cid, this.binding.keydownSymbols);
|
||||||
$(document).off('keypress.' + this.cid, this.binding.keypressSymbols);
|
$(document).off('keypress.' + this.cid, this.binding.keypressSymbols);
|
||||||
|
|
||||||
|
this.special && Common.Utils.InternalSettings.set(this.appPrefix + "symbol-table-special", this.btnSpecial.isActive());
|
||||||
|
|
||||||
Common.UI.Window.prototype.close.apply(this, arguments);
|
Common.UI.Window.prototype.close.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -701,6 +801,11 @@ define([
|
||||||
return {font: sFont, symbol: this.encodeSurrogateChar(nCurrentSymbol), code: nCurrentSymbol, updateRecents: bUpdateRecents};
|
return {font: sFont, symbol: this.encodeSurrogateChar(nCurrentSymbol), code: nCurrentSymbol, updateRecents: bUpdateRecents};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getSpecialSymbol: function() {
|
||||||
|
var rec = this.specialList.getSelectedRec();
|
||||||
|
return {font: undefined, symbol: this.encodeSurrogateChar(rec.get('code')), code: parseInt(rec.get('code'), 16)};
|
||||||
|
},
|
||||||
|
|
||||||
onBtnClick: function(event) {
|
onBtnClick: function(event) {
|
||||||
this._handleInput(event.currentTarget.attributes['result'].value);
|
this._handleInput(event.currentTarget.attributes['result'].value);
|
||||||
},
|
},
|
||||||
|
@ -711,13 +816,14 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
_handleInput: function(state) {
|
_handleInput: function(state) {
|
||||||
var settings = this.getPasteSymbol(this.$window.find('.cell-selected').attr('id'));
|
var special = this.btnSpecial.isActive();
|
||||||
|
var settings = special ? this.getSpecialSymbol() : this.getPasteSymbol(this.$window.find('.cell-selected').attr('id'));
|
||||||
if (this.options.handler) {
|
if (this.options.handler) {
|
||||||
this.options.handler.call(this, this, state, settings);
|
this.options.handler.call(this, this, state, settings);
|
||||||
}
|
}
|
||||||
if (state=='ok') {
|
if (state=='ok') {
|
||||||
settings.updateRecents && this.checkRecent(nCurrentSymbol, settings.font);
|
!special && settings.updateRecents && this.checkRecent(nCurrentSymbol, settings.font);
|
||||||
settings.updateRecents && this.updateRecents();
|
!special && settings.updateRecents && this.updateRecents();
|
||||||
if (this.type)
|
if (this.type)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -950,6 +1056,15 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onDblClickSpecialItem: function(e) {
|
||||||
|
if (!this.type)
|
||||||
|
this._handleInput('ok');
|
||||||
|
else {
|
||||||
|
var settings = this.getSpecialSymbol();
|
||||||
|
this.fireEvent('symbol:dblclick', this, 'ok', settings);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
updateRecents: function(){
|
updateRecents: function(){
|
||||||
var oRecentsDiv = this.recentPanel;
|
var oRecentsDiv = this.recentPanel;
|
||||||
oRecentsDiv.empty();
|
oRecentsDiv.empty();
|
||||||
|
@ -1304,7 +1419,7 @@ define([
|
||||||
this.curSize = {resize: false, width: size[0], height: size[1]};
|
this.curSize = {resize: false, width: size[0], height: size[1]};
|
||||||
} else if (this.curSize.resize) {
|
} else if (this.curSize.resize) {
|
||||||
this._preventUpdateScroll = false;
|
this._preventUpdateScroll = false;
|
||||||
this.curSize.height = size[1] - 264;
|
this.curSize.height = size[1] - 302 + 38*(this.special ? 0 : 1);
|
||||||
var rows = Math.max(1, ((this.curSize.height/CELL_HEIGHT) >> 0)),
|
var rows = Math.max(1, ((this.curSize.height/CELL_HEIGHT) >> 0)),
|
||||||
height = rows*CELL_HEIGHT;
|
height = rows*CELL_HEIGHT;
|
||||||
|
|
||||||
|
@ -1315,6 +1430,9 @@ define([
|
||||||
|
|
||||||
this.updateView(undefined, undefined, undefined, true);
|
this.updateView(undefined, undefined, undefined, true);
|
||||||
|
|
||||||
|
this.specialList.cmpEl.height(size[1] - 156 + 38*(this.special ? 0 : 1));
|
||||||
|
|
||||||
|
!this.special && (size[1] += 38);
|
||||||
var valJson = JSON.stringify(size);
|
var valJson = JSON.stringify(size);
|
||||||
Common.localStorage.setItem(this.appPrefix + 'settings-size-symbol-table', valJson);
|
Common.localStorage.setItem(this.appPrefix + 'settings-size-symbol-table', valJson);
|
||||||
Common.Utils.InternalSettings.set(this.appPrefix + 'settings-size-symbol-table', valJson);
|
Common.Utils.InternalSettings.set(this.appPrefix + 'settings-size-symbol-table', valJson);
|
||||||
|
@ -1330,7 +1448,7 @@ define([
|
||||||
this.curSize.resize = true;
|
this.curSize.resize = true;
|
||||||
|
|
||||||
this.curSize.width = size[0];
|
this.curSize.width = size[0];
|
||||||
this.curSize.height = size[1] - 264;
|
this.curSize.height = size[1] - 302 + 38*(this.special ? 0 : 1);
|
||||||
|
|
||||||
var rows = Math.max(1, ((this.curSize.height/CELL_HEIGHT) >> 0)),
|
var rows = Math.max(1, ((this.curSize.height/CELL_HEIGHT) >> 0)),
|
||||||
height = rows*CELL_HEIGHT;
|
height = rows*CELL_HEIGHT;
|
||||||
|
@ -1339,14 +1457,53 @@ define([
|
||||||
this.previewPanel.css({'height': height + 'px'});
|
this.previewPanel.css({'height': height + 'px'});
|
||||||
this.previewScrolled.css({'height': height + 'px'});
|
this.previewScrolled.css({'height': height + 'px'});
|
||||||
|
|
||||||
|
this.specialList.cmpEl.height(size[1] - 156 + 38*(this.special ? 0 : 1));
|
||||||
|
|
||||||
this.updateView(undefined, undefined, undefined, true);
|
this.updateView(undefined, undefined, undefined, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onModeClick: function(special, btn, event) {
|
||||||
|
this.ShowHideElem(special);
|
||||||
|
},
|
||||||
|
|
||||||
|
ShowHideElem: function(special) {
|
||||||
|
this.symbolsPanel.toggleClass('hidden', special);
|
||||||
|
this.specialPanel.toggleClass('hidden', !special);
|
||||||
|
var me = this;
|
||||||
|
_.delay(function(){
|
||||||
|
special ? me.specialList.cmpEl.find('.listview').focus() : me.previewPanel.focus();
|
||||||
|
},50);
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
textTitle: 'Symbol',
|
textTitle: 'Symbol',
|
||||||
textFont: 'Font',
|
textFont: 'Font',
|
||||||
textRange: 'Range',
|
textRange: 'Range',
|
||||||
textRecent: 'Recently used symbols',
|
textRecent: 'Recently used symbols',
|
||||||
textCode: 'Unicode HEX value'
|
textCode: 'Unicode HEX value',
|
||||||
|
textSymbols: 'Symbols',
|
||||||
|
textSpecial: 'Special characters',
|
||||||
|
textCharacter: 'Character',
|
||||||
|
textShortcut: 'Shortcut key',
|
||||||
|
textEmDash: 'Em Dash',
|
||||||
|
textEnDash: 'En Dash',
|
||||||
|
textNBHyphen: 'Non-breaking Hyphen',
|
||||||
|
textSHyphen: 'Soft Hyphen',
|
||||||
|
textEmSpace: 'Em Space',
|
||||||
|
textEnSpace: 'En Space',
|
||||||
|
textQEmSpace: '1/4 Em Space',
|
||||||
|
textNBSpace: 'No-break Space',
|
||||||
|
textCopyright: 'Copyright Sign',
|
||||||
|
textRegistered: 'Registered Sign',
|
||||||
|
textTradeMark: 'Trade Mark Sign',
|
||||||
|
textSection: 'Section Sign',
|
||||||
|
textPilcrow: 'Pilcrow Sign',
|
||||||
|
textEllipsis: 'Horizontal Ellipsis',
|
||||||
|
textSOQuote: 'Single Opening Quote',
|
||||||
|
textSCQuote: 'Single Closing Quote',
|
||||||
|
textDOQuote: 'Double Opening Quote',
|
||||||
|
textDCQuote: 'Double Closing Quote'
|
||||||
|
|
||||||
}, Common.Views.SymbolTableDialog || {}))
|
}, Common.Views.SymbolTableDialog || {}))
|
||||||
});
|
});
|
|
@ -2562,17 +2562,19 @@ define([
|
||||||
lang: me.mode.lang,
|
lang: me.mode.lang,
|
||||||
modal: false,
|
modal: false,
|
||||||
type: 1,
|
type: 1,
|
||||||
|
special: true,
|
||||||
|
showShortcutKey: true,
|
||||||
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.asc_insertSymbol(settings.font, settings.code);
|
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), 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, result, settings) {
|
me.dlgSymbolTable.on('symbol:dblclick', function(cmp, result, settings) {
|
||||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -362,6 +362,28 @@
|
||||||
"Common.Views.SymbolTableDialog.textRange": "Range",
|
"Common.Views.SymbolTableDialog.textRange": "Range",
|
||||||
"Common.Views.SymbolTableDialog.textRecent": "Recently used symbols",
|
"Common.Views.SymbolTableDialog.textRecent": "Recently used symbols",
|
||||||
"Common.Views.SymbolTableDialog.textTitle": "Symbol",
|
"Common.Views.SymbolTableDialog.textTitle": "Symbol",
|
||||||
|
"Common.Views.SymbolTableDialog.textSymbols": "Symbols",
|
||||||
|
"Common.Views.SymbolTableDialog.textSpecial": "Special characters",
|
||||||
|
"Common.Views.SymbolTableDialog.textCharacter": "Character",
|
||||||
|
"Common.Views.SymbolTableDialog.textShortcut": "Shortcut key",
|
||||||
|
"Common.Views.SymbolTableDialog.textEmDash": "Em Dash",
|
||||||
|
"Common.Views.SymbolTableDialog.textEnDash": "En Dash",
|
||||||
|
"Common.Views.SymbolTableDialog.textNBHyphen": "Non-breaking Hyphen",
|
||||||
|
"Common.Views.SymbolTableDialog.textSHyphen": "Soft Hyphen",
|
||||||
|
"Common.Views.SymbolTableDialog.textEmSpace": "Em Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textEnSpace": "En Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textQEmSpace": "1/4 Em Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textNBSpace": "No-break Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textCopyright": "Copyright Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textRegistered": "Registered Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textTradeMark": "Trade Mark Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textSection": "Section Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textPilcrow": "Pilcrow Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textEllipsis": "Horizontal Ellipsis",
|
||||||
|
"Common.Views.SymbolTableDialog.textSOQuote": "Single Opening Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textSCQuote": "Single Closing Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textDOQuote": "Double Opening Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textDCQuote": "Double Closing Quote",
|
||||||
"DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.<br> Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
|
"DE.Controllers.LeftMenu.leavePageText": "All unsaved changes in this document will be lost.<br> Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
|
||||||
"DE.Controllers.LeftMenu.newDocumentTitle": "Unnamed document",
|
"DE.Controllers.LeftMenu.newDocumentTitle": "Unnamed document",
|
||||||
"DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning",
|
"DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning",
|
||||||
|
|
|
@ -1861,17 +1861,18 @@ define([
|
||||||
api: me.api,
|
api: me.api,
|
||||||
lang: me.toolbar.mode.lang,
|
lang: me.toolbar.mode.lang,
|
||||||
type: 1,
|
type: 1,
|
||||||
|
special: true,
|
||||||
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.asc_insertSymbol(settings.font, settings.code);
|
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), 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, result, settings) {
|
win.on('symbol:dblclick', function(cmp, result, settings) {
|
||||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -244,6 +244,28 @@
|
||||||
"Common.Views.SymbolTableDialog.textRange": "Range",
|
"Common.Views.SymbolTableDialog.textRange": "Range",
|
||||||
"Common.Views.SymbolTableDialog.textRecent": "Recently used symbols",
|
"Common.Views.SymbolTableDialog.textRecent": "Recently used symbols",
|
||||||
"Common.Views.SymbolTableDialog.textTitle": "Symbol",
|
"Common.Views.SymbolTableDialog.textTitle": "Symbol",
|
||||||
|
"Common.Views.SymbolTableDialog.textSymbols": "Symbols",
|
||||||
|
"Common.Views.SymbolTableDialog.textSpecial": "Special characters",
|
||||||
|
"Common.Views.SymbolTableDialog.textCharacter": "Character",
|
||||||
|
"Common.Views.SymbolTableDialog.textShortcut": "Shortcut key",
|
||||||
|
"Common.Views.SymbolTableDialog.textEmDash": "Em Dash",
|
||||||
|
"Common.Views.SymbolTableDialog.textEnDash": "En Dash",
|
||||||
|
"Common.Views.SymbolTableDialog.textNBHyphen": "Non-breaking Hyphen",
|
||||||
|
"Common.Views.SymbolTableDialog.textSHyphen": "Soft Hyphen",
|
||||||
|
"Common.Views.SymbolTableDialog.textEmSpace": "Em Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textEnSpace": "En Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textQEmSpace": "1/4 Em Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textNBSpace": "No-break Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textCopyright": "Copyright Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textRegistered": "Registered Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textTradeMark": "Trade Mark Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textSection": "Section Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textPilcrow": "Pilcrow Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textEllipsis": "Horizontal Ellipsis",
|
||||||
|
"Common.Views.SymbolTableDialog.textSOQuote": "Single Opening Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textSCQuote": "Single Closing Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textDOQuote": "Double Opening Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textDCQuote": "Double Closing Quote",
|
||||||
"PE.Controllers.LeftMenu.newDocumentTitle": "Unnamed presentation",
|
"PE.Controllers.LeftMenu.newDocumentTitle": "Unnamed presentation",
|
||||||
"PE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning",
|
"PE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning",
|
||||||
"PE.Controllers.LeftMenu.requestEditRightsText": "Requesting editing rights...",
|
"PE.Controllers.LeftMenu.requestEditRightsText": "Requesting editing rights...",
|
||||||
|
|
|
@ -2742,17 +2742,18 @@ define([
|
||||||
api: me.api,
|
api: me.api,
|
||||||
lang: me.toolbar.mode.lang,
|
lang: me.toolbar.mode.lang,
|
||||||
type: 1,
|
type: 1,
|
||||||
|
special: true,
|
||||||
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.asc_insertSymbol(settings.font, settings.code);
|
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getFont().asc_getName(), 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, result, settings) {
|
win.on('symbol:dblclick', function(cmp, result, settings) {
|
||||||
me.api.asc_insertSymbol(settings.font, settings.code);
|
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getFont().asc_getName(), settings.code);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -242,6 +242,28 @@
|
||||||
"Common.Views.SymbolTableDialog.textRange": "Range",
|
"Common.Views.SymbolTableDialog.textRange": "Range",
|
||||||
"Common.Views.SymbolTableDialog.textRecent": "Recently used symbols",
|
"Common.Views.SymbolTableDialog.textRecent": "Recently used symbols",
|
||||||
"Common.Views.SymbolTableDialog.textTitle": "Symbol",
|
"Common.Views.SymbolTableDialog.textTitle": "Symbol",
|
||||||
|
"Common.Views.SymbolTableDialog.textSymbols": "Symbols",
|
||||||
|
"Common.Views.SymbolTableDialog.textSpecial": "Special characters",
|
||||||
|
"Common.Views.SymbolTableDialog.textCharacter": "Character",
|
||||||
|
"Common.Views.SymbolTableDialog.textShortcut": "Shortcut key",
|
||||||
|
"Common.Views.SymbolTableDialog.textEmDash": "Em Dash",
|
||||||
|
"Common.Views.SymbolTableDialog.textEnDash": "En Dash",
|
||||||
|
"Common.Views.SymbolTableDialog.textNBHyphen": "Non-breaking Hyphen",
|
||||||
|
"Common.Views.SymbolTableDialog.textSHyphen": "Soft Hyphen",
|
||||||
|
"Common.Views.SymbolTableDialog.textEmSpace": "Em Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textEnSpace": "En Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textQEmSpace": "1/4 Em Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textNBSpace": "No-break Space",
|
||||||
|
"Common.Views.SymbolTableDialog.textCopyright": "Copyright Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textRegistered": "Registered Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textTradeMark": "Trade Mark Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textSection": "Section Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textPilcrow": "Pilcrow Sign",
|
||||||
|
"Common.Views.SymbolTableDialog.textEllipsis": "Horizontal Ellipsis",
|
||||||
|
"Common.Views.SymbolTableDialog.textSOQuote": "Single Opening Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textSCQuote": "Single Closing Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textDOQuote": "Double Opening Quote",
|
||||||
|
"Common.Views.SymbolTableDialog.textDCQuote": "Double Closing Quote",
|
||||||
"SSE.Controllers.DataTab.textWizard": "Text to Columns",
|
"SSE.Controllers.DataTab.textWizard": "Text to Columns",
|
||||||
"SSE.Controllers.DocumentHolder.alignmentText": "Alignment",
|
"SSE.Controllers.DocumentHolder.alignmentText": "Alignment",
|
||||||
"SSE.Controllers.DocumentHolder.centerText": "Center",
|
"SSE.Controllers.DocumentHolder.centerText": "Center",
|
||||||
|
|
Loading…
Reference in a new issue