Merge pull request #1162 from ONLYOFFICE/fix/ea_lang

Fix/ea lang
This commit is contained in:
Julia Radzhabova 2021-09-07 12:54:52 +03:00 committed by GitHub
commit e60b20590e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 37 deletions

View file

@ -48,12 +48,6 @@ define([
'common/main/lib/model/Font'
], function(Backbone){ 'use strict';
Common.Collections.Fonts = Backbone.Collection.extend({
model: Common.Models.Font,
comparator: function(item1, item2) {
var n1 = item1.get('name').toLowerCase(),
n2 = item2.get('name').toLowerCase();
if (n1==n2) return 0;
return (n1<n2) ? -1 : 1;
}
model: Common.Models.Font
});
});

View file

@ -53,12 +53,13 @@ define([
iconHeight = Asc.FONT_THUMBNAIL_HEIGHT || 28,
thumbCanvas = document.createElement('canvas'),
thumbContext = thumbCanvas.getContext('2d'),
postfix = (/^(zh|ja|ko)$/i.test(Common.Locale.getCurrentLanguage())) ? '_ea' : '',
thumbs = [
{ratio: 1, path: '../../../../sdkjs/common/Images/fonts_thumbnail.png', width: iconWidth, height: iconHeight},
{ratio: 1.25, path: '../../../../sdkjs/common/Images/fonts_thumbnail@1.25x.png', width: iconWidth * 1.25, height: iconHeight * 1.25},
{ratio: 1.5, path: '../../../../sdkjs/common/Images/fonts_thumbnail@1.5x.png', width: iconWidth * 1.5, height: iconHeight * 1.5},
{ratio: 1.75, path: '../../../../sdkjs/common/Images/fonts_thumbnail@1.75x.png', width: iconWidth * 1.75, height: iconHeight * 1.75},
{ratio: 2, path: '../../../../sdkjs/common/Images/fonts_thumbnail@2x.png', width: iconWidth * 2, height: iconHeight * 2}
{ratio: 1, path: '../../../../sdkjs/common/Images/fonts_thumbnail' + postfix + '.png', width: iconWidth, height: iconHeight},
{ratio: 1.25, path: '../../../../sdkjs/common/Images/fonts_thumbnail' + postfix + '@1.25x.png', width: iconWidth * 1.25, height: iconHeight * 1.25},
{ratio: 1.5, path: '../../../../sdkjs/common/Images/fonts_thumbnail' + postfix + '@1.5x.png', width: iconWidth * 1.5, height: iconHeight * 1.5},
{ratio: 1.75, path: '../../../../sdkjs/common/Images/fonts_thumbnail' + postfix + '@1.75x.png', width: iconWidth * 1.75, height: iconHeight * 1.75},
{ratio: 2, path: '../../../../sdkjs/common/Images/fonts_thumbnail' + postfix + '@2x.png', width: iconWidth * 2, height: iconHeight * 2}
],
thumbIdx = 0,
listItemHeight = 28,

View file

@ -120,11 +120,7 @@ define([
});
var store = this.getCollection('Common.Collections.Fonts');
if (store) {
store.add(fontsArray);
store.sort();
}
store && store.add(fontsArray);
Common.NotificationCenter.trigger('fonts:load', store, select);
}

View file

@ -71,11 +71,6 @@ export class storeTextSettings {
type : font.asc_getFontType()
});
}
array.sort(function(a, b) {
return (a.name.toLowerCase() > b.name.toLowerCase()) ? 1 : -1;
});
this.fontsArray = array;
}
resetFontName (font) {

View file

@ -75,11 +75,6 @@ export class storeTextSettings {
type : font.asc_getFontType()
});
}
array.sort(function(a, b) {
return (a.name.toLowerCase() > b.name.toLowerCase()) ? 1 : -1;
});
this.fontsArray = array;
}

View file

@ -139,11 +139,6 @@ export class storeCellSettings {
type : font.asc_getFontType()
});
}
array.sort(function(a, b) {
return (a.name.toLowerCase() > b.name.toLowerCase()) ? 1 : -1;
});
this.fontsArray = array;
}

View file

@ -78,11 +78,6 @@ export class storeTextSettings {
type : font.asc_getFontType()
});
}
array.sort(function(a, b) {
return (a.name.toLowerCase() > b.name.toLowerCase()) ? 1 : -1;
});
this.fontsArray = array;
}