[dw-free] Keyword search of icon in the icon popup box does not include Description
[commit: http://hg.dwscoalition.org/dw-free/rev/15097b759f54]
http://bugs.dwscoalition.org/show_bug.cgi?id=2156
Make alt text searchable, in the icon dropdown.
Patch by
foxfirefey.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2156
Make alt text searchable, in the icon dropdown.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/js/userpicselect.js
-------------------------------------------------------------------------------- diff -r 1de2436f0969 -r 15097b759f54 htdocs/js/userpicselect.js --- a/htdocs/js/userpicselect.js Sun Apr 04 22:57:47 2010 -0700 +++ b/htdocs/js/userpicselect.js Mon Apr 05 00:16:35 2010 -0700 @@ -1,6 +1,6 @@ UserpicSelect = new Class (LJ_IPPU, { UserpicSelect = new Class (LJ_IPPU, { init: function () { - UserpicSelect.superClass.init.apply(this, ["Choose Userpic"]); + UserpicSelect.superClass.init.apply(this, ["Choose Icon"]); this.setDimensions("550px", "441px"); @@ -229,9 +229,14 @@ UserpicSelect = new Class (LJ_IPPU, { if (pic.comment) piccomment = pic.comment.toLocaleUpperCase(); + var picalt = ""; + if (pic.alt) + picalt = pic.alt.toLocaleUpperCase(); + if(kw.toLocaleUpperCase().indexOf(filter) != -1 || // matches a keyword (piccomment && piccomment.indexOf(filter) != -1) || // matches comment - (pic.keywords.join(", ").toLocaleUpperCase().indexOf(filter) != -1)) { // matches comma-seperated list of keywords + (pic.keywords.join(", ").toLocaleUpperCase().indexOf(filter) != -1) || // matches comma-seperated list of keywords + (picalt && picalt.indexOf(filter) != -1)) { // matches description newpics.pics[picid] = pic; newpics.ids.push(picid); --------------------------------------------------------------------------------