|
@@ -469,27 +469,61 @@ $(document).ready(function(){
|
469
|
469
|
url = link.attr('href')+id_last+'/'+$('div#results_search_form form input[type="text"]').val();
|
470
|
470
|
}
|
471
|
471
|
|
472
|
|
- $.getJSON(url, function(response) {
|
473
|
|
- if (response.status == 'mustbeconnected')
|
474
|
|
- {
|
475
|
|
- $(location).attr('href', url_index);
|
476
|
|
- }
|
477
|
|
-
|
478
|
|
- if (response.count)
|
479
|
|
- {
|
480
|
|
- $('ul.elements').append(response.html);
|
481
|
|
- $('img.elements_more_loader').hide();
|
482
|
|
- recolorize_element_list();
|
483
|
|
- }
|
484
|
|
-
|
485
|
|
- if (response.end || response.count < 1)
|
486
|
|
- {
|
487
|
|
- $('img.elements_more_loader').hide();
|
488
|
|
- $('ul.elements').after('<div class="no_elements"><p class="no-elements">'+
|
489
|
|
- response.message+'</p></div>');
|
490
|
|
- link.hide();
|
491
|
|
- }
|
|
472
|
+ var old_form_action = $('form[name="search"]').attr('action');
|
|
473
|
+ $('form[name="search"]').attr('action', url);
|
|
474
|
+
|
|
475
|
+ $.ajax({
|
|
476
|
+ type: 'POST',
|
|
477
|
+ url: url,
|
|
478
|
+ data: $('form[name="search"]').serialize(),
|
|
479
|
+ success: function(response) {
|
|
480
|
+ if (response.status == 'mustbeconnected')
|
|
481
|
+ {
|
|
482
|
+ $(location).attr('href', url_index);
|
|
483
|
+ }
|
|
484
|
+
|
|
485
|
+ if (response.count)
|
|
486
|
+ {
|
|
487
|
+ $('ul.elements').append(response.html);
|
|
488
|
+ $('img.elements_more_loader').hide();
|
|
489
|
+ recolorize_element_list();
|
|
490
|
+ }
|
|
491
|
+
|
|
492
|
+ if (response.end || response.count < 1)
|
|
493
|
+ {
|
|
494
|
+ $('img.elements_more_loader').hide();
|
|
495
|
+ $('ul.elements').after('<div class="no_elements"><p class="no-elements">'+
|
|
496
|
+ response.message+'</p></div>');
|
|
497
|
+ link.hide();
|
|
498
|
+ }
|
|
499
|
+ },
|
|
500
|
+ dataType: "json"
|
492
|
501
|
});
|
|
502
|
+
|
|
503
|
+ $('form[name="search"]').attr('action', old_form_action);
|
|
504
|
+
|
|
505
|
+// $.getJSON(url, function(response) {
|
|
506
|
+// if (response.status == 'mustbeconnected')
|
|
507
|
+// {
|
|
508
|
+// $(location).attr('href', url_index);
|
|
509
|
+// }
|
|
510
|
+//
|
|
511
|
+// if (response.count)
|
|
512
|
+// {
|
|
513
|
+// $('ul.elements').append(response.html);
|
|
514
|
+// $('img.elements_more_loader').hide();
|
|
515
|
+// recolorize_element_list();
|
|
516
|
+// }
|
|
517
|
+//
|
|
518
|
+// if (response.end || response.count < 1)
|
|
519
|
+// {
|
|
520
|
+// $('img.elements_more_loader').hide();
|
|
521
|
+// $('ul.elements').after('<div class="no_elements"><p class="no-elements">'+
|
|
522
|
+// response.message+'</p></div>');
|
|
523
|
+// link.hide();
|
|
524
|
+// }
|
|
525
|
+// });
|
|
526
|
+
|
493
|
527
|
return false;
|
494
|
528
|
});
|
495
|
529
|
|