aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-05-01 17:54:12 -0700
committerfriendica <info@friendica.com>2014-05-01 17:54:12 -0700
commitb666aca5c39216270d3ba81b73cdb15d142cf20f (patch)
tree755ca67c6bc2067824bb222cacfc3f78ed76df62
parentf5ce16e5bbb5657e9d2d82c6ed9647e2cf99bcce (diff)
downloadvolse-hubzilla-b666aca5c39216270d3ba81b73cdb15d142cf20f.tar.gz
volse-hubzilla-b666aca5c39216270d3ba81b73cdb15d142cf20f.tar.bz2
volse-hubzilla-b666aca5c39216270d3ba81b73cdb15d142cf20f.zip
bring the posted-date selector widget up to date. There are no longer two different styles.
-rw-r--r--include/widgets.php2
-rw-r--r--view/css/widgets.css4
-rwxr-xr-xview/tpl/posted_date_widget.tpl15
3 files changed, 12 insertions, 9 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 678fed833..1b0e140c0 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -313,7 +313,7 @@ function widget_archive($arr) {
$url = z_root() . '/' . $a->cmd;
- $ret = posted_dates($uid,$wall);
+ $ret = list_post_dates($uid,$wall);
if(! count($ret))
return '';
diff --git a/view/css/widgets.css b/view/css/widgets.css
index 0b9a1cd13..7e6b16bb2 100644
--- a/view/css/widgets.css
+++ b/view/css/widgets.css
@@ -91,6 +91,10 @@
/* posted date */
+.posted-date-selector-months {
+ margin-left: 10px;
+}
+
#datebrowse-sidebar select {
width: 190px;
max-width: 190px;
diff --git a/view/tpl/posted_date_widget.tpl b/view/tpl/posted_date_widget.tpl
index 1a8323926..0867ab392 100755
--- a/view/tpl/posted_date_widget.tpl
+++ b/view/tpl/posted_date_widget.tpl
@@ -1,17 +1,16 @@
<div id="datebrowse-sidebar" class="widget">
<h3>{{$title}}</h3>
<script>function dateSubmit(dateurl) { window.location.href = dateurl; } </script>
-{{if $style == 'list'}}
<ul id="posted-date-selector">
-{{foreach $dates as $d}}
+{{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>
-{{else}}
-<select id="posted-date-selector" name="posted-date-select" onchange="dateSubmit($(this).val());" size="{{$size}}">
-{{foreach $dates as $d}}
-<option value="{{$url}}?f=&dend={{$d.1}}&dbegin={{$d.2}}" >{{$d.0}}</option>
+</div>
{{/foreach}}
-</select>
-{{/if}}
+</ul>
</div>