Commit c52852ac authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 673385: Dragging text into the QuickSearch field on index.cgi doesn't delete…

Bug 673385: Dragging text into the QuickSearch field on index.cgi doesn't delete the help text in this field r=dkl a=justdave
parent d77682e0
...@@ -17,41 +17,6 @@ ...@@ -17,41 +17,6 @@
style_urls = [ 'skins/standard/index.css' ] style_urls = [ 'skins/standard/index.css' ]
%] %]
<script type="text/javascript">
<!--
function onLoadActions() {
quicksearchHelpText('quicksearch_main', 'show');
document.getElementById('quicksearch_top').focus();
}
var quicksearch_message = "Enter [% terms.abug %] # or some search terms";
function checkQuicksearch( form ) {
if (form.quicksearch.value == '' || form.quicksearch.value == quicksearch_message ) {
alert('Please enter one or more search terms first.');
return false;
}
return true;
}
function quicksearchHelpText(el_id, action){
var el = document.getElementById(el_id);
if ( action == "show") {
if( el.value == "" ) {
el.value = quicksearch_message
YAHOO.util.Dom.addClass(el, "quicksearch_help_text");
}
} else {
if( el.value == quicksearch_message ) {
el.value = "";
YAHOO.util.Dom.removeClass(el, "quicksearch_help_text");
}
}
}
YAHOO.util.Event.onDOMReady(onLoadActions);
//-->
</script>
[% IF release %] [% IF release %]
<div id="new_release"> <div id="new_release">
[% IF release.data %] [% IF release.data %]
...@@ -128,11 +93,10 @@ YAHOO.util.Event.onDOMReady(onLoadActions); ...@@ -128,11 +93,10 @@ YAHOO.util.Event.onDOMReady(onLoadActions);
</div> </div>
<div> <div>
<form id="quicksearchForm" name="quicksearchForm" action="buglist.cgi" <form id="quicksearchForm" name="quicksearchForm" action="buglist.cgi">
onsubmit="return checkQuicksearch(this);"> <input id="quicksearch_main" name="quicksearch" title="Quick Search"
<input id="quicksearch_main" type="text" name="quicksearch" title="Quick Search" placeholder="Enter [% terms.abug %] # or some search terms"
onfocus="quicksearchHelpText(this.id, 'hide');" autofocus required>
onblur="quicksearchHelpText(this.id, 'show');">
<input id="find" type="submit" value="Quick Search"> <input id="find" type="submit" value="Quick Search">
<a href="page.cgi?id=quicksearch.html" title="Quick Search help">[?]</a> <a href="page.cgi?id=quicksearch.html" title="Quick Search help">[?]</a>
</form> </form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment