Commit c4959ce721dd6815441152fcbe93d9ed3a052661
1 parent
ebd733ce
Exists in
master
and in
112 other branches
Reduce IntervalUI height
Showing
1 changed file
with
16 additions
and
13 deletions
Show diff stats
js/app/views/IntervalUI.js
... | ... | @@ -191,7 +191,6 @@ Ext.define('amdaUI.IntervalUI', { |
191 | 191 | enforceMaxLength: true, |
192 | 192 | maxLength: 19, |
193 | 193 | fieldLabel: fieldText, |
194 | - labelAlign: 'right', | |
195 | 194 | labelWidth: 60, |
196 | 195 | listeners: { |
197 | 196 | change: onChangeField, |
... | ... | @@ -219,9 +218,11 @@ Ext.define('amdaUI.IntervalUI', { |
219 | 218 | { |
220 | 219 | return { |
221 | 220 | layout: {type: 'hbox', align: 'middle'}, |
222 | - height: 45, | |
221 | + margin: 0, | |
223 | 222 | defaults: { |
224 | - xtype: 'textfield', labelAlign: 'top', width: 30, | |
223 | + xtype: 'textfield', | |
224 | + width: 35, | |
225 | + margin: '0 5 0 0', | |
225 | 226 | allowBlank: false, maxLength:2, enforceMaxLength : true, |
226 | 227 | hideTrigger: true, |
227 | 228 | regex: /^[0-9]([0-9])*$/i, |
... | ... | @@ -235,19 +236,21 @@ Ext.define('amdaUI.IntervalUI', { |
235 | 236 | focus: function(field) { |
236 | 237 | this.activeField = 'duration'; |
237 | 238 | }, |
239 | + render: function(c) { | |
240 | + Ext.create('Ext.tip.ToolTip', { | |
241 | + target: c.getEl(), | |
242 | + html: c.tip | |
243 | + }); | |
244 | + }, | |
238 | 245 | scope : this |
239 | 246 | } |
240 | 247 | }, |
241 | 248 | items:[ |
242 | - { xtype: 'displayfield', labelWidth: 60, labelAlign: 'right', width: 60, fieldLabel: '<br>Duration'}, | |
243 | - { xtype: 'component', width: 5}, | |
244 | - { name: 'durationDay', fieldLabel: 'Days', width: 45, maxLength: ('' + this.durationLimit).length}, | |
245 | - { xtype: 'component', width: 5}, | |
246 | - { name: 'durationHour', fieldLabel: 'Hrs'}, | |
247 | - { xtype: 'component', width: 5}, | |
248 | - { name: 'durationMin', fieldLabel: 'Mins'}, | |
249 | - { xtype: 'component', width: 5}, | |
250 | - { name: 'durationSec', fieldLabel: 'Secs'} | |
249 | + // { xtype: 'displayfield', labelWidth: 60, labelAlign: 'right', }, | |
250 | + { name: 'durationDay', tip: 'Days', fieldLabel: 'Duration', labelWidth: 60, emptyText: 'Days', width: 100, maxLength: ('' + this.durationLimit).length}, | |
251 | + { name: 'durationHour', tip: 'Hours', emptyText: 'Hrs'}, | |
252 | + { name: 'durationMin', tip: 'Minutes', emptyText: 'Mins'}, | |
253 | + { name: 'durationSec', tip: 'Seconds', emptyText: 'Secs'} | |
251 | 254 | ] |
252 | 255 | }; |
253 | 256 | }, |
... | ... | @@ -262,7 +265,7 @@ Ext.define('amdaUI.IntervalUI', { |
262 | 265 | plain: true, |
263 | 266 | flex: 1, |
264 | 267 | layout: 'anchor', |
265 | - defaults: { height : 30, xtype : 'container'}, | |
268 | + defaults: { margin: '0 0 5 0', xtype : 'container'}, | |
266 | 269 | |
267 | 270 | items: [ |
268 | 271 | me.getStartField(), |
... | ... |