Results 1 to 5 of 5

Thread: [4.1.0 b2] Button html config not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    101
    Vote Rating
    1
      0  

    Default [4.1.0 b2] Button html config not working

    How to reproduce:

    This no longer works (html config option does not appy)
    Code:
    Ext.create('Ext.Button', {
     scale   : 'large',
    cls        : 'mash_button',
      html    : '<div class="menu-button"><img class="icon" src="images/icons/icon.png" ><div class="content"><div class="title">Button</div><span class="text">Some text here</span></div></div>'
                                                     });
    And this will work ( but height for html contents is not calculated properly):

    Code:
    Ext.create('Ext.Button', {    
     scale   : 'large',
    cls        : 'mash_button',
    text  : '<div  class="menu-button"><img class="icon" src="images/icons/icon.png"  ><div class="content"><div  class="title">Button</div><span class="text">Some text  here</span></div></div>'
                                                     });
    Is this intended behavior? Documentation states html config should be supported and working.

    Thank you

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,413
    Vote Rating
    1267
      0  

    Default

    The text config is the supported config. The html config will likely not have much affect.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    101
    Vote Rating
    1
      0  

    Default

    Well, this is what the docs say for 4.1.0 b2:

    html : String/ObjectAn HTML fragment, or a DomHelper specification to use as the layout element content. The HTML content is added after the component is rendered, so the document will not contain this HTML at the time the render event is fired. This content is inserted into the body before any configured contentEl is appended.
    Defaults to: ""

    So I am assuming html is supported config param?

    It used to work in 4.0.X series, so I think it should work in 4.1.x

    Thanks

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,413
    Vote Rating
    1267
      0  

    Default

    It's inherited by it's superclass Ext.Component
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha Premium Member
    Join Date
    Sep 2009
    Posts
    101
    Vote Rating
    1
      0  

    Default

    Ok, so this option is no longer supported?

Posting Permissions

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