Skip to content

Commit

Permalink
Merge pull request 'fix/bugfix' (#41) from fix/bugfix into release/v8…
Browse files Browse the repository at this point in the history
….2.0
  • Loading branch information
Julia Radzhabova committed Sep 25, 2024
2 parents c9c8211 + 88872ae commit eb35c3d
Show file tree
Hide file tree
Showing 19 changed files with 27 additions and 39 deletions.
8 changes: 7 additions & 1 deletion apps/common/main/lib/controller/LaunchController.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ define([
this.api = api;
Common.NotificationCenter.on('app:ready', on_app_ready.bind(this));
Common.NotificationCenter.on('app:face', on_hide_loader.bind(this));
Common.NotificationCenter.on('app-pack:loaded', on_app_pack_loaded.bind(this));
}

const load_scripts = function () {
Expand All @@ -53,14 +54,19 @@ define([
if (!!Common.UI.ScreenReaderFocusManager) {
Common.UI.ScreenReaderFocusManager.init(me.api);
}
_all_scripts_loaded = true;

if ( !!window.less ) { // detect development mode
_all_scripts_loaded = true;
Common.NotificationCenter.trigger('script:loaded');
}
});
}

const on_app_pack_loaded = function (config) {
_all_scripts_loaded = true;
Common.NotificationCenter.trigger('script:loaded');
}

const on_app_ready = function (config) {
load_scripts.call(this);
}
Expand Down
6 changes: 0 additions & 6 deletions apps/common/main/lib/template/Header.template

This file was deleted.

6 changes: 1 addition & 5 deletions apps/common/main/lib/view/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ Common.Views = Common.Views || {};

define([
'backbone',
'text!common/main/lib/template/Header.template',
'core'
], function (Backbone, headerTemplate) { 'use strict';
], function (Backbone) { 'use strict';

Common.Views.Header = Backbone.View.extend(_.extend(function(){
var storeUsers, appConfig;
Expand Down Expand Up @@ -758,9 +757,6 @@ define([

el: '#header',

// Compile our stats template
template: _.template(headerTemplate),

// Delegated events for creating new items, and clearing completed ones.
events: {
// 'click #header-logo': function (e) {}
Expand Down
2 changes: 1 addition & 1 deletion apps/common/main/resources/less/toolbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@
border-top-width: @underscore_height;
content: '';
position: absolute;
margin-left: 6px;
.margin-left-6();
width: calc(100% - 12px);
bottom: -@underscore_height;
opacity: 0;
Expand Down
2 changes: 1 addition & 1 deletion apps/documenteditor/forms/app_pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ require([
'common/main/lib/view/SignDialog',
'common/main/lib/view/SignSettingsDialog',
], function () {
Common.NotificationCenter.trigger('script:loaded');
Common.NotificationCenter.trigger('app-pack:loaded');
});
3 changes: 1 addition & 2 deletions apps/documenteditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ define([

var mapCustomizationElements = {
about: 'button#left-btn-about',
feedback: 'button#left-btn-support',
goback: '#fm-btn-back > a, #header-back > div'
feedback: 'button#left-btn-support'
};

var mapCustomizationExtElements = {
Expand Down
8 changes: 2 additions & 6 deletions apps/documenteditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2636,9 +2636,6 @@ define([

var parentOffset = Common.Utils.getOffset(this.toolbar.$el),
top = e.clientY*Common.Utils.zoom();
if ($('#header-container').is(":visible")) {
top -= $('#header-container').height()
}
showPoint = [e.clientX*Common.Utils.zoom(), top - parentOffset.top];

if (record != undefined) {
Expand Down Expand Up @@ -2707,9 +2704,6 @@ define([
onSaveStyle: function (style) {
if (!window.styles_loaded) return;

window.styles_loaded = false;
this.toolbar.lockToolbar(Common.enumLock.noStyles, !window.styles_loaded, {array: [this.toolbar.listStyles]});

var me = this, win;

if (me.api) {
Expand All @@ -2723,6 +2717,8 @@ define([
characterStyle.put_Name(title + '_character');
style.put_Next((nextStyle) ? nextStyle.asc_getName() : null);
me.api.asc_AddNewStyle(style);
window.styles_loaded = false;
me.toolbar.lockToolbar(Common.enumLock.noStyles, !window.styles_loaded, {array: [me.toolbar.listStyles]});
}
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
};
Expand Down
2 changes: 1 addition & 1 deletion apps/documenteditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ define([

if (!this.customizationDone) {
this.customizationDone = true;
Common.Utils.applyCustomization(this.mode.customization, {goback: '#fm-btn-back > a'});
this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text);
}

this.panels['opts'].setMode(this.mode);
Expand Down
2 changes: 1 addition & 1 deletion apps/documenteditor/main/app_pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ require([
'documenteditor/main/app/view/ProtectDialog',
'documenteditor/main/app/view/MailMergeEmailDlg'
], function () {
Common.NotificationCenter.trigger('script:loaded');
Common.NotificationCenter.trigger('app-pack:loaded');
});
3 changes: 1 addition & 2 deletions apps/pdfeditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ define([

var mapCustomizationElements = {
about: 'button#left-btn-about',
feedback: 'button#left-btn-support',
goback: '#fm-btn-back > a, #header-back > div'
feedback: 'button#left-btn-support'
};

var mapCustomizationExtElements = {
Expand Down
2 changes: 1 addition & 1 deletion apps/pdfeditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ define([

if (!this.customizationDone) {
this.customizationDone = true;
Common.Utils.applyCustomization(this.mode.customization, {goback: '#fm-btn-back > a'});
this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text);
}

this.panels['opts'].setMode(this.mode);
Expand Down
2 changes: 1 addition & 1 deletion apps/pdfeditor/main/app_pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ require([
'pdfeditor/main/app/view/ShapeSettingsAdvanced',
'pdfeditor/main/app/view/TableSettingsAdvanced'
], function () {
Common.NotificationCenter.trigger('script:loaded');
Common.NotificationCenter.trigger('app-pack:loaded');
});
3 changes: 1 addition & 2 deletions apps/presentationeditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ define([

var mapCustomizationElements = {
about: 'button#left-btn-about',
feedback: 'button#left-btn-support',
goback: '#fm-btn-back > a, #header-back > div'
feedback: 'button#left-btn-support'
};

var mapCustomizationExtElements = {
Expand Down
2 changes: 1 addition & 1 deletion apps/presentationeditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ define([

if (!this.customizationDone) {
this.customizationDone = true;
Common.Utils.applyCustomization(this.mode.customization, {goback: '#fm-btn-back > a'});
this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text);
}

this.panels['opts'].setMode(this.mode);
Expand Down
2 changes: 1 addition & 1 deletion apps/presentationeditor/main/app_pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ require([
'presentationeditor/main/app/view/DateTimeDialog',
'presentationeditor/main/app/view/ChartSettingsAdvanced'
], function () {
Common.NotificationCenter.trigger('script:loaded');
Common.NotificationCenter.trigger('app-pack:loaded');
});
6 changes: 3 additions & 3 deletions apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2061,9 +2061,9 @@ define([

showPoint = [data.asc_getX() + pos[0] - 10, data.asc_getY() + pos[1] + 20];

var tipheight = filterTip.ref.getBSTip().$tip.width();
if (showPoint[1] + filterTip.ttHeight > me.tooltips.coauth.bodyHeight ) {
showPoint[1] = me.tooltips.coauth.bodyHeight - filterTip.ttHeight - 5;
var tipheight = filterTip.ref.getBSTip().$tip.height();
if (showPoint[1] + tipheight > me.tooltips.coauth.bodyHeight ) {
showPoint[1] = me.tooltips.coauth.bodyHeight - tipheight - 5;
showPoint[0] += 20;
}

Expand Down
3 changes: 1 addition & 2 deletions apps/spreadsheeteditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ define([

var mapCustomizationElements = {
about: 'button#left-btn-about',
feedback: 'button#left-btn-support',
goback: '#fm-btn-back > a, #header-back > div'
feedback: 'button#left-btn-support'
};

var mapCustomizationExtElements = {
Expand Down
2 changes: 1 addition & 1 deletion apps/spreadsheeteditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ define([

if (!this.customizationDone) {
this.customizationDone = true;
Common.Utils.applyCustomization(this.mode.customization, {goback: '#fm-btn-back > a'});
this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text);
}

this.panels['opts'].setMode(this.mode);
Expand Down
2 changes: 1 addition & 1 deletion apps/spreadsheeteditor/main/app_pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ require([
'spreadsheeteditor/main/app/view/AutoFilterDialog',
'spreadsheeteditor/main/app/view/PivotGroupDialog',
], function () {
Common.NotificationCenter.trigger('script:loaded');
Common.NotificationCenter.trigger('app-pack:loaded');
});

0 comments on commit eb35c3d

Please sign in to comment.