Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9703735
)
Add placeholder text in search form (in html5 mode only).
author
Joey Hess
<joey@kitenet.net>
Sun, 2 May 2010 17:49:56 +0000
(13:49 -0400)
committer
Joey Hess
<joey@kitenet.net>
Sun, 2 May 2010 17:49:56 +0000
(13:49 -0400)
IkiWiki/Plugin/google.pm
patch
|
blob
|
history
IkiWiki/Plugin/search.pm
patch
|
blob
|
history
debian/changelog
patch
|
blob
|
history
doc/bugs/html5_support.mdwn
patch
|
blob
|
history
doc/todo/Add_label_to_search_form_input_field.mdwn
patch
|
blob
|
history
templates/googleform.tmpl
patch
|
blob
|
history
templates/searchform.tmpl
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/google.pm
b/IkiWiki/Plugin/google.pm
index 85467fa0b8b24271cc76ec86ad3380758c9637d6..68cde261c66748c5d32475657986ce9d465fbbbf 100644
(file)
--- a/
IkiWiki/Plugin/google.pm
+++ b/
IkiWiki/Plugin/google.pm
@@
-42,6
+42,7
@@
sub pagetemplate (@) {
if (! defined $form) {
my $searchform = template("googleform.tmpl", blind_cache => 1);
$searchform->param(url => $config{url});
if (! defined $form) {
my $searchform = template("googleform.tmpl", blind_cache => 1);
$searchform->param(url => $config{url});
+ $searchform->param(html5 => $config{html5});
$form=$searchform->output;
}
$form=$searchform->output;
}
diff --git
a/IkiWiki/Plugin/search.pm
b/IkiWiki/Plugin/search.pm
index be39fdf1e4046a7b4e404800ca68cc1890b76860..9e875c79cc6008e4a5bca4d294a659e2fac21acd 100644
(file)
--- a/
IkiWiki/Plugin/search.pm
+++ b/
IkiWiki/Plugin/search.pm
@@
-58,6
+58,7
@@
sub pagetemplate (@) {
if (! defined $form) {
my $searchform = template("searchform.tmpl", blind_cache => 1);
$searchform->param(searchaction => $config{cgiurl});
if (! defined $form) {
my $searchform = template("searchform.tmpl", blind_cache => 1);
$searchform->param(searchaction => $config{cgiurl});
+ $searchform->param(html5 => $config{html5});
$form=$searchform->output;
}
$form=$searchform->output;
}
diff --git
a/debian/changelog
b/debian/changelog
index 8158429a0411e43c40625c4da22a815d64d6cc47..c9fc2e65790dd047f6b8307405666813d00faa19 100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-2,6
+2,7
@@
ikiwiki (3.20100502) UNRELEASED; urgency=low
* Add parameter to displaytime to specify that it is a pubdate,
and in html5 mode, use time tag.
* Add parameter to displaytime to specify that it is a pubdate,
and in html5 mode, use time tag.
+ * Add placeholder text in search form (in html5 mode only).
-- Joey Hess <joeyh@debian.org> Sun, 02 May 2010 13:22:50 -0400
-- Joey Hess <joeyh@debian.org> Sun, 02 May 2010 13:22:50 -0400
diff --git
a/doc/bugs/html5_support.mdwn
b/doc/bugs/html5_support.mdwn
index 386a3094aa1a299ae15b1f3b34491cd06c9c51dc..5530b29db13ebfac1e376a606c2370b846696a5a 100644
(file)
--- a/
doc/bugs/html5_support.mdwn
+++ b/
doc/bugs/html5_support.mdwn
@@
-64,11
+64,8
@@
HTML5](http://www.w3.org/TR/html5-diff/).
>
> Other ideas:
>
>
> Other ideas:
>
-> * Add pubdate attribute to time elements as appropriate.
> * Use aside for the sidebar? Or for the [[templates/note]] template?
> * Use nav for the actionbar
> * Use aside for the sidebar? Or for the [[templates/note]] template?
> * Use nav for the actionbar
-> * Use placeholder in the search box. Allows closing
-> [[this_todo|Add_label_to_search_form_input_field]]
> * Use details tag instead of the javascript in the toggle plugin.
> (Need to wait on browser support probably.)
>
> * Use details tag instead of the javascript in the toggle plugin.
> (Need to wait on browser support probably.)
>
diff --git
a/doc/todo/Add_label_to_search_form_input_field.mdwn
b/doc/todo/Add_label_to_search_form_input_field.mdwn
index 281ab48e26167ff316b19a8696230d896c5e0bd8..514108fbad772fd5779e4b3d0d2b166b344a939c 100644
(file)
--- a/
doc/todo/Add_label_to_search_form_input_field.mdwn
+++ b/
doc/todo/Add_label_to_search_form_input_field.mdwn
@@
-51,4
+51,6
@@
The patch below adds a label for the field to improve usability:
> element. already works in eg, chromium. However, ikiwiki does not use
> html5 yet. --[[Joey]]
> element. already works in eg, chromium. However, ikiwiki does not use
> html5 yet. --[[Joey]]
+>> [[Done]], placeholder added, in html5 mode only.
+
[[!tag wishlist bugs/html5_support]]
[[!tag wishlist bugs/html5_support]]
diff --git
a/templates/googleform.tmpl
b/templates/googleform.tmpl
index bcf1004a46cf8bd908f1c548c7fcfc8f67448531..f39b465404d67e8d6cb6dba7e0b5f8f11b0a87e7 100644
(file)
--- a/
templates/googleform.tmpl
+++ b/
templates/googleform.tmpl
@@
-1,6
+1,7
@@
<form method="get" action="http://www.google.com/search" id="searchform">
<div>
<input name="sitesearch" value="<TMPL_VAR URL>" type="hidden" />
<form method="get" action="http://www.google.com/search" id="searchform">
<div>
<input name="sitesearch" value="<TMPL_VAR URL>" type="hidden" />
- <input name="q" value="" id="searchbox" size="16" maxlength="255" type="text" />
+ <input name="q" value="" id="searchbox" size="16" maxlength="255" type="text"
+ <TMPL_IF HTML5>placeholder="search"</TMPL_IF> />
</div>
</form>
</div>
</form>
diff --git
a/templates/searchform.tmpl
b/templates/searchform.tmpl
index afae2ebf5d711b60fb87dbb9020cdcd98de4f98c..cb65d124ca9d543b762bbfb5e40100e09c5e1436 100644
(file)
--- a/
templates/searchform.tmpl
+++ b/
templates/searchform.tmpl
@@
-1,5
+1,6
@@
<form method="get" action="<TMPL_VAR SEARCHACTION>" id="searchform">
<div>
<form method="get" action="<TMPL_VAR SEARCHACTION>" id="searchform">
<div>
-<input type="text" id="searchbox" name="P" value="" size="16" />
+<input type="text" id="searchbox" name="P" value="" size="16"
+<TMPL_IF HTML5>placeholder="search"</TMPL_IF> />
</div>
</form>
</div>
</form>