Author: bbrossaud Date: 2010-05-21 12:13:25 +0200 (Fri, 21 May 2010) New Revision: 32 Url: http://chorem.org/repositories/revision/bow/32 Log: addition 'http://' to the bookmark adress if it doesn't exist Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java trunk/src/main/webapp/css/styles.css trunk/src/main/webapp/home.jsp trunk/src/main/webapp/openSearchResult.jsp trunk/src/main/webapp/register.jsp trunk/src/main/webapp/search.jsp Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java =================================================================== --- trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-05-21 08:09:47 UTC (rev 31) +++ trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-05-21 10:13:25 UTC (rev 32) @@ -61,6 +61,9 @@ if (url != null && !url.isEmpty()) { String link = url.trim(); + if (!link.contains("http://")) { + link = "http://" + link; + } bookmark.setLink(link); } bookmark.setClick(0); Modified: trunk/src/main/webapp/css/styles.css =================================================================== --- trunk/src/main/webapp/css/styles.css 2010-05-21 08:09:47 UTC (rev 31) +++ trunk/src/main/webapp/css/styles.css 2010-05-21 10:13:25 UTC (rev 32) @@ -89,6 +89,41 @@ width: 80%; } +h1.result { + font-family:monospace; + color:#FF3F42; + font-size:1.6em; + font-weight:normal; + line-height:20px; + margin-bottom:20px; + margin-left: 5px; + margin-right: 5px; + text-align: center; + background-color: #C5E3F7; + border-radius: 30px; + -webkit-border-radius: 30px; + -moz-border-radius: 30px; + -opera-border-radius:30px; + +} + +h1.login { + font-family:monospace; + color:#FF3F42; + border-bottom: 3px solid #C5E3F7; + margin-bottom: 10px; +} + +h2.result { + font-family:monospace; + color:#FF3F42; + font-size:1em; + font-weight:normal; + line-height:20px; + margin-top:50px; + text-align: center; +} + div.menu{ margin: 10px; border-bottom: 1px solid #ccc; @@ -105,22 +140,13 @@ a { font-family:monospace; - /*background-color:#EFF6FF;*/ color:#0078C8; padding: 0; margin: 0; - /*text-decoration:none;*/ - /*border:2px solid;*/ - /*pour avoir un effet "outset" avec IE :*/ - /*border-color:#75CEFF #6495ed #6495ed #75CEFF;*/ - } a:hover { color: #0095f8; - /*background-color:#D3D3D3;*/ - /*border-color:#696969 #DCDCDC #DCDCDC #696969;*/ - } a.tag { Modified: trunk/src/main/webapp/home.jsp =================================================================== --- trunk/src/main/webapp/home.jsp 2010-05-21 08:09:47 UTC (rev 31) +++ trunk/src/main/webapp/home.jsp 2010-05-21 10:13:25 UTC (rev 32) @@ -4,8 +4,9 @@ %> <html> + <link rel="stylesheet" type="text/css" href="./css/styles.css" /> <body> - <h1>Login</h1> + <h1 class="login">Login</h1> <form method="POST" action="bow?action=login"> email <input type="text" name="email" size="20"><br /> password <input type=password name="password" size="20"><br /> @@ -14,6 +15,6 @@ <%if (error != null) {%> <font color="red"><%=error%></font> <%}%> - <br/><a href="bow?action=registration">register</a> + <a href="bow?action=registration">register</a> </body> </html> \ No newline at end of file Modified: trunk/src/main/webapp/openSearchResult.jsp =================================================================== --- trunk/src/main/webapp/openSearchResult.jsp 2010-05-21 08:09:47 UTC (rev 31) +++ trunk/src/main/webapp/openSearchResult.jsp 2010-05-21 10:13:25 UTC (rev 32) @@ -22,14 +22,14 @@ %> <html> + <link rel="stylesheet" type="text/css" href="./css/styles.css" /> <body> - <h1>Result</h1> + <h1 class="result">Results</h1> <% if (bookmarkActions != null) { List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); if (!bookmarkList.isEmpty()) { %> - <br/><br/>Results:<br/> <table class="result"> <tr class="result"> <th class="result"> @@ -62,8 +62,8 @@ </th> </tr> <% - SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); - for (Bookmark bookmark : bookmarkList) { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + for (Bookmark bookmark : bookmarkList) { %> <tr class="result"> <td class="result"> @@ -89,14 +89,15 @@ <td class="result"> <%=bookmark.getClick()%> </td> - <% - } - %> + </tr> + <% + } + %> </table> <% - } else { + } else { %> - <br/><br/>No Bookmarks found<br/><br/> + <h2 class="result">No Bookmarks found</h2> <% } } %> Modified: trunk/src/main/webapp/register.jsp =================================================================== --- trunk/src/main/webapp/register.jsp 2010-05-21 08:09:47 UTC (rev 31) +++ trunk/src/main/webapp/register.jsp 2010-05-21 10:13:25 UTC (rev 32) @@ -1,8 +1,9 @@ <%@page contentType="text/html" pageEncoding="UTF-8"%> <%String error = (String) request.getAttribute("errorMessage");%> <html> + <link rel="stylesheet" type="text/css" href="./css/styles.css" /> <body> - <h1>Register</h1> + <h1 class="login">Register</h1> <form method="POST" action="bow?action=register"> email <input type="text" name="email" size="20"><br /> @@ -12,6 +13,6 @@ <%if (error != null && error.isEmpty() == false) {%> <br/><font color="red"><%=error%></font> <%}%> - <br/><a href="bow?action=home">Return to the login page</a> + <a href="bow?action=home">Return to the login page</a> </body> </html> \ No newline at end of file Modified: trunk/src/main/webapp/search.jsp =================================================================== --- trunk/src/main/webapp/search.jsp 2010-05-21 08:09:47 UTC (rev 31) +++ trunk/src/main/webapp/search.jsp 2010-05-21 10:13:25 UTC (rev 32) @@ -30,12 +30,12 @@ <link rel="search" type="application/opensearchdescription+xml" title="bowPermanentSearchEngine" href="<%=url%>bow?action=permanentXml" /> <body> <div id="table"> + <h1 class="result">My Bookmarks</h1> <% if (bookmarkActions != null) { List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); if (!bookmarkList.isEmpty()) { %> - Results:<br/> <table class="result"> <tr class="result"> <th class="result remove">Remove</th> @@ -70,8 +70,8 @@ </th> </tr> <% - SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); - for (Bookmark bookmark : bookmarkList) { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + for (Bookmark bookmark : bookmarkList) { %> <tr class="result"> <td class="result"> @@ -111,16 +111,17 @@ <td class="result"> <%=bookmark.getClick()%> </td> - <% + </tr> + <% } - %> + %> </table> <% - } - } else { + } else { %> - <br/><br/>No Bookmarks<br/><br/> + <h2 class="result">No Bookmarks</h2> <% } + } %> </div> <div id="menu"> @@ -135,9 +136,9 @@ <div class="menu"> <form method="POST" action="bow?action=addUrl"> URL<br /> - <input onclick="this.value=''" type="text" name="url" size="20" value="URL" /><br /> + <input type="text" name="url" size="20" value="URL" /><br /> Name and Tags<br /> - <input onclick="this.value='|'" type="text" name="nameAndTags" size="20" value="name|tag1 tag2..." /><br /> + <input type="text" name="nameAndTags" size="20" value="name|tag1 tag2..." /><br /> <input type="submit" value="add" /> </form> </div>