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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt (-19 / +9 lines)
Lines 7-16 Link Here
7
7
8
<script type="text/javascript">
8
<script type="text/javascript">
9
//<![CDATA[
9
//<![CDATA[
10
    $(document).ready(function(){
11
        $("a.delete_item").click(function(){
12
            return confirm( _("Are you sure you want to delete this item?"));
13
        });
10
14
11
    function confirmItemDelete(){
15
        $("#delete_course").click(function(){
12
        return confirm( _("Are you sure you want to delete this item?"));
16
            return confirm( _("Are you sure you want to delete this course?") );
13
    }
17
        });
18
    });
14
19
15
//]]>
20
//]]>
16
</script>
21
</script>
Lines 28-47 Link Here
28
    <div id="bd">
33
    <div id="bd">
29
        <div id="yui-main">
34
        <div id="yui-main">
30
            <div id="toolbar">
35
            <div id="toolbar">
31
                <script type="text/javascript">
32
                //<![CDATA[
33
                    $(document).ready(function(){
34
                        deleteCourseButton.on("click", confirmDelete );
35
                    });
36
37
                    function confirmDelete(p_oEvent){
38
                        if ( ! confirm( _("Are you sure you want to delete this course?") ) ) {
39
                            YAHOO.util.Event.stopEvent( p_oEvent );
40
                        }
41
                    }
42
43
                //]]>
44
                </script>
45
                <ul class="toolbar">
36
                <ul class="toolbar">
46
                    [% IF CAN_user_coursereserves_add_reserves %]<li><a class="btn" id="add_items" href="/cgi-bin/koha/course_reserves/add_items.pl?course_id=[% course.course_id %]">Add reserves</a></li>[% END %]
37
                    [% IF CAN_user_coursereserves_add_reserves %]<li><a class="btn" id="add_items" href="/cgi-bin/koha/course_reserves/add_items.pl?course_id=[% course.course_id %]">Add reserves</a></li>[% END %]
47
                    [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn" id="edit_course" href="/cgi-bin/koha/course_reserves/course.pl?course_id=[% course.course_id %]">Edit course</a></li>[% END %]
38
                    [% IF ( CAN_user_coursereserves_manage_courses ) %]<li><a class="btn" id="edit_course" href="/cgi-bin/koha/course_reserves/course.pl?course_id=[% course.course_id %]">Edit course</a></li>[% END %]
Lines 153-159 Link Here
153
                                    [% ELSIF cr.item.itemlost %]
144
                                    [% ELSIF cr.item.itemlost %]
154
                                        Item Lost
145
                                        Item Lost
155
                                    [% ELSE %]
146
                                    [% ELSE %]
156
                                        <a href="course-details.pl?course_id=[% course.course_id %]&action=del_reserve&cr_id=[% cr.cr_id %]" onclick="return confirmItemDelete()" >Remove</a>
147
                                        <a href="course-details.pl?course_id=[% course.course_id %]&action=del_reserve&cr_id=[% cr.cr_id %]" class="delete_item" >Remove</a>
157
                                    [% END %]
148
                                    [% END %]
158
149
159
                                </td>
150
                                </td>
160
- 

Return to bug 8215