e.preventDefault();
filterByFirstLetterSurname($(this).text());
});
+ $("body").on("click",".add_user",function(e){
+ e.preventDefault();
+ var borrowernumber = $(this).data("borrowernumber");
+ var firstname = $(this).data("firstname");
+ var surname = $(this).data("surname");
+ add_user( borrowernumber, firstname + " " + surname );
+ });
});
function filter() {
$("#info").hide();
$("#error").hide();
if ( p.add_user(borrowernumber, borrowername) < 0 ) {
- $("#error").html(_("Borrower '%s' is already in the list.").format(borrowername));
+ $("#error").html(_("Patron '%s' is already in the list.").format(borrowername));
$("#error").show();
} else {
- $("#info").html(_("Borrower '%s' added.").format(borrowername));
+ $("#info").html(_("Patron '%s' added.").format(borrowername));
$("#info").show();
}
}
</li>
</ol>
<fieldset class="action">
- <input class="btn btn-default" type="submit" value="Search" />
+ <input type="submit" value="Search" />
</fieldset>
</fieldset>
<form>
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
- var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this patron from the card batch?");
function DeleteConfirm() {
var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
var answer = confirm(msg);
if (bor_nums.value == '') {
window.open("/cgi-bin/koha/patroncards/add_user_search.pl",
'PatronPopup',
- 'width=740,height=450,location=yes,toolbar=no,'
+ 'width=840,height=500,location=yes,toolbar=no,'
+ 'scrollbars=yes,resize=yes');
}
else {
Xport('batch');
return false;
});
+ $(".delete").on("click", function(){
+ return confirmDelete( _("Are you sure you want to delete this patron from the card batch?") );
+ });
+ $(".export").on("click", function(e){
+ e.preventDefault();
+ var label_id = $(this).data("label-id");
+ var batch_id = $(this).data("batch-id");
+ GB_showCenter( _("Export single card"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id+'&label_id='+label_id, 400, 800);
+ });
});
//]]>
</script>
</div>
</form>
<div id="batch-manage" class="action">
- <a class="btn btn-small" id="additems" href="#"><icon class="fa fa-plus"></icon> Add patron(s)</a>[% IF ( table_loop ) %]
- <a class="btn btn-small" id="removeitems" href="#"><icon class="fa fa-trash"></icon> Remove selected patrons</a>
- <a class="btn btn-small" id="deletebatch" href="#"><icon class="fa fa-minus-square"></icon> Delete batch</a>
- <a class="btn btn-small" id="deduplicate" href="#"><icon class="fa fa-minus"></icon> Remove duplicates</a>
- <a class="btn btn-small" id="exportitems" href="#"><icon class="fa fa-share-square-o"></icon> Export selected card(s)</a>
- <a class="btn btn-small" id="exportbatch" href="#"><icon class="fa fa-share-square-o"></icon> Export card batch</a>[% END %]
+ <a class="btn btn-small" id="additems" href="#"><i class="fa fa-plus"></i> Add patron(s)</a>[% IF ( table_loop ) %]
+ <a class="btn btn-small" id="removeitems" href="#"><i class="fa fa-trash"></i> Remove selected patrons</a>
+ <a class="btn btn-small" id="deletebatch" href="#"><i class="fa fa-minus-square"></i> Delete batch</a>
+ <a class="btn btn-small" id="deduplicate" href="#"><i class="fa fa-minus"></i> Remove duplicates</a>
+ <a class="btn btn-small" id="exportitems" href="#"><i class="fa fa-share-square-o"></i> Export selected card(s)</a>
+ <a class="btn btn-small" id="exportbatch" href="#"><i class="fa fa-share-square-o"></i> Export card batch</a>[% END %]
</div>
[% IF ( table_loop ) %]
<form name="items" class="checkboxed">
[% FOREACH text_field IN table_loo.text_fields %]
[% IF ( text_field.select_field ) %]
<td>
- <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/edit-batch.pl?op=remove&batch_id=[% batch_id %]&label_id=[% text_field.field_value %]"><icon class="fa fa-trash"></icon> Delete</a>
- <a class="btn btn-mini" href="#" onclick="GB_showCenter('Export single card','/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&label_id=[% text_field.field_value %]')"><icon class="fa fa-share-square-o"></icon> Export</a>
+ <a class="btn btn-mini delete" href="/cgi-bin/koha/patroncards/edit-batch.pl?op=remove&batch_id=[% batch_id %]&label_id=[% text_field.field_value %]"><i class="fa fa-trash"></i> Delete</a>
+ <a class="btn btn-mini export" href="#" data-batch-id="[% batch_id %]" data-label-id="[% text_field.field_value %]"><i class="fa fa-share-square-o"></i> Export</a>
</td>
<td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
[% ELSE %]
[% FOREACH text_field IN TABL.text_fields %]
[% IF ( text_field.select_field ) %]
<td>
- <a class="delete_image btn btn-mini" href="/cgi-bin/koha/patroncards/image-manage.pl?op=delete&image_id=[% text_field.field_value %]"><icon class="fa fa-trash"></icon> Delete</a>
+ <a class="delete_image btn btn-mini" href="/cgi-bin/koha/patroncards/image-manage.pl?op=delete&image_id=[% text_field.field_value %]"><i class="fa fa-trash"></i> Delete</a>
</td>
<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
[% ELSIF ( text_field.field_value ) %]
[% INCLUDE 'greybox.inc' %]
<script type="text/javascript">
//<![CDATA[
- var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
function DeleteConfirm() {
var element_ids = selected_layouts("delete");
XportPatronlist();
return false;
});
+ $(".delete").on("click", function(){
+ return confirmDelete( _("Are you sure you want to delete this?") );
+ });
+ $(".export").on("click", function(e){
+ e.preventDefault();
+ var batch_id = $(this).data("batch-id");
+ GB_showCenter( _("Export single batch"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id, 400, 800);
+ });
});
//]]>
</script>
[% FOREACH text_field IN table_loo.text_fields %]
[% IF ( text_field.select_field ) %]
<td>
- <a class="btn btn-mini" href="/cgi-bin/koha/patroncards/edit-[% card_element %].pl?op=edit&element_id=[% text_field.field_value %]"><icon class="fa fa-edit"></icon> Edit</a>
- [% IF ( print ) %]<a class="btn btn-mini" href="#" onclick="GB_showCenter('Export single batch','/cgi-bin/koha/patroncards/print.pl?batch_id=[% text_field.field_value |url %]', 400, 800)"><icon class="fa fa-share-square-o"></icon> Export</a>[% END %]
- <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=[% card_element %]&element_id=[% text_field.field_value %]"><icon class="fa fa-trash"></icon> Delete</a>
+ <a class="btn btn-mini" href="/cgi-bin/koha/patroncards/edit-[% card_element %].pl?op=edit&element_id=[% text_field.field_value %]"><i class="fa fa-edit"></i> Edit</a>
+ [% IF ( print ) %]<a class="btn btn-mini export" data-batch-id="[% text_field.field_value |url %]" href="/cgi-bin/koha/patroncards/print.pl?batch_id=[% text_field.field_value |url %]"><i class="fa fa-share-square-o"></i> Export</a>[% END %]
+ <a class="btn btn-mini delete" href="/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=[% card_element %]&element_id=[% text_field.field_value %]"><i class="fa fa-trash"></i> Delete</a>
</td>
- [% IF ( print ) %]<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
+ [% IF ( print ) %]<td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
[% ELSIF ( text_field.field_value ) %]
<td>[% text_field.field_value %]</td>
[% ELSE %]
[% END %]
</table>
<fieldset class="action">
- [% IF ( print ) %]<input class="btn btn-sm" type="button" id="print" value="Export selected batches" />[% END %]
+ [% IF ( print ) %]<input type="button" id="print" value="Export selected batches" />[% END %]
</fieldset>
[% IF patron_lists %]
<fieldset class="rows">
function Done() {
window.location = "[% referer %]";
};
+ $(document).ready(function(){
+ $(".gb-close").on("click",function(){
+ parent.parent.GB_hide();
+ });
+ })
//]]>
</script>
<style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
</fieldset>
<fieldset class="action">
- <input type="button" class="btn btn-default submit" id="done" onclick="parent.parent.GB_hide();" value="Done" />
+ <input type="button" class="gb-close" value="Done" />
</fieldset>
</form>
[% ELSIF ( patronlist_id && template_id && layout_id ) %]
</ol>
</fieldset>
<fieldset class="action">
- <input type="submit" class="btn btn-default submit" value="Export" />
- <a href="#" class="cancel" id="done" onclick="parent.parent.GB_hide();">Cancel</a>
+ <input type="submit" value="Export" />
+ <a href="#" class="cancel gb-close">Cancel</a>
</fieldset>
</form>
[% END %]
</div>
+ </div>
[% INCLUDE 'popup-bottom.inc' %]
"dt_borrowernotes":
"[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]",
"dt_action":
- "<a href=\"#\" onclick='add_user(\"[% data.borrowernumber %]\", \"[% data.firstname %] [% data.surname %]\"); return false;'>Add</a>"
+ "<a href=\"#\" data-borrowernumber=\"[% data.borrowernumber %]\" data-firstname=\"[% data.firstname %]\" data-surname=\"[% data.surname %]\" class=\"btn btn-mini add_user\"><i class=\"fa fa-plus\"></i> Add</a>"
}[% UNLESS loop.last %],[% END %]
[% END %]
]