| 8 |
lars |
1 |
$(document).ready(function(){
|
|
|
2 |
|
|
|
3 |
$('.options').delegate("#modellForm select", "change", function(){
|
|
|
4 |
//Ist gesetzt wenn man sich im Artikelstamm befindet
|
|
|
5 |
if( $("input[name='refreshFilter']").val() == true ){
|
|
|
6 |
refreshFilter("select");
|
|
|
7 |
}else{
|
|
|
8 |
showResult("result");
|
|
|
9 |
showResult("basket");
|
|
|
10 |
showResult("bild");
|
|
|
11 |
showResult("beschreibungReload");
|
|
|
12 |
}
|
|
|
13 |
});
|
|
|
14 |
/*$('.options').change(function(){
|
|
|
15 |
refreshFilter("select");
|
|
|
16 |
});*/
|
|
|
17 |
$('.options').delegate( '#modellForm #resetForm', "click", function(){
|
|
|
18 |
refreshFilter("reset");
|
|
|
19 |
});
|
|
|
20 |
|
|
|
21 |
$('.subdir_sort').delegate("#modellForm select, #modellForm input", "change", function(){
|
|
|
22 |
|
|
|
23 |
var aid = $(this).find('option:selected').text();
|
|
|
24 |
$("#loading").dialog("open");
|
|
|
25 |
refreshSubdirFilterFilter("select",aid);
|
|
|
26 |
showSubdirFilterResult("result");
|
|
|
27 |
setTimeout(function () {
|
|
|
28 |
$('#loading').dialog('close');
|
|
|
29 |
}, 100);
|
|
|
30 |
});
|
|
|
31 |
$('.subdir_sort').delegate( '#modellForm .resetbutton', "click", function(e){
|
|
|
32 |
location.reload();
|
|
|
33 |
|
|
|
34 |
});
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
function showSubdirFilterResult(mode)
|
|
|
39 |
{
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
daten=$('#modellForm').serializeArray();
|
|
|
43 |
$.ajax({
|
|
|
44 |
type: "POST",
|
|
|
45 |
url : "/module/artikelmodell.php?mode="+mode,
|
|
|
46 |
data: daten,
|
|
|
47 |
async: false,
|
|
|
48 |
success: function(html){
|
|
|
49 |
|
|
|
50 |
if(mode == "result"){
|
|
|
51 |
$(".pagination_container").css("display", "none");
|
|
|
52 |
|
|
|
53 |
$('.subdir_artikel').html(html);
|
|
|
54 |
$(".subdir_artikel").css("background-color", "transparent" );
|
|
|
55 |
$(".loader").hide();
|
|
|
56 |
$(".pagination_seite").css("display", "none");
|
|
|
57 |
$(".pagination_artikel").css("display", "none");
|
|
|
58 |
$(".newsorting").css("display", "block");
|
|
|
59 |
|
|
|
60 |
}
|
|
|
61 |
}
|
|
|
62 |
})
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
function refreshSubdirFilterFilter(mode,aid){
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
daten=$('#modellForm').serializeArray();
|
|
|
69 |
$.ajax({
|
|
|
70 |
type: "POST",
|
|
|
71 |
url : "/module/updateSearchFilterSubdir.php?mode="+mode + "&aid=" + aid,
|
|
|
72 |
data: daten,
|
|
|
73 |
async: false,
|
|
|
74 |
beforeSend: function(){
|
|
|
75 |
$(".box_2").css("background-color", "transparent" );
|
|
|
76 |
$(".subdir_artikel").css("background-color", "#ccc" );
|
|
|
77 |
$(".loader").show();
|
|
|
78 |
},
|
|
|
79 |
success: function(html){
|
|
|
80 |
$('.optionsReload').html(html)
|
|
|
81 |
}
|
|
|
82 |
})
|
|
|
83 |
return true;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
function showResult(mode)
|
|
|
87 |
{
|
|
|
88 |
var daten=$('#modellForm').serializeArray();
|
|
|
89 |
$.ajax({
|
|
|
90 |
type: "POST",
|
|
|
91 |
url : "/source/module/artikelmodell.php?mode="+mode,
|
|
|
92 |
data: daten
|
|
|
93 |
}).done(function(html){
|
|
|
94 |
if(mode == "result"){
|
|
|
95 |
$('#artikel').html(html);
|
|
|
96 |
}else if(mode == "bild"){
|
|
|
97 |
$('.itemLeftContainer').html(html);
|
|
|
98 |
initElevateZoom("inner");
|
|
|
99 |
}else if(mode == "beschreibungReload"){
|
|
|
100 |
$('.reiterTabs').html(html);
|
|
|
101 |
}else{
|
|
|
102 |
$('.basketReload').html(html);
|
|
|
103 |
}
|
|
|
104 |
})
|
|
|
105 |
}
|
|
|
106 |
|
|
|
107 |
function refreshFilter(mode){
|
|
|
108 |
|
|
|
109 |
var daten=$('#modellForm').serializeArray();
|
|
|
110 |
$.ajax({
|
|
|
111 |
type: "POST",
|
|
|
112 |
url : "/source/module/updateSearchFilter.php?mode="+mode,
|
|
|
113 |
data: daten
|
|
|
114 |
}).done(function(html){
|
|
|
115 |
//alert(html);
|
|
|
116 |
$('.optionsReload').html(html);
|
|
|
117 |
|
|
|
118 |
showResult("beschreibungReload");
|
|
|
119 |
showResult("result");
|
|
|
120 |
showResult("basket");
|
|
|
121 |
showResult("bild");
|
|
|
122 |
|
|
|
123 |
})
|
|
|
124 |
|
|
|
125 |
}
|
|
|
126 |
});
|