View | Details | Raw Unified | Return to bug 16372
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-1 / +6 lines)
Lines 7-12 Link Here
7
<script type="text/javascript">
7
<script type="text/javascript">
8
//<![CDATA[
8
//<![CDATA[
9
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone.");
9
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone.");
10
    $(document).ready(function(){
11
        $(".news_delete").on("click", function(){
12
            return confirmDelete(MSG_CONFIRM_DELETE);
13
        });
14
    });
10
//]]>
15
//]]>
11
</script>
16
</script>
12
</head>
17
</head>
Lines 183-189 var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This Link Here
183
                    <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 %]
188
                    <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 %]
184
                        [% IF ( CAN_user_tools ) %]
189
                        [% IF ( CAN_user_tools ) %]
185
                            <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a>
190
                            <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a>
186
                             | <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% koha_new.idnew %]" onclick="return confirm(MSG_CONFIRM_DELETE);">Delete</a>
191
                             | <a class="news_delete" href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% koha_new.idnew %]">Delete</a>
187
                             | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>
192
                             | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>
188
                        [% END %]
193
                        [% END %]
189
                    </p>
194
                    </p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt (-5 / +6 lines)
Lines 15-25 Link Here
15
            ],
15
            ],
16
            "sPaginationType": "four_button"
16
            "sPaginationType": "four_button"
17
        } ));
17
        } ));
18
        $(".delete_patron").on("click", function(){
19
            $(".dropdown").removeClass("open");
20
            var list = $(this).data("list-name");
21
            return confirmDelete( _("Are you sure you want to delete the list %s?").format(list) );
22
        });
18
    });
23
    });
19
20
    function ConfirmDelete( list ) {
21
        return confirm( _("Are you sure you want to delete the list %s?").format(list) );
22
    }
23
//]]>
24
//]]>
24
</script>
25
</script>
25
26
Lines 67-73 Link Here
67
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id %]">
68
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id %]">
68
                                    <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>
69
                                    <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>
69
                                    <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>
70
                                    <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>
70
                                    <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>
71
                                    <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>
71
                                    [% IF ( l.patron_list_patrons_rs.count ) %]
72
                                    [% IF ( l.patron_list_patrons_rs.count ) %]
72
                                        <li class="divider"></li>
73
                                        <li class="divider"></li>
73
                                        <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>
74
                                        <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>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt (-2 / +4 lines)
Lines 3-9 Link Here
3
    [% INCLUDE 'doc-head-close.inc' %]
3
    [% INCLUDE 'doc-head-close.inc' %]
4
    <script type="text/javascript">
4
    <script type="text/javascript">
5
        //<![CDATA[
5
        //<![CDATA[
6
            var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this image?");
7
            function DeleteConfirm() {
6
            function DeleteConfirm() {
8
                var results = selected_images("delete");
7
                var results = selected_images("delete");
9
                if (results.images != -1) {
8
                if (results.images != -1) {
Lines 40-45 Link Here
40
            $("#delete").click(function(){
39
            $("#delete").click(function(){
41
                return DeleteConfirm();
40
                return DeleteConfirm();
42
            });
41
            });
42
            $(".delete_image").on("click", function(){
43
                return confirmDelete( _("Are you sure you want to delete this image?") );
44
            });
43
         });
45
         });
44
        //]]>
46
        //]]>
45
    </script>
47
    </script>
Lines 133-139 Link Here
133
                                    [% FOREACH text_field IN TABL.text_fields %]
135
                                    [% FOREACH text_field IN TABL.text_fields %]
134
                                    [% IF ( text_field.select_field ) %]
136
                                    [% IF ( text_field.select_field ) %]
135
                                        <td>
137
                                        <td>
136
                                            <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>
138
                                            <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>
137
                                        </td>
139
                                        </td>
138
                                        <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
140
                                        <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
139
                                    [% ELSIF ( text_field.field_value ) %]
141
                                    [% ELSIF ( text_field.field_value ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt (-7 / +9 lines)
Lines 16-30 Link Here
16
            ],
16
            ],
17
            "sPaginationType": "full_numbers"
17
            "sPaginationType": "full_numbers"
18
        }));
18
        }));
19
        $(".delete_news").on("click", function(){
20
            return confirmDelete( _("Are you sure you want to delete this news item? This cannot be undone.") );
21
        });
22
        $("#del_form").on("submit",function(){
23
            return confirmDelete( _("Are you sure you want to delete the selected news?") );
24
        });
19
    });
25
    });
20
    //]]>
26
    //]]>
21
    </script>
27
    </script>
22
[% END %]
28
[% END %]
23
<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
29
<script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
24
<script type="text/javascript">//<![CDATA[
30
<script type="text/javascript">//<![CDATA[
25
var MSG_CONFIRM_DELETE_NEWS  = _("Are you sure you want to delete the selected news?");
26
var MSG_CONFIRM_DELETE_SINGLE = _("Are you sure you want to delete this news item? This cannot be undone.");
27
28
tinyMCE.init({
31
tinyMCE.init({
29
    mode : "textareas",
32
    mode : "textareas",
30
    theme : "advanced",
33
    theme : "advanced",
Lines 204-210 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> Link Here
204
        </form>
207
        </form>
205
        </div>
208
        </div>
206
        [% IF ( opac_news_count ) %]
209
        [% IF ( opac_news_count ) %]
207
        <form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit='return confirm(MSG_CONFIRM_DELETE_NEWS)'>
210
        <form id="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl">
208
                <table id="newst">
211
                <table id="newst">
209
                   <thead> <tr>
212
                   <thead> <tr>
210
                        <th>&nbsp;</th>
213
                        <th>&nbsp;</th>
Lines 252-258 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> Link Here
252
                            </td>
255
                            </td>
253
                            <td class="actions">
256
                            <td class="actions">
254
                                <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% opac_new.idnew %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
257
                                <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% opac_new.idnew %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
255
                                <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% opac_new.idnew %]" onclick="return confirm(MSG_CONFIRM_DELETE_SINGLE);" class="btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
258
                                <a href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% opac_new.idnew %]" class="delete_news btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
256
                            </td>
259
                            </td>
257
                        </tr>
260
                        </tr>
258
                    [% END %]</tbody>
261
                    [% END %]</tbody>
Lines 261-267 Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div> Link Here
261
                <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
264
                <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
262
            </form>
265
            </form>
263
        [% ELSE %]
266
        [% ELSE %]
264
            <p>No news loaded</p>
267
            <div class="dialog message">There are no news items.</div>
265
        [% END %]
268
        [% END %]
266
    [% END %]
269
    [% END %]
267
</div>
270
</div>
268
- 

Return to bug 16372