aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-03 14:49:03 -0800
committerfriendica <info@friendica.com>2014-11-03 14:49:03 -0800
commita6d8c3193a6fc243f3e516118c793e5b871b8247 (patch)
tree1425c809b156a47498f4caaeac683c3b3177079e /view/tpl
parentac858f4bd4fcb9c65cbc7b19288cdad0076aa072 (diff)
downloadvolse-hubzilla-a6d8c3193a6fc243f3e516118c793e5b871b8247.tar.gz
volse-hubzilla-a6d8c3193a6fc243f3e516118c793e5b871b8247.tar.bz2
volse-hubzilla-a6d8c3193a6fc243f3e516118c793e5b871b8247.zip
various UI issues related to having an enormous number of entries in the posted_date selector including years/months that had no posts
Diffstat (limited to 'view/tpl')
-rwxr-xr-xview/tpl/posted_date_widget.tpl28
1 files changed, 27 insertions, 1 deletions
diff --git a/view/tpl/posted_date_widget.tpl b/view/tpl/posted_date_widget.tpl
index 1104d61bb..6298ca0aa 100755
--- a/view/tpl/posted_date_widget.tpl
+++ b/view/tpl/posted_date_widget.tpl
@@ -1,8 +1,30 @@
+<script>
+
+function toggle_posted_date_button() {
+ if($('#posted-date-dropdown').is(':visible')) {
+ $('#posted-date-icon').removeClass('icon-caret-up');
+ $('#posted-date-icon').addClass('icon-caret-down');
+ $('#posted-date-dropdown').hide();
+ }
+ else {
+ $('#posted-date-icon').addClass('icon-caret-up');
+ $('#posted-date-icon').removeClass('icon-caret-down');
+ $('#posted-date-dropdown').show();
+ }
+}
+</script>
+
+
<div id="datebrowse-sidebar" class="widget">
<h3>{{$title}}</h3>
<script>function dateSubmit(dateurl) { window.location.href = dateurl; } </script>
<ul id="posted-date-selector" class="nav nav-pills nav-stacked">
{{foreach $dates as $y => $arr}}
+ {{if $y == $cutoff_year}}
+ </ul>
+ <div id="posted-date-dropdown" style="display: none;">
+ <ul id="posted-date-selector-drop" class="nav nav-pills nav-stacked">
+ {{/if}}
<li id="posted-date-selector-year-{{$y}}">
<a href="#" onclick="openClose('posted-date-selector-{{$y}}'); return false;">{{$y}}</a>
</li>
@@ -10,11 +32,15 @@
<ul class="posted-date-selector-months nav nav-pills nav-stacked">
{{foreach $arr as $d}}
<li>
- <a href="#" onclick="dateSubmit('{{$url}}?f=&dend={{$d.1}}&dbegin={{$d.2}}'); return false;">{{$d.0}}</a>
+ <a href="#" onclick="dateSubmit('{{$url}}?f=&dend={{$d.1}}{{if $showend}}&dbegin={{$d.2}}{{/if}}'); return false;">{{$d.0}}</a>
</li>
{{/foreach}}
</ul>
</div>
{{/foreach}}
+ {{if $cutoff}}
+ </div>
+ <button class="btn btn-default btn-sm" onclick="toggle_posted_date_button(); return false;"><i id="posted-date-icon" class="icon-caret-down"></i></button>
+ {{/if}}
</ul>
</div>