1 | {html_head} |
---|
2 | <script type="text/javascript" src="themes/Slimi/admin/js/farbtastic.js" ></script> |
---|
3 | <script type="text/javascript" src="themes/default/js/ui/minified/jquery.ui.slider.min.js"></script> |
---|
4 | |
---|
5 | <link rel="stylesheet" href="themes/Slimi/admin/theme.css" /> |
---|
6 | {/html_head} |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | <div class="titrePage"> |
---|
11 | <h2>Slimi</h2> |
---|
12 | </div> |
---|
13 | |
---|
14 | <form action="" method="post"> |
---|
15 | <fieldset> |
---|
16 | <legend>{'Open picture'|@translate}</legend> |
---|
17 | <div id="option"> |
---|
18 | <div class="switcher"> |
---|
19 | <div class="opt"> |
---|
20 | Lightbox |
---|
21 | </div> |
---|
22 | <div class="opt"> |
---|
23 | {'Picture page'|@translate} |
---|
24 | </div> |
---|
25 | |
---|
26 | <div> |
---|
27 | <input type="text" class="range min-1 max-2" name="lytebox_slimi" value="{$selected_lytebox_slimi}" /> |
---|
28 | </div> |
---|
29 | </div> |
---|
30 | </div> |
---|
31 | </fieldset> |
---|
32 | {footer_script}{literal} |
---|
33 | jQuery(function($){ |
---|
34 | |
---|
35 | $('.range').each(function(){ |
---|
36 | var cls = $(this).attr('class'); |
---|
37 | var matches = cls.split(/([a-zA-Z]+)\-([0-9]+)/g); |
---|
38 | var elem = $(this).parent(); |
---|
39 | var options = {}; |
---|
40 | var input = elem.find('input'); |
---|
41 | elem.append('<div class="uirange"></div>'); |
---|
42 | |
---|
43 | for(i in matches){ |
---|
44 | i = i * 1; |
---|
45 | if(matches[i] == 'min'){ |
---|
46 | options.min = matches[i+1]*1; |
---|
47 | } |
---|
48 | if(matches[i] == 'max'){ |
---|
49 | options.max = matches[i+1]*1; |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | options.slide = function(event, ui){ |
---|
54 | elem.find('label span').empty().append(ui.value); |
---|
55 | input.val(ui.value); |
---|
56 | } |
---|
57 | options.value = input.val(); |
---|
58 | options.range = 'min'; |
---|
59 | elem.find('.uirange').slider(options); |
---|
60 | |
---|
61 | elem.find('label span').empty().append(input.val()); |
---|
62 | input.hide(); |
---|
63 | }); |
---|
64 | |
---|
65 | }); |
---|
66 | |
---|
67 | {/literal}{/footer_script} |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | <fieldset> |
---|
72 | <legend>{'Color of theme'|@translate}</legend> |
---|
73 | <div id="textcolor"> |
---|
74 | <div class="form-item"><label>Background color:</label><input type="text" name="bg_slimi" class="colorwell" value="{$selected_bg_slimi}" /></div> |
---|
75 | <div class="form-item"><label>Color picture of cardre:</label><input type="text" name="bd_slimi" class="colorwell" value="{$selected_bd_slimi}" /></div> |
---|
76 | <div class="form-item"><label>Color title:</label><input type="text" name="title_slimi" class="colorwell" value="{$selected_title_slimi}" /></div> |
---|
77 | <p><input type="submit" name="default" value="{'Default'|@translate}" ></p> |
---|
78 | </div> |
---|
79 | |
---|
80 | <div id="picker"></div> |
---|
81 | |
---|
82 | |
---|
83 | |
---|
84 | </fieldset> |
---|
85 | {footer_script}{literal} |
---|
86 | $(document).ready(function() { |
---|
87 | var f = $.farbtastic('#picker'); |
---|
88 | var p = $('#picker').css('opacity', 1); |
---|
89 | var selected; |
---|
90 | $('.colorwell') |
---|
91 | .each(function () { f.linkTo(this); $(this).css('opacity', 1); }) |
---|
92 | .focus(function() { |
---|
93 | if (selected) { |
---|
94 | $(selected).css('opacity', 1).removeClass('colorwell-selected'); |
---|
95 | } |
---|
96 | f.linkTo(this); |
---|
97 | p.css('opacity', 1); |
---|
98 | $(selected = this).css('opacity', 1).addClass('colorwell-selected'); |
---|
99 | }); |
---|
100 | }); |
---|
101 | |
---|
102 | {/literal}{/footer_script} |
---|
103 | <p><input type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}> |
---|
104 | </form> |
---|
105 | |
---|
106 | |
---|