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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt (-9 / +17 lines)
Lines 77-83 tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
77
    <thead>
77
    <thead>
78
        <tr>
78
        <tr>
79
            <th class="NoSort">&nbsp;</th>
79
            <th class="NoSort">&nbsp;</th>
80
            <th class="NoSort">&nbsp;</th>
81
		<th>Status</th>
80
		<th>Status</th>
82
		<th>Term</th>
81
		<th>Term</th>
83
		<th>Weight</th>
82
		<th>Weight</th>
Lines 89-106 tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
89
    <tbody>
88
    <tbody>
90
    [% FOREACH tagloo IN tagloop %]
89
    [% FOREACH tagloo IN tagloop %]
91
        <tr>
90
        <tr>
92
            <td class="count">[% offset + loop.count | html %]
91
            <td>
93
            </td>
92
                [% IF ( tagloo.approved == 0 ) %]
94
                [% IF ( tagloo.approved == 0 ) %]<td><span><input type="checkbox" value="[% tagloo.term | html %]" name="tags" class="pending" /></span>
93
                    <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="pending" />
95
                [% ELSE %]<td><span><input type="checkbox" value="[% tagloo.term | html %]" name="tags" /></span>[% END %]
94
                [% ELSIF ( tagloo.approved == 1 ) %]
95
                    <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="approved" />
96
                [% ELSE %]
97
                    <input id="checkbox[% offset + loop.count | html %]" type="checkbox" value="[% tagloo.term | html %]" name="tags" class="rejected" />
98
                [% END %]
96
            </td>
99
            </td>
97
            <td>
100
            <td>
98
                [% IF ( tagloo.approved == -1 ) %]
101
                [% IF ( tagloo.approved == -1 ) %]
99
                    <span class="rejected status[% offset + loop.count | html %]">Rejected</span>
102
                    <label for="checkbox[% offset + loop.count | html %]">
103
                        <span class="rejected status[% offset + loop.count | html %]">Rejected</span>
104
                    </label>
100
                [% ELSIF ( tagloo.approved == 1 ) %]
105
                [% ELSIF ( tagloo.approved == 1 ) %]
101
                    <span class="approved status[% offset + loop.count | html %]">Approved</span>
106
                    <label for="checkbox[% offset + loop.count | html %]">
107
                        <span class="approved status[% offset + loop.count | html %]">Approved</span>
108
                    </label>
102
                [% ELSE %]
109
                [% ELSE %]
103
                    <span class="pending status[% offset + loop.count | html %]">Pending</span>
110
                    <label for="checkbox[% offset + loop.count | html %]">
111
                        <span class="pending status[% offset + loop.count | html %]">Pending</span>
112
                    </label>
104
                [% END %]
113
                [% END %]
105
            </td>
114
            </td>
106
            <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term|uri %]">[% tagloo.term | html %]</a>
115
            <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term|uri %]">[% tagloo.term | html %]</a>
Lines 228-234 tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
228
[% MACRO jsinclude BLOCK %]
237
[% MACRO jsinclude BLOCK %]
229
    [% INCLUDE 'datatables.inc' %]
238
    [% INCLUDE 'datatables.inc' %]
230
    [% INCLUDE 'calendar.inc' %]
239
    [% INCLUDE 'calendar.inc' %]
231
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
232
    [% Asset.js("js/pages/tags-review.js") | $raw %]
240
    [% Asset.js("js/pages/tags-review.js") | $raw %]
233
[% END %]
241
[% END %]
234
242
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (-12 / +27 lines)
Lines 65-87 $(document).ready(function() { Link Here
65
            { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
65
            { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
66
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
66
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
67
        ],
67
        ],
68
        "aaSorting": [[ 4, "desc" ]],
68
        "aaSorting": [[ 2, "desc" ]],
69
        "sPaginationType": "full"
69
        "sPaginationType": "full"
70
    }));
70
    }));
71
    $('.ajax_buttons' ).css({visibility:"visible"});
71
    $('.ajax_buttons' ).css({visibility:"visible"});
72
    $("p.check").html("<div id=\"searchheader\"><a id=\"CheckAll\" href=\"/cgi-bin/koha/tags/review.pl\"><i class=\"fa fa-check\" aria-hidden=\"false\"><\/i> " + __("Select all") + "<\/a> | <a id=\"CheckNone\" href=\"/cgi-bin/koha/tags/review.pl\"><i class=\"fa fa-remove\" aria-hidden=\"false\"><\/i> " + __("Clear all") + "<\/a> | <a id=\"CheckPending\" href=\"/cgi-bin/koha/tags/review.pl\"> " + __("Select all pending") + "<\/a><\/div>");
72
    $("p.check").html("<div id=\"searchheader\"><a id=\"CheckAll\" href=\"/cgi-bin/koha/tags/review.pl\"><i class=\"fa fa-check\" aria-hidden=\"false\"><\/i> " + __("Select all") + "<\/a> | <a id=\"CheckNone\" href=\"/cgi-bin/koha/tags/review.pl\"><i class=\"fa fa-remove\" aria-hidden=\"false\"><\/i> " + __("Clear all") + "<\/a> | <a id=\"CheckPending\" href=\"/cgi-bin/koha/tags/review.pl\"> " + __("Select all pending") + "<\/a><\/div>");
73
    $("#CheckAll").click(function(){
73
74
        $(".checkboxed").checkCheckboxes();
74
    $("#CheckAll").on("click", function (e) {
75
        return false;
75
        e.preventDefault();
76
        $("#tagst input:checkbox").each(function () {
77
            $(this).prop("checked", true);
78
        });
76
    });
79
    });
77
    $("#CheckNone").click(function(){
80
78
        $(".checkboxed").unCheckCheckboxes();
81
    $("#CheckNone").on("click", function(e){
79
        return false;
82
        e.preventDefault();
83
        $("#tagst input:checkbox").each(function(){
84
            $(this).prop("checked", false );
85
        });
80
    });
86
    });
81
    $("#CheckPending").click(function(){
87
82
        $(".checkboxed").checkCheckboxes(".pending");
88
    $("#CheckPending").on("click", function (e) {
83
        return false;
89
        e.preventDefault();
90
        $("#tagst input:checkbox").each(function () {
91
            if( $(this).hasClass("pending") ){
92
                $(this).prop("checked", true);
93
            } else {
94
                $(this).prop("checked", false);
95
            }
96
        });
84
    });
97
    });
98
85
    $(".approval_btn").on('click',function(event) {
99
    $(".approval_btn").on('click',function(event) {
86
        event.preventDefault();
100
        event.preventDefault();
87
        pull_counts();
101
        pull_counts();
Lines 102-107 $(document).ready(function() { Link Here
102
            getelement = $(event.target).data("num");
116
            getelement = $(event.target).data("num");
103
            gettitle = ".status" + getelement;
117
            gettitle = ".status" + getelement;
104
            $(gettitle).text( __("Approved") );
118
            $(gettitle).text( __("Approved") );
119
            $("#checkbox" + getelement ).attr("class", "approved");
105
            if ($(gettitle).hasClass("pending") ){
120
            if ($(gettitle).hasClass("pending") ){
106
                $(gettitle).toggleClass("pending approved");
121
                $(gettitle).toggleClass("pending approved");
107
            } else {
122
            } else {
Lines 121-127 $(document).ready(function() { Link Here
121
            $(event.target).html("<i class='fa fa-remove' aria-hidden='false'></i> " + __("Rejected"));
136
            $(event.target).html("<i class='fa fa-remove' aria-hidden='false'></i> " + __("Rejected"));
122
            getelement = $(event.target).data("num");
137
            getelement = $(event.target).data("num");
123
            gettitle = ".status" + getelement;
138
            gettitle = ".status" + getelement;
124
            $(gettitle).text( __("Rejected") );
139
            $(gettitle).text(__("Rejected"));
140
            $("#checkbox" + getelement).attr("class", "rejected");
125
            if ($(gettitle).hasClass("pending") ){
141
            if ($(gettitle).hasClass("pending") ){
126
                $(gettitle).toggleClass("pending rejected");
142
                $(gettitle).toggleClass("pending rejected");
127
            } else {
143
            } else {
128
- 

Return to bug 26120