source: extensions/manage_properties_photos/admin/admin.tpl @ 31406

Last change on this file since 31406 was 31406, checked in by ddtddt, 8 years ago

[extensions] - manage_properties_photos - updade faiture batch manager

File size: 8.3 KB
Line 
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}
4jQuery(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                                        | <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>
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>
162        <legend>{'Properties additionals'|@translate}</legend>
163        <table>
164            {foreach from=$info_photos item=infophoto}
165            <tr>
166                <td style="width: 100px;"><span style="font-weight: bold; text-align: right;" >{$infophoto.AIPWORDING}</span></td>
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>
168            </tr> 
169            {/foreach}
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>
177            <tr>
178                <td colspan="2">
179                    <input class="submit" name="submitaddinfoimg" type="submit" value="{'Save'|@translate}" />
180                </td>
181           </tr>
182           </table>
183        </fieldset>
184    </form>
185</div>
186{/if}
Note: See TracBrowser for help on using the repository browser.