Bugzilla – Attachment 22065 Details for
Bug 10558
Convert records table in manage-marc-import.pl to ajax DataTable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10558 [QA Follow-up 2] - Fix JavaScript Error
Bug-10558-QA-Follow-up-2---Fix-JavaScript-Error.patch (text/plain), 4.77 KB, created by
Kyle M Hall
on 2013-10-18 16:33:15 UTC
(
hide
)
Description:
Bug 10558 [QA Follow-up 2] - Fix JavaScript Error
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2013-10-18 16:33:15 UTC
Size:
4.77 KB
patch
obsolete
>From 0195a8a61651edbc30e989b9b78c2aac6465f195 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 14 Aug 2013 09:29:08 -0400 >Subject: [PATCH] Bug 10558 [QA Follow-up 2] - Fix JavaScript Error > >--- > .../prog/en/modules/tools/manage-marc-import.tt | 94 ++++++++++---------- > 1 files changed, 48 insertions(+), 46 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >index fc221fb..d4c7958 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt >@@ -27,55 +27,57 @@ $(document).ready(function(){ > $(this).parent().hide(); > }); > >- $("#records-table").dataTable({ >- "aLengthMenu": [[10, 15, 20, 25, 50, 100, -1], [10, 15, 20, 25, 50, 100, _("All")]], >- "iDisplayLength" : 20, >- "bAutoWidth": false, >- "bFilter": false, >- "bProcessing": true, >- "bServerSide": true, >- "sAjaxSource": 'batch_records_ajax.pl', >- "sPaginationType": "full_numbers", >- "sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', >- "aoColumns": [ >- { "mDataProp": "import_record_id" }, >- { "mDataProp": "citation" }, >- { "mDataProp": "status" }, >- { "mDataProp": "overlay_status" }, >- { "mDataProp": "match_citation" }, >- { "mDataProp": "matched" }, >- ], >- "fnServerData": function ( sSource, aoData, fnCallback ) { >- aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); >+ [% IF import_batch_id %] >+ $("#records-table").dataTable({ >+ "aLengthMenu": [[10, 15, 20, 25, 50, 100, -1], [10, 15, 20, 25, 50, 100, _("All")]], >+ "iDisplayLength" : 20, >+ "bAutoWidth": false, >+ "bFilter": false, >+ "bProcessing": true, >+ "bServerSide": true, >+ "sAjaxSource": 'batch_records_ajax.pl', >+ "sPaginationType": "full_numbers", >+ "sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', >+ "aoColumns": [ >+ { "mDataProp": "import_record_id" }, >+ { "mDataProp": "citation" }, >+ { "mDataProp": "status" }, >+ { "mDataProp": "overlay_status" }, >+ { "mDataProp": "match_citation" }, >+ { "mDataProp": "matched" }, >+ ], >+ "fnServerData": function ( sSource, aoData, fnCallback ) { >+ aoData.push( { "name": "import_batch_id", "value": [% import_batch_id %] } ); > >- $.getJSON( sSource, aoData, function (json) { >- fnCallback(json) >- } ); >- }, >- "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { >- $('td:eq(1)', nRow).html( >- '<a href="javascript:void(0)" onclick="show_marc(' >- + aData['import_record_id'] >- + ')">' + aData['citation'] + '</a>' >- ); >- >- if ( aData['match_id'] ) { >- $('td:eq(4)', nRow).html( >- _("Matches biblio ") >- + aData['match_id'] >- + " (" + _("score") + "=" >- + aData['score'] >- + '):' + '<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' >- + aData['match_id'] + '">' + aData['match_citation'] + '</a>' >+ $.getJSON( sSource, aoData, function (json) { >+ fnCallback(json) >+ } ); >+ }, >+ "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) { >+ $('td:eq(1)', nRow).html( >+ '<a href="javascript:void(0)" onclick="show_marc(' >+ + aData['import_record_id'] >+ + ')">' + aData['citation'] + '</a>' > ); >- } > >- $('td:eq(5)', nRow).html( >- '<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' >- + aData['matched'] + '">' + aData['matched'] + '</a>' >- ); >- }, >- }); >+ if ( aData['match_id'] ) { >+ $('td:eq(4)', nRow).html( >+ _("Matches biblio ") >+ + aData['match_id'] >+ + " (" + _("score") + "=" >+ + aData['score'] >+ + '):' + '<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' >+ + aData['match_id'] + '">' + aData['match_citation'] + '</a>' >+ ); >+ } >+ >+ $('td:eq(5)', nRow).html( >+ '<a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=' >+ + aData['matched'] + '">' + aData['matched'] + '</a>' >+ ); >+ }, >+ }); >+ [% END %] > }); > > function show_marc( id ) { >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10558
:
19506
|
19507
|
19515
|
19516
|
19517
|
19520
|
19525
|
19526
|
19547
|
19674
|
19675
|
19681
|
19682
|
19692
|
20183
|
20184
|
20185
|
20328
|
20345
|
20395
|
22062
|
22063
|
22064
|
22065
|
22066
|
22067
|
22068
|
23993
|
23994
|
23995
|
25936
|
25937