-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
380 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
.account-basket { | ||
margin: 0 auto; | ||
} | ||
|
||
.account-basket .header { | ||
text-transform: uppercase; | ||
text-align: start; | ||
font-weight: normal; | ||
padding: 0.5rem 1rem; | ||
color: var(--ai-secondary); | ||
border-bottom: 1px solid var(--ai-secondary); | ||
} | ||
|
||
.account-basket .basket-item { | ||
border: 1px solid var(--ai-tertiary); | ||
padding: 1rem; | ||
margin: 1rem; | ||
} | ||
|
||
.account-basket .basket-basic { | ||
font-weight: bold; | ||
} | ||
|
||
.account-basket .name:after { | ||
content: ": "; | ||
} | ||
|
||
.account-basket .action { | ||
margin-top: 0.5rem; | ||
} | ||
|
||
.account-basket .action .btn { | ||
border: 1px solid var(--ai-secondary); | ||
display: block; | ||
width: 100%; | ||
max-width: 6rem; | ||
margin: auto; | ||
} | ||
|
||
.account-basket-detail { | ||
padding-top: 1rem; | ||
display: none; | ||
} | ||
|
||
.account-basket-detail a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
.account-basket-detail h2 { | ||
margin: 0.5rem 0; | ||
} | ||
|
||
.account-basket-detail h3 { | ||
display: inline-block; | ||
font-size: 1rem; | ||
margin: 0; | ||
} | ||
|
||
.account-basket-detail li.attr-item .name, | ||
.account-basket-detail li.attr-item .value { | ||
min-width: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Account basket actions | ||
*/ | ||
AimeosAccountBasket = { | ||
|
||
/** | ||
* Shows basket details without page reload | ||
*/ | ||
onToggleDetail() { | ||
|
||
$(".account-basket").on("click", ".basket-item .action .btn", ev => { | ||
|
||
const target = $(ev.currentTarget).closest(".basket-item"); | ||
const details = $(".account-basket-detail", target); | ||
|
||
$(".btn.show", target).toggleClass('hidden'); | ||
$(".btn.close", target).toggleClass('hidden'); | ||
|
||
slideToggle(details[0], 300); | ||
|
||
return false; | ||
}); | ||
}, | ||
|
||
|
||
/** | ||
* Initializes the account basket actions | ||
*/ | ||
init() { | ||
this.onToggleDetail(); | ||
} | ||
}; | ||
|
||
|
||
$(() => { | ||
AimeosAccountBasket.init(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.