Advertisement
fahmihilmansyah

viewExt

May 8th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Ext.define('TUL.view.Unit' ,{
  2.     /*extend: 'Ext.grid.Panel',*/
  3.     extend: 'Ext.window.Window',
  4.  
  5.     alias: 'widget.unittul',
  6.  
  7.     title: 'All Users',
  8.     title: '..::: Selamat Datang  :::..',
  9.     layout: 'fit',
  10.     //bodyPadding: 10,
  11.     height: '55%',
  12.     width: '35%',
  13.     closable: true,
  14.     autoShow: true,
  15.     initComponent: function() {
  16.          this.items = [
  17.             {
  18.                
  19.                         xtype: 'panel',
  20.                         title: 'Search the Ext Forums',
  21.                         width: 600,
  22.                         bodyPadding: 10,
  23.                         layout: 'anchor',
  24.                         items:[{
  25.                             xtype:'textfield',
  26.                             id:'cobatext'
  27.                         },{
  28.                             xtype: 'combo',
  29.                             store: 'Unit',
  30.                             displayField: 'title',
  31.                             emptyText:'Cari Unit',
  32.                             minChars: 1,
  33.                             value :'',
  34.                             action:'cariUnit',
  35.                             id: 'comboUnit',
  36.                             valueField : 'strnama_dealer',
  37.                             typeAhead: false,
  38.                             hideLabel: true,
  39.                             hideTrigger:true,
  40.                             anchor: '100%',
  41.                             name :'cari',
  42.                             listConfig: {
  43.                                 loadingText: 'Mencari Data...',
  44.                                 emptyText: 'Data yang Anda Cari Tidak Ada.',
  45.  
  46.                                 // Custom rendering template for each item
  47.                                 getInnerTpl: function() {
  48.                                     return  '<div class="search-item">' +
  49.                                             '<h3><span>{strkode_dealer}<br />by {strnama_dealer}</span>{strnama_dealer}</h3>' +
  50.                                             '<h3>ID Unit : {intid_unit}</3><br>' +
  51.                                             '<h4>Nama Unit : {strnama_unit}</h4></div>';
  52.                                 }
  53.                             },
  54.                             pageSize: 10,
  55.                           }]
  56.             }
  57.         ];
  58.         this.buttons = [
  59.             {
  60.                 text: 'Save',
  61.        
  62.         this.callParent(arguments);
  63.     }
  64. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement