From 0d01a4b2bd7ab6ebc6d483456c3601fce559aaff Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 22 Dec 2016 13:01:37 +0100 Subject: [PATCH] Remove unneeded function from utils.js [SCI-819] --- app/assets/javascripts/sitewide/utils.js | 29 ------------------------ 1 file changed, 29 deletions(-) diff --git a/app/assets/javascripts/sitewide/utils.js b/app/assets/javascripts/sitewide/utils.js index 50224bb57..f42f515c2 100644 --- a/app/assets/javascripts/sitewide/utils.js +++ b/app/assets/javascripts/sitewide/utils.js @@ -215,32 +215,3 @@ function initPageTutorialSteps(pageFirstStepN, pageLastStepN, nextPagePath, }); } } - -/** - * Add redirection links on dropdown elements. You must specify 'href' - * attribute yourself, and the dropdown elments which don't have them, will get - * '#' by default. - * @param {number} selectedIdx Index of element to be selected - * @param {string} urlParam URL parameter to pass to the link URLs - * @return {Object} This - */ -$.fn.makeDropdownOptionsLinks = function(selectedIdx, urlParam) { - selectedIdx = _.isUndefined(selectedIdx) ? 1 : selectedIdx; - - $(this).change(function() { - window.location.href = addParam($(this).find('option:selected') - .attr('href'), urlParam); - }); - - $(this).find('option') - .each(function() { - if ($(this).is('[href]')) { - $(this).addClass('link-look'); - } else { - $(this).attr('href', '#'); - } - }) - .eq(selectedIdx).attr('selected', true); - - return this; -};