eZ Community » Projects » QH Autosave

QH Autosave

Saturday 15 October 2011 - http://projects.ez.no/qhautosave

Latest forum activity - Visit project's forums page

Tuesday 18 October 2011 3:05:04 pm

Hello,

It’s a very useful extension. This is a "Must Extension" for eZpublish happy.gif Emoticon

We currently cannot set a autosave Interval ?

Maybe you could add this feature by using ezjscore to load this value from an INI file.

Thanks

 

Tuesday 18 October 2011 5:35:03 pm

Hello Quoc Huy,

Thank you again for creating this solution, you are truly an eZ Publish saint!

I agree with Yassine, This was the first area customization I thought could be helpful to others.

Keep rockin "Boss" blunk.gif Emoticon

Cheers,

//kracker

<b>Theme: Rick Ross (Feat. Nicki Minaj) – You The Boss</b>

Tuesday 18 October 2011 6:35:03 pm

Thanks guys

That is a feature I wanted to add at the beginning but then scoped out for the first beta releases as I need to give more thought on optimising the Ajax call for just retrieving ini settings. So stay tuned as it will be for very soon.

Huy

Tuesday 18 October 2011 9:05:03 pm

OK, the feature is now available in GitHub:

https://github.com/quochuy/qhautosave

I will package it later on.

Tuesday 18 October 2011 9:35:03 pm

Currently when the autosave process is completed, there is an orange notification bar appearing on the top of the page and then disappears after couple of seconds.

This could annoy certain people that get distracted by blinking coloured items while they are editing.

In his review, Nicolas has suggested gmail/docs autosave notification style by adding a text and changing the button label. This could work well on the frontend editor but in the back office with admin2 design, the buttons are at the top and bottom of the page and are not always visible.

So I'm launching this topic to gather some ideas.

Maybe instead of orange I could do with white and dotted light grey border?

Tuesday 18 October 2011 11:35:05 pm

Awesome!

Just change the following comment (ezstarrating) in ezjscore.ini with the right exemple of qhautosave

# <root>/ezjscore/call/ezstarrating::rate::<contentobjectattribute_id>::<version>::<rating>

Thanks. Keep up the good work.

Wednesday 19 October 2011 12:05:05 am

With the same way of using ezjscore, it could be nice to make the extension translatable using translations folder and ts files.

Wednesday 19 October 2011 2:05:03 pm

I've added in v1.0beta3 support to a new notification method, additionally to the text label you can now choose to notify with a 2 pixels pulsing line.

Wednesday 19 October 2011 9:35:03 pm

Hello Quoc Huy,

Just a quick note from me today.

Thanks for the new release updates.

Your really doing a great job! Keep up the great work!

Cheers,

//kracker

<b>Sole: Dispatches From The American Fall: Blood Libel</b>

Thursday 20 October 2011 4:05:03 pm

Thanks mate

Monday 24 October 2011 4:05:03 pm

Hi Huy,

The pulsing bar is indeed very discreet, but imho lacks clarity : an editor might not know what this corresponds to, thus not have the increased comfort feeling the auto-save feature brings. I'd make it more visible.

I have had issues with the "label" mode on a 2011.8 install : the pulsing bar mode persists no matter what, although the configuration returned by ezjscore is as follows :

<code>

{"error_text":"","content":"{\"autosave_interval\":15000,\"warn_on_unload\":true,\"notification_method\":\"label\"}"}

</code>

Bug or misconfiguration on my side ?

Back to the very topic : i love the http://stackoverflow.com notification bar. Visible, yet discreet, close-able. We will soon need on share.ez.no such a visual, front-end notification system and i had initially thought of making it a dedicated project on projects.ez.no : would you consider externalizing this as a portable, universal notification bar with a simple JS api ? I'd obviously step-in on the project to help.

Cheers,

Tuesday 25 October 2011 12:35:03 pm

Google documents have a nice way of notifying you about autosaving.

You could take the idea from there...

Thursday 27 October 2011 11:05:04 am

@Marko, thank you. Google is always a great source of inspiration.

@Nico, great idea indeed. I will investigate that and also the bug you mentioned.

Thursday 27 October 2011 7:05:03 pm

@nico, I've externalized the notification system as you have suggested in a separate extension using a Stack Overflow similar system.

Will be packaging it soon.

The current features:

- injects HMTL code to avoid tpl editing

- text close button ( [X] ), will add graphic one later

- you can insert multiple notification messages they will be appended one below the other

- you can add a sticky message that cannot be removed (used by QH AutoSave cuz it's a recurrent one)

- you can assign a notification ID, so it is possible to replace an already displayed message (used by QH AutoSave)

- jQuery animated notification removal (resize)

TODO:

- if there are more than two notification messages, only display two and add an 'expand' button at the bottom

- allow the use of cookies to store notification messages for persistent messages

- allow the use cookies to avoid displaying a notification message if the user has already seen it

Also implemented and will be packaged later on: externalization of the ezjscore server function to load eZ INI file. This new extension allows all JS projects in eZ Publish to load a configuration from an INI file qhjsiniloader.ini:

<code>

[QHJSINILoaderSettings]

AvailableLoaders[]=my_project

[my_project]

Parameters[param1_name]=param1_value

Parameters[param2_name]=param2_value

</code>

To use it, a JS file will include:

<code>

if( typeof QHJSINILoader != 'undefined' ) {

// Returns the JSON version of eZINI::variable( 'my_project', 'Parameters' )

QHJSINILoader.init( 'my_project', callback_function );

}

</code>

This will allow a single Ajax call (per page) to load INI settings for multiple projects.

Available on GitHub:

https://github.com/quochuy/qhjsiniloader

https://github.com/quochuy/qhnotifications

 

Friday 28 October 2011 8:05:04 pm

Hi Yassine

The GitHub version now handles translations.

qhautosave now requires two other extensions qhjsiniloader (used for loading INI and translations) and qhnotifications.

Huy

Friday 04 November 2011 10:35:05 pm

Hello A Fowler,

Yes, you must now enable all three of the required extensions within your desired siteaccess or override site.ini.append.php settings as they are required for the functionality of the main extension qhautosave.

I hope this helps ...

Cheers,

Heath

Friday 04 November 2011 11:05:04 pm

Thanks Heath for doing the support for this extension big-smile.gif Emoticon

And yes I confirm that you now need both three extensions.

But I've made your life easier by creating a combo package. Just download the most recent combo package and in your eZ Publish back office:

- go in Setup > Packages > Import new package > select your combo package > install package

- go to Setup > Extensions, the three extensions should already be activated, if not then activate them in site.ini

- go to Setup > Extensions and click on the button saying Regenerate autoloads ...

- click on 'Clear all' caches.

- that's it.

Saturday 26 November 2011 5:05:06 pm

In some of my installations, QH AutoSave didn't work out of the box.

After investigating it was because jQuery file was loaded after qhautosave.js.

The solution is either override the file page_head_script.tpl and load 'ezjsc::jquery', 'ezjsc::jqueryio' from there before the frontend scripts.

Or edit extension/qhautosave/settings/design.ini.append.php and add the following lines to the JavaScriptSettings section:

FrontendJavaScriptList[]=ezjsc::jquery

FrontendJavaScriptList[]=ezjsc::jqueryio

 

Members - Visit project's team page
Real name:
Quoc-Huy NGUYEN DINH
Country:
Australia 
#Posts:
171
Project reviews - See all reviews

Saturday 15 October 2011 12:05:02 pm

Huy this rocks,

While i will rush to try this out now, i just wanted to send you congrats.
A few things, from the top of my head :
- The Gmail/GDocs Auto-save ergonomics are excellent (label on buttons changing, etc.)

Keep-up !
--
Nicolas

Saturday 15 October 2011 9:05:03 pm

I think this extension is fantastic. I mean really amazing (so perfect, so simple and self contained).

I've heard of many such requests for this exact solution over the years.

The solution is well made, leverages ezoe features, ezjscore, jquery, the javascript code required is clean and very simple to understand, it's very impressive.

This extension is so simple to use it made me laugh really hard. Just activate the extension and your ready to edit your content with the autosave! This means it's so simple to use right out of the box that any one even with minimal experience can use this solution within their eZ Publish website.

Extra points goes to the author(s) since they generated the easy to install ezpackages of the extension. This means you can use the admin to upload the extension into your site, it also means don't need to edit any settings to activate and use :)

Again, wonderful work! I can't wait till your next contribution. Thank you for your continued support of the eZ Community!

Cheers,
Heath

Wednesday 19 October 2011 12:35:03 am

This is a Must-Extension for eZpublish

Keep up the good work
Proudly Developed with from