-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindow-example.html
executable file
·94 lines (73 loc) · 2.06 KB
/
window-example.html
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
87
88
89
90
91
92
93
94
<html>
<head>
<title>Ext.Element</title>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
<style>
body{
background-color:#aeaeae;
}
#container{
background-color:#ccc;
}
</style>
<script src="extjs/adapter/ext/ext-base.js"></script>
<script src="extjs/ext-all-debug.js"></script>
<script>
Ext.BLANK_IMAGE_URL = 'extjs/resources/images/default/s.gif';
Ext.onReady(function () {
var win;
var newWindow = function(btn) {
if (!win) {
win = new Ext.Window({
animateTarget: btn.el,
html: 'My first plain Window',
closeAction: 'hide',
id: 'myWin',
height: 200,
width: 300,
constrain: true
});
}
win.show();
};
new Ext.Button({
renderTo: Ext.getBody(),
text: "Open my Window",
style: 'margin:100px;',
handler: newWindow
});
// rigid modal window example
/*
var secondWindow = new Ext.Window({
height : 75,
width : 200,
modal : true, // masks the page
title : 'This is one rigid window',
html : 'Try to move or resize me. I dare you.', plain : true,
plain: true, // set content body bg transparent
border : false,
resizable : false,
draggable : false,
closable : false,
buttonAlign : 'center',
//resizable: true,
//minWidth: 500,
//minHeight: 500
buttons : [
{
text: 'I give up!',
handler: function() {
secondWindow.close();
}
}
]
});
secondWindow.show();
*/
});
</script>
</head>
<body>
<div id="container"></div>
</body>
</html>