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
c4e0deca
Commit
c4e0deca
authored
Oct 20, 2020
by
shoei.kanno
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '商品一覧画面機能' into 'master'
商品一覧画面機能完成(残りは細かなデザインの修正) See merge request
!44
parents
ce5e5320
7cace6b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
EcsiteRestController.java
src/main/java/com/example/api/EcsiteRestController.java
+1
-0
list.js
src/main/resources/static/js/list.js
+8
-10
list.html
src/main/resources/templates/list.html
+2
-2
No files found.
src/main/java/com/example/api/EcsiteRestController.java
View file @
c4e0deca
...
...
@@ -57,6 +57,7 @@ public class EcsiteRestController {
LinkedHashMap
<
String
,
Items
>
cart
=
new
LinkedHashMap
<
String
,
Items
>();
String
id
=
data
.
getShoesId
().
toString
();
cart
.
put
(
id
,
itemsService
.
findOne
(
data
.
getShoesId
(),
data
.
getQuantity
()));
System
.
out
.
println
(
cart
);
session
.
setAttribute
(
"cart"
,
cart
);
}
else
{
LinkedHashMap
<
String
,
Items
>
cart
=
new
LinkedHashMap
<
String
,
Items
>();
...
...
src/main/resources/static/js/list.js
View file @
c4e0deca
...
...
@@ -98,14 +98,11 @@ $('.cartBtn').on('click', function(event){
contentType
:
'application/json'
,
dataType
:
"json"
,
data
:
JSON
.
stringify
(
data
)
}).
done
(
function
()
{
$
(
"#modal-content,#modal-overlay"
).
fadeOut
(
"slow"
,
function
(){
//[#modal-overlay]を削除する
$
(
'#modal-overlay'
).
remove
()
;
}
)
;
}).
fail
(
function
()
{
alert
(
"Failed."
);
});
});
//[#modal-content]と[#modal-overlay]をフェードアウトした後に…
$
(
"#modal-content,#modal-overlay"
).
fadeOut
(
"slow"
,
function
(){
//[#modal-overlay]を削除する
$
(
'#modal-overlay'
).
remove
()
;
}
)
;
});
\ No newline at end of file
src/main/resources/templates/list.html
View file @
c4e0deca
...
...
@@ -40,7 +40,7 @@
</select>
</div>
<a
id=
"modal-close"
class=
"button-link"
><button
class=
"cart-close-btn"
>
Close
</button></a>
<button
type=
"button"
class=
"cartBtn"
>
Add Cart
</button>
<button
type=
"button"
class=
"cartBtn"
id=
"cartBtn"
>
Add Cart
</button>
</div>
</div>
<!-- モーダルウィンドウのコンテンツ終了 -->
...
...
@@ -63,7 +63,7 @@
<!-- 履歴ページへ遷移 -->
<li><a
th:href=
"@{/limited/log/{id}(id=${user.id})}"
>
My Purchase Log
</a></li>
<!-- カートページへ遷移 -->
<li><a
th:href=
"@{
/
cart}"
>
Cart
</a></li>
<li><a
th:href=
"@{cart}"
>
Cart
</a></li>
<!-- ログアウト -->
<li><form
th:action=
"@{/logout}"
method=
"post"
><input
type=
"submit"
value=
"logout"
style=
"border:none;background-color:transparent;text-decoration:none;"
class=
"logoutBtn"
/></form></li>
</ul>
...
...
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