[dev] [commits] Horde branch ajax_to_core created. f180edabc00d6c0918c423f83864434357bdb881

Michael M Slusarz slusarz at horde.org
Thu Jan 26 23:31:28 UTC 2012


Quoting Michael M Slusarz <slusarz at horde.org>:

> The branch "ajax_to_core" has been created.
>         at  f180edabc00d6c0918c423f83864434357bdb881 (commit)
>
> -----------------------------------------------------------------------
> commit f180edabc00d6c0918c423f83864434357bdb881
> Author: Michael M Slusarz <slusarz at horde.org>
> Date:   Thu Jan 26 15:58:02 2012 -0700
>
>     Use new Horde_Core AJAX features in Kronolith
>
> commit 86a3b912338fb16366f297ef9a289856ff0d50a6
> Author: Michael M Slusarz <slusarz at horde.org>
> Date:   Tue Jan 24 18:02:50 2012 -0700
>
>     Moved core AJAX code from IMP to Horde_Core.
>
>     Related: view determination now done in Horde_Core instead of at the
>     application level.

So things look decent enough to push.  I'm typing this from this  
branch right now, so it is usable.  And a basic pass through kronolith  
seems to indicate things are ok.

A few more things I need to resolve before I push this to develop  
since this needs to happen sooner rather than later - we need to start  
stress-testing ASAP to find flaws.

- Probably a good idea to move non-application navigation related code  
to HordeCore.  Things like switching to the prefs/portal views will be  
common between applications.

- Apparently in Kronolith there is an alarm notify option named  
'ajax'.  I don't know what it does, nor really most of the Alarm  
notify options, since they are not documented anywhere I know of.  I  
don't know why this is any different from the url notify option though  
- they both create <A> tags.

In order to make this application-neutral, I've made a change to  
Growler that captures any click on an <A> tag within a Growler  
notification, stops the event, and fires a 'Growler:linkClick' event  
with the <A> element as the passed parameter.  This way, each  
application can handle these links as needed.  Obviously, we can also  
declare common handling within the base HordeCore code.

With this change, there should be no need to declare separate 'ajax'  
and 'url' notify options.  You can create the link with the 'url'  
option and then do any additional processing in the linkClick observer.

(Side note: this needs to be the coding paradigm going forward.  At  
this point in our development, there should really never be any need  
to define on[observer] parameters in HTML tags.  All event observers  
should instead be defined in javascript files.  In a MVC world, this  
makes sense - we should be separating javascript entirely from HTML).

- Finally, this does not really touch on the smartmobile stuff.  That  
needs to be centralized ASAP also.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list