diff --git a/assets/javascripts/wizard-custom.js b/assets/javascripts/wizard-custom.js
index 40bcfd9c..0bb16dba 100644
--- a/assets/javascripts/wizard-custom.js
+++ b/assets/javascripts/wizard-custom.js
@@ -84,6 +84,9 @@
//= require discourse/components/d-editor
//= require discourse/components/input-tip
//= 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/d-button
@@ -91,6 +94,7 @@
//= require discourse/templates/components/emoji-picker
//= require discourse/templates/category-tag-autocomplete
//= require discourse/templates/emoji-selector-autocomplete
+//= require discourse/templates/user-selector-autocomplete
//= require discourse/pre-initializers/sniff-capabilities
diff --git a/assets/javascripts/wizard/lib/jquery.timepicker.min.js b/assets/javascripts/wizard/lib/jquery.timepicker.min.js
new file mode 100644
index 00000000..6a7b5954
--- /dev/null
+++ b/assets/javascripts/wizard/lib/jquery.timepicker.min.js
@@ -0,0 +1,7 @@
+/*!
+ * jquery-timepicker v1.11.11 - A jQuery timepicker plugin inspired by Google Calendar. It supports both mouse and keyboard navigation.
+ * Copyright (c) 2017 Jon Thornton - http://jonthornton.github.com/jquery-timepicker/
+ * License: MIT
+ */
+
+!function(a){"object"==typeof exports&&exports&&"object"==typeof module&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){var b=a[0];return b.offsetWidth>0&&b.offsetHeight>0}function c(b){if(b.minTime&&(b.minTime=t(b.minTime)),b.maxTime&&(b.maxTime=t(b.maxTime)),b.durationTime&&"function"!=typeof b.durationTime&&(b.durationTime=t(b.durationTime)),"now"==b.scrollDefault)b.scrollDefault=function(){return b.roundingFunction(t(new Date),b)};else if(b.scrollDefault&&"function"!=typeof b.scrollDefault){var c=b.scrollDefault;b.scrollDefault=function(){return b.roundingFunction(t(c),b)}}else b.minTime&&(b.scrollDefault=function(){return b.roundingFunction(b.minTime,b)});if("string"===a.type(b.timeFormat)&&b.timeFormat.match(/[gh]/)&&(b._twelveHourTime=!0),b.showOnFocus===!1&&-1!=b.showOn.indexOf("focus")&&b.showOn.splice(b.showOn.indexOf("focus"),1),b.disableTimeRanges.length>0){for(var d in b.disableTimeRanges)b.disableTimeRanges[d]=[t(b.disableTimeRanges[d][0]),t(b.disableTimeRanges[d][1])];b.disableTimeRanges=b.disableTimeRanges.sort(function(a,b){return a[0]-b[0]});for(var d=b.disableTimeRanges.length-1;d>0;d--)b.disableTimeRanges[d][0]<=b.disableTimeRanges[d-1][1]&&(b.disableTimeRanges[d-1]=[Math.min(b.disableTimeRanges[d][0],b.disableTimeRanges[d-1][0]),Math.max(b.disableTimeRanges[d][1],b.disableTimeRanges[d-1][1])],b.disableTimeRanges.splice(d,1))}return b}function d(b){var c=b.data("timepicker-settings"),d=b.data("timepicker-list");if(d&&d.length&&(d.remove(),b.data("timepicker-list",!1)),c.useSelect){d=a("",{"class":"ui-timepicker-select"});var g=d}else{d=a("
",{"class":"ui-timepicker-list"});var g=a("",{"class":"ui-timepicker-wrapper",tabindex:-1});g.css({display:"none",position:"absolute"}).append(d)}if(c.noneOption)if(c.noneOption===!0&&(c.noneOption=c.useSelect?"Time...":"None"),a.isArray(c.noneOption)){for(var i in c.noneOption)if(parseInt(i,10)==i){var k=e(c.noneOption[i],c.useSelect);d.append(k)}}else{var k=e(c.noneOption,c.useSelect);d.append(k)}if(c.className&&g.addClass(c.className),(null!==c.minTime||null!==c.durationTime)&&c.showDuration){"function"==typeof c.step?"function":c.step;g.addClass("ui-timepicker-with-duration"),g.addClass("ui-timepicker-step-"+c.step)}var l=c.minTime;"function"==typeof c.durationTime?l=t(c.durationTime()):null!==c.durationTime&&(l=c.durationTime);var n=null!==c.minTime?c.minTime:0,o=null!==c.maxTime?c.maxTime:n+v-1;n>o&&(o+=v),o===v-1&&"string"===a.type(c.timeFormat)&&c.show2400&&(o=v);var p=c.disableTimeRanges,w=0,x=p.length,z=c.step;"function"!=typeof z&&(z=function(){return c.step});for(var i=n,A=0;o>=i;A++,i+=60*z(A)){var B=i,C=s(B,c);if(c.useSelect){var D=a("",{value:C});D.text(C)}else{var D=a("");D.addClass(v/2>B%v?"ui-timepicker-am":"ui-timepicker-pm"),D.data("time",u(B,c)),D.text(C)}if((null!==c.minTime||null!==c.durationTime)&&c.showDuration){var E=r(i-l,c.step);if(c.useSelect)D.text(D.text()+" ("+E+")");else{var F=a("",{"class":"ui-timepicker-duration"});F.text(" ("+E+")"),D.append(F)}}x>w&&(B>=p[w][1]&&(w+=1),p[w]&&B>=p[w][0]&&B",{value:f,"class":e,text:d}):a("",{"class":e,text:d}).data("time",String(f))}function f(a,b){return a=b.roundingFunction(a,b),null!==a?s(a,b):void 0}function g(b){if(b.target!=window){var c=a(b.target);c.closest(".ui-timepicker-input").length||c.closest(".ui-timepicker-wrapper").length||(y.hide(),a(document).unbind(".ui-timepicker"),a(window).unbind(".ui-timepicker"))}}function h(a){var b=a.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&b.disableTouchKeyboard}function i(b,c,d){if(!d&&0!==d)return!1;var e=b.data("timepicker-settings"),f=!1,d=e.roundingFunction(d,e);return c.find("li").each(function(b,c){var e=a(c);if("number"==typeof e.data("time"))return e.data("time")==d?(f=e,!1):void 0}),f}function j(a,b){b.find("li").removeClass("ui-timepicker-selected");var c=a.data("timepicker-settings"),d=t(l(a),c);if(null!==d){var e=i(a,b,d);if(e){var f=e.offset().top-b.offset().top;(f+e.outerHeight()>b.outerHeight()||0>f)&&b.scrollTop(b.scrollTop()+e.position().top-e.outerHeight()),(c.forceRoundTime||e.data("time")===d)&&e.addClass("ui-timepicker-selected")}}}function k(b,c){if("timepicker"!=c){var d=a(this);if(""===this.value)return void m(d,null,c);if(!d.is(":focus")||b&&"change"==b.type){var e=d.data("timepicker-settings"),f=t(this.value,e);if(null===f)return void d.trigger("timeFormatError");var g=!1;if(null!==e.minTime&&null!==e.maxTime&&(fe.maxTime)&&(g=!0),a.each(e.disableTimeRanges,function(){return f>=this[0]&&f0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")),!1;case 40:return f=e.find(".ui-timepicker-selected"),0===f.length?(e.find("li").each(function(b,c){return a(c).position().top>0?(f=a(c),!1):void 0}),f.addClass("ui-timepicker-selected")):f.is(":last-child")||(f.removeClass("ui-timepicker-selected"),f.next().addClass("ui-timepicker-selected"),f.next().position().top+2*f.outerHeight()>e.outerHeight()&&e.scrollTop(e.scrollTop()+f.outerHeight())),!1;case 27:e.find("li").removeClass("ui-timepicker-selected"),y.hide();break;case 9:y.hide();break;default:return!0}}function p(c){var d=a(this),e=d.data("timepicker-list"),f=d.data("timepicker-settings");if(!e||!b(e)||f.disableTextInput)return!0;if("paste"===c.type||"cut"===c.type)return void setTimeout(function(){f.typeaheadHighlight?j(d,e):e.hide()},0);switch(c.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:f.typeaheadHighlight?j(d,e):e.hide()}}function q(a){var b=a.data("timepicker-settings"),c=a.data("timepicker-list"),d=null,e=c.find(".ui-timepicker-selected");return e.hasClass("ui-timepicker-disabled")?!1:(e.length&&(d=e.data("time")),null!==d&&("string"!=typeof d&&(d=s(d,b)),m(a,d,"select")),!0)}function r(a,b){a=Math.abs(a);var c,d,e=Math.round(a/60),f=[];return 60>e?f=[e,w.mins]:(c=Math.floor(e/60),d=e%60,30==b&&30==d&&(c+=w.decimal+5),f.push(c),f.push(1==c?w.hr:w.hrs),30!=b&&d&&(f.push(d),f.push(w.mins))),f.join(" ")}function s(b,c){if("number"!=typeof b)return null;var d=parseInt(b%60),e=parseInt(b/60%60),f=parseInt(b/3600%24),g=new Date(1970,0,2,f,e,d,0);if(isNaN(g.getTime()))return null;if("function"===a.type(c.timeFormat))return c.timeFormat(g);for(var h,i,j="",k=0;k11?w.pm:w.am;break;case"A":j+=g.getHours()>11?w.PM:w.AM;break;case"g":h=g.getHours()%12,j+=0===h?"12":h;break;case"G":h=g.getHours(),b===v&&(h=c.show2400?24:0),j+=h;break;case"h":h=g.getHours()%12,0!==h&&10>h&&(h="0"+h),j+=0===h?"12":h;break;case"H":h=g.getHours(),b===v&&(h=c.show2400?24:0),j+=h>9?h:"0"+h;break;case"i":var e=g.getMinutes();j+=e>9?e:"0"+e;break;case"s":d=g.getSeconds(),j+=d>9?d:"0"+d;break;case"\\":k++,j+=c.timeFormat.charAt(k);break;default:j+=i}return j}function t(a,b){if(""===a||null===a)return null;if("object"==typeof a)return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds();if("string"!=typeof a)return a;a=a.toLowerCase().replace(/[\s\.]/g,""),("a"==a.slice(-1)||"p"==a.slice(-1))&&(a+="m");var c="("+w.am.replace(".","")+"|"+w.pm.replace(".","")+"|"+w.AM.replace(".","")+"|"+w.PM.replace(".","")+")?",d=new RegExp("^"+c+"([0-9]?[0-9])\\W?([0-5][0-9])?\\W?([0-5][0-9])?"+c+"$"),e=a.match(d);if(!e)return null;var f=parseInt(1*e[2],10),g=e[1]||e[5],h=f,i=1*e[3]||0,j=1*e[4]||0;if(12>=f&&g){var k=g==w.pm||g==w.PM;h=12==f?k?12:0:f+(k?12:0)}else if(b){var l=3600*f+60*i+j;if(l>=v+(b.show2400?1:0)){if(b.wrapHours===!1)return null;h=f%24}}var m=3600*h+60*i+j;if(12>f&&!g&&b&&b._twelveHourTime&&b.scrollDefault){var n=m-b.scrollDefault();0>n&&n>=v/-2&&(m=(m+v/2)%v)}return m}function u(a,b){return a==v&&b.show2400?a:a%v}var v=86400,w={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},x={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:function(a,b){if(null===a)return null;if("number"!=typeof b.step)return a;var c=a%(60*b.step),d=b.minTime||0;return c-=d%(60*b.step),c>=30*b.step?a+=60*b.step-c:a-=c,u(a,b)},scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0},y={init:function(b){return this.each(function(){var e=a(this),f=[];for(var g in x)e.data(g)&&(f[g]=e.data(g));var h=a.extend({},x,b,f);if(h.lang&&(w=a.extend(w,h.lang)),h=c(h),e.data("timepicker-settings",h),e.addClass("ui-timepicker-input"),h.useSelect)d(e);else{if(e.prop("autocomplete","off"),h.showOn)for(var i in h.showOn)e.on(h.showOn[i]+".timepicker",y.show);e.on("change.timepicker",k),e.on("keydown.timepicker",o),e.on("keyup.timepicker",p),h.disableTextInput&&e.on("keydown.timepicker",n),e.on("cut.timepicker",p),e.on("paste.timepicker",p),k.call(e.get(0),null,"initial")}})},show:function(c){var e=a(this),f=e.data("timepicker-settings");if(c&&c.preventDefault(),f.useSelect)return void e.data("timepicker-list").focus();h(e)&&e.blur();var k=e.data("timepicker-list");if(!e.prop("readonly")&&(k&&0!==k.length&&"function"!=typeof f.durationTime||(d(e),k=e.data("timepicker-list")),!b(k))){e.data("ui-timepicker-value",e.val()),j(e,k),y.hide(),k.show();var m={};f.orientation.match(/r/)?m.left=e.offset().left+e.outerWidth()-k.outerWidth()+parseInt(k.css("marginLeft").replace("px",""),10):m.left=e.offset().left+parseInt(k.css("marginLeft").replace("px",""),10);var n;n=f.orientation.match(/t/)?"t":f.orientation.match(/b/)?"b":e.offset().top+e.outerHeight(!0)+k.outerHeight()>a(window).height()+a(window).scrollTop()?"t":"b","t"==n?(k.addClass("ui-timepicker-positioned-top"),m.top=e.offset().top-k.outerHeight()+parseInt(k.css("marginTop").replace("px",""),10)):(k.removeClass("ui-timepicker-positioned-top"),m.top=e.offset().top+e.outerHeight()+parseInt(k.css("marginTop").replace("px",""),10)),k.offset(m);var o=k.find(".ui-timepicker-selected");if(!o.length){var p=t(l(e));null!==p?o=i(e,k,p):f.scrollDefault&&(o=i(e,k,f.scrollDefault()))}if((!o.length||o.hasClass("ui-timepicker-disabled"))&&(o=k.find("li:not(.ui-timepicker-disabled):first")),o&&o.length){var q=k.scrollTop()+o.position().top-o.outerHeight();k.scrollTop(q)}else k.scrollTop(0);return f.stopScrollPropagation&&a(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",function(b){b.preventDefault();var c=a(this).scrollTop();a(this).scrollTop(c+b.originalEvent.deltaY)}),a(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",g),a(window).on("resize.ui-timepicker",g),f.closeOnWindowScroll&&a(document).on("scroll.ui-timepicker",g),e.trigger("showTimepicker"),this}},hide:function(c){var d=a(this),e=d.data("timepicker-settings");return e&&e.useSelect&&d.blur(),a(".ui-timepicker-wrapper").each(function(){var c=a(this);if(b(c)){var d=c.data("timepicker-input"),e=d.data("timepicker-settings");e&&e.selectOnBlur&&q(d),c.hide(),d.trigger("hideTimepicker")}}),this},option:function(b,e){return"string"==typeof b&&"undefined"==typeof e?a(this).data("timepicker-settings")[b]:this.each(function(){var f=a(this),g=f.data("timepicker-settings"),h=f.data("timepicker-list");"object"==typeof b?g=a.extend(g,b):"string"==typeof b&&(g[b]=e),g=c(g),f.data("timepicker-settings",g),k.call(f.get(0),{type:"change"},"initial"),h&&(h.remove(),f.data("timepicker-list",!1)),g.useSelect&&d(f)})},getSecondsFromMidnight:function(){return t(l(this))},getTime:function(a){var b=this,c=l(b);if(!c)return null;var d=t(c);if(null===d)return null;a||(a=new Date);var e=new Date(a);return e.setHours(d/3600),e.setMinutes(d%3600/60),e.setSeconds(d%60),e.setMilliseconds(0),e},isVisible:function(){var a=this,c=a.data("timepicker-list");return!(!c||!b(c))},setTime:function(a){var b=this,c=b.data("timepicker-settings");if(c.forceRoundTime)var d=f(t(a),c);else var d=s(t(a),c);return a&&null===d&&c.noneOption&&(d=a),b.val(d),k.call(b.get(0),{type:"change"},"initial"),b.data("timepicker-list")&&j(b,b.data("timepicker-list")),this},remove:function(){var a=this;if(a.hasClass("ui-timepicker-input")){var b=a.data("timepicker-settings");return a.removeAttr("autocomplete","off"),a.removeClass("ui-timepicker-input"),a.removeData("timepicker-settings"),a.off(".timepicker"),a.data("timepicker-list")&&a.data("timepicker-list").remove(),b.useSelect&&a.show(),a.removeData("timepicker-list"),this}}};a.fn.timepicker=function(b){return this.length?y[b]?this.hasClass("ui-timepicker-input")?y[b].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.timepicker"):y.init.apply(this,arguments):this}});
diff --git a/assets/javascripts/wizard/templates/components/wizard-field-user-selector.hbs b/assets/javascripts/wizard/templates/components/wizard-field-user-selector.hbs
index 0881bede..e5a5f785 100644
--- a/assets/javascripts/wizard/templates/components/wizard-field-user-selector.hbs
+++ b/assets/javascripts/wizard/templates/components/wizard-field-user-selector.hbs
@@ -1 +1,3 @@
-{{custom-user-selector usernames=field.value placeholderKey=field.placeholder}}
+{{custom-user-selector
+ usernames=field.value
+ placeholderKey=field.placeholder}}
diff --git a/assets/stylesheets/wizard/wizard_autocomplete.scss b/assets/stylesheets/wizard/wizard_autocomplete.scss
new file mode 100644
index 00000000..89ea610c
--- /dev/null
+++ b/assets/stylesheets/wizard/wizard_autocomplete.scss
@@ -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;
+ }
+}
\ No newline at end of file
diff --git a/assets/stylesheets/wizard/wizard_custom.scss b/assets/stylesheets/wizard/wizard_custom.scss
index 5c05598c..26493fd8 100644
--- a/assets/stylesheets/wizard/wizard_custom.scss
+++ b/assets/stylesheets/wizard/wizard_custom.scss
@@ -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 {
margin: 20px auto 20px auto;
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 {
&.invalid{
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 */
+
@media all and (-ms-high-contrast:none)
{
.custom-wizard {
diff --git a/assets/stylesheets/wizard/wizard_events.scss b/assets/stylesheets/wizard/wizard_events.scss
new file mode 100644
index 00000000..61380deb
--- /dev/null
+++ b/assets/stylesheets/wizard/wizard_events.scss
@@ -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;
+}
diff --git a/assets/stylesheets/wizard/wizard_locations.scss b/assets/stylesheets/wizard/wizard_locations.scss
new file mode 100644
index 00000000..309c01d6
--- /dev/null
+++ b/assets/stylesheets/wizard/wizard_locations.scss
@@ -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;
+}
\ No newline at end of file
diff --git a/plugin.rb b/plugin.rb
index 7a4196fe..c48ed998 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -24,10 +24,13 @@ if Rails.env.production?
wizard-plugin.js
wizard-custom-start.js
wizard-raw-templates.js.erb
+ stylesheets/wizard/wizard_autocomplete.scss
stylesheets/wizard/wizard_custom.scss
stylesheets/wizard/wizard_composer.scss
stylesheets/wizard/wizard_variables.scss
stylesheets/wizard/wizard_custom_mobile.scss
+ stylesheets/wizard/wizard_locations.scss
+ stylesheets/wizard/wizard_events.scss
}
end
diff --git a/views/layouts/wizard.html.erb b/views/layouts/wizard.html.erb
index db15672b..4fa985f1 100644
--- a/views/layouts/wizard.html.erb
+++ b/views/layouts/wizard.html.erb
@@ -1,10 +1,13 @@
<%= discourse_stylesheet_link_tag :wizard, theme_id: nil %>
+ <%= stylesheet_link_tag "wizard_autocomplete" %>
<%= stylesheet_link_tag "wizard_custom" %>
<%= stylesheet_link_tag "wizard_composer" %>
<%= stylesheet_link_tag "wizard_variables" %>
<%= stylesheet_link_tag "wizard_custom_mobile" %>
+ <%= stylesheet_link_tag "wizard_locations"%>
+ <%= stylesheet_link_tag "wizard_events"%>
<%- if theme_ids %>
<%= discourse_stylesheet_link_tag (mobile_view? ? :mobile_theme : :desktop_theme) %>
<%- end %>