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
7cace6b4
Commit
7cace6b4
authored
Oct 20, 2020
by
shoei.kanno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品一覧画面機能完成(残りは細かなデザインの修正)
parent
ce5e5320
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 @
7cace6b4
...
@@ -57,6 +57,7 @@ public class EcsiteRestController {
...
@@ -57,6 +57,7 @@ public class EcsiteRestController {
LinkedHashMap
<
String
,
Items
>
cart
=
new
LinkedHashMap
<
String
,
Items
>();
LinkedHashMap
<
String
,
Items
>
cart
=
new
LinkedHashMap
<
String
,
Items
>();
String
id
=
data
.
getShoesId
().
toString
();
String
id
=
data
.
getShoesId
().
toString
();
cart
.
put
(
id
,
itemsService
.
findOne
(
data
.
getShoesId
(),
data
.
getQuantity
()));
cart
.
put
(
id
,
itemsService
.
findOne
(
data
.
getShoesId
(),
data
.
getQuantity
()));
System
.
out
.
println
(
cart
);
session
.
setAttribute
(
"cart"
,
cart
);
session
.
setAttribute
(
"cart"
,
cart
);
}
else
{
}
else
{
LinkedHashMap
<
String
,
Items
>
cart
=
new
LinkedHashMap
<
String
,
Items
>();
LinkedHashMap
<
String
,
Items
>
cart
=
new
LinkedHashMap
<
String
,
Items
>();
...
...
src/main/resources/static/js/list.js
View file @
7cace6b4
...
@@ -98,14 +98,11 @@ $('.cartBtn').on('click', function(event){
...
@@ -98,14 +98,11 @@ $('.cartBtn').on('click', function(event){
contentType
:
'application/json'
,
contentType
:
'application/json'
,
dataType
:
"json"
,
dataType
:
"json"
,
data
:
JSON
.
stringify
(
data
)
data
:
JSON
.
stringify
(
data
)
}).
done
(
function
()
{
});
$
(
"#modal-content,#modal-overlay"
).
fadeOut
(
"slow"
,
function
(){
//[#modal-content]と[#modal-overlay]をフェードアウトした後に…
$
(
"#modal-content,#modal-overlay"
).
fadeOut
(
"slow"
,
function
(){
//[#modal-overlay]を削除する
//[#modal-overlay]を削除する
$
(
'#modal-overlay'
).
remove
()
;
$
(
'#modal-overlay'
).
remove
()
;
}
)
;
}
)
;
}).
fail
(
function
()
{
alert
(
"Failed."
);
});
});
});
\ No newline at end of file
src/main/resources/templates/list.html
View file @
7cace6b4
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</select>
</select>
</div>
</div>
<a
id=
"modal-close"
class=
"button-link"
><button
class=
"cart-close-btn"
>
Close
</button></a>
<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>
</div>
</div>
<!-- モーダルウィンドウのコンテンツ終了 -->
<!-- モーダルウィンドウのコンテンツ終了 -->
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
<!-- 履歴ページへ遷移 -->
<!-- 履歴ページへ遷移 -->
<li><a
th:href=
"@{/limited/log/{id}(id=${user.id})}"
>
My Purchase Log
</a></li>
<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>
<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>
</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