Thanks Bryan! On Mar 12, 5:05 pm, Bryan Larsen <[email protected]> wrote: > That funky class is Hobo's "classdata" mechanism. HTML4 does not have a > good way to add random data to an HTML element without breaking HTML > compliance. "classdata" is one of the standard hacks around this. This > is fixed in HTML5, but we're still aiming for HTML4 compliance. > > On the hobo side you can access this with <tr class="#{css_data :model, > typed_id}"> > > In Javascript, it can be accessed with Hobo.getClassData(el, 'model'); > > Bryan > > Michael wrote: > > OK, after some experimentation I was able to get it to work. The > > trick was to make each row have a class that contained something like > > "model::tracking:26092" So I just did this and made it work: > > > <% id_for_deletion = "model::" + typed_id %> > > <tr class="#{id_for_deletion}" > > > > Does anybody know of a better (proper?) way to get the "model::" > > tacked in front of the typed_id? > > > On Mar 11, 4:33 pm, kevinpfromnm <[email protected]> wrote: > >> you need the id on the tr for it to properly remove the DOM object > > >> On Mar 10, 9:29 pm, Michael <[email protected]> wrote: > > >>> So I have a custom table that does just about everything I want. AJAX > >>> updates work and an on-screen counter (a part) gets updated. Deletes > >>> also work but although the record is deleted from the database the row > >>> does not disappear from the page without refreshing the browser. I > >>> reverted back to an Hobo auto-generated table and "delete and fade- > >>> away" works just fine. So my question is how do I make the fade > >>> effect work on my custom table? Here are portions of the tables. > >>> First is the Hobo-generated table: > >>> <tr class="even tracking model::tracking:9038"> > >>> <td class="term-view"> > >>> <span class="view tracking-term ">Biking</span> > >>> </td> > >>> <td class="track-events-view"> > >>> <input name="" value="0" type="hidden"><input checked="checked" > >>> class="boolean tracking-track-events" id="" name="" value="1" > >>> type="checkbox"> > >>> </td> > >>> <td class="controls"> > >>> <a class="edit-link tracking-link" href="/trackings/ > >>> 9038/edit">Edit</a> > >>> <input class="button delete-button delete-tracking- > >>> button" onclick="Hobo.removeButton(this, '/trackings/9038', [], > >>> {fade:true, confirm: "Are you sure?"})" value="Remove" > >>> type="button"> > >>> </td> </tr> > >>> ************* > >>> and here's my customized table: > >>> <tr class="tracking:9038"> > >>> <td> <div id="disc-count-tracking:9038"> Biking (<a href="/ > >>> trackings/9038/discoveries">0</a> <a href="/trackings/9038/ > >>> discoveries.rss"><img src="http://s3.amazonaws.com/favebot_images/feed- > >>> icon16x16.png" align="absmiddle"></a>)</div> </td> > >>> <td><div align="center"> > >>> <input checked="checked" class="boolean tracking_track_events > >>> editor" onclick="Hobo.ajaxRequest('/trackings/9038', ['disc-count- > >>> tracking:9038'], {method:'put', params:'tracking[track_events]=' + > >>> this.checked, spinnerNextTo:this})" value="1" type="checkbox"> > >>> </div></td> > >>> <td class="controls"><input class="button delete-button delete- > >>> tracking-button" onclick="Hobo.removeButton(this, '/trackings/9038', > >>> [], {fade:true, confirm: "Are you sure?"})" value="Remove" > >>> type="button"></td> > >>> </tr> > >>> ********** > >>> The obvious difference that I see is the <tr> tags -- <tr class="even > >>> tracking model::tracking:9038"> vs. <tr class="tracking:9038"> Is the > >>> fade looking for a specific value in <tr>'s class? If so, how do I > >>> get my table to generate what Hobo's generating for that tag? Or is > >>> there something else that makes the fade work that I'm not seeing? > >>> Thanks, > >>> Mike
-- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
