1
0
Fork 0

Merge branch 'events-support-imports' into add_group_field

Dieser Commit ist enthalten in:
Angus McLeod 2020-04-07 17:57:36 +10:00
Commit 2e272f3ef4
9 geänderte Dateien mit 789 neuen und 356 gelöschten Zeilen

Datei anzeigen

@ -84,6 +84,9 @@
//= require discourse/components/d-editor //= require discourse/components/d-editor
//= require discourse/components/input-tip //= require discourse/components/input-tip
//= require discourse/components/emoji-picker //= require discourse/components/emoji-picker
//= require discourse/components/input-tip
//= require discourse/components/date-picker
//= require discourse/components/text-field
//= require discourse/templates/components/conditional-loading-spinner //= require discourse/templates/components/conditional-loading-spinner
//= require discourse/templates/components/d-button //= require discourse/templates/components/d-button
@ -91,6 +94,7 @@
//= require discourse/templates/components/emoji-picker //= require discourse/templates/components/emoji-picker
//= require discourse/templates/category-tag-autocomplete //= require discourse/templates/category-tag-autocomplete
//= require discourse/templates/emoji-selector-autocomplete //= require discourse/templates/emoji-selector-autocomplete
//= require discourse/templates/user-selector-autocomplete
//= require discourse/pre-initializers/sniff-capabilities //= require discourse/pre-initializers/sniff-capabilities

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

Datei anzeigen

@ -1 +1,3 @@
{{custom-user-selector usernames=field.value placeholderKey=field.placeholder}} {{custom-user-selector
usernames=field.value
placeholderKey=field.placeholder}}

Datei anzeigen

@ -0,0 +1,177 @@
@import "wizard_variables";
div.ac-wrap {
overflow: visible;
max-height: 150px;
min-height: 34px;
background-color: white;
border: 1px solid #e9e9e9;
padding: 5px 4px 1px 4px;
div.item {
float: left;
margin-bottom: 4px;
margin-right: 10px;
span {
height: 24px;
display: inline-block;
line-height: 20px;
}
}
.ac-collapsed-button {
float: left;
border-radius: 20px;
position: relative;
top: -2px;
margin-right: 10px;
}
input[type="text"] {
border: 0;
}
.remove-link {
margin-left: 4px;
font-size: 11px;
line-height: 10px;
padding: 1.5px 1.5px 1.5px 2.5px;
border-radius: 12px;
width: 10px;
display: inline-block;
border: 1px solid #e9e9e9;
&:hover {
background-color: #f2ab9a;
border: 1px solid #ec8972;
text-decoration: none;
color: #e45735;
}
}
}
img.avatar {
border-radius: 50%;
vertical-align: middle;
}
.autocomplete {
z-index: 999999;
position: absolute;
width: 240px;
background-color: white;
border: 1px solid #e9e9e9;
ul {
list-style: none;
padding: 0;
margin: 0;
li {
.d-users {
color: #333;
padding: 0 2px;
}
border-bottom: 1px solid #e9e9e9;
a {
padding: 5px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
text-decoration: none;
img {
margin-right: 5px;
}
span.username {
color: #000;
vertical-align: middle;
}
span.name {
font-size: 11px;
vertical-align: middle;
}
&.selected {
background-color: #d1f0ff;
}
&:hover {
background-color: #ffffa6;
text-decoration: none;
}
}
}
}
}
.ac-wrap {
box-sizing: border-box;
position: relative;
.ac-loading {
position: absolute;
top: 7px;
right: 5px;
}
.item {
line-height: 1.6;
}
.autocomplete {
width: inherit;
left: 0 !important;
width: 100%;
top: 30px !important;
box-sizing: border-box;
li, .no-results {
padding: 10px;
}
ul > label {
color: #919191;
margin: 5px 0;
padding: 0 5px;
font-size: 80%;
line-height: 1.4em;
a {
text-decoration: underline;
}
}
}
}
.ac-form-result {
cursor: pointer;
background-color: $secondary;
display: flex;
&:hover, &.selected {
background-color: $tertiary;
color: white;
label {
color: white;
}
}
label {
flex: 1 1 auto;
margin-bottom: 0;
cursor: pointer;
}
i {
margin-right: 5px;
}
}

Datei anzeigen

@ -327,67 +327,6 @@
} }
} }
.p-list-box {
max-width: 550px;
position: relative;
margin: 10px 0;
.spinner {
position: absolute;
right: 50%;
top: 50%;
}
.p-text {
margin-bottom: 5px;
}
ul {
border: 1px solid #e9e9e9;
padding: 0;
margin: 0;
list-style: none;
height: 200px;
overflow: scroll;
}
li {
padding: 6px 12px;
cursor: pointer;
background-color: #fff;
display: flex;
border-top: 1px solid #e9e9e9;
border-bottom: 1px solid #e9e9e9;
&:hover, &.selected {
background-color: #eee;
}
label {
flex: 1 1 auto;
cursor: pointer;
}
i {
margin-right: 5px;
}
}
.no-results {
padding: 15px;
}
.default {
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
position: absolute;
width: 100%;
text-align: center;
color: #919191;
}
}
.spinner { .spinner {
margin: 20px auto 20px auto; margin: 20px auto 20px auto;
position: relative; position: relative;
@ -407,127 +346,6 @@
} }
} }
.user-selector-field.wizard-field {
div.ac-wrap div.item a.remove, .remove-link {
margin-left: 4px;
font-size: 11px;
line-height: 10px;
padding: 1.5px 1.5px 1.5px 2.5px;
border-radius: 12px;
width: 10px;
display: inline-block;
border: 1px solid #e9e9e9;
&:hover {
background-color: #f2ab9a;
border: 1px solid #ec8972;
text-decoration: none;
color: #e45735;
}
}
div.ac-wrap {
width: 98.5% !important;
overflow: visible;
max-height: 150px;
min-height: 34px;
background-color: white;
border: 1px solid #e9e9e9;
padding: 5px 4px 1px 4px;
div.item {
float: left;
margin-bottom: 4px;
margin-right: 10px;
span {
height: 24px;
display: inline-block;
line-height: 20px;
}
}
.ac-collapsed-button {
float: left;
border-radius: 20px;
position: relative;
top: -2px;
margin-right: 10px;
}
input[type="text"] {
float: left;
margin-bottom: 4px;
height: 24px;
display: block;
border: 0;
padding: 0;
box-shadow: none;
}
}
}
img.avatar {
border-radius: 50%;
vertical-align: middle;
}
.autocomplete {
z-index: 999999;
position: absolute;
width: 240px;
background-color: white;
border: 1px solid #e9e9e9;
ul {
list-style: none;
padding: 0;
margin: 0;
li {
.d-users {
color: #333;
padding: 0 2px;
}
border-bottom: 1px solid #e9e9e9;
a {
padding: 5px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
text-decoration: none;
img {
margin-right: 5px;
}
span.username {
color: #000;
vertical-align: middle;
}
span.name {
font-size: 11px;
vertical-align: middle;
}
&.selected {
background-color: #d1f0ff;
}
&:hover {
background-color: #ffffa6;
text-decoration: none;
}
}
}
}
}
.wizard-field { .wizard-field {
&.invalid{ &.invalid{
textarea, input[type=text], input[type=checkbox], .select-kit { textarea, input[type=text], input[type=checkbox], .select-kit {
@ -546,180 +364,8 @@ img.avatar {
} }
} }
.p-text {
&.bronze {
color: #cd7f32;
}
&.silver {
color: #c0c0c0;
}
&.gold {
color: rgb(231, 195, 0);
}
}
.ac-wrap {
box-sizing: border-box;
position: relative;
width: auto !important;
.ac-loading {
position: absolute;
top: 7px;
right: 5px;
}
.item {
line-height: 1.6;
}
.autocomplete {
width: inherit;
left: 0 !important;
width: 100%;
top: 30px !important;
box-sizing: border-box;
li, .no-results {
padding: 10px;
}
ul > label {
color: #919191;
margin: 5px 0;
padding: 0 5px;
font-size: 80%;
line-height: 1.4em;
a {
text-decoration: underline;
}
}
}
}
.ac-form-result {
cursor: pointer;
background-color: $secondary;
display: flex;
&:hover, &.selected {
background-color: $tertiary;
color: white;
label {
color: white;
}
}
label {
flex: 1 1 auto;
margin-bottom: 0;
cursor: pointer;
}
i {
margin-right: 5px;
}
}
/* Location Specific Styles */
.location-selector-container {
width: 350px;
}
.location-form {
display: flex;
.title {
font-weight: 700;
}
.address {
padding-right: 20px;
}
.coordinates {
.control-group {
display: block;
.controls {
display: flex;
width: 100%;
input {
width: 100px;
}
}
.icon {
margin-left: 10px;
display: inline-block;
}
}
.icon img {
max-width: 30px;
}
}
.address + .coordinates {
border-left: 1px solid #eee;
padding-left: 20px;
}
}
.location-form-instructions {
color: #919191;
margin: 5px 0;
font-size: 80%;
line-height: 1.4em;
a {
text-decoration: underline;
}
}
.location-form, .add-location {
overflow: visible;
.control-group {
display: inline-block;
vertical-align: top;
margin-right: 20px;
margin-top: 10px;
.instructions {
@extend .location-form-instructions;
}
}
.location-search {
display: block;
margin: 15px 0;
}
.geo-map {
height: 400px;
}
}
.add-location + .modal-footer .clear {
margin: 5px 10px;
}
input.input-location, div.input-location {
max-height: 150px;
background-color: $secondary;
box-shadow: none;
box-sizing: border-box;
margin: 0;
}
/* IE11 hacks */ /* IE11 hacks */
@media all and (-ms-high-contrast:none) @media all and (-ms-high-contrast:none)
{ {
.custom-wizard { .custom-wizard {

Datei anzeigen

@ -0,0 +1,502 @@
@import "wizard_variables";
// event form
.event-form {
width: 585px;
max-width: 80vw;
.control {
display: inline-flex;
align-items: flex-start;
min-height: 30px;
margin-right: 20px;
> input:first-child {
margin-top: 10px !important;
}
> span:first-child {
margin-top: 5px !important;
}
> input + span {
margin-top: 5px;
}
&:last-of-type {
margin-right: 0;
}
input[type="checkbox"] {
margin: 0 10px 0 0;
}
input[type="number"] {
width: 50px;
margin: 0;
min-height: 34px;
border: 1px solid #e9e9e9;
}
&.full-width {
flex: 1;
}
.select-kit, .ac-wrap {
width: 100% !important;
max-width: 330px;
}
.select-kit-body {
width: 100% !important;
max-width: 330px;
}
}
.event-controls {
margin-bottom: 20px;
display: flex;
align-items: flex-start;
}
.datetime-controls {
display: flex;
margin-bottom: 5px;
.date-time-card {
width: 270px;
display: inline-block;
text-align: left;
}
.start-card {
border-left: 1px solid transparent;
padding-right: 20px;
}
.end-card {
border-left: 1px solid #eee;
padding-left: 20px;
&.disabled {
span, label, .pika-label, .pika-table th, .pika-button, .pika-prev, .pika-next, input, .pika-lendar, .is-selected .pika-button {
color: $primary-low;
background-image: initial;
background: initial;
box-shadow: initial;
cursor: default;
pointer-events: none;
}
input, .pika-lendar {
border: 1px solid $primary-low !important;
}
}
}
.set-all-day {
font-size: 1.2em;
padding-bottom: 13px;
}
.sub-title {
font-size: 1.2em;
font-weight: bold;
padding-bottom: 2px;
padding-right: 10px;
}
.date-time-set {
padding-top: 10px;
display: flex;
flex-direction: row;
.date-area {
order: 1;
}
.time-area {
order: 2;
margin-left: 10px;
.modal-time {
width: 127px;
}
}
input {
padding: 4px 10px;
font-size: 1em;
line-height: 1;
color: $primary;
border: 1px solid $primary-medium;
min-height: 30px;
width: 130px;
margin: 10px 0;
}
}
#date-container-start,
#date-container-end {
height: 250px;
}
.ui-timepicker-input {
width: 105px;
text-align: center;
}
.pika-single {
position: relative !important;
border: none;
z-index: 100;
.pika-lendar {
border: 1px solid $primary-medium;
padding: 14px;
margin: 0;
float: none;
width: auto;
}
}
}
.rsvp-controls {
.rsvp-container {
display: flex;
flex-flow: wrap;
margin-top: 10px;
.control span {
margin-right: 10px;
}
.full-width {
align-items: flex-start;
}
}
}
}
// datepicker
/*!
* Pikaday
* Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/
*/
// Variables
// Declare any of these variables before importing this SCSS file to easily override defaults
// Variables are namespaced with the pd (pikaday) prefix
// Colours
$pd-text-color: $primary !default;
$pd-title-color: $primary !default;
$pd-title-bg: $secondary !default;
$pd-picker-bg: $secondary !default;
$pd-picker-border: $primary-low !default;
$pd-picker-border-bottom: $primary-low !default;
$pd-picker-shadow: rgba(0,0,0,.5) !default;
$pd-th-color: $primary !default;
$pd-day-color: $primary !default;
$pd-day-bg: $secondary !default;
$pd-day-hover-color: $primary !default;
$pd-day-hover-bg: $tertiary-low !default;
$pd-day-today-color: $tertiary !default;
$pd-day-selected-color: $secondary !default;
$pd-day-selected-bg: $tertiary !default;
$pd-day-selected-shadow: $tertiary-low !default;
$pd-day-disabled-color: $primary !default;
$pd-week-color: $primary !default;
// Font
$pd-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
.pika-single {
z-index: 9999;
display: block;
position: relative;
color: $pd-text-color;
background: $pd-picker-bg;
border: 1px solid $pd-picker-border;
border-bottom-color: $pd-picker-border-bottom;
font-family: $pd-font-family;
&.is-hidden {
display: none;
}
&.is-bound {
position: absolute;
box-shadow: 0 5px 15px -5px $pd-picker-shadow;
}
}
// clear child float (pika-lendar), using the famous micro clearfix hack
// http://nicolasgallagher.com/micro-clearfix-hack/
.pika-single {
&:before,
&:after {
content: " ";
display: table;
}
&:after { clear: both }
}
.pika-lendar {
float: left;
width: 240px;
margin: 8px;
}
.pika-title {
position: relative;
text-align: center;
select {
cursor: pointer;
position: absolute;
z-index: 9998;
margin: 0;
left: 0;
top: 5px;
filter: alpha(opacity=0);
opacity: 0;
}
}
.pika-label {
display: inline-block;
position: relative;
z-index: 9999;
overflow: hidden;
margin: 0;
padding: 5px 3px;
font-size: 14px;
line-height: 20px;
font-weight: bold;
color: $pd-title-color;
background-color: $pd-title-bg;
}
.pika-prev,
.pika-next {
display: block;
cursor: pointer;
position: relative;
outline: none;
border: 0;
padding: 0;
width: 20px;
height: 30px;
text-indent: 20px; // hide text using text-indent trick, using width value (it's enough)
white-space: nowrap;
overflow: hidden;
background-color: transparent;
background-position: center center;
background-repeat: no-repeat;
background-size: 75% 75%;
opacity: .5;
@if (lightness($secondary) < 50) { // invert the black png if the background is dark
filter: invert(1);
}
&:hover {
opacity: 1;
}
&.is-disabled {
cursor: default;
opacity: .2;
}
}
.pika-prev,
.is-rtl .pika-next {
float: left;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==');
}
.pika-next,
.is-rtl .pika-prev {
float: right;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=');
}
.pika-select {
display: inline-block;
}
.pika-table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
border: 0;
th,
td {
width: 14.285714285714286%;
padding: 0;
}
th {
color: $pd-th-color;
font-size: 12px;
line-height: 25px;
font-weight: bold;
text-align: center;
}
abbr {
border-bottom: none;
cursor: help;
}
}
.pika-button {
cursor: pointer;
display: block;
-moz-box-sizing: border-box;
box-sizing: border-box;
outline: none;
border: 0;
margin: 0;
width: 100%;
padding: 5px;
color: $pd-day-color;
font-size: 12px;
line-height: 15px;
text-align: right;
background: $pd-day-bg;
.is-today & {
color: $pd-day-today-color;
font-weight: bold;
}
.is-selected & {
color: $pd-day-selected-color;
font-weight: bold;
background: $pd-day-selected-bg;
box-shadow: inset 0 1px 3px $pd-day-selected-shadow;
border-radius: 3px;
}
.is-disabled &,
.is-outside-current-month & {
pointer-events: none;
cursor: default;
color: $pd-day-disabled-color;
opacity: .3;
}
&:hover {
color: $pd-day-hover-color;
background: $pd-day-hover-bg;
box-shadow: none;
border-radius: 3px;
}
}
.pika-week {
font-size: 11px;
color: $pd-week-color;
}
.is-inrange .pika-button {
background: #D5E9F7;
}
.is-startrange .pika-button {
color: $secondary;
background: #6CB31D;
box-shadow: none;
border-radius: 3px;
}
.is-endrange .pika-button {
color: $secondary;
background: $tertiary;
box-shadow: none;
border-radius: 3px;
}
// timepicker
.ui-timepicker-wrapper {
overflow-y: auto;
max-height: 150px;
width: 6.5em;
background: #fff;
border: 1px solid #ddd;
-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);
-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);
box-shadow:0 5px 10px rgba(0,0,0,0.2);
outline: none;
z-index: 10001;
margin: 0;
}
.ui-timepicker-wrapper.ui-timepicker-with-duration {
width: 13em;
}
.ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30,
.ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60 {
width: 11em;
}
.ui-timepicker-list {
margin: 0;
padding: 0;
list-style: none;
}
.ui-timepicker-duration {
margin-left: 5px; color: #888;
}
.ui-timepicker-list:hover .ui-timepicker-duration {
color: #888;
}
.ui-timepicker-list li {
padding: 3px 0 3px 5px;
cursor: pointer;
white-space: nowrap;
color: #000;
list-style: none;
margin: 0;
}
.ui-timepicker-list:hover .ui-timepicker-selected {
background: #fff; color: #000;
}
li.ui-timepicker-selected,
.ui-timepicker-list li:hover,
.ui-timepicker-list .ui-timepicker-selected:hover {
background: #1980EC; color: #fff;
}
li.ui-timepicker-selected .ui-timepicker-duration,
.ui-timepicker-list li:hover .ui-timepicker-duration {
color: #ccc;
}
.ui-timepicker-list li.ui-timepicker-disabled,
.ui-timepicker-list li.ui-timepicker-disabled:hover,
.ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled {
color: #888;
cursor: default;
}
.ui-timepicker-list li.ui-timepicker-disabled:hover,
.ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled {
background: #f2f2f2;
}

Datei anzeigen

@ -0,0 +1,89 @@
@import "wizard_variables";
.location-selector-container {
width: 350px;
}
.location-form {
display: flex;
.title {
font-weight: 700;
}
.address {
padding-right: 20px;
}
.coordinates {
.control-group {
display: block;
.controls {
display: flex;
width: 100%;
input {
width: 100px;
}
}
.icon {
margin-left: 10px;
display: inline-block;
}
}
.icon img {
max-width: 30px;
}
}
.address + .coordinates {
border-left: 1px solid #eee;
padding-left: 20px;
}
}
.location-form-instructions {
color: #919191;
margin: 5px 0;
font-size: 80%;
line-height: 1.4em;
a {
text-decoration: underline;
}
}
.location-form, .add-location {
overflow: visible;
.control-group {
display: inline-block;
vertical-align: top;
margin-right: 20px;
margin-top: 10px;
.instructions {
@extend .location-form-instructions;
}
}
.location-search {
display: block;
margin: 15px 0;
}
.geo-map {
height: 400px;
}
}
input.input-location, div.input-location {
max-height: 150px;
background-color: $secondary;
box-shadow: none;
box-sizing: border-box;
margin: 0;
}

Datei anzeigen

@ -24,10 +24,13 @@ if Rails.env.production?
wizard-plugin.js wizard-plugin.js
wizard-custom-start.js wizard-custom-start.js
wizard-raw-templates.js.erb wizard-raw-templates.js.erb
stylesheets/wizard/wizard_autocomplete.scss
stylesheets/wizard/wizard_custom.scss stylesheets/wizard/wizard_custom.scss
stylesheets/wizard/wizard_composer.scss stylesheets/wizard/wizard_composer.scss
stylesheets/wizard/wizard_variables.scss stylesheets/wizard/wizard_variables.scss
stylesheets/wizard/wizard_custom_mobile.scss stylesheets/wizard/wizard_custom_mobile.scss
stylesheets/wizard/wizard_locations.scss
stylesheets/wizard/wizard_events.scss
} }
end end

Datei anzeigen

@ -1,10 +1,13 @@
<html> <html>
<head> <head>
<%= discourse_stylesheet_link_tag :wizard, theme_id: nil %> <%= discourse_stylesheet_link_tag :wizard, theme_id: nil %>
<%= stylesheet_link_tag "wizard_autocomplete" %>
<%= stylesheet_link_tag "wizard_custom" %> <%= stylesheet_link_tag "wizard_custom" %>
<%= stylesheet_link_tag "wizard_composer" %> <%= stylesheet_link_tag "wizard_composer" %>
<%= stylesheet_link_tag "wizard_variables" %> <%= stylesheet_link_tag "wizard_variables" %>
<%= stylesheet_link_tag "wizard_custom_mobile" %> <%= stylesheet_link_tag "wizard_custom_mobile" %>
<%= stylesheet_link_tag "wizard_locations"%>
<%= stylesheet_link_tag "wizard_events"%>
<%- if theme_ids %> <%- if theme_ids %>
<%= discourse_stylesheet_link_tag (mobile_view? ? :mobile_theme : :desktop_theme) %> <%= discourse_stylesheet_link_tag (mobile_view? ? :mobile_theme : :desktop_theme) %>
<%- end %> <%- end %>