Changeset 7810


Ignore:
Timestamp:
Nov 18, 2010, 1:47:53 AM (10 years ago)
Author:
LucMorizur
Message:

Validity date : ... pfew !

Location:
extensions/event_cats/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/autolog_new.inc.php

    r7661 r7810  
    118118    FROM `".IMAGE_CATEGORY_TABLE."`
    119119  "))) == 0),
    120   'month_list'             => $month_list, /*
     120  'month_list'             => $month_list,
    121121  'ec_current_day'         => intval(date('j')),
    122122  'ec_current_month'       => intval(date('n')),
    123123  'ec_current_year'        => intval(date('Y')),
     124  'ec_current_time'        => date('H').":".date('i'), /*
    124125  'ec_server_timestamp'    => date('H:i'), */
    125126  'ec_ap_ok'               => defined('ADD_PAGES_TABLE'),
  • extensions/event_cats/admin/template/autolog_new.js

    r7693 r7810  
    704704}
    705705
    706 function ec_update_ts() {
     706function ec_update_ts() { /*
    707707  if (de('ec_valid_date_on_id').checked == '')
    708708   de('ec_valid_date_on_id').checked = 'checked';
     
    722722  // For tests purpose, must be removed
    723723  de('ec_span_tst_id').innerHTML = 'valid_timestamp : ' + valid_timestamp;
    724   // For tests purpose, must be removed
     724  // For tests purpose, must be removed */
    725725}
    726726
  • extensions/event_cats/admin/template/autolog_new.tpl

    r7693 r7810  
    316316      <tr>
    317317        <td style="vertical-align:top; margin-top:0;">
    318           <p style = "text-align:left; margin-bottom:0.5em;">
     318          <p style = "text-align: left; padding-bottom: 1em; padding-top: 0; margin-top: 0pt;">
    319319            <label for = "ec_valid_date_on_id">
    320320              <input type = "checkbox" name = "ec_valid_date_on" id = "ec_valid_date_on_id">
     
    323323          </p>
    324324          <p style = "text-align:left;">
    325             <select id = "ec_validity_day_id" name = "ec_validity_day" onchange = "ec_update_ts();">
    326               <option value = "0">--</option>
     325            <input id = "ec_date_today_btn_id" type = "button" value = "Aujourd'hui" onclick = "">
     326          </p>
     327          <p style = "text-align:left;">
     328            <select id = "ec_validity_day_id" name = "ec_validity_day" {* onchange = "ec_update_ts();" *} >
     329              <option value = "0">——</option>
    327330              {section name=day start=1 loop=32}
    328                 <option value = "{$smarty.section.day.index}">
     331                <option value = "{$smarty.section.day.index}" {if $smarty.section.day.index == 14} selected = "selected" {/if} >
    329332                  {$smarty.section.day.index}
    330333                </option>
    331334              {/section}
    332335            </select>
    333             <select id = "ec_validity_month_id" name = "ec_validity_month" onchange = "ec_update_ts();">
    334               {html_options options=$month_list}
     336            <select id = "ec_validity_month_id" name = "ec_validity_month" {* onchange = "ec_update_ts();" *} >
     337              {html_options options=$month_list selected=11}
    335338            </select>
    336             <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4" maxlength = "4" value = "" onchange = "ec_update_ts();">
    337             <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" size = "5" maxlength = "5" value = "" onchange = "ec_update_ts();">
    338            
    339             {* <!-- ec_linked_date_id représente la date indiquée par les listes déroulantes, et permet de limiter
    340                     le choix dans la date, en l'occurrence à des dates uniquement postérieures (grâce au 6° paramètre de pwg_initialization_datepicker) --> *}
    341             <input id = "ec_linked_date_id" name = "ec_linked_date" type = "hidden" size = "10" disabled = "disabled">
     339            <input id = "ec_validity_year_id" name = "ec_validity_year" type = "text" size = "4" maxlength = "4" value = "2010" {* onchange = "ec_update_ts();" *} >
     340            <input id = "ec_validity_time_id" name = "ec_validity_time" type = "text" size = "5" maxlength = "5" value = "22:50" {* onchange = "ec_update_ts();" *} >
     341            <input id = "ec_linked_date_id" name = "ec_linked_date_id" type = "hidden" size = "10" disabled = "disabled">
    342342          </p>
    343343          <p style = "text-align:left;">
     
    353353            </select>
    354354          </p>
    355           <p style = "text-align:left;">
    356             <input id = "ec_date_today_btn_id" type = "button" value = "Aujourd'hui" onclick = "">
     355          <p style = "display:none;">
     356            <!-- jQuery datepicker : voir http://fr.piwigo.org/forum/viewtopic.php?id=19042 -->
     357            <input id = "ec_min_date_id" name = "ec_min_date_id" type = "hidden" size = "10" disabled = "disabled">
    357358          </p>
    358359          {* <!-- For tests purpose ; must be removed --> *}
     
    367368            <tr>
    368369              <td style = "text-align:right; vertical-align:top; font-weight:bold; padding-right:1em;">
    369                 Page à utiliser après que le code a expiré&nbsp;:
     370                Page à utiliser après&nbsp;<br>
     371                expiration du code&nbsp;:&nbsp;
    370372              </td>
    371373              <td style = "text-align:left;">
    372                 <label for = "ec_date_unknown_0_id">
    373                   <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id">
    374                   {'Home'|@translate}
    375                 </label><br>
    376                 <label for = "ec_date_unknown_1_id">
    377                   <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id">
    378                   {'Access denied'|@translate}
    379                 </label><br>
    380                 {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
    381                 <label class = "ec_date_block" for = "ec_date_in_up_aps_id" {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {/if} >
    382                   <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id">
    383                   {'Additional Page'|@translate}<br>
    384                   <select class = "categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" >
    385                     {html_options options = $ec_lists.add_pages}
    386                   </select>
    387                 </label>
     374                <ul style = "list-style-type:none; list-style-position:inside;">
     375                  <li style = "margin-bottom:0;">
     376                    <label for = "ec_date_unknown_0_id">
     377                      <input type = "radio" name = "ec_date_unknown" value = "0" id = "ec_date_unknown_0_id">
     378                      {'Home'|@translate}
     379                    </label>
     380                  </li>
     381                  <li style = "margin-bottom:0;">
     382                    <label for = "ec_date_unknown_1_id">
     383                      <input type = "radio" name = "ec_date_unknown" value = "1" id = "ec_date_unknown_1_id">
     384                      {'Access denied'|@translate}
     385                    </label>
     386                  </li>
     387                  {* <!-- Additionnal Page, provided the plugin is activated and at least one Add. P. is available --> *}
     388                  <li {if !$ec_ap_ok or count($ec_lists.add_pages) == 0} style = "display:none;" {else} style = "margin-bottom:0;" {/if} >
     389                    <label class = "ec_date_block" for = "ec_date_in_up_aps_id">
     390                      <input type = "radio" name = "ec_date_unknown" value = "2" id = "ec_date_unknown_2_id">
     391                      {'Additional Page'|@translate}<br>
     392                      <select class = "categoryList" name = "ec_date_in_up_aps" size = "30" id = "ec_date_in_up_aps_id" >
     393                        {html_options options = $ec_lists.add_pages}
     394                      </select>
     395                    </label>
     396                  </li>
     397                </ul>
    388398              </td>
    389399            </tr>
     
    406416<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
    407417<script type = "text/javascript"><!--
     418  pwg_initialization_datepicker("#ec_validity_day_id", "#ec_validity_month_id",
     419   "#ec_validity_year_id", "#ec_min_date_id", null, null, null);
     420  pwg_initialization_datepicker("#ec_validity_day_id", "#ec_validity_month_id",
     421   "#ec_validity_year_id", "#ec_linked_date_id", null, "#ec_min_date_id", null);
    408422  ec_is_creation                          = {if $ec_is_creation}true{else}false{/if};
    409423  ec_validity_on                          = {if $ec_validity_on}true{else}false{/if};
     
    439453  {/foreach}
    440454  ec_build_ec_lists();
    441   pwg_initialization_datepicker("#ec_validity_day_id", "#ec_validity_month_id",
    442    "#ec_validity_year_id", "#ec_linked_date_id", null, "#ec_linked_date_id");
    443455  ec_init();
    444456  //-->
Note: See TracChangeset for help on using the changeset viewer.