Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Junglecss #4

Merged
merged 6 commits into from
Jul 1, 2013
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import br.com.caelum.vraptor.interceptor.download.Download;
import br.com.caelum.vraptor.interceptor.download.FileDownload;
import br.com.caelum.vraptor.interceptor.multipart.UploadedFile;
import br.com.caelum.vraptor.musicjungle.converter.Musics;
import br.com.caelum.vraptor.musicjungle.dao.MusicDao;
import br.com.caelum.vraptor.musicjungle.files.Musics;
import br.com.caelum.vraptor.musicjungle.interceptor.Public;
import br.com.caelum.vraptor.musicjungle.interceptor.UserInfo;
import br.com.caelum.vraptor.musicjungle.model.Music;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package br.com.caelum.vraptor.musicjungle.converter;
package br.com.caelum.vraptor.musicjungle.files;

import java.io.File;
import java.io.FileOutputStream;
Expand Down
1 change: 1 addition & 0 deletions vraptor-musicjungle/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ music.title=Title
music.description=Description
music.type=Type
music.owners = Owners
music.upload = Music

your_musics=Your musics
new_music=Add new musics to your collection
Expand Down
59 changes: 17 additions & 42 deletions vraptor-musicjungle/src/main/webapp/WEB-INF/jsp/home/login.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,24 @@
<span class="logo-message">a place to upload, download and share your favorite musics.</span>
</div>

<div class="container pull-right">

<form action="<c:url value="/home/login"/>" method="post" class="form-inline">

<fieldset class="pull-right">

<legend>Sign In</legend>

<input type="text" name="login"
placeholder="<fmt:message key="login"/>"/>

<input type="password" name="password"
placeholder="<fmt:message key="password"/>"/>

<button type="submit" id="submit" class="btn btn-primary">
<fmt:message key="send"/>
</button>

</fieldset>

<div class="container">
<form action="<c:url value="/home/login"/>" method="post" class="form form-sign">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ${linkTo...}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change everywhere...

<h3>Sign in</h3>
<input id="login" class="input-block-level" type="text" name="login" placeholder="<fmt:message key="login"/>"/>
<input id="password" class="input-block-level" type="password" name="password" placeholder="<fmt:message key="password"/>"/>
<button type="submit" id="submit" class="btn btn-large btn-primary">
<fmt:message key="send"/>
</button>
</form>

<form action="<c:url value="/users"/>" method="post" class="form-inline">

<fieldset class="pull-right">

<legend>Sign Up</legend>

<input type="text" name="user.name" value="${user.name}"
placeholder="<fmt:message key="name"/>"/>

<input type="text" name="user.login" value="${user.login}"
placeholder="<fmt:message key="login"/>"/>

<input type="password" name="user.password" value="${user.password}"
placeholder="<fmt:message key="password"/>"/>

<button type="submit" class="btn btn-primary">
<fmt:message key="send"/>
</button>

</fieldset>

<form action="<c:url value="/users"/>" method="post" class="form form-sign">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${linkTo}

<h3>Sign Up</h3>
<input type="text" class="input-block-level" id="newname" name="user.name" value="${user.name}" placeholder="<fmt:message key="name"/>"/>
<input type="text" class="input-block-level" id="newlogin" name="user.login" value="${user.login}" placeholder="<fmt:message key="login"/>"/>
<input type="password" class="input-block-level" id="newpass" name="user.password" value="${user.password}" placeholder="<fmt:message key="password"/>"/>
<button type="submit" class="btn btn-large btn-primary">
<fmt:message key="send"/>
</button>
</form>
</div>

<%@ include file="../../../footer.jsp" %>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</strong>

<c:forEach items="${music.musicOwners}" var="mo" varStatus="s">
<a href="<c:url value="/users/${user.login}"/>">${mo.owner.name}</a>
<a href="<c:url value="/users/${mo.owner.login}"/>">${mo.owner.name}</a>
${s.last ? '.' : ', ' }
</c:forEach>

Expand Down
34 changes: 16 additions & 18 deletions vraptor-musicjungle/src/main/webapp/WEB-INF/jsp/users/home.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,35 @@

<div class="well">

<form action="<c:url value="/musics"/>" class="form-inline pull-right" enctype="multipart/form-data" method="post">
<form action="<c:url value="/musics"/>" class="form form-music" enctype="multipart/form-data" method="post">
<label for="title"><fmt:message key="music.title"/>
<input type="text" name="music.title" value="${music.title}"/>
</label>
<input type="text" name="music.title" value="${music.title}"/>

<label for="description"><fmt:message key="music.description"/>
<input type="text" name="music.description" value="${music.description}"/>
</label>
<input type="text" name="music.description" value="${music.description}"/>

<label for="type"><fmt:message key="music.type"/>
</label>
<select name="music.type" id="type">
<c:forEach items="${musicTypes}" var="type">
<option value="${type}"><fmt:message key="${type}"/></option>
</c:forEach>
</select>
</label>

<div class="fileupload fileupload-new div-inline" data-provides="fileupload">
<div class="input-append">
<div class="uneditable-input span3 div-inline">
<i class="icon-file fileupload-exists"></i>
<span class="fileupload-preview"></span>
</div><span class="btn btn-file">
<span class="fileupload-new">Select file</span>
<span class="fileupload-exists">Change</span>
<input type="file" name="file"/></span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Remove</a>

<div class="fileupload fileupload-new" data-provides="fileupload">
<label for="upload"><fmt:message key="music.upload"/>
</label>
<span class="btn btn-file">
<span class="fileupload-new">Select file</span>
<span class="fileupload-exists">Change</span>
<input type="file" name="file" />
</span>
<span class="fileupload-preview"></span>
<a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none">�</a>
</div>
</div>

<button type="submit" class="btn btn-primary"><fmt:message key="add_music"/></button>
<button type="submit" class="btn btn-primary pull-left"><fmt:message key="add_music"/></button>
</form>
</div>

Expand Down
11 changes: 4 additions & 7 deletions vraptor-musicjungle/src/main/webapp/WEB-INF/jsp/users/view.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@
<td>${music.description}</td>
<td><fmt:message key="${music.type}"/></td>
<td class="td-options">
<form action="<c:url value="/users/${userInfo
.user.login}/musics/${music.id}"/>" method="post">

<form action="<c:url value="/users/${userInfo.user.login}/musics/${music.id}"/>" method="post">
<input type="hidden" name="_method" value="PUT"/>
<button type="submit" class="btn btn-primary">
<input type="hidden" name="_method" value="PUT"/>
<span class="icon icon-plus icon-white"></span>
<fmt:message key="add_to_my_list"/>
</button>
</form>

<button class="btn btn-primary">
<a href="<c:url value="/musics/download/${music.id}"/>" class="btn btn-primary" download>
<span class="icon icon-download-alt icon-white"></span>
download
</button>
</a>
</td>
</tr>
</c:forEach>
Expand Down
37 changes: 29 additions & 8 deletions vraptor-musicjungle/src/main/webapp/css/musicjungle.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,17 @@ a.brand.logo {
font-size: xx-large;
}

form[method='post'] {
display: inline;
}

.td-options {
width: 340px;
}

div.navbar-fixed-bottom {
.v-footer {
height: 40px;
background-color: #004568;
color: white;
}

div.navbar-fixed-bottom a {
.v-footer a {
color: white;
}

Expand All @@ -59,7 +56,7 @@ div.navbar-fixed-bottom a {

div.well.login-logo {
margin-top: -60px;
margin-bottom: 75px;
margin-bottom: 20 px;
border: solid 1px #004568;
color: #004568;
}
Expand All @@ -75,4 +72,28 @@ span.logo {
span.logo-message {
font-size: 25px;
margin-left: 200px;
}
}

.form{
margin: 10px auto 20px;
border: 1px solid #e5e5e5;
padding: 20px 20px 30px;
border-radius: 5px;
}

.form label, .form input {
display:inline-block;
}

.form label {
width: 150px;
}

.form-sign{
width: 300px;
}

.form-music{
width: 500px;
}

5 changes: 2 additions & 3 deletions vraptor-musicjungle/src/main/webapp/footer.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

</div>

<div class="navbar navbar-fixed-bottom">
<div class="footer v-footer">
<p>
<a href="http://www.apache.org/licenses/LICENSE-2.0">
Licen�a Apache
</a> | VRaptor �2009 Caelum - Ensino e Inova��o
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encoding quebrado?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah... changing :)

</p>
</div>
</div>
</div>

</body>
</html>