Lines 1-3
Link Here
|
|
|
1 |
/* global MSG_ITEM_SEARCH_DELETE_CONFIRM */ |
2 |
|
3 |
jQuery.validator.addMethod("marcfield", function(value, element) { |
4 |
return this.optional(element) || /[0-9a-zA-Z]+/.test(value); |
5 |
}, _("Please enter letters or numbers") ); |
6 |
|
1 |
$(document).ready(function(){ |
7 |
$(document).ready(function(){ |
2 |
$("#add_field_form").hide(); |
8 |
$("#add_field_form").hide(); |
3 |
$("#new_search_field").on("click",function(e){ |
9 |
$("#new_search_field").on("click",function(e){ |
Lines 6-12
$(document).ready(function(){
Link Here
|
6 |
$(".dialog").hide(); |
12 |
$(".dialog").hide(); |
7 |
$("#search_fields_list,#toolbar").hide(); |
13 |
$("#search_fields_list,#toolbar").hide(); |
8 |
}); |
14 |
}); |
9 |
$(".cancel").on("click",function(e){ |
15 |
$(".hide_form").on("click",function(e){ |
10 |
e.preventDefault(); |
16 |
e.preventDefault(); |
11 |
$("#add_field_form").hide(); |
17 |
$("#add_field_form").hide(); |
12 |
$(".dialog").show(); |
18 |
$(".dialog").show(); |
Lines 21-24
$(document).ready(function(){
Link Here
|
21 |
return false; |
27 |
return false; |
22 |
} |
28 |
} |
23 |
}); |
29 |
}); |
24 |
}); |
30 |
|
|
|
31 |
$("#add_field_form").validate({ |
32 |
rules: { |
33 |
label: "required", |
34 |
tagfield: { |
35 |
required: true, |
36 |
marcfield: true |
37 |
}, |
38 |
tagsubfield: { |
39 |
marcfield: true |
40 |
} |
41 |
} |
42 |
}); |
43 |
|
44 |
$("#edit_search_fields").validate({ |
45 |
rules: { |
46 |
label: "required", |
47 |
tagfield: { |
48 |
required: true, |
49 |
marcfield: true |
50 |
}, |
51 |
tagsubfield: { |
52 |
marcfield: true |
53 |
} |
54 |
} |
55 |
}); |
56 |
|
57 |
}); |
25 |
- |
|
|