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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>Toolbars</title>
    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>
 
    <!-- GC -->
 
    <script type="text/javascript" src="../../ext-all.js"></script>
 
    <style type="text/css" media="screen">
        .add {
            background-image: url(../shared/icons/fam/add.gif) !important;
        }
    </style>
</head>
<body>
    <script type="text/javascript" charset="utf-8">
        Ext.onReady(function() {
            var panel = Ext.create('Ext.window.Window', {
                renderTo: Ext.getBody(),
                autoShow: true,
                height: 300,
                width: 500,
                title: 'Users',
 
                tbar: [
                    {
                        xtype: 'splitbutton',
                        text: 'Add',
                        iconCls: 'add',
                        handler: function() {
                            alert('add button clicked');
                        },
                        menu: [
                            {
                                text: 'Customer'
                            },
                            {
                                text: 'Salesperson',
                                menu: [
                                    {
                                        text: 'Senior'
                                    },
                                    {
                                        text: 'Junior'
                                    }
                                ]
                            }
                        ]
                    },
                    '-',
                    {
                        iconCls: 'add'
                    },
                    '-',
                    {
                        text: 'Edit'
                    },
                    ' ',
                    {
                        text: 'Delete'
                    },
                    'Your Name',
                    {
                        xtype: 'textfield',
                        itemId: 'nameField'
                    },
                    {
                        text: 'Go',
                        handler: function() {
                            alert(panel.down('#nameField').getValue());
                        }
                    },
                    {text: 'Button 1'},
                    {text: 'Button 1'},
                    {text: 'Button 1'},
                    {text: 'Button 1'},
                    {text: 'Button 1'},
                    {text: 'Button 1'}
                ]
            });
        });
    </script>
</body>
</html>