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
ce5e5320
Commit
ce5e5320
authored
Oct 20, 2020
by
shoei.kanno
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '商品一覧画面機能' into 'master'
list.js変更 See merge request
!43
parents
925004b9
08bbf8fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
24 deletions
+26
-24
list.js
src/main/resources/static/js/list.js
+26
-24
No files found.
src/main/resources/static/js/list.js
View file @
ce5e5320
...
...
@@ -55,30 +55,6 @@ $(function(){
}
)
;
//カートに追加
$
(
'.cartBtn'
).
on
(
'click'
,
function
(
event
){
let
data
=
{
shoesId
:
$
(
event
.
target
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
).
children
(
'input'
).
val
(),
quantity
:
$
(
event
.
target
.
previousElementSibling
.
previousElementSibling
).
children
(
'select'
).
val
()
};
console
.
log
(
data
);
$
.
ajax
({
type
:
"POST"
,
url
:
"/limited/inputCart"
,
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."
);
});
});
}
)
;
...
...
@@ -108,3 +84,28 @@ $(function(){
}
)
;
//カートに追加
$
(
'.cartBtn'
).
on
(
'click'
,
function
(
event
){
let
data
=
{
shoesId
:
parseInt
(
$
(
event
.
target
.
previousElementSibling
.
previousElementSibling
.
previousElementSibling
).
children
(
'input'
).
val
()),
quantity
:
parseInt
(
$
(
event
.
target
.
previousElementSibling
.
previousElementSibling
).
children
(
'select'
).
val
())
};
console
.
log
(
data
);
$
.
ajax
({
type
:
"POST"
,
url
:
"/limited/inputCart"
,
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."
);
});
});
\ No newline at end of file
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