#9352: Improved search results ----------------------------+----------------------------------------------- Reporter: laurenskling | Owner: spliter Type: PLIP | Status: assigned Priority: major | Milestone: 4.2 Component: Infrastructure | Keywords: search ----------------------------+-----------------------------------------------
Comment(by ldr): Replying to [comment:137 spliter]: > (In [50811]) AJAX click handler for the links in the batch navigation. > > (In [50812]) Taking advantage of the built-in everything-is-object nature of javascript — we, now, have global Search object with the following methods: > > * getResults() ''// makes actual ajax call, gets results and updates the elements'' > * pushState() ''// updates URL and pushes the state to browser's history'' > * popState() ''// reverts search results to the previous history state (used by browser's Back button)'' > * updateResults() ''// combination of getResults() and pushState()'' Is the Search object really in the global scope? The code executes in an anonymous block, so I can't see how it ends up in the global scope. The normal way to do this is to set it explicitly on the ``window`` object. If it is meant to be in the global scope then it should be called something like ``plone_search`` instead of ``Search`` to avoid clashes. -- Ticket URL: <http://dev.plone.org/plone/ticket/9352#comment:141> Plone <http://plone.org> Plone Enterprise Content Management System _______________________________________________ PLIP-Advisories mailing list plip-advisor...@lists.plone.org https://lists.plone.org/mailman/listinfo/plone-plip-advisories