Mercurial > personas_backend
changeset 171:374186f05822
Got rid of the browser-side ajax ping on thumbnails; this will instead be set by the extension itself.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 11 Apr 2008 11:22:36 -0700 |
parents | 9d73e950f0f4 |
children | 8745e7f5f865 |
files | media/js/personas.js personasbackend/personas/templates/personas/thumbnail.html |
diffstat | 2 files changed, 2 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/media/js/personas.js Fri Apr 11 11:15:14 2008 -0700 +++ b/media/js/personas.js Fri Apr 11 11:22:36 2008 -0700 @@ -1,17 +1,4 @@ -function dispatchPersonaEvent(aType, aNode, aUrl) { - if (aUrl) { - /* TODO: We should only do this if the Persona is successfully - set, i.e. if the user actually has Personas installed, etc. */ - /* TODO: We should probably just use a library like jQuery to - do this for us. */ - var request = new XMLHttpRequest(); - /* TODO: Be reasonable and make this a POST, as this 'ping' will - change the server's state. */ - request.open( "GET", aUrl, true ); - request.onreadystatechange = function() {} - request.send(null); - } - +function dispatchPersonaEvent(aType, aNode) { var event = document.createEvent("Events"); event.initEvent(aType, true, false); aNode.dispatchEvent(event);
--- a/personasbackend/personas/templates/personas/thumbnail.html Fri Apr 11 11:15:14 2008 -0700 +++ b/personasbackend/personas/templates/personas/thumbnail.html Fri Apr 11 11:22:36 2008 -0700 @@ -1,6 +1,5 @@ <div onclick="dispatchPersonaEvent('SelectPersona', - event.originalTarget, - '{% url report-selection persona.id %}')" + event.originalTarget)" onmouseover="dispatchPersonaEvent('PreviewPersona', event.originalTarget)" onmouseout="dispatchPersonaEvent('ResetPersona',