Changeset 20982 for trunk/themes/default/template/index.tpl
- Timestamp:
- Feb 23, 2013, 8:24:04 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/template/index.tpl
r20452 r20982 119 119 {if isset($chronology_views)} 120 120 <div class="calendarViews">{'View'|@translate}: 121 <select onchange="document.location = this.options[this.selectedIndex].value;"> 122 {foreach from=$chronology_views item=view} 123 <option value="{$view.VALUE}"{if $view.SELECTED} selected="selected"{/if}>{$view.CONTENT}</option> 121 <a id="calendarViewSwitchLink" href="javascript:toggleCalendarViewsBox()"> 122 {foreach from=$chronology_views item=view}{if $view.SELECTED}{$view.CONTENT}{/if}{/foreach} 123 </a> 124 <div id="calendarViewSwitchBox" class="switchBox"> 125 {foreach from=$chronology_views item=view name=loop}{if !$smarty.foreach.loop.first}<br>{/if} 126 <span{if !$view.SELECTED} style="visibility:hidden"{/if}>✔ </span><a href="{$view.VALUE}">{$view.CONTENT}</a> 124 127 {/foreach} 125 </select> 128 </div> 129 {footer_script require='jquery'}{literal} 130 function toggleCalendarViewsBox() { 131 var elt = jQuery("#calendarViewSwitchBox") 132 , ePos = jQuery("#calendarViewSwitchLink"); 133 elt.css("left", Math.min( ePos.offset().left, jQuery(window).width() - elt.outerWidth(true) - 5)) 134 .css("top", ePos.offset().top + ePos.outerHeight(true)) 135 .toggle(); 136 }; 137 jQuery("#calendarViewSwitchBox").on("mouseleave", function() { 138 jQuery(this).hide(); 139 }); 140 {/literal}{/footer_script} 126 141 </div> 127 142 {/if}
Note: See TracChangeset
for help on using the changeset viewer.