summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-04-23 21:00:32 -0400
committerJames Moger <james.moger@gitblit.com>2011-04-23 21:00:32 -0400
commit4910c13d1049a03895972878ff268a10149ad033 (patch)
tree45918f9465bb902da368380289bd98777bbedf68 /src
parentf5d0ad7e706f1743b01dcc71f42112d533de89c2 (diff)
downloadgitblit-4910c13d1049a03895972878ff268a10149ad033.tar.gz
gitblit-4910c13d1049a03895972878ff268a10149ad033.zip
Restylized search form. Used GNOME's search icon.
Diffstat (limited to 'src')
-rw-r--r--src/com/gitblit/wicket/GitBlitWebApp.properties4
-rw-r--r--src/com/gitblit/wicket/WicketUtils.java4
-rw-r--r--src/com/gitblit/wicket/panels/PageLinksPanel.html3
-rw-r--r--src/com/gitblit/wicket/panels/PageLinksPanel.java6
-rw-r--r--src/com/gitblit/wicket/resources/gitblit.css16
-rw-r--r--src/com/gitblit/wicket/resources/search-icon.pngbin0 -> 395 bytes
6 files changed, 25 insertions, 8 deletions
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 @@
<!-- floating search form on right -->
<form wicket:id="searchForm">
<div class="search">
- <select wicket:id="searchType"/>
- <wicket:message key="gb.search"></wicket:message>:
+ <select wicket:id="searchType"/>
<input type="text" id="searchBox" wicket:id="searchBox" value=""/>
</div>
</form>
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> searchType = new DropDownChoice<SearchType>("searchType", Arrays.asList(SearchType.values()));
searchType.setModel(searchTypeModel);
+ WicketUtils.setHtmlTitle(searchType, getString("gb.searchTypeTooltip"));
add(searchType);
- add(new TextField<String>("searchBox", searchBoxModel));
+ TextField<String> searchBox = new TextField<String>("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
--- /dev/null
+++ b/src/com/gitblit/wicket/resources/search-icon.png
Binary files differ