Hybrid View

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    6
    Vote Rating
    0
    dmachado is on a distinguished road

      0  

    Default Very HTML in Sencha Touch

    Good day.
    I'm using Sencha Touch to create an app for iPhone to graduate school.
    The application is intended to be an adaptation of a book for iPad. The paper book has about 1500 pages and who uses only text.
    My question is how much I insert text in the HTML Sencha Touch? What is the correct way and easier for me to do?
    thank you very much
    Delfim Machado

  2. #2
    Sencha - Senior Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,200
    Vote Rating
    1043
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    You can simply use the html config on a component/container
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    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 User
    Join Date
    Nov 2011
    Posts
    6
    Vote Rating
    0
    dmachado is on a distinguished road

      0  

    Default did not understand

    sorry, did not understand. I'm new on this subject.
    I saw that you can do something like this:
    title: 'Mid'
    styleHtmlContent: true,
    xtype: 'form',
    scroll: 'vertical'
    html: "The public prayer and <b> Community </ b> of the people of God is with reason regarded as one of the main functions of the Church. Hence, at the very beginning, the baptized <devoted themselves to the teaching of the Apostles, the fraternal union the breaking of bread and prayers> (Act 2, 42). from the unanimous prayer of the Christian community in the repeated testimonies dao Acts of the Apostles. "
    dockedItems: [{
    xtype: 'toolbar'
    dock: 'top',
    items: [{
    xtype: 'Searchfield'
    placeholder: 'Search'
    name: 'Searchfield'
    }]
    }


    It turns out that I need to use too much text. How should I do?
    What is the best solution.
    thank you very much
    Delfim Machado

  4. #4
    Sencha - Senior Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,200
    Vote Rating
    1043
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    I'm not sure what the issue is when you say "It turns out that I need to use too much text".
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    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 User
    Join Date
    Nov 2011
    Posts
    6
    Vote Rating
    0
    dmachado is on a distinguished road

      0  

    Default the book

    the book has almost 1500 pages. I tried pasting the text there and did not result. Maybe because they can not have paragraphs?
    Is there a way to use PDF? clicking the menu open a PDF?
    In any event preferred to use the HTML. Is this the only way to use?
    thank you very much

  6. #6
    Sencha - Senior Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    38,200
    Vote Rating
    1043
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default

    PDF will not work on all mobile devices. Not sure what ST version so here is a little sample in ST2:

    Code:
    new Ext.carousel.Carousel({
        fullscreen : true,
        defualts   : {
            scrollable : 'vertical'
        },
        items      : [
            {
                html : '<p>Paragraph one</p><br><p>Paragraph two</p>'
            },
            {
                html : '<p>Paragraph one</p><br><p>Paragraph two</p>'
            }
        ]
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Software Engineer
    ________________
    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.

  7. #7
    Sencha User
    Join Date
    Feb 2012
    Posts
    1
    Vote Rating
    0
    joselin7410 is on a distinguished road

      0  

    Default

    I also in the process of learning HTML,it's a interesting thing

  8. #8
    Sencha User
    Join Date
    Nov 2011
    Posts
    6
    Vote Rating
    0
    dmachado is on a distinguished road

      0  

    Default an example

    Can you give me an example of Ajax.Request page is loading and then setHtml ()

  9. #9
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
    vladimirmaslov is on a distinguished road

      0  

    Default Html page loading example

    in my view file
    ......
    {
    title: 'Характеристики',
    //html : 'Описание',
    xtype: 'panel',
    //htmlurl: 'pages/ford3/ford3.html',
    listeners: {show: function(obj,opt){ htmlPageShow('pages/ford3/ford3.html',obj,opt);}},
    scrollable: {direction: 'vertical'},
    },
    .....

    in app.js

    .....
    function htmlPageShow(url,obj,opt)
    {
    //debugger
    Ext.Ajax.request(
    {
    url: url,
    //params: { id: 1},
    scope: obj,
    async: false,
    success: function(response)
    {
    var text = response.responseText;
    this.setHtml(text);

    },
    failure: function(response, opts)
    {
    alert('Ошибка загрузки: '+opts.url);
    //debugger
    //console.log('server-side failure with status code ' + response.status);
    }
    });
    //alert(obj.getHtml());
    }
    .....

    That' all folks!

    I don't use inheritance because it's don't worked on Android.

  10. #10
    Sencha User
    Join Date
    Nov 2011
    Posts
    6
    Vote Rating
    0
    dmachado is on a distinguished road

      0  

    Default no view html

    I am able to show the alert, but show me the contents of the HTML page.
    You can look at the page I am trying to modify: http://app.liturgia.pt/menu11/examples/kitchensink/
    User Interface -> Forms -> HTML_teste
    What am I doing wrong?