1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    1
    Vote Rating
    0
    billsaysthis is on a distinguished road

      0  

    Default Unanswered: ST2 and HTML

    Unanswered: ST2 and HTML


    I've just started researching ST2, have installed the SDK and worked through the first couple of tutorials but one thing is confusing me. Is there a way to have normal HTML files with either CSS class names (as in, say, Twitter Bootstrap) or data elements to specify a particular DOM element as an ST2 component?

    All I see so far is that strings or XTemplates are specified as properties in view/component classes. I'm having trouble seeing how this would work well with our visual designers, who typically hand off HTML and CSS; if my understanding is correct I'd need to convert all their HTML into JS properties with no roundtrips possible.

  2. #2
    Sencha User
    Join Date
    Apr 2010
    Location
    China
    Posts
    227
    Answers
    64
    Vote Rating
    20
    haduki will become famous soon enough haduki will become famous soon enough

      0  

    Default


    You can write your static html/css code in your index.html
    <div id='myContent' style='display:none' class='myComponent'>
    ......
    </div>

    then use 'contentEl' config property for your component.

    {
    xtype:'panel',
    contentEl:'myContent'
    //other config
    }

Thread Participants: 1

Tags for this Thread