Make alt text searchable, in the icon dropdown.
Patch by foxfirefey.
diffs (27 lines):
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);
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog