Преглед на файлове

use placeholder attribute for Search

raylu преди 14 години
родител
ревизия
599aaa9f1e
променени са 1 файла, в които са добавени 2 реда и са изтрити 12 реда
  1. 2 12
      views/layouts/default.html.php

+ 2 - 12
views/layouts/default.html.php

@@ -9,18 +9,8 @@ use \lithium\security\Auth;
 	<?= $this->html->style(array('style', 'base')) ?>
 	<?= $this->html->style('themes/light') ?>
 	<?= $this->html->style('prettyPhoto') ?>
+	<?= $this->html->style('http://fonts.googleapis.com/css?family=Cantarell:regular,bold&amp;v1') ?>
 	<?= $this->styles(); ?>
-
-	<script type="text/javascript" >
-	function clearDefault(el) {
-		if (el.defaultValue == el.value)
-			el.value = ""
-	}
-	function resetValue(el) {
-		el.value = "Search..."
-	}
-	</script>
-	<link href='http://fonts.googleapis.com/css?family=Cantarell:regular,bold&amp;v1' rel='stylesheet' type='text/css'>
 </head>
 <header>
 	<?php
@@ -69,7 +59,7 @@ use \lithium\security\Auth;
 	?>
 
 	<?= $this->form->create(null, array('url' => '/search/index/anime', 'class' => 'search', 'method' => 'get')); ?>
-	<?= $this->form->text('search', array('value' => 'Search...', 'onFocus' => 'clearDefault(this)', 'style' => 'width: 200px')); ?>
+	<?= $this->form->text('search', array('placeholder' => 'Search...')); ?>
 	<input type="submit" value="Go">
 	<?= $this->form->end(); ?>