Skip to content
Snippets Groups Projects
Commit 1045f95e authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Remove unused JS functions from advanced search.

parent 5590762c
No related merge requests found
var nextGroup = 0; var nextGroup = 0;
var groupLength = []; var groupLength = [];
function addSearch(group, fieldValues) function addSearch(group, fieldValues) {
{
if(typeof fieldValues === "undefined") { if(typeof fieldValues === "undefined") {
fieldValues = {}; fieldValues = {};
} }
...@@ -52,8 +51,7 @@ function addSearch(group, fieldValues) ...@@ -52,8 +51,7 @@ function addSearch(group, fieldValues)
groupLength[group]++; groupLength[group]++;
} }
function deleteSearch(group, sindex) function deleteSearch(group, sindex) {
{
for(var i=sindex;i<groupLength[group]-1;i++) { for(var i=sindex;i<groupLength[group]-1;i++) {
var $search0 = $('#search'+group+'_'+i); var $search0 = $('#search'+group+'_'+i);
var $search1 = $('#search'+group+'_'+(i+1)); var $search1 = $('#search'+group+'_'+(i+1));
...@@ -71,8 +69,7 @@ function deleteSearch(group, sindex) ...@@ -71,8 +69,7 @@ function deleteSearch(group, sindex)
} }
} }
function addGroup(firstTerm, firstField, join) function addGroup(firstTerm, firstField, join) {
{
if (firstTerm == undefined) {firstTerm = '';} if (firstTerm == undefined) {firstTerm = '';}
if (firstField == undefined) {firstField = '';} if (firstField == undefined) {firstField = '';}
if (join == undefined) {join = '';} if (join == undefined) {join = '';}
...@@ -110,8 +107,7 @@ function addGroup(firstTerm, firstField, join) ...@@ -110,8 +107,7 @@ function addGroup(firstTerm, firstField, join)
return nextGroup++; return nextGroup++;
} }
function deleteGroup(group) function deleteGroup(group) {
{
// Find the group and remove it // Find the group and remove it
$("#group" + group).remove(); $("#group" + group).remove();
// If the last group was removed, add an empty group // If the last group was removed, add an empty group
...@@ -123,22 +119,6 @@ function deleteGroup(group) ...@@ -123,22 +119,6 @@ function deleteGroup(group)
} }
} }
// Fired by onclick event
function deleteGroupJS(group)
{
var groupNum = group.id.replace("delete_link_", "");
deleteGroup(groupNum);
return false;
}
// Fired by onclick event
function addSearchJS(group)
{
var groupNum = group.id.replace("add_search_link_", "");
addSearch(groupNum);
return false;
}
$(document).ready(function() { $(document).ready(function() {
$('.clear-btn').click(function() { $('.clear-btn').click(function() {
$('input[type="text"]').val(''); $('input[type="text"]').val('');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment