diff --git a/apps/documenteditor/main/app/template/TableSettings.template b/apps/documenteditor/main/app/template/TableSettings.template
index d64726d969..e3858ed7d4 100644
--- a/apps/documenteditor/main/app/template/TableSettings.template
+++ b/apps/documenteditor/main/app/template/TableSettings.template
@@ -127,12 +127,7 @@
|
diff --git a/apps/documenteditor/main/app/view/TableSettings.js b/apps/documenteditor/main/app/view/TableSettings.js
index 40f2a4a77e..4125c01506 100644
--- a/apps/documenteditor/main/app/view/TableSettings.js
+++ b/apps/documenteditor/main/app/view/TableSettings.js
@@ -146,6 +146,15 @@ define([
this.fireEvent('editcomplete', this);
},
+ onCheckAutofitChange: function(field, newValue, oldValue, eOpts) {
+ if (this.api) {
+ var properties = new Asc.CTableProp();
+ properties.put_TableLayout((field.getValue()=='checked') ? Asc.c_oAscTableLayout.AutoFit : Asc.c_oAscTableLayout. Fixed);
+ this.api.tblApply(properties);
+ }
+ this.fireEvent('editcomplete', this);
+ },
+
onColorsBackSelect: function(btn, color) {
this.CellColor = {Value: 1, Color: color};
@@ -296,6 +305,16 @@ define([
});
this.lockedControls.push(this.chColBanded);
+ this.chAutofit = new Common.UI.CheckBox({
+ el: $('#table-checkbox-autofit'),
+ labelText: this.textAutofit,
+ dataHint: '1',
+ dataHintDirection: 'left',
+ dataHintOffset: 'small'
+ });
+ this.chAutofit.on('change', _.bind(this.onCheckAutofitChange, this));
+ this.lockedControls.push(this.chAutofit);
+
this.chHeader.on('change', _.bind(this.onCheckTemplateChange, this, 0));
this.chTotal.on('change', _.bind(this.onCheckTemplateChange, this, 1));
this.chBanded.on('change', _.bind(this.onCheckTemplateChange, this, 2));
@@ -471,7 +490,13 @@ define([
}, this));
this.btnAddFormula = new Common.UI.Button({
- el: $('#table-btn-add-formula')
+ parentEl: $('#table-btn-add-formula'),
+ cls: 'btn-toolbar align-left',
+ iconCls: 'toolbar__icon btn-function',
+ caption : this.textAddFormula,
+ dataHint: '1',
+ dataHintDirection: 'left',
+ dataHintOffset: 'medium'
});
this.lockedControls.push(this.btnAddFormula);
this.btnAddFormula.on('click', _.bind(this.onAddFormula, this));
@@ -615,6 +640,9 @@ define([
this._state.RepeatRow=value;
}
this.chRepeatRow.setDisabled(this._state.RepeatRow === null || this._locked);
+ var autoFit = props.get_TableLayout();
+ this.chAutofit.setDisabled(autoFit === undefined || this._locked);
+ this.chAutofit.setValue(autoFit===Asc.c_oAscTableLayout.AutoFit, true);
}
},
@@ -987,7 +1015,7 @@ define([
onEyedropperEnd: function () {
this.fireEvent('eyedropper', false);
- }
+ },
}, DE.Views.TableSettings || {}));
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index 5378490338..d10eeb9ac5 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -3481,6 +3481,7 @@
"DE.Views.TableSettings.txtTable_ListTable": "List table",
"DE.Views.TableSettings.txtTable_PlainTable": "Plain table",
"DE.Views.TableSettings.txtTable_TableGrid": "Table grid",
+ "DE.Views.TableSettings.textAutofit": "Automaticaly resize to fit content",
"DE.Views.TableSettingsAdvanced.textAlign": "Alignment",
"DE.Views.TableSettingsAdvanced.textAlignment": "Alignment",
"DE.Views.TableSettingsAdvanced.textAllowSpacing": "Spacing between cells",
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-function.png
new file mode 100644
index 0000000000..e53a8dd364
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.25x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-function.png
new file mode 100644
index 0000000000..94538b2eea
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.5x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-function.png
new file mode 100644
index 0000000000..6b1c862910
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1.75x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/1x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/1x/btn-function.png
new file mode 100644
index 0000000000..09676cf01d
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/1x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/2.5x/btn-function.svg b/apps/documenteditor/main/resources/img/toolbar/2.5x/btn-function.svg
new file mode 100644
index 0000000000..40e8c09df8
--- /dev/null
+++ b/apps/documenteditor/main/resources/img/toolbar/2.5x/btn-function.svg
@@ -0,0 +1,4 @@
+
diff --git a/apps/documenteditor/main/resources/img/toolbar/2x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/2x/btn-function.png
new file mode 100644
index 0000000000..5448e5a892
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/2x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/v2/1.25x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/v2/1.25x/btn-function.png
new file mode 100644
index 0000000000..4e2f806599
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/v2/1.25x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/v2/1.5x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/v2/1.5x/btn-function.png
new file mode 100644
index 0000000000..59f92a061c
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/v2/1.5x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/v2/1.75x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/v2/1.75x/btn-function.png
new file mode 100644
index 0000000000..8e466fbd9f
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/v2/1.75x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/v2/1x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/v2/1x/btn-function.png
new file mode 100644
index 0000000000..8758d5af42
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/v2/1x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/img/toolbar/v2/2.5x/btn-function.svg b/apps/documenteditor/main/resources/img/toolbar/v2/2.5x/btn-function.svg
new file mode 100644
index 0000000000..a566ea1cbf
--- /dev/null
+++ b/apps/documenteditor/main/resources/img/toolbar/v2/2.5x/btn-function.svg
@@ -0,0 +1,3 @@
+
diff --git a/apps/documenteditor/main/resources/img/toolbar/v2/2x/btn-function.png b/apps/documenteditor/main/resources/img/toolbar/v2/2x/btn-function.png
new file mode 100644
index 0000000000..ea010a86c3
Binary files /dev/null and b/apps/documenteditor/main/resources/img/toolbar/v2/2x/btn-function.png differ
diff --git a/apps/documenteditor/main/resources/less/rightmenu.less b/apps/documenteditor/main/resources/less/rightmenu.less
index 831022c9b5..793c08217b 100644
--- a/apps/documenteditor/main/resources/less/rightmenu.less
+++ b/apps/documenteditor/main/resources/less/rightmenu.less
@@ -62,7 +62,7 @@
display: inline-block;
}
- #table-btn-convert-to-text {
+ #table-btn-convert-to-text, #table-btn-add-formula {
.btn {
width: 100%;
}
|