more template code simplification in posted_date_widget
This commit is contained in:
parent
781c4986c6
commit
30a4857842
|
@ -1,12 +1,12 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function showHideDates() {
|
function showHideDates() {
|
||||||
if( $('#posted-date-dropdown').is(':visible')) {
|
if( $('#posted-date-selector-drop').is(':visible')) {
|
||||||
$('#posted-date-dropdown').hide();
|
$('#posted-date-selector-drop').hide();
|
||||||
$('#posted-date-collapse').html(window.showMore);
|
$('#posted-date-collapse').html(window.showMore);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#posted-date-dropdown').show();
|
$('#posted-date-selector-drop').show();
|
||||||
$('#posted-date-collapse').html(window.showFewer);
|
$('#posted-date-collapse').html(window.showFewer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,11 +22,12 @@ function dateSubmit(dateurl) {
|
||||||
<h3>{{$title}}</h3>
|
<h3>{{$title}}</h3>
|
||||||
<ul id="posted-date-selector" class="datebrowse-ul">
|
<ul id="posted-date-selector" class="datebrowse-ul">
|
||||||
{{foreach $dates as $y => $arr}}
|
{{foreach $dates as $y => $arr}}
|
||||||
|
|
||||||
{{if $y == $cutoff_year}}
|
{{if $y == $cutoff_year}}
|
||||||
</ul>
|
</ul>
|
||||||
<div id="posted-date-dropdown" style="display: none;">
|
<ul id="posted-date-selector-drop" class="datebrowse-ul" style="display: none;">
|
||||||
<ul id="posted-date-selector-drop" class="datebrowse-ul">
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<li id="posted-date-selector-year-{{$y}}" class="tool">
|
<li id="posted-date-selector-year-{{$y}}" class="tool">
|
||||||
<a class="datebrowse-link" href="#" onclick="openClose('posted-date-selector-{{$y}}'); return false;">{{$y}}</a>
|
<a class="datebrowse-link" href="#" onclick="openClose('posted-date-selector-{{$y}}'); return false;">{{$y}}</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -42,7 +43,6 @@ function dateSubmit(dateurl) {
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</ul>
|
||||||
{{if $cutoff}}
|
{{if $cutoff}}
|
||||||
</div>
|
|
||||||
<ul class="datebrowse-ul">
|
<ul class="datebrowse-ul">
|
||||||
<li onclick="showHideDates(); return false;" id="posted-date-collapse" class="fakelink tool">{{$showmore}}</li>
|
<li onclick="showHideDates(); return false;" id="posted-date-collapse" class="fakelink tool">{{$showmore}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue