diff --git a/js/catalog.js b/js/catalog.js index 0c41103c..4a4eae37 100644 --- a/js/catalog.js +++ b/js/catalog.js @@ -1,64 +1,22 @@ if (active_page == 'catalog') $(function(){ - $("#selectorzilla").change(function(){ - sheit = this.value; - $("#sort-"+sheit).trigger("click"); + $("#sort_by").change(function(){ + var value = this.value; + $("#sort-"+value).trigger("click"); }); - $("#imgurzilla").change(function(){ - sheit = this.value; - if (sheit == "small") { + $("#image_size").change(function(){ + var value = this.value, old; + if (value == "small") { old = "large"; } else { old = "small"; } $(".grid-li").removeClass("grid-size-"+old); - $(".grid-li").addClass("grid-size-"+sheit); + $(".grid-li").addClass("grid-size-"+value); }); $('#Grid').mixitup({ - onMixEnd: function(){ - if(use_tooltipster) { - buildTooltipster(); - } - } }); - if(use_tooltipster) { - buildTooltipster(); - } - }); - -function buildTooltipster(){ - $(".thread-image").each(function(){ - subject = $(this).attr('data-subject'); - name = $(this).attr('data-name'); - muhdifference = $(this).attr('data-muhdifference'); - last_reply = $(this).attr('data-last-reply'); - last_subject = $(this).attr('data-last-subject'); - last_name = $(this).attr('data-last-name'); - last_difference = $(this).attr('data-last-difference'); - muh_body = ''; - - if (subject) { - muh_body = muh_body + subject + ' por'; - } else { - muh_body = muh_body + 'Postado por'; - }; - muh_body = muh_body + ' ' + name + ' ' + muhdifference + ''; - - if (last_reply) { - muh_body = muh_body + '
'; - if (last_subject) { - muh_body = muh_body + last_subject + ' por'; - } else{ - muh_body = muh_body + 'Ăšltima resposta por'; - }; - muh_body = muh_body + ' ' + last_name + ' ' + last_difference + ''; - } - $(this).tooltipster({ - content: $(muh_body) - }); - }); -} diff --git a/templates/themes/catalog/catalog.html b/templates/themes/catalog/catalog.html index 2b8649e4..a4cb3933 100644 --- a/templates/themes/catalog/catalog.html +++ b/templates/themes/catalog/catalog.html @@ -5,12 +5,6 @@ {% include 'header.html' %} {{ settings.title }} @@ -24,30 +18,32 @@ {% trans 'Sort by' %}: - - {% trans 'Image size' %}: -