Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
Ecsite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shoei.kanno
Ecsite
Commits
6bf13d31
Commit
6bf13d31
authored
Oct 21, 2020
by
shoei.kanno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
バグの修正
parent
b3f409e5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
12 deletions
+25
-12
ShoesRepository.java
src/main/java/com/example/repository/ShoesRepository.java
+1
-1
EcsiteController.java
src/main/java/com/example/web/EcsiteController.java
+0
-2
style.css
src/main/resources/static/css/style.css
+9
-2
list.js
src/main/resources/static/js/list.js
+7
-2
スニーカー1.jpg
src/main/resources/static/upload/スニーカー1.jpg
+0
-0
スニーカー2.jpg
src/main/resources/static/upload/スニーカー2.jpg
+0
-0
cart.html
src/main/resources/templates/cart.html
+1
-1
index.html
src/main/resources/templates/index.html
+4
-4
list.html
src/main/resources/templates/list.html
+3
-0
No files found.
src/main/java/com/example/repository/ShoesRepository.java
View file @
6bf13d31
...
...
@@ -10,6 +10,6 @@ import com.example.domain.Shoes;
//靴データ取得用
//statusによって出し分け
public
interface
ShoesRepository
extends
JpaRepository
<
Shoes
,
Integer
>{
@Query
(
value
=
"SELECT * FROM shoes WHERE product_status = ?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"SELECT * FROM shoes WHERE product_status = ?1
ORDER BY id DESC
"
,
nativeQuery
=
true
)
public
List
<
Shoes
>
findAllByStatus
(
Integer
status
);
}
src/main/java/com/example/web/EcsiteController.java
View file @
6bf13d31
...
...
@@ -108,12 +108,10 @@ public class EcsiteController {
//一般商品取得
List
<
Shoes
>
generalShoes
=
shoesService
.
findAllGeneralShoes
();
model
.
addAttribute
(
"generalShoes"
,
generalShoes
);
System
.
out
.
println
(
generalShoes
);
//限定商品取得
List
<
Shoes
>
limitedShoes
=
shoesService
.
findAllLimitedShoes
();
model
.
addAttribute
(
"limitedShoes"
,
limitedShoes
);
System
.
out
.
println
(
limitedShoes
);
//user情報取得、格納
User
user
=
userDetails
.
getUser
();
...
...
src/main/resources/static/css/style.css
View file @
6bf13d31
...
...
@@ -1893,7 +1893,7 @@ th, td {
.productBox
{
/*background-color: #FDF5E6;*/
height
:
4
0
0px
;
height
:
4
5
0px
;
width
:
33%
;
/*border: 1px solid black;*/
box-sizing
:
border-box
;
...
...
@@ -1912,6 +1912,7 @@ th, td {
}
/* listモーダル */
#modal-content
{
width
:
30%
;
...
...
@@ -1961,7 +1962,7 @@ th, td {
color
:
#000
;
}
.detailsBtn
,
.shoeImage
,
.shoeName
,
.shoePrice
,
.shoeImageDiv
,
.modalShow
{
.detailsBtn
,
.shoeImage
,
.shoe
Size
,
.shoe
Name
,
.shoePrice
,
.shoeImageDiv
,
.modalShow
{
text-align
:
center
;
}
...
...
@@ -2048,3 +2049,8 @@ th, td {
#en
{
margin-right
:
10px
;
}
/* top画面フッター */
#top-footer
{
margin-top
:
70px
;
}
\ No newline at end of file
src/main/resources/static/js/list.js
View file @
6bf13d31
...
...
@@ -5,6 +5,7 @@ $(function(){
$
(
".details"
).
click
(
function
(
event
){
$
(
'#showName'
).
empty
();
$
(
'#showSize'
).
empty
();
$
(
'#showPrice'
).
empty
();
$
(
'#showId'
).
empty
();
//以下デモ参照
...
...
@@ -26,18 +27,22 @@ $(function(){
//一覧画面から情報取得
let
nameField
=
document
.
createElement
(
"p"
);
let
sizeField
=
document
.
createElement
(
"p"
);
let
priceField
=
document
.
createElement
(
"p"
);
let
idField
=
document
.
createElement
(
"input"
);
idField
.
setAttribute
(
"type"
,
"hidden"
);
// let name = $(event.target.parentNode.children[1].textContent);
// let price =$(event.target.parentNode.children[2].textContent);
// let id =$(event.target.parentNode.children[3].value);
let
src
=
$
(
event
.
target
.
parentNode
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
).
children
(
'img'
).
attr
(
'src'
);
let
name
=
$
(
event
.
target
.
parentNode
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
.
textContent
);
let
src
=
$
(
event
.
target
.
parentNode
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
).
children
(
'img'
).
attr
(
'src'
);
let
name
=
$
(
event
.
target
.
parentNode
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
.
textContent
);
let
size
=
$
(
event
.
target
.
parentNode
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
.
textContent
);
let
price
=
$
(
event
.
target
.
parentNode
.
previousElementSibling
.
previousElementSibling
.
textContent
);
let
id
=
$
(
event
.
target
.
parentNode
.
previousElementSibling
.
value
);
nameField
.
textContent
=
name
.
selector
;
$
(
'#showName'
).
append
(
nameField
);
sizeField
.
textContent
=
size
.
selector
;
$
(
'#showSize'
).
append
(
sizeField
);
priceField
.
textContent
=
price
.
selector
;
$
(
'#showPrice'
).
append
(
priceField
);
idField
.
value
=
id
.
selector
;
...
...
src/main/resources/static/upload/スニーカー1.jpg
View replaced file @
b3f409e5
View file @
6bf13d31
15.1 KB
|
W:
|
H:
15.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/main/resources/static/upload/スニーカー2.jpg
View replaced file @
b3f409e5
View file @
6bf13d31
3.32 KB
|
W:
|
H:
3.31 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/main/resources/templates/cart.html
View file @
6bf13d31
...
...
@@ -66,7 +66,7 @@
<li><a
th:href=
"@{/limited/top}"
>
Home
</a></li>
<li><a
th:href=
"@{/limited/list}"
>
Shop
</a></li>
<li><a
th:href=
"@{/limited/log/{id}(id=${user.id})}"
>
My Purchase Log
</a></li>
<li
class=
"active"
><a
th:href=
"@{/limited/wallets/{id}(id=${user.id})}"
>
Wallets
</a></li>
<li><a
th:href=
"@{/limited/wallets/{id}(id=${user.id})}"
>
Wallets
</a></li>
</ul>
<ul
class=
"nav navbar-nav navbar-right cart-menu"
>
<li><a
class=
"search-btn"
><i
class=
"fa fa-search"
aria-hidden=
"true"
></i></a></li>
...
...
src/main/resources/templates/index.html
View file @
6bf13d31
...
...
@@ -145,12 +145,12 @@
</div>
<!-- Controls -->
<a
class=
"left carousel-control"
href=
"#carousel-example-generic"
role=
"button"
data-slide=
"prev"
>
<
!-- <
a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="pe-7s-angle-left glyphicon-chevron-left" aria-hidden="true"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="pe-7s-angle-right glyphicon-chevron-right" aria-hidden="true"></span>
</a>
</a>
-->
</div>
</section>
...
...
@@ -245,11 +245,11 @@
</div>
</section>-->
<footer
class=
"footer"
>
<footer
class=
"footer"
id=
"top-footer"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<p
class=
"center"
>
Made with
<i
class=
"fa fa-heart"
></i>
by
<a
href=
"#"
target=
"_blank"
>
Revolthemes
</a>
. All Rights Reserved
</p>
<p
class=
"center"
>
Made with
<i
class=
"fa fa-heart"
></i>
by
<a
href=
"#"
target=
"_blank"
>
Limited
</a>
. All Rights Reserved
</p>
</div>
</div>
...
...
src/main/resources/templates/list.html
View file @
6bf13d31
...
...
@@ -16,6 +16,7 @@
<!-- モーダルウィンドウのコンテンツ開始 -->
<img
class=
"modalShow"
id=
"showImage"
alt=
"productImage"
width=
"300"
height=
"200"
/>
<div
class=
"modalShow"
id=
"showName"
></div>
<div
class=
"modalShow"
id=
"showSize"
></div>
<div
class=
"modalShow"
id=
"showPrice"
></div>
<div
class=
"modalShow"
id=
"showId"
></div>
<div
class=
"modalShow"
id=
"showQuantity"
>
...
...
@@ -118,6 +119,7 @@
<div
class=
"productBox"
th:each=
"limitedShoes : ${limitedShoes}"
>
<div
class=
"shoeImageDiv"
><img
class=
"shoeImage"
th:src=
"@{/upload/{photo}(photo=${limitedShoes.photo})}"
alt=
"productImage"
width=
"300"
height=
"200"
/></div>
<p
th:text=
"${limitedShoes.name}"
class=
"shoeName shoeLimited"
>
AirMAX
</p>
<p
th:text=
"${limitedShoes.size} + ' cm'"
class=
"shoeSize shoeLimited"
></p>
<p
th:text =
"'¥' +${limitedShoes.price}"
class=
"shoePrice shoeLimited"
>
¥10,000
</p>
<input
type=
"hidden"
th:value=
"${limitedShoes.id}"
/>
<div
class=
"detailsBtn"
><button
type=
"button"
id=
"modal-open"
class=
"details"
>
Datails
</button></div>
...
...
@@ -129,6 +131,7 @@
<div
class=
"productBox"
th:each=
"generalShoes : ${generalShoes}"
>
<div
class=
"shoeImageDiv"
><img
class=
"shoeImage"
th:src=
"@{/upload/{photo}(photo=${generalShoes.photo})}"
alt=
"productImage"
width=
"300"
height=
"200"
/></div>
<p
th:text=
"${generalShoes.name}"
class=
"shoeName"
>
AirMAX
</p>
<p
th:text=
"${generalShoes.size} + ' cm'"
class=
"shoeSize"
></p>
<p
th:text =
"'¥' +${generalShoes.price}"
class=
"shoePrice"
>
¥10,000
</p>
<input
type=
"hidden"
th:value=
"${generalShoes.id}"
/>
<div
class=
"detailsBtn"
><button
type=
"button"
id=
"modal-open"
class=
"details"
>
Datails
</button></div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment