Commit 42517720 authored by Alexander Yuzhin's avatar Alexander Yuzhin

Merge branch 'develop' of https://github.com/ONLYOFFICE/web-apps into develop

parents c18bff61 497b5313
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
info: 'Some info', info: 'Some info',
logo: '' logo: ''
}, },
about: false, about: true,
feedback: { feedback: {
visible: false, visible: false,
url: http://... url: http://...
...@@ -521,7 +521,8 @@ ...@@ -521,7 +521,8 @@
var data = { var data = {
type: evt.type, type: evt.type,
x: evt.x - r.left, x: evt.x - r.left,
y: evt.y - r.top y: evt.y - r.top,
event: evt
}; };
_sendCommand({ _sendCommand({
...@@ -568,7 +569,7 @@ ...@@ -568,7 +569,7 @@
lang: 'en', lang: 'en',
canCoAuthoring: true, canCoAuthoring: true,
customization: { customization: {
about: false, about: true,
feedback: false feedback: false
} }
} }
......
...@@ -1479,8 +1479,12 @@ define([ ...@@ -1479,8 +1479,12 @@ define([
hidePreloader: function() { hidePreloader: function() {
if (!this._state.customizationDone) { if (!this._state.customizationDone) {
this._state.customizationDone = true; this._state.customizationDone = true;
if (this.appOptions.customization && !this.appOptions.isDesktopApp) if (this.appOptions.customization) {
this.appOptions.customization.about = true; if (this.appOptions.isDesktopApp)
this.appOptions.customization.about = false;
else if (!this.appOptions.canBrandingExt)
this.appOptions.customization.about = true;
}
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
if (this.appOptions.canBrandingExt) { if (this.appOptions.canBrandingExt) {
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements);
......
...@@ -1232,8 +1232,12 @@ define([ ...@@ -1232,8 +1232,12 @@ define([
hidePreloader: function() { hidePreloader: function() {
if (!this._state.customizationDone) { if (!this._state.customizationDone) {
this._state.customizationDone = true; this._state.customizationDone = true;
if (this.appOptions.customization && !this.appOptions.isDesktopApp) if (this.appOptions.customization) {
this.appOptions.customization.about = true; if (this.appOptions.isDesktopApp)
this.appOptions.customization.about = false;
else if (!this.appOptions.canBrandingExt)
this.appOptions.customization.about = true;
}
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
if (this.appOptions.canBrandingExt) { if (this.appOptions.canBrandingExt) {
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements);
......
...@@ -695,12 +695,15 @@ define([ ...@@ -695,12 +695,15 @@ define([
(new SSE.Views.ChartSettingsDlg( (new SSE.Views.ChartSettingsDlg(
{ {
chartSettings: props, chartSettings: props,
imageSettings: item.chartInfo,
isChart: true, isChart: true,
api: me.api, api: me.api,
handler: function(result, value) { handler: function(result, value) {
if (result == 'ok') { if (result == 'ok') {
if (me.api) { if (me.api) {
me.api.asc_editChartDrawingObject(value.chartSettings); me.api.asc_editChartDrawingObject(value.chartSettings);
if (value.imageSettings)
me.api.asc_setGraphicObjectProps(value.imageSettings);
} }
} }
Common.NotificationCenter.trigger('edit:complete', me); Common.NotificationCenter.trigger('edit:complete', me);
...@@ -1205,6 +1208,7 @@ define([ ...@@ -1205,6 +1208,7 @@ define([
isshapemenu = true; isshapemenu = true;
} }
} else if ( elValue.asc_getChartProperties() ) { } else if ( elValue.asc_getChartProperties() ) {
documentHolder.mnuChartEdit.chartInfo = elValue;
ischartmenu = true; ischartmenu = true;
has_chartprops = true; has_chartprops = true;
} }
......
...@@ -363,7 +363,7 @@ define([ ...@@ -363,7 +363,7 @@ define([
var editor = document.getElementById('editor_sdk'); var editor = document.getElementById('editor_sdk');
if (editor) { if (editor) {
var rect = editor.getBoundingClientRect(); var rect = editor.getBoundingClientRect();
var event = window.event || arguments.callee.caller.arguments[0]; var event = data.event || {};
this.api.asc_onMouseUp(event, data.x - rect.left, data.y - rect.top); this.api.asc_onMouseUp(event, data.x - rect.left, data.y - rect.top);
} }
} }
...@@ -1370,8 +1370,12 @@ define([ ...@@ -1370,8 +1370,12 @@ define([
hidePreloader: function() { hidePreloader: function() {
if (!this._state.customizationDone) { if (!this._state.customizationDone) {
this._state.customizationDone = true; this._state.customizationDone = true;
if (this.appOptions.customization && !this.appOptions.isDesktopApp) if (this.appOptions.customization) {
this.appOptions.customization.about = true; if (this.appOptions.isDesktopApp)
this.appOptions.customization.about = false;
else if (!this.appOptions.canBrandingExt)
this.appOptions.customization.about = true;
}
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements);
if (this.appOptions.canBrandingExt) { if (this.appOptions.canBrandingExt) {
Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements);
......
...@@ -750,18 +750,30 @@ define([ ...@@ -750,18 +750,30 @@ define([
var win, props; var win, props;
if (me.api){ if (me.api){
props = me.api.asc_getChartObject(); props = me.api.asc_getChartObject();
var selectedObjects = me.api.asc_getGraphicObjectProps(),
imageSettings = null;
for (var i = 0; i < selectedObjects.length; i++) {
if (selectedObjects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image) {
var elValue = selectedObjects[i].asc_getObjectValue();
if ( elValue.asc_getChartProperties() )
imageSettings = elValue;
}
}
if (props) { if (props) {
var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText); var ischartedit = ( me.toolbar.mode.isEditDiagram || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart || info.asc_getFlags().asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChartText);
(new SSE.Views.ChartSettingsDlg( (new SSE.Views.ChartSettingsDlg(
{ {
chartSettings: props, chartSettings: props,
imageSettings: imageSettings,
isChart: true, isChart: true,
api: me.api, api: me.api,
handler: function(result, value) { handler: function(result, value) {
if (result == 'ok') { if (result == 'ok') {
if (me.api) { if (me.api) {
(ischartedit) ? me.api.asc_editChartDrawingObject(value.chartSettings) : me.api.asc_addChartDrawingObject(value.chartSettings); (ischartedit) ? me.api.asc_editChartDrawingObject(value.chartSettings) : me.api.asc_addChartDrawingObject(value.chartSettings);
if (value.imageSettings)
me.api.asc_setGraphicObjectProps(value.imageSettings);
} }
} }
Common.NotificationCenter.trigger('edit:complete', me.toolbar); Common.NotificationCenter.trigger('edit:complete', me.toolbar);
......
...@@ -151,8 +151,7 @@ define([ ...@@ -151,8 +151,7 @@ define([
var color = _fontInfo.asc_getColor(), var color = _fontInfo.asc_getColor(),
clr = me._sdkToThemeColor(color); clr = me._sdkToThemeColor(color);
$('#text-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr)); $('#font-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr));
// Align // Align
$('#edit-text-align-block').css('display', (_textIn == TextType.inShape) ? 'block' : 'none'); $('#edit-text-align-block').css('display', (_textIn == TextType.inShape) ? 'block' : 'none');
...@@ -279,7 +278,7 @@ define([ ...@@ -279,7 +278,7 @@ define([
onTextColor:function (palette, color) { onTextColor:function (palette, color) {
this.api.asc_setCellTextColor(Common.Utils.ThemeColor.getRgbColor(color)); this.api.asc_setCellTextColor(Common.Utils.ThemeColor.getRgbColor(color));
$('#text-color .color-preview').css('background-color', '#' + (_.isObject(color) ? color.color : color)); $('#font-color .color-preview').css('background-color', '#' + (_.isObject(color) ? color.color : color));
}, },
onHAlignChange: function (e) { onHAlignChange: function (e) {
......
...@@ -461,7 +461,7 @@ ...@@ -461,7 +461,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="content-block-title"><%= scope.textTickOptions %>Tick Options</div> <div class="content-block-title"><%= scope.textTickOptions %></div>
<div class="list-block"> <div class="list-block">
<ul> <ul>
<li> <li>
...@@ -480,7 +480,7 @@ ...@@ -480,7 +480,7 @@
<select name="vertical-axis-tick-minor"></select> <select name="vertical-axis-tick-minor"></select>
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title"><%= scope.textMajorType %></div> <div class="item-title"><%= scope.textMinorType %></div>
<div class="item-after"><%= scope.textNone %></div> <div class="item-after"><%= scope.textNone %></div>
</div> </div>
</div> </div>
...@@ -596,7 +596,7 @@ ...@@ -596,7 +596,7 @@
<select name="horizontal-axis-tick-minor"></select> <select name="horizontal-axis-tick-minor"></select>
<div class="item-content"> <div class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title"><%= scope.textMajorType %></div> <div class="item-title"><%= scope.textMinorType %></div>
<div class="item-after"><%= scope.textNone %></div> <div class="item-after"><%= scope.textNone %></div>
</div> </div>
</div> </div>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
</li> </li>
<li> <li>
<a id="text-color" class="item-link" data-page="#edit-text-color"> <a id="font-color" class="item-link" data-page="#edit-text-color">
<div class="item-content"> <div class="item-content">
<% if (!android) { %><div class="item-media" style="padding-top: 0;"><i class="icon icon-text-color"><span class="color-preview"></span></i></div><% } %> <% if (!android) { %><div class="item-media" style="padding-top: 0;"><i class="icon icon-text-color"><span class="color-preview"></span></i></div><% } %>
<div class="item-inner"> <div class="item-inner">
......
...@@ -259,6 +259,7 @@ define([ ...@@ -259,6 +259,7 @@ define([
textValReverseOrder: 'Values in Reverse Order', textValReverseOrder: 'Values in Reverse Order',
textTickOptions: 'Tick Options', textTickOptions: 'Tick Options',
textMajorType: 'Major Type', textMajorType: 'Major Type',
textMinorType: 'Minor Type',
textLabelOptions: 'Label Options', textLabelOptions: 'Label Options',
textLabelPos: 'Label Position', textLabelPos: 'Label Position',
textAxisPosition: 'Axis Position', textAxisPosition: 'Axis Position',
......
...@@ -326,6 +326,7 @@ ...@@ -326,6 +326,7 @@
"SSE.Views.EditChart.textMajorType": "Major Type", "SSE.Views.EditChart.textMajorType": "Major Type",
"SSE.Views.EditChart.textMaxValue": "Maximum Value", "SSE.Views.EditChart.textMaxValue": "Maximum Value",
"SSE.Views.EditChart.textMinor": "Minor", "SSE.Views.EditChart.textMinor": "Minor",
"SSE.Views.EditChart.textMinorType": "Minor Type",
"SSE.Views.EditChart.textMinValue": "Minimum Value", "SSE.Views.EditChart.textMinValue": "Minimum Value",
"SSE.Views.EditChart.textNone": "None", "SSE.Views.EditChart.textNone": "None",
"SSE.Views.EditChart.textNoOverlay": "No Overlay", "SSE.Views.EditChart.textNoOverlay": "No Overlay",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment