-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
view tracking and search enhancements
- track views on maps/layers by counting playback ticks - show views in various results - add more link to search results - add some cached bulk functions for ratings/views
- Loading branch information
1 parent
e00f14c
commit 5abf53e
Showing
15 changed files
with
185 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
{% extends 'geonode/templates/fullscreen.html' %} | ||
{% load mapstory_tags %} | ||
|
||
{% block head %} | ||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}theme/geonode.css" /> | ||
{{ block.super }} | ||
<script type="text/javascript"> | ||
{# hitcount library uses jquery, but core.js is not loaded for this page, so... #} | ||
$(document).ajaxSend(function(event, xhr, settings) { | ||
xhr.setRequestHeader("X-CSRFToken", Ext.util.Cookies.get('csrftoken')); | ||
}); | ||
</script> | ||
{% map_view_hitcount_tracker request map %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% load hitcount_tags %} | ||
<script type="text/javascript"> | ||
Ext.onReady(function() { | ||
var tracker = false; | ||
function checkload() { | ||
var i, control, tickcnt = 0; | ||
if (tracker) return; | ||
for (i in app.mapPanel.map.controls) { | ||
control = app.mapPanel.map.controls[i]; | ||
if (control.CLASS_NAME == "OpenLayers.Control.TimeManager") { | ||
loaded = true; | ||
tracker = function(ev) { | ||
tickcnt++; | ||
if (tickcnt == 3) { | ||
{% get_hit_count_javascript for obj %} | ||
control.events.unregister('tick',null,tracker); | ||
} | ||
} | ||
control.events.register('tick',null,tracker); | ||
return; | ||
} | ||
} | ||
} | ||
function listen() { | ||
app.mapPanel.map.events.register("addlayer",null,function(ev) { | ||
ev.layer.events.register("loadend",null,function(ev) { | ||
checkload(); | ||
}); | ||
}); | ||
} | ||
if (app.mapPanel) { | ||
listen(); | ||
} else { | ||
app.on("portalready",listen); | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.