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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsShow.vue (-10 / +26 lines)
Lines 182-187 Link Here
182
                        v-for="(item, counter) in train.items"
182
                        v-for="(item, counter) in train.items"
183
                        v-bind:key="counter"
183
                        v-bind:key="counter"
184
                    >
184
                    >
185
                        <input
186
                            v-model="selected_items"
187
                            type="checkbox"
188
                            name="user_train_item_id"
189
                            :value="item.train_item_id"
190
                        />
185
                        <label
191
                        <label
186
                            >{{ item.user_train_item_id }}
192
                            >{{ item.user_train_item_id }}
187
                            <span class="action_links">
193
                            <span class="action_links">
Lines 512-528 export default { Link Here
512
        },
518
        },
513
        clearAll() {
519
        clearAll() {
514
            this.selected_items = []
520
            this.selected_items = []
515
            $("#" + this.table_id)
521
            if (this.item_table.display) {
516
                .find("input[name='user_train_item_id'][type='checkbox']")
522
                $("#" + this.table_id)
517
                .prop("checked", false)
523
                    .find("input[name='user_train_item_id'][type='checkbox']")
524
                    .prop("checked", false)
525
            }
518
        },
526
        },
519
        selectAll() {
527
        selectAll() {
520
            $("#" + this.table_id)
528
            if (this.item_table.display) {
521
                .find("input[name='user_train_item_id'][type='checkbox']")
529
                $("#" + this.table_id)
522
                .each((i, input) => {
530
                    .find("input[name='user_train_item_id'][type='checkbox']")
523
                    this.selected_items.push($(input).val())
531
                    .each((i, input) => {
524
                    $(input).prop("checked", true)
532
                        this.selected_items.push($(input).val())
525
                })
533
                        $(input).prop("checked", true)
534
                    })
535
            } else {
536
                this.selected_items = this.train.items.map(
537
                    item => item.train_item_id
538
                )
539
            }
526
        },
540
        },
527
        printSelected() {
541
        printSelected() {
528
            window.open(
542
            window.open(
Lines 709-712 export default { Link Here
709
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
723
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
710
    transition: all 0.3s ease;
724
    transition: all 0.3s ease;
711
}
725
}
726
input[type="checkbox"] {
727
    float: left;
728
}
712
</style>
729
</style>
713
- 

Return to bug 34030