Skip to content

File tree

19 files changed

+1646
-1560
lines changed

19 files changed

+1646
-1560
lines changed

NEWS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
0.x
22
- (infrastructure) switched to Java8
3+
- (user interface) ported to Bootstrap 3
34

45
0.3
56
- (functionality) implemented possibility to user to add series to his collection

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<togglz.version>2.1.0.Final</togglz.version>
4040

4141
<!-- Also don't forget to change version in src/main/java/ru/mystamps/web/config/MvcConfig.java -->
42-
<bootstrap.version>2.3.1</bootstrap.version>
42+
<bootstrap.version>3.3.4</bootstrap.version>
4343
<jquery.version>1.9.1</jquery.version>
4444

4545
<testng.version>6.8.8</testng.version>

src/main/java/ru/mystamps/web/config/MvcConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
8484

8585
// For WebJars:
8686
registry.addResourceHandler("/public/bootstrap/**")
87-
.addResourceLocations("classpath:/META-INF/resources/webjars/bootstrap/2.3.1/");
87+
.addResourceLocations("classpath:/META-INF/resources/webjars/bootstrap/3.3.4/");
8888
registry.addResourceHandler("/public/jquery/**")
8989
.addResourceLocations("classpath:/META-INF/resources/webjars/jquery/1.9.1/");
9090
}

src/main/webapp/WEB-INF/static/styles/main.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,10 @@ label {
5555
font-weight: bold;
5656
}
5757

58-
.top-indent {
59-
padding-top: 20px;
60-
}
61-
6258
.no-margin {
6359
margin: 0px;
6460
}
6561

6662
.no-padding {
6763
padding: 0px;
6864
}
69-

src/main/webapp/WEB-INF/views/account/activate.html

Lines changed: 105 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -8,149 +8,153 @@
88
<meta name="robots" content="noindex" />
99
<title th:text="|MyStamps: #{t_activation_title}|">MyStamps: account activation</title>
1010
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.ico" th:href="${FAVICON_ICO}" />
11-
<link rel="stylesheet" href="http://yandex.st/bootstrap/2.3.1/css/bootstrap.min.css" th:href="${BOOTSTRAP_CSS}" />
12-
<link rel="stylesheet" href="http://yandex.st/bootstrap/2.3.1/css/bootstrap-responsive.min.css" th:href="${BOOTSTRAP_RESPONSIVE_CSS}" />
11+
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" th:href="${BOOTSTRAP_CSS}" />
1312
<link rel="stylesheet" href="../../static/styles/main.css" th:href="${MAIN_CSS}" />
1413
</head>
1514
<body lang="en" th:lang="${#locale.language == 'ru' ? 'ru' : 'en'}">
16-
<div class="row-fluid" id="header">
17-
<div id="logo" class="span10">
18-
<a href="../site/index.html" th:href="'/'" th:text="#{t_my_stamps}">My stamps</a>
19-
</div>
20-
21-
<div id="user_bar" class="span2">
22-
<ul class="unstyled">
23-
<!--/*/
24-
<li sec:authorize="isAuthenticated()">
25-
<i class="icon-user"></i>
26-
<a sec:authentication="principal.user.name"
27-
href="../collection/info.html"
28-
title="Open my collection"
29-
th:title="#{t_open_my_collection}"
30-
th:href="@{${INFO_COLLECTION_PAGE}(id=${#authentication.principal.user.collection.id},slug=${#authentication.principal.user.collection.slug})}">
31-
John Doe
32-
</a>
33-
</li>
34-
/*/-->
35-
<li sec:authorize="isAnonymous()">
36-
<a href="../account/auth.html" th:href="@{${AUTHENTICATION_PAGE}}" th:text="#{t_enter}">Sign in</a>
37-
</li>
38-
<!--/*/
39-
<li sec:authorize="isAuthenticated()">
40-
<form id="LogoutForm" method="get" action="../site/index.html" class="no-margin" th:method="post" th:action="@{${LOGOUT_PAGE}}">
41-
<i class="icon-share"></i>&nbsp;<input type="submit" value="Sign out" class="btn btn-link no-padding" th:value="#{t_logout}" />
42-
</form>
43-
</li>
44-
/*/-->
45-
<li sec:authorize="isAnonymous()">
46-
<a href="../account/register.html" th:href="@{${REGISTRATION_PAGE}}" th:text="#{t_register}">Register</a>
47-
</li>
48-
</ul>
49-
</div>
50-
</div>
51-
<!--/*/
52-
<div class="row-fluid top-indent" th:if="${justRegisteredUser}">
53-
<div class="alert alert-success text-center span8 offset2" th:text="#{t_activation_sent_message}">
54-
Instructions to finish registration sent to your e-mail
55-
</div>
56-
</div>
57-
/*/-->
58-
<div class="row-fluid">
59-
<div id="content" class="span12">
60-
61-
<h3 th:text="#{t_activation_on_site}">
62-
Account activation
63-
</h3>
15+
<div class="container-fluid">
16+
<div class="row" id="header">
17+
<div id="logo" class="col-sm-10">
18+
<a href="../site/index.html" th:href="'/'" th:text="#{t_my_stamps}">My stamps</a>
19+
</div>
6420

65-
<!--/*/ <th:block sec:authorize="isAnonymous()"> /*/-->
66-
<div class="hint text-center">
67-
<small th:with="redAsterisk='&lt;span class=&quot;required_field&quot;&gt;*&lt;/span&gt;'">
68-
<span class="hint_item" th:utext="#{t_required_fields_legend(${redAsterisk})}">
69-
All fields marked by asterisk (<span class="required_field">*</span>) must be filled.
70-
</span>
71-
</small>
72-
</div>
73-
<div class="span6 offset3">
21+
<div id="user_bar" class="col-sm-2">
22+
<ul class="list-unstyled">
23+
<!--/*/
24+
<li sec:authorize="isAuthenticated()">
25+
<i class="glyphicon glyphicon-user"></i>
26+
<a sec:authentication="principal.user.name"
27+
href="../collection/info.html"
28+
title="Open my collection"
29+
th:title="#{t_open_my_collection}"
30+
th:href="@{${INFO_COLLECTION_PAGE}(id=${#authentication.principal.user.collection.id},slug=${#authentication.principal.user.collection.slug})}">
31+
John Doe
32+
</a>
33+
</li>
34+
/*/-->
35+
<li sec:authorize="isAnonymous()">
36+
<a href="../account/auth.html" th:href="@{${AUTHENTICATION_PAGE}}" th:text="#{t_enter}">Sign in</a>
37+
</li>
38+
<!--/*/
39+
<li sec:authorize="isAuthenticated()">
40+
<form id="LogoutForm" method="get" action="../site/index.html" class="no-margin" th:method="post" th:action="@{${LOGOUT_PAGE}}">
41+
<i class="glyphicon glyphicon-share"></i>&nbsp;<input type="submit" value="Sign out" class="btn btn-link no-padding" th:value="#{t_logout}" />
42+
</form>
43+
</li>
44+
/*/-->
45+
<li sec:authorize="isAnonymous()">
46+
<a href="../account/register.html" th:href="@{${REGISTRATION_PAGE}}" th:text="#{t_register}">Register</a>
47+
</li>
48+
</ul>
49+
</div>
50+
</div>
51+
<div class="row">
52+
<div id="content" class="col-sm-6 col-sm-offset-3">
53+
54+
<h3 th:text="#{t_activation_on_site}">
55+
Account activation
56+
</h3>
57+
58+
<!--/*/ <th:block sec:authorize="isAnonymous()"> /*/-->
59+
<div class="hint text-center">
60+
<small th:with="redAsterisk='&lt;span class=&quot;required_field&quot;&gt;*&lt;/span&gt;'">
61+
<span class="hint_item" th:utext="#{t_required_fields_legend(${redAsterisk})}">
62+
All fields marked by asterisk (<span class="required_field">*</span>) must be filled.
63+
</span>
64+
</small>
65+
</div>
66+
67+
<!--/*/
68+
<div class="row" th:if="${justRegisteredUser}">
69+
<div class="alert alert-success text-center" th:text="#{t_activation_sent_message}">
70+
Instructions to finish registration sent to your e-mail
71+
</div>
72+
</div>
73+
/*/-->
74+
7475
<form method="post" class="form-horizontal" action="auth.html" th:action="@{${ACTIVATE_ACCOUNT_PAGE}}" th:object="${activateAccountForm}">
7576

76-
<div class="control-group" th:classappend="${#fields.hasErrors('login') ? 'error' : ''}">
77-
<label for="login" class="control-label">
77+
<div class="form-group" th:classappend="${#fields.hasErrors('login') ? 'has-error' : ''}">
78+
<label for="login" class="control-label col-sm-3">
7879
<span class="field-label" th:text="#{t_login}">Login</span>
7980
<span id="login.required" class="required_field">*</span>
8081
</label>
81-
<div class="controls">
82-
<input type="text" id="login" required="required" th:field="*{login}" />
83-
<span id="login.errors" class="help-inline" th:if="${#fields.hasErrors('login')}" th:each="error : ${#fields.errors('login')}" th:text="${error}"></span>
82+
<div class="col-sm-5">
83+
<input type="text" id="login" class="form-control" required="required" th:field="*{login}" />
84+
<span id="login.errors" class="help-block" th:if="${#fields.hasErrors('login')}" th:each="error : ${#fields.errors('login')}" th:text="${error}"></span>
8485
</div>
8586
</div>
8687

87-
<div class="control-group" th:classappend="${#fields.hasErrors('name') ? 'error' : ''}">
88-
<label for="name" class="control-label">
88+
<div class="form-group" th:classappend="${#fields.hasErrors('name') ? 'has-error' : ''}">
89+
<label for="name" class="control-label col-sm-3">
8990
<span class="field-label" th:text="#{t_name}">Name</span>
9091
</label>
91-
<div class="controls">
92-
<input type="text" id="name" th:field="*{name}" />
93-
<span id="name.errors" class="help-inline" th:if="${#fields.hasErrors('name')}" th:each="error : ${#fields.errors('name')}" th:text="${error}"></span>
92+
<div class="col-sm-5">
93+
<input type="text" id="name" class="form-control" th:field="*{name}" />
94+
<span id="name.errors" class="help-block" th:if="${#fields.hasErrors('name')}" th:each="error : ${#fields.errors('name')}" th:text="${error}"></span>
9495
</div>
9596
</div>
9697

97-
<div class="control-group" th:classappend="${#fields.hasErrors('password') ? 'error' : ''}">
98-
<label for="password" class="control-label">
98+
<div class="form-group" th:classappend="${#fields.hasErrors('password') ? 'has-error' : ''}">
99+
<label for="password" class="control-label col-sm-3">
99100
<span class="field-label" th:text="#{t_password}">Password</span>
100101
<span id="password.required" class="required_field">*</span>
101102
</label>
102-
<div class="controls">
103-
<input type="password" id="password" required="required" th:field="*{password}" />
104-
<span id="password.errors" class="help-inline" th:if="${#fields.hasErrors('password')}" th:each="error : ${#fields.errors('password')}" th:text="${error}"></span>
103+
<div class="col-sm-5">
104+
<input type="password" id="password" class="form-control" required="required" th:field="*{password}" />
105+
<span id="password.errors" class="help-block" th:if="${#fields.hasErrors('password')}" th:each="error : ${#fields.errors('password')}" th:text="${error}"></span>
105106
</div>
106107
</div>
107108

108-
<div class="control-group" th:classappend="${#fields.hasErrors('passwordConfirmation') ? 'error' : ''}">
109-
<label for="passwordConfirmation" class="control-label">
109+
<div class="form-group" th:classappend="${#fields.hasErrors('passwordConfirmation') ? 'has-error' : ''}">
110+
<label for="passwordConfirmation" class="control-label col-sm-3">
110111
<span class="field-label" th:text="#{t_password_again}">Retype password</span>
111112
<span id="passwordConfirmation.required" class="required_field">*</span>
112113
</label>
113-
<div class="controls">
114-
<input type="password" id="passwordConfirmation" required="required" th:field="*{passwordConfirmation}" />
115-
<span id="passwordConfirmation.errors" class="help-inline" th:if="${#fields.hasErrors('passwordConfirmation')}" th:each="error : ${#fields.errors('passwordConfirmation')}" th:text="${error}"></span>
114+
<div class="col-sm-5">
115+
<input type="password" id="passwordConfirmation" class="form-control" required="required" th:field="*{passwordConfirmation}" />
116+
<span id="passwordConfirmation.errors" class="help-block" th:if="${#fields.hasErrors('passwordConfirmation')}" th:each="error : ${#fields.errors('passwordConfirmation')}" th:text="${error}"></span>
116117
</div>
117118
</div>
118119

119-
<div class="control-group" th:classappend="${#fields.hasErrors('activationKey') ? 'error' : ''}">
120-
<label for="activationKey" class="control-label">
120+
<div class="form-group" th:classappend="${#fields.hasErrors('activationKey') ? 'has-error' : ''}">
121+
<label for="activationKey" class="control-label col-sm-3">
121122
<span class="field-label" th:text="#{t_activation_key}">Activation key</span>
122123
<span id="activationKey.required" class="required_field">*</span>
123124
</label>
124-
<div class="controls">
125-
<input type="text" id="activationKey" required="required" th:field="*{activationKey}" />
126-
<span id="activationKey.errors" class="help-inline" th:if="${#fields.hasErrors('activationKey')}" th:each="error : ${#fields.errors('activationKey')}" th:text="${error}"></span>
125+
<div class="col-sm-5">
126+
<input type="text" id="activationKey" class="form-control" required="required" th:field="*{activationKey}" />
127+
<span id="activationKey.errors" class="help-block" th:if="${#fields.hasErrors('activationKey')}" th:each="error : ${#fields.errors('activationKey')}" th:text="${error}"></span>
127128
</div>
128129
</div>
129130

130-
<div class="form-actions">
131-
<input type="submit" class="btn btn-primary" value="Activate" th:value="#{t_activate}" />
131+
<div class="form-group">
132+
<div class="col-sm-offset-3 col-sm-5">
133+
<input type="submit" class="btn btn-primary" value="Activate" th:value="#{t_activate}" />
134+
</div>
132135
</div>
133136

134137
</form>
135-
</div>
136-
<!--/*/ </th:block> /*/-->
138+
<!--/*/ </th:block> /*/-->
139+
</div>
137140
</div>
138-
</div>
139-
<!--/*/
140-
<div class="row-fluid" sec:authorize="isAuthenticated()">
141-
<div class="alert alert-info text-center span8 offset2" th:text="#{t_already_activated}">
142-
You already activated account.
141+
<!--/*/
142+
<div class="row" sec:authorize="isAuthenticated()">
143+
<div class="alert alert-info text-center col-sm-4 col-sm-offset-4" th:text="#{t_already_activated}">
144+
You already activated account.
145+
</div>
146+
</div>
147+
/*/-->
148+
<div class="row">
149+
<footer class="text-right">
150+
<i class="glyphicon glyphicon-envelope"></i>
151+
<a href="mailto:[email protected]" title="Write e-mail" th:href="|mailto:#{t_site_author_email}|" th:title="#{t_write_email}" th:text="#{t_site_author_name}">Slava Semushin</a>, 2009-2015
152+
</footer>
143153
</div>
144-
</div>
145-
/*/-->
146-
<div class="row-fluid">
147-
<footer class="text-right">
148-
<i class="icon-envelope"></i>
149-
<a href="mailto:[email protected]" title="Write e-mail" th:href="|mailto:#{t_site_author_email}|" th:title="#{t_write_email}" th:text="#{t_site_author_name}">Slava Semushin</a>, 2009-2015
150-
</footer>
151154
</div>
152155

153156
<!-- Placed at the end of the document so the pages load faster -->
154-
<script src="http://yandex.st/bootstrap/2.3.1/js/bootstrap.min.js" th:src="${BOOTSTRAP_JS}"></script>
157+
<script src="http://yandex.st/jquery/1.9.1/jquery.min.js" th:src="${JQUERY_JS}"></script>
158+
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" th:src="${BOOTSTRAP_JS}"></script>
155159
</body>
156160
</html>

0 commit comments

Comments
 (0)