]> source.dussan.org Git - gitblit.git/commitdiff
Restylized search form. Used GNOME's search icon.
authorJames Moger <james.moger@gitblit.com>
Sun, 24 Apr 2011 01:00:32 +0000 (21:00 -0400)
committerJames Moger <james.moger@gitblit.com>
Sun, 24 Apr 2011 01:00:32 +0000 (21:00 -0400)
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/WicketUtils.java
src/com/gitblit/wicket/panels/PageLinksPanel.html
src/com/gitblit/wicket/panels/PageLinksPanel.java
src/com/gitblit/wicket/resources/gitblit.css
src/com/gitblit/wicket/resources/search-icon.png [new file with mode: 0644]

index d1094bff76dd919dd8fac2220c899b2d345e0b57..cbe1d05ac656655463896dd7cdc9d217448f2937 100644 (file)
@@ -64,4 +64,6 @@ gb.filesDeleted = {0} files deleted
 gb.filesCopied = {0} files copied\r
 gb.filesRenamed = {0} files renamed\r
 gb.missingUsername = Missing Username\r
-gb.edit = edit
\ No newline at end of file
+gb.edit = edit\r
+gb.searchTypeTooltip = Select Search Type\r
+gb.searchTooltip = Search Git:Blit
\ No newline at end of file
index c8d605ba751493f1fe3a779838aa995a8f4c2b8b..63e6621f07835464892fe06fbb5790b4a7ce25dd 100644 (file)
@@ -32,6 +32,10 @@ public class WicketUtils {
                container.add(new SimpleAttributeModifier("title", value));\r
        }\r
 \r
+       public static void setInputPlaceholder(Component container, String value) {\r
+               container.add(new SimpleAttributeModifier("placeholder", value));\r
+       }\r
+\r
        public static void setChangeTypeCssClass(Component container, ChangeType type) {\r
                switch (type) {\r
                case ADD:\r
index 974a794b0f15e0d6c1475fc67ae428248ea606db..c467779aa2a3f34007367b58f1362c1e8a40c1a6 100644 (file)
@@ -8,8 +8,7 @@
        <!-- floating search form on right -->\r
        <form wicket:id="searchForm">\r
                <div class="search">\r
-                       <select wicket:id="searchType"/>\r
-                       <wicket:message key="gb.search"></wicket:message>:\r
+                       <select wicket:id="searchType"/>                        \r
                        <input type="text" id="searchBox" wicket:id="searchBox" value=""/>\r
                </div>\r
        </form>\r
index 65034051337d6d76d73269c4e289d6c315fdf1df..deb0f6d246c463ad54140a176b78e478efdcac17 100644 (file)
@@ -118,8 +118,12 @@ public class PageLinksPanel extends Panel {
                        this.repositoryName = repositoryName;\r
                        DropDownChoice<SearchType> searchType = new DropDownChoice<SearchType>("searchType", Arrays.asList(SearchType.values()));\r
                        searchType.setModel(searchTypeModel);\r
+                       WicketUtils.setHtmlTitle(searchType, getString("gb.searchTypeTooltip"));\r
                        add(searchType);\r
-                       add(new TextField<String>("searchBox", searchBoxModel));\r
+                       TextField<String> searchBox = new TextField<String>("searchBox", searchBoxModel);\r
+                       add(searchBox);\r
+                       WicketUtils.setHtmlTitle(searchBox, getString("gb.searchTooltip"));\r
+                       WicketUtils.setInputPlaceholder(searchBox, getString("gb.search"));\r
                }\r
 \r
                @Override\r
index 451915a9c510c8514ab5cb848b2c5b149e5f3e0d..12c43ed49ea91a427180150abecef15eef05e80c 100644 (file)
@@ -175,10 +175,18 @@ div.search {
        padding:4px 4px 3px 3px;        \r
 }\r
 \r
-.repositories_message {\r
-       border: solid #bbb;\r
-       border-width: 0px 0px 1px;\r
-       padding: 8px;\r
+div.search input {\r
+       background: url(/com/gitblit/wicket/resources/search-icon.png) no-repeat 4px center;\r
+       color: #ddd;\r
+       background-color: #000070;\r
+       border: 1px solid transparent;\r
+       padding: 0px 2px 2px 22px;      \r
+}\r
+\r
+div.search input:hover, div.search input:focus {\r
+       color: white;\r
+       border-bottom: 1px solid orange;        \r
+       outline: none;\r
 }\r
 \r
 div.page_path {\r
diff --git a/src/com/gitblit/wicket/resources/search-icon.png b/src/com/gitblit/wicket/resources/search-icon.png
new file mode 100644 (file)
index 0000000..90e8d2c
Binary files /dev/null and b/src/com/gitblit/wicket/resources/search-icon.png differ