The sidebar resources as viewed from JS
Ralf Lang <[email protected]>
| Newsgroups | gmane.comp.horde.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I am currently examining the sidebar resources handling. In a plain horde application (from skeleton), one would add sidebar resources via $app_Application->sidebar derived from Horde_Core_Application. This would generate pretty bare "radio" or "checkbox" resources - they have no identifying id, class or other element and the radios would not have any relation besides living on the same container. For a traditional static render-and-forget app, this works well but for dynamic, it seems not ideal. In kronolith/dynamic, resources are added via js and generate a slightly different html code for the resources (checkboxes only). They store the actual context of the checkbox via prototypeJS' store() method. In Hermes/dynamic, the sidebar() method is ignored and a separate Hermes_View_Sidebar / sidebar.html.php is rendered which actually has IDs to refer to. ------- I am currently trying to use a group of "radio" entries to switch some application content without actually reloading the site. First thing obviously is to identify the clicked entry, find all radios which logically belong together to this group, disable the currently active radio and enable the clicked radio - and then do whatever it is supposed to achieve. Which solution would be acceptable for re-use in other horde apps (i.e. turba)? 1) Amend the sidebar() generated code with optional class for logically grouping radio items and optional id to make use of them in javascript code 2) Generate dynamic-view resources in javascript code, including class/id needed for handling 3) The hermes way Is there any plan to refactor that in H6 or horde 5.next? Regards, Ralf -- Ralf Lang Linux Consultant / Developer Tel.: +49-170-6381563 Mail: [email protected] B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 -- dev mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]
signature.asc
(application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlZv8tUACgkQCs1dsHJ/X7DdiACfdfZdOSWtx2tMD6Z2MfBoN4nm yOEAnA65lOtJihLSF/9i9vxcoseVUIkP =GBVb -----END PGP SIGNATURE-----