<script type="text/javascript">
//<![CDATA[
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone.");
+ $(document).ready(function(){
+ $(".news_delete").on("click", function(){
+ return confirmDelete(MSG_CONFIRM_DELETE);
+ });
+ });
//]]>
</script>
</head>
<p class="newsfooter"> Posted on [% koha_new.newdate %][% IF( ( newsdisp == 'staff' || newsdisp == 'both' ) && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %]<br />[% END %]
[% IF ( CAN_user_tools ) %]
<a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% koha_new.idnew %]">Edit</a>
- | <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% koha_new.idnew %]" onclick="return confirm(MSG_CONFIRM_DELETE);">Delete</a>
+ | <a class="news_delete" href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% koha_new.idnew %]">Delete</a>
| <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>
[% END %]
</p>
],
"sPaginationType": "four_button"
} ));
+ $(".delete_patron").on("click", function(){
+ $(".dropdown").removeClass("open");
+ var list = $(this).data("list-name");
+ return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) );
+ });
});
-
- function ConfirmDelete( list ) {
- return confirm( _("Are you sure you want to delete the list %s?").format(list) );
- }
//]]>
</script>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id %]">
<li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id %]"><i class="fa fa-user"></i> Add patrons</a></li>
<li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id %]"><i class="fa fa-pencil"></i> Edit list</a></li>
- <li><a href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id %]" onclick='return ConfirmDelete("[% l.name %]")'><i class="fa fa-trash"></i> Delete list</a></li>
+ <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id %]" data-list-name="[% l.name %]"><i class="fa fa-trash"></i> Delete list</a></li>
[% IF ( l.patron_list_patrons_rs.count ) %]
<li class="divider"></li>
<li><a href="#" onclick='GB_showCenter(_("Print patron cards from list"), "/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id %]", 400, 800);return false;'><i class="fa fa-print"></i> Print patron cards</a></li>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
- var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this image?");
function DeleteConfirm() {
var results = selected_images("delete");
if (results.images != -1) {
$("#delete").click(function(){
return DeleteConfirm();
});
+ $(".delete_image").on("click", function(){
+ return confirmDelete( _("Are you sure you want to delete this image?") );
+ });
});
//]]>
</script>
[% FOREACH text_field IN TABL.text_fields %]
[% IF ( text_field.select_field ) %]
<td>
- <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" 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 %]"><icon class="fa fa-trash"></icon> Delete</a>
</td>
<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
[% ELSIF ( text_field.field_value ) %]
],
"sPaginationType": "full_numbers"
}));
+ $(".delete_news").on("click", function(){
+ return confirmDelete( _("Are you sure you want to delete this news item? This cannot be undone.") );
+ });
+ $("#del_form").on("submit",function(){
+ return confirmDelete( _("Are you sure you want to delete the selected news?") );
+ });
});
//]]>
</script>
[% END %]
<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">//<![CDATA[
-var MSG_CONFIRM_DELETE_NEWS = _("Are you sure you want to delete the selected news?");
-var MSG_CONFIRM_DELETE_SINGLE = _("Are you sure you want to delete this news item? This cannot be undone.");
-
tinyMCE.init({
mode : "textareas",
theme : "advanced",
</form>
</div>
[% IF ( opac_news_count ) %]
- <form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit='return confirm(MSG_CONFIRM_DELETE_NEWS)'>
+ <form id="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl">
<table id="newst">
<thead> <tr>
<th> </th>
</td>
<td class="actions">
<a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=[% opac_new.idnew %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
- <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% opac_new.idnew %]" onclick="return confirm(MSG_CONFIRM_DELETE_SINGLE);" class="btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
+ <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&ids=[% opac_new.idnew %]" class="delete_news btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
</td>
</tr>
[% END %]</tbody>
<fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
</form>
[% ELSE %]
- <p>No news loaded</p>
+ <div class="dialog message">There are no news items.</div>
[% END %]
[% END %]
</div>