<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: 'buttonid';<br>          dataLoadingText: 'Sending...';<br>
         dataCompleteText: 'Sent';<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: 'buttonid') tbButton complete));<br>
         with: 'Send'.<br><br>or with arbitrary text states:<br><br>html tbButton beSuccess;<br> id: 'buttonid';<br>          dataLoadingText: 'Sending...';<br>          data: 'ok' text: 'Sent';<br>
         data: 'bad' text: 'No sent';<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: 'buttonid') tbButton state: 'ok');<br>                          onError: ((html jQuery id: 'buttonid') tbButton state: 'bad'));<br>          with: 'Send'.<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' Oglio <span dir="ltr"><<a href="mailto:gaston.dalloglio@gmail.com" target="_blank">gaston.dalloglio@gmail.com</a>></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...';<br>          onClick:<br>
                 (html jQuery this call: 'button' with: 'loading'),<br>                  (html jQuery ajax <br>                          serializeForm;<br>                          callback: [ self login ];<br>                          onComplete: html javascript refresh);<br>
         with: 'Login'<br></div><div><br></div><div>I'm using TwitterBootstrap, and I'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'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"><<a href="mailto:pdebruic@gmail.com" target="_blank">pdebruic@gmail.com</a>></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>
> s submitButton<br>
> onClick: (<br>
> s jQuery ajax<br>
> onBeforeSend: (((s jQuery class: 'submit') hide));<br>
> callback: [self doSomething];<br>
> onComplete: ((s jQuery class: 'submit') show));<br>
> with: 'Click here'.<br>
<br>
<br>
</div>I'd do it like this:<br>
<br>
s submitButton<br>
onClick: (s jQuery class: 'submit') hide) , (<br>
s jQuery ajax<br>
<div> callback: [self doSomething];<br>
onComplete: ((s jQuery class: 'submit') show));<br>
with: 'Click here'.<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>