Kpac: replace custom javascript with placeholder attribute

Bug #1834258 reported by Jane Sandberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Unassigned
3.6
Fix Released
Low
Unassigned

Bug Description

The Kpac has two files with the following javascript:

onfocus="if(this.value=='[% seed %]'){this.value='';this.style.color='#424242';}"
onblur="if(this.value==''){this.value='[% seed %]'; this.style.color='#aaa';}"

This javascript basically just does what the HTML5 placeholder attribute does. Since the placeholder attribute is widely supported (and used a lot throughout Evergreen), I think it is quite safe to simplify these files by replacing the onfocus/onblur js with a placeholder attribute.

The two files are:
* https://github.com/evergreen-library-system/Evergreen/blob/master/Open-ILS/src/templates/kpac/parts/searchbox.tt2
* https://github.com/evergreen-library-system/Evergreen/blob/master/Open-ILS/src/templates/kpac/getit.tt2

This would be a great first project for somebody new to Evergreen development.

Revision history for this message
Jane Sandberg (sandbergja) wrote :

P.S. this is in Evergreen 3.1.2. :-)

Revision history for this message
Shula Link (slink-g) wrote :

Is this still a needed fix?

Revision history for this message
Galen Charlton (gmc) wrote :

Yep, this is still an issue.

Revision history for this message
Shula Link (slink-g) wrote :
Changed in evergreen:
status: New → Confirmed
tags: added: pullrequest
Galen Charlton (gmc)
Changed in evergreen:
milestone: none → 3.7.2
Revision history for this message
Terran McCanna (tmccanna) wrote :
tags: added: signedoff
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Pushed to master. Thanks, Shula and Terran!

Changed in evergreen:
status: Confirmed → Fix Committed
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Also pushed to rel_3_6 and rel_3_7

Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers