Results 1 to 5 of 5

Thread: Ext.field.Select ?????????????????

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    3
    Vote Rating
    0
      0  

    Default Ext.field.Select ?????????????????

    Ext.field.Select ??????????????????????????????????????

    Ext.field.Select ?????getTabletPicker()??????????????List?itemTpl??????????????????????????????????????????????????????????
    ??????????????????????????

    ???????????

  2. #2
    Sencha User
    Join Date
    Mar 2010
    Posts
    34
    Vote Rating
    0
      0  

    Default

    ???????????Extjs?????????????????????????????????

    ??????????????????????????????????

  3. #3
    Sencha User
    Join Date
    Oct 2010
    Posts
    3
    Vote Rating
    0
      0  

    Default

    ???????

    ???????????
    ???????Sencha Touch 2.0.1.1?
    ??????Google Chrome

    ???????????????
    Code:
    Ext.define('MyApp.view.ImageSelect', {
        extend: 'Ext.field.Select',
        alias: 'widget.imageselect',
    
    
        config: {
            options: [
                {text: 'First Option',  value: 'first'},
                {text: 'Second Option', value: 'second'},
                {text: 'Third Option',  value: 'third'}
            ],
        },
    
    
        // @Override
        getTabletPicker: function() {
            var config = this.getDefaultTabletPickerConfig();
    
    
            if (!this.listPanel) {
                this.listPanel = Ext.create('Ext.Panel', Ext.apply({
                    centered: true,
                    modal: true,
                    cls: Ext.baseCSSPrefix + 'select-overlay',
                    layout: 'fit',
                    hideOnMaskTap: true,
                    items: {
                        xtype: 'list',
                        store: this.getStore(),
    
    
                        // ??1?????
    //                    itemTpl: '<span class="x-list-label">{' + this.getDisplayField() + ':htmlEncode}</span>',
                        itemTpl: '<div style="height=200; padding-left:100px; background:url([??????URL?????]) no-repeat 0 0;">{' + this.getDisplayField() + ':htmlEncode}</div>',
    
    
                        listeners: {
                            select : this.onListSelect,
                            itemtap: this.onListTap,
                            scope  : this
                        }
                    }
                }, config));
            }
    
    
            return this.listPanel;
        }
    });

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Posts
    34
    Vote Rating
    0
      0  

    Default

    ???????????????????

    ???????????????????????????????

    PHP Code:
    itemTpl'<div style="height=200; padding-left:100px; background:url([??????URL?????]) no-repeat 0 0;">{' this.getDisplayField() + ':htmlEncode}</div>'
    height=200; ? height:200;
    ???????


    sencha-touch-2.1.0-gpl\examples\list\app.js
    ???????????????(124????)

    ???
    PHP Code:
    itemTpl'<div class="contact2"><strong>{firstName}</strong> {lastName}</div>'
    ???
    PHP Code:
    itemTpl'<div class="contact2" style="height:300px"><strong>{firstName}</strong> {lastName}</div>'
    ?????????????????



    ????????????????????????????????????
    1????????????????????????

    PHP Code:
    sample = function(){
        var 
    imageFileName './images/aaa.jpg';
        
    // ????????????????
        
    var mapImg = new Image();
        
    mapImg.src imageFileName;
        
    // ??????????????????
        
    mapImg.onload = function() { call imageReadCallback(imageFileName,
                                                              
    mapImg.width,
                                                              
    mapImg.height);
                                   };
        
    // ????????????????
        
    mapImg.onerror = function() {
        };
        
    // ????????????Cancel???????
        
    mapImg.onabort = function() {
        };
    };
    imageReadCallback = function( fileNamewidthheight ){
        
    // width ? height ???????? ??????
        // ??? MyApp.view.ImageSelect ???????????????????
        // ?????????????
    }; 

    ???????????????????????????????????

    ??????????
    Last edited by shobuno; 29 Nov 2012 at 6:28 PM. Reason: ?????????????

  5. #5
    Sencha User
    Join Date
    Oct 2010
    Posts
    3
    Vote Rating
    0
      0  

    Default

    shobuno??


    ???????????
    ??????????????????


    ?????????????????????
    Code:
    Ext.define('MyApp.view.ImageSelect', {
     extend: 'Ext.field.Select',
     alias: 'widget.imageselect',
    
    
    
    
     config: {
       options: [
         {text: 'First Option', value: 'first'},
         {text: 'Second Option', value: 'second'},
         {text: 'Third Option', value: 'third'}
       ],
     },
    
    
    
    
     // @Override
     getTabletPicker: function() {
       var config = this.getDefaultTabletPickerConfig();
    
    
    
    
       if (!this.listPanel) {
         this.listPanel = Ext.create('Ext.Panel', Ext.apply({
           centered: true,
           modal: true,
    //        cls: Ext.baseCSSPrefix + 'select-overlay',
           height: 500,
           width: 400,
           layout: 'fit',
           hideOnMaskTap: true,
           items: {
             xtype: 'list',
             store: this.getStore(),
    
    
    
    
             // ??1?????
    //          itemTpl: '<span class="x-list-label">{' + this.getDisplayField() + ':htmlEncode}</span>',
             itemTpl: '<div style="height:100px; padding-left:100px; background:url([??????URL?????]) no-repeat 0 0;">{' + this.getDisplayField() + ':htmlEncode}</div>',
    
    
    
    
             listeners: {
               select : this.onListSelect,
               itemtap: this.onListTap,
               scope : this
             }
           }
         }, config));
       }
    
    
    
    
       return this.listPanel;
     }
    });

    ?????cls?????????????????????????????????????


    ????????????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •