В список единиц измерения добавлены дюймы.
This commit is contained in:
parent
fa729d39e7
commit
de6b5dc3e3
|
@ -58,7 +58,7 @@
|
|||
*
|
||||
*
|
||||
* @property {String} defaultUnit
|
||||
* Name of the unit of measurement. Can be px|em|%|en|ex|pt|in|cm|mm|pc|s|ms.
|
||||
* Name of the unit of measurement. Can be px|em|%|en|ex|pt|"|cm|mm|pc|s|ms.
|
||||
*
|
||||
* defaultUnit: 'px',
|
||||
*
|
||||
|
@ -262,7 +262,7 @@ define([
|
|||
var units = this.options.defaultUnit;
|
||||
|
||||
if ( typeof value.match !== 'undefined'){
|
||||
var searchUnits = value.match(/(px|em|%|en|ex|pt|in|cm|mm|pc|s|ms)$/i);
|
||||
var searchUnits = value.match(/(px|em|%|en|ex|pt|"|cm|mm|pc|s|ms)$/i);
|
||||
if (null !== searchUnits && searchUnits[0]!=='undefined') {
|
||||
units = searchUnits[0].toLowerCase();
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ define([
|
|||
return v_out;
|
||||
}
|
||||
|
||||
if ( fromUnit.match(/(pt|in|cm|mm|pc)$/i)===null || this.options.defaultUnit.match(/(pt|in|cm|mm|pc)$/i)===null)
|
||||
if ( fromUnit.match(/(pt|"|cm|mm|pc)$/i)===null || this.options.defaultUnit.match(/(pt|"|cm|mm|pc)$/i)===null)
|
||||
return value;
|
||||
|
||||
var v_out = value;
|
||||
|
@ -502,7 +502,7 @@ define([
|
|||
v_out = v_out*10;
|
||||
else if (fromUnit=='pt')
|
||||
v_out = v_out * 25.4 / 72.0;
|
||||
else if (fromUnit=='in')
|
||||
else if (fromUnit=='\"')
|
||||
v_out = v_out * 25.4;
|
||||
else if (fromUnit=='pc')
|
||||
v_out = v_out * 25.4 / 6.0;
|
||||
|
@ -512,8 +512,8 @@ define([
|
|||
v_out = v_out/10.;
|
||||
else if (this.options.defaultUnit=='pt')
|
||||
v_out = parseFloat((v_out * 72.0 / 25.4).toFixed(3));
|
||||
else if (this.options.defaultUnit=='in')
|
||||
v_out = v_out / 25.4;
|
||||
else if (this.options.defaultUnit=='\"')
|
||||
v_out = parseFloat((v_out / 25.4).toFixed(3));
|
||||
else if (this.options.defaultUnit=='pc')
|
||||
v_out = v_out * 6.0 / 25.4;
|
||||
|
||||
|
|
|
@ -254,10 +254,11 @@ Common.Utils.Metric = new(function() {
|
|||
|
||||
me.c_MetricUnits = {
|
||||
cm: 0,
|
||||
pt: 1
|
||||
pt: 1,
|
||||
inch: 2
|
||||
};
|
||||
me.currentMetric = me.c_MetricUnits.pt;
|
||||
me.metricName = ['cm', 'pt'];
|
||||
me.metricName = ['cm', 'pt', '\"'];
|
||||
|
||||
return {
|
||||
c_MetricUnits: me.c_MetricUnits,
|
||||
|
@ -272,25 +273,29 @@ Common.Utils.Metric = new(function() {
|
|||
},
|
||||
|
||||
fnRecalcToMM: function(value) {
|
||||
// value in pt/cm. need to convert to mm
|
||||
// value in pt/cm/inch. need to convert to mm
|
||||
if (value!==null && value!==undefined) {
|
||||
switch (me.currentMetric) {
|
||||
case me.c_MetricUnits.cm:
|
||||
return value * 10;
|
||||
case me.c_MetricUnits.pt:
|
||||
return value * 25.4 / 72.0;
|
||||
case me.c_MetricUnits.inch:
|
||||
return value * 25.4;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
||||
fnRecalcFromMM: function(value) {
|
||||
// value in mm. need to convert to pt/cm
|
||||
// value in mm. need to convert to pt/cm/inch
|
||||
switch (me.currentMetric) {
|
||||
case me.c_MetricUnits.cm:
|
||||
return parseFloat((value/10.).toFixed(4));
|
||||
case me.c_MetricUnits.pt:
|
||||
return parseFloat((value * 72.0 / 25.4).toFixed(3));
|
||||
case me.c_MetricUnits.inch:
|
||||
return parseFloat((value / 25.4).toFixed(3));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
|
|
@ -852,7 +852,7 @@ define([
|
|||
me.spnY
|
||||
], function(spinner) {
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -275,7 +275,8 @@ define([
|
|||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm },
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt }
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt },
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['inch'], displayValue: this.txtInch }
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -430,7 +431,8 @@ define([
|
|||
strFast: 'Fast',
|
||||
strStrict: 'Strict',
|
||||
textAutoRecover: 'Autorecover',
|
||||
strAutoRecover: 'Turn on autorecover'
|
||||
strAutoRecover: 'Turn on autorecover',
|
||||
txtInch: 'Inch'
|
||||
}, DE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -235,7 +235,7 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1249,7 +1249,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
}
|
||||
}
|
||||
this.sizeMax = {
|
||||
|
|
|
@ -214,7 +214,7 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -408,12 +408,12 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
}
|
||||
}
|
||||
this._arrLineRule[2].defaultUnit = this._arrLineRule[0].defaultUnit = Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()];
|
||||
this._arrLineRule[2].minValue = this._arrLineRule[0].minValue = parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2));
|
||||
this._arrLineRule[2].step = this._arrLineRule[0].step = (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm) ? 0.01: 1;
|
||||
this._arrLineRule[2].step = this._arrLineRule[0].step = (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt) ? 1 : 0.01;
|
||||
if (this._state.LineRuleIdx !== null) {
|
||||
this.numLineHeight.setDefaultUnit(this._arrLineRule[this._state.LineRuleIdx].defaultUnit);
|
||||
this.numLineHeight.setStep(this._arrLineRule[this._state.LineRuleIdx].step);
|
||||
|
|
|
@ -721,9 +721,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
|||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
if (spinner.el.id == 'paragraphadv-spin-spacing' || spinner.el.id == 'paragraphadv-spin-position' )
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
else
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -170,6 +170,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
this._changedProps.put_Width(this.cmbUnit.getValue() ? -field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()));
|
||||
}, this));
|
||||
|
||||
var currmetric = Common.Utils.Metric.getCurrentMetric();
|
||||
this.cmbUnit = new Common.UI.ComboBox({
|
||||
el : $('#tableadv-cmb-unit'),
|
||||
style : 'width: 85px;',
|
||||
|
@ -177,7 +178,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: 0, displayValue: (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm },
|
||||
{ value: 0, displayValue: (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm) },
|
||||
{ value: 1, displayValue: this.txtPercent }
|
||||
]
|
||||
});
|
||||
|
@ -470,7 +471,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: 0, displayValue: (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm },
|
||||
{ value: 0, displayValue: (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm) },
|
||||
{ value: 1, displayValue: this.txtPercent }
|
||||
]
|
||||
});
|
||||
|
@ -1164,11 +1165,12 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
if (props ){
|
||||
this._allTable = !props.get_CellSelect();
|
||||
|
||||
var value;
|
||||
// main props
|
||||
var TableWidth = props.get_Width();
|
||||
var value,
|
||||
TableWidth = props.get_Width(),
|
||||
currmetric = Common.Utils.Metric.getCurrentMetric();
|
||||
|
||||
this.cmbUnit.store.at(0).set('displayValue', (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm);
|
||||
// main props
|
||||
this.cmbUnit.store.at(0).set('displayValue', (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm));
|
||||
this.cmbUnit.setValue(TableWidth<0 ? 1 : 0);
|
||||
this.nfWidth.setDefaultUnit(TableWidth<0 ? '%' : Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
if (TableWidth<0) //%
|
||||
|
@ -1232,7 +1234,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
// Cell Size
|
||||
var cellWidth = props.get_CellsWidth();
|
||||
|
||||
this.cmbPrefWidthUnit.store.at(0).set('displayValue', (Common.Utils.Metric.getCurrentMetric() == Common.Utils.Metric.c_MetricUnits['pt']) ? this.txtPt : this.txtCm);
|
||||
this.cmbPrefWidthUnit.store.at(0).set('displayValue', (currmetric == Common.Utils.Metric.c_MetricUnits.pt) ? this.txtPt : ((currmetric == Common.Utils.Metric.c_MetricUnits.inch) ? this.txtInch : this.txtCm));
|
||||
this.cmbPrefWidthUnit.setValue(cellWidth<0 ? 1 : 0);
|
||||
this.nfPrefWidth.setDefaultUnit(cellWidth<0 ? '%' : Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
if (cellWidth<0) //%
|
||||
|
@ -2070,7 +2072,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
this.pageWidth = Common.Utils.Metric.fnRecalcFromMM(this.pageWidth);
|
||||
|
@ -2160,6 +2162,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
txtPercent: 'Percent',
|
||||
txtCm: 'Centimeter',
|
||||
txtPt: 'Point',
|
||||
txtInch: 'Inch',
|
||||
textCellSize: 'Cell Size',
|
||||
textPrefWidth: 'Preferred width',
|
||||
textMeasure: 'Measure in',
|
||||
|
|
|
@ -915,6 +915,7 @@
|
|||
"DE.Views.FileMenuPanels.Settings.txtPt": "Point",
|
||||
"DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Spell Checking",
|
||||
"DE.Views.FileMenuPanels.Settings.txtWin": "as Windows",
|
||||
"DE.Views.FileMenuPanels.Settings.txtInch": "Inch",
|
||||
"DE.Views.HeaderFooterSettings.textBottomCenter": "Bottom Center",
|
||||
"DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom Left",
|
||||
"DE.Views.HeaderFooterSettings.textBottomRight": "Bottom Right",
|
||||
|
@ -1359,6 +1360,7 @@
|
|||
"DE.Views.TableSettingsAdvanced.txtNoBorders": "No borders",
|
||||
"DE.Views.TableSettingsAdvanced.txtPercent": "Percent",
|
||||
"DE.Views.TableSettingsAdvanced.txtPt": "Point",
|
||||
"DE.Views.TableSettingsAdvanced.txtInch": "Inch",
|
||||
"DE.Views.TableSettingsAdvanced.textCellSize": "Cell Size",
|
||||
"DE.Views.TableSettingsAdvanced.textPrefWidth": "Preferred width",
|
||||
"DE.Views.TableSettingsAdvanced.textMeasure": "Measure in",
|
||||
|
|
|
@ -915,6 +915,7 @@
|
|||
"DE.Views.FileMenuPanels.Settings.txtPt": "Пункт",
|
||||
"DE.Views.FileMenuPanels.Settings.txtSpellCheck": "Проверка орфографии",
|
||||
"DE.Views.FileMenuPanels.Settings.txtWin": "как Windows",
|
||||
"DE.Views.FileMenuPanels.Settings.txtInch": "Дюйм",
|
||||
"DE.Views.HeaderFooterSettings.textBottomCenter": "Снизу по центру",
|
||||
"DE.Views.HeaderFooterSettings.textBottomLeft": "Снизу слева",
|
||||
"DE.Views.HeaderFooterSettings.textBottomRight": "Снизу справа",
|
||||
|
@ -1359,6 +1360,7 @@
|
|||
"DE.Views.TableSettingsAdvanced.txtNoBorders": "Без границ",
|
||||
"DE.Views.TableSettingsAdvanced.txtPercent": "Процент",
|
||||
"DE.Views.TableSettingsAdvanced.txtPt": "Пункт",
|
||||
"DE.Views.TableSettingsAdvanced.txtInch": "Дюйм",
|
||||
"DE.Views.TextArtSettings.strColor": "Цвет",
|
||||
"DE.Views.TextArtSettings.strFill": "Заливка",
|
||||
"DE.Views.TextArtSettings.strSize": "Толщина",
|
||||
|
|
|
@ -320,7 +320,7 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -222,7 +222,8 @@ define([
|
|||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm },
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt }
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt },
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['inch'], displayValue: this.txtInch }
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -335,7 +336,8 @@ define([
|
|||
strFast: 'Fast',
|
||||
strStrict: 'Strict',
|
||||
textAutoRecover: 'Autorecover',
|
||||
strAutoRecover: 'Turn on autorecover'
|
||||
strAutoRecover: 'Turn on autorecover',
|
||||
txtInch: 'Inch'
|
||||
}, PE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -234,7 +234,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
this.sizeMax = {
|
||||
|
|
|
@ -294,13 +294,13 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
}
|
||||
}
|
||||
var rec = this.cmbLineRule.store.at(1);
|
||||
rec.set({defaultUnit: Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()],
|
||||
minValue: parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2)),
|
||||
step: (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm) ? 0.01: 1});
|
||||
step: (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt) ? 1 : 0.01});
|
||||
|
||||
if (this._state.LineRule !== null) {
|
||||
var obj;
|
||||
|
|
|
@ -359,9 +359,9 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced
|
|||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
if (spinner.el.id == 'paragraphadv-spin-spacing')
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
else
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
}
|
||||
}
|
||||
this.sizeMax = {
|
||||
|
|
|
@ -202,7 +202,7 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -371,6 +371,7 @@
|
|||
"PE.Views.FileMenuPanels.Settings.txtInput": "Alternate Input",
|
||||
"PE.Views.FileMenuPanels.Settings.txtLast": "View Last",
|
||||
"PE.Views.FileMenuPanels.Settings.txtPt": "Point",
|
||||
"PE.Views.FileMenuPanels.Settings.txtInch": "Inch",
|
||||
"PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Cancel",
|
||||
"PE.Views.HyperlinkSettingsDialog.okButtonText": "OK",
|
||||
"PE.Views.HyperlinkSettingsDialog.strDisplay": "Display",
|
||||
|
|
|
@ -371,6 +371,7 @@
|
|||
"PE.Views.FileMenuPanels.Settings.txtInput": "Альтернативный ввод",
|
||||
"PE.Views.FileMenuPanels.Settings.txtLast": "Последние",
|
||||
"PE.Views.FileMenuPanels.Settings.txtPt": "Пункт",
|
||||
"PE.Views.FileMenuPanels.Settings.txtInch": "Дюйм",
|
||||
"PE.Views.HyperlinkSettingsDialog.cancelButtonText": "Отмена",
|
||||
"PE.Views.HyperlinkSettingsDialog.okButtonText": "OK",
|
||||
"PE.Views.HyperlinkSettingsDialog.strDisplay": "Отображать",
|
||||
|
|
|
@ -322,7 +322,7 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -380,7 +380,7 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -557,7 +557,8 @@ define([
|
|||
cls : 'input-group-nr',
|
||||
data : [
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['cm'], displayValue: this.txtCm },
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt }
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['pt'], displayValue: this.txtPt },
|
||||
{ value: Common.Utils.Metric.c_MetricUnits['inch'], displayValue: this.txtInch }
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -755,7 +756,8 @@ define([
|
|||
strFast: 'Fast',
|
||||
strStrict: 'Strict',
|
||||
textAutoRecover: 'Autorecover',
|
||||
strAutoRecover: 'Turn on autorecover'
|
||||
strAutoRecover: 'Turn on autorecover',
|
||||
txtInch: 'Inch'
|
||||
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));
|
||||
|
||||
SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -169,7 +169,7 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -299,13 +299,13 @@ define([
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
}
|
||||
}
|
||||
var rec = this.cmbLineRule.store.at(1);
|
||||
rec.set({defaultUnit: Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()],
|
||||
minValue: parseFloat(Common.Utils.Metric.fnRecalcFromMM(0.3).toFixed(2)),
|
||||
step: (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm) ? 0.01: 1});
|
||||
step: (Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt) ? 1 : 0.01});
|
||||
|
||||
if (this._state.LineRule !== null) {
|
||||
var obj;
|
||||
|
|
|
@ -358,9 +358,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.
|
|||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
if (spinner.el.id == 'paragraphadv-spin-spacing' || spinner.el.id == 'paragraphadv-spin-position' )
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
else
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.1 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -555,7 +555,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
|
|||
for (var i=0; i<this.spinners.length; i++) {
|
||||
var spinner = this.spinners[i];
|
||||
spinner.setDefaultUnit(Common.Utils.Metric.metricName[Common.Utils.Metric.getCurrentMetric()]);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.cm ? 0.01 : 1);
|
||||
spinner.setStep(Common.Utils.Metric.getCurrentMetric()==Common.Utils.Metric.c_MetricUnits.pt ? 1 : 0.01);
|
||||
}
|
||||
}
|
||||
this.sizeMax = {
|
||||
|
|
|
@ -495,6 +495,7 @@
|
|||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtMac": "as OS X",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtNative": "Native",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Point",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInch": "Inch",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Russian",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "as Windows",
|
||||
"SSE.Views.FileMenuPanels.Settings.strAutoRecover": "Turn on autorecover",
|
||||
|
|
|
@ -497,6 +497,7 @@
|
|||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtPt": "Пункт",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtRu": "Русский",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtWin": "как Windows",
|
||||
"SSE.Views.FileMenuPanels.Settings.txtInch": "Дюйм",
|
||||
"SSE.Views.FileMenuPanels.Settings.strAutoRecover": "Включить автовосстановление",
|
||||
"SSE.Views.FileMenuPanels.Settings.textAutoRecover": "Автовосстановление",
|
||||
"SSE.Views.FileMenuPanels.Settings.txtGeneral": "Общие",
|
||||
|
|
Loading…
Reference in a new issue