Removing assigned ids to elements that are not guaranteed to be unique (#284)

It is a bad practice to assign id attributes when there is no guarantee
about the uniqueness of element. ULS should function even if there are
more than one instance of it is present in a page.
This commit is contained in:
Santhosh Thottingal
2018-01-09 13:17:47 +05:30
committed by Niklas Laxström
parent 12a872dd7b
commit bccf103900
3 changed files with 13 additions and 14 deletions

View File

@@ -30,11 +30,11 @@
<div class="uls-search-wrapper"> \
<label class="uls-search-label" for="uls-languagefilter"></label>\
<div class="uls-search-input-wrapper">\
<span id="uls-languagefilter-clear" class="uls-languagefilter-clear"></span>\
<span class="uls-languagefilter-clear"></span>\
<input type="text" class="uls-filterinput uls-filtersuggestion"\
id="uls-filtersuggestion" disabled="true" autocomplete="off">\
disabled="true" autocomplete="off">\
<input type="text" class="uls-filterinput uls-languagefilter"\
id="uls-languagefilter" data-clear="uls-languagefilter-clear"\
data-clear="uls-languagefilter-clear"\
data-suggestion="uls-filtersuggestion"\
placeholder="Search for a language" autocomplete="off">\
</div>\
@@ -68,7 +68,7 @@
this.shown = false;
this.initialized = false;
this.$languageFilter = this.$menu.find( '#uls-languagefilter' );
this.$languageFilter = this.$menu.find( '.uls-languagefilter' );
this.$resultsView = this.$menu.find( '.uls-language-list' );
this.render();