-$("#itemst").tablesorter({ widgets : ['zebra'], headers: {0:{sorter: false}} });
-$("#selectallbutton").click(function() {
- $("#itemst").find("input:checkbox").each(function() {
- $(this).attr("checked", "checked");
- });
+$(document).ready(function(){
+ $("#itemst").tablesorter({ widgets : ['zebra'], headers: {0:{sorter: false}} });
+ $("#selectallbutton").click(function() {
+ $("#itemst").find("input:checkbox").each(function() {
+ $(this).attr("checked", "checked");
+ });
+ });
+ $("#clearallbutton").click(function() {
+ $("#itemst").find("input:checkbox").each(function() {
+ $(this).removeAttr("checked");
+ });
+ });
+ $("input[name='disable_input']").click(function() {
+ var row = $(this).attr("id");
+ row = row.replace("row","hint");
+ var subfield = $(this).next();
+ if ($(this).is(":checked")){
+ $(this).val($(this).siblings("[name='subfield']").val());
+ $(subfield).attr('disabled',true);
+ $("#"+row).html(_("This subfield will be deleted"));
+ } else {
+ $(subfield).removeAttr('disabled');
+ $("#"+row).html("");
+ }
+ });