Changes

Jump to: navigation, search

Umlaut partial html API javascript helper

30 bytes added, 18:13, 8 April 2009
no edit summary
You also need to put a URL-formatted (KEV) [[OpenURL]] context object in a global js variable called umlaut_openurl_kev_co.
You then specify mappings from Umlaut html sections to HTML divs on your page in global js variable called umlaut_section_map containing a hash. Umlaut html sections are configured in Umlaut in the "partial_html_map" configuration param, which by default is set to the "bg_update_map" config params :divs key. To see the sections in a default Umlaut installation, see: AppConfig::Base.bg_update_map [http://umlaut.rubyforge.org/svn/trunk/config/environment.rb environmentinitializers/umlaut/resolve_views.rb in resolve_views in svn], look for bg_update_map. The :divs key of the hash there is an array of hashes, each individual hash has a :div_id key that corresponds to the html_sections id in this api response. For Umlaut developers, the :partial key tells you what [[Rails]] partial is used to generate this section.
You can also optionally use some javascript callbacks to perform behavior after or during loading. In the following example, we'll demo using a javascript callback to only show a div for search_inside functionality if there are search_inside tools provided.

Navigation menu