Permalink
Browse files

Use HTML5 placeholder attribute for fast-filter inputbox

  • Loading branch information...
J.M
J.M committed Apr 8, 2013
1 parent bd46d10 commit 7c343b997f37f17a0ed52a72ad63e49cf2b09639
Showing with 16 additions and 2 deletions.
  1. +16 −2 libraries/navigation/NavigationTree.class.php
@@ -1031,7 +1031,14 @@ private function _fastFilterHtml($node)
$retval .= "<form class='ajax fast_filter'>";
$retval .= PMA_getHiddenFields($url_params);
$retval .= "<input class='searchClause' name='searchClause'";
- $retval .= " value='" . __('filter databases by name') . "' />";
+ // allow html5 placeholder attribute
+ $placeholder_key = 'value';
+ if (PMA_USR_BROWSER_AGENT !== 'IE'
+ || PMA_USR_BROWSER_VER > 9
+ ) {
+ $placeholder_key = 'placeholder';
+ }
+ $retval .= " $placeholder_key='" . __('filter databases by name') . "' />";
$retval .= "<span title='" . __('Clear Fast Filter') . "'>X</span>";
$retval .= "</form>";
$retval .= "</li>";
@@ -1057,7 +1064,14 @@ private function _fastFilterHtml($node)
$retval .= "<form class='ajax fast_filter'>";
$retval .= PMA_getHiddenFields($url_params);
$retval .= "<input class='searchClause' name='searchClause2'";
- $retval .= " value='" . __('filter items by name') . "' />";
+ // allow html5 placeholder attribute
+ $placeholder_key = 'value';
+ if (PMA_USR_BROWSER_AGENT !== 'IE'
+ || PMA_USR_BROWSER_VER > 9
+ ) {
+ $placeholder_key = 'placeholder';
+ }
+ $retval .= " $placeholder_key='" . __('filter items by name') . "' />";
$retval .= "<span title='" . __('Clear Fast Filter') . "'>X</span>";
$retval .= "</form>";
$retval .= "</li>";

0 comments on commit 7c343b9

Please sign in to comment.