1 | {combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"} |
---|
2 | {combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"} |
---|
3 | {combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"} |
---|
4 | {combine_script id="jquery.ui.slider" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.slider.js"} |
---|
5 | |
---|
6 | <h2>{'gmaps_config'|@translate}</h2> |
---|
7 | |
---|
8 | {literal} |
---|
9 | <script type='text/javascript'> |
---|
10 | |
---|
11 | function configManager() |
---|
12 | { |
---|
13 | this.init = function () |
---|
14 | { |
---|
15 | $("#iBDPopupAutomaticSizeSlider").slider( |
---|
16 | { |
---|
17 | min:50, |
---|
18 | max:95, |
---|
19 | step:1, |
---|
20 | value:{/literal}{$gmapsConfig.popupAutomaticSize*100}{literal}, |
---|
21 | slide: function(event, ui) { changeSize(ui.value); } |
---|
22 | }); |
---|
23 | changeSize($("#iBDPopupAutomaticSizeSlider").slider('value')); |
---|
24 | } |
---|
25 | |
---|
26 | /** |
---|
27 | * change the popup ratio |
---|
28 | * @param value : the ratio |
---|
29 | */ |
---|
30 | var changeSize = function (value) |
---|
31 | { |
---|
32 | $('#iBDPopupAutomaticSizeDisplay').html(value+"% {/literal}{'gmaps_of_window_size'|@translate}{literal}"); |
---|
33 | $('#iBDPopupAutomaticSizeValue').val(value/100); |
---|
34 | }; |
---|
35 | |
---|
36 | this.submit = function () |
---|
37 | { |
---|
38 | $('#iForm').get(0).submit(); |
---|
39 | } |
---|
40 | |
---|
41 | this.init(); |
---|
42 | } |
---|
43 | |
---|
44 | </script> |
---|
45 | {/literal} |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | <form method="POST" action="" id='iForm'> |
---|
50 | |
---|
51 | |
---|
52 | <table class="formtable"> |
---|
53 | <tr> |
---|
54 | <td>{'gmaps_popup_automatic_size'|@translate}</td> |
---|
55 | <td> |
---|
56 | <input type="hidden" id="iBDPopupAutomaticSizeValue" name='fBDPopupAutomaticSize' value=""> |
---|
57 | <div id="iBDPopupAutomaticSizeSlider" class="gcBgInput gcBorderInput"></div> |
---|
58 | </td> |
---|
59 | <td> |
---|
60 | <div id="iBDPopupAutomaticSizeDisplay"></div> |
---|
61 | </td> |
---|
62 | </tr> |
---|
63 | </table> |
---|
64 | |
---|
65 | |
---|
66 | <div class='cfgBloc'> |
---|
67 | <input type="button" onclick="cm.submit();" value="{'gmaps_apply'|@translate}"> |
---|
68 | </div> |
---|
69 | |
---|
70 | </form> |
---|
71 | |
---|
72 | |
---|
73 | {literal} |
---|
74 | <script type="text/javascript"> |
---|
75 | var cm=new configManager(); |
---|
76 | </script> |
---|
77 | {/literal} |
---|