Subversion-Projekte lars-tiefland.marine-sales.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
<link rel="stylesheet" href="/styles/jquery-ui.css" type="text/css" media="screen" />
2
<script>
3
    $(function(){
4
        $(".dropd").change(function () {
5
 
6
            callall();
7
 
8
        });
9
    });
10
</script>
11
<style>
12
    .mehrFilter {
13
        display: flex!important;
14
        gap: 20px;
15
        margin: 2% 0;
16
        flex-wrap:wrap;
17
    }
18
 
19
    .ui-slider .ui-slider-range {
20
        background:#2FBABD;
21
    }
22
 
23
    .divtoggle {
24
        display:flex;
25
        flex-wrap:wrap;
26
        gap:30px;
27
    }
28
    .subdir_sort .options_select {
29
        width:calc(25% - 30px);
30
    }
31
    .dd-selected-image{
32
        height:27px;
33
    }
34
    .dd-selected-text{
35
        line-height:0px;
36
    }
37
    .filter_elem_range {
38
        border: 1px solid #ccc;
39
        float: left;
40
        margin: 5px;
41
        min-height: 55px;
42
        padding: 8px !important;
43
        width: 20%;
44
    }
45
    .divh {
46
        display:flex;
47
        gap:20px;
48
    }
49
    .brandbox {
50
        border: 2px solid #fff;
51
        border-radius:5px;
52
        min-height: 86px;
53
        padding: 6px 4px;
54
        background:#fff;
55
        width: 206px;
56
        display:flex;
57
        flex-direction:column;
58
        justify-content: center;
59
        align-items: center;
60
        text-align: center;
61
        color:#EA5802;
62
        cursor:pointer;
63
    }
64
    .brandbox input {
65
        z-index:-1;
66
    }
67
    .brandbox:hover,
68
    .brandbox:focus {
69
        border:2px solid #EA5802;
70
    }
71
 
72
    .brandlogo {
73
        min-height: 88px;
74
        text-align: center;
75
    }
76
    .brandlogo img {
77
        cursor: pointer;
78
        max-height: 85px;
79
        max-width: 100px;
80
    }
81
    .brandbox input {
82
        height: 14px;
83
        line-height: 14px;
84
        margin: 2px 5px 0 0;
85
        padding: 0;
86
        float:left;
87
    }
88
    .brandbox span.amount {
89
        width:30px;
90
        float:left;
91
    }
92
 
93
    #divtoggle .ui-button,
94
    .ui-dialog-buttonset .ui-button {
95
        border:none!important;
96
        background:none!important;
97
        background-color:#2FBABD!important;
98
        border-radius:5px;
99
        color:#fff!important;
100
        transition:all 200ms ease;
101
        padding:1% 2%;
102
        font-size: 1rem;
103
    }
104
    #divtoggle .ui-state-hover {
105
        background-color:#9CD9DA!important;
106
    }
107
 
108
</style>
109
 
110
 
111
<input type="button" id="atoggle" value="weitere Filter" class="shopButton resetbutton ui-button ui-widget ui-state-default ui-corner-all" />
112
 
113
 
114
 
115
<div class="divh">
116
    {foreach $herstellercheckbox as $row}
117
        {if {$row['anzahlItems']}}
118
        <div title="{$row['Name']}" class="brandbox" data-labelfor="hersteller_{$row['ID']}">
119
            <div class="brandlogo">
120
                <img src="{$row['Logo1_href']}{$row['Logo1']}">
121
            </div>
122
            <input class="subdir_filter" id="hersteller_{$row['ID']}" type="checkbox" name="hersteller[]" value="{$row['ID']}"  {if $row['selected'] == 1}checked{/if}/>
123
            <span class="amount left fs11">{$row['anzahlItems']}</span>
124
        </div>
125
        {/if}
126
    {/foreach}
127
    <input type="hidden" name="chkboxhersteller" id="chkboxhersteller" value="1" class="subdir_filter">
128
</div>
129
 
130
    {assign var="pmax" value=$maxpreis}
131
    {assign var="pmin" value=1}
132
 
133
<script>
134
    $(document).ready(function () {
135
        $(function () {
136
            $("#hpreise-slider-range").slider({
137
                range: true,
138
                min: 1,
139
                max: {$maxpreis},
140
                values: [{$pmin}, {$pmax}],
141
                async: false,
142
                slide: function (event, ui) {
143
                    $("#hpreise").val("preis_" + ui.values[ 0 ] + "_" + ui.values[ 1 ]);
144
                    $("#preise").html(ui.values[ 0 ] + " - " + ui.values[ 1 ]+" €");
145
                },
146
                stop: function (event, ui) {
147
                    callall();
148
                }
149
            });
150
            $("#hpreise").val("preis_" + $("#hpreise-slider-range").slider("values", 0) +
151
                    "_" + $("#hpreise-slider-range").slider("values", 1));
152
            $("#preise").html($("#hpreise-slider-range").slider("values", 0) +
153
                    " - " + $("#hpreise-slider-range").slider("values", 1)+" €");
154
        });
155
    });
156
</script>
157
 
158
 
159
<div id="divtoggle" class="divtoggle">
160
 
161
    <div class="options_select" >
162
        <div style="float:none;padding-bottom:13px;">
163
            <label style="float:left"><b>Preis:&nbsp;</b></label>
164
            <b style="float:left"><span id="preise"></span></b><span><b>&nbsp;&nbsp;</b></span>
165
        </div>
166
        <input type="hidden" id="hpreise" name="hpreise" class="subdir_filter">
167
        <div id="hpreise-slider-range"></div>
168
    </div>
169
 
170
    {foreach $dropdown_opts as $index => $data}
171
 
172
        {$resn = array()}
173
        {foreach $data["options"] as $key => $values}
174
            {$val = explode("_",$key)}
175
            {$aus = $val[0]}
176
            {$max = $val[2]}
177
            {$min = $val[1]}
178
 
179
            {if $val[1] >= 1}
180
                {$resn[] = $val[1]}
181
            {/if}
182
 
183
            {if $val[2] >= 1}
184
            {$resn[] = $val[2]}
185
             {/if}
186
        {/foreach}
187
 
188
        {if $data["typ"] == 1}
189
 
190
            {if $max!="g" && $max!="l" && isset($max)}
191
                {$max = max($resn)}
192
                {$min = 0}
193
 
194
                {if isset($data["selected"])}
195
                    {$sval = explode("_",$data["selected"])}
196
                    {if is_array($sval)}
197
                        {$saus = $sval[0]}
198
                        {$max = $sval[2]}
199
                        {$min = $sval[1]}
200
                    {/if}
201
                {/if}
202
                <div class="options_select">
203
                    <div style="float:none;padding-bottom:30px;">
204
                        <label style="float:left"><b>{$data["label"]}:&nbsp;</b></label>
205
                        {$res = str_replace(" ","",$data["label"])}
206
                        <b style="float:left"><span id="s{$res}"></span></b><span><b></b></span>
207
                    </div>
208
                    <input type="hidden" id="{$res}" name="{$data.name}" class="subdir_filter" />
209
                    <div id="{$res}-slider-range"></div>
210
                </div>
211
 
212
                <script>
213
                    $(document).ready(function () {
214
                        $(function () {
215
                            $("#{$res}-slider-range").slider({
216
                                range: true,
217
                                min: 0,
218
                                max: 50,
219
                                async: false,
220
                                values: [ {$min}, {$max} ],
221
                                slide: function (event, ui) {
222
                                    $("#{$res}").val({$aus} + "_" + +ui.values[ 0 ] + "_" + ui.values[ 1 ]);
223
                                    $("#s{$res}").html("" + ui.values[ 0 ] + " - " + ui.values[ 1 ]);
224
                                },
225
                                stop: function (event, ui) {
226
                                    callall();
227
                                }
228
                            });
229
                            $("#{$res}").val({$aus} + "_" + $("#{$res}-slider-range").slider("values", 0) +
230
                                    "_" + $("#{$res}-slider-range").slider("values", 1));
231
                            $("#s{$res}").html("" + $("#{$res}-slider-range").slider("values", 0) +
232
                                    " - " + $("#{$res}-slider-range").slider("values", 1));
233
                        });
234
                    });
235
                </script>
236
 
237
            {else}
238
                {if isset($data["selected"]) }
239
                    {$sval = explode("_",$data["selected"])}
240
                    {if $sval|is_array}
241
                        {$saus = $sval[0]}
242
                        {$max = $sval[2]}
243
                        {$amin = $sval[1]}
244
                        {$amax = $sval[1]}
245
                    {/if}
246
                {else}
247
                    {$amin = $min}
248
                    {$amax = $data['maxval']}
249
                {/if}
250
                {if $max == 'g'}
251
                    <div class="options_select">
252
                        <div style="float:none;padding-bottom:30px;">
253
                            <label style="float:left"><b>{$data["label"]}:&nbsp;</b></label>
254
                            {$res = str_replace(" ","",$data["label"])}
255
                            <b><span style="float:left" id="s{$res}"></span></b><span><b></b></span>
256
                        </div>
257
                        <input type="hidden" id="{$res}" name="{$data["name"]}" class="subdir_filter">
258
                        <div id="{$res}-slider-range-min"></div>
259
                    </div>
260
 
261
 
262
                    <script>
263
                        $(function () {
264
                            $("#{$res}-slider-range-min").slider({
265
                                range: "min",
266
                                min: 0,
267
                                max: {$data['maxval']},
268
                                value: {$amax},
269
                                slide: function (event, ui) {
270
                                    $("#{$res}").val({$aus} + '_' + ui.value + '_g');
271
                                    $("#s{$res}").html(ui.value);
272
                                },
273
                                stop: function (event, ui) {
274
                                    callall();
275
                                }
276
                            });
277
                            $("#{$res}").val({$aus} + '_' + $("#{$res}-slider-range-min").slider("value") + '_g');
278
                            $("#s{$res}").html($("#{$res}-slider-range-min").slider("value"));
279
                        });
280
                    </script>
281
 
282
                {else}
283
 
284
                     {$max =  max($resn)}
285
 
286
                 {$min =  min($resn)}
287
                 {$svalue =  0}
288
                  <!--          { $svalue =  min($resn) } -->
289
 
290
               {if isset($data["selected"]) }
291
                    {$sval = explode("_",$data["selected"])}
292
                    {if $sval[1]}
293
                        {$svalue = $sval[1]}
294
                    {/if}
295
                {/if}
296
 
297
 
298
                    <div class="options_select">
299
                        <div style="float:none;padding-bottom:30px;">
300
                            <label style="float:left"><b>{$data["label"]}:&nbsp;</b></label>
301
                            {$res = str_replace(" ","",$data["label"])}
302
                            <b><span style="float:left" id="s{$res}"></span></b><span><b></b></span>
303
                        </div>
304
                        <input type="hidden" id="{$res}" name="{$data["name"]}" class="subdir_filter" />
305
                        <div id="{$res}-slider-range-max"></div>
306
                    </div>
307
                    <!--            min: { $min }, -->
308
 
309
 
310
                    <script>
311
                        $(function () {
312
                            //test2
313
                            $("#{$res}-slider-range-max").slider({
314
                                range: "max",
315
                                min: 0,
316
                                max: 140,
317
                                value: {$svalue},
318
                                slide: function (event, ui) {
319
                                    $("#{$res}").val({$aus} + '_' + ui.value + '_l');
320
                                    $("#s{$res}").html(ui.value);
321
                                },
322
                                stop: function (event, ui) {
323
                                    callall();
324
                                }
325
                            });
326
                            $("#{$res}").val({$aus} + '_' + $("#{$res}-slider-range-max").slider("value") + '_l');
327
                            $("#s{$res}").html($("#{$res}-slider-range-max").slider("value"));
328
                        });
329
                    </script>
330
 
331
                {/if}
332
            {/if}
333
        {else}
334
        {/if}
335
    {/foreach}
336
    {foreach $checkboxlist as $label => $value}
337
        <div class="options_select">
338
            <div>
339
                <div class="mehrFilter" style="display: block;">
340
                    <select class="subdir_filter dropd" name="{$value[0][3]}" id="{$label}">
341
                        <option value="">{$label}</option>
342
                            {foreach $value as $row}
343
                                {$result = strpos($row[1], '(0)')}
344
                                {if $result }
345
                                    <option label="{$row[1]}" value="{$row[0]}" disabled="disabled"></option>
346
                                  {else}
347
                                    <option label="{$row[1]}" value="{$row[0]}" {if $row[2]==1}selected="selected"{/if}>{$row[1]}</option>
348
                                 {/if}
349
                            {/foreach}
350
                    </select>
351
                </div>
352
            </div>
353
        </div>
354
    {/foreach}
355
 
356
 
357
    <div class="options_select">
358
        <button type="button" onclick="window.location.reload();" class="shopButton resetbutton ui-button">Filter zur&uuml;cksetzen</button>
359
        <input type="hidden" value="0" name="filterstatus" id="filterstatus" />
360
    </div>
361
</div>