Bugzilla – Attachment 90125 Details for
Bug 22975
Remove type attribute from script tags: Acquisitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22975: Remove type attribute from script tags: Acquisitions
Bug-22975-Remove-type-attribute-from-script-tags-A.patch (text/plain), 5.37 KB, created by
Katrin Fischer
on 2019-05-27 20:49:54 UTC
(
hide
)
Description:
Bug 22975: Remove type attribute from script tags: Acquisitions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-05-27 20:49:54 UTC
Size:
5.37 KB
patch
obsolete
>From bd6e358383fa52ef29d9ccb742d3ea512a1a8ad0 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 23 May 2019 13:50:07 +0000 >Subject: [PATCH] Bug 22975: Remove type attribute from script tags: > Acquisitions > >This patch removes the "type" attribute from <script> tags in several >acquisitions templates. Also removed: Obsolete "//<![CDATA[ //]]>" >markers. > >This patch also makes minor indentation changes, so diff using the "-w" >flag. > >To test, apply the patch and confirm that examples of affected pages >work properly without any JavaScript errors in the browser console: > > - Acquisitions -> Vendors -> Vendor -> Basket groups > - Acquisitions -> Vendors -> Vendor -> Receive shipments > - Acquisitions -> Vendors -> Vendor -> Basket: > In the table of orders, click "Transfer." Transfer an order > >Validating the HTML source of any of these pages should return no errors >related to the "type" attribute. > >Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/acqui/basketgroup.tt | 56 ++++++++++------------ > .../intranet-tmpl/prog/en/modules/acqui/parcels.tt | 2 +- > .../prog/en/modules/acqui/transferorder.tt | 4 +- > 3 files changed, 29 insertions(+), 33 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >index 4ce2bd8147..c3df5140df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >@@ -86,42 +86,38 @@ fieldset.various li { > > </style> > [% END %] >-<script type="text/javascript"> >-//<![CDATA[ >- YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true); >+<script> >+ YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true); > >-var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?"); >-var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?"); >-var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing"); >-var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup"); >-var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file"); >+ var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?"); >+ var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?"); >+ var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing"); >+ var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup"); >+ var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file"); > >-function submitForm(form) { >- if (form.close.checked == true) { >- var input = document.createElement("input"); >- input.setAttribute("type", "hidden"); >- input.setAttribute("name", "closed"); >- input.setAttribute("value", "1"); >- form.appendChild(input); >+ function submitForm(form) { >+ if (form.close.checked == true) { >+ var input = document.createElement("input"); >+ input.setAttribute("type", "hidden"); >+ input.setAttribute("name", "closed"); >+ input.setAttribute("value", "1"); >+ form.appendChild(input); >+ } > } >-} >- >- $(document).ready(function() { >- $("#basket_groups").tabs(); >- >- $("table").dataTable($.extend(true, {}, dataTablesDefaults, { >- "aoColumnDefs": [ >- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >- ], >- "bAutoWidth": false, >- "sPaginationType": "four_button" >- } )); > >- }); >+ $(document).ready(function() { >+ $("#basket_groups").tabs(); > >- >-//]]> >+ $("table").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "bAutoWidth": false, >+ "sPaginationType": "four_button" >+ } )); >+ }); > </script> >+ > </head> > <body id="acq_basketgroup" class="acq"> > [% INCLUDE 'header.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt >index aaf9ad4e81..3ee304e6b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt >@@ -213,7 +213,7 @@ > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >- <script type="text/javascript"> >+ <script> > $(document).ready(function() { > var parcelst = $("#parcelst").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt >index 3870d2fd77..d4142cadfb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt >@@ -123,14 +123,14 @@ > > [% MACRO jsinclude BLOCK %] > [% IF transferred %] >- <script type="text/javascript"> >+ <script> > opener.location.reload(); > window.close(); > </script> > [% END %] > > [% IF ( bookselleridfrom ) %] >- <script type="text/javascript"> >+ <script> > $(document).ready(function(){ > $(".confirm_transfer").on("click",function(){ > return confirm( _("Transfer order to this basket?") ); >-- >2.11.0
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 22975
:
90039
|
90056
| 90125