Commit c4959ce721dd6815441152fcbe93d9ed3a052661

Authored by Nathanael Jourdane
1 parent ebd733ce

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,7 +191,6 @@ Ext.define('amdaUI.IntervalUI', {
191 enforceMaxLength: true, 191 enforceMaxLength: true,
192 maxLength: 19, 192 maxLength: 19,
193 fieldLabel: fieldText, 193 fieldLabel: fieldText,
194 - labelAlign: 'right',  
195 labelWidth: 60, 194 labelWidth: 60,
196 listeners: { 195 listeners: {
197 change: onChangeField, 196 change: onChangeField,
@@ -219,9 +218,11 @@ Ext.define('amdaUI.IntervalUI', { @@ -219,9 +218,11 @@ Ext.define('amdaUI.IntervalUI', {
219 { 218 {
220 return { 219 return {
221 layout: {type: 'hbox', align: 'middle'}, 220 layout: {type: 'hbox', align: 'middle'},
222 - height: 45, 221 + margin: 0,
223 defaults: { 222 defaults: {
224 - xtype: 'textfield', labelAlign: 'top', width: 30, 223 + xtype: 'textfield',
  224 + width: 35,
  225 + margin: '0 5 0 0',
225 allowBlank: false, maxLength:2, enforceMaxLength : true, 226 allowBlank: false, maxLength:2, enforceMaxLength : true,
226 hideTrigger: true, 227 hideTrigger: true,
227 regex: /^[0-9]([0-9])*$/i, 228 regex: /^[0-9]([0-9])*$/i,
@@ -235,19 +236,21 @@ Ext.define('amdaUI.IntervalUI', { @@ -235,19 +236,21 @@ Ext.define('amdaUI.IntervalUI', {
235 focus: function(field) { 236 focus: function(field) {
236 this.activeField = 'duration'; 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 scope : this 245 scope : this
239 } 246 }
240 }, 247 },
241 items:[ 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(&#39;amdaUI.IntervalUI&#39;, { @@ -262,7 +265,7 @@ Ext.define(&#39;amdaUI.IntervalUI&#39;, {
262 plain: true, 265 plain: true,
263 flex: 1, 266 flex: 1,
264 layout: 'anchor', 267 layout: 'anchor',
265 - defaults: { height : 30, xtype : 'container'}, 268 + defaults: { margin: '0 0 5 0', xtype : 'container'},
266 269
267 items: [ 270 items: [
268 me.getStartField(), 271 me.getStartField(),