diff options
author | mrjive <mrjive@mrjive.it> | 2015-01-06 15:13:03 +0100 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-01-06 15:13:03 +0100 |
commit | b80c218606994032e76805900cb9b340ea132358 (patch) | |
tree | bf625cf4c59bf521e639018399bf1770d116a6a0 /view/tpl/posted_date_widget.tpl | |
parent | aa6d61d3b19cb13c30bf5a1579adefedf0cc9515 (diff) | |
parent | 3185bfe3ca131d471b8fcdc0c94abf1a114486c7 (diff) | |
download | volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.tar.gz volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.tar.bz2 volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.zip |
Merge pull request #1 from friendica/master
test pull request
Diffstat (limited to 'view/tpl/posted_date_widget.tpl')
-rwxr-xr-x | view/tpl/posted_date_widget.tpl | 56 |
1 files changed, 43 insertions, 13 deletions
diff --git a/view/tpl/posted_date_widget.tpl b/view/tpl/posted_date_widget.tpl index 0867ab392..6298ca0aa 100755 --- a/view/tpl/posted_date_widget.tpl +++ b/view/tpl/posted_date_widget.tpl @@ -1,16 +1,46 @@ +<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"> -{{foreach $dates as $y => $arr}} -<li id="posted-date-selector-year-{{$y}}" class="fakelink" onclick="openClose('posted-date-selector-{{$y}}');">{{$y}}</li> -<div id="posted-date-selector-{{$y}}" style="display: none;"> -<ul class="posted-date-selector-months"> -{{foreach $arr as $d}} -<li class="posted-date-li"><a href="#" onclick="dateSubmit('{{$url}}?f=&dend={{$d.1}}&dbegin={{$d.2}}'); return false;">{{$d.0}}</a></li> -{{/foreach}} -</ul> -</div> -{{/foreach}} -</ul> + <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> + <div id="posted-date-selector-{{$y}}" style="display: none;"> + <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}}{{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> |