Results 1 to 4 of 4

Thread: how to add Addthis.com social buttons

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    139
    Vote Rating
    3
      0  

    Default how to add Addthis.com social buttons

    Hello

    I'm trying to create an ActionSheet with Addthis buttons to facebook, twitter, etc

    Here is my code:

    Code:
    Ext.define('MyApp.view.SocialMedia', {
        extend: 'Ext.ActionSheet', 
       xtype: 'socialmedia',
       onPainted: function(){
          addthis.toolbox('.addthis_but') ;
       },
        config: {
            layout: 'vbox',
            items: [
                {
                    html: '<a class="addthis_but addthis_button_tweet">Twitter</a>',
                    xtype: 'panel'
                },
                {
                    html: '<a class="addthis_but addthis_button_facebook">Facebook</a>',
                    xtype: 'panel'
                },
                {
                    html: '<a class="addthis_but addthis_button_linkedin">LinkedIn</a>',
                    xtype: 'panel'
                }
            ]
        }
    });
    The Addthis code I execute here in the onPainted event doesn't alter the original html, so I get the feeling 'onPainted' event is fired before the html is actually inser, so what event should I listen to ? Furthermore, where can I find a list of events fired by a component ?

    Thanks
    Luca

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

    Default

    The API docs are the most up to date list of events.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

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

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

    Default

    Ok, but where are the events documented. I cannot find a list of events or how to use them. For example, I see code which do addListerner, on() or onBefore, etc

    For example, with the panel, I would like to do the addthis.toolbox(..) call just before the panel is shown, but considering the panel api I cannot find anything about this!

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

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

Tags for this Thread

Posting Permissions

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