13693261870
2022-09-16 354b3dbfbffb3df45212a2a44dbbf48b4acc2594
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Ext.define('Neptune.view.button.Buttons', {
    extend: 'Ext.container.Container',
    xtype: 'buttons',
    id: 'buttons',
 
    layout: {
        type: 'table',
        columns: 6,
        tdAttrs: { style: 'padding: 15px; text-align: center;' }
    },
 
    items: [],
 
    constructor: function() {
        this.createRows();
        this.callParent(arguments);
    },
 
    createRows: function() {
        var me = this;
 
        me.createRow({});
        me.createRow({ icon: true });
        me.createRow({ iconAlign: 'right', icon: true });
        me.createRow({ iconAlign: 'top', icon: true });
        me.createRow({ iconAlign: 'bottom', icon: true });
    },
 
    createRow: function(cfg) {
        this.items.push(
            Ext.apply({ xtype: 'smallButton' }, cfg),
            Ext.apply({ xtype: 'mediumButton' }, cfg),
            Ext.apply({ xtype: 'largeButton' }, cfg),
            Ext.apply({ xtype: 'smallButton', disabled: true }, cfg),
            Ext.apply({ xtype: 'mediumButton', disabled: true }, cfg),
            Ext.apply({ xtype: 'largeButton', disabled: true }, cfg)
        );
    }
});