I've not yet looked at the code (and the demo does look very nice!), so apologies if you've covered either of these already, but I've got a suggestion and a request to do with this new Javascript code:
First, a suggestion: at the moment, if you edit a page using AJAX, click on a link and then return to the course page using the browser 'back' button, you are presented with the state before you edited anything (until you refresh the page). Things can get very confused if you try to edit the page in this state. It would be great if you could implement some way of 'phoning home' when the course javascript initialises and then force a page refresh (of some kind) if the page has been edited since the page was generated.
Second, a request: please could you make sure there is some way for other scripts to hook into your code to initialise any later additions to the page. I currently use this to allow my drag and drop upload block to work: I create new resource elements on the page dynamically, when files are dropped onto the page, then call the AJAX course edit script to add the correct editing elements (see the last few lines here https://github.com/davosmith/moodle-block_dndupload/blob/master/dndupload.js for the code I use - I also check for the existence of an object called 'main' to detect that AJAX course editing is enabled, some hook to allow such detection would be great as well). Whilst my block is currently a 3rd part plugin, I hope that some code I am writing, based on it, may someday make it into core.
I also hope that someday the course editing is updated to allow new activities to be added using AJAX directly on the course page (maybe with some popup dialog boxes to gather basic details) - in this case, a hook to add controls directly to these new activities would also be useful.
Anyway, keep up the good work - it looks a lot more stable than the current drag & drop.