Add is purchasable wish option

This commit is contained in:
Jay Trees 2022-04-12 13:05:16 +02:00
parent b5f0c02093
commit 431fb6dd22
18 changed files with 3545 additions and 29 deletions

View file

@ -96,15 +96,14 @@ For more information see: https://fomantic-ui.com/introduction/build-tools.html
| Item | Status |
| --------------------------------------------------- | ------------------- |
| Add "or similar" option to wishes | Planned |
| Combined/separate (and/or) wishes | Planned |
| Group wishes by store | Planned |
| Option to show/notify when a wish was fulfilled | Planned |
| Price field for wishes | Planned |
| Redirect to original target after login | Planned |
| Request more wishes on shared wishlist | Planned |
| Temporary undo button after fulfilling a wish | Planned |
| Activity feed and friends | Under consideration |
| Browser extension to quickly create wishes from url | Under consideration |
| Bulk add wishes via link list | Under consideration |
| Combined wishes | Under consideration |
| Folders / Subcategories for wishlists | Under consideration |
| Synchronise Steam wishlist | Under consideration |

View file

@ -27,6 +27,7 @@
"grid",
"button",
"checkbox",
"calendar",
"card",
"dimmer",

811
semantic/dist/components/checkbox.css vendored Normal file
View file

@ -0,0 +1,811 @@
/*!
* # Fomantic-UI 2.8.8 - Checkbox
* http://github.com/fomantic/Fomantic-UI/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
/*******************************
Checkbox
*******************************/
/*--------------
Content
---------------*/
.ui.checkbox {
position: relative;
display: inline-block;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
outline: none;
vertical-align: baseline;
font-style: normal;
min-height: 17px;
font-size: 1em;
line-height: 17px;
min-width: 17px;
}
/* HTML Checkbox */
.ui.checkbox input[type="checkbox"],
.ui.checkbox input[type="radio"] {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
opacity: 0 !important;
outline: none;
z-index: 3;
width: 17px;
height: 17px;
}
.ui.checkbox label {
cursor: auto;
position: relative;
display: block;
padding-left: 1.85714em;
outline: none;
font-size: 1em;
}
.ui.checkbox label:before {
position: absolute;
top: 0;
left: 0;
width: 17px;
height: 17px;
content: '';
background: #FFFFFF;
border-radius: 0.25rem;
-webkit-transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
border: 1px solid #D4D4D5;
}
/*--------------
Checkmark
---------------*/
.ui.checkbox label:after {
position: absolute;
font-size: 14px;
top: 0;
left: 0;
width: 17px;
height: 17px;
text-align: center;
opacity: 0;
color: rgba(0, 0, 0, 0.87);
-webkit-transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
}
.ui.right.aligned.checkbox label {
padding-left: 0;
padding-right: 1.85714em;
}
.ui.right.aligned.checkbox label:after,
.ui.right.aligned.checkbox label:before {
right: 0;
left: auto;
}
/*--------------
Label
---------------*/
/* Inside */
.ui.checkbox label,
.ui.checkbox + label {
color: rgba(0, 0, 0, 0.87);
-webkit-transition: color 0.1s ease;
transition: color 0.1s ease;
}
/* Outside */
.ui.checkbox + label {
vertical-align: middle;
}
/*******************************
States
*******************************/
/*--------------
Hover
---------------*/
.ui.checkbox label:hover::before {
background: #FFFFFF;
border-color: rgba(34, 36, 38, 0.35);
}
.ui.checkbox label:hover,
.ui.checkbox + label:hover {
color: rgba(0, 0, 0, 0.8);
}
/*--------------
Down
---------------*/
.ui.checkbox label:active::before {
background: #F9FAFB;
border-color: rgba(34, 36, 38, 0.35);
}
.ui.checkbox label:active::after {
color: rgba(0, 0, 0, 0.95);
}
.ui.checkbox input:active ~ label {
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Focus
---------------*/
.ui.checkbox input:focus ~ label:before {
background: #FFFFFF;
border-color: #a285df;
}
.ui.checkbox input:focus ~ label:after {
color: rgba(0, 0, 0, 0.95);
}
.ui.checkbox input:focus ~ label {
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Active
---------------*/
.ui.checkbox input:checked ~ label:before {
background: #FFFFFF;
border-color: rgba(34, 36, 38, 0.35);
}
.ui.checkbox input:checked ~ label:after {
opacity: 1;
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Indeterminate
---------------*/
.ui.checkbox input:not([type=radio]):indeterminate ~ label:before {
background: #FFFFFF;
border-color: rgba(34, 36, 38, 0.35);
}
.ui.checkbox input:not([type=radio]):indeterminate ~ label:after {
opacity: 1;
color: rgba(0, 0, 0, 0.95);
}
.ui.indeterminate.toggle.checkbox input:not([type=radio]):indeterminate ~ label:before {
background: rgba(0, 0, 0, 0.15);
}
.ui.indeterminate.toggle.checkbox input:not([type=radio]) ~ label:after {
left: 1.075rem;
}
.ui.right.aligned.indeterminate.toggle.checkbox input:not([type=radio]) ~ label:after {
left: auto;
right: 1.075rem;
}
/*--------------
Active Focus
---------------*/
.ui.checkbox input:not([type=radio]):indeterminate:focus ~ label:before,
.ui.checkbox input:checked:focus ~ label:before {
background: #FFFFFF;
border-color: #a285df;
}
.ui.checkbox input:not([type=radio]):indeterminate:focus ~ label:after,
.ui.checkbox input:checked:focus ~ label:after {
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Read-Only
---------------*/
.ui.read-only.checkbox,
.ui.read-only.checkbox label {
cursor: default;
pointer-events: none;
}
/*--------------
Disabled
---------------*/
.ui.disabled.checkbox label,
.ui.checkbox input[disabled] ~ label {
cursor: default;
opacity: 0.5;
color: #000000;
pointer-events: none;
}
/*--------------
Hidden
---------------*/
/* Initialized checkbox moves input below element
to prevent manually triggering */
.ui.checkbox input.hidden {
z-index: -1;
}
/* Selectable Label */
.ui.checkbox input.hidden + label {
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/*******************************
Types
*******************************/
/*--------------
Radio
---------------*/
.ui.radio.checkbox {
min-height: 15px;
}
.ui.radio.checkbox label {
padding-left: 1.85714em;
}
/* Box */
.ui.radio.checkbox label:before {
content: '';
-webkit-transform: none;
transform: none;
width: 15px;
height: 15px;
border-radius: 500rem;
top: 1px;
left: 0;
}
/* Bullet */
.ui.radio.checkbox label:after {
border: none;
content: '' !important;
line-height: 15px;
top: 1px;
left: 0;
width: 15px;
height: 15px;
border-radius: 500rem;
-webkit-transform: scale(0.46666667);
transform: scale(0.46666667);
background-color: rgba(0, 0, 0, 0.87);
}
/* Focus */
.ui.radio.checkbox input:focus ~ label:before {
background-color: #FFFFFF;
}
.ui.radio.checkbox input:focus ~ label:after {
background-color: rgba(0, 0, 0, 0.95);
}
/* Indeterminate */
.ui.radio.checkbox input:indeterminate ~ label:after {
opacity: 0;
}
/* Active */
.ui.radio.checkbox input:checked ~ label:before {
background-color: #FFFFFF;
}
.ui.radio.checkbox input:checked ~ label:after {
background-color: rgba(0, 0, 0, 0.95);
}
/* Active Focus */
.ui.radio.checkbox input:focus:checked ~ label:before {
background-color: #FFFFFF;
}
.ui.radio.checkbox input:focus:checked ~ label:after {
background-color: rgba(0, 0, 0, 0.95);
}
/*--------------
Slider
---------------*/
.ui.slider.checkbox {
min-height: 1.25rem;
}
/* Input */
.ui.slider.checkbox input {
width: 3.5rem;
height: 1.25rem;
}
/* Label */
.ui.slider.checkbox label {
padding-left: 4.5rem;
line-height: 1rem;
color: rgba(0, 0, 0, 0.4);
}
/* Line */
.ui.slider.checkbox label:before {
display: block;
position: absolute;
content: '';
-webkit-transform: none;
transform: none;
border: none !important;
left: 0;
z-index: 1;
top: 0.4rem;
background-color: rgba(0, 0, 0, 0.05);
width: 3.5rem;
height: 0.25rem;
border-radius: 500rem;
-webkit-transition: background 0.3s ease;
transition: background 0.3s ease;
}
/* Handle */
.ui.slider.checkbox label:after {
background: #FFFFFF -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.05)));
background: #FFFFFF -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
background: #FFFFFF linear-gradient(transparent, rgba(0, 0, 0, 0.05));
position: absolute;
content: '' !important;
opacity: 1;
z-index: 2;
border: none;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
width: 1.5rem;
height: 1.5rem;
top: -0.25rem;
left: 0;
-webkit-transform: none;
transform: none;
border-radius: 500rem;
-webkit-transition: left 0.3s ease;
transition: left 0.3s ease;
}
/* Focus */
.ui.slider.checkbox input:focus ~ label:before {
background-color: rgba(0, 0, 0, 0.15);
border: none;
}
/* Hover */
.ui.slider.checkbox label:hover {
color: rgba(0, 0, 0, 0.8);
}
.ui.slider.checkbox label:hover::before {
background: rgba(0, 0, 0, 0.15);
}
/* Active */
.ui.slider.checkbox input:checked ~ label {
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.slider.checkbox input:checked ~ label:before {
background-color: #545454 !important;
}
.ui.slider.checkbox input:checked ~ label:after {
left: 2rem;
}
/* Active Focus */
.ui.slider.checkbox input:focus:checked ~ label {
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.slider.checkbox input:focus:checked ~ label:before {
background-color: #000000 !important;
}
.ui.right.aligned.slider.checkbox label {
padding-left: 0;
padding-right: 4.5rem;
}
.ui.right.aligned.slider.checkbox label:after {
left: auto;
right: 2rem;
-webkit-transition: right 0.3s ease;
transition: right 0.3s ease;
}
.ui.right.aligned.slider.checkbox input:checked ~ label:after {
left: auto;
right: 0;
}
/*--------------
Toggle
---------------*/
.ui.toggle.checkbox {
min-height: 1.5rem;
}
/* Input */
.ui.toggle.checkbox input {
width: 3.5rem;
height: 1.5rem;
}
/* Label */
.ui.toggle.checkbox label {
min-height: 1.5rem;
padding-left: 4.5rem;
color: rgba(0, 0, 0, 0.87);
}
.ui.toggle.checkbox label {
padding-top: 0.15em;
}
/* Switch */
.ui.toggle.checkbox label:before {
display: block;
position: absolute;
content: '';
z-index: 1;
-webkit-transform: none;
transform: none;
border: none;
top: 0;
background: rgba(0, 0, 0, 0.05);
-webkit-box-shadow: none;
box-shadow: none;
width: 3.5rem;
height: 1.5rem;
border-radius: 500rem;
}
/* Handle */
.ui.toggle.checkbox label:after {
background: #FFFFFF -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.05)));
background: #FFFFFF -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
background: #FFFFFF linear-gradient(transparent, rgba(0, 0, 0, 0.05));
position: absolute;
content: '' !important;
opacity: 1;
z-index: 2;
border: none;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
width: 1.5rem;
height: 1.5rem;
top: 0;
left: 0;
border-radius: 500rem;
-webkit-transition: background 0.3s ease, left 0.3s ease;
transition: background 0.3s ease, left 0.3s ease;
}
.ui.toggle.checkbox input ~ label:after {
left: -0.05rem;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
}
/* Focus */
.ui.toggle.checkbox input:focus ~ label:before {
background-color: rgba(0, 0, 0, 0.15);
border: none;
}
/* Hover */
.ui.toggle.checkbox label:hover::before {
background-color: rgba(0, 0, 0, 0.15);
border: none;
}
/* Active */
.ui.toggle.checkbox input:checked ~ label {
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.toggle.checkbox input:checked ~ label:before {
background-color: #6435C9 !important;
}
.ui.toggle.checkbox input:checked ~ label:after {
left: 2.15rem;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
}
/* Active Focus */
.ui.toggle.checkbox input:focus:checked ~ label {
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.toggle.checkbox input:focus:checked ~ label:before {
background-color: #4f20b5 !important;
}
.ui.right.aligned.toggle.checkbox label {
padding-left: 0;
padding-right: 4.5rem;
}
.ui.right.aligned.toggle.checkbox input ~ label:after {
left: auto;
right: 2.15rem;
-webkit-transition: background 0.3s ease, right 0.3s ease;
transition: background 0.3s ease, right 0.3s ease;
}
.ui.right.aligned.toggle.checkbox input:checked ~ label:after {
left: auto;
right: -0.05rem;
}
/*******************************
Variations
*******************************/
/*--------------
Fitted
---------------*/
.ui.fitted.checkbox label {
padding-left: 0 !important;
}
.ui.fitted.toggle.checkbox {
width: 3.5rem;
}
.ui.fitted.slider.checkbox {
width: 3.5rem;
}
/*--------------
Inverted
---------------*/
.ui.inverted.checkbox label,
.ui.inverted.checkbox + label {
color: rgba(255, 255, 255, 0.9) !important;
}
/* Hover */
.ui.inverted.checkbox label:hover {
color: #ffffff !important;
}
.ui.inverted.checkbox label:hover::before {
border-color: rgba(34, 36, 38, 0.5);
}
/*Slider Label */
.ui.inverted.slider.checkbox label {
color: rgba(255, 255, 255, 0.5);
}
/* Slider Line */
.ui.inverted.slider.checkbox label:before {
background-color: rgba(255, 255, 255, 0.5) !important;
}
/* Slider Hover */
.ui.inverted.slider.checkbox label:hover::before {
background: rgba(255, 255, 255, 0.7) !important;
}
/* Slider Active */
.ui.inverted.slider.checkbox input:checked ~ label {
color: #ffffff !important;
}
.ui.inverted.slider.checkbox input:checked ~ label:before {
background-color: rgba(255, 255, 255, 0.8) !important;
}
/* Slider Active Focus */
.ui.inverted.slider.checkbox input:focus:checked ~ label {
color: #ffffff !important;
}
.ui.inverted.slider.checkbox input:focus:checked ~ label:before {
background-color: rgba(255, 255, 255, 0.8) !important;
}
/* Toggle Switch */
.ui.inverted.toggle.checkbox label:before {
background-color: rgba(255, 255, 255, 0.9) !important;
}
/* Toggle Hover */
.ui.inverted.toggle.checkbox label:hover::before {
background: #ffffff !important;
}
/* Toggle Active */
.ui.inverted.toggle.checkbox input:checked ~ label {
color: #ffffff !important;
}
.ui.inverted.toggle.checkbox input:checked ~ label:before {
background-color: #6435C9 !important;
}
/* Toggle Active Focus */
.ui.inverted.toggle.checkbox input:focus:checked ~ label {
color: #ffffff !important;
}
.ui.inverted.toggle.checkbox input:focus:checked ~ label:before {
background-color: #4f20b5 !important;
}
/*--------------------
Size
---------------------*/
.ui.mini.checkbox {
font-size: 0.75em;
}
.ui.tiny.checkbox {
font-size: 0.83333333em;
}
.ui.small.checkbox {
font-size: 0.91666667em;
}
.ui.large.checkbox {
font-size: 1.16666667em;
}
.ui.large.form .checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.large.checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.large.form .checkbox:not(.slider):not(.toggle):not(.radio) label:before,
.ui.large.checkbox:not(.slider):not(.toggle):not(.radio) label:before {
-webkit-transform: scale(1.16666667);
transform: scale(1.16666667);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.large.form .checkbox.radio label:before,
.ui.large.checkbox.radio label:before {
-webkit-transform: scale(1.16666667);
transform: scale(1.16666667);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.large.form .checkbox.radio label:after,
.ui.large.checkbox.radio label:after {
-webkit-transform: scale(0.58333333);
transform: scale(0.58333333);
-webkit-transform-origin: left;
transform-origin: left;
left: 0.34166667em;
}
.ui.big.checkbox {
font-size: 1.25em;
}
.ui.big.form .checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.big.checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.big.form .checkbox:not(.slider):not(.toggle):not(.radio) label:before,
.ui.big.checkbox:not(.slider):not(.toggle):not(.radio) label:before {
-webkit-transform: scale(1.25);
transform: scale(1.25);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.big.form .checkbox.radio label:before,
.ui.big.checkbox.radio label:before {
-webkit-transform: scale(1.25);
transform: scale(1.25);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.big.form .checkbox.radio label:after,
.ui.big.checkbox.radio label:after {
-webkit-transform: scale(0.625);
transform: scale(0.625);
-webkit-transform-origin: left;
transform-origin: left;
left: 0.3625em;
}
.ui.huge.checkbox {
font-size: 1.41666667em;
}
.ui.huge.form .checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.huge.checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.huge.form .checkbox:not(.slider):not(.toggle):not(.radio) label:before,
.ui.huge.checkbox:not(.slider):not(.toggle):not(.radio) label:before {
-webkit-transform: scale(1.41666667);
transform: scale(1.41666667);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.huge.form .checkbox.radio label:before,
.ui.huge.checkbox.radio label:before {
-webkit-transform: scale(1.41666667);
transform: scale(1.41666667);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.huge.form .checkbox.radio label:after,
.ui.huge.checkbox.radio label:after {
-webkit-transform: scale(0.70833333);
transform: scale(0.70833333);
-webkit-transform-origin: left;
transform-origin: left;
left: 0.40416667em;
}
.ui.massive.checkbox {
font-size: 1.75em;
}
.ui.massive.form .checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.massive.checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.massive.form .checkbox:not(.slider):not(.toggle):not(.radio) label:before,
.ui.massive.checkbox:not(.slider):not(.toggle):not(.radio) label:before {
-webkit-transform: scale(1.75);
transform: scale(1.75);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.massive.form .checkbox.radio label:before,
.ui.massive.checkbox.radio label:before {
-webkit-transform: scale(1.75);
transform: scale(1.75);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.massive.form .checkbox.radio label:after,
.ui.massive.checkbox.radio label:after {
-webkit-transform: scale(0.875);
transform: scale(0.875);
-webkit-transform-origin: left;
transform-origin: left;
left: 0.4875em;
}
/*******************************
Theme Overrides
*******************************/
@font-face {
font-family: 'Checkbox';
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBD8AAAC8AAAAYGNtYXAYVtCJAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zn4huwUAAAF4AAABYGhlYWQGPe1ZAAAC2AAAADZoaGVhB30DyAAAAxAAAAAkaG10eBBKAEUAAAM0AAAAHGxvY2EAmgESAAADUAAAABBtYXhwAAkALwAAA2AAAAAgbmFtZSC8IugAAAOAAAABknBvc3QAAwAAAAAFFAAAACAAAwMTAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADoAgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6AL//f//AAAAAAAg6AD//f//AAH/4xgEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAEUAUQO7AvgAGgAAARQHAQYjIicBJjU0PwE2MzIfAQE2MzIfARYVA7sQ/hQQFhcQ/uMQEE4QFxcQqAF2EBcXEE4QAnMWEP4UEBABHRAXFhBOEBCoAXcQEE4QFwAAAAABAAABbgMlAkkAFAAAARUUBwYjISInJj0BNDc2MyEyFxYVAyUQEBf9SRcQEBAQFwK3FxAQAhJtFxAQEBAXbRcQEBAQFwAAAAABAAAASQMlA24ALAAAARUUBwYrARUUBwYrASInJj0BIyInJj0BNDc2OwE1NDc2OwEyFxYdATMyFxYVAyUQEBfuEBAXbhYQEO4XEBAQEBfuEBAWbhcQEO4XEBACEm0XEBDuFxAQEBAX7hAQF20XEBDuFxAQEBAX7hAQFwAAAQAAAAIAAHRSzT9fDzz1AAsEAAAAAADRsdR3AAAAANGx1HcAAAAAA7sDbgAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAADuwABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABFAyUAAAMlAAAAAAAAAAoAFAAeAE4AcgCwAAEAAAAHAC0AAQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAIAAAAAQAAAAAAAgAHAGkAAQAAAAAAAwAIADkAAQAAAAAABAAIAH4AAQAAAAAABQALABgAAQAAAAAABgAIAFEAAQAAAAAACgAaAJYAAwABBAkAAQAQAAgAAwABBAkAAgAOAHAAAwABBAkAAwAQAEEAAwABBAkABAAQAIYAAwABBAkABQAWACMAAwABBAkABgAQAFkAAwABBAkACgA0ALBDaGVja2JveABDAGgAZQBjAGsAYgBvAHhWZXJzaW9uIDIuMABWAGUAcgBzAGkAbwBuACAAMgAuADBDaGVja2JveABDAGgAZQBjAGsAYgBvAHhDaGVja2JveABDAGgAZQBjAGsAYgBvAHhSZWd1bGFyAFIAZQBnAHUAbABhAHJDaGVja2JveABDAGgAZQBjAGsAYgBvAHhGb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype');
}
/* Checkmark */
.ui.checkbox label:after,
.ui.checkbox .box:after {
font-family: 'Checkbox';
}
/* Checked */
.ui.checkbox input:checked ~ .box:after,
.ui.checkbox input:checked ~ label:after {
content: '\e800';
}
/* Indeterminate */
.ui.checkbox input:indeterminate ~ .box:after,
.ui.checkbox input:indeterminate ~ label:after {
font-size: 12px;
content: '\e801';
}
/* UTF Reference
.check:before { content: '\e800'; }
.dash:before { content: '\e801'; }
.plus:before { content: '\e802'; }
*/
/*******************************
Site Overrides
*******************************/

876
semantic/dist/components/checkbox.js vendored Normal file
View file

@ -0,0 +1,876 @@
/*!
* # Fomantic-UI 2.8.8 - Checkbox
* http://github.com/fomantic/Fomantic-UI/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ($, window, document, undefined) {
'use strict';
$.isFunction = $.isFunction || function(obj) {
return typeof obj === "function" && typeof obj.nodeType !== "number";
};
window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;
$.fn.checkbox = function(parameters) {
var
$allModules = $(this),
moduleSelector = $allModules.selector || '',
time = new Date().getTime(),
performance = [],
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
returnedValue
;
$allModules
.each(function() {
var
settings = $.extend(true, {}, $.fn.checkbox.settings, parameters),
className = settings.className,
namespace = settings.namespace,
selector = settings.selector,
error = settings.error,
eventNamespace = '.' + namespace,
moduleNamespace = 'module-' + namespace,
$module = $(this),
$label = $(this).children(selector.label),
$input = $(this).children(selector.input),
input = $input[0],
initialLoad = false,
shortcutPressed = false,
instance = $module.data(moduleNamespace),
observer,
element = this,
module
;
module = {
initialize: function() {
module.verbose('Initializing checkbox', settings);
module.create.label();
module.bind.events();
module.set.tabbable();
module.hide.input();
module.observeChanges();
module.instantiate();
module.setup();
},
instantiate: function() {
module.verbose('Storing instance of module', module);
instance = module;
$module
.data(moduleNamespace, module)
;
},
destroy: function() {
module.verbose('Destroying module');
module.unbind.events();
module.show.input();
$module.removeData(moduleNamespace);
},
fix: {
reference: function() {
if( $module.is(selector.input) ) {
module.debug('Behavior called on <input> adjusting invoked element');
$module = $module.closest(selector.checkbox);
module.refresh();
}
}
},
setup: function() {
module.set.initialLoad();
if( module.is.indeterminate() ) {
module.debug('Initial value is indeterminate');
module.indeterminate();
}
else if( module.is.checked() ) {
module.debug('Initial value is checked');
module.check();
}
else {
module.debug('Initial value is unchecked');
module.uncheck();
}
module.remove.initialLoad();
},
refresh: function() {
$label = $module.children(selector.label);
$input = $module.children(selector.input);
input = $input[0];
},
hide: {
input: function() {
module.verbose('Modifying <input> z-index to be unselectable');
$input.addClass(className.hidden);
}
},
show: {
input: function() {
module.verbose('Modifying <input> z-index to be selectable');
$input.removeClass(className.hidden);
}
},
observeChanges: function() {
if('MutationObserver' in window) {
observer = new MutationObserver(function(mutations) {
module.debug('DOM tree modified, updating selector cache');
module.refresh();
});
observer.observe(element, {
childList : true,
subtree : true
});
module.debug('Setting up mutation observer', observer);
}
},
attachEvents: function(selector, event) {
var
$element = $(selector)
;
event = $.isFunction(module[event])
? module[event]
: module.toggle
;
if($element.length > 0) {
module.debug('Attaching checkbox events to element', selector, event);
$element
.on('click' + eventNamespace, event)
;
}
else {
module.error(error.notFound);
}
},
preventDefaultOnInputTarget: function() {
if(typeof event !== 'undefined' && event !== null && $(event.target).is(selector.input)) {
module.verbose('Preventing default check action after manual check action');
event.preventDefault();
}
},
event: {
change: function(event) {
if( !module.should.ignoreCallbacks() ) {
settings.onChange.call(input);
}
},
click: function(event) {
var
$target = $(event.target)
;
if( $target.is(selector.input) ) {
module.verbose('Using default check action on initialized checkbox');
return;
}
if( $target.is(selector.link) ) {
module.debug('Clicking link inside checkbox, skipping toggle');
return;
}
module.toggle();
$input.focus();
event.preventDefault();
},
keydown: function(event) {
var
key = event.which,
keyCode = {
enter : 13,
space : 32,
escape : 27,
left : 37,
up : 38,
right : 39,
down : 40
}
;
var r = module.get.radios(),
rIndex = r.index($module),
rLen = r.length,
checkIndex = false;
if(key == keyCode.left || key == keyCode.up) {
checkIndex = (rIndex === 0 ? rLen : rIndex) - 1;
} else if(key == keyCode.right || key == keyCode.down) {
checkIndex = rIndex === rLen-1 ? 0 : rIndex+1;
}
if (!module.should.ignoreCallbacks() && checkIndex !== false) {
if(settings.beforeUnchecked.apply(input)===false) {
module.verbose('Option not allowed to be unchecked, cancelling key navigation');
return false;
}
if (settings.beforeChecked.apply($(r[checkIndex]).children(selector.input)[0])===false) {
module.verbose('Next option should not allow check, cancelling key navigation');
return false;
}
}
if(key == keyCode.escape) {
module.verbose('Escape key pressed blurring field');
$input.blur();
shortcutPressed = true;
}
else if(!event.ctrlKey && ( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey)) ) {
module.verbose('Enter/space key pressed, toggling checkbox');
module.toggle();
shortcutPressed = true;
}
else {
shortcutPressed = false;
}
},
keyup: function(event) {
if(shortcutPressed) {
event.preventDefault();
}
}
},
check: function() {
if( !module.should.allowCheck() ) {
return;
}
module.debug('Checking checkbox', $input);
module.set.checked();
if( !module.should.ignoreCallbacks() ) {
settings.onChecked.call(input);
module.trigger.change();
}
module.preventDefaultOnInputTarget();
},
uncheck: function() {
if( !module.should.allowUncheck() ) {
return;
}
module.debug('Unchecking checkbox');
module.set.unchecked();
if( !module.should.ignoreCallbacks() ) {
settings.onUnchecked.call(input);
module.trigger.change();
}
module.preventDefaultOnInputTarget();
},
indeterminate: function() {
if( module.should.allowIndeterminate() ) {
module.debug('Checkbox is already indeterminate');
return;
}
module.debug('Making checkbox indeterminate');
module.set.indeterminate();
if( !module.should.ignoreCallbacks() ) {
settings.onIndeterminate.call(input);
module.trigger.change();
}
},
determinate: function() {
if( module.should.allowDeterminate() ) {
module.debug('Checkbox is already determinate');
return;
}
module.debug('Making checkbox determinate');
module.set.determinate();
if( !module.should.ignoreCallbacks() ) {
settings.onDeterminate.call(input);
module.trigger.change();
}
},
enable: function() {
if( module.is.enabled() ) {
module.debug('Checkbox is already enabled');
return;
}
module.debug('Enabling checkbox');
module.set.enabled();
if( !module.should.ignoreCallbacks() ) {
settings.onEnable.call(input);
// preserve legacy callbacks
settings.onEnabled.call(input);
module.trigger.change();
}
},
disable: function() {
if( module.is.disabled() ) {
module.debug('Checkbox is already disabled');
return;
}
module.debug('Disabling checkbox');
module.set.disabled();
if( !module.should.ignoreCallbacks() ) {
settings.onDisable.call(input);
// preserve legacy callbacks
settings.onDisabled.call(input);
module.trigger.change();
}
},
get: {
radios: function() {
var
name = module.get.name()
;
return $('input[name="' + name + '"]').closest(selector.checkbox);
},
otherRadios: function() {
return module.get.radios().not($module);
},
name: function() {
return $input.attr('name');
}
},
is: {
initialLoad: function() {
return initialLoad;
},
radio: function() {
return ($input.hasClass(className.radio) || $input.attr('type') == 'radio');
},
indeterminate: function() {
return $input.prop('indeterminate') !== undefined && $input.prop('indeterminate');
},
checked: function() {
return $input.prop('checked') !== undefined && $input.prop('checked');
},
disabled: function() {
return $input.prop('disabled') !== undefined && $input.prop('disabled');
},
enabled: function() {
return !module.is.disabled();
},
determinate: function() {
return !module.is.indeterminate();
},
unchecked: function() {
return !module.is.checked();
}
},
should: {
allowCheck: function() {
if(module.is.determinate() && module.is.checked() && !module.is.initialLoad() ) {
module.debug('Should not allow check, checkbox is already checked');
return false;
}
if(!module.should.ignoreCallbacks() && settings.beforeChecked.apply(input) === false) {
module.debug('Should not allow check, beforeChecked cancelled');
return false;
}
return true;
},
allowUncheck: function() {
if(module.is.determinate() && module.is.unchecked() && !module.is.initialLoad() ) {
module.debug('Should not allow uncheck, checkbox is already unchecked');
return false;
}
if(!module.should.ignoreCallbacks() && settings.beforeUnchecked.apply(input) === false) {
module.debug('Should not allow uncheck, beforeUnchecked cancelled');
return false;
}
return true;
},
allowIndeterminate: function() {
if(module.is.indeterminate() && !module.is.initialLoad() ) {
module.debug('Should not allow indeterminate, checkbox is already indeterminate');
return false;
}
if(!module.should.ignoreCallbacks() && settings.beforeIndeterminate.apply(input) === false) {
module.debug('Should not allow indeterminate, beforeIndeterminate cancelled');
return false;
}
return true;
},
allowDeterminate: function() {
if(module.is.determinate() && !module.is.initialLoad() ) {
module.debug('Should not allow determinate, checkbox is already determinate');
return false;
}
if(!module.should.ignoreCallbacks() && settings.beforeDeterminate.apply(input) === false) {
module.debug('Should not allow determinate, beforeDeterminate cancelled');
return false;
}
return true;
},
ignoreCallbacks: function() {
return (initialLoad && !settings.fireOnInit);
}
},
can: {
change: function() {
return !( $module.hasClass(className.disabled) || $module.hasClass(className.readOnly) || $input.prop('disabled') || $input.prop('readonly') );
},
uncheck: function() {
return (typeof settings.uncheckable === 'boolean')
? settings.uncheckable
: !module.is.radio()
;
}
},
set: {
initialLoad: function() {
initialLoad = true;
},
checked: function() {
module.verbose('Setting class to checked');
$module
.removeClass(className.indeterminate)
.addClass(className.checked)
;
if( module.is.radio() ) {
module.uncheckOthers();
}
if(!module.is.indeterminate() && module.is.checked()) {
module.debug('Input is already checked, skipping input property change');
return;
}
module.verbose('Setting state to checked', input);
$input
.prop('indeterminate', false)
.prop('checked', true)
;
},
unchecked: function() {
module.verbose('Removing checked class');
$module
.removeClass(className.indeterminate)
.removeClass(className.checked)
;
if(!module.is.indeterminate() && module.is.unchecked() ) {
module.debug('Input is already unchecked');
return;
}
module.debug('Setting state to unchecked');
$input
.prop('indeterminate', false)
.prop('checked', false)
;
},
indeterminate: function() {
module.verbose('Setting class to indeterminate');
$module
.addClass(className.indeterminate)
;
if( module.is.indeterminate() ) {
module.debug('Input is already indeterminate, skipping input property change');
return;
}
module.debug('Setting state to indeterminate');
$input
.prop('indeterminate', true)
;
},
determinate: function() {
module.verbose('Removing indeterminate class');
$module
.removeClass(className.indeterminate)
;
if( module.is.determinate() ) {
module.debug('Input is already determinate, skipping input property change');
return;
}
module.debug('Setting state to determinate');
$input
.prop('indeterminate', false)
;
},
disabled: function() {
module.verbose('Setting class to disabled');
$module
.addClass(className.disabled)
;
if( module.is.disabled() ) {
module.debug('Input is already disabled, skipping input property change');
return;
}
module.debug('Setting state to disabled');
$input
.prop('disabled', 'disabled')
;
},
enabled: function() {
module.verbose('Removing disabled class');
$module.removeClass(className.disabled);
if( module.is.enabled() ) {
module.debug('Input is already enabled, skipping input property change');
return;
}
module.debug('Setting state to enabled');
$input
.prop('disabled', false)
;
},
tabbable: function() {
module.verbose('Adding tabindex to checkbox');
if( $input.attr('tabindex') === undefined) {
$input.attr('tabindex', 0);
}
}
},
remove: {
initialLoad: function() {
initialLoad = false;
}
},
trigger: {
change: function() {
var
inputElement = $input[0]
;
if(inputElement) {
var events = document.createEvent('HTMLEvents');
module.verbose('Triggering native change event');
events.initEvent('change', true, false);
inputElement.dispatchEvent(events);
}
}
},
create: {
label: function() {
if($input.prevAll(selector.label).length > 0) {
$input.prev(selector.label).detach().insertAfter($input);
module.debug('Moving existing label', $label);
}
else if( !module.has.label() ) {
$label = $('<label>').insertAfter($input);
module.debug('Creating label', $label);
}
}
},
has: {
label: function() {
return ($label.length > 0);
}
},
bind: {
events: function() {
module.verbose('Attaching checkbox events');
$module
.on('click' + eventNamespace, module.event.click)
.on('change' + eventNamespace, module.event.change)
.on('keydown' + eventNamespace, selector.input, module.event.keydown)
.on('keyup' + eventNamespace, selector.input, module.event.keyup)
;
}
},
unbind: {
events: function() {
module.debug('Removing events');
$module
.off(eventNamespace)
;
}
},
uncheckOthers: function() {
var
$radios = module.get.otherRadios()
;
module.debug('Unchecking other radios', $radios);
$radios.removeClass(className.checked);
},
toggle: function() {
if( !module.can.change() ) {
if(!module.is.radio()) {
module.debug('Checkbox is read-only or disabled, ignoring toggle');
}
return;
}
if( module.is.indeterminate() || module.is.unchecked() ) {
module.debug('Currently unchecked');
module.check();
}
else if( module.is.checked() && module.can.uncheck() ) {
module.debug('Currently checked');
module.uncheck();
}
},
setting: function(name, value) {
module.debug('Changing setting', name, value);
if( $.isPlainObject(name) ) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
if($.isPlainObject(settings[name])) {
$.extend(true, settings[name], value);
}
else {
settings[name] = value;
}
}
else {
return settings[name];
}
},
internal: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, module, name);
}
else if(value !== undefined) {
module[name] = value;
}
else {
return module[name];
}
},
debug: function() {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.debug.apply(console, arguments);
}
}
},
verbose: function() {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.verbose.apply(console, arguments);
}
}
},
error: function() {
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
var
currentTime,
executionTime,
previousTime
;
if(settings.performance) {
currentTime = new Date().getTime();
previousTime = time || currentTime;
executionTime = currentTime - previousTime;
time = currentTime;
performance.push({
'Name' : message[0],
'Arguments' : [].slice.call(message, 1) || '',
'Element' : element,
'Execution Time' : executionTime
});
}
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 500);
},
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
time = false;
clearTimeout(module.performance.timer);
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
console.table(performance);
}
else {
$.each(performance, function(index, data) {
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
});
}
console.groupEnd();
}
performance = [];
}
},
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
response
;
passedArguments = passedArguments || queryArguments;
context = element || context;
if(typeof query == 'string' && object !== undefined) {
query = query.split(/[\. ]/);
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
object = object[camelCaseValue];
}
else if( object[camelCaseValue] !== undefined ) {
found = object[camelCaseValue];
return false;
}
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
object = object[value];
}
else if( object[value] !== undefined ) {
found = object[value];
return false;
}
else {
module.error(error.method, query);
return false;
}
});
}
if ( $.isFunction( found ) ) {
response = found.apply(context, passedArguments);
}
else if(found !== undefined) {
response = found;
}
if(Array.isArray(returnedValue)) {
returnedValue.push(response);
}
else if(returnedValue !== undefined) {
returnedValue = [returnedValue, response];
}
else if(response !== undefined) {
returnedValue = response;
}
return found;
}
};
if(methodInvoked) {
if(instance === undefined) {
module.initialize();
}
module.invoke(query);
}
else {
if(instance !== undefined) {
instance.invoke('destroy');
}
module.initialize();
}
})
;
return (returnedValue !== undefined)
? returnedValue
: this
;
};
$.fn.checkbox.settings = {
name : 'Checkbox',
namespace : 'checkbox',
silent : false,
debug : false,
verbose : true,
performance : true,
// delegated event context
uncheckable : 'auto',
fireOnInit : false,
enableEnterKey : true,
onChange : function(){},
beforeChecked : function(){},
beforeUnchecked : function(){},
beforeDeterminate : function(){},
beforeIndeterminate : function(){},
onChecked : function(){},
onUnchecked : function(){},
onDeterminate : function() {},
onIndeterminate : function() {},
onEnable : function(){},
onDisable : function(){},
// preserve misspelled callbacks (will be removed in 3.0)
onEnabled : function(){},
onDisabled : function(){},
className : {
checked : 'checked',
indeterminate : 'indeterminate',
disabled : 'disabled',
hidden : 'hidden',
radio : 'radio',
readOnly : 'read-only'
},
error : {
method : 'The method you called is not defined'
},
selector : {
checkbox : '.ui.checkbox',
label : 'label, .box',
input : 'input[type="checkbox"], input[type="radio"]',
link : 'a[href]'
}
};
})( jQuery, window, document );

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -429,7 +429,7 @@ a.ui.label {
.ui.card .image > .ribbon.label {
position: absolute;
top: 1rem;
z-index: 101;
z-index: 1;
}
.ui.card .image > .ui.ribbon.label,
.ui.image > .ui.ribbon.label {

File diff suppressed because one or more lines are too long

View file

@ -8199,6 +8199,905 @@ body .ui.inverted:not(.dimmer)::-webkit-scrollbar-thumb:hover {
Theme Overrides
*******************************/
/*******************************
Site Overrides
*******************************/
/*!
* # Fomantic-UI 2.8.8 - Checkbox
* http://github.com/fomantic/Fomantic-UI/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
/*******************************
Checkbox
*******************************/
/*--------------
Content
---------------*/
.ui.checkbox {
position: relative;
display: inline-block;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
outline: none;
vertical-align: baseline;
font-style: normal;
min-height: 17px;
font-size: 1em;
line-height: 17px;
min-width: 17px;
}
/* HTML Checkbox */
.ui.checkbox input[type="checkbox"],
.ui.checkbox input[type="radio"] {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
opacity: 0 !important;
outline: none;
z-index: 3;
width: 17px;
height: 17px;
}
.ui.checkbox label {
cursor: auto;
position: relative;
display: block;
padding-left: 1.85714em;
outline: none;
font-size: 1em;
}
.ui.checkbox label:before {
position: absolute;
top: 0;
left: 0;
width: 17px;
height: 17px;
content: '';
background: #FFFFFF;
border-radius: 0.25rem;
-webkit-transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
border: 1px solid #D4D4D5;
}
/*--------------
Checkmark
---------------*/
.ui.checkbox label:after {
position: absolute;
font-size: 14px;
top: 0;
left: 0;
width: 17px;
height: 17px;
text-align: center;
opacity: 0;
color: rgba(0, 0, 0, 0.87);
-webkit-transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease, -webkit-transform 0.1s ease, -webkit-box-shadow 0.1s ease;
}
.ui.right.aligned.checkbox label {
padding-left: 0;
padding-right: 1.85714em;
}
.ui.right.aligned.checkbox label:after,
.ui.right.aligned.checkbox label:before {
right: 0;
left: auto;
}
/*--------------
Label
---------------*/
/* Inside */
.ui.checkbox label,
.ui.checkbox + label {
color: rgba(0, 0, 0, 0.87);
-webkit-transition: color 0.1s ease;
transition: color 0.1s ease;
}
/* Outside */
.ui.checkbox + label {
vertical-align: middle;
}
/*******************************
States
*******************************/
/*--------------
Hover
---------------*/
.ui.checkbox label:hover::before {
background: #FFFFFF;
border-color: rgba(34, 36, 38, 0.35);
}
.ui.checkbox label:hover,
.ui.checkbox + label:hover {
color: rgba(0, 0, 0, 0.8);
}
/*--------------
Down
---------------*/
.ui.checkbox label:active::before {
background: #F9FAFB;
border-color: rgba(34, 36, 38, 0.35);
}
.ui.checkbox label:active::after {
color: rgba(0, 0, 0, 0.95);
}
.ui.checkbox input:active ~ label {
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Focus
---------------*/
.ui.checkbox input:focus ~ label:before {
background: #FFFFFF;
border-color: #a285df;
}
.ui.checkbox input:focus ~ label:after {
color: rgba(0, 0, 0, 0.95);
}
.ui.checkbox input:focus ~ label {
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Active
---------------*/
.ui.checkbox input:checked ~ label:before {
background: #FFFFFF;
border-color: rgba(34, 36, 38, 0.35);
}
.ui.checkbox input:checked ~ label:after {
opacity: 1;
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Indeterminate
---------------*/
.ui.checkbox input:not([type=radio]):indeterminate ~ label:before {
background: #FFFFFF;
border-color: rgba(34, 36, 38, 0.35);
}
.ui.checkbox input:not([type=radio]):indeterminate ~ label:after {
opacity: 1;
color: rgba(0, 0, 0, 0.95);
}
.ui.indeterminate.toggle.checkbox input:not([type=radio]):indeterminate ~ label:before {
background: rgba(0, 0, 0, 0.15);
}
.ui.indeterminate.toggle.checkbox input:not([type=radio]) ~ label:after {
left: 1.075rem;
}
.ui.right.aligned.indeterminate.toggle.checkbox input:not([type=radio]) ~ label:after {
left: auto;
right: 1.075rem;
}
/*--------------
Active Focus
---------------*/
.ui.checkbox input:not([type=radio]):indeterminate:focus ~ label:before,
.ui.checkbox input:checked:focus ~ label:before {
background: #FFFFFF;
border-color: #a285df;
}
.ui.checkbox input:not([type=radio]):indeterminate:focus ~ label:after,
.ui.checkbox input:checked:focus ~ label:after {
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Read-Only
---------------*/
.ui.read-only.checkbox,
.ui.read-only.checkbox label {
cursor: default;
pointer-events: none;
}
/*--------------
Disabled
---------------*/
.ui.disabled.checkbox label,
.ui.checkbox input[disabled] ~ label {
cursor: default;
opacity: 0.5;
color: #000000;
pointer-events: none;
}
/*--------------
Hidden
---------------*/
/* Initialized checkbox moves input below element
to prevent manually triggering */
.ui.checkbox input.hidden {
z-index: -1;
}
/* Selectable Label */
.ui.checkbox input.hidden + label {
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/*******************************
Types
*******************************/
/*--------------
Radio
---------------*/
.ui.radio.checkbox {
min-height: 15px;
}
.ui.radio.checkbox label {
padding-left: 1.85714em;
}
/* Box */
.ui.radio.checkbox label:before {
content: '';
-webkit-transform: none;
transform: none;
width: 15px;
height: 15px;
border-radius: 500rem;
top: 1px;
left: 0;
}
/* Bullet */
.ui.radio.checkbox label:after {
border: none;
content: '' !important;
line-height: 15px;
top: 1px;
left: 0;
width: 15px;
height: 15px;
border-radius: 500rem;
-webkit-transform: scale(0.46666667);
transform: scale(0.46666667);
background-color: rgba(0, 0, 0, 0.87);
}
/* Focus */
.ui.radio.checkbox input:focus ~ label:before {
background-color: #FFFFFF;
}
.ui.radio.checkbox input:focus ~ label:after {
background-color: rgba(0, 0, 0, 0.95);
}
/* Indeterminate */
.ui.radio.checkbox input:indeterminate ~ label:after {
opacity: 0;
}
/* Active */
.ui.radio.checkbox input:checked ~ label:before {
background-color: #FFFFFF;
}
.ui.radio.checkbox input:checked ~ label:after {
background-color: rgba(0, 0, 0, 0.95);
}
/* Active Focus */
.ui.radio.checkbox input:focus:checked ~ label:before {
background-color: #FFFFFF;
}
.ui.radio.checkbox input:focus:checked ~ label:after {
background-color: rgba(0, 0, 0, 0.95);
}
/*--------------
Slider
---------------*/
.ui.slider.checkbox {
min-height: 1.25rem;
}
/* Input */
.ui.slider.checkbox input {
width: 3.5rem;
height: 1.25rem;
}
/* Label */
.ui.slider.checkbox label {
padding-left: 4.5rem;
line-height: 1rem;
color: rgba(0, 0, 0, 0.4);
}
/* Line */
.ui.slider.checkbox label:before {
display: block;
position: absolute;
content: '';
-webkit-transform: none;
transform: none;
border: none !important;
left: 0;
z-index: 1;
top: 0.4rem;
background-color: rgba(0, 0, 0, 0.05);
width: 3.5rem;
height: 0.25rem;
border-radius: 500rem;
-webkit-transition: background 0.3s ease;
transition: background 0.3s ease;
}
/* Handle */
.ui.slider.checkbox label:after {
background: #FFFFFF -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.05)));
background: #FFFFFF -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
background: #FFFFFF linear-gradient(transparent, rgba(0, 0, 0, 0.05));
position: absolute;
content: '' !important;
opacity: 1;
z-index: 2;
border: none;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
width: 1.5rem;
height: 1.5rem;
top: -0.25rem;
left: 0;
-webkit-transform: none;
transform: none;
border-radius: 500rem;
-webkit-transition: left 0.3s ease;
transition: left 0.3s ease;
}
/* Focus */
.ui.slider.checkbox input:focus ~ label:before {
background-color: rgba(0, 0, 0, 0.15);
border: none;
}
/* Hover */
.ui.slider.checkbox label:hover {
color: rgba(0, 0, 0, 0.8);
}
.ui.slider.checkbox label:hover::before {
background: rgba(0, 0, 0, 0.15);
}
/* Active */
.ui.slider.checkbox input:checked ~ label {
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.slider.checkbox input:checked ~ label:before {
background-color: #545454 !important;
}
.ui.slider.checkbox input:checked ~ label:after {
left: 2rem;
}
/* Active Focus */
.ui.slider.checkbox input:focus:checked ~ label {
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.slider.checkbox input:focus:checked ~ label:before {
background-color: #000000 !important;
}
.ui.right.aligned.slider.checkbox label {
padding-left: 0;
padding-right: 4.5rem;
}
.ui.right.aligned.slider.checkbox label:after {
left: auto;
right: 2rem;
-webkit-transition: right 0.3s ease;
transition: right 0.3s ease;
}
.ui.right.aligned.slider.checkbox input:checked ~ label:after {
left: auto;
right: 0;
}
/*--------------
Toggle
---------------*/
.ui.toggle.checkbox {
min-height: 1.5rem;
}
/* Input */
.ui.toggle.checkbox input {
width: 3.5rem;
height: 1.5rem;
}
/* Label */
.ui.toggle.checkbox label {
min-height: 1.5rem;
padding-left: 4.5rem;
color: rgba(0, 0, 0, 0.87);
}
.ui.toggle.checkbox label {
padding-top: 0.15em;
}
/* Switch */
.ui.toggle.checkbox label:before {
display: block;
position: absolute;
content: '';
z-index: 1;
-webkit-transform: none;
transform: none;
border: none;
top: 0;
background: rgba(0, 0, 0, 0.05);
-webkit-box-shadow: none;
box-shadow: none;
width: 3.5rem;
height: 1.5rem;
border-radius: 500rem;
}
/* Handle */
.ui.toggle.checkbox label:after {
background: #FFFFFF -webkit-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.05)));
background: #FFFFFF -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
background: #FFFFFF linear-gradient(transparent, rgba(0, 0, 0, 0.05));
position: absolute;
content: '' !important;
opacity: 1;
z-index: 2;
border: none;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
width: 1.5rem;
height: 1.5rem;
top: 0;
left: 0;
border-radius: 500rem;
-webkit-transition: background 0.3s ease, left 0.3s ease;
transition: background 0.3s ease, left 0.3s ease;
}
.ui.toggle.checkbox input ~ label:after {
left: -0.05rem;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
}
/* Focus */
.ui.toggle.checkbox input:focus ~ label:before {
background-color: rgba(0, 0, 0, 0.15);
border: none;
}
/* Hover */
.ui.toggle.checkbox label:hover::before {
background-color: rgba(0, 0, 0, 0.15);
border: none;
}
/* Active */
.ui.toggle.checkbox input:checked ~ label {
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.toggle.checkbox input:checked ~ label:before {
background-color: #6435C9 !important;
}
.ui.toggle.checkbox input:checked ~ label:after {
left: 2.15rem;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15) inset;
}
/* Active Focus */
.ui.toggle.checkbox input:focus:checked ~ label {
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.toggle.checkbox input:focus:checked ~ label:before {
background-color: #4f20b5 !important;
}
.ui.right.aligned.toggle.checkbox label {
padding-left: 0;
padding-right: 4.5rem;
}
.ui.right.aligned.toggle.checkbox input ~ label:after {
left: auto;
right: 2.15rem;
-webkit-transition: background 0.3s ease, right 0.3s ease;
transition: background 0.3s ease, right 0.3s ease;
}
.ui.right.aligned.toggle.checkbox input:checked ~ label:after {
left: auto;
right: -0.05rem;
}
/*******************************
Variations
*******************************/
/*--------------
Fitted
---------------*/
.ui.fitted.checkbox label {
padding-left: 0 !important;
}
.ui.fitted.toggle.checkbox {
width: 3.5rem;
}
.ui.fitted.slider.checkbox {
width: 3.5rem;
}
/*--------------
Inverted
---------------*/
.ui.inverted.checkbox label,
.ui.inverted.checkbox + label {
color: rgba(255, 255, 255, 0.9) !important;
}
/* Hover */
.ui.inverted.checkbox label:hover {
color: #ffffff !important;
}
.ui.inverted.checkbox label:hover::before {
border-color: rgba(34, 36, 38, 0.5);
}
/*Slider Label */
.ui.inverted.slider.checkbox label {
color: rgba(255, 255, 255, 0.5);
}
/* Slider Line */
.ui.inverted.slider.checkbox label:before {
background-color: rgba(255, 255, 255, 0.5) !important;
}
/* Slider Hover */
.ui.inverted.slider.checkbox label:hover::before {
background: rgba(255, 255, 255, 0.7) !important;
}
/* Slider Active */
.ui.inverted.slider.checkbox input:checked ~ label {
color: #ffffff !important;
}
.ui.inverted.slider.checkbox input:checked ~ label:before {
background-color: rgba(255, 255, 255, 0.8) !important;
}
/* Slider Active Focus */
.ui.inverted.slider.checkbox input:focus:checked ~ label {
color: #ffffff !important;
}
.ui.inverted.slider.checkbox input:focus:checked ~ label:before {
background-color: rgba(255, 255, 255, 0.8) !important;
}
/* Toggle Switch */
.ui.inverted.toggle.checkbox label:before {
background-color: rgba(255, 255, 255, 0.9) !important;
}
/* Toggle Hover */
.ui.inverted.toggle.checkbox label:hover::before {
background: #ffffff !important;
}
/* Toggle Active */
.ui.inverted.toggle.checkbox input:checked ~ label {
color: #ffffff !important;
}
.ui.inverted.toggle.checkbox input:checked ~ label:before {
background-color: #6435C9 !important;
}
/* Toggle Active Focus */
.ui.inverted.toggle.checkbox input:focus:checked ~ label {
color: #ffffff !important;
}
.ui.inverted.toggle.checkbox input:focus:checked ~ label:before {
background-color: #4f20b5 !important;
}
/*--------------------
Size
---------------------*/
.ui.mini.checkbox {
font-size: 0.75em;
}
.ui.tiny.checkbox {
font-size: 0.83333333em;
}
.ui.small.checkbox {
font-size: 0.91666667em;
}
.ui.large.checkbox {
font-size: 1.16666667em;
}
.ui.large.form .checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.large.checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.large.form .checkbox:not(.slider):not(.toggle):not(.radio) label:before,
.ui.large.checkbox:not(.slider):not(.toggle):not(.radio) label:before {
-webkit-transform: scale(1.16666667);
transform: scale(1.16666667);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.large.form .checkbox.radio label:before,
.ui.large.checkbox.radio label:before {
-webkit-transform: scale(1.16666667);
transform: scale(1.16666667);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.large.form .checkbox.radio label:after,
.ui.large.checkbox.radio label:after {
-webkit-transform: scale(0.58333333);
transform: scale(0.58333333);
-webkit-transform-origin: left;
transform-origin: left;
left: 0.34166667em;
}
.ui.big.checkbox {
font-size: 1.25em;
}
.ui.big.form .checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.big.checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.big.form .checkbox:not(.slider):not(.toggle):not(.radio) label:before,
.ui.big.checkbox:not(.slider):not(.toggle):not(.radio) label:before {
-webkit-transform: scale(1.25);
transform: scale(1.25);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.big.form .checkbox.radio label:before,
.ui.big.checkbox.radio label:before {
-webkit-transform: scale(1.25);
transform: scale(1.25);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.big.form .checkbox.radio label:after,
.ui.big.checkbox.radio label:after {
-webkit-transform: scale(0.625);
transform: scale(0.625);
-webkit-transform-origin: left;
transform-origin: left;
left: 0.3625em;
}
.ui.huge.checkbox {
font-size: 1.41666667em;
}
.ui.huge.form .checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.huge.checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.huge.form .checkbox:not(.slider):not(.toggle):not(.radio) label:before,
.ui.huge.checkbox:not(.slider):not(.toggle):not(.radio) label:before {
-webkit-transform: scale(1.41666667);
transform: scale(1.41666667);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.huge.form .checkbox.radio label:before,
.ui.huge.checkbox.radio label:before {
-webkit-transform: scale(1.41666667);
transform: scale(1.41666667);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.huge.form .checkbox.radio label:after,
.ui.huge.checkbox.radio label:after {
-webkit-transform: scale(0.70833333);
transform: scale(0.70833333);
-webkit-transform-origin: left;
transform-origin: left;
left: 0.40416667em;
}
.ui.massive.checkbox {
font-size: 1.75em;
}
.ui.massive.form .checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.massive.checkbox:not(.slider):not(.toggle):not(.radio) label:after,
.ui.massive.form .checkbox:not(.slider):not(.toggle):not(.radio) label:before,
.ui.massive.checkbox:not(.slider):not(.toggle):not(.radio) label:before {
-webkit-transform: scale(1.75);
transform: scale(1.75);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.massive.form .checkbox.radio label:before,
.ui.massive.checkbox.radio label:before {
-webkit-transform: scale(1.75);
transform: scale(1.75);
-webkit-transform-origin: left;
transform-origin: left;
}
.ui.massive.form .checkbox.radio label:after,
.ui.massive.checkbox.radio label:after {
-webkit-transform: scale(0.875);
transform: scale(0.875);
-webkit-transform-origin: left;
transform-origin: left;
left: 0.4875em;
}
/*******************************
Theme Overrides
*******************************/
@font-face {
font-family: 'Checkbox';
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBD8AAAC8AAAAYGNtYXAYVtCJAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zn4huwUAAAF4AAABYGhlYWQGPe1ZAAAC2AAAADZoaGVhB30DyAAAAxAAAAAkaG10eBBKAEUAAAM0AAAAHGxvY2EAmgESAAADUAAAABBtYXhwAAkALwAAA2AAAAAgbmFtZSC8IugAAAOAAAABknBvc3QAAwAAAAAFFAAAACAAAwMTAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADoAgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6AL//f//AAAAAAAg6AD//f//AAH/4xgEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAEUAUQO7AvgAGgAAARQHAQYjIicBJjU0PwE2MzIfAQE2MzIfARYVA7sQ/hQQFhcQ/uMQEE4QFxcQqAF2EBcXEE4QAnMWEP4UEBABHRAXFhBOEBCoAXcQEE4QFwAAAAABAAABbgMlAkkAFAAAARUUBwYjISInJj0BNDc2MyEyFxYVAyUQEBf9SRcQEBAQFwK3FxAQAhJtFxAQEBAXbRcQEBAQFwAAAAABAAAASQMlA24ALAAAARUUBwYrARUUBwYrASInJj0BIyInJj0BNDc2OwE1NDc2OwEyFxYdATMyFxYVAyUQEBfuEBAXbhYQEO4XEBAQEBfuEBAWbhcQEO4XEBACEm0XEBDuFxAQEBAX7hAQF20XEBDuFxAQEBAX7hAQFwAAAQAAAAIAAHRSzT9fDzz1AAsEAAAAAADRsdR3AAAAANGx1HcAAAAAA7sDbgAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAADuwABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABFAyUAAAMlAAAAAAAAAAoAFAAeAE4AcgCwAAEAAAAHAC0AAQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAIAAAAAQAAAAAAAgAHAGkAAQAAAAAAAwAIADkAAQAAAAAABAAIAH4AAQAAAAAABQALABgAAQAAAAAABgAIAFEAAQAAAAAACgAaAJYAAwABBAkAAQAQAAgAAwABBAkAAgAOAHAAAwABBAkAAwAQAEEAAwABBAkABAAQAIYAAwABBAkABQAWACMAAwABBAkABgAQAFkAAwABBAkACgA0ALBDaGVja2JveABDAGgAZQBjAGsAYgBvAHhWZXJzaW9uIDIuMABWAGUAcgBzAGkAbwBuACAAMgAuADBDaGVja2JveABDAGgAZQBjAGsAYgBvAHhDaGVja2JveABDAGgAZQBjAGsAYgBvAHhSZWd1bGFyAFIAZQBnAHUAbABhAHJDaGVja2JveABDAGgAZQBjAGsAYgBvAHhGb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype');
}
/* Checkmark */
.ui.checkbox label:after,
.ui.checkbox .box:after {
font-family: 'Checkbox';
}
/* Checked */
.ui.checkbox input:checked ~ .box:after,
.ui.checkbox input:checked ~ label:after {
content: '\e800';
}
/* Indeterminate */
.ui.checkbox input:indeterminate ~ .box:after,
.ui.checkbox input:indeterminate ~ label:after {
font-size: 12px;
content: '\e801';
}
/* UTF Reference
.check:before { content: '\e800'; }
.dash:before { content: '\e801'; }
.plus:before { content: '\e802'; }
*/
/*******************************
Site Overrides
*******************************/
@ -26809,7 +27708,7 @@ a.ui.label {
.ui.card .image > .ribbon.label {
position: absolute;
top: 1rem;
z-index: 101;
z-index: 1;
}
.ui.card .image > .ui.ribbon.label,

View file

@ -500,6 +500,883 @@ $.extend($.expr[ ":" ], {
});
})( jQuery, window, document );
/*!
* # Fomantic-UI 2.8.8 - Checkbox
* http://github.com/fomantic/Fomantic-UI/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ($, window, document, undefined) {
'use strict';
$.isFunction = $.isFunction || function(obj) {
return typeof obj === "function" && typeof obj.nodeType !== "number";
};
window = (typeof window != 'undefined' && window.Math == Math)
? window
: (typeof self != 'undefined' && self.Math == Math)
? self
: Function('return this')()
;
$.fn.checkbox = function(parameters) {
var
$allModules = $(this),
moduleSelector = $allModules.selector || '',
time = new Date().getTime(),
performance = [],
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
returnedValue
;
$allModules
.each(function() {
var
settings = $.extend(true, {}, $.fn.checkbox.settings, parameters),
className = settings.className,
namespace = settings.namespace,
selector = settings.selector,
error = settings.error,
eventNamespace = '.' + namespace,
moduleNamespace = 'module-' + namespace,
$module = $(this),
$label = $(this).children(selector.label),
$input = $(this).children(selector.input),
input = $input[0],
initialLoad = false,
shortcutPressed = false,
instance = $module.data(moduleNamespace),
observer,
element = this,
module
;
module = {
initialize: function() {
module.verbose('Initializing checkbox', settings);
module.create.label();
module.bind.events();
module.set.tabbable();
module.hide.input();
module.observeChanges();
module.instantiate();
module.setup();
},
instantiate: function() {
module.verbose('Storing instance of module', module);
instance = module;
$module
.data(moduleNamespace, module)
;
},
destroy: function() {
module.verbose('Destroying module');
module.unbind.events();
module.show.input();
$module.removeData(moduleNamespace);
},
fix: {
reference: function() {
if( $module.is(selector.input) ) {
module.debug('Behavior called on <input> adjusting invoked element');
$module = $module.closest(selector.checkbox);
module.refresh();
}
}
},
setup: function() {
module.set.initialLoad();
if( module.is.indeterminate() ) {
module.debug('Initial value is indeterminate');
module.indeterminate();
}
else if( module.is.checked() ) {
module.debug('Initial value is checked');
module.check();
}
else {
module.debug('Initial value is unchecked');
module.uncheck();
}
module.remove.initialLoad();
},
refresh: function() {
$label = $module.children(selector.label);
$input = $module.children(selector.input);
input = $input[0];
},
hide: {
input: function() {
module.verbose('Modifying <input> z-index to be unselectable');
$input.addClass(className.hidden);
}
},
show: {
input: function() {
module.verbose('Modifying <input> z-index to be selectable');
$input.removeClass(className.hidden);
}
},
observeChanges: function() {
if('MutationObserver' in window) {
observer = new MutationObserver(function(mutations) {
module.debug('DOM tree modified, updating selector cache');
module.refresh();
});
observer.observe(element, {
childList : true,
subtree : true
});
module.debug('Setting up mutation observer', observer);
}
},
attachEvents: function(selector, event) {
var
$element = $(selector)
;
event = $.isFunction(module[event])
? module[event]
: module.toggle
;
if($element.length > 0) {
module.debug('Attaching checkbox events to element', selector, event);
$element
.on('click' + eventNamespace, event)
;
}
else {
module.error(error.notFound);
}
},
preventDefaultOnInputTarget: function() {
if(typeof event !== 'undefined' && event !== null && $(event.target).is(selector.input)) {
module.verbose('Preventing default check action after manual check action');
event.preventDefault();
}
},
event: {
change: function(event) {
if( !module.should.ignoreCallbacks() ) {
settings.onChange.call(input);
}
},
click: function(event) {
var
$target = $(event.target)
;
if( $target.is(selector.input) ) {
module.verbose('Using default check action on initialized checkbox');
return;
}
if( $target.is(selector.link) ) {
module.debug('Clicking link inside checkbox, skipping toggle');
return;
}
module.toggle();
$input.focus();
event.preventDefault();
},
keydown: function(event) {
var
key = event.which,
keyCode = {
enter : 13,
space : 32,
escape : 27,
left : 37,
up : 38,
right : 39,
down : 40
}
;
var r = module.get.radios(),
rIndex = r.index($module),
rLen = r.length,
checkIndex = false;
if(key == keyCode.left || key == keyCode.up) {
checkIndex = (rIndex === 0 ? rLen : rIndex) - 1;
} else if(key == keyCode.right || key == keyCode.down) {
checkIndex = rIndex === rLen-1 ? 0 : rIndex+1;
}
if (!module.should.ignoreCallbacks() && checkIndex !== false) {
if(settings.beforeUnchecked.apply(input)===false) {
module.verbose('Option not allowed to be unchecked, cancelling key navigation');
return false;
}
if (settings.beforeChecked.apply($(r[checkIndex]).children(selector.input)[0])===false) {
module.verbose('Next option should not allow check, cancelling key navigation');
return false;
}
}
if(key == keyCode.escape) {
module.verbose('Escape key pressed blurring field');
$input.blur();
shortcutPressed = true;
}
else if(!event.ctrlKey && ( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey)) ) {
module.verbose('Enter/space key pressed, toggling checkbox');
module.toggle();
shortcutPressed = true;
}
else {
shortcutPressed = false;
}
},
keyup: function(event) {
if(shortcutPressed) {
event.preventDefault();
}
}
},
check: function() {
if( !module.should.allowCheck() ) {
return;
}
module.debug('Checking checkbox', $input);
module.set.checked();
if( !module.should.ignoreCallbacks() ) {
settings.onChecked.call(input);
module.trigger.change();
}
module.preventDefaultOnInputTarget();
},
uncheck: function() {
if( !module.should.allowUncheck() ) {
return;
}
module.debug('Unchecking checkbox');
module.set.unchecked();
if( !module.should.ignoreCallbacks() ) {
settings.onUnchecked.call(input);
module.trigger.change();
}
module.preventDefaultOnInputTarget();
},
indeterminate: function() {
if( module.should.allowIndeterminate() ) {
module.debug('Checkbox is already indeterminate');
return;
}
module.debug('Making checkbox indeterminate');
module.set.indeterminate();
if( !module.should.ignoreCallbacks() ) {
settings.onIndeterminate.call(input);
module.trigger.change();
}
},
determinate: function() {
if( module.should.allowDeterminate() ) {
module.debug('Checkbox is already determinate');
return;
}
module.debug('Making checkbox determinate');
module.set.determinate();
if( !module.should.ignoreCallbacks() ) {
settings.onDeterminate.call(input);
module.trigger.change();
}
},
enable: function() {
if( module.is.enabled() ) {
module.debug('Checkbox is already enabled');
return;
}
module.debug('Enabling checkbox');
module.set.enabled();
if( !module.should.ignoreCallbacks() ) {
settings.onEnable.call(input);
// preserve legacy callbacks
settings.onEnabled.call(input);
module.trigger.change();
}
},
disable: function() {
if( module.is.disabled() ) {
module.debug('Checkbox is already disabled');
return;
}
module.debug('Disabling checkbox');
module.set.disabled();
if( !module.should.ignoreCallbacks() ) {
settings.onDisable.call(input);
// preserve legacy callbacks
settings.onDisabled.call(input);
module.trigger.change();
}
},
get: {
radios: function() {
var
name = module.get.name()
;
return $('input[name="' + name + '"]').closest(selector.checkbox);
},
otherRadios: function() {
return module.get.radios().not($module);
},
name: function() {
return $input.attr('name');
}
},
is: {
initialLoad: function() {
return initialLoad;
},
radio: function() {
return ($input.hasClass(className.radio) || $input.attr('type') == 'radio');
},
indeterminate: function() {
return $input.prop('indeterminate') !== undefined && $input.prop('indeterminate');
},
checked: function() {
return $input.prop('checked') !== undefined && $input.prop('checked');
},
disabled: function() {
return $input.prop('disabled') !== undefined && $input.prop('disabled');
},
enabled: function() {
return !module.is.disabled();
},
determinate: function() {
return !module.is.indeterminate();
},
unchecked: function() {
return !module.is.checked();
}
},
should: {
allowCheck: function() {
if(module.is.determinate() && module.is.checked() && !module.is.initialLoad() ) {
module.debug('Should not allow check, checkbox is already checked');
return false;
}
if(!module.should.ignoreCallbacks() && settings.beforeChecked.apply(input) === false) {
module.debug('Should not allow check, beforeChecked cancelled');
return false;
}
return true;
},
allowUncheck: function() {
if(module.is.determinate() && module.is.unchecked() && !module.is.initialLoad() ) {
module.debug('Should not allow uncheck, checkbox is already unchecked');
return false;
}
if(!module.should.ignoreCallbacks() && settings.beforeUnchecked.apply(input) === false) {
module.debug('Should not allow uncheck, beforeUnchecked cancelled');
return false;
}
return true;
},
allowIndeterminate: function() {
if(module.is.indeterminate() && !module.is.initialLoad() ) {
module.debug('Should not allow indeterminate, checkbox is already indeterminate');
return false;
}
if(!module.should.ignoreCallbacks() && settings.beforeIndeterminate.apply(input) === false) {
module.debug('Should not allow indeterminate, beforeIndeterminate cancelled');
return false;
}
return true;
},
allowDeterminate: function() {
if(module.is.determinate() && !module.is.initialLoad() ) {
module.debug('Should not allow determinate, checkbox is already determinate');
return false;
}
if(!module.should.ignoreCallbacks() && settings.beforeDeterminate.apply(input) === false) {
module.debug('Should not allow determinate, beforeDeterminate cancelled');
return false;
}
return true;
},
ignoreCallbacks: function() {
return (initialLoad && !settings.fireOnInit);
}
},
can: {
change: function() {
return !( $module.hasClass(className.disabled) || $module.hasClass(className.readOnly) || $input.prop('disabled') || $input.prop('readonly') );
},
uncheck: function() {
return (typeof settings.uncheckable === 'boolean')
? settings.uncheckable
: !module.is.radio()
;
}
},
set: {
initialLoad: function() {
initialLoad = true;
},
checked: function() {
module.verbose('Setting class to checked');
$module
.removeClass(className.indeterminate)
.addClass(className.checked)
;
if( module.is.radio() ) {
module.uncheckOthers();
}
if(!module.is.indeterminate() && module.is.checked()) {
module.debug('Input is already checked, skipping input property change');
return;
}
module.verbose('Setting state to checked', input);
$input
.prop('indeterminate', false)
.prop('checked', true)
;
},
unchecked: function() {
module.verbose('Removing checked class');
$module
.removeClass(className.indeterminate)
.removeClass(className.checked)
;
if(!module.is.indeterminate() && module.is.unchecked() ) {
module.debug('Input is already unchecked');
return;
}
module.debug('Setting state to unchecked');
$input
.prop('indeterminate', false)
.prop('checked', false)
;
},
indeterminate: function() {
module.verbose('Setting class to indeterminate');
$module
.addClass(className.indeterminate)
;
if( module.is.indeterminate() ) {
module.debug('Input is already indeterminate, skipping input property change');
return;
}
module.debug('Setting state to indeterminate');
$input
.prop('indeterminate', true)
;
},
determinate: function() {
module.verbose('Removing indeterminate class');
$module
.removeClass(className.indeterminate)
;
if( module.is.determinate() ) {
module.debug('Input is already determinate, skipping input property change');
return;
}
module.debug('Setting state to determinate');
$input
.prop('indeterminate', false)
;
},
disabled: function() {
module.verbose('Setting class to disabled');
$module
.addClass(className.disabled)
;
if( module.is.disabled() ) {
module.debug('Input is already disabled, skipping input property change');
return;
}
module.debug('Setting state to disabled');
$input
.prop('disabled', 'disabled')
;
},
enabled: function() {
module.verbose('Removing disabled class');
$module.removeClass(className.disabled);
if( module.is.enabled() ) {
module.debug('Input is already enabled, skipping input property change');
return;
}
module.debug('Setting state to enabled');
$input
.prop('disabled', false)
;
},
tabbable: function() {
module.verbose('Adding tabindex to checkbox');
if( $input.attr('tabindex') === undefined) {
$input.attr('tabindex', 0);
}
}
},
remove: {
initialLoad: function() {
initialLoad = false;
}
},
trigger: {
change: function() {
var
inputElement = $input[0]
;
if(inputElement) {
var events = document.createEvent('HTMLEvents');
module.verbose('Triggering native change event');
events.initEvent('change', true, false);
inputElement.dispatchEvent(events);
}
}
},
create: {
label: function() {
if($input.prevAll(selector.label).length > 0) {
$input.prev(selector.label).detach().insertAfter($input);
module.debug('Moving existing label', $label);
}
else if( !module.has.label() ) {
$label = $('<label>').insertAfter($input);
module.debug('Creating label', $label);
}
}
},
has: {
label: function() {
return ($label.length > 0);
}
},
bind: {
events: function() {
module.verbose('Attaching checkbox events');
$module
.on('click' + eventNamespace, module.event.click)
.on('change' + eventNamespace, module.event.change)
.on('keydown' + eventNamespace, selector.input, module.event.keydown)
.on('keyup' + eventNamespace, selector.input, module.event.keyup)
;
}
},
unbind: {
events: function() {
module.debug('Removing events');
$module
.off(eventNamespace)
;
}
},
uncheckOthers: function() {
var
$radios = module.get.otherRadios()
;
module.debug('Unchecking other radios', $radios);
$radios.removeClass(className.checked);
},
toggle: function() {
if( !module.can.change() ) {
if(!module.is.radio()) {
module.debug('Checkbox is read-only or disabled, ignoring toggle');
}
return;
}
if( module.is.indeterminate() || module.is.unchecked() ) {
module.debug('Currently unchecked');
module.check();
}
else if( module.is.checked() && module.can.uncheck() ) {
module.debug('Currently checked');
module.uncheck();
}
},
setting: function(name, value) {
module.debug('Changing setting', name, value);
if( $.isPlainObject(name) ) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
if($.isPlainObject(settings[name])) {
$.extend(true, settings[name], value);
}
else {
settings[name] = value;
}
}
else {
return settings[name];
}
},
internal: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, module, name);
}
else if(value !== undefined) {
module[name] = value;
}
else {
return module[name];
}
},
debug: function() {
if(!settings.silent && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.debug.apply(console, arguments);
}
}
},
verbose: function() {
if(!settings.silent && settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.verbose.apply(console, arguments);
}
}
},
error: function() {
if(!settings.silent) {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
}
},
performance: {
log: function(message) {
var
currentTime,
executionTime,
previousTime
;
if(settings.performance) {
currentTime = new Date().getTime();
previousTime = time || currentTime;
executionTime = currentTime - previousTime;
time = currentTime;
performance.push({
'Name' : message[0],
'Arguments' : [].slice.call(message, 1) || '',
'Element' : element,
'Execution Time' : executionTime
});
}
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 500);
},
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
time = false;
clearTimeout(module.performance.timer);
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
console.table(performance);
}
else {
$.each(performance, function(index, data) {
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
});
}
console.groupEnd();
}
performance = [];
}
},
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
response
;
passedArguments = passedArguments || queryArguments;
context = element || context;
if(typeof query == 'string' && object !== undefined) {
query = query.split(/[\. ]/);
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
object = object[camelCaseValue];
}
else if( object[camelCaseValue] !== undefined ) {
found = object[camelCaseValue];
return false;
}
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
object = object[value];
}
else if( object[value] !== undefined ) {
found = object[value];
return false;
}
else {
module.error(error.method, query);
return false;
}
});
}
if ( $.isFunction( found ) ) {
response = found.apply(context, passedArguments);
}
else if(found !== undefined) {
response = found;
}
if(Array.isArray(returnedValue)) {
returnedValue.push(response);
}
else if(returnedValue !== undefined) {
returnedValue = [returnedValue, response];
}
else if(response !== undefined) {
returnedValue = response;
}
return found;
}
};
if(methodInvoked) {
if(instance === undefined) {
module.initialize();
}
module.invoke(query);
}
else {
if(instance !== undefined) {
instance.invoke('destroy');
}
module.initialize();
}
})
;
return (returnedValue !== undefined)
? returnedValue
: this
;
};
$.fn.checkbox.settings = {
name : 'Checkbox',
namespace : 'checkbox',
silent : false,
debug : false,
verbose : true,
performance : true,
// delegated event context
uncheckable : 'auto',
fireOnInit : false,
enableEnterKey : true,
onChange : function(){},
beforeChecked : function(){},
beforeUnchecked : function(){},
beforeDeterminate : function(){},
beforeIndeterminate : function(){},
onChecked : function(){},
onUnchecked : function(){},
onDeterminate : function() {},
onIndeterminate : function() {},
onEnable : function(){},
onDisable : function(){},
// preserve misspelled callbacks (will be removed in 3.0)
onEnabled : function(){},
onDisabled : function(){},
className : {
checked : 'checked',
indeterminate : 'indeterminate',
disabled : 'disabled',
hidden : 'hidden',
radio : 'radio',
readOnly : 'read-only'
},
error : {
method : 'The method you called is not defined'
},
selector : {
checkbox : '.ui.checkbox',
label : 'label, .box',
input : 'input[type="checkbox"], input[type="radio"]',
link : 'a[href]'
}
};
})( jQuery, window, document );
/*!

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -468,7 +468,7 @@ a.ui.label {
.ui.card .image > .ribbon.label {
position: absolute;
top: @ribbonImageTopDistance;
z-index: 101;
z-index: 1;
}
.ui.card .image > .ui.ribbon.label,
.ui.image > .ui.ribbon.label {

View file

@ -5,4 +5,9 @@ $(function () {
*/
$('.modal .wishlist-wish-add .dropdown.priority').dropdown();
/**
* Properties
*/
$('.checkbox').checkbox();
});

View file

@ -175,14 +175,15 @@ switch ($step) {
*/
$database->query('DROP TABLE IF EXISTS `wishes`;');
$database->query('CREATE TABLE `wishes` (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`wishlist` INT NOT NULL,
`title` VARCHAR(128) NULL DEFAULT NULL,
`description` TEXT NULL DEFAULT NULL,
`image` VARCHAR(255) NULL DEFAULT NULL,
`url` VARCHAR(255) NULL DEFAULT NULL,
`priority` TINYINT(1) NULL DEFAULT NULL,
`status` VARCHAR(32) NULL DEFAULT NULL,
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`wishlist` INT NOT NULL,
`title` VARCHAR(128) NULL DEFAULT NULL,
`description` TEXT NULL DEFAULT NULL,
`image` VARCHAR(255) NULL DEFAULT NULL,
`url` VARCHAR(255) NULL DEFAULT NULL,
`priority` TINYINT(1) NULL DEFAULT NULL,
`status` VARCHAR(32) NULL DEFAULT NULL,
`is_purchasable` BOOLEAN NOT NULL DEFAULT FALSE,
FOREIGN KEY (`wishlist`)
REFERENCES `wishlists` (`id`)
ON DELETE CASCADE

View file

@ -6,7 +6,7 @@
use wishthis\Wish;
$scriptPart = '/src/assets/js/parts/wish-priority.js';
$scriptPart = '/src/assets/js/parts/wish-add.js';
?>
<script defer src="<?= $scriptPart ?>?m=<?= filemtime(ROOT . $scriptPart) ?>"></script>
@ -67,5 +67,20 @@ $scriptPart = '/src/assets/js/parts/wish-priority.js';
</select>
</div>
<div class="grouped fields">
<label><?= __('Properties') ?></label>
<div class="field">
<div class="ui checkbox">
<input type="checkbox"
name="wish_is_purchasable"
<?= isset($wish->is_purchasable) && $wish->is_purchasable ? 'checked' : '' ?>
/>
<label><?= __('Is purchasable') ?></label>
</div>
</div>
</div>
</div>
</div>

View file

@ -14,21 +14,23 @@ $wish = new Wish($_SESSION['_GET']['id'], false);
$page = new Page(__FILE__, $wish->getTitle());
if ('POST' === $_SERVER['REQUEST_METHOD'] && count($_POST) >= 0) {
$wish_id = $_POST['wish_id'];
$wish_title = trim($_POST['wish_title']);
$wish_description = $_POST['wish_description'] ?: '';
$wish_image = trim($_POST['wish_image']);
$wish_url = trim($_POST['wish_url']);
$wish_priority = isset($_POST['wish_priority']) && $_POST['wish_priority'] ? $_POST['wish_priority'] : 'NULL';
$wish_id = $_POST['wish_id'];
$wish_title = trim($_POST['wish_title']);
$wish_description = $_POST['wish_description'] ?: '';
$wish_image = trim($_POST['wish_image']);
$wish_url = trim($_POST['wish_url']);
$wish_priority = isset($_POST['wish_priority']) && $_POST['wish_priority'] ? $_POST['wish_priority'] : 'NULL';
$wish_is_purchasable = isset($_POST['wish_is_purchasable']);
$database
->query('UPDATE `wishes`
SET `title` = "' . $wish_title . '",
`description` = "' . $wish_description . '",
`image` = "' . $wish_image . '",
`url` = "' . $wish_url . '",
`priority` = ' . $wish_priority . '
WHERE `id` = ' . $wish_id . ';');
SET `title` = "' . $wish_title . '",
`description` = "' . $wish_description . '",
`image` = "' . $wish_image . '",
`url` = "' . $wish_url . '",
`priority` = ' . $wish_priority . ',
`is_purchasable` = ' . $wish_is_purchasable . '
WHERE `id` = ' . $wish_id . ';');
$wish = new Wish($_SESSION['_GET']['id'], false);
$page = new Page(__FILE__, $wish->getTitle());

View file

@ -1,3 +1,6 @@
/**
* Saved Wishlists
*/
CREATE TABLE `wishlists_saved` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`user` INT NOT NULL,
@ -8,3 +11,10 @@ CREATE TABLE `wishlists_saved` (
);
CREATE INDEX `idx_wishlist` ON `wishlists_saved` (`wishlist`);
/**
* Wishes
*/
ALTER TABLE `wishes`
ADD COLUMN `is_purchasable` BOOLEAN NOT NULL DEFAULT FALSE
;