Changeset 20982


Ignore:
Timestamp:
Feb 23, 2013, 8:24:04 AM (11 years ago)
Author:
rvelices
Message:
  • replaced calendar views select with a drop down box (as sort order and photo sizes)
  • some css compaction
Location:
trunk/themes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/Sylvia/theme.css

    r16800 r20982  
    160160
    161161.content h2 {
    162         margin:0;
    163162        padding:0px 10px 15px 15px;
    164163        border:0;
  • trunk/themes/default/template/index.tpl

    r20452 r20982  
    119119{if isset($chronology_views)}
    120120<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}>&#x2714; </span><a href="{$view.VALUE}">{$view.CONTENT}</a>
    124127                {/foreach}
    125         </select>
     128        </div>
     129        {footer_script require='jquery'}{literal}
     130function 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};
     137jQuery("#calendarViewSwitchBox").on("mouseleave", function() {
     138        jQuery(this).hide();
     139});
     140        {/literal}{/footer_script}
    126141</div>
    127142{/if}
  • trunk/themes/default/theme.css

    r20452 r20982  
    9292}
    9393
    94 .content H2 { margin-bottom: 3px;} /*<- for IE otherwise calendar select is displaced to middle of page*/
    95 
    9694.content .navigationBar, .content .additional_info, .content .calendarBar {
    9795        margin: 8px 4px;
     
    117115
    118116/* category and tag results paragraphs on a quick search */
    119 .content .category_search_results, .content .tag_search_results {
     117.category_search_results, .tag_search_results {
    120118  font-size: 16px;
    121119  margin: 10px 16px;
     
    141139        display: block;
    142140        float: right;
    143         margin: 2px 0 0;
     141        margin: 5px 5px 0 0;
    144142}
    145143
  • trunk/themes/elegant/theme.css

    r20541 r20982  
    8080#thePicturePage #content        { padding-bottom: 0;}
    8181.content .titrePage                     { padding:0; margin-bottom:4px;}
    82 .content .titrePage H2          { line-height: 20px; margin: 0; padding: 8px 0 0 2px;}
     82.content .titrePage H2          { line-height: 20px; padding: 8px 0 0 2px;}
    8383
    8484
Note: See TracChangeset for help on using the changeset viewer.