<form method="POST" action="{% url "haystack_playlist" type %} ">{% csrf_token %}
{% with object_list as items %}
- <div class="fullpage">
+ <div class="fullpage" style="display:none">
{% ifequal type 'item' %}
{% include "search/mediaitem_listhaystack.html" %}
{% else %}
{%endifequal%}
{%endifequal%}
</div>
+ <noscript>
+ <div class="fullpage">
+ {% ifequal type 'item' %}
+ {% include "search/mediaitem_listhaystack.html" %}
+ {% else %}
+ {% ifequal type 'collection' %}
+ {% include "search/mediacollection_listhaystack.html" %}
+ {%endifequal%}
+ {%endifequal%}
+ </div>
+ </noscript>
{% endwith %}
{% if user.is_authenticated %}
<script src="{{ STATIC_URL }}telemeta/js/jquery-ui.min.js" type="text/javascript"></script>
<script>
$(function() {
+
+ function getPrevUrlParameter(sParam){
+ var sPageURL = document.referrer.substring(1);
+ var sURLVariables = sPageURL.split('&');
+ for (var i = 0; i < sURLVariables.length; i++)
+ {
+ var sParameterName = sURLVariables[i].split('=');
+ if (sParameterName[0] == sParam)
+ {
+ return sParameterName[1];
+ }
+ }
+ };
+
+ function getCurrUrlParameter(sParam){
+ var sPageURL = window.location.search.substring(1);
+ var sURLVariables = sPageURL.split('&');
+ for (var i = 0; i < sURLVariables.length; i++)
+ {
+ var sParameterName = sURLVariables[i].split('=');
+ if (sParameterName[0] == sParam)
+ {
+ return sParameterName[1];
+ }
+ }
+ };
+
+ var prev = getPrevUrlParameter("page");
+ var curr = getCurrUrlParameter("page");
+ if(prev<curr){
+ $(".fullpage").show( "slide", {direction:"left"} );
+ }
+ else if(!curr){
+ $(".fullpage").fadeIn(500);
+ }
+ else if(!prev){
+ $(".fullpage").show( "slide", {direction:"left"} );
+ }
+ else{
+ $(".fullpage").show( "slide", {direction:"right"} );
+ };
+
+ //alert("prev = "+ prev +" curr = "+ curr);
+
var nouvellesIcones = {
header : 'ui-icon-carat-1-e',
activeHeader : 'ui-icon-carat-1-s',
}
});
- $(document).ready(function() {
$("#results-per-page").selectmenu({
icons : {button: "ui-icon-carat-2-n-s"},
change : function(){
}).selectmenu("menuWidget").addClass("overflow");
});
- });
</script>
{% endblock %}