james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject svn commit: r1522422 - /james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java
Date Thu, 12 Sep 2013 04:57:44 GMT
Author: dongxu
Date: Thu Sep 12 04:57:43 2013
New Revision: 1522422

URL: http://svn.apache.org/r1522422
Log:
add searching... loading progress; add some attribute to searchbox, say magnifying glass and
placeholder and so on

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java?rev=1522422&r1=1522421&r2=1522422&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/SearchBoxView.java Thu
Sep 12 04:57:43 2013
@@ -30,10 +30,15 @@ import com.google.gwt.event.dom.client.K
 import com.google.gwt.event.dom.client.KeyUpEvent;
 import com.google.gwt.event.dom.client.KeyUpHandler;
 <<<<<<< HEAD
+<<<<<<< HEAD
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
 =======
 >>>>>>> prepare to add search feature
+=======
+import com.google.gwt.event.logical.shared.ValueChangeEvent;
+import com.google.gwt.event.logical.shared.ValueChangeHandler;
+>>>>>>> add searching... loading progress; add some attribute to searchbox,
say magnifying glass and placeholder and so on
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.user.client.ui.Button;
@@ -85,20 +90,28 @@ public class SearchBoxView extends Compo
 	private Button searchButton = new Button("Search");
 	@UiField protected HorizontalPanel thisPanel;
 
-//	@SuppressWarnings("deprecation")
+	// @SuppressWarnings("deprecation")
 	public SearchBoxView() {
 		initWidget(binder.createAndBindUi(this));
 
-//        searchBox.addStyleName(HupaCSS.C_msg_search);
-        
-//        searchBox.setAnimationEnabled(true);
-//        searchBox.setAutoSelectEnabled(false);
-//        searchBox.setLimit(20);
+		// searchBox.addStyleName(HupaCSS.C_msg_search);
+
+		// searchBox.setAnimationEnabled(true);
+		// searchBox.setAutoSelectEnabled(false);
+		// searchBox.setLimit(20);
 		searchBox.getElement().setAttribute("type", "search");
+		searchBox.getElement().setAttribute("placeholder", "Search...");
+		searchBox.getElement().setAttribute("results", "10");
+		searchBox.getElement().setAttribute("incremental", "incremental");
+		searchBox.getElement().setAttribute("name", "s");
 		searchBox.addKeyUpHandler(new KeyUpHandler() {
 			public void onKeyUp(KeyUpEvent event) {
+<<<<<<< HEAD
 				if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
 >>>>>>> prepare to add search feature
+=======
+				if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER || (event.getNativeKeyCode() == KeyCodes.KEY_BACKSPACE
&& searchBox.getText().trim().equals(""))) {
+>>>>>>> add searching... loading progress; add some attribute to searchbox,
say magnifying glass and placeholder and so on
 					searchButton.click();
 				}
 			}



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message