[10988] | 1 | {combine_css path="$PWG_PHOTO_WIDGET_PLUGIN_CSS/admin.css"} |
---|
[19908] | 2 | {combine_css path="themes/default/js/plugins/chosen.css"} |
---|
[10988] | 3 | {combine_css path="$PWG_PHOTO_WIDGET_PLUGIN_CSS/colorpicker.css"} |
---|
| 4 | |
---|
[19908] | 5 | {combine_script id="jquery.chosen" load="footer" path="themes/default/js/plugins/chosen.jquery.min.js"} |
---|
[10988] | 6 | {combine_script id="colorpicker" require="jquery" path="$PWG_PHOTO_WIDGET_PLUGIN_JS/colorpicker.js"} |
---|
| 7 | |
---|
| 8 | {footer_script require="colorpicker"} |
---|
[5611] | 9 | {literal} |
---|
| 10 | $(function() { |
---|
[19908] | 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 | }); |
---|
[5647] | 30 | }); |
---|
[19908] | 31 | {/literal} |
---|
| 32 | {/footer_script} |
---|
[5647] | 33 | |
---|
[19908] | 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(); |
---|
[5611] | 47 | }); |
---|
| 48 | {/literal} |
---|
[10988] | 49 | {/footer_script} |
---|
[5611] | 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> |
---|
[5613] | 60 | {'You can choose that mode for displaying one, severals or all categories'|@translate} |
---|
[5611] | 61 | <p> |
---|
| 62 | |
---|
| 63 | <form method="post" action="" class="general"> |
---|
| 64 | <fieldset> |
---|
[10988] | 65 | <legend>{'Main configuration'|@translate}</legend> |
---|
| 66 | <p class="field radio"><span>{'All categories'|@translate} ?</span> |
---|
[5647] | 67 | {html_radios name="pw_all_categories" options=$PW_CAT_CHOICES selected=$PW_ALL_CATEGORIES} |
---|
[5611] | 68 | </p> |
---|
| 69 | |
---|
[5647] | 70 | <p class="field pw-categories{if $PW_ALL_CATEGORIES==1} hide{/if}" id="pw-select-categories"> |
---|
[10988] | 71 | <label>{'Applicable categorie(s)'|@translate}</label> |
---|
[19908] | 72 | <select data-placeholder="{'Applicable categorie(s)'|@translate}" name="pw_categories[]" multiple="multiple" size="{$pw_categories|@count|@max:3}"> |
---|
[5647] | 73 | <option value="__none__"></option> |
---|
[19908] | 74 | {html_options options=$all_categories selected=$all_categories_selected} |
---|
[5611] | 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> |
---|