<div>Hi.<br></div><div><br></div><div>Today I began to wrap button plugin of Twitter Bootstrap, so code look less ugly:</div><div><br></div><div>Example:<br><br>html tbButton beSuccess;<br>   id: &#39;buttonid&#39;;<br>          dataLoadingText: &#39;Sending...&#39;;<br>
          dataCompleteText: &#39;Sent&#39;;<br>          onClick:<br>                     (html jQuery this tbButton loading),<br>                     (html jQuery ajax <br>                                 serializeForm;<br>                                 callback: [ (Delay forSeconds: 3) wait. ];<br>                                 onComplete: ((html jQuery id: &#39;buttonid&#39;) tbButton complete));<br>
           with: &#39;Send&#39;.<br><br>or with arbitrary text states:<br><br>html tbButton beSuccess;<br>    id: &#39;buttonid&#39;;<br>           dataLoadingText: &#39;Sending...&#39;;<br>           data: &#39;ok&#39; text: &#39;Sent&#39;;<br>
           data: &#39;bad&#39; text: &#39;No sent&#39;;<br>           onClick:<br>                      (html jQuery this tbButton loading),<br>                      (html jQuery ajax <br>                                  serializeForm;<br>                                  callback: [ (Delay forSeconds: 3) wait. ];<br>
                                  onSuccess: ((html jQuery id: &#39;buttonid&#39;) tbButton state: &#39;ok&#39;);<br>                                  onError: ((html jQuery id: &#39;buttonid&#39;) tbButton state: &#39;bad&#39;));<br>           with: &#39;Send&#39;.<br>
</div><div><br></div><div><br></div><div>And I create an project <a href="http://smalltalkhub.com/#!/~GastonDallOglio/TBootstrap">http://smalltalkhub.com/#!/~GastonDallOglio/TBootstrap</a></div><div>I know that already there an project about TwitterBootstrap in ss3 but there is some differences with mine, I go to see asap for  possibilities of merge both projects. </div>
<div><br></div><div>Regards.</div><div><br></div><br><div class="gmail_quote">2013/1/22 Gastón Dall&#39; Oglio <span dir="ltr">&lt;<a href="mailto:gaston.dalloglio@gmail.com" target="_blank">gaston.dalloglio@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi.<br></div><div><div><br></div><div>I use similar code to render a login button:</div><div><br></div><div>renderLoginButton: html<br>
        <br>        html tbButton beSuccess;<br>           dataLoadingText: Please wait...&#39;;<br>           onClick:<br>
                       (html jQuery this call: &#39;button&#39; with: &#39;loading&#39;),<br>                       (html jQuery ajax <br>                                   serializeForm;<br>                                   callback: [ self login ];<br>                                   onComplete: html javascript refresh);<br>

            with: &#39;Login&#39;<br></div><div><br></div><div>I&#39;m using TwitterBootstrap, and I&#39;ve done some classes and methods wrapping it. I attached those packages ().</div><div>And see here: <a href="http://twitter.github.com/bootstrap/javascript.html#buttons" target="_blank">http://twitter.github.com/bootstrap/javascript.html#buttons</a></div>

<div><br></div><div>Regards.</div><div><br></div><div>PS: Why I use anchor instead of submit? that&#39;s another story :)</div><div><br></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote">2013/1/22 Paul DeBruicker <span dir="ltr">&lt;<a href="mailto:pdebruic@gmail.com" target="_blank">pdebruic@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 01/22/2013 08:30 AM, jtuchel wrote:<br>
&gt; s submitButton<br>
&gt;   onClick:  (<br>
&gt;                               s jQuery ajax<br>
&gt;                                       onBeforeSend: (((s jQuery class: &#39;submit&#39;)  hide));<br>
&gt;                                       callback: [self doSomething];<br>
&gt;                                       onComplete: ((s jQuery class: &#39;submit&#39;)  show));<br>
&gt;   with: &#39;Click here&#39;.<br>
<br>
<br>
</div>I&#39;d do it like this:<br>
<br>
s submitButton<br>
  onClick: (s jQuery class: &#39;submit&#39;)  hide) ,  (<br>
                                s jQuery ajax<br>
<div>                                        callback: [self doSomething];<br>
                                        onComplete: ((s jQuery class: &#39;submit&#39;)  show));<br>
  with: &#39;Click here&#39;.<br>
<br>
</div>So when clicked the button is hidden then the ajax callback is called<br>
and when the ajaz callback completes the button is shown.<br>
<div><div><br>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>