[PE] FIx Bug 21362

This commit is contained in:
Julia Radzhabova 2018-04-09 14:23:44 +03:00
parent bba42f4c57
commit 648abe2198
5 changed files with 42 additions and 9 deletions

View file

@ -278,6 +278,13 @@ define([
}));
}
var modalParents = this.cmpEl.closest('.asc-window');
if (modalParents.length < 1)
modalParents = this.cmpEl.closest('[id^="menu-container-"]'); // context menu
if (modalParents.length > 0) {
this.tipZIndex = parseInt(modalParents.css('z-index')) + 10;
}
if (!this.rendered) {
if (this.listenStoreEvents) {
this.listenTo(this.store, 'add', this.onAddItem);
@ -316,11 +323,6 @@ define([
});
}
var modalParents = this.cmpEl.closest('.asc-window');
if (modalParents.length > 0) {
this.tipZIndex = parseInt(modalParents.css('z-index')) + 10;
}
this.rendered = true;
this.cmpEl.on('click', function(e){

View file

@ -104,6 +104,7 @@ define([
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseWarning: false};
this.languages = null;
this.translationTable = [];
window.storagename = 'presentation';
@ -123,6 +124,7 @@ define([
// Initialize api
window["flat_desine"] = true;
this.api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk',
'translate': {
@ -151,6 +153,11 @@ define([
}
});
var themeNames = ['blank', 'pixel', 'classic', 'official', 'green', 'lines', 'office', 'safari', 'dotted', 'corner', 'turtle'];
themeNames.forEach(function(item){
me.translationTable[item] = me['txtTheme_' + item.replace(/ /g, '_')] || item;
});
if (this.api){
this.api.SetDrawingFreeze(true);
this.api.SetThemesPath("../../../../sdkjs/slide/themes/");
@ -2001,7 +2008,18 @@ define([
txtAddNotes: 'Click to add notes',
warnNoLicenseUsers: 'This version of ONLYOFFICE Editors has certain limitations for concurrent users.<br>If you need more please consider upgrading your current license or purchasing a commercial one.',
errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",
txtAddFirstSlide: 'Click to add first slide'
txtAddFirstSlide: 'Click to add first slide',
txtTheme_blank: 'Blank',
txtTheme_pixel: 'Pixel',
txtTheme_classic: 'Classic',
txtTheme_official: 'Official',
txtTheme_green: 'Green',
txtTheme_lines: 'Lines',
txtTheme_office: 'Office',
txtTheme_safari: 'Safari',
txtTheme_dotted: 'Dotted',
txtTheme_corner: 'Corner',
txtTheme_turtle: 'Turtle'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -1881,7 +1881,8 @@ define([
me.toolbar.listTheme.menuPicker.store.reset([]); // remove all
var themeStore = this.getCollection('SlideThemes');
var themeStore = this.getCollection('SlideThemes'),
mainController = this.getApplication().getController('Main');
if (themeStore) {
var arr = [];
_.each(defaultThemes.concat(docThemes), function(theme) {
@ -1889,13 +1890,15 @@ define([
imageUrl: theme.get_Image(),
uid : Common.UI.getId(),
themeId : theme.get_Index(),
tip : mainController.translationTable[theme.get_Name()] || theme.get_Name(),
itemWidth : 85,
itemHeight : 38
}));
me.toolbar.listTheme.menuPicker.store.add({
imageUrl: theme.get_Image(),
uid : Common.UI.getId(),
themeId : theme.get_Index()
themeId : theme.get_Index(),
tip : mainController.translationTable[theme.get_Name()] || theme.get_Name()
});
});
themeStore.reset(arr);

View file

@ -707,7 +707,6 @@ define([
itemWidth : 85,
enableKeyEvents: true,
itemHeight : 38,
hint: this.tipSlideTheme,
lock: [_set.themeLock, _set.lostConnect, _set.noSlides],
beforeOpenHandler: function(e) {
var cmp = this,

View file

@ -360,6 +360,17 @@
"PE.Controllers.Main.txtStarsRibbons": "Stars & Ribbons",
"PE.Controllers.Main.txtXAxis": "X Axis",
"PE.Controllers.Main.txtYAxis": "Y Axis",
"PE.Controllers.Main.txtTheme_blank": "Blank",
"PE.Controllers.Main.txtTheme_pixel": "Pixel",
"PE.Controllers.Main.txtTheme_classic": "Classic",
"PE.Controllers.Main.txtTheme_official": "Official",
"PE.Controllers.Main.txtTheme_green": "Green",
"PE.Controllers.Main.txtTheme_lines": "Lines",
"PE.Controllers.Main.txtTheme_office": "Office",
"PE.Controllers.Main.txtTheme_safari": "Safari",
"PE.Controllers.Main.txtTheme_dotted": "Dotted",
"PE.Controllers.Main.txtTheme_corner": "Corner",
"PE.Controllers.Main.txtTheme_turtle": "Turtle",
"PE.Controllers.Main.unknownErrorText": "Unknown error.",
"PE.Controllers.Main.unsupportedBrowserErrorText": "Your browser is not supported.",
"PE.Controllers.Main.uploadImageExtMessage": "Unknown image format.",