From: James Moger Date: Sun, 24 Apr 2011 01:00:32 +0000 (-0400) Subject: Restylized search form. Used GNOME's search icon. X-Git-Tag: v0.5.0~66 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4910c13d1049a03895972878ff268a10149ad033;p=gitblit.git Restylized search form. Used GNOME's search icon. --- diff --git a/src/com/gitblit/wicket/GitBlitWebApp.properties b/src/com/gitblit/wicket/GitBlitWebApp.properties index d1094bff..cbe1d05a 100644 --- a/src/com/gitblit/wicket/GitBlitWebApp.properties +++ b/src/com/gitblit/wicket/GitBlitWebApp.properties @@ -64,4 +64,6 @@ gb.filesDeleted = {0} files deleted gb.filesCopied = {0} files copied gb.filesRenamed = {0} files renamed gb.missingUsername = Missing Username -gb.edit = edit \ No newline at end of file +gb.edit = edit +gb.searchTypeTooltip = Select Search Type +gb.searchTooltip = Search Git:Blit \ No newline at end of file diff --git a/src/com/gitblit/wicket/WicketUtils.java b/src/com/gitblit/wicket/WicketUtils.java index c8d605ba..63e6621f 100644 --- a/src/com/gitblit/wicket/WicketUtils.java +++ b/src/com/gitblit/wicket/WicketUtils.java @@ -32,6 +32,10 @@ public class WicketUtils { container.add(new SimpleAttributeModifier("title", value)); } + public static void setInputPlaceholder(Component container, String value) { + container.add(new SimpleAttributeModifier("placeholder", value)); + } + public static void setChangeTypeCssClass(Component container, ChangeType type) { switch (type) { case ADD: diff --git a/src/com/gitblit/wicket/panels/PageLinksPanel.html b/src/com/gitblit/wicket/panels/PageLinksPanel.html index 974a794b..c467779a 100644 --- a/src/com/gitblit/wicket/panels/PageLinksPanel.html +++ b/src/com/gitblit/wicket/panels/PageLinksPanel.html @@ -8,8 +8,7 @@
diff --git a/src/com/gitblit/wicket/panels/PageLinksPanel.java b/src/com/gitblit/wicket/panels/PageLinksPanel.java index 65034051..deb0f6d2 100644 --- a/src/com/gitblit/wicket/panels/PageLinksPanel.java +++ b/src/com/gitblit/wicket/panels/PageLinksPanel.java @@ -118,8 +118,12 @@ public class PageLinksPanel extends Panel { this.repositoryName = repositoryName; DropDownChoice searchType = new DropDownChoice("searchType", Arrays.asList(SearchType.values())); searchType.setModel(searchTypeModel); + WicketUtils.setHtmlTitle(searchType, getString("gb.searchTypeTooltip")); add(searchType); - add(new TextField("searchBox", searchBoxModel)); + TextField searchBox = new TextField("searchBox", searchBoxModel); + add(searchBox); + WicketUtils.setHtmlTitle(searchBox, getString("gb.searchTooltip")); + WicketUtils.setInputPlaceholder(searchBox, getString("gb.search")); } @Override diff --git a/src/com/gitblit/wicket/resources/gitblit.css b/src/com/gitblit/wicket/resources/gitblit.css index 451915a9..12c43ed4 100644 --- a/src/com/gitblit/wicket/resources/gitblit.css +++ b/src/com/gitblit/wicket/resources/gitblit.css @@ -175,10 +175,18 @@ div.search { padding:4px 4px 3px 3px; } -.repositories_message { - border: solid #bbb; - border-width: 0px 0px 1px; - padding: 8px; +div.search input { + background: url(/com/gitblit/wicket/resources/search-icon.png) no-repeat 4px center; + color: #ddd; + background-color: #000070; + border: 1px solid transparent; + padding: 0px 2px 2px 22px; +} + +div.search input:hover, div.search input:focus { + color: white; + border-bottom: 1px solid orange; + outline: none; } div.page_path { diff --git a/src/com/gitblit/wicket/resources/search-icon.png b/src/com/gitblit/wicket/resources/search-icon.png new file mode 100644 index 00000000..90e8d2c6 Binary files /dev/null and b/src/com/gitblit/wicket/resources/search-icon.png differ