Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ext.define('TUL.view.Unit' ,{
- extend: 'Ext.window.Window',
- alias: 'widget.unittul',
- title: 'All Users',
- title: '..::: Selamat Datang :::..',
- layout: 'fit',
- height: '55%',
- width: '35%',
- closable: true,
- autoShow: true,
- initComponent: function() {
- this.items = [
- {
- xtype: 'panel',
- title: 'Search the Ext Forums',
- width: 600,
- bodyPadding: 10,
- layout: 'anchor',
- items:[{
- xtype: 'combo',
- store : 'Unit',
- displayField: 'title',
- emptyText:'Cari Unit',
- minChars: 1,
- value :'',
- typeAhead: false,
- hideLabel: true,
- hideTrigger:true,
- anchor: '100%',
- name :'cari',
- listConfig: {
- loadingText: 'Searching...',
- emptyText: '<b>Unit</b> yang anda cari tidak ada.',
- // Custom rendering template for each item
- /*
- //Ini kenapa datanya gak ke load
- //padahal di response udah tampil*/
- getInnerTpl: function() {
- return '<div class="search-item">' +
- '<h3><span>{strkode_dealer}<br />by {strnama_dealer}</span>{strnama_dealer}</h3>' +
- '<h3>ID Unit : {intid_unit}</3><br>' +
- '<h4>Nama Unit : {strnama_unit}</h4></div>';
- }
- },
- pageSize: 10,
- // override default onSelect to do redirect
- listeners: {
- select: function(combo, selection) {
- var post = selection[0];
- alert(post.get('strnama_unit'));
- }
- }
- }]
- }
- ];
- this.buttons = [
- {
- text: 'Save',
- action: 'save'
- },
- {
- text: 'Cancel',
- scope: this,
- handler: this.close
- }
- ];
- this.callParent(arguments);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement