source: extensions/AMetaData/admin/amd_metadata_tags.tpl @ 6950

Last change on this file since 6950 was 6950, checked in by grum, 14 years ago

Implement metadata keywords to piwigo tags convert functionnalies
Add some help text
bug:1858

File size: 2.2 KB
Line 
1
2{literal}
3<script type="text/javascript">
4
5  function displayWait()
6  {
7    $('#iListTags').html("<br>{/literal}{'g003_loading'|@translate}{literal}<br><img src='./plugins/GrumPluginClasses/icons/processing.gif'>");
8  }
9
10  function loadKeywordsList()
11  {
12    $.ajax(
13      {
14        type: "POST",
15        url: "{/literal}{$datas.urlRequest}{literal}",
16        async: true,
17        data: { ajaxfct:"admin.tags.getKeywords" },
18        success: function (msg)
19          {
20            $('#iListTags').html(msg);
21
22            $("#iListTagsNb").html(
23              "{/literal}{'g003_number_of_keywords'|@translate}{literal} "+$("#iListTags table tr").length
24            );
25          }
26      }
27    );
28  }
29
30  function convertKeywordsList()
31  {
32    keywords=new Array();
33
34    $('#iListTags input:checked').each(function (i,e)
35     {
36       re=/(\d+)$/i;
37       num=$(e).attr('id').match(re);
38       keywords.push($('#iTagValue'+num[1]).val());
39     }
40    );
41
42    displayWait();
43
44    $.ajax(
45      {
46        type: "POST",
47        url: "{/literal}{$datas.urlRequest}{literal}",
48        async: true,
49        data: { ajaxfct:"admin.tags.convertKeywords", keywords:keywords },
50        success: function (msg)
51          {
52            loadKeywordsList();
53            if(msg=='ok')
54            {
55              alert("{/literal}{'g003_convert_ok'|@translate}{literal}");
56            }
57          }
58      }
59    );
60  }
61
62</script>
63{/literal}
64
65<h2>{'g003_tags'|@translate}</h2>
66
67<div class='helps'>
68  <p>{'g003_tags_page_help'|@translate}</p>
69</div>
70
71<table id='iHeaderListTags' class="littlefont">
72  <tr>
73    <th style="min-width:340px;">{'g003_keyword'|@translate}</th>
74    <th style="width:120px;">{'g003_num_of_pictures'|@translate}</th>
75    <th style="width:120px;">{'g003_tag_in_piwigo'|@translate}</th>
76    <th style="width:120px;">{'g003_num_of_pictures_already_tagged'|@translate}</th>
77    <th style="width:10px"></th>
78  </tr>
79</table>
80<div id='iListTags' class="{$themeconf.name}">
81</div>
82<div id="iListTagsNb"></div>
83
84<input type="button" value="{'g003_convert_keywords_and_apply'|@translate}" id='iApply' onclick='convertKeywordsList();'>
85
86<script type='text/javascript'>
87  displayWait();
88  loadKeywordsList();
89</script>
Note: See TracBrowser for help on using the repository browser.