[dokuwiki] Re: patch : helper search string

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Sat, 11 Sep 2010 09:00:04 +0200

> Allow the configuration file to have a default search string, which 
> appears/disappears in the search box
>
> +    print ' onfocus="if(this.value==\' 
> '.$conf['search']['text'].'\'){this.value=\'\'}"';
> +    print ' onblur="if(this.value==\'\'){this.value=\' 
> '.$conf['search']['text'].'\'}" ';

Inline JavaScript handlers do not match our coding guidelines [1].
Using an addInitEvent function this effect can easily be achieved from
a conf/userscript.js file - no need to add anything to the core IMHO.

Andi

[1] http://www.dokuwiki.org/devel:javascript#coding_guidelines

-- 
splitbrain.org
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: