Forum OpenACS Development: autosave feature for xowiki

Collapse
Posted by Hamilton Chua on
Hello,

I would like to place forth a plan that we have at Solutiongrove to implement autosaving when users are editing xowiki pages.

I believe this can be achieved with some javascript with ajax. A javascript function will execute every n number of minutes where n can be specified in the xowiki parameter. The xowiki page is then submitted in the background with ajax to create a new revision.

So autosaved content can be viewed in the Revisions page.

I understand that the number of revisions can grow to a big number so I intend to keep track of autosaves in a separate table and create a sweeper that removes them (delete the revision) after a certain period of time.

What do people think about a feature like this ? Is the above a good implementation ?

Thanks,

Hamilton

Collapse
Posted by Jose Pablo Escobedo Del Cid on
I think it is a good idea. Maybe you can delete all the autosaved revisions once the user clicks on the save button.

Anyway, I would like to ask you about one thing. I'm using iceweasel 2.0 (firefox 2.0) and when I click on the edit link of the wiki pages, the text and the toolbar (of the editor) appear in different columns, but if I click on "maximize" everything works ok. Furthermore, when I click on "minimize", the text and the toolbar appear in the same column. Maybe the error is when loading the editor for the first time, some inicialization bug.

Regards,

Jose Pablo

Collapse
Posted by Hamilton Chua on
How fast is your internet connection ?
Does it happen all the time ?
Have you tried clearing your cache and then visiting a wiki edit page again ?

The WYSIWYG editor the wiki is using is called xinha and it's a lot of javascript that needs to get loaded as the edit page is loaded. On firefox and IE I get a little delay as it tries to fetch all the icons and stuff.

Collapse
Posted by Jose Pablo Escobedo Del Cid on
I don't think the internet connection is the problem because it's a local installation. Besides, the bug happens in a local sever and in my local installation.

And yes, it happens all the time (when you click on "edit" for the first time).

I also tried deleting the cache but I get the same result.

Maybe is the version of the XYSIWYG editor?. I'm using the branch oacs-5-2 (even though for the xowiki and xotcl-core packages I'm using the branch HEAD)

Collapse
Posted by Jose Pablo Escobedo Del Cid on
Sorry, I forgot to say that with explorer 7 it works OK.