Skip to content

Commit

Permalink
Fix errors exposed by strict. Undeclared variables. wrong regex backr…
Browse files Browse the repository at this point in the history
…eference
  • Loading branch information
okonomiyaki3000 committed May 29, 2017
1 parent 9c74d86 commit 50717d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions administrator/templates/isis/js/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,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()
Expand Down Expand Up @@ -160,10 +160,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();

Expand Down

0 comments on commit 50717d0

Please sign in to comment.