Commit c504df71ffaa023448993d9c0b431cd0b64507e4
1 parent
13f28b15
Exists in
master
and in
100 other branches
#6954 allegment interface
Showing
2 changed files
with
19 additions
and
20 deletions
Show diff stats
js/app/views/PlotComponents/PlotBaseAxisForm.js
... | ... | @@ -15,7 +15,8 @@ Ext.define('amdaPlotComp.PlotBaseAxisForm', { |
15 | 15 | showColorOption : true, |
16 | 16 | showRangeOptions : true, |
17 | 17 | showTickGridOptions : true, |
18 | - showTicksNumberSpacing : true, | |
18 | + showTicksNumber: false, | |
19 | + showTicksSpacing:false, | |
19 | 20 | |
20 | 21 | getFormItems: function() { |
21 | 22 | var me = this; |
... | ... | @@ -31,37 +32,35 @@ Ext.define('amdaPlotComp.PlotBaseAxisForm', { |
31 | 32 | this.addStandardFont('axis-legend-font') |
32 | 33 | ]; |
33 | 34 | var manageTicksNumber = function (name, newValue, oldValue){ |
34 | - me.getForm( ).findField('axis-grid-minor-number').setDisabled( !newValue); | |
35 | - me.getForm( ).findField('axis-grid-major-number').setDisabled( !newValue); | |
36 | - if( newValue){ | |
37 | - me.getForm( ).findField('axis-grid-minor-space').setDisabled(newValue); | |
38 | - me.getForm( ).findField('axis-grid-major-space').setDisabled(newValue); | |
39 | - me.getForm( ).findField('axis-grid-specify-ticks-spacing').setValue(!newValue); | |
35 | + | |
36 | + me.getForm( ).findField('axis-grid-minor-number').setVisible( newValue); | |
37 | + me.getForm( ).findField('axis-grid-major-number').setVisible( newValue); | |
38 | + if(newValue){ | |
39 | + me.getForm( ).findField('axis-grid-specify-ticks-spacing').setValue(!newValue); | |
40 | 40 | } |
41 | + | |
41 | 42 | }; |
42 | 43 | var manageTicksSpacing = function (name, newValue, oldValue){ |
43 | - me.getForm( ).findField('axis-grid-minor-space').setDisabled( !newValue ); | |
44 | - me.getForm( ).findField('axis-grid-major-space').setDisabled( !newValue ); | |
45 | - if( newValue ){ | |
46 | - me.getForm( ).findField('axis-grid-minor-number').setDisabled(newValue); | |
47 | - me.getForm( ).findField('axis-grid-major-number').setDisabled(newValue); | |
48 | - me.getForm( ).findField('axis-grid-specify-ticks-number').setValue(!newValue); | |
44 | + me.getForm( ).findField('axis-grid-minor-space').setVisible( newValue ); | |
45 | + me.getForm( ).findField('axis-grid-major-space').setVisible( newValue ); | |
46 | + if(newValue){ | |
47 | + me.getForm( ).findField('axis-grid-specify-ticks-number').setValue(!newValue); | |
49 | 48 | } |
50 | 49 | }; |
50 | + | |
51 | 51 | var tickGridItems = [ |
52 | 52 | this.addStandardCombo('axis-tick-position', 'Ticks position', amdaPlotObj.PlotObjectConfig.availableTicksPositions), |
53 | 53 | this.addStandardCheck('axis-tick-showmarks', 'Show tick marks'), |
54 | 54 | this.addStandardCheck('axis-grid-major', 'Show major grid'), |
55 | 55 | this.addStandardCheck('axis-grid-minor', 'Show minor grid')]; |
56 | - if (this.showTicksNumberSpacing){ | |
57 | 56 | tickGridItems.push(this.addStandardCheck('axis-grid-specify-ticks-number', 'Specify ticks number', manageTicksNumber)); |
58 | 57 | tickGridItems.push(this.addStandardInteger('axis-grid-major-number', 'Nb of Major Ticks', 1, Number.MAX_VALUE,true,true)); |
59 | 58 | tickGridItems.push(this.addStandardInteger('axis-grid-minor-number', 'Nb of Minor Ticks', 1, Number.MAX_VALUE,true,true)); |
60 | 59 | tickGridItems.push(this.addStandardCheck('axis-grid-specify-ticks-spacing', 'Specify ticks spacing',manageTicksSpacing)); |
61 | 60 | tickGridItems.push(this.addStandardFloat2('axis-grid-major-space', ' Major Ticks Space', 0, Number.MAX_VALUE,true,true)); |
62 | 61 | tickGridItems.push(this.addStandardFloat2('axis-grid-minor-space', ' Minor Ticks Space', 0, Number.MAX_VALUE,true,true)); |
63 | - }; | |
64 | - | |
62 | + | |
63 | + | |
65 | 64 | var axisItems = []; |
66 | 65 | if (this.showScaleOption) |
67 | 66 | axisItems.push(this.addStandardCombo('axis-scale', 'Scale', amdaPlotObj.PlotObjectConfig.availableAxisScales)); |
... | ... |
js/app/views/PlotComponents/PlotStandardForm.js
... | ... | @@ -83,7 +83,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
83 | 83 | } |
84 | 84 | }; |
85 | 85 | }, |
86 | - addStandardInteger: function(name, label, min, max, allowBlank, disabled,onChange) { | |
86 | + addStandardInteger: function(name, label, min, max, allowBlank, hidden,onChange) { | |
87 | 87 | allowBlank = (typeof allowBlank !== 'undefined') ? allowBlank : false; |
88 | 88 | |
89 | 89 | return { |
... | ... | @@ -91,7 +91,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
91 | 91 | xtype: 'numberfield', |
92 | 92 | name: name, |
93 | 93 | fieldLabel: label, |
94 | - disabled:(disabled)? true:false, | |
94 | + hidden : (hidden)? true:false, | |
95 | 95 | regex:/^\d+$/, |
96 | 96 | decimalPrecision : 20, |
97 | 97 | minValue : min, |
... | ... | @@ -108,7 +108,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
108 | 108 | }; |
109 | 109 | }, |
110 | 110 | |
111 | - addStandardFloat2: function(name, label, min, max, allowBlank, disabled, onChange) { | |
111 | + addStandardFloat2: function(name, label, min, max, allowBlank, hidden, onChange) { | |
112 | 112 | allowBlank = (typeof allowBlank !== 'undefined') ? allowBlank : false; |
113 | 113 | |
114 | 114 | return { |
... | ... | @@ -117,7 +117,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
117 | 117 | name: name, |
118 | 118 | fieldLabel: label, |
119 | 119 | regex : /[-+]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][-+]?\d+)?/, |
120 | - disabled:(disabled)? true:false, | |
120 | + hidden : (hidden)? true:false, | |
121 | 121 | validator: function (val) { |
122 | 122 | var errMsg = null; |
123 | 123 | if (!allowBlank && Ext.isEmpty(val)) { |
... | ... |