Changeset 27065


Ignore:
Timestamp:
Jan 30, 2014, 10:01:15 AM (7 years ago)
Author:
plg
Message:

compatibility with Piwigo 2.6: jQuery 1.9+, simpler use of datepicker, no more is_adviser()

Location:
extensions/AStat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/AStat/admin/astat_tools.tpl

    r16490 r27065  
     1{include file='include/datepicker.inc.tpl'}
    12
    2 {combine_script id="jquery.ui" path="themes/default/js/ui/jquery.ui.core.js"}
    3 {combine_script id="jquery.ui.datepicker" path="themes/default/js/ui/jquery.ui.datepicker.js"}
    4 {assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-"|@cat:$lang_info.code|@cat:".js"}
    5 
    6 
    7 {if "PHPWG_ROOT_PATH"|@constant|@cat:$datepicker_language|@file_exists}
    8 {combine_script id="jquery.ui.datepicker-$lang_info.code" path=$datepicker_language}
    9 {/if}
    10 
    11 {html_head}
    12 <link rel="stylesheet" type="text/css" href="themes/default/js/ui/theme/jquery.ui.datepicker.css">
    13 {/html_head}
    14 
    15 {literal}
    16 <script type="text/javascript">
     3{footer_script}{literal}
    174
    185 function enabled_purge()
     
    207  re = /\d{2}\/\d{2}\/\d{4}/i;
    218
    22   if(($('#purge_history_confirm').attr('checked')&&$('#purge_history_type0').attr('checked')&&re.test($('#purge_history_date').val()))||
    23      ($('#purge_history_confirm').attr('checked')&&!$('#purge_history_type0').attr('checked')))
     9  if(($('#purge_history_confirm').is(':checked')&&$('#purge_history_type0').is(':checked')&&re.test($('#purge_history_date').val()))||
     10     ($('#purge_history_confirm').is(':checked')&&!$('#purge_history_type0').is(':checked')))
    2411  {
    2512    $('#purge_history_button').attr('disabled', false);
     
    3623  var objbutton = document.getElementById('deleted_picture_resync_button');
    3724
    38   if($('#deleted_picture_confirm_resync').attr('checked'))
     25  if($('#deleted_picture_confirm_resync').is(':checked'))
    3926  {
    4027    $('deleted_picture_resync_button').attr('disabled', false);
     
    5744 }
    5845
    59 </script>
    60 {/literal}
     46 init();
     47
     48{/literal}{/footer_script}
    6149
    6250{if isset($datas.ASTAT_RESULT_OK)}{$datas.ASTAT_RESULT_OK}{/if}
     
    8876  <p>{$datas.ASTAT_DELETED_PICTURE_NFO}</p>
    8977  <form method="post" action="" class="general">
    90     { if isset($datas.AStat_deleted_picture_submit0) and $datas.AStat_deleted_picture_submit0 == 'yes'}
     78    {if isset($datas.AStat_deleted_picture_submit0) and $datas.AStat_deleted_picture_submit0 == 'yes'}
    9179      <p class='formtable'>
    9280        <input type="submit" value="{'AStat_tools_deleted_picture_apply'|@translate}" name="apply_tool_deleted_picture"/>
     
    167155  </form>
    168156</fieldset>
    169 
    170 <script type="text/javascript">
    171   init();
    172 </script>
  • extensions/AStat/astat_aip.class.inc.php

    r16486 r27065  
    14431443    if(isset($_POST['submit']))
    14441444    {
    1445       if(!is_adviser())
     1445      if (true) // if(!is_adviser())
    14461446      {
    14471447        reset($this->config);
     
    15741574    if(isset($_POST['apply_tool_purge_history']))
    15751575    {
    1576       if(!is_adviser())
     1576      if (true) // if(!is_adviser())
    15771577      {
    15781578        $action_result['action']='AStat_tools_purge_history';
     
    16321632    elseif(isset($_POST['apply_tool_deleted_picture_resync']))
    16331633    {
    1634       if(!is_adviser())
     1634      if (true) // if(!is_adviser())
    16351635      {
    16361636        $action_result['action']='AStat_tools_deleted_picture';
     
    16731673    elseif(isset($_POST['apply_tool_deleted_picture']))
    16741674    {
    1675       if(!is_adviser())
     1675      if (true) // if(!is_adviser())
    16761676      {
    16771677        $action_result['action']='AStat_tools_deleted_picture';
     
    16961696    elseif(isset($_POST['apply_tool_deleted_category']))
    16971697    {
    1698       if(!is_adviser())
     1698      if (true) // if(!is_adviser())
    16991699      {
    17001700        $action_result['action']='AStat_tools_deleted_category';
     
    17191719    elseif(isset($_POST['apply_tool_deleted_user']))
    17201720    {
    1721       if(!is_adviser())
     1721      if (true) // if(!is_adviser())
    17221722      {
    17231723        $action_result['action']='AStat_tools_deleted_user';
Note: See TracChangeset for help on using the changeset viewer.