|
Lines 124-130
Link Here
|
| 124 |
return (-1); |
124 |
return (-1); |
| 125 |
}; |
125 |
}; |
| 126 |
|
126 |
|
| 127 |
$(document).ready(function() { |
127 |
$(document).ready(function() { |
| 128 |
$("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { |
128 |
$("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 129 |
"autoWidth": false, |
129 |
"autoWidth": false, |
| 130 |
"aoColumnDefs": [ |
130 |
"aoColumnDefs": [ |
|
Lines 167-173
Link Here
|
| 167 |
var batch_id = $(this).data("batch-id"); |
167 |
var batch_id = $(this).data("batch-id"); |
| 168 |
GB_showCenter(_("Export labels"),"/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&label_id=" + label_id, 400, 800); |
168 |
GB_showCenter(_("Export labels"),"/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&label_id=" + label_id, 400, 800); |
| 169 |
}); |
169 |
}); |
| 170 |
}); |
170 |
$("#savedesc").click(function(event){ |
|
|
171 |
event.preventDefault(); // prevent form submission |
| 172 |
var newdescription = $(this).siblings('input[name="description"]').val(); |
| 173 |
var batch_id = $(this).data('batch_id'); |
| 174 |
var ajaxData = { |
| 175 |
'newdescription': newdescription, |
| 176 |
'batch_id': batch_id, |
| 177 |
'card_element': "batch", |
| 178 |
}; |
| 179 |
|
| 180 |
$.ajax({ |
| 181 |
url: '/cgi-bin/koha/svc/patroncards', |
| 182 |
type: 'POST', |
| 183 |
dataType: 'json', |
| 184 |
data: ajaxData, |
| 185 |
}) |
| 186 |
|
| 187 |
.done(function(data){ |
| 188 |
if (data.status == 'success') { |
| 189 |
$("input[name='description']").text(data.newdesc); |
| 190 |
$("#change-status").text(_("Saved")); |
| 191 |
} else { |
| 192 |
$("#change-status").text(_("Unable to save description")); |
| 193 |
} |
| 194 |
}); |
| 195 |
}); |
| 196 |
}); |
| 171 |
//]]> |
197 |
//]]> |
| 172 |
</script> |
198 |
</script> |
| 173 |
</head> |
199 |
</head> |
|
Lines 208-213
Link Here
|
| 208 |
<ol><li> |
234 |
<ol><li> |
| 209 |
<input type="hidden" name="op" value="add" /> |
235 |
<input type="hidden" name="op" value="add" /> |
| 210 |
<input type="hidden" name="batch_id" value="[% batch_id %]" /> |
236 |
<input type="hidden" name="batch_id" value="[% batch_id %]" /> |
|
|
237 |
<label for="description">Batch description: </label> |
| 238 |
<input type="text" name="description" value="[% description %]"> |
| 239 |
<a href="#" id="savedesc" data-batch_id="[% batch_id %]">Save description</a> <span id="change-status"></span> |
| 211 |
</li> |
240 |
</li> |
| 212 |
<li> |
241 |
<li> |
| 213 |
<input type="radio" name="number_type" id="barcode_enter" value="barcode" checked /> |
242 |
<input type="radio" name="number_type" id="barcode_enter" value="barcode" checked /> |