Skip to content

Commit

Permalink
refs matomo-org#1486 fix website id is not updated but website name i…
Browse files Browse the repository at this point in the history
…f someone switches the website in website selector
  • Loading branch information
tsteur committed Jan 8, 2014
1 parent 78e66bb commit 329369d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/CoreHome/javascripts/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,13 @@ $(function () {
name = $(this).text(),
mainLinkElem = $(".custom_select_main_link", selector),
mainLinkSpan = $('span', mainLinkElem),
oldName = mainLinkSpan.text();
oldName = mainLinkSpan.text(),
oldIdSite = mainLinkElem.attr('data-siteid');

mainLinkElem.attr('data-siteid', idsite);
mainLinkSpan.text(name);
$(this).text(oldName);
$(this).attr('data-siteid', oldIdSite);

selector.trigger('piwik:siteSelected', {id: idsite, name: name});

Expand Down

0 comments on commit 329369d

Please sign in to comment.