esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhir...@apache.org
Subject svn commit: r963207 - in /incubator/esme/trunk/server/src/main/webapp: scripts/display_messages_top.js templates-hidden/base_top.html
Date Mon, 12 Jul 2010 08:11:26 GMT
Author: rhirsch
Date: Mon Jul 12 08:11:26 2010
New Revision: 963207

URL: http://svn.apache.org/viewvc?rev=963207&view=rev
Log:
[ESME-227] Empty search shouldn't be possible

Modified:
    incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/base_top.html

Modified: incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js?rev=963207&r1=963206&r2=963207&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js (original)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js Mon Jul 12
08:11:26 2010
@@ -58,6 +58,12 @@ function strip(html)
    return tmp.textContent||tmp.innerText;
 }
 
+function searchMe()
+{
+   if(document.forms["validateForm"].term.value.trim.length > 0)
+   	document.forms["validateForm"].submit();
+}
+
 function displayMessages(msgArray, elementId)
 {
 	

Modified: incubator/esme/trunk/server/src/main/webapp/templates-hidden/base_top.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/base_top.html?rev=963207&r1=963206&r2=963207&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/base_top.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/base_top.html Mon Jul 12
08:11:26 2010
@@ -103,13 +103,13 @@
                             </li>
 
                         </ul><!--search form-->
-                        <form action="/info_view/search" method="post" id = "validateForm">
+                        <form  action="/info_view/search" method="post" id = "validateForm">
                             <div id="search">
                                 <div class="searchBox">
                                     <input type="text" class="inputBox required alphanumeric
nowhitespace" name="term" value=""/>
                                 </div>
                                 <div class="searchButton">
-                                    <input type="image" onclick="javascript:form.submit();"
src="images/btn-search.gif" style="padding:0;"/>
+                                    <input type="image" onclick="javascript:searchMe();"
src="images/btn-search.gif" style="padding:0;"/>
                                 </div>
                             </div>
                         </form><!--search form--><h3><a href=""  class
="tipelement" title="These are tags that appear often in your timeline."><lift:loc>ui_messages_message_label_tag_cloud</lift:loc></a></h3>



Mime
View raw message