|
Lines 94-100
Link Here
|
| 94 |
// some pass-thru error trapping just in case... |
94 |
// some pass-thru error trapping just in case... |
| 95 |
} |
95 |
} |
| 96 |
}; |
96 |
}; |
| 97 |
function selected_layout() { |
97 |
function selected_layout() { |
| 98 |
if (document.items.action.length) { |
98 |
if (document.items.action.length) { |
| 99 |
for (i=0;i<document.items.action.length;i++){ |
99 |
for (i=0;i<document.items.action.length;i++){ |
| 100 |
if (document.items.action[i].checked==true){ |
100 |
if (document.items.action[i].checked==true){ |
|
Lines 111-117
Link Here
|
| 111 |
return (-1); |
111 |
return (-1); |
| 112 |
}; |
112 |
}; |
| 113 |
|
113 |
|
| 114 |
$(document).ready(function() { |
114 |
$(document).ready(function() { |
| 115 |
$("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { |
115 |
$("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 116 |
"aoColumnDefs": [ |
116 |
"aoColumnDefs": [ |
| 117 |
{ "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false } |
117 |
{ "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false } |
|
Lines 153-159
Link Here
|
| 153 |
var batch_id = $(this).data("batch-id"); |
153 |
var batch_id = $(this).data("batch-id"); |
| 154 |
GB_showCenter( _("Export single card"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id+'&label_id='+label_id, 400, 800); |
154 |
GB_showCenter( _("Export single card"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id+'&label_id='+label_id, 400, 800); |
| 155 |
}); |
155 |
}); |
| 156 |
}); |
156 |
$("#savedesc").click(function(event){ |
|
|
157 |
var newdescription = $(this).siblings('input[name="description"]').val(); |
| 158 |
var batch_id = $(this).data('batch_id'); |
| 159 |
var ajaxData = { |
| 160 |
'newdescription': newdescription, |
| 161 |
'batch_id': batch_id, |
| 162 |
'card_element': "batch", |
| 163 |
'creator': "patroncard", |
| 164 |
}; |
| 165 |
|
| 166 |
$.ajax({ |
| 167 |
url: '/cgi-bin/koha/svc/creator_batches', |
| 168 |
type: 'POST', |
| 169 |
dataType: 'json', |
| 170 |
data: ajaxData, |
| 171 |
}) |
| 172 |
|
| 173 |
.done(function(data){ |
| 174 |
if (data.status == 'success') { |
| 175 |
$("input[name='description']").text(data.newdesc); |
| 176 |
$("#change-status").text(_("Saved")); |
| 177 |
} else { |
| 178 |
$("#change-status").text(_("Unable to save description")); |
| 179 |
} |
| 180 |
}); |
| 181 |
}); |
| 182 |
}); |
| 157 |
//]]> |
183 |
//]]> |
| 158 |
</script> |
184 |
</script> |
| 159 |
</head> |
185 |
</head> |
|
Lines 195-206
Link Here
|
| 195 |
<div> |
221 |
<div> |
| 196 |
<fieldset class="rows" style="border-bottom: 0px; border: 0px;"> |
222 |
<fieldset class="rows" style="border-bottom: 0px; border: 0px;"> |
| 197 |
<ol><li> |
223 |
<ol><li> |
| 198 |
<input type="hidden" name="op" value="add" /> |
224 |
<input type="hidden" name="op" value="add" /> |
| 199 |
<input type="hidden" name="batch_id" value="[% batch_id %]" /> |
225 |
<input type="hidden" name="batch_id" value="[% batch_id %]" /> |
| 200 |
<label for="bor_num_list">Add by borrowernumber(s): |
226 |
<label for="description">Batch description: </label> |
| 201 |
<br /> <span class="hint">One borrowernumber per line.</span> |
227 |
<input type="text" name="description" value="[% description %]"> |
| 202 |
</label> |
228 |
<a href="#" id="savedesc" data-batch_id="[% batch_id %]">Save description</a> <span id="change-status"></span> |
| 203 |
<textarea rows="5" id="bor_num_list" name="bor_num_list" tabindex="1" class="focus"></textarea> |
229 |
</li><li> |
|
|
230 |
<label for="bor_num_list">Add by borrowernumber(s): |
| 231 |
<br /> <span class="hint">One borrowernumber per line.</span> |
| 232 |
</label> |
| 233 |
<textarea rows="5" id="bor_num_list" name="bor_num_list" tabindex="1" class="focus"></textarea> |
| 204 |
</li></ol> |
234 |
</li></ol> |
| 205 |
</fieldset> |
235 |
</fieldset> |
| 206 |
</div> |
236 |
</div> |