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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt (-3 / +10 lines)
Lines 100-105 $(document).ready(function(){ Link Here
100
        e.preventDefault();
100
        e.preventDefault();
101
        filterByFirstLetterSurname($(this).text());
101
        filterByFirstLetterSurname($(this).text());
102
    });
102
    });
103
    $("body").on("click",".add_user",function(e){
104
        e.preventDefault();
105
        var borrowernumber = $(this).data("borrowernumber");
106
        var firstname = $(this).data("firstname");
107
        var surname = $(this).data("surname");
108
        add_user( borrowernumber, firstname + " " + surname );
109
    });
103
});
110
});
104
111
105
function filter() {
112
function filter() {
Lines 133-142 function filterByFirstLetterSurname(letter) { Link Here
133
                    $("#info").hide();
140
                    $("#info").hide();
134
                    $("#error").hide();
141
                    $("#error").hide();
135
                    if ( p.add_user(borrowernumber, borrowername) < 0 ) {
142
                    if ( p.add_user(borrowernumber, borrowername) < 0 ) {
136
                        $("#error").html(_("Borrower '%s' is already in the list.").format(borrowername));
143
                        $("#error").html(_("Patron '%s' is already in the list.").format(borrowername));
137
                        $("#error").show();
144
                        $("#error").show();
138
                    } else {
145
                    } else {
139
                        $("#info").html(_("Borrower '%s' added.").format(borrowername));
146
                        $("#info").html(_("Patron '%s' added.").format(borrowername));
140
                        $("#info").show();
147
                        $("#info").show();
141
                    }
148
                    }
142
                }
149
                }
Lines 189-195 function filterByFirstLetterSurname(letter) { Link Here
189
                    </li>
196
                    </li>
190
                </ol>
197
                </ol>
191
                <fieldset class="action">
198
                <fieldset class="action">
192
                    <input class="btn btn-default" type="submit" value="Search" />
199
                    <input type="submit" value="Search" />
193
                </fieldset>
200
                </fieldset>
194
            </fieldset>
201
            </fieldset>
195
        <form>
202
        <form>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-10 / +18 lines)
Lines 6-12 Link Here
6
    [% INCLUDE 'datatables.inc' %]
6
    [% INCLUDE 'datatables.inc' %]
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 patron from the card batch?");
10
           function DeleteConfirm() {
9
           function DeleteConfirm() {
11
                var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
10
                var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
12
                var answer = confirm(msg);
11
                var answer = confirm(msg);
Lines 52-58 Link Here
52
                if (bor_nums.value == '') {
51
                if (bor_nums.value == '') {
53
                    window.open("/cgi-bin/koha/patroncards/add_user_search.pl",
52
                    window.open("/cgi-bin/koha/patroncards/add_user_search.pl",
54
                   'PatronPopup',
53
                   'PatronPopup',
55
                   'width=740,height=450,location=yes,toolbar=no,'
54
                   'width=840,height=500,location=yes,toolbar=no,'
56
                   + 'scrollbars=yes,resize=yes');
55
                   + 'scrollbars=yes,resize=yes');
57
                }
56
                }
58
                else {
57
                else {
Lines 148-153 Link Here
148
                Xport('batch');
147
                Xport('batch');
149
                return false;
148
                return false;
150
            });
149
            });
150
            $(".delete").on("click", function(){
151
                return confirmDelete( _("Are you sure you want to delete this patron from the card batch?") );
152
            });
153
            $(".export").on("click", function(e){
154
                e.preventDefault();
155
                var label_id = $(this).data("label-id");
156
                var batch_id = $(this).data("batch-id");
157
                GB_showCenter( _("Export single card"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id+'&label_id='+label_id, 400, 800);
158
            });
151
         });
159
         });
152
        //]]>
160
        //]]>
153
    </script>
161
    </script>
Lines 201-212 Link Here
201
                                </div>
209
                                </div>
202
                            </form>
210
                            </form>
203
                            <div id="batch-manage" class="action">
211
                            <div id="batch-manage" class="action">
204
                                <a class="btn btn-small" id="additems" href="#"><icon class="fa fa-plus"></icon> Add patron(s)</a>[% IF ( table_loop ) %]
212
                                <a class="btn btn-small" id="additems" href="#"><i class="fa fa-plus"></i> Add patron(s)</a>[% IF ( table_loop ) %]
205
                                <a class="btn btn-small" id="removeitems" href="#"><icon class="fa fa-trash"></icon> Remove selected patrons</a>
213
                                <a class="btn btn-small" id="removeitems" href="#"><i class="fa fa-trash"></i> Remove selected patrons</a>
206
                                <a class="btn btn-small" id="deletebatch" href="#"><icon class="fa fa-minus-square"></icon> Delete batch</a>
214
                                <a class="btn btn-small" id="deletebatch" href="#"><i class="fa fa-minus-square"></i> Delete batch</a>
207
                                <a class="btn btn-small" id="deduplicate" href="#"><icon class="fa fa-minus"></icon> Remove duplicates</a>
215
                                <a class="btn btn-small" id="deduplicate" href="#"><i class="fa fa-minus"></i> Remove duplicates</a>
208
                                <a class="btn btn-small" id="exportitems" href="#"><icon class="fa fa-share-square-o"></icon> Export selected card(s)</a>
216
                                <a class="btn btn-small" id="exportitems" href="#"><i class="fa fa-share-square-o"></i> Export selected card(s)</a>
209
                                <a class="btn btn-small" id="exportbatch" href="#"><icon class="fa fa-share-square-o"></icon> Export card batch</a>[% END %]
217
                                <a class="btn btn-small" id="exportbatch" href="#"><i class="fa fa-share-square-o"></i> Export card batch</a>[% END %]
210
                            </div>
218
                            </div>
211
                            [% IF ( table_loop ) %]
219
                            [% IF ( table_loop ) %]
212
                            <form name="items" class="checkboxed">
220
                            <form name="items" class="checkboxed">
Lines 238-245 Link Here
238
                                                [% FOREACH text_field IN table_loo.text_fields %]
246
                                                [% FOREACH text_field IN table_loo.text_fields %]
239
                                                    [% IF ( text_field.select_field ) %]
247
                                                    [% IF ( text_field.select_field ) %]
240
                                                        <td>
248
                                                        <td>
241
                                                            <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/edit-batch.pl?op=remove&amp;batch_id=[% batch_id %]&amp;label_id=[% text_field.field_value %]"><icon class="fa fa-trash"></icon> Delete</a>
249
                                                            <a class="btn btn-mini delete" href="/cgi-bin/koha/patroncards/edit-batch.pl?op=remove&amp;batch_id=[% batch_id %]&amp;label_id=[% text_field.field_value %]"><i class="fa fa-trash"></i> Delete</a>
242
                                                            <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>
250
                                                            <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>
243
                                                        </td>
251
                                                        </td>
244
                                                        <td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
252
                                                        <td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
245
                                                    [% ELSE %]
253
                                                    [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt (-1 / +1 lines)
Lines 135-141 Link Here
135
                                    [% FOREACH text_field IN TABL.text_fields %]
135
                                    [% FOREACH text_field IN TABL.text_fields %]
136
                                    [% IF ( text_field.select_field ) %]
136
                                    [% IF ( text_field.select_field ) %]
137
                                        <td>
137
                                        <td>
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>
138
                                            <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>
139
                                        </td>
139
                                        </td>
140
                                        <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>
141
                                    [% ELSIF ( text_field.field_value ) %]
141
                                    [% ELSIF ( text_field.field_value ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt (-6 / +13 lines)
Lines 26-32 Link Here
26
    [% INCLUDE 'greybox.inc' %]
26
    [% INCLUDE 'greybox.inc' %]
27
    <script type="text/javascript">
27
    <script type="text/javascript">
28
        //<![CDATA[
28
        //<![CDATA[
29
            var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
30
            function DeleteConfirm() {
29
            function DeleteConfirm() {
31
                var element_ids = selected_layouts("delete");
30
                var element_ids = selected_layouts("delete");
32
31
Lines 157-162 Link Here
157
                XportPatronlist();
156
                XportPatronlist();
158
                return false;
157
                return false;
159
            });
158
            });
159
            $(".delete").on("click", function(){
160
                return confirmDelete( _("Are you sure you want to delete this?") );
161
            });
162
            $(".export").on("click", function(e){
163
                e.preventDefault();
164
                var batch_id = $(this).data("batch-id");
165
                GB_showCenter( _("Export single batch"),'/cgi-bin/koha/patroncards/print.pl?batch_id='+batch_id, 400, 800);
166
            });
160
         });
167
         });
161
//]]>
168
//]]>
162
</script>
169
</script>
Lines 200-210 Link Here
200
                                [% FOREACH text_field IN table_loo.text_fields %]
207
                                [% FOREACH text_field IN table_loo.text_fields %]
201
                                [% IF ( text_field.select_field ) %]
208
                                [% IF ( text_field.select_field ) %]
202
                                    <td>
209
                                    <td>
203
                                      <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>
210
                                      <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>
204
                                      [% 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 %]
211
                                      [% 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 %]
205
                                      <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>
212
                                      <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>
206
                                    </td>
213
                                    </td>
207
                                    [% IF ( print ) %]<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
214
                                    [% IF ( print ) %]<td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
208
                                [% ELSIF ( text_field.field_value ) %]
215
                                [% ELSIF ( text_field.field_value ) %]
209
                                    <td>[% text_field.field_value %]</td>
216
                                    <td>[% text_field.field_value %]</td>
210
                                [% ELSE %]
217
                                [% ELSE %]
Lines 216-222 Link Here
216
                                [% END %]
223
                                [% END %]
217
                            </table>
224
                            </table>
218
                            <fieldset class="action">
225
                            <fieldset class="action">
219
                                [% IF ( print ) %]<input class="btn btn-sm" type="button" id="print" value="Export selected batches" />[% END %]
226
                                [% IF ( print ) %]<input type="button" id="print" value="Export selected batches" />[% END %]
220
                            </fieldset>
227
                            </fieldset>
221
                            [% IF patron_lists %]
228
                            [% IF patron_lists %]
222
                            <fieldset class="rows">
229
                            <fieldset class="rows">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt (-3 / +9 lines)
Lines 6-11 Link Here
6
            function Done() {
6
            function Done() {
7
                window.location = "[% referer %]";
7
                window.location = "[% referer %]";
8
            };
8
            };
9
            $(document).ready(function(){
10
                $(".gb-close").on("click",function(){
11
                    parent.parent.GB_hide();
12
                });
13
            })
9
        //]]>
14
        //]]>
10
    </script>
15
    </script>
11
    <style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
16
    <style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
Lines 38-44 Link Here
38
                    </fieldset>
43
                    </fieldset>
39
44
40
                <fieldset class="action">
45
                <fieldset class="action">
41
                    <input type="button" class="btn btn-default submit" id="done" onclick="parent.parent.GB_hide();" value="Done" />
46
                    <input type="button" class="gb-close" value="Done" />
42
                </fieldset>
47
                </fieldset>
43
            </form>
48
            </form>
44
            [% ELSIF ( patronlist_id && template_id && layout_id ) %]
49
            [% ELSIF ( patronlist_id && template_id && layout_id ) %]
Lines 95-104 Link Here
95
                    </ol>
100
                    </ol>
96
                </fieldset>
101
                </fieldset>
97
                <fieldset class="action">
102
                <fieldset class="action">
98
                    <input type="submit" class="btn btn-default submit" value="Export" />
103
                    <input type="submit" value="Export" />
99
                    <a href="#" class="cancel" id="done" onclick="parent.parent.GB_hide();">Cancel</a>
104
                    <a href="#" class="cancel gb-close">Cancel</a>
100
                </fieldset>
105
                </fieldset>
101
            </form>
106
            </form>
102
            [% END %]
107
            [% END %]
103
        </div>
108
        </div>
109
    </div>
104
    [% INCLUDE 'popup-bottom.inc' %]
110
    [% INCLUDE 'popup-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/tables/members_results.tt (-2 / +1 lines)
Lines 19-25 Link Here
19
                "dt_borrowernotes":
19
                "dt_borrowernotes":
20
                    "[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]",
20
                    "[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]",
21
                "dt_action":
21
                "dt_action":
22
                    "<a href=\"#\" onclick='add_user(\"[% data.borrowernumber %]\", \"[% data.firstname %] [% data.surname %]\"); return false;'>Add</a>"
22
                    "<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>"
23
            }[% UNLESS loop.last %],[% END %]
23
            }[% UNLESS loop.last %],[% END %]
24
        [% END %]
24
        [% END %]
25
    ]
25
    ]
26
- 

Return to bug 13041