Changeset 13234 for trunk/themes


Ignore:
Timestamp:
Feb 18, 2012, 9:26:52 PM (12 years ago)
Author:
patdenice
Message:

feature:2577
Many improvements

Location:
trunk/themes
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/template/footer.tpl

    r8492 r13234  
    1313        - {'Contact'|@translate}
    1414        <a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
     15        {/if}
     16        {if isset($TOGGLE_MOBILE_THEME_URL)}
     17        - {'Display'|@translate} : <a href="{$TOGGLE_MOBILE_THEME_URL}">{'Mobile'|@translate}</a> | <b>{'Classic'|@translate}</b>
    1518        {/if}
    1619
  • trunk/themes/smartpocket/template/footer.tpl

    r13182 r13234  
    1 
     1{if !empty($navbar)}
     2{include file='navigation_bar.tpl'|@get_extent:'navbar'}
     3{else}
     4<div class="pwg_footer ui-bar-a">
     5  <h6>
     6        {'Powered by'|@translate}       <a href="{$PHPWG_URL}" class="Piwigo">Piwigo</a>
     7        {$VERSION}
     8        {if isset($CONTACT_MAIL)}
     9        - {'Contact'|@translate}
     10        <a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
     11        {/if}
     12  <br>{'Display'|@translate} :
     13    <b>{'Mobile'|@translate}</b> | <a href="{$TOGGLE_MOBILE_THEME_URL}">{'Classic'|@translate}</a>
     14  </h6>
     15</div>
     16{/if}
    217{get_combined_scripts load='footer'}
    318</div><!-- /page -->
  • trunk/themes/smartpocket/template/header.tpl

    r13182 r13234  
    4747
    4848<body>
    49 <div data-role="page">
     49<div data-role="page" data-theme="a">
    5050
    51 <div data-role="header" data-theme="c">
     51<div data-role="header">
    5252  <div class="title">
    5353    <a href="{$U_HOME}" class="home_button" data-icon="home" data-iconpos="notext" data-role="button"></a>
  • trunk/themes/smartpocket/template/index.tpl

    r13182 r13234  
    1 <div data-role="content">
     1<div data-role="content" data-theme="a">
    22{if !empty($CATEGORIES)}{$CATEGORIES}{/if}
    33{if !empty($THUMBNAILS)}{$THUMBNAILS}{/if}
  • trunk/themes/smartpocket/template/infos_errors.tpl

    r13182 r13234  
    1 {if isset($errors) }
    2 <div class="errors">
    3   <ul>
    4     {foreach from=$errors item=error}
    5     <li>{$error}</li>
    6     {/foreach}
    7   </ul>
     1{if isset($errors)}
     2<div class="ui-bar ui-bar-e errors">
     3  <h3>{'Error'|@translate}</h3>
     4        <div><a href="#" data-role="button" data-icon="delete" data-iconpos="notext" class="close-button">Button</a></div>
     5        <p>{'<br>'|@implode:$errors}</p>
    86</div>
    97{/if}
    108
    119{if not empty($infos)}
    12 <div class="infos">
    13   <ul>
    14     {foreach from=$infos item=info}
    15     <li>{$info}</li>
    16     {/foreach}
    17   </ul>
     10<div class="ui-bar ui-bar-b infos">
     11  <h3>{'Info'|@translate}</h3>
     12        <div><a href="#" data-role="button" data-icon="delete" data-iconpos="notext" class="close-button">Button</a></div>
     13        <p>{'<br>'|@implode:$infos}</p>
    1814</div>
    1915{/if}
     16
     17{footer_script}{literal}
     18$(document).ready(function () {
     19  $('.close-button').click(function() {
     20    $(this).parents('.ui-bar').remove();
     21  });
     22});
     23{/literal}{/footer_script}
  • trunk/themes/smartpocket/template/menubar.tpl

    r13182 r13234  
    11<select name="identification" id="identification" data-icon="grid" data-iconpos="notext" data-native-menu="false">
    22
    3   <option value="" data-placeholder="true">{'Identification'|@translate}</option>
     3  <option></option>
     4  <optgroup label="{'Identification'|@translate}">
    45
    56        {if isset($U_REGISTER)}
     
    1920        {/if}
    2021
     22  </optgroup>
     23
    2124</select>
    2225
  • trunk/themes/smartpocket/template/profile.tpl

    r13182 r13234  
     1{include file='infos_errors.tpl'}
    12<div data-role="content">
    2 {include file='infos_errors.tpl'}
    33{$PROFILE_CONTENT}
    44</div>
  • trunk/themes/smartpocket/template/profile_content.tpl

    r13182 r13234  
    1 
    21<form method="post" name="profile" action="{$F_ACTION}" id="profile" class="properties">
    32
     
    3130{if $ALLOW_USER_CUSTOMIZATION}
    3231  <div data-role="fieldcontain">
     32  <label for="nb_image_page">{'Number of photos per page'|@translate}</label>
     33  <input type="range" name="nb_image_page" id="nb_image_page" value="{$NB_IMAGE_PAGE}" min="1" max="100" />
     34  </div>
     35
     36  <div data-role="fieldcontain">
    3337  <label for="language">{'Language'|@translate}</label>
    3438  {html_options name=language options=$language_options selected=$language_selection}
     
    3943  <div data-role="fieldcontain">
    4044    {if $ALLOW_USER_CUSTOMIZATION}
    41     <input type="hidden" name="nb_image_page" value="{$NB_IMAGE_PAGE}">
    4245    <input type="hidden" name="theme" value="{$template_selection}">
    4346    <input type="hidden" name="recent_period" value="{$RECENT_PERIOD}">
  • trunk/themes/smartpocket/template/thumbnails.tpl

    r13182 r13234  
    33{combine_script id='photoswipe' path='themes/smartpocket/js/code.photoswipe.jquery.min.js' require='klass,jquery.mobile'}
    44
    5 {define_derivative name='derivative_params_thumb' width=150 height=150 crop=true}
     5{define_derivative name='derivative_params_thumb' width=120 height=120 crop=true}
    66{define_derivative name='derivative_params_full' type='large'}
    77
     
    1111    var options = {
    1212      jQueryMobile: true,
    13       //allowUserZoom: false,
    1413      imageScaleMethod: "fitNoUpscale"
    1514    };
    1615    $(".thumbnails a").photoSwipe(options);
    17     $(".thumbnails img").load(function() { $(this).css('border', '1px solid #3c3c3c') });
     16    $(document).bind('orientationchange', set_thumbnails_width);
     17    set_thumbnails_width();
    1818  });
    1919}(window, window.jQuery, window.Code.PhotoSwipe));
     20
     21function set_thumbnails_width() {
     22  nb_thumbs = Math.max(3, Math.ceil($('.thumbnails').width() / 130));
     23  width = Math.floor(1000000 / nb_thumbs) / 10000;
     24  $('.thumbnails li').css('width', width+'%');
     25}
     26
    2027{/literal}{/footer_script}
    21 <div data-role="content">
    2228<ul class="thumbnails">
    23 {foreach from=$thumbnails item=thumbnail}
     29{foreach from=$thumbnails item=thumbnail}{strip}
     30{if isset($page_selection[$thumbnail.id])}
    2431        <li>
    2532          <a href="{$pwg->derivative_url($derivative_params_full, $thumbnail.src_image)}" rel="external">
     
    2734    </a>
    2835  </li>
    29 {/foreach}
     36{else}
     37        <li style="display:none;">
     38          <a href="{$pwg->derivative_url($derivative_params_full, $thumbnail.src_image)}" rel="external"></a>
     39  </li>
     40{/if}
     41{/strip}{/foreach}
    3042</ul>
    31 </div>
    3243{/if}
  • trunk/themes/smartpocket/theme.css

    r13182 r13234  
    33
    44.title { margin: 10px; text-align: center; }
     5.title .ui-btn { margin-top: -5px; }
    56.menubar { float: right; }
    67.home_button { float: left; }
     8.pwg_footer h6 { margin: 8px; text-align:right;}
     9
     10.errors  h3, .infos  h3{ float:left; margin-top:8px; }
     11.errors div, .infos div { float:right; margin-top:4px; }
     12.errors p, .infos p { clear:both; font-size:85%; margin-bottom:8px; }
    713
    814.ui-icon-profil { background-image: url("images/profil.png"); background-color: transparent; }
    915
    1016.ui-content { overflow: hidden; }
    11 .ui-field-contain { padding: 5px; border: 0; }
     17.ui-field-contain, .ui-br { padding: 5px; border: 0 !important; }
    1218
    1319.thumbnails { list-style: none; padding: 0; margin: 0; }
    1420.thumbnails:after { clear: both; content: "."; display: block; height: 0; visibility: hidden; }
    15 .thumbnails li { float: left; width: 33.33333333%; }
     21.thumbnails li { float: left; }
    1622.thumbnails li a { display: block; margin: 5px; }
    1723.thumbnails li img { display: block; width: 100%; height: auto; }
  • trunk/themes/smartpocket/themeconf.inc.php

    r13182 r13234  
    1212  'mobile' => true,
    1313);
     14
     15//Retrive all pictures on thumbnails page
     16add_event_handler('loc_index_thumbnails_selection', 'sp_select_all_thumbnails');
     17
     18function sp_select_all_thumbnails($selection)
     19{
     20  global $page, $template;
     21
     22  $template->assign('page_selection', array_flip($selection));
     23
     24  return $page['items'];
     25}
     26
    1427?>
Note: See TracChangeset for help on using the changeset viewer.