[30631] | 1 | {combine_script id='jquery.ui.sortable' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js'} |
---|
[30655] | 2 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
[30631] | 3 | {footer_script} |
---|
| 4 | jQuery(document).ready(function(){ |
---|
| 5 | jQuery(".drag_button").show(); |
---|
| 6 | jQuery(".categoryLi").css("cursor","move"); |
---|
| 7 | jQuery(".categoryUl").sortable({ |
---|
| 8 | axis: "y", |
---|
| 9 | opacity: 0.8, |
---|
| 10 | update : function() { |
---|
| 11 | jQuery("#manualOrderInfo").show(); |
---|
| 12 | } |
---|
| 13 | }); |
---|
| 14 | |
---|
| 15 | jQuery("#infoOrdering").submit(function(){ |
---|
| 16 | ar = jQuery('.categoryUl').sortable('toArray'); |
---|
| 17 | for(i=0;i < ar.length ;i++) { |
---|
| 18 | iord = ar[i].split('iord_'); |
---|
| 19 | document.getElementsByName('infoOrd[' + iord[1] + ']')[0].value = i; |
---|
| 20 | } |
---|
| 21 | }); |
---|
| 22 | |
---|
| 23 | jQuery("#cancelManualOrderInfo").click(function(){ |
---|
| 24 | jQuery(".categoryUl").sortable("cancel"); |
---|
| 25 | jQuery("#manualOrderInfo").hide(); |
---|
| 26 | }); |
---|
| 27 | |
---|
| 28 | jQuery('.categoryLi').mouseover(function(){ |
---|
| 29 | jQuery(this).children('span').show(); |
---|
| 30 | }); |
---|
| 31 | jQuery('.categoryLi').mouseout(function(){ |
---|
| 32 | jQuery(this).children('span').hide(); |
---|
| 33 | }); |
---|
| 34 | |
---|
[30702] | 35 | jQuery('#aip_sumit').click(function(){ |
---|
| 36 | jQuery("#add_info_edit").show(); |
---|
| 37 | jQuery("#leg_add").show(); |
---|
| 38 | jQuery("#leg_edit").hide(); |
---|
| 39 | jQuery('#aip_add').empty(); |
---|
| 40 | jQuery('#aip_hide').attr('checked', false); |
---|
| 41 | jQuery('#hideid').val(0); |
---|
| 42 | jQuery("textarea[name=inserwording]").focus(); |
---|
| 43 | }); |
---|
| 44 | |
---|
| 45 | jQuery("#addinfoClose").click(function(){ |
---|
| 46 | jQuery("#add_info_edit").hide(); |
---|
| 47 | }); |
---|
| 48 | |
---|
| 49 | jQuery('.edit_libinfo').click(function(){ |
---|
| 50 | var id_prop_photo=$(this).data('id'); |
---|
| 51 | var lib=$(this).data('lib'); |
---|
| 52 | var hide=$(this).data('hide'); |
---|
| 53 | jQuery("#add_info_edit").show(); |
---|
| 54 | jQuery("#leg_add").hide(); |
---|
| 55 | jQuery("#leg_edit").show(); |
---|
| 56 | jQuery('#hideid').val(id_prop_photo); |
---|
| 57 | jQuery('#aip_add').text(lib); |
---|
| 58 | if(hide==0){ |
---|
| 59 | jQuery('#aip_hide').prop('checked', false); |
---|
| 60 | }else{ |
---|
| 61 | jQuery('#aip_hide').prop('checked', true); |
---|
| 62 | } |
---|
| 63 | jQuery("textarea[name=inserwording]").focus(); |
---|
| 64 | }); |
---|
| 65 | jQuery('.pphide').click(function(){ |
---|
| 66 | var id= $(this).data('id'); |
---|
| 67 | var link= $(this).data('link2'); |
---|
| 68 | $.ajax({ |
---|
| 69 | method: 'POST', |
---|
| 70 | url: link, |
---|
| 71 | success: function(Datalc,textStatus,jqXHR) { |
---|
| 72 | jQuery('#pphide'+id).hide(); |
---|
| 73 | jQuery('#ppshow'+id).show(); |
---|
| 74 | jQuery('#iord_'+id).css("opacity","0.4"); |
---|
| 75 | } |
---|
| 76 | }); |
---|
| 77 | }); |
---|
| 78 | jQuery('.ppshow').click(function(){ |
---|
| 79 | var id= $(this).data('id'); |
---|
| 80 | var link= $(this).data('link2'); |
---|
| 81 | $.ajax({ |
---|
| 82 | method: 'POST', |
---|
| 83 | url: link, |
---|
| 84 | success: function(Datalc,textStatus,jqXHR) { |
---|
| 85 | jQuery('#pphide'+id).show(); |
---|
| 86 | jQuery('#ppshow'+id).hide(); |
---|
| 87 | jQuery('#iord_'+id).css("opacity","1"); |
---|
| 88 | } |
---|
| 89 | }); |
---|
| 90 | }); |
---|
[30631] | 91 | }); |
---|
| 92 | {/footer_script} |
---|
[30702] | 93 | {html_style} |
---|
| 94 | .mouse:hover{ |
---|
| 95 | cursor:pointer; |
---|
| 96 | } |
---|
| 97 | {/html_style} |
---|
[30631] | 98 | |
---|
| 99 | |
---|
| 100 | <div class="titrePage"> |
---|
[30702] | 101 | <h2>{'Manage properties photos'|@translate}</h2> |
---|
[30631] | 102 | </div> |
---|
| 103 | {if isset ($addinfotemplate)} |
---|
[30702] | 104 | <p class="showCreateAlbum"> |
---|
| 105 | <a href="#" id="aip_sumit" >{'Create new Property photo'|@translate} </a> |
---|
| 106 | </p> |
---|
| 107 | <div id="add_info_edit" style="display: none;"> |
---|
[30631] | 108 | <form method="post" > |
---|
| 109 | <fieldset> |
---|
[30702] | 110 | <legend><span id="leg_add">{'Create new Property photo'|@translate}</span><span id="leg_edit">{'Edit Property photo'|@translate}</span></legend> |
---|
| 111 | <input id="hideid" type="hidden" name="invisibleID" value="{$addinfo_edit2.AIPID}"> |
---|
[30631] | 112 | <p class="input"> |
---|
[30702] | 113 | <label for="inserwording">{'Wording'|@translate}</label><br /> |
---|
| 114 | <textarea {if $useED==1}placeholder="{'Use Extended Description tags...'|@translate}"{/if} style="margin-left:50px" rows="5" cols="50" class="description" name="inserwording" id="aip_add">{$addinfo_edit2.AIPDESC}</textarea> |
---|
[30655] | 115 | {if $useED==1} |
---|
| 116 | <a href="{$ROOT_URL}admin/popuphelp.php?page=extended_desc" onclick="popuphelp(this.href); return false;" title="{'Use Extended Description tags...'|translate}" style="vertical-align: middle; border: 0; margin: 0.5em;"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/help.png" class="button" alt="{'Use Extended Description tags...'|translate}'"></a> |
---|
| 117 | {/if} |
---|
[30631] | 118 | </p> |
---|
| 119 | <p class="input" style="width: 700px;"> |
---|
| 120 | <label for="inseractive">{'Hide'|@translate}</label> |
---|
[30702] | 121 | <input id="aip_hide" type="checkbox" name="inseractive" {if {$addinfo_edit2.AIPACTIF}==1}checked{/if} value="1"> |
---|
| 122 | <p class="actionButtons"> |
---|
[30631] | 123 | <input class="submit" name="submitaddAIP" type="submit" value="{'Submit'|@translate}" /> |
---|
[30702] | 124 | <a href="#" id="addinfoClose">{'Cancel'|@translate}</a> |
---|
| 125 | </p> |
---|
[30631] | 126 | </fieldset> |
---|
| 127 | </form> |
---|
[30702] | 128 | </div> |
---|
[30631] | 129 | <form id="infoOrdering" method="post" > |
---|
[30702] | 130 | <p id="manualOrderInfo" style="display:none; text-align: left"> |
---|
[30631] | 131 | <input class="submit" name="submitManualOrderInfo" type="submit" value="{'Save order'|@translate}"> |
---|
| 132 | {'... or '|@translate} <a href="#" id="cancelManualOrderInfo">{'cancel manual order'|@translate}</a> |
---|
| 133 | </p> |
---|
| 134 | <fieldset> |
---|
[30702] | 135 | <legend>{'Properties List'|@translate}</legend> |
---|
[30631] | 136 | <ul class="categoryUl"> |
---|
| 137 | {foreach from=$info_photos item=infophoto} |
---|
[30702] | 138 | <li {if ($infophoto.AIPACTIVE==0)}style="opacity: 1;"{else}style="opacity: 0.4;"{/if}class="categoryLi{if ($infophoto.AIPEDIT==1)} virtual_cat{/if}" id="iord_{$infophoto.IDINFOPHO}"> |
---|
[30631] | 139 | <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}"> |
---|
[30702] | 140 | {$infophoto.AIPWORDING} |
---|
[30631] | 141 | <input type="hidden" name="infoOrd[{$infophoto.IDINFOPHO}]" value="{$infophoto.AIPORDER}"> |
---|
| 142 | <br /> |
---|
| 143 | <span class="actiononphoto" style="display: none"> |
---|
[30702] | 144 | <span id="pphide{$infophoto.IDINFOPHO}" {if ($infophoto.AIPACTIVE==1)}style="display: none"{/if}class="graphicalCheckbox icon-check-empty mouse pphide" data-id="{$infophoto.IDINFOPHO}" data-link2="{$infophoto.U_HIDE}">{'Hide'|@translate}</span> |
---|
| 145 | <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> |
---|
[30631] | 146 | {if ($infophoto.AIPEDIT==1)} |
---|
[31406] | 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> |
---|
[30631] | 149 | {/if} |
---|
| 150 | </span> |
---|
| 151 | <br /> |
---|
| 152 | </li> |
---|
| 153 | {/foreach} |
---|
| 154 | </ul> |
---|
| 155 | </fieldset> |
---|
| 156 | </form> |
---|
| 157 | {/if} |
---|
| 158 | {if isset ($gestionD)} |
---|
| 159 | <div> |
---|
| 160 | <form method="post" > |
---|
| 161 | <fieldset> |
---|
[30702] | 162 | <legend>{'Properties additionals'|@translate}</legend> |
---|
[30631] | 163 | <table> |
---|
| 164 | {foreach from=$info_photos item=infophoto} |
---|
| 165 | <tr> |
---|
[30702] | 166 | <td style="width: 100px;"><span style="font-weight: bold; text-align: right;" >{$infophoto.AIPWORDING}</span></td> |
---|
[30655] | 167 | <td><input type="text" size="150" maxlength="250" {if $useED==1}placeholder="{'Use Extended Description tags...'|@translate}"{/if} name="data[{$infophoto.IDINFOPHO}]" value="{$infophoto.AIPDATA}" /></td> |
---|
[30631] | 168 | </tr> |
---|
| 169 | {/foreach} |
---|
[30655] | 170 | <tr style="text-align: right;"> |
---|
| 171 | <td colspan="2"> |
---|
| 172 | {if $useED==1} |
---|
| 173 | <a href="{$ROOT_URL}admin/popuphelp.php?page=extended_desc" onclick="popuphelp(this.href); return false;" title="{'Use Extended Description tags...'|translate}" style="vertical-align: middle; border: 0; margin: 0.5em;"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/help.png" class="button" alt="{'Use Extended Description tags...'|translate}'"></a> |
---|
| 174 | {/if} |
---|
| 175 | </td> |
---|
| 176 | </tr> |
---|
[30631] | 177 | <tr> |
---|
| 178 | <td colspan="2"> |
---|
[30637] | 179 | <input class="submit" name="submitaddinfoimg" type="submit" value="{'Save'|@translate}" /> |
---|
[30631] | 180 | </td> |
---|
| 181 | </tr> |
---|
| 182 | </table> |
---|
| 183 | </fieldset> |
---|
| 184 | </form> |
---|
| 185 | </div> |
---|
| 186 | {/if} |
---|