Commit 37313fb5 authored by Julia Radzhabova's avatar Julia Radzhabova

[SSE] Bug 32196.

parent 675ef1fb
......@@ -162,8 +162,8 @@ define([
view.menuAddHyperlink.on('click', _.bind(me.onInsHyperlink, me));
view.menuEditHyperlink.on('click', _.bind(me.onInsHyperlink, me));
view.menuRemoveHyperlink.on('click', _.bind(me.onDelHyperlink, me));
view.pmiRowHeight.on('click', _.bind(me.onSetSize, me));
view.pmiColumnWidth.on('click', _.bind(me.onSetSize, me));
view.pmiRowHeight.menu.on('item:click', _.bind(me.onSetSize, me));
view.pmiColumnWidth.menu.on('item:click', _.bind(me.onSetSize, me));
view.pmiEntireHide.on('click', _.bind(me.onEntireHide, me));
view.pmiEntireShow.on('click', _.bind(me.onEntireShow, me));
view.pmiFreezePanes.on('click', _.bind(me.onFreezePanes, me));
......@@ -479,24 +479,29 @@ define([
}
},
onSetSize: function(item) {
var me = this;
(new SSE.Views.SetValueDialog({
title: item.caption,
startvalue: item.options.action == 'row-height' ? me.api.asc_getRowHeight() : me.api.asc_getColumnWidth(),
maxvalue: item.options.action == 'row-height' ? Asc.c_oAscMaxRowHeight : Asc.c_oAscMaxColumnWidth,
step: item.options.action == 'row-height' ? 0.75 : 1,
defaultUnit: item.options.action == 'row-height' ? Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt) : me.textSym,
handler: function(dlg, result) {
if (result == 'ok') {
var val = dlg.getSettings();
if (!isNaN(val))
(item.options.action == 'row-height') ? me.api.asc_setRowHeight(val) : me.api.asc_setColumnWidth(val);
}
onSetSize: function(menu, item) {
if (item.value == 'row-height' || item.value == 'column-width') {
var me = this;
(new SSE.Views.SetValueDialog({
title: item.caption,
startvalue: item.value == 'row-height' ? me.api.asc_getRowHeight() : me.api.asc_getColumnWidth(),
maxvalue: item.value == 'row-height' ? Asc.c_oAscMaxRowHeight : Asc.c_oAscMaxColumnWidth,
step: item.value == 'row-height' ? 0.75 : 1,
defaultUnit: item.value == 'row-height' ? Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt) : me.textSym,
handler: function(dlg, result) {
if (result == 'ok') {
var val = dlg.getSettings();
if (!isNaN(val))
(item.value == 'row-height') ? me.api.asc_setRowHeight(val) : me.api.asc_setColumnWidth(val);
}
Common.NotificationCenter.trigger('edit:complete', me.documentHolder);
}
})).show();
Common.NotificationCenter.trigger('edit:complete', me.documentHolder);
}
})).show();
} else {
(item.value == 'auto-row-height') ? this.api.asc_autoFitRowHeight() : this.api.asc_autoFitColumnWidth();
Common.NotificationCenter.trigger('edit:complete', this.documentHolder);
}
},
onEntireHide: function(item) {
......@@ -1532,7 +1537,6 @@ define([
guestText : 'Guest',
textCtrlClick : 'Press CTRL and click link',
txtRowHeight : 'Row Height',
txtHeight : 'Height',
txtWidth : 'Width',
tipIsLocked : 'This element is being edited by another user.',
......
......@@ -299,12 +299,24 @@ define([
me.pmiRowHeight = new Common.UI.MenuItem({
caption : me.txtRowHeight,
action: 'row-height'
menu : new Common.UI.Menu({
menuAlign: 'tl-tr',
items : [
{ caption: me.txtAutoRowHeight, value: 'auto-row-height' },
{ caption: me.txtCustomRowHeight, value: 'row-height' }
]
})
});
me.pmiColumnWidth = new Common.UI.MenuItem({
caption : me.txtColumnWidth,
action: 'column-width'
menu : new Common.UI.Menu({
menuAlign: 'tl-tr',
items : [
{ caption: me.txtAutoColumnWidth, value: 'auto-column-width' },
{ caption: me.txtCustomColumnWidth, value: 'column-width' }
]
})
});
me.pmiEntireHide = new Common.UI.MenuItem({
......@@ -621,8 +633,8 @@ define([
txtShiftDown: 'Shift cells down',
txtRow: 'Entire Row',
txtColumn: 'Entire Column',
txtColumnWidth: 'Column Width',
txtRowHeight: 'Row Height',
txtColumnWidth: 'Set Column Width',
txtRowHeight: 'Set Row Height',
txtWidth: 'Width',
txtHide: 'Hide',
txtShow: 'Show',
......@@ -670,6 +682,11 @@ define([
txtFilterFontColor: 'Filter by font color',
txtReapply: 'Reapply',
txtSortCellColor: 'Selected Cell Color on top',
txtSortFontColor: 'Selected Font Color on top'
txtSortFontColor: 'Selected Font Color on top',
txtAutoColumnWidth: 'Auto Fit Column Width',
txtAutoRowHeight: 'Auto Fit Row Height',
txtCustomColumnWidth: 'Custom Column Width',
txtCustomRowHeight: 'Custom Row Height'
}, SSE.Views.DocumentHolder || {}));
});
\ No newline at end of file
......@@ -465,7 +465,7 @@
"SSE.Views.DocumentHolder.txtClearHyper": "Hyperlinks",
"SSE.Views.DocumentHolder.txtClearText": "Text",
"SSE.Views.DocumentHolder.txtColumn": "Entire column",
"SSE.Views.DocumentHolder.txtColumnWidth": "Column Width",
"SSE.Views.DocumentHolder.txtColumnWidth": "Set Column Width",
"SSE.Views.DocumentHolder.txtCopy": "Copy",
"SSE.Views.DocumentHolder.txtCut": "Cut",
"SSE.Views.DocumentHolder.txtDelete": "Delete",
......@@ -483,7 +483,7 @@
"SSE.Views.DocumentHolder.txtPaste": "Paste",
"SSE.Views.DocumentHolder.txtReapply": "Reapply",
"SSE.Views.DocumentHolder.txtRow": "Entire row",
"SSE.Views.DocumentHolder.txtRowHeight": "Row Height",
"SSE.Views.DocumentHolder.txtRowHeight": "Set Row Height",
"SSE.Views.DocumentHolder.txtSelect": "Select",
"SSE.Views.DocumentHolder.txtShiftDown": "Shift cells down",
"SSE.Views.DocumentHolder.txtShiftLeft": "Shift cells left",
......@@ -497,6 +497,10 @@
"SSE.Views.DocumentHolder.txtUngroup": "Ungroup",
"SSE.Views.DocumentHolder.txtWidth": "Width",
"SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
"SSE.Views.DocumentHolder.txtAutoColumnWidth": "Auto Fit Column Width",
"SSE.Views.DocumentHolder.txtAutoRowHeight": "Auto Fit Row Height",
"SSE.Views.DocumentHolder.txtCustomColumnWidth": "Custom Column Width",
"SSE.Views.DocumentHolder.txtCustomRowHeight": "Custom Row Height",
"SSE.Views.FileMenu.btnBackCaption": "Go to Documents",
"SSE.Views.FileMenu.btnCreateNewCaption": "Create New",
"SSE.Views.FileMenu.btnDownloadCaption": "Download as...",
......
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