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

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
{if is_array($bool_opts)}
2
<div class="mehrFilterWrapper" >
3
    <div class="mehrFilter">
4
        {include file="bool_options.tpl" nocache}
5
    </div>
6
</div>
7
{/if}
8
 
9
{include file="dropdown_options.tpl" nocache}
10
 
11
 
12
  <script>
13
        $(document).ready(function () {
14
            $('.brandbox').click(function(){
15
                var inputId = $(this).data("labelfor");
16
                $("#" + inputId).click();
17
            });
18
 
19
            var wWidth = $(window).width();
20
            var dWidth = wWidth * 0.1;
21
            var wHeight = $(window).height();
22
            var dHeight = wHeight * 0.17;
23
 
24
            $("#loading").dialog({
25
                    modal: true,
26
                    autoOpen: false,
27
                    draggable: false,
28
                    resizable: false,
29
                    closeOnEscape: false,
30
                    width:220,
31
                    height:220,
32
            });
33
            $(".ui-dialog-titlebar").hide();
34
 
35
            var maxH = 0;
36
            /*
37
            $('.optionsReload .options_select').each(function () {
38
                var h = $(this).height();
39
                if (h > maxH) {
40
                    maxH = h;
41
                }
42
            });
43
 
44
 
45
            $('.optionsReload .options_select').css("min-height", "73px");
46
            $('.optionsReload .options_select').css("height", maxH + "px");
47
            */
48
 
49
            $("#atoggle").click(function () {
50
                $("#divtoggle").toggle();
51
                if (!$("#divtoggle").is(':visible')) {
52
                    $(this).val("weitere Filter");
53
                    $("#filterstatus").val(0);
54
                } else {
55
                    $(this).val("weniger Filter");
56
                    $("#filterstatus").val(1);
57
                }
58
                return false;
59
            })
60
 
61
        });
62
 
63
 
64
        function showSubdirFilterResult(mode)
65
        {
66
            var sessionfilter = new Array();
67
            $('.subdir_filter').each(function(){
68
                var value = $(this).val();
69
                var name = $(this).attr("name");
70
                var classname = $(this).attr("class");
71
                var id = $(this).attr("id");
72
                var type = $(this).attr("type");
73
 
74
                if(type=="checkbox"){ // alle checkboxen (status checked)
75
                    if(type=="checkbox" && $(this).is(":checked")==false) {
76
                        value=null;
77
                    }
78
                }
79
 
80
                // herstellerauswahl speichern (chkboxhersteller)
81
                if(name=="hersteller[]") {
82
                    if($(this).is(":checked")) {
83
                        $("#chkboxhersteller").val($(this).val());
84
                    }
85
                }
86
 
87
            });
88
 
89
 
90
            $("#loading").dialog('open');
91
            daten = $('#modellForm1').serializeArray();
92
            setTimeout(function () {
93
                $.ajax({
94
                    type: "POST",
95
                    url: "/module/filter_auspraegungen.php",
96
                    data: daten,
97
                    async: false,
98
                    success: function (html) {
99
                        if (mode == "result") {
100
                            $(".pagination_container").css("display", "none");
101
                            $('.subdir_artikel').html(html);
102
                            $(".subdir_artikel").css("background-color", "transparent");
103
 
104
                            $(".newsorting").css("display", "block");
105
                            $('#loading').dialog("close");
106
                        }
107
                    }
108
                })
109
            }, 1);
110
        }
111
 
112
 
113
        function refreshSubdirFilterFilter(mode) {
114
            daten = $('#modellForm1').serializeArray();
115
            $.ajax({
116
                type: "POST",
117
                url: "/module/updateSearchFilterSubdir.php?mode=" + mode,
118
                data: daten,
119
                async: false,
120
                beforeSend: function () {
121
                    $(".box_2").css("background-color", "transparent");
122
 
123
                },
124
                success: function (html) {
125
                    $('.optionsReload').html(html);
126
                    setTimeout(function () {
127
                        $('#loading').dialog('close');
128
                    }, 100);
129
                },
130
            });
131
            return true;
132
        }
133
 
134
 
135
    $("input:checkbox").on("change", callall);
136
 
137
    function callall() {
138
       $('#loading').dialog("open");
139
       showSubdirFilterResult("result");
140
       refreshSubdirFilterFilter("select");
141
    }
142
 
143
    </script>
144
 
145
 
146
 
147
 
148