1
0
Fork 0

Namespace CSS and remove uneccessary site attributes

Dieser Commit ist enthalten in:
Angus McLeod 2022-07-27 14:40:05 +01:00
Ursprung 60823cd87a
Commit 150afb29e0
22 geänderte Dateien mit 1335 neuen und 1504 gelöschten Zeilen

Datei anzeigen

@ -3,7 +3,7 @@ class CustomWizard::WizardController < ::ApplicationController
before_action :ensure_plugin_enabled before_action :ensure_plugin_enabled
before_action :ensure_logged_in, only: [:skip] before_action :ensure_logged_in, only: [:skip]
def index def show
if wizard.present? if wizard.present?
render json: CustomWizard::WizardSerializer.new(wizard, scope: guardian, root: false).as_json, status: 200 render json: CustomWizard::WizardSerializer.new(wizard, scope: guardian, root: false).as_json, status: 200
else else
@ -31,26 +31,8 @@ class CustomWizard::WizardController < ::ApplicationController
render json: result render json: result
end end
def qunit
raise Discourse::InvalidAccess.new if Rails.env.production?
respond_to do |format|
format.html do
render "default/empty"
end
end
end
protected protected
def ensure_logged_in
raise Discourse::NotLoggedIn.new unless current_user.present?
end
def guardian
@guardian ||= Guardian.new(current_user, request)
end
def wizard def wizard
@wizard ||= begin @wizard ||= begin
builder = CustomWizard::Builder.new(params[:wizard_id].underscore, current_user) builder = CustomWizard::Builder.new(params[:wizard_id].underscore, current_user)
@ -61,41 +43,6 @@ class CustomWizard::WizardController < ::ApplicationController
end end
end end
def wizard_page_title
wizard ? (wizard.name || wizard.id) : I18n.t('wizard.custom_title')
end
def wizard_theme_id
wizard ? wizard.theme_id : nil
end
def wizard_theme_lookup(name)
Theme.lookup_field(wizard_theme_id, view_context.mobile_view? ? :mobile : :desktop, name)
end
def wizard_theme_translations_lookup
Theme.lookup_field(wizard_theme_id, :translations, I18n.locale)
end
def preload_wizard_json
return if request.xhr? || request.format.json?
return if request.method != "GET"
store_preloaded("siteSettings", SiteSetting.client_settings_json)
end
def store_preloaded(key, json)
@preloaded ||= {}
@preloaded[key] = json.gsub("</", "<\\/")
end
## Simplified version of with_resolved_locale in ApplicationController
def with_resolved_locale
locale = current_user ? current_user.effective_locale : SiteSetting.default_locale
I18n.ensure_all_loaded!
I18n.with_locale(locale) { yield }
end
private private
def ensure_plugin_enabled def ensure_plugin_enabled

Datei anzeigen

@ -9,13 +9,10 @@ class CustomWizard::WizardSerializer < CustomWizard::BasicWizardSerializer
:completed, :completed,
:required, :required,
:permitted, :permitted,
:uncategorized_category_id,
:categories,
:resume_on_revisit :resume_on_revisit
has_many :steps, serializer: ::CustomWizard::StepSerializer, embed: :objects has_many :steps, serializer: ::CustomWizard::StepSerializer, embed: :objects
has_one :user, serializer: ::BasicUserSerializer, embed: :objects has_one :user, serializer: ::BasicUserSerializer, embed: :objects
has_many :groups, serializer: ::BasicGroupSerializer, embed: :objects
def completed def completed
object.completed? object.completed?
@ -46,24 +43,4 @@ class CustomWizard::WizardSerializer < CustomWizard::BasicWizardSerializer
def include_steps? def include_steps?
!include_completed? !include_completed?
end end
def include_categories?
object.needs_categories
end
def include_groups?
object.needs_groups
end
def uncategorized_category_id
SiteSetting.uncategorized_category_id
end
def include_uncategorized_category_id?
object.needs_categories
end
def categories
object.categories.map { |c| c.to_h }
end
end end

Datei anzeigen

@ -1,62 +0,0 @@
<html>
<head>
<%= discourse_color_scheme_stylesheets %>
<%= discourse_stylesheet_link_tag :wizard, theme_id: nil %>
<%= discourse_stylesheet_link_tag :wizard_custom %>
<%- if wizard_theme_id.present? %>
<%= discourse_stylesheet_link_tag (mobile_view? ? :mobile_theme : :desktop_theme), theme_id: wizard_theme_id %>
<%- end %>
<%= preload_script "locales/#{I18n.locale}" %>
<%= preload_script "ember_jquery" %>
<%= preload_script "wizard-vendor" %>
<%= preload_script "wizard-custom" %>
<%= preload_script "wizard-raw-templates" %>
<%= preload_script "wizard-plugin" %>
<%= preload_script "pretty-text-bundle" %>
<%= preload_script_url ExtraLocalesController.url("wizard") %>
<%= csrf_meta_tags %>
<%- unless customization_disabled? %>
<%= wizard_theme_translations_lookup %>
<%= raw wizard_theme_lookup("head_tag") %>
<%- end %>
<%= server_plugin_outlet "custom_wizard" %>
<%= tag.meta id: 'data-discourse-setup', data: client_side_setup_data %>
<meta name="discourse_theme_id" content="<%= wizard_theme_id %>">
<meta name="discourse-base-uri" content="<%= Discourse.base_path %>">
<%= render partial: "layouts/head" %>
<title><%= wizard_page_title %></title>
</head>
<body class='custom-wizard wizard'>
<%- unless customization_disabled? %>
<%= raw wizard_theme_lookup("header") %>
<%- end %>
<div id='custom-wizard-main'></div>
<%- unless customization_disabled? %>
<%= raw wizard_theme_lookup("body_tag") %>
<%- end %>
<%- if current_user %>
<%= preload_script 'wizard-custom-start' %>
<%- else %>
<%= preload_script 'wizard-custom-guest' %>
<%- end %>
<div id="svg-sprites" style="display:none;">
<div class="fontawesome">
<%= raw SvgSprite.bundle %>
</div>
</div>
<div class="hidden" id="data-preloaded-wizard" data-preloaded-wizard="<%= preloaded_json %>"></div>
</body>
</html>

Datei anzeigen

@ -34,7 +34,7 @@ export default ComposerEditor.extend({
if (this.siteSettings.enable_mentions) { if (this.siteSettings.enable_mentions) {
$input.autocomplete({ $input.autocomplete({
template: findRawTemplate("user-selector-autocomplete"), template: findRawTemplate("user-selector-autocomplete"),
dataSource: (term) => this.userSearchTerm.call(this, term), dataSource: (term) => this._userSearchTerm.call(this, term),
key: "@", key: "@",
transformComplete: (v) => v.username || v.name, transformComplete: (v) => v.username || v.name,
afterComplete: (value) => { afterComplete: (value) => {

Datei anzeigen

@ -1,8 +1,13 @@
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard"; import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
import I18n from "I18n"; import I18n from "I18n";
import Route from "@ember/routing/route"; import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
titleToken() {
const wizard = this.modelFor('custom-wizard');
return wizard ? (wizard.name || wizard.id) : I18n.t('wizard.custom_title');
},
export default Route.extend({
beforeModel(transition) { beforeModel(transition) {
if (transition.intent.queryParams) { if (transition.intent.queryParams) {
this.set("queryParams", transition.intent.queryParams); this.set("queryParams", transition.intent.queryParams);

Datei anzeigen

@ -4,4 +4,3 @@
maximum=field.limit maximum=field.limit
onChange=(action (mut categories)) onChange=(action (mut categories))
tabindex=field.tabindex}} tabindex=field.tabindex}}

Datei anzeigen

@ -1,5 +1,5 @@
{{custom-wizard-group-selector {{custom-wizard-group-selector
groups=wizard.groups groups=site.groups
field=field field=field
whitelist=field.content whitelist=field.content
value=field.value value=field.value

Datei anzeigen

@ -1,175 +1,172 @@
img.avatar { body.custom-wizard {
border-radius: 50%; div.ac-wrap {
vertical-align: middle; box-sizing: border-box;
}
div.ac-wrap {
box-sizing: border-box;
position: relative;
overflow: visible;
max-height: 150px;
min-height: 34px;
background-color: var(--secondary);
border: 1px solid var(--primary-medium);
padding: 5px;
div.item {
float: left;
margin-bottom: 4px;
margin-right: 10px;
line-height: 1.6;
span {
height: 24px;
display: inline-block;
line-height: 20px;
}
}
.ac-collapsed-button {
float: left;
border-radius: 20px;
position: relative; position: relative;
top: -2px; overflow: visible;
margin-right: 10px; max-height: 150px;
} min-height: 34px;
input[type="text"] {
border: 0;
}
.remove-link {
margin-left: 4px;
font-size: $font-down-1;
line-height: $line-height-small;
padding: 1px 3.5px;
border-radius: 12px;
box-sizing: border-box;
border: 1px solid var(--primary-low);
&:hover {
background-color: var(--danger-low);
border: 1px solid var(--danger-medium);
text-decoration: none;
color: var(--danger);
}
}
.ac-loading {
position: absolute;
top: 7px;
right: 5px;
}
input {
margin-bottom: 0;
}
.autocomplete {
z-index: 999999;
position: absolute;
width: inherit;
max-width: 240px;
box-sizing: border-box;
background-color: var(--secondary); background-color: var(--secondary);
border: 1px solid var(--primary-low); border: 1px solid var(--primary-medium);
padding: 5px;
li, div.item {
.no-results { float: left;
padding: 10px; margin-bottom: 4px;
margin-right: 10px;
line-height: 1.6;
span {
height: 24px;
display: inline-block;
line-height: 20px;
}
} }
ul { .ac-collapsed-button {
list-style: none; float: left;
padding: 0; border-radius: 20px;
margin: 0; position: relative;
top: -2px;
margin-right: 10px;
}
li { input[type="text"] {
.d-users { border: 0;
color: var(--primary-medium); }
padding: 0 2px;
}
border-bottom: 1px solid var(--primary-low); .remove-link {
margin-left: 4px;
font-size: $font-down-1;
line-height: $line-height-small;
padding: 1px 3.5px;
border-radius: 12px;
box-sizing: border-box;
border: 1px solid var(--primary-low);
a { &:hover {
padding: 5px; background-color: var(--danger-low);
display: block; border: 1px solid var(--danger-medium);
white-space: nowrap; text-decoration: none;
overflow: hidden; color: var(--danger);
text-overflow: ellipsis; }
font-size: 14px; }
text-decoration: none;
color: var(--primary);
img { .ac-loading {
margin-right: 5px; position: absolute;
top: 7px;
right: 5px;
}
input {
margin-bottom: 0;
}
.autocomplete {
z-index: 999999;
position: absolute;
width: inherit;
max-width: 240px;
box-sizing: border-box;
background-color: var(--secondary);
border: 1px solid var(--primary-low);
li,
.no-results {
padding: 10px;
}
ul {
list-style: none;
padding: 0;
margin: 0;
li {
.d-users {
color: var(--primary-medium);
padding: 0 2px;
} }
span.username { border-bottom: 1px solid var(--primary-low);
a {
padding: 5px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
text-decoration: none;
color: var(--primary); color: var(--primary);
vertical-align: middle;
}
span.name { img {
font-size: $font-down-1; margin-right: 5px;
vertical-align: middle; }
margin-left: 5px;
color: var(--primary);
}
&.selected { span.username {
background-color: var(--tertiary); color: var(--primary);
vertical-align: middle;
}
span.username,
span.name { span.name {
color: var(--secondary); font-size: $font-down-1;
vertical-align: middle;
margin-left: 5px;
color: var(--primary);
}
&.selected {
background-color: var(--tertiary);
span.username,
span.name {
color: var(--secondary);
}
}
&:hover:not(.selected) {
background-color: var(--highlight-low);
text-decoration: none;
} }
} }
}
}
&:hover:not(.selected) { ul > label {
background-color: var(--highlight-low); margin: 5px 0;
text-decoration: none; padding: 0 5px;
} font-size: 80%;
line-height: 1.4em;
a {
text-decoration: underline;
} }
} }
} }
}
ul > label { .ac-form-result {
margin: 5px 0; cursor: pointer;
padding: 0 5px; background-color: var(--secondary);
font-size: 80%; display: flex;
line-height: 1.4em;
a { &:hover,
text-decoration: underline; &.selected {
background-color: var(--tertiary);
color: white;
label {
color: white;
} }
} }
}
}
.ac-form-result {
cursor: pointer;
background-color: var(--secondary);
display: flex;
&:hover,
&.selected {
background-color: var(--tertiary);
color: white;
label { label {
color: white; flex: 1 1 auto;
margin-bottom: 0;
cursor: pointer;
}
i {
margin-right: 5px;
} }
} }
label {
flex: 1 1 auto;
margin-bottom: 0;
cursor: pointer;
}
i {
margin-right: 5px;
}
} }

Datei anzeigen

@ -1,130 +1,132 @@
.badge-wrapper { body.custom-wizard {
font-size: $font-down-1; .badge-wrapper {
font-weight: bold; font-size: $font-down-1;
white-space: nowrap; font-weight: bold;
position: relative; white-space: nowrap;
display: inline-flex; position: relative;
align-items: baseline;
.badge-category {
display: inline-flex; display: inline-flex;
align-items: baseline; align-items: baseline;
.category-name { .badge-category {
text-overflow: ellipsis; display: inline-flex;
overflow: hidden; align-items: baseline;
}
.d-icon { .category-name {
margin-right: 3px; text-overflow: ellipsis;
width: 0.74em; overflow: hidden;
height: 0.74em; }
color: inherit;
}
}
&.bullet { .d-icon {
margin-right: 8px; margin-right: 3px;
width: 0.74em;
span.badge-category { height: 0.74em;
color: var(--primary-high); color: inherit;
overflow: hidden;
text-overflow: ellipsis;
.extra-info-wrapper & {
color: var(--header_primary);
} }
} }
.badge-category-parent-bg, &.bullet {
.badge-category-bg { margin-right: 8px;
flex: 0 0 auto;
width: 9px;
height: 9px;
margin-right: 5px;
display: inline-block;
}
.badge-category-parent-bg { span.badge-category {
width: 5px; color: var(--primary-high);
margin-right: 0; overflow: hidden;
+ .badge-category-bg { text-overflow: ellipsis;
width: 5px; .extra-info-wrapper & {
} color: var(--header_primary);
}
.d-icon {
color: var(--primary-medium);
}
}
&.box {
margin-right: 5px;
padding: 2px 4px 2px 4px;
display: inline-flex;
span {
overflow: hidden;
text-overflow: ellipsis;
&.badge-category-bg,
&.badge-category-parent-bg {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
&.badge-category-parent-bg {
width: calc(100% - 5px);
& + .badge-category-bg {
left: 5px;
width: calc(100% - 5px);
& + .badge-category {
margin-left: 5px;
}
} }
} }
&.badge-category { .badge-category-parent-bg,
position: relative; .badge-category-bg {
flex: 0 0 auto;
width: 9px;
height: 9px;
margin-right: 5px;
display: inline-block;
}
.badge-category-parent-bg {
width: 5px;
margin-right: 0;
+ .badge-category-bg {
width: 5px;
}
}
.d-icon {
color: var(--primary-medium);
} }
} }
+ .topic-header-extra { &.box {
margin-right: 5px;
padding: 2px 4px 2px 4px; padding: 2px 4px 2px 4px;
display: inline-flex;
span {
overflow: hidden;
text-overflow: ellipsis;
&.badge-category-bg,
&.badge-category-parent-bg {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
&.badge-category-parent-bg {
width: calc(100% - 5px);
& + .badge-category-bg {
left: 5px;
width: calc(100% - 5px);
& + .badge-category {
margin-left: 5px;
}
}
}
&.badge-category {
position: relative;
}
}
+ .topic-header-extra {
padding: 2px 4px 2px 4px;
}
} }
}
&.bar { &.bar {
margin-right: 5px; margin-right: 5px;
span.badge-category { span.badge-category {
color: var(--primary-high);
padding: 1px 3px;
overflow: hidden;
text-overflow: ellipsis;
.extra-info-wrapper & {
color: var(--header_primary);
}
}
.badge-category-parent-bg,
.badge-category-bg {
display: inline-block;
padding: 0 1px;
&:before {
content: "\a0";
}
}
}
&.none {
color: var(--primary-high); color: var(--primary-high);
padding: 1px 3px; margin-right: 5px;
overflow: hidden;
text-overflow: ellipsis;
.extra-info-wrapper & {
color: var(--header_primary);
}
} }
.badge-category-parent-bg,
.badge-category-bg {
display: inline-block;
padding: 0 1px;
&:before {
content: "\a0";
}
}
}
&.none {
color: var(--primary-high);
margin-right: 5px;
} }
} }

Datei anzeigen

@ -1,90 +1,65 @@
input { body.custom-wizard {
display: inline-block; input {
padding: 4px 10px;
margin-bottom: 9px;
font-size: 1em;
line-height: 1;
color: var(--primary);
background-color: var(--secondary);
border: 1px solid var(--primary-medium);
border-radius: 0;
box-sizing: border-box;
}
textarea {
height: auto;
background-color: var(--secondary);
border: 1px solid var(--primary-medium);
&:focus {
border-color: var(--tertiary);
box-shadow: shadow("focus");
outline: 0;
}
}
input,
select,
textarea {
color: var(--primary);
caret-color: currentColor;
&[class*="span"] {
float: none;
margin-left: 0;
}
&[disabled],
&[readonly] {
cursor: not-allowed;
background-color: var(--primary-low);
border-color: var(--primary-low);
}
&:focus:required:invalid {
color: var(--danger);
border-color: var(--danger);
}
&:focus:required:invalid:focus {
border-color: var(--danger);
box-shadow: shadow("focus-danger");
}
&[type="checkbox"] {
margin-bottom: 0;
margin-right: 10px;
}
}
.spinner {
margin: 20px auto 20px auto;
position: relative;
-webkit-animation: rotate-forever 1s infinite linear;
animation: rotate-forever 1s infinite linear;
height: 30px;
width: 30px;
border: 4px solid var(--primary-low-mid);
border-right-color: transparent;
border-radius: 50%;
&.small {
width: 10px;
height: 10px;
margin: 0;
display: inline-block; display: inline-block;
padding: 4px 10px;
margin-bottom: 9px;
font-size: 1em;
line-height: 1;
color: var(--primary);
background-color: var(--secondary);
border: 1px solid var(--primary-medium);
border-radius: 0;
box-sizing: border-box;
} }
}
@keyframes rotate-forever { textarea {
0% { height: auto;
transform: rotate(0deg); background-color: var(--secondary);
} border: 1px solid var(--primary-medium);
100% {
transform: rotate(360deg);
}
}
.body-length { &:focus {
text-align: right; border-color: var(--tertiary);
box-shadow: shadow("focus");
outline: 0;
}
}
input,
select,
textarea {
color: var(--primary);
caret-color: currentColor;
width: 100%;
&[class*="span"] {
float: none;
margin-left: 0;
}
&[disabled],
&[readonly] {
cursor: not-allowed;
background-color: var(--primary-low);
border-color: var(--primary-low);
}
&:focus:required:invalid {
color: var(--danger);
border-color: var(--danger);
}
&:focus:required:invalid:focus {
border-color: var(--danger);
box-shadow: shadow("focus-danger");
}
&[type="checkbox"] {
margin-bottom: 0;
margin-right: 10px;
}
}
.body-length {
text-align: right;
}
} }

Datei anzeigen

@ -1,88 +1,90 @@
.wizard-btn { body.custom-wizard {
border-radius: 2px; .wizard-btn {
font-size: var(--font-0); border-radius: 2px;
border: 0; font-size: var(--font-0);
padding: 0.5em; border: 0;
transition: background-color 0.3s; padding: 0.5em;
margin-right: 0.5em; transition: background-color 0.3s;
text-decoration: none; margin-right: 0.5em;
background-color: var(--secondary); text-decoration: none;
color: var(--primary-very-high); background-color: var(--secondary);
box-shadow: 0 1px 4px rgba(var(--always-black-rgb), 0.4); color: var(--primary-very-high);
cursor: pointer; box-shadow: 0 1px 4px rgba(var(--always-black-rgb), 0.4);
cursor: pointer;
&.small { &.small {
padding: 0.25em 0.5em; padding: 0.25em 0.5em;
font-size: var(--font-down-1); font-size: var(--font-down-1);
}
&:hover,
&:focus {
background-color: var(--primary-low);
}
&:active {
background-color: var(--primary-low-mid);
}
&:disabled,
&.disabled {
background-color: var(--primary-medium);
}
.d-icon-chevron-right {
margin-left: 0.25em;
font-size: 0.8em;
}
.d-icon-chevron-left {
margin-right: 0.25em;
font-size: 0.8em;
}
} }
&:hover, .wizard-btn.primary {
&:focus { background-color: var(--tertiary);
background-color: var(--primary-low); color: var(--secondary);
box-shadow: 0 1px 4px rgba(var(--always-black-rgb), 0.6);
&:hover,
&:focus {
background-color: var(--tertiary-hover);
}
&:active {
background-color: var(--tertiary-high);
}
&:disabled {
background-color: var(--tertiary-low);
}
} }
&:active { .wizard-btn.danger {
background-color: var(--primary-low-mid); background-color: var(--danger);
color: var(--secondary);
&:hover,
&:focus {
background-color: var(--danger-hover);
}
&:active {
background-color: var(--danger-medium);
}
&:disabled {
background-color: var(--danger-low);
}
} }
&:disabled, .action-link {
&.disabled { margin-right: 1em;
background-color: var(--primary-medium); text-decoration: none;
} color: var(--tertiary);
.d-icon-chevron-right { &:hover {
margin-left: 0.25em; color: var(--tertiary-hover);
font-size: 0.8em; }
}
.d-icon-chevron-left {
margin-right: 0.25em;
font-size: 0.8em;
}
}
.wizard-btn.primary {
background-color: var(--tertiary);
color: var(--secondary);
box-shadow: 0 1px 4px rgba(var(--always-black-rgb), 0.6);
&:hover,
&:focus {
background-color: var(--tertiary-hover);
}
&:active {
background-color: var(--tertiary-high);
}
&:disabled {
background-color: var(--tertiary-low);
}
}
.wizard-btn.danger {
background-color: var(--danger);
color: var(--secondary);
&:hover,
&:focus {
background-color: var(--danger-hover);
}
&:active {
background-color: var(--danger-medium);
}
&:disabled {
background-color: var(--danger-low);
}
}
.action-link {
margin-right: 1em;
text-decoration: none;
color: var(--tertiary);
&:hover {
color: var(--tertiary-hover);
} }
} }

Datei anzeigen

@ -1,280 +1,282 @@
.d-editor-container { body.custom-wizard {
display: flex; .d-editor-container {
flex-grow: 1; display: flex;
max-width: 100%; flex-grow: 1;
} max-width: 100%;
.d-editor-overlay {
position: absolute;
background-color: black;
opacity: 0.8;
z-index: z("modal", "overlay");
}
.d-editor-modals {
position: absolute;
z-index: z("modal", "content");
}
.d-editor {
display: flex;
flex-grow: 1;
min-height: 0;
}
.d-editor .d-editor-modal {
min-width: 400px;
position: absolute;
background-color: var(--secondary);
border: 1px solid var(--primary);
padding: 1em;
top: 25px;
@media screen and (max-width: 424px) {
min-width: 300px;
} }
input { .d-editor-overlay {
width: 95%; position: absolute;
} background-color: black;
h3 { opacity: 0.8;
margin-bottom: 0.5em; z-index: z("modal", "overlay");
}
}
.wizard-field-composer .wmd-controls {
position: relative;
}
.wizard-field-composer.show-preview .d-editor-textarea-column {
display: none;
}
.d-editor-textarea-wrapper,
.d-editor-preview-wrapper {
background-color: var(--secondary);
border: 1px solid var(--primary-medium);
flex: 1;
max-width: unset;
}
.d-editor-textarea-wrapper {
display: flex;
flex-direction: column;
position: relative;
textarea {
background: transparent;
}
}
.d-editor-preview-wrapper {
display: flex;
flex-direction: column;
margin-left: 0;
overflow: auto;
cursor: default;
margin-top: unset;
padding-top: unset;
}
.d-editor-button-bar {
display: flex;
align-items: center;
border-bottom: none;
min-height: 30px;
padding-left: 3px;
border-bottom: 1px solid var(--primary-low);
button {
background-color: transparent;
color: var(--primary);
} }
.btn:not(.no-text) { .d-editor-modals {
font-size: 1.1487em; position: absolute;
z-index: z("modal", "content");
} }
.btn.bold { .d-editor {
font-weight: bolder; display: flex;
flex-grow: 1;
min-height: 0;
} }
.btn.italic { .d-editor .d-editor-modal {
font-style: italic; min-width: 400px;
position: absolute;
background-color: var(--secondary);
border: 1px solid var(--primary);
padding: 1em;
top: 25px;
@media screen and (max-width: 424px) {
min-width: 300px;
}
input {
width: 95%;
}
h3 {
margin-bottom: 0.5em;
}
} }
}
.d-editor-spacer { .wizard-field-composer .wmd-controls {
width: 1px; position: relative;
height: 20px;
margin: 0 5px;
display: inline-block;
}
.d-editor-input,
.d-editor-preview {
box-sizing: border-box;
flex: 1 1 100%;
width: 100%;
margin: 0;
min-height: auto;
word-wrap: break-word;
-webkit-appearance: none;
border-radius: 0;
&:focus {
box-shadow: none;
border: 0;
outline: 0;
} }
}
.d-editor-input { .wizard-field-composer.show-preview .d-editor-textarea-column {
border: 0; display: none;
padding: 10px; }
height: unset; // overrides core css
overflow-x: hidden;
resize: none;
}
.d-editor-preview { .d-editor-textarea-wrapper,
height: auto; .d-editor-preview-wrapper {
padding: 10px; background-color: var(--secondary);
} border: 1px solid var(--primary-medium);
flex: 1;
max-width: unset;
}
.d-editor-plugin { .d-editor-textarea-wrapper {
display: flex; display: flex;
flex: 1 1; flex-direction: column;
overflow: auto; position: relative;
}
.composing-whisper .d-editor-preview { textarea {
font-style: italic; background: transparent;
color: var(--primary) !important; }
} }
.d-editor-preview > *:first-child { .d-editor-preview-wrapper {
margin-top: 0; display: flex;
} flex-direction: column;
margin-left: 0;
overflow: auto;
cursor: default;
margin-top: unset;
padding-top: unset;
}
.hide-preview .d-editor-preview-wrapper { .d-editor-button-bar {
display: none; display: flex;
flex: 0; align-items: center;
} border-bottom: none;
min-height: 30px;
padding-left: 3px;
border-bottom: 1px solid var(--primary-low);
//// button {
background-color: transparent;
color: var(--primary);
}
.d-editor { .btn:not(.no-text) {
min-height: 200px; font-size: 1.1487em;
}
.btn.bold {
font-weight: bolder;
}
.btn.italic {
font-style: italic;
}
}
.d-editor-spacer {
width: 1px;
height: 20px;
margin: 0 5px;
display: inline-block;
}
.d-editor-input,
.d-editor-preview {
box-sizing: border-box;
flex: 1 1 100%;
width: 100%;
margin: 0;
min-height: auto;
word-wrap: break-word;
-webkit-appearance: none;
border-radius: 0;
&:focus {
box-shadow: none;
border: 0;
outline: 0;
}
}
.d-editor-input { .d-editor-input {
resize: vertical; border: 0;
flex: initial; padding: 10px;
height: unset; // overrides core css
overflow-x: hidden;
resize: none;
} }
textarea { .d-editor-preview {
min-height: calc(200px - 32px); height: auto;
padding: 10px;
} }
}
.d-editor-modal.hidden { .d-editor-plugin {
display: none; display: flex;
} flex: 1 1;
overflow: auto;
}
.d-editor-button-bar .btn { .composing-whisper .d-editor-preview {
border: none; font-style: italic;
font-size: 0.9em; color: var(--primary) !important;
} }
.wizard-composer-upload { .d-editor-preview > *:first-child {
display: none;
}
.wizard-composer-hyperlink {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(var(--primary-rgb), 0.8);
}
.wizard-composer-hyperlink-contents {
background-color: var(--secondary);
padding: 20px;
h3 {
margin-top: 0; margin-top: 0;
} }
.composer-link-url, .hide-preview .d-editor-preview-wrapper {
.composer-link-name { display: none;
display: block; flex: 0;
min-width: 450px;
}
}
.hide-hyperlink-box,
.add-link {
display: inline;
}
#file-uploading {
position: absolute;
bottom: 1px;
right: 1px;
padding: 10px;
background-color: var(--secondary);
}
.bottom-bar {
display: flex;
justify-content: space-between;
margin-top: 20px;
align-items: center;
}
// Markdown table styles for wizard composer preview
.cooked,
.d-editor-preview {
a.mention {
display: inline-block; // https://bugzilla.mozilla.org/show_bug.cgi?id=1656119
font-weight: bold;
font-size: 0.93em;
color: var(--primary-high-or-secondary-low);
padding: 0 4px 1px;
background: var(--primary-low);
border-radius: 8px;
} }
table { ////
border-collapse: collapse;
tr { .d-editor {
border-bottom: 1px solid var(--primary-low); min-height: 200px;
&.highlighted {
animation: background-fade-highlight 2.5s ease-out; .d-editor-input {
resize: vertical;
flex: initial;
}
textarea {
min-height: calc(200px - 32px);
}
}
.d-editor-modal.hidden {
display: none;
}
.d-editor-button-bar .btn {
border: none;
font-size: 0.9em;
}
.wizard-composer-upload {
display: none;
}
.wizard-composer-hyperlink {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(var(--primary-rgb), 0.8);
}
.wizard-composer-hyperlink-contents {
background-color: var(--secondary);
padding: 20px;
h3 {
margin-top: 0;
}
.composer-link-url,
.composer-link-name {
display: block;
min-width: 450px;
}
}
.hide-hyperlink-box,
.add-link {
display: inline;
}
#file-uploading {
position: absolute;
bottom: 1px;
right: 1px;
padding: 10px;
background-color: var(--secondary);
}
.bottom-bar {
display: flex;
justify-content: space-between;
margin-top: 20px;
align-items: center;
}
// Markdown table styles for wizard composer preview
.cooked,
.d-editor-preview {
a.mention {
display: inline-block; // https://bugzilla.mozilla.org/show_bug.cgi?id=1656119
font-weight: bold;
font-size: 0.93em;
color: var(--primary-high-or-secondary-low);
padding: 0 4px 1px;
background: var(--primary-low);
border-radius: 8px;
}
table {
border-collapse: collapse;
tr {
border-bottom: 1px solid var(--primary-low);
&.highlighted {
animation: background-fade-highlight 2.5s ease-out;
}
}
thead {
th {
text-align: left;
padding: 0.5em;
font-weight: bold;
color: var(--primary);
}
}
tbody {
border-top: 3px solid var(--primary-low);
}
td {
padding: 3px 3px 3px 0.5em;
} }
} }
thead {
th {
text-align: left;
padding: 0.5em;
font-weight: bold;
color: var(--primary);
}
}
tbody {
border-top: 3px solid var(--primary-low);
}
td {
padding: 3px 3px 3px 0.5em;
}
} }
} }

Datei anzeigen

@ -1,514 +1,514 @@
// event form body.custom-wizard {
.event-form {
width: 585px;
max-width: 80vw;
.event-form { .control {
width: 585px; display: inline-flex;
max-width: 80vw; align-items: flex-start;
min-height: 30px;
margin-right: 20px;
.control { > input:first-child {
display: inline-flex; margin-top: 10px !important;
align-items: flex-start; }
min-height: 30px;
margin-right: 20px;
> input:first-child { > span:first-child {
margin-top: 10px !important; margin-top: 5px !important;
} }
> span:first-child { > input + span {
margin-top: 5px !important; margin-top: 5px;
} }
> input + span { &:last-of-type {
margin-top: 5px; margin-right: 0;
} }
&:last-of-type { input[type="checkbox"] {
margin-right: 0; margin: 0 10px 0 0;
} }
input[type="checkbox"] { input[type="number"] {
margin: 0 10px 0 0; width: 50px;
} margin: 0;
min-height: 34px;
border: 1px solid #e9e9e9;
}
input[type="number"] { &.full-width {
width: 50px; flex: 1;
margin: 0; }
min-height: 34px;
border: 1px solid #e9e9e9;
}
&.full-width { .select-kit,
flex: 1; .ac-wrap {
} width: 100% !important;
max-width: 330px;
}
.select-kit, .select-kit-body {
.ac-wrap { width: 100% !important;
width: 100% !important; max-width: 330px;
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: var(--primary-low);
background-image: initial;
background: initial;
box-shadow: initial;
cursor: default;
pointer-events: none;
}
input,
.pika-lendar {
border: 1px solid var(--primary-low) !important;
}
} }
} }
.set-all-day { .event-controls {
font-size: 1.2em; margin-bottom: 20px;
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; display: flex;
flex-direction: row; align-items: flex-start;
}
.date-area { .datetime-controls {
order: 1; display: flex;
margin-bottom: 5px;
.date-time-card {
width: 270px;
display: inline-block;
text-align: left;
} }
.time-area { .start-card {
order: 2; border-left: 1px solid transparent;
margin-left: 10px; padding-right: 20px;
}
.modal-time { .end-card {
width: 127px; 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: var(--primary-low);
background-image: initial;
background: initial;
box-shadow: initial;
cursor: default;
pointer-events: none;
}
input,
.pika-lendar {
border: 1px solid var(--primary-low) !important;
}
} }
} }
input { .set-all-day {
padding: 4px 10px; font-size: 1.2em;
font-size: 1em; padding-bottom: 13px;
line-height: 1; }
color: var(--primary);
border: 1px solid var(--primary-medium); .sub-title {
min-height: 30px; font-size: 1.2em;
width: 130px; font-weight: bold;
margin: 10px 0; 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: var(--primary);
border: 1px solid var(--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 var(--primary-medium);
padding: 14px;
margin: 0;
float: none;
width: auto;
}
} }
} }
#date-container-start, .rsvp-controls {
#date-container-end { .rsvp-container {
height: 250px; 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: var(--primary) !default;
$pd-title-color: var(--primary) !default;
$pd-title-bg: var(--secondary) !default;
$pd-picker-bg: var(--secondary) !default;
$pd-picker-border: var(--primary-low) !default;
$pd-picker-border-bottom: var(--primary-low) !default;
$pd-picker-shadow: rgba(0, 0, 0, 0.5) !default;
$pd-th-color: var(--primary) !default;
$pd-day-color: var(--primary) !default;
$pd-day-bg: var(--secondary) !default;
$pd-day-hover-color: var(--primary) !default;
$pd-day-hover-bg: var(--tertiary-low) !default;
$pd-day-today-color: var(--tertiary) !default;
$pd-day-selected-color: var(--secondary) !default;
$pd-day-selected-bg: var(--tertiary) !default;
$pd-day-selected-shadow: var(--tertiary-low) !default;
$pd-day-disabled-color: var(--primary) !default;
$pd-week-color: var(--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;
} }
.ui-timepicker-input { &.is-bound {
width: 105px; 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: 0.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: 0.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; text-align: center;
} }
.pika-single { abbr {
position: relative !important; border-bottom: none;
border: none; cursor: help;
z-index: 100;
.pika-lendar {
border: 1px solid var(--primary-medium);
padding: 14px;
margin: 0;
float: none;
width: auto;
}
} }
} }
.rsvp-controls { .pika-button {
.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: var(--primary) !default;
$pd-title-color: var(--primary) !default;
$pd-title-bg: var(--secondary) !default;
$pd-picker-bg: var(--secondary) !default;
$pd-picker-border: var(--primary-low) !default;
$pd-picker-border-bottom: var(--primary-low) !default;
$pd-picker-shadow: rgba(0, 0, 0, 0.5) !default;
$pd-th-color: var(--primary) !default;
$pd-day-color: var(--primary) !default;
$pd-day-bg: var(--secondary) !default;
$pd-day-hover-color: var(--primary) !default;
$pd-day-hover-bg: var(--tertiary-low) !default;
$pd-day-today-color: var(--tertiary) !default;
$pd-day-selected-color: var(--secondary) !default;
$pd-day-selected-bg: var(--tertiary) !default;
$pd-day-selected-shadow: var(--tertiary-low) !default;
$pd-day-disabled-color: var(--primary) !default;
$pd-week-color: var(--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; cursor: pointer;
position: absolute; display: block;
z-index: 9998; -moz-box-sizing: border-box;
box-sizing: border-box;
outline: none;
border: 0;
margin: 0; margin: 0;
left: 0; width: 100%;
top: 5px; padding: 5px;
filter: alpha(opacity=0); color: $pd-day-color;
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: 0.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: 0.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; font-size: 12px;
line-height: 25px; line-height: 15px;
font-weight: bold; text-align: right;
text-align: center; 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: 0.3;
}
&:hover {
color: $pd-day-hover-color;
background: $pd-day-hover-bg;
box-shadow: none;
border-radius: 3px;
}
} }
abbr { .pika-week {
border-bottom: none; font-size: 11px;
cursor: help; color: $pd-week-color;
}
}
.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 & { .is-inrange .pika-button {
color: $pd-day-selected-color; background: #d5e9f7;
font-weight: bold;
background: $pd-day-selected-bg;
box-shadow: inset 0 1px 3px $pd-day-selected-shadow;
border-radius: 3px;
} }
.is-disabled &, .is-startrange .pika-button {
.is-outside-current-month & { color: var(--secondary);
pointer-events: none; background: #6cb31d;
cursor: default;
color: $pd-day-disabled-color;
opacity: 0.3;
}
&:hover {
color: $pd-day-hover-color;
background: $pd-day-hover-bg;
box-shadow: none; box-shadow: none;
border-radius: 3px; border-radius: 3px;
} }
}
.pika-week { .is-endrange .pika-button {
font-size: 11px; color: var(--secondary);
color: $pd-week-color; background: var(--tertiary);
} box-shadow: none;
border-radius: 3px;
}
.is-inrange .pika-button { // timepicker
background: #d5e9f7;
}
.is-startrange .pika-button { .ui-timepicker-wrapper {
color: var(--secondary); overflow-y: auto;
background: #6cb31d; max-height: 150px;
box-shadow: none; width: 6.5em;
border-radius: 3px; 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;
}
.is-endrange .pika-button { .ui-timepicker-wrapper.ui-timepicker-with-duration {
color: var(--secondary); width: 13em;
background: var(--tertiary); }
box-shadow: none;
border-radius: 3px;
}
// timepicker .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-wrapper { .ui-timepicker-list {
overflow-y: auto; margin: 0;
max-height: 150px; padding: 0;
width: 6.5em; list-style: none;
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 { .ui-timepicker-duration {
width: 13em; margin-left: 5px;
} color: #888;
}
.ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30, .ui-timepicker-list:hover .ui-timepicker-duration {
.ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60 { color: #888;
width: 11em; }
}
.ui-timepicker-list { .ui-timepicker-list li {
margin: 0; padding: 3px 0 3px 5px;
padding: 0; cursor: pointer;
list-style: none; white-space: nowrap;
} color: #000;
list-style: none;
margin: 0;
}
.ui-timepicker-duration { .ui-timepicker-list:hover .ui-timepicker-selected {
margin-left: 5px; background: #fff;
color: #888; color: #000;
} }
.ui-timepicker-list:hover .ui-timepicker-duration { li.ui-timepicker-selected,
color: #888; .ui-timepicker-list li:hover,
} .ui-timepicker-list .ui-timepicker-selected:hover {
background: #1980ec;
color: #fff;
}
.ui-timepicker-list li { li.ui-timepicker-selected .ui-timepicker-duration,
padding: 3px 0 3px 5px; .ui-timepicker-list li:hover .ui-timepicker-duration {
cursor: pointer; color: #ccc;
white-space: nowrap; }
color: #000;
list-style: none;
margin: 0;
}
.ui-timepicker-list:hover .ui-timepicker-selected { .ui-timepicker-list li.ui-timepicker-disabled,
background: #fff; .ui-timepicker-list li.ui-timepicker-disabled:hover,
color: #000; .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled {
} color: #888;
cursor: default;
}
li.ui-timepicker-selected, .ui-timepicker-list li.ui-timepicker-disabled:hover,
.ui-timepicker-list li:hover, .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled {
.ui-timepicker-list .ui-timepicker-selected:hover { background: #f2f2f2;
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,5 @@
body.custom-wizard {
.d-header .panel {
display: none;
}
}

Datei anzeigen

@ -1,191 +1,193 @@
.location-form-instructions { body.custom-wizard {
color: #919191; .location-form-instructions {
margin: 5px 0; color: #919191;
font-size: 80%; margin: 5px 0;
line-height: 1.4em; font-size: 80%;
line-height: 1.4em;
a { a {
text-decoration: underline; text-decoration: underline;
} }
}
.location-form {
display: flex;
overflow: visible;
.title {
font-weight: 700;
} }
.address { .location-form {
padding-right: 20px; display: flex;
} overflow: visible;
.coordinates { .title {
.control-group { font-weight: 700;
display: block; }
.controls { .address {
display: flex; padding-right: 20px;
width: 100%; }
input { .coordinates {
width: 100px; .control-group {
display: block;
.controls {
display: flex;
width: 100%;
input {
width: 100px;
}
}
.icon {
margin-left: 10px;
display: inline-block;
} }
} }
.icon { .icon img {
margin-left: 10px; max-width: 30px;
display: inline-block;
} }
} }
.icon img { .address + .coordinates {
max-width: 30px; border-left: 1px solid var(--primary-low);
padding-left: 20px;
}
.control-group {
display: inline-block;
vertical-align: top;
margin-right: 20px;
margin-top: 10px;
width: auto;
.instructions {
@extend .location-form-instructions;
}
}
.location-search {
display: block;
margin: 15px 0;
}
.geo-map {
height: 400px;
} }
} }
.address + .coordinates { input.input-location,
border-left: 1px solid var(--primary-low); div.input-location {
padding-left: 20px; max-height: 150px;
} background-color: var(--secondary);
box-shadow: none;
.control-group {
display: inline-block;
vertical-align: top;
margin-right: 20px;
margin-top: 10px;
width: auto;
.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: var(--secondary);
box-shadow: none;
box-sizing: border-box;
margin: 0;
}
.input-location .select2-choice {
padding: 2px 5px;
}
.input-location.input-small {
width: 100px;
}
.location-selector-container {
position: relative;
.ac-wrap {
box-sizing: border-box; box-sizing: border-box;
margin: 0;
}
.ac-loading { .input-location .select2-choice {
position: absolute; padding: 2px 5px;
top: 7px; }
right: 5px;
}
.item { .input-location.input-small {
line-height: 1.6; width: 100px;
} }
.autocomplete { .location-selector-container {
width: inherit; position: relative;
left: 0 !important;
width: 100%; .ac-wrap {
top: 30px !important;
box-sizing: border-box; box-sizing: border-box;
li, .ac-loading {
.no-results { position: absolute;
padding: 10px; top: 7px;
right: 5px;
} }
ul > label { .item {
@extend .location-form-instructions; line-height: 1.6;
padding: 0 5px; }
.autocomplete {
width: inherit;
left: 0 !important;
width: 100%;
top: 30px !important;
box-sizing: border-box;
li,
.no-results {
padding: 10px;
}
ul > label {
@extend .location-form-instructions;
padding: 0 5px;
}
} }
} }
} }
}
.location-form-result { .location-form-result {
cursor: pointer; cursor: pointer;
background-color: var(--secondary); background-color: var(--secondary);
display: flex; display: flex;
&:hover, &:hover,
&.selected { &.selected {
background-color: var(--tertiary); background-color: var(--tertiary);
color: white; color: white;
label {
color: white;
}
}
label { label {
color: white; flex: 1 1 auto;
margin-bottom: 0;
cursor: pointer;
}
i {
margin-right: 5px;
} }
} }
label { .location-results {
flex: 1 1 auto; max-width: 550px;
margin-bottom: 0; position: relative;
cursor: pointer;
}
i { .spinner {
margin-right: 5px; position: absolute;
} right: 50%;
} top: 50%;
}
.location-results {
max-width: 550px; ul {
position: relative; background-color: var(--primary-very-low);
border: 1px solid #e9e9e9;
.spinner { margin: 0;
position: absolute; padding: 0;
right: 50%; list-style: none;
top: 50%; height: 95px;
} overflow: scroll;
}
ul {
background-color: var(--primary-very-low); li {
border: 1px solid #e9e9e9; padding: 6px 12px;
margin: 0; }
padding: 0;
list-style: none; .no-results {
height: 95px; padding: 15px;
overflow: scroll; }
}
.default {
li { margin: 0 auto;
padding: 6px 12px; top: 50%;
} transform: translateY(-50%);
position: absolute;
.no-results { width: 100%;
padding: 15px; text-align: center;
} color: #919191;
}
.default {
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
position: absolute;
width: 100%;
text-align: center;
color: #919191;
} }
} }

Datei anzeigen

@ -1,32 +1,34 @@
span.mentionable-item { body.custom-wizard {
font-weight: bold; span.mentionable-item {
} font-weight: bold;
}
a.mentionable-item span { a.mentionable-item span {
background-color: $primary-low; background-color: $primary-low;
padding: 3px; padding: 3px;
border-radius: 3px; border-radius: 3px;
color: $primary; color: $primary;
} }
.ac-mentionable-item ul li a { .ac-mentionable-item ul li a {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ac-mentionable-item-name { .ac-mentionable-item-name {
padding-left: 0.5em; padding-left: 0.5em;
} }
.ac-mentionable-item-image { .ac-mentionable-item-image {
width: 25px; width: 25px;
height: 25px; height: 25px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
img { img {
height: 100%; height: 100%;
object-fit: contain; object-fit: contain;
}
} }
} }

Datei anzeigen

@ -1,40 +1,42 @@
.similar-topics-validator { body.custom-wizard {
position: relative; .similar-topics-validator {
display: flex; position: relative;
display: flex;
label { label {
min-height: 20px; min-height: 20px;
}
}
.wizard-similar-topics {
margin-left: 3px;
ul {
background-color: var(--tertiary-low);
padding: 5px;
margin: 0;
list-style: none;
position: absolute;
left: 0;
top: 25px;
box-shadow: shadow("dropdown");
width: 100%;
box-sizing: border-box;
z-index: 100;
.title {
color: var(--primary);
}
.blurb {
margin-left: 0.5em;
color: var(--primary-high);
font-size: $font-down-1;
} }
} }
.show-topics { .wizard-similar-topics {
cursor: pointer; margin-left: 3px;
ul {
background-color: var(--tertiary-low);
padding: 5px;
margin: 0;
list-style: none;
position: absolute;
left: 0;
top: 25px;
box-shadow: shadow("dropdown");
width: 100%;
box-sizing: border-box;
z-index: 100;
.title {
color: var(--primary);
}
.blurb {
margin-left: 0.5em;
color: var(--primary-high);
font-size: $font-down-1;
}
}
.show-topics {
cursor: pointer;
}
} }
} }

Datei anzeigen

@ -16,7 +16,7 @@ body.custom-wizard {
width: 100%; width: 100%;
border: 1px solid var(--primary-low-mid); border: 1px solid var(--primary-low-mid);
border-radius: 5px; border-radius: 5px;
margin: 0 auto; margin: 0 auto 2.5em auto;
.wizard-field .input-area { .wizard-field .input-area {
margin: 0.5em 0; margin: 0.5em 0;
@ -144,12 +144,12 @@ body.custom-wizard {
.wizard-column .action-link { .wizard-column .action-link {
color: var(--tertiary); color: var(--tertiary);
} }
}
.no-access-gutter { .no-access-gutter {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
}
} }
/* IE11 hacks */ /* IE11 hacks */

Datei anzeigen

@ -1,5 +1,6 @@
@import "custom/base"; @import "custom/base";
@import "custom/wizard"; @import "custom/wizard";
@import "custom/header";
@import "custom/step"; @import "custom/step";
@import "custom/badges"; @import "custom/badges";
@import "custom/buttons"; @import "custom/buttons";

Datei anzeigen

@ -1,10 +1,9 @@
# frozen_string_literal: true # frozen_string_literal: true
CustomWizard::Engine.routes.draw do CustomWizard::Engine.routes.draw do
get 'qunit' => 'wizard#qunit' get ':wizard_id' => 'wizard#show'
get ':wizard_id' => 'wizard#index'
put ':wizard_id/skip' => 'wizard#skip' put ':wizard_id/skip' => 'wizard#skip'
get ':wizard_id/steps' => 'wizard#index' get ':wizard_id/steps' => 'wizard#show'
get ':wizard_id/steps/:step_id' => 'wizard#index' get ':wizard_id/steps/:step_id' => 'wizard#show'
put ':wizard_id/steps/:step_id' => 'steps#update' put ':wizard_id/steps/:step_id' => 'steps#update'
end end

Datei anzeigen

@ -120,18 +120,6 @@ class CustomWizard::Builder
params[:property] = field_template['property'] params[:property] = field_template['property']
end end
if field_template['type'] === 'category' || (
field_template['validations'] &&
field_template['validations']['similar_topics'] &&
field_template['validations']['similar_topics']['categories'].present?
)
@wizard.needs_categories = true
end
if field_template['type'] === 'group'
@wizard.needs_groups = true
end
if (content_inputs = field_template['content']).present? if (content_inputs = field_template['content']).present?
content = CustomWizard::Mapper.new( content = CustomWizard::Mapper.new(
inputs: content_inputs, inputs: content_inputs,

Datei anzeigen

@ -23,8 +23,6 @@ class CustomWizard::Wizard
:restart_on_revisit, :restart_on_revisit,
:resume_on_revisit, :resume_on_revisit,
:permitted, :permitted,
:needs_categories,
:needs_groups,
:steps, :steps,
:step_ids, :step_ids,
:field_ids, :field_ids,
@ -54,8 +52,6 @@ class CustomWizard::Wizard
@after_time_scheduled = attrs['after_time_scheduled'] @after_time_scheduled = attrs['after_time_scheduled']
@required = cast_bool(attrs['required']) @required = cast_bool(attrs['required'])
@permitted = attrs['permitted'] || nil @permitted = attrs['permitted'] || nil
@needs_categories = false
@needs_groups = false
@theme_id = attrs['theme_id'] @theme_id = attrs['theme_id']
if attrs['theme'].present? if attrs['theme'].present?
@ -243,14 +239,6 @@ class CustomWizard::Wizard
) )
end end
def categories
@categories ||= ::Site.new(Guardian.new(user)).categories
end
def groups
@groups ||= ::Site.new(Guardian.new(user)).groups
end
def update_step_ids def update_step_ids
@step_ids = steps.map(&:id) @step_ids = steps.map(&:id)
end end