1 | {combine_script id='jquery.ui.sortable' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js'} |
---|
2 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
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 | |
---|
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 | }); |
---|
91 | }); |
---|
92 | {/footer_script} |
---|
93 | {html_style} |
---|
94 | .mouse:hover{ |
---|
95 | cursor:pointer; |
---|
96 | } |
---|
97 | {/html_style} |
---|
98 | |
---|
99 | |
---|
100 | <div class="titrePage"> |
---|
101 | <h2>{'Manage properties photos'|@translate}</h2> |
---|
102 | </div> |
---|
103 | {if isset ($addinfotemplate)} |
---|
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;"> |
---|
108 | <form method="post" > |
---|
109 | <fieldset> |
---|
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}"> |
---|
112 | <p class="input"> |
---|
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> |
---|
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} |
---|
118 | </p> |
---|
119 | <p class="input" style="width: 700px;"> |
---|
120 | <label for="inseractive">{'Hide'|@translate}</label> |
---|
121 | <input id="aip_hide" type="checkbox" name="inseractive" {if {$addinfo_edit2.AIPACTIF}==1}checked{/if} value="1"> |
---|
122 | <p class="actionButtons"> |
---|
123 | <input class="submit" name="submitaddAIP" type="submit" value="{'Submit'|@translate}" /> |
---|
124 | <a href="#" id="addinfoClose">{'Cancel'|@translate}</a> |
---|
125 | </p> |
---|
126 | </fieldset> |
---|
127 | </form> |
---|
128 | </div> |
---|
129 | <form id="infoOrdering" method="post" > |
---|
130 | <p id="manualOrderInfo" style="display:none; text-align: left"> |
---|
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> |
---|
135 | <legend>{'Properties List'|@translate}</legend> |
---|
136 | <ul class="categoryUl"> |
---|
137 | {foreach from=$info_photos item=infophoto} |
---|
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}"> |
---|
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}"> |
---|
140 | {$infophoto.AIPWORDING} |
---|
141 | <input type="hidden" name="infoOrd[{$infophoto.IDINFOPHO}]" value="{$infophoto.AIPORDER}"> |
---|
142 | <br /> |
---|
143 | <span class="actiononphoto" style="display: none"> |
---|
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> |
---|
146 | {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> |
---|
151 | {/if} |
---|
152 | </span> |
---|
153 | <br /> |
---|
154 | </li> |
---|
155 | {/foreach} |
---|
156 | </ul> |
---|
157 | </fieldset> |
---|
158 | </form> |
---|
159 | {/if} |
---|
160 | {if isset ($gestionD)} |
---|
161 | <div> |
---|
162 | <form method="post" > |
---|
163 | <fieldset> |
---|
164 | <legend>{'Properties additionals'|@translate}</legend> |
---|
165 | <table> |
---|
166 | {foreach from=$info_photos item=infophoto} |
---|
167 | <tr> |
---|
168 | <td style="width: 100px;"><span style="font-weight: bold; text-align: right;" >{$infophoto.AIPWORDING}</span></td> |
---|
169 | <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> |
---|
170 | </tr> |
---|
171 | {/foreach} |
---|
172 | <tr style="text-align: right;"> |
---|
173 | <td colspan="2"> |
---|
174 | {if $useED==1} |
---|
175 | <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> |
---|
176 | {/if} |
---|
177 | </td> |
---|
178 | </tr> |
---|
179 | <tr> |
---|
180 | <td colspan="2"> |
---|
181 | <input class="submit" name="submitaddinfoimg" type="submit" value="{'Save'|@translate}" /> |
---|
182 | </td> |
---|
183 | </tr> |
---|
184 | </table> |
---|
185 | </fieldset> |
---|
186 | </form> |
---|
187 | </div> |
---|
188 | {/if} |
---|