From bed8b36574a4547e5b6dfc8184d3430f839a6788 Mon Sep 17 00:00:00 2001 From: Elijah Madden Date: Tue, 25 Oct 2016 15:51:35 +0900 Subject: [PATCH] Fix errors exposed by strict. Undeclared variables. wrong regex backreference --- administrator/templates/isis/js/template.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/administrator/templates/isis/js/template.js b/administrator/templates/isis/js/template.js index e202a5ebcb2c0..d2c45e7497b14 100644 --- a/administrator/templates/isis/js/template.js +++ b/administrator/templates/isis/js/template.js @@ -56,7 +56,7 @@ jQuery(function($) // add color classes to chosen field based on value $('select[class^="chzn-color"], select[class*=" chzn-color"]').on('liszt:ready', function(){ var select = $(this); - var cls = this.className.replace(/^.(chzn-color[a-z0-9-_]*)$.*/, '\1'); + var cls = this.className.replace(/^.(chzn-color[a-z0-9-_]*)$.*/, '$1'); var container = select.next('.chzn-container').find('.chzn-single'); container.addClass(cls).attr('rel', 'value_' + select.val()); select.on('change click', function() @@ -98,10 +98,10 @@ jQuery(function($) $dropdownMenu.css('max-height', maxHeight); // Get the submenu position - linkWidth = $(this).outerWidth(true); - menuWidth = $dropdownMenu.width(); - linkPaddingLeft = $(this).children('a').css('padding-left'); - offsetLeft = Math.round($(this).offset().left) - parseInt(linkPaddingLeft); + var linkWidth = $(this).outerWidth(true); + var menuWidth = $dropdownMenu.width(); + var linkPaddingLeft = $(this).children('a').css('padding-left'); + var offsetLeft = Math.round($(this).offset().left) - parseInt(linkPaddingLeft); emptyMenu.empty().hide();