From c8bc46464a045108d1f94ed842e4c5cf647ef228 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 27 Jul 2018 12:43:50 +0000 Subject: [PATCH] Bug 21127: Remove jqTransform jQuery plugin from the OPAC This patch removes the jqTransform jQuery plugin from the OPAC. It was added for the CCSR theme, which no longer exists. http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=c7c2e9efbde273f2b77786316b7502a8847072bd There will be no visible changes to the OPAC after applying the patch. Search the Koha codebase for references to jqTransform and confirm that none exist. Signed-off-by: Mark Tompsett Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens (cherry picked from commit 83e515820abb6e2fa8ddf30f61b3f4972a48ed10) Signed-off-by: Martin Renvoize (cherry picked from commit 903b880f330026d476d761901a2099972159a94c) Signed-off-by: Fridolin Somers --- .../plugins/jquery.jqtransform_select.js | 366 ------------------ 1 file changed, 366 deletions(-) delete mode 100644 koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery.jqtransform_select.js diff --git a/koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery.jqtransform_select.js b/koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery.jqtransform_select.js deleted file mode 100644 index a192d16cab..0000000000 --- a/koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery.jqtransform_select.js +++ /dev/null @@ -1,366 +0,0 @@ -/* - * - * jqTransform - * by mathieu vilaplana mvilaplana@dfc-e.com - * Designer ghyslain armand garmand@dfc-e.com - * - * - * Version 1.0 25.09.08 - * Version 1.1 06.08.09 - * Add event click on Checkbox and Radio - * Auto calculate the size of a select element - * Can now, disabled the elements - * Correct bug in ff if click on select (overflow=hidden) - * No need any more preloading !! - * - ******************************************** */ - -(function($){ - var defaultOptions = {preloadImg:true}; - var jqTransformImgPreloaded = false; - - var jqTransformPreloadHoverFocusImg = function(strImgUrl) { - //guillemets to remove for ie - strImgUrl = strImgUrl.replace(/^url\((.*)\)/,'$1').replace(/^\"(.*)\"$/,'$1'); - var imgHover = new Image(); - imgHover.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-hover.$1'); - var imgFocus = new Image(); - imgFocus.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-focus.$1'); - }; - - - /*************************** - Labels - ***************************/ - var jqTransformGetLabel = function(objfield){ - var selfForm = $(objfield.get(0).form); - var oLabel = objfield.next(); - if(!oLabel.is('label')) { - oLabel = objfield.prev(); - if(oLabel.is('label')){ - var inputname = objfield.attr('id'); - if(inputname){ - oLabel = selfForm.find('label[for="'+inputname+'"]'); - } - } - } - if(oLabel.is('label')){return oLabel.css('cursor','pointer');} - return false; - }; - - /* Hide all open selects */ - var jqTransformHideSelect = function(oTarget){ - var ulVisible = $('.jqTransformSelectWrapper ul:visible'); - ulVisible.each(function(){ - var oSelect = $(this).parents(".jqTransformSelectWrapper:first").find("select").get(0); - //do not hide if click on the label object associated to the select - if( !(oTarget && oSelect.oLabel && oSelect.oLabel.get(0) == oTarget.get(0)) ){$(this).hide();} - }); - }; - /* Check for an external click */ - var jqTransformCheckExternalClick = function(event) { - if ($(event.target).parents('.jqTransformSelectWrapper').length === 0) { jqTransformHideSelect($(event.target)); } - }; - - /* Apply document listener */ - var jqTransformAddDocumentListener = function (){ - $(document).mousedown(jqTransformCheckExternalClick); - }; - - /* Add a new handler for the reset action */ - var jqTransformReset = function(f){ - var sel; - $('.jqTransformSelectWrapper select', f).each(function(){sel = (this.selectedIndex<0) ? 0 : this.selectedIndex; $('ul', $(this).parent()).each(function(){$('a:eq('+ sel +')', this).click();});}); - $('a.jqTransformCheckbox, a.jqTransformRadio', f).removeClass('jqTransformChecked'); - $('input:checkbox, input:radio', f).each(function(){if(this.checked){$('a', $(this).parent()).addClass('jqTransformChecked');}}); - }; - - /*************************** - Buttons - ***************************/ - $.fn.jqTransInputButton = function(){ - return this.each(function(){ - var newBtn = $('