aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default')
-rw-r--r--themes/default/template/index.tpl23
-rw-r--r--themes/default/theme.css6
2 files changed, 21 insertions, 8 deletions
diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl
index c24f4e364..3ed52498c 100644
--- a/themes/default/template/index.tpl
+++ b/themes/default/template/index.tpl
@@ -118,11 +118,26 @@ jQuery("#derivativeSwitchBox").on("mouseleave", function() {
{if isset($chronology_views)}
<div class="calendarViews">{'View'|@translate}:
- <select onchange="document.location = this.options[this.selectedIndex].value;">
- {foreach from=$chronology_views item=view}
- <option value="{$view.VALUE}"{if $view.SELECTED} selected="selected"{/if}>{$view.CONTENT}</option>
+ <a id="calendarViewSwitchLink" href="javascript:toggleCalendarViewsBox()">
+ {foreach from=$chronology_views item=view}{if $view.SELECTED}{$view.CONTENT}{/if}{/foreach}
+ </a>
+ <div id="calendarViewSwitchBox" class="switchBox">
+ {foreach from=$chronology_views item=view name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
+ <span{if !$view.SELECTED} style="visibility:hidden"{/if}>&#x2714; </span><a href="{$view.VALUE}">{$view.CONTENT}</a>
{/foreach}
- </select>
+ </div>
+ {footer_script require='jquery'}{literal}
+function toggleCalendarViewsBox() {
+ var elt = jQuery("#calendarViewSwitchBox")
+ , ePos = jQuery("#calendarViewSwitchLink");
+ elt.css("left", Math.min( ePos.offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
+ .css("top", ePos.offset().top + ePos.outerHeight(true))
+ .toggle();
+};
+jQuery("#calendarViewSwitchBox").on("mouseleave", function() {
+ jQuery(this).hide();
+});
+ {/literal}{/footer_script}
</div>
{/if}
diff --git a/themes/default/theme.css b/themes/default/theme.css
index 267b35fd1..25444db30 100644
--- a/themes/default/theme.css
+++ b/themes/default/theme.css
@@ -91,8 +91,6 @@
margin-left: 20em; /* = #menubar width + 2em */
}
-.content H2 { margin-bottom: 3px;} /*<- for IE otherwise calendar select is displaced to middle of page*/
-
.content .navigationBar, .content .additional_info, .content .calendarBar {
margin: 8px 4px;
text-align: center;
@@ -116,7 +114,7 @@
}
/* category and tag results paragraphs on a quick search */
-.content .category_search_results, .content .tag_search_results {
+.category_search_results, .tag_search_results {
font-size: 16px;
margin: 10px 16px;
}
@@ -140,7 +138,7 @@
.calendarViews {
display: block;
float: right;
- margin: 2px 0 0;
+ margin: 5px 5px 0 0;
}
.calItem, .calItemEmpty {