implement Universal Edit Button

Ticket

+commit
 

 

 

 

I see that clicking on "Edit" has:

href="#" onclick="new Ajax.Updater(getSlotSpan(this), '/card/edit/3229?context='+getSlotContext(this), {asynchronous:true, evalScripts:true}); return false;"

So i started creating an HTML page, but realized the "this" references would defeat that. So i tried out the DOM Inspector, copying and pasting a LINK in the header (couldn't figure out how to create a new node), then changing it to be like this: rel=alternate
type=application/x-wiki
title=Edit
href=new Ajax.Updater(getSlotSpan(this), '/card/edit/3229?context='+getSlotContext(this), {asynchronous:true, evalScripts:true}); return false;

...but the browser didn't show the edit button (maybe that node just has to be there when it loads?)

Anyway, i'm stymied on even testing if that would work. Would either of you be willing to test it at the code level? (unless you just know it won't work)

If it doesn't work, we could always just use http://wagn.org/card/edit/cardname (http://wagn.org/edit/cardname when we switch to that). In the long run it would be nice if that still left the regular URL - http://wagn.org/wagn/cardname (Apache URL Rewrite? http://httpd.apache.org/docs/2.0/misc/rewriteguide.html )

As you can see, i'm pretty keen to get this going on Wagn. And i plan to push the UEB folks to extend the standard to handle pages with multiple editable items.

--John Abbe

Works as far as it goes. The drawback to using the /card/edit URL is that after you save, you're back to View mode but there's no Universal Edit Button any more.

  --John Abbe.....Sun Dec 21 12:53:25 -0800 2008


I coded a fix to this that also checks permissions (only appears if you have permission to edit). want lew to sign off on this, to make sure it's not likely to be a heavy performance hit.

  --Ethan McCutchen.....Tue Dec 23 11:53:06 -0800 2008


I thought of that, but imho it's not desirable. We show the regular Edit button when you don't have permission. It's a way to make the requirement of having an account discoverable.

  --John Abbe.....Tue Dec 23 18:32:20 -0800 2008