source: extensions/photoWidget/template/admin.tpl @ 20367

Last change on this file since 20367 was 19908, checked in by nikrou, 12 years ago

Make plugin compatible with piwigo 2.4
Improve selection of albums (auto-complete)

File size: 3.1 KB
Line 
1{combine_css path="$PWG_PHOTO_WIDGET_PLUGIN_CSS/admin.css"}
2{combine_css path="themes/default/js/plugins/chosen.css"}
3{combine_css path="$PWG_PHOTO_WIDGET_PLUGIN_CSS/colorpicker.css"}
4
5{combine_script id="jquery.chosen" load="footer" path="themes/default/js/plugins/chosen.jquery.min.js"}
6{combine_script id="colorpicker" require="jquery" path="$PWG_PHOTO_WIDGET_PLUGIN_JS/colorpicker.js"}
7
8{footer_script require="colorpicker"}
9{literal}
10$(function() {
11    $('input.pwg-picker')
12        .each(function() {
13            if ($(this).val() !== undefined) {
14                $(this).css('background-color', '#'+$(this).val());
15            }
16        })
17            .ColorPicker({
18                onSubmit: function(hsb, hex, rgb, el) {
19                    $(el).val(hex);
20                    $(el).ColorPickerHide();
21                    $(el).css('background-color', '#'+hex);
22                },
23                onBeforeShow: function () {
24                    $(this).ColorPickerSetColor(this.value);
25                }
26            })
27        .bind('keyup', function(){
28            $(this).ColorPickerSetColor(this.value);
29        });
30});
31{/literal}
32{/footer_script}
33
34
35{footer_script require="jquery.chosen"}
36{literal}
37$(function() {
38    $('input[name=pw_all_categories]').change(function() {
39        if ($(this).attr('value')==0) {
40            $('#pw-select-categories').removeClass('hide');
41        } else {
42            $('#pw-select-categories').addClass('hide');
43        }
44    });
45
46    $('#pw-select-categories select').chosen();
47});
48{/literal}
49{/footer_script}
50
51<div class="titrePage">
52  <h2>{'Photo Widget Plugin'|@translate}</h2>
53</div>
54
55<p>
56{'That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.'|@translate}
57</p>
58
59<p>
60{'You can choose that mode for displaying one, severals or all categories'|@translate}
61<p>
62
63<form method="post" action="" class="general">
64<fieldset>
65  <legend>{'Main configuration'|@translate}</legend>
66  <p class="field radio"><span>{'All categories'|@translate} ?</span>
67    {html_radios name="pw_all_categories" options=$PW_CAT_CHOICES selected=$PW_ALL_CATEGORIES}
68  </p>
69
70  <p class="field pw-categories{if $PW_ALL_CATEGORIES==1} hide{/if}" id="pw-select-categories">
71    <label>{'Applicable categorie(s)'|@translate}</label>
72    <select data-placeholder="{'Applicable categorie(s)'|@translate}" name="pw_categories[]" multiple="multiple" size="{$pw_categories|@count|@max:3}">
73      <option value="__none__"></option>
74      {html_options options=$all_categories selected=$all_categories_selected}
75    </select>
76  </p>
77</fieldset>
78<fieldset>
79  <legend>{'Animation size'|@translate}</legend>
80  <p class="field">
81    <label>{'Width'|@translate}
82      <input type="text" name="pw_width" value="{$PW_WIDTH}">
83    </label>
84  </p>
85  <p class="field">
86    <label>{'Height'|@translate}
87      <input type="text" name="pw_height" value="{$PW_HEIGHT}">
88    </label>
89  </p>
90</fieldset>
91<fieldset>
92  <legend>{'Animation background color'|@translate}</legend>
93  <div id="picker" style="float: right;"></div>
94  <p class="field">
95    <label>{'Color'|@translate}</label>
96    <input class="pwg-picker" type="text" name="pw_bgcolor" value="{$PW_BGCOLOR}">
97  </p>
98</fieldset>
99<p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
100</form>
Note: See TracBrowser for help on using the repository browser.