- if (field == 'reset_su' || field == 'reset_au') {
- var reset_field = field.substring(6);
- document.search.query.value = document.search.query.value.replace(querys[reset_field], '');
- querys[reset_field] = '';
- onFormSubmitEventHandler();
- showhide("recordview");
- }
- else
- limitQuery(field, value);
+ if (useLimit) {
+ limitOrResetQueryServer(field,value, selected);
+ return ;
+ }
+ if (field == 'reset_su' || field == 'reset_au') {
+ var reset_field = field.substring(6);
+ document.search.query.value = document.search.query.value.replace(querys[reset_field], '');
+ querys[reset_field] = '';
+ onFormSubmitEventHandler();
+ showhide("recordview");
+ }
+ else
+ limitQuery(field, value);
+ //alert("limitOrResetQuerry: query after: " + document.search.query.value);
+}
+
+// limit the query after clicking the facet
+function limitOrResetQueryServer (field, value, selected) {
+ if (field.substring(0,6) == 'reset_') {
+ var clientname = field.substring(6);
+ var fieldname = query_client_server[clientname];
+ if (!fieldname)
+ fieldname = clientname;
+ querys_server[fieldname] = '';
+ onFormSubmitEventHandler();
+ showhide("recordview");
+ }
+ else
+ limitQueryServer(field, value);