Bugzilla – Attachment 107046 Details for
Bug 26011
Remove unused jQuery plugin jquery.metadata.min.js from the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26011: Remove unused jQuery plugin jquery.metadata.min.js from the OPAC
Bug-26011-Remove-unused-jQuery-plugin-jquerymetada.patch (text/plain), 2.32 KB, created by
Owen Leonard
on 2020-07-17 18:12:41 UTC
(
hide
)
Description:
Bug 26011: Remove unused jQuery plugin jquery.metadata.min.js from the OPAC
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-07-17 18:12:41 UTC
Size:
2.32 KB
patch
obsolete
>From be6b2feaf1daa92bd9ac6bd7a6c39146ff51e6a7 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 17 Jul 2020 18:09:30 +0000 >Subject: [PATCH] Bug 26011: Remove unused jQuery plugin jquery.metadata.min.js > from the OPAC > >The jQuery plugin jquery.metadata.min.js hasn't been used in >Koha in long time. This patch removes it from the OPAC. > >To test, apply the patch and search for instances of "jquery.metadata." >There should be none. >--- > .../opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js | 8 -------- > 1 file changed, 8 deletions(-) > delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js b/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js >deleted file mode 100644 >index d9370d5d24..0000000000 >--- a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.metadata.min.js >+++ /dev/null >@@ -1,8 +0,0 @@ >-(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";var getData=function(data){if(typeof data!="string")return data;if(data.indexOf('{')<0){data=eval("("+data+")");}} >-var getObject=function(data){if(typeof data!="string")return data;data=eval("("+data+")");return data;} >-if(settings.type=="html5"){var object={};$(elem.attributes).each(function(){var name=this.nodeName;if(name.match(/^data-/))name=name.replace(/^data-/,'');else return true;object[name]=getObject(this.nodeValue);});}else{if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m) >-data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)returnvar;e=elem.getElementsByTagName(settings.name);if(e.length) >-data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr) >-data=attr;} >-object=getObject(data.indexOf("{")<0?"{"+data+"}":data);} >-$.data(elem,settings.single,object);return object;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery); >\ No newline at end of file >-- >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 26011
:
107046
|
107661
|
107665