lovcombo_wev8.js
2.59 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// vim: ts=4:sw=4:nu:fdc=4:nospell
/**
* Ext.ux.form.RowActions Plugin Example Application
*
* @author Ing. Jozef Sakáloš
* @date 22. March 2008
* @version $Id: lovcombo_wev8.js 152 2009-06-23 20:10:42Z jozo $
*
* @license lovcombo_wev8.js is licensed under the terms of
* the Open Source LGPL 3.0 license. Commercial use is permitted to the extent
* that the code/component(s) do NOT become part of another Open Source or Commercially
* licensed development library or toolkit without explicit permission.
*
* License details: http://www.gnu.org/licenses/lgpl.html
*/
/*global Ext, WebPage, Example, console, window */
Ext.BLANK_IMAGE_URL = '../resources/images/default/s_wev8.gif';
Ext.ns('Example');
Example.version = '1.0';
Ext.override(Ext.ux.form.LovCombo, {
beforeBlur: Ext.emptyFn
});
// application entry point
Ext.onReady(function() {
Ext.QuickTips.init();
var adsenseHost =
'lovcombo.localhost' === window.location.host
|| 'lovcombo.extjs.eu' === window.location.host
;
var page = new WebPage({
version:Example.version
,westContent:'west-content'
,centerContent:'center-content'
,adRowContent:adsenseHost ? 'adrow-content' : undefined
});
var ads = Ext.getBody().select('div.adsense');
if(adsenseHost) {
ads.removeClass('x-hidden');
}
else {
ads.remove();
}
var lc = new Ext.ux.form.LovCombo({
id:'lovcombo'
,renderTo:'lovcomboct'
,width:300
,hideOnSelect:false
,maxHeight:200
,store:[
[1, 'Personnel []']
,[11, 'Finance (33)']
,[5, 'Door']
,[6, 'Door Panel']
,[2, 'Management !77']
,[38, 'Hello<br>There']
,[25, 'Production']
,[3, 'Users']
,[20, 'Window']
,[21, 'Window Panel']
,[22, 'Form Panel']
,[23, 'Grid Panel']
,[24, 'Data View Panel']
]
// ,store:new Ext.data.SimpleStore({
// id:0
// ,fields:[{name:'id',type:'int'}, 'privGroup']
// ,data:[
// [1, 'Personnel']
// ,[11, 'Finance']
// ,[2, 'Management']
// ,[22, 'Production']
// ,[3, 'Users']
// ]
// })
,triggerAction:'all'
// ,valueField:'id'
// ,displayField:'privGroup'
,mode:'local'
});
var tf = new Ext.form.TextField({
renderTo:'textct'
,id:'tf'
,width:300
,selectOnFocus:false
,listeners:{
focus:function() {this.setValue(lc.getValue());}
}
});
// window with grid
// var win = new Ext.Window({
// width:600
// ,id:'agwin'
// ,height:400
// ,layout:'fit'
// ,border:false
// ,plain:true
// ,closable:false
// ,title:Ext.get('page-title').dom.innerHTML
// ,items:{xtype:'examplegrid',id:'actiongrid'}
// });
// win.show();
});
// eof