Merge pull request #58 from ONLYOFFICE/release/v5.1.0

Release/v5.1.0
This commit is contained in:
Alexander Vnuchkov 2018-03-07 15:33:40 +03:00 committed by GitHub
commit 2408514bb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 52 additions and 14 deletions

View file

@ -152,7 +152,8 @@ define([
fmin : panel.resize.fmin, fmin : panel.resize.fmin,
fmax : panel.resize.fmax, fmax : panel.resize.fmax,
behaviour : panel.behaviour, behaviour : panel.behaviour,
index : this.splitters.length index : this.splitters.length,
offset : panel.resize.offset || 0
}; };
if (!stretch) { if (!stretch) {
@ -492,7 +493,10 @@ define([
if ( !panel.stretch ) { if ( !panel.stretch ) {
style = panel.el.is(':visible'); style = panel.el.is(':visible');
if ( style ) { if ( style ) {
width += (panel.rely!==true ? panel.width : this.getElementWidth(panel.el)); if (panel.isresizer)
width += panel.offset;
else
width += (panel.rely!==true ? panel.width : this.getElementWidth(panel.el));
} }
if (panel.resize && panel.resize.autohide !== false && panel.resize.el) { if (panel.resize && panel.resize.autohide !== false && panel.resize.el) {
@ -514,10 +518,13 @@ define([
width = 0; width = 0;
this.panels.forEach(function(panel){ this.panels.forEach(function(panel){
if (panel.el.is(':visible')) { if (panel.el.is(':visible')) {
style = {left: width}; style = {left: width - (panel.isresizer ? panel.width : 0)};
panel.rely!==true && (style.width = panel.width); panel.rely!==true && (style.width = panel.width);
panel.el.css(style); panel.el.css(style);
width += this.getElementWidth(panel.el); if (panel.isresizer)
width += panel.offset;
else
width += this.getElementWidth(panel.el);
} }
},this); },this);
} }

View file

@ -557,6 +557,7 @@ define([
app.getController('RightMenu').SetDisabled(disable, false); app.getController('RightMenu').SetDisabled(disable, false);
app.getController('Statusbar').getView('Statusbar').SetDisabled(disable); app.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
app.getController('DocumentHolder').getView().SetDisabled(disable); app.getController('DocumentHolder').getView().SetDisabled(disable);
app.getController('Navigation') && app.getController('Navigation').SetDisabled(disable);
app.getController('Common.Controllers.Plugins').getView('Common.Views.Plugins').disableControls(disable); app.getController('Common.Controllers.Plugins').getView('Common.Views.Plugins').disableControls(disable);
var leftMenu = app.getController('LeftMenu').leftMenu; var leftMenu = app.getController('LeftMenu').leftMenu;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -49,7 +49,7 @@
} }
> .layout-resizer { > .layout-resizer {
width: 2px; width: 4px;
cursor: col-resize; cursor: col-resize;
&.move { &.move {

View file

@ -129,7 +129,7 @@ define([
window["flat_desine"] = true; window["flat_desine"] = true;
var styleNames = ['Normal', 'No Spacing', 'Heading 1', 'Heading 2', 'Heading 3', 'Heading 4', 'Heading 5', var styleNames = ['Normal', 'No Spacing', 'Heading 1', 'Heading 2', 'Heading 3', 'Heading 4', 'Heading 5',
'Heading 6', 'Heading 7', 'Heading 8', 'Heading 9', 'Title', 'Subtitle', 'Quote', 'Intense Quote', 'List Paragraph'], 'Heading 6', 'Heading 7', 'Heading 8', 'Heading 9', 'Title', 'Subtitle', 'Quote', 'Intense Quote', 'List Paragraph', 'footnote text'],
translate = { translate = {
'Series': this.txtSeries, 'Series': this.txtSeries,
'Diagram Title': this.txtDiagramTitle, 'Diagram Title': this.txtDiagramTitle,
@ -153,6 +153,8 @@ define([
styleNames.forEach(function(item){ styleNames.forEach(function(item){
translate[item] = me.translationTable[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item; translate[item] = me.translationTable[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item;
}); });
me.translationTable['Header'] = this.txtHeader;
me.translationTable['Footer'] = this.txtFooter;
this.api = new Asc.asc_docs_api({ this.api = new Asc.asc_docs_api({
'id-view' : 'editor_sdk', 'id-view' : 'editor_sdk',
@ -900,7 +902,7 @@ define([
leftmenuController.getView('LeftMenu').getMenu('file').loadDocument({doc:me.document}); leftmenuController.getView('LeftMenu').getMenu('file').loadDocument({doc:me.document});
leftmenuController.setMode(me.appOptions).createDelayedElements().setApi(me.api); leftmenuController.setMode(me.appOptions).createDelayedElements().setApi(me.api);
navigationController.setApi(me.api); navigationController.setApi(me.api).setMode(this.appOptions);
chatController.setApi(this.api).setMode(this.appOptions); chatController.setApi(this.api).setMode(this.appOptions);
application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization}); application.getController('Common.Controllers.ExternalDiagramEditor').setApi(this.api).loadConfig({config:this.editorConfig, customization: this.editorConfig.customization});
@ -2224,6 +2226,7 @@ define([
txtStyle_Quote: 'Quote', txtStyle_Quote: 'Quote',
txtStyle_Intense_Quote: 'Intense Quote', txtStyle_Intense_Quote: 'Intense Quote',
txtStyle_List_Paragraph: 'List Paragraph', txtStyle_List_Paragraph: 'List Paragraph',
txtStyle_footnote_text: 'Footnote Text',
saveTextText: 'Saving document...', saveTextText: 'Saving document...',
saveTitleText: 'Saving Document', saveTitleText: 'Saving Document',
txtBookmarkError: "Error! Bookmark not defined.", txtBookmarkError: "Error! Bookmark not defined.",

View file

@ -77,6 +77,7 @@ define([
}); });
this.panelNavigation.on('render:after', _.bind(this.onAfterRender, this)); this.panelNavigation.on('render:after', _.bind(this.onAfterRender, this));
this._navigationObject = null; this._navigationObject = null;
this._isDisabled = false;
}, },
setApi: function(api) { setApi: function(api) {
@ -90,6 +91,8 @@ define([
}, },
setMode: function(mode) { setMode: function(mode) {
this.mode = mode;
return this;
}, },
onAfterRender: function(panelNavigation) { onAfterRender: function(panelNavigation) {
@ -163,10 +166,16 @@ define([
top = e.clientY*Common.Utils.zoom(); top = e.clientY*Common.Utils.zoom();
showPoint = [e.clientX*Common.Utils.zoom() + 5, top - parentOffset.top + 5]; showPoint = [e.clientX*Common.Utils.zoom() + 5, top - parentOffset.top + 5];
for (var i=0; i<7; i++) {
menu.items[i].setVisible(this.mode.isEdit);
}
var isNotHeader = record.get('isNotHeader'); var isNotHeader = record.get('isNotHeader');
menu.items[0].setDisabled(isNotHeader); menu.items[0].setDisabled(isNotHeader || this._isDisabled);
menu.items[1].setDisabled(isNotHeader); menu.items[1].setDisabled(isNotHeader || this._isDisabled);
menu.items[3].setDisabled(isNotHeader); menu.items[3].setDisabled(isNotHeader || this._isDisabled);
menu.items[4].setDisabled(this._isDisabled);
menu.items[5].setDisabled(this._isDisabled);
menu.items[7].setDisabled(isNotHeader); menu.items[7].setDisabled(isNotHeader);
if (showPoint != undefined) { if (showPoint != undefined) {
@ -224,6 +233,10 @@ define([
this.panelNavigation.viewNavigationList.expandToLevel(item.value-1); this.panelNavigation.viewNavigationList.expandToLevel(item.value-1);
}, },
SetDisabled: function(state) {
this._isDisabled = state;
},
txtBeginning: 'Beginning of document', txtBeginning: 'Beginning of document',
txtGotoBeginning: 'Go to the beginning of the document' txtGotoBeginning: 'Go to the beginning of the document'

View file

@ -361,6 +361,7 @@ define([
DE.getController('Statusbar').getView('Statusbar').SetDisabled(disable); DE.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
DE.getController('Common.Controllers.ReviewChanges').SetDisabled(disable); DE.getController('Common.Controllers.ReviewChanges').SetDisabled(disable);
DE.getController('DocumentHolder').getView().SetDisabled(disable, true); DE.getController('DocumentHolder').getView().SetDisabled(disable, true);
DE.getController('Navigation') && DE.getController('Navigation').SetDisabled(disable);
var leftMenu = DE.getController('LeftMenu').leftMenu; var leftMenu = DE.getController('LeftMenu').leftMenu;
leftMenu.btnComments.setDisabled(disable); leftMenu.btnComments.setDisabled(disable);

View file

@ -405,6 +405,7 @@
"DE.Controllers.Main.txtSection": " -Section ", "DE.Controllers.Main.txtSection": " -Section ",
"DE.Controllers.Main.txtSeries": "Series", "DE.Controllers.Main.txtSeries": "Series",
"DE.Controllers.Main.txtStarsRibbons": "Stars & Ribbons", "DE.Controllers.Main.txtStarsRibbons": "Stars & Ribbons",
"DE.Controllers.Main.txtStyle_footnote_text": "Footnote Text",
"DE.Controllers.Main.txtStyle_Heading_1": "Heading 1", "DE.Controllers.Main.txtStyle_Heading_1": "Heading 1",
"DE.Controllers.Main.txtStyle_Heading_2": "Heading 2", "DE.Controllers.Main.txtStyle_Heading_2": "Heading 2",
"DE.Controllers.Main.txtStyle_Heading_3": "Heading 3", "DE.Controllers.Main.txtStyle_Heading_3": "Heading 3",

View file

@ -405,6 +405,7 @@
"DE.Controllers.Main.txtSection": "-Раздел", "DE.Controllers.Main.txtSection": "-Раздел",
"DE.Controllers.Main.txtSeries": "Ряд", "DE.Controllers.Main.txtSeries": "Ряд",
"DE.Controllers.Main.txtStarsRibbons": "Звезды и ленты", "DE.Controllers.Main.txtStarsRibbons": "Звезды и ленты",
"DE.Controllers.Main.txtStyle_footnote_text": "Текст сноски",
"DE.Controllers.Main.txtStyle_Heading_1": "Заголовок 1", "DE.Controllers.Main.txtStyle_Heading_1": "Заголовок 1",
"DE.Controllers.Main.txtStyle_Heading_2": "Заголовок 2", "DE.Controllers.Main.txtStyle_Heading_2": "Заголовок 2",
"DE.Controllers.Main.txtStyle_Heading_3": "Заголовок 3", "DE.Controllers.Main.txtStyle_Heading_3": "Заголовок 3",

View file

@ -102,13 +102,15 @@ define([
window["flat_desine"] = true; window["flat_desine"] = true;
var styleNames = ['Normal', 'No Spacing', 'Heading 1', 'Heading 2', 'Heading 3', 'Heading 4', 'Heading 5', var styleNames = ['Normal', 'No Spacing', 'Heading 1', 'Heading 2', 'Heading 3', 'Heading 4', 'Heading 5',
'Heading 6', 'Heading 7', 'Heading 8', 'Heading 9', 'Title', 'Subtitle', 'Quote', 'Intense Quote', 'List Paragraph'], 'Heading 6', 'Heading 7', 'Heading 8', 'Heading 9', 'Title', 'Subtitle', 'Quote', 'Intense Quote', 'List Paragraph', 'footnote text'],
translate = { translate = {
'Series': this.txtSeries, 'Series': this.txtSeries,
'Diagram Title': this.txtDiagramTitle, 'Diagram Title': this.txtDiagramTitle,
'X Axis': this.txtXAxis, 'X Axis': this.txtXAxis,
'Y Axis': this.txtYAxis, 'Y Axis': this.txtYAxis,
'Your text here': this.txtArt 'Your text here': this.txtArt,
'Header': this.txtHeader,
'Footer': this.txtFooter
}; };
styleNames.forEach(function(item){ styleNames.forEach(function(item){
translate[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item; translate[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item;
@ -1287,6 +1289,9 @@ define([
txtStyle_Quote: 'Quote', txtStyle_Quote: 'Quote',
txtStyle_Intense_Quote: 'Intense Quote', txtStyle_Intense_Quote: 'Intense Quote',
txtStyle_List_Paragraph: 'List Paragraph', txtStyle_List_Paragraph: 'List Paragraph',
txtStyle_footnote_text: 'Footnote Text',
txtHeader: "Header",
txtFooter: "Footer",
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.' 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.'
} }
})(), DE.Controllers.Main || {})) })(), DE.Controllers.Main || {}))

View file

@ -119,7 +119,10 @@
"DE.Controllers.Main.txtArt": "Your text here", "DE.Controllers.Main.txtArt": "Your text here",
"DE.Controllers.Main.txtDiagramTitle": "Chart Title", "DE.Controllers.Main.txtDiagramTitle": "Chart Title",
"DE.Controllers.Main.txtEditingMode": "Set editing mode...", "DE.Controllers.Main.txtEditingMode": "Set editing mode...",
"DE.Controllers.Main.txtFooter": "Footer",
"DE.Controllers.Main.txtHeader": "Header",
"DE.Controllers.Main.txtSeries": "Series", "DE.Controllers.Main.txtSeries": "Series",
"DE.Controllers.Main.txtStyle_footnote_text": "footnote text",
"DE.Controllers.Main.txtStyle_Heading_1": "Heading 1", "DE.Controllers.Main.txtStyle_Heading_1": "Heading 1",
"DE.Controllers.Main.txtStyle_Heading_2": "Heading 2", "DE.Controllers.Main.txtStyle_Heading_2": "Heading 2",
"DE.Controllers.Main.txtStyle_Heading_3": "Heading 3", "DE.Controllers.Main.txtStyle_Heading_3": "Heading 3",

View file

@ -138,6 +138,8 @@
"DE.Controllers.Main.txtStyle_Title": "Название", "DE.Controllers.Main.txtStyle_Title": "Название",
"DE.Controllers.Main.txtXAxis": "Ось X", "DE.Controllers.Main.txtXAxis": "Ось X",
"DE.Controllers.Main.txtYAxis": "Ось Y", "DE.Controllers.Main.txtYAxis": "Ось Y",
"DE.Controllers.Main.txtFooter": "Нижний колонтитул",
"DE.Controllers.Main.txtHeader": "Верхний колонтитул",
"DE.Controllers.Main.unknownErrorText": "Неизвестная ошибка.", "DE.Controllers.Main.unknownErrorText": "Неизвестная ошибка.",
"DE.Controllers.Main.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", "DE.Controllers.Main.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.",
"DE.Controllers.Main.uploadImageExtMessage": "Неизвестный формат изображения.", "DE.Controllers.Main.uploadImageExtMessage": "Неизвестный формат изображения.",

View file

@ -1616,7 +1616,7 @@ define([
listStyles.menuPicker.store.reset([]); // remove all listStyles.menuPicker.store.reset([]); // remove all
var mainController = this.getApplication().getController('Main'); var mainController = this.getApplication().getController('Main');
var merged_array = styles.asc_getDefaultStyles().concat(styles.asc_getDocStyles()); var merged_array = styles.asc_getDocStyles().concat(styles.asc_getDefaultStyles());
_.each(merged_array, function(style){ _.each(merged_array, function(style){
listStyles.menuPicker.store.add({ listStyles.menuPicker.store.add({
imageUrl: style.asc_getImage(), imageUrl: style.asc_getImage(),

View file

@ -112,7 +112,8 @@ define([
hidden: true, hidden: true,
autohide: false, autohide: false,
min: 300, min: 300,
max: 600 max: 600,
offset: 4
} }
}, { }, {
el: items[1], el: items[1],