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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt (-8 / +7 lines)
Lines 139-152 Link Here
139
                    },
139
                    },
140
                    {
140
                    {
141
                        "title": "Actions",
141
                        "title": "Actions",
142
                        "className": "actions",
142
                        "searchable": false,
143
                        "searchable": false,
143
                        "orderable": false,
144
                        "orderable": false,
144
                        "render": function( row, type, val, meta ) {
145
                        "render": function(data, type, row, meta) {
145
146
                            var result = '<a class="btn btn-default btn-xs view_message" target="_blank" href="/cgi-bin/koha/acqui/edimsg.pl?id='+encodeURIComponent(row.id)+'"><i class="fa fa-search"></i> View message</a> ';
146
                            var result = '<a class="btn btn-default btn-xs view_message" target="_blank" href="/cgi-bin/koha/acqui/edimsg.pl?id='+encodeURIComponent(row.id)+'"><i class="fa fa-search"></i> View message</a>';
147
                            result += '<a class="btn btn-default btn-xs delete_msg" href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=delete&amp;message_id='+encodeURIComponent(row.id)+'"><i class="fa fa-trash-can"></i> Delete</a> ';
147
                            result += '<a class="btn btn-default btn-xs delete_msg" href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=delete&amp;message_id='+encodeURIComponent(row.id)+'"><i class="fa fa-trash-can"></i> Delete</a>';
148
                            if ( row.status == 'new' ) {
148
                            if ( row.status == 'new' ) {
149
                                reslt += '<a class="btn btn-default btn-xs import_msg" href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=import&amp;message_id='+encodeURIComponent(row.id)+'"><i class="fa fa-cog"></i> Import</a>';
149
                                result += '<a class="btn btn-default btn-xs import_msg" href="/cgi-bin/koha/acqui/edifactmsgs.pl?op=import&amp;message_id='+encodeURIComponent(row.id)+'"><i class="fa fa-cog"></i> Import</a> ';
150
                            }
150
                            }
151
                            return result;
151
                            return result;
152
                        }
152
                        }
Lines 157-163 Link Here
157
            var EDIModal = $("#EDI_modal");
157
            var EDIModal = $("#EDI_modal");
158
            var EDIModalBody = $("#EDI_modal .modal-body");
158
            var EDIModalBody = $("#EDI_modal .modal-body");
159
159
160
            $(".view_message").on("click", function(e){
160
            $("body").on("click", ".view_message", function(e){
161
                e.preventDefault();
161
                e.preventDefault();
162
                var page = $(this).attr("href");
162
                var page = $(this).attr("href");
163
                EDIModalBody.load(page + " #edimsg");
163
                EDIModalBody.load(page + " #edimsg");
Lines 170-176 Link Here
170
            EDIModal.on("hidden.bs.modal", function(){
170
            EDIModal.on("hidden.bs.modal", function(){
171
                EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
171
                EDIModalBody.html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
172
            });
172
            });
173
            $(".delete_msg").on("click",function(){
173
            $("body").on("click", ".delete_msg" ,function(){
174
                return confirm(_("Are you sure you want to delete this message?"));
174
                return confirm(_("Are you sure you want to delete this message?"));
175
            });
175
            });
176
        });
176
        });
177
- 

Return to bug 30070