Changeset 31406


Ignore:
Timestamp:
Mar 8, 2016, 11:03:01 AM (5 years ago)
Author:
ddtddt
Message:

[extensions] - manage_properties_photos - updade faiture batch manager

Location:
extensions/manage_properties_photos
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/manage_properties_photos/admin/admin.tpl

    r30702 r31406  
    145145                    <span id="ppshow{$infophoto.IDINFOPHO}" {if ($infophoto.AIPACTIVE==0)}style="display: none"{/if}class="graphicalCheckbox icon-check mouse ppshow" data-id="{$infophoto.IDINFOPHO}" data-link2="{$infophoto.U_SHOW}">{'Hide'|@translate}</span>
    146146                    {if ($infophoto.AIPEDIT==1)}
    147                     <img class="edit_libinfo mouse" src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png" data-id="{$infophoto.IDINFOPHO}" data-lib="{$infophoto.AIPWORDING2}" data-hide="{$infophoto.AIPACTIVE}" alt="{'edit'|@translate}" title="{'edit'|@translate}" />
    148                     <a href="{$infophoto.U_DELETE}" onclick="return confirm( document.getElementById('btn_delete').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');">
    149                       <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png" id="btn_delete" alt="{'delete'|@translate}" title="{'Delete'|@translate}" />
    150                     </a>
     147                                        | <span class="edit_libinfo mouse icon-pencil" data-id="{$infophoto.IDINFOPHO}" data-lib="{$infophoto.AIPWORDING2}" data-hide="{$infophoto.AIPACTIVE}"/>{'Edit'|@translate}</span>
     148                                        | <a href="{$infophoto.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><span class="icon-trash"></span>{'delete'|@translate}</a>
    151149                    {/if}
    152150                </span>
  • extensions/manage_properties_photos/initadmin.php

    r31363 r31406  
    5656 load_language('plugin.lang', ADD_PROP_PHOTO_PATH);
    5757        global $template;
     58       
     59$q = 'SELECT 1 FROM ' . ADD_PROP_PHOTO_TABLE . ' WHERE edit=1';
     60        $test = pwg_query($q);
     61        $row = pwg_db_fetch_assoc($test);
     62        if (count($row) > 0) {
     63               
    5864  $propertieslist = array();
    5965  $propertieslist2 = tab_add_info_by_photo();
     
    7884    'CONTENT' => $template->parse('MMPP', true)
    7985        ));
     86        }
    8087 }
    8188 
     
    8794    global $page,$template,$prefixeTable;
    8895   
    89     if (empty($_POST['check_MPP']))
     96        $id_prop_pho= $_POST['IDMPP'];
     97        $data= $_POST['dataglob'];     
     98       
     99    if (!empty($_POST['check_MPP']))
    90100    {
    91 
    92           $template->assign('PLUG_MPP', $_POST['dataglob']);
    93           $template->assign('SELECTEDMPP', $_POST['IDMPP']);
    94       array_push($page['warnings'], l10n('You need to confirm'));
     101    foreach ($collection as $image_id)
     102      {
     103                $query = 'DELETE FROM ' . $prefixeTable . 'add_properties_photos_data WHERE id_img=' . $image_id . ' AND id_prop_pho=' . $id_prop_pho;
     104                pwg_query($query);
     105      }
    95106    }
    96107    else
    97108    {
    98 $id_prop_pho= $_POST['IDMPP'];
    99 $data= $_POST['dataglob'];             
    100          
    101109    foreach ($collection as $image_id)
    102110      {
  • extensions/manage_properties_photos/language/en_UK/plugin.lang.php

    r31363 r31406  
    3333$lang['Properties List'] = 'Properties List';
    3434$lang['Properties additionals'] = 'Properties additionals';
    35 $lang['You need to confirm'] = 'You need to confirm';
    3635$lang['Change photos properties'] = 'Change photos properties';
     36$lang['delete data this property'] = 'delete data this property';
     37$lang['Choose a property'] = 'Choose a property';
  • extensions/manage_properties_photos/language/fr_FR/plugin.lang.php

    r31364 r31406  
    3131$lang['Property delete'] = 'Supprimer la propriété';
    3232$lang['Property photo add'] = 'Ajouter propriété à la photo';
    33 $lang['You need to confirm'] = 'Vous devez confirmer';
    3433$lang['Change photos properties'] = 'Changer les propriétés des photos';
     34$lang['delete data this property'] = 'supprimer des données de la propriété';
     35$lang['Choose a property'] = 'Choisir une propriété';
  • extensions/manage_properties_photos/main.inc.php

    r31361 r31406  
    3030if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    3131
    32 global $prefixTable;
     32global $prefixeTable;
    3333
    3434define('ADD_PROP_PHOTO_DIR' , basename(dirname(__FILE__)));
  • extensions/manage_properties_photos/mmp.tpl

    r31360 r31406  
     1{footer_script}
     2jQuery(document).ready(function(){
     3  $("input[name=check_MPP]").change(function(){
     4    if($(this).is(':checked')){
     5          $('#changepro').hide();
     6    }else{
     7          $('#changepro').show();
     8    }
     9  });
     10});
     11{/footer_script}
    112<span id="persompp">
    2 {html_options name="IDMPP" options=$propertieslist selected=$SELECTEDMPP}
    3 <input type="text" size="150" maxlength="250" {if $useED==1}placeholder="{'Use Extended Description tags...'|@translate}"{/if} name="dataglob" value="{$PLUG_MPP}" />
    4 <br />
    5 <input type="checkbox" name="check_MPP"> {'confirm'|@translate}
     13  {'Choose a property'|@translate}
     14  <br />
     15  {html_options name="IDMPP" options=$propertieslist selected=$SELECTEDMPP}
     16  <br />
     17  <br />
     18  <input id="check_MPP" type="checkbox" name="check_MPP"> {'delete data this property'|@translate}<br />
     19  <div id="changepro">
     20    <form method="post" >
     21      <textarea rows="3" cols="100" {if $useED==1}placeholder="{'Use Extended Description tags...'|@translate}"{/if} name="dataglob">{$PLUG_MPP}</textarea>
     22    </form>
     23  </div>
    624</span>
Note: See TracChangeset for help on using the changeset viewer.