Skip to content

Commit c0343d8

Browse files
committed
show field
1 parent 65bf44b commit c0343d8

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

src/main/java/ru/mystamps/web/Url.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public final class Url {
8282
public static final String ADD_SERIES_WITH_COUNTRY_PAGE = "/series/add/country/{slug}";
8383

8484
// MUST be updated when any of our resources were modified
85-
public static final String RESOURCES_VERSION = "v0.3.2";
85+
public static final String RESOURCES_VERSION = "v0.3.3";
8686

8787
// CheckStyle: ignore LineLength for next 4 lines
8888
public static final String MAIN_CSS = "/static/" + RESOURCES_VERSION + "/styles/main.min.css";

src/main/javascript/series/add.js

+4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ function initPage(suggestCountryUrl) {
1010
return CatalogUtils.expandNumbers(val);
1111
});
1212
});
13+
14+
$(".js-collapse-toggle-header").show();
1315

1416
$('.collapse').on('show.bs.collapse hide.bs.collapse', function toggleChevron() {
1517
$(this)
1618
.prev('.js-collapse-toggle-header')
1719
.find('.glyphicon')
1820
.toggleClass('glyphicon-chevron-down glyphicon-chevron-right');
1921
});
22+
23+
$('.collapse').not(".has-error, .js-has-data").collapse('hide');
2024

2125
$('.js-with-tooltip').tooltip({
2226
'placement': 'right'

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

+3
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,6 @@ label {
111111
.link-vcenter {
112112
line-height: 34px;
113113
}
114+
.js-collapse-toggle-header {
115+
display: none;
116+
}

src/main/webapp/WEB-INF/views/series/add.html

+10-9
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,11 @@ <h3 th:text="${#strings.capitalize(add_series)}">
280280

281281
<div class="form-group js-collapse-toggle-header">
282282
<div class="col-sm-offset-3 col-sm-5">
283-
<span class="glyphicon glyphicon-chevron-right" th:class="${issueDateHasErrors or issueDateHasValues ? 'glyphicon glyphicon-chevron-down' : 'glyphicon glyphicon-chevron-right'}"></span>&nbsp;<a href="javascript:void(0)" id="specify-issue-date-link" data-toggle="collapse" data-target=".js-issue-date" th:text="#{t_specify_issue_date}">Specify date of release</a>
283+
<span class="glyphicon glyphicon-chevron-down"></span>&nbsp;<a href="javascript:void(0)" id="specify-issue-date-link" data-toggle="collapse" data-target=".js-issue-date" th:text="#{t_specify_issue_date}">Specify date of release</a>
284284
</div>
285285
</div>
286286

287-
<div class="form-group form-group-sm collapse js-issue-date" th:classappend="|${issueDateHasErrors ? 'has-error in' : ''} ${issueDateHasValues ? 'in' : ''}|">
287+
<div class="form-group form-group-sm js-issue-date collapse in" th:classappend="|${issueDateHasErrors ? 'has-error' : ''} ${issueDateHasValues ? 'js-has-data' : ''}|">
288288
<label for="year" class="control-label col-sm-3">
289289
<span th:remove="tag" th:text="#{t_issue_date}">
290290
Date of release
@@ -372,11 +372,12 @@ <h3 th:text="${#strings.capitalize(add_series)}">
372372

373373
<div class="form-group js-collapse-toggle-header">
374374
<div class="col-sm-offset-3 col-sm-7">
375-
<span class="glyphicon glyphicon-chevron-right" th:class="${showCatalogsInfo ? 'glyphicon glyphicon-chevron-down' : 'glyphicon glyphicon-chevron-right'}"></span>&nbsp;<a href="javascript:void(0)" id="add-catalog-numbers-link" data-toggle="collapse" data-target=".js-catalogs-info" th:text="#{t_add_catalogs_info}">Add information from stamps catalogues</a>
375+
<span class="glyphicon glyphicon-chevron-down"></span>&nbsp;
376+
<a href="javascript:void(0)" id="add-catalog-numbers-link" data-toggle="collapse" data-target=".js-catalogs-info" th:text="#{t_add_catalogs_info}">Add information from stamps catalogues</a>
376377
</div>
377378
</div>
378379

379-
<div class="form-group form-group-sm collapse js-catalogs-info" th:classappend="|${michelHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'in' : ''}|">
380+
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${michelHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
380381
<label for="michelNumbers" class="control-label col-sm-3">
381382
<span th:remove="tag" th:text="#{t_michel}">
382383
Michel
@@ -401,7 +402,7 @@ <h3 th:text="${#strings.capitalize(add_series)}">
401402
</div>
402403
</div>
403404

404-
<div class="form-group form-group-sm collapse js-catalogs-info" th:classappend="|${scottHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'in' : ''}|">
405+
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${scottHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
405406
<label for="scottNumbers" class="control-label col-sm-3">
406407
<span th:remove="tag" th:text="#{t_scott}">
407408
Scott
@@ -426,7 +427,7 @@ <h3 th:text="${#strings.capitalize(add_series)}">
426427
</div>
427428
</div>
428429

429-
<div class="form-group form-group-sm collapse js-catalogs-info" th:classappend="|${yvertHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'in' : ''}|">
430+
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${yvertHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
430431
<label for="yvertNumbers" class="control-label col-sm-3">
431432
<span th:remove="tag" th:text="#{t_yvert}">
432433
Yvert
@@ -451,7 +452,7 @@ <h3 th:text="${#strings.capitalize(add_series)}">
451452
</div>
452453
</div>
453454

454-
<div class="form-group form-group-sm collapse js-catalogs-info" th:classappend="|${gibbonsHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'in' : ''}|">
455+
<div class="form-group form-group-sm js-catalogs-info collapse in" th:classappend="|${gibbonsHasErrors ? 'has-error' : ''} ${showCatalogsInfo ? 'js-has-data' : ''}|">
455456
<label for="gibbonsNumbers" class="control-label col-sm-3">
456457
<span th:remove="tag" th:text="#{t_sg}">
457458
Gibbons
@@ -478,11 +479,11 @@ <h3 th:text="${#strings.capitalize(add_series)}">
478479

479480
<div class="form-group js-collapse-toggle-header" sec:authorize="hasAuthority('ADD_COMMENTS_TO_SERIES')">
480481
<div class="col-sm-offset-3 col-sm-5">
481-
<span class="glyphicon glyphicon-chevron-right" th:class="${#fields.hasErrors('comment') or addSeriesForm.comment != null ? 'glyphicon glyphicon-chevron-down' : 'glyphicon glyphicon-chevron-right'}"></span>&nbsp;<a href="javascript:void(0)" id="add-comment-link" data-toggle="collapse" data-target=".js-comment" th:text="#{t_add_comment}">Add comment</a>
482+
<span class="glyphicon glyphicon-chevron-down"></span>&nbsp;<a href="javascript:void(0)" id="add-comment-link" data-toggle="collapse" data-target=".js-comment" th:text="#{t_add_comment}">Add comment</a>
482483
</div>
483484
</div>
484485

485-
<div class="form-group collapse js-comment" th:classappend="|${#fields.hasErrors('comment') ? 'has-error in' : ''} ${addSeriesForm.comment != null ? 'in' : ''}|" sec:authorize="hasAuthority('ADD_COMMENTS_TO_SERIES')">
486+
<div class="form-group js-comment collapse in" th:classappend="|${#fields.hasErrors('comment') ? 'has-error' : ''} ${addSeriesForm.comment != null ? 'js-has-data' : ''}|" sec:authorize="hasAuthority('ADD_COMMENTS_TO_SERIES')">
486487
<label for="comment" class="control-label col-sm-3">
487488
<span th:remove="tag" th:text="#{t_comment}">
488489
Comment

0 commit comments

Comments
 (0)