diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c68be38..acc520cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. - Experimental Prometheus metrics endpoint (#300) - Don't store user's current project in DB, put it explicitly in page URLs (#336) - API reference in Markdown +- Use Selectize.js for entering tags (#324) ### Bug Fixes - The "render_docs" command checks if markdown and pygments is installed (#329) diff --git a/hc/front/views.py b/hc/front/views.py index 3782f652..b42bd9cb 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -511,6 +511,11 @@ def details(request, code): channels = Channel.objects.filter(project=check.project) channels = list(channels.order_by("created")) + all_tags = set() + q = Check.objects.filter(project=check.project).exclude(tags="") + for tags in q.values_list("tags", flat=True): + all_tags.update(tags.split(" ")) + ctx = { "page": "details", "project": check.project, @@ -520,6 +525,7 @@ def details(request, code): "downtimes": check.downtimes(months=3), "is_new": "new" in request.GET, "is_copied": "copied" in request.GET, + "all_tags": " ".join(sorted(all_tags)), } return render(request, "front/details.html", ctx) diff --git a/static/css/selectize.hc.css b/static/css/selectize.hc.css new file mode 100644 index 00000000..109e4737 --- /dev/null +++ b/static/css/selectize.hc.css @@ -0,0 +1,316 @@ +/** + * selectize.bootstrap3.css (v@@version) - Bootstrap 3 Theme + * Copyright (c) 2013–2015 Brian Reavis & contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + * ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + * + * @author Brian Reavis + */ +.selectize-control { + position: relative; +} +.selectize-dropdown, +.selectize-input, +.selectize-input input { + color: #333333; + font-family: inherit; + font-size: inherit; + line-height: 20px; + -webkit-font-smoothing: inherit; +} +.selectize-input, +.selectize-control.single .selectize-input.input-active { + background: #ffffff; + cursor: text; + display: inline-block; +} +.selectize-input { + border: 1px solid #cccccc; + padding: 6px 12px; + display: inline-block; + width: 100%; + overflow: hidden; + position: relative; + z-index: 1; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.selectize-control.multi .selectize-input.has-items { + padding: 4px 12px 1px; +} +.selectize-input.full { + background-color: #ffffff; +} +.selectize-input.disabled, +.selectize-input.disabled * { + cursor: default !important; +} +.selectize-input.focus { + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); +} +.selectize-input.dropdown-active { + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +.selectize-input > * { + vertical-align: baseline; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; + *display: inline; +} +.selectize-control.multi .selectize-input > div { + cursor: pointer; + margin: 0 3px 3px 0; + padding: 2px 6px; + background: #efefef; + color: #333333; + border: 0 solid rgba(0, 0, 0, 0); +} +.selectize-control.multi .selectize-input > div.active { + background: #22bc66; + color: #ffffff; + border: 0 solid rgba(0, 0, 0, 0); +} +.selectize-control.multi .selectize-input.disabled > div, +.selectize-control.multi .selectize-input.disabled > div.active { + color: #808080; + background: #ffffff; + border: 0 solid rgba(77, 77, 77, 0); +} +.selectize-input > input { + display: inline-block !important; + padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; + margin: 0 !important; + text-indent: 0 !important; + border: 0 none !important; + background: none !important; + line-height: inherit !important; + -webkit-user-select: auto !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; +} +.selectize-input > input::-ms-clear { + display: none; +} +.selectize-input > input:focus { + outline: none !important; +} +.selectize-input::after { + content: ' '; + display: block; + clear: left; +} +.selectize-input.dropdown-active::before { + content: ' '; + display: block; + position: absolute; + background: #ffffff; + height: 1px; + bottom: 0; + left: 0; + right: 0; +} +.selectize-dropdown { + position: absolute; + z-index: 10; + border: 1px solid #d0d0d0; + background: #ffffff; + margin: -1px 0 0 0; + border-top: 0 none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 0 0 2px 2px; + -moz-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.selectize-dropdown [data-selectable] { + cursor: pointer; + overflow: hidden; +} +.selectize-dropdown [data-selectable] .highlight { + background: rgba(255, 237, 40, 0.4); + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; +} +.selectize-dropdown .option, +.selectize-dropdown .optgroup-header { + padding: 3px 12px; +} +.selectize-dropdown .option, +.selectize-dropdown [data-disabled], +.selectize-dropdown [data-disabled] [data-selectable].option { + cursor: inherit; + opacity: 0.5; +} +.selectize-dropdown [data-selectable].option { + opacity: 1; +} +.selectize-dropdown .optgroup:first-child .optgroup-header { + border-top: 0 none; +} +.selectize-dropdown .optgroup-header { + color: #777777; + background: #ffffff; + cursor: default; +} +.selectize-dropdown .active { + background-color: #f5f5f5; + color: #262626; +} +.selectize-dropdown .active.create { + color: #262626; +} +.selectize-dropdown .create { + color: rgba(51, 51, 51, 0.5); +} +.selectize-dropdown-content { + overflow-y: auto; + overflow-x: hidden; + max-height: 200px; + -webkit-overflow-scrolling: touch; +} +.selectize-control.single .selectize-input, +.selectize-control.single .selectize-input input { + cursor: pointer; +} +.selectize-control.single .selectize-input.input-active, +.selectize-control.single .selectize-input.input-active input { + cursor: text; +} +.selectize-control.single .selectize-input:after { + content: ' '; + display: block; + position: absolute; + top: 50%; + right: 17px; + margin-top: -3px; + width: 0; + height: 0; + border-style: solid; + border-width: 5px 5px 0 5px; + border-color: #333333 transparent transparent transparent; +} +.selectize-control.single .selectize-input.dropdown-active:after { + margin-top: -4px; + border-width: 0 5px 5px 5px; + border-color: transparent transparent #333333 transparent; +} +.selectize-control.rtl.single .selectize-input:after { + left: 17px; + right: auto; +} +.selectize-control.rtl .selectize-input > input { + margin: 0 4px 0 -2px !important; +} +.selectize-control .selectize-input.disabled { + opacity: 0.5; + background-color: #ffffff; +} +.selectize-dropdown, +.selectize-dropdown.form-control { + height: auto; + padding: 0; + margin: 2px 0 0 0; + z-index: 1000; + background: #ffffff; + border: 1px solid #cccccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); +} +.selectize-dropdown .optgroup-header { + font-size: 12px; + line-height: 1.42857143; +} +.selectize-dropdown .optgroup:first-child:before { + display: none; +} +.selectize-dropdown .optgroup:before { + content: ' '; + display: block; + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; + margin-left: -12px; + margin-right: -12px; +} +.selectize-dropdown-content { + padding: 5px 0; +} +.selectize-dropdown-header { + padding: 6px 12px; +} +.selectize-input { + min-height: 34px; +} +.selectize-input.dropdown-active { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.selectize-input.dropdown-active::before { + display: none; +} +.selectize-input.focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 0 4px rgba(102, 175, 233, 0.2); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 0 4px rgba(102, 175, 233, 0.2); +} +.has-error .selectize-input { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.has-error .selectize-input:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; +} +.selectize-control.multi .selectize-input.has-items { + padding-left: 6px; + padding-right: 6px; +} +.selectize-control.multi .selectize-input > div { + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; +} +.form-control.selectize-control { + padding: 0; + height: auto; + border: none; + background: none; + -webkit-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} diff --git a/static/js/checks.js b/static/js/checks.js index a8c71741..abf8f631 100644 --- a/static/js/checks.js +++ b/static/js/checks.js @@ -7,7 +7,7 @@ $(function () { $("#update-name-form").attr("action", url); $("#update-name-input").val(this.dataset.name); - $("#update-tags-input").val(this.dataset.tags); + tagsSelectize.setValue(this.dataset.tags.split(" ")); $("#update-desc-input").val(this.dataset.desc); $('#update-name-modal').modal("show"); $("#update-name-input").focus(); @@ -233,4 +233,20 @@ $(function () { prompt("Press Ctrl+C to select:", text) }); + // Configure Selectize for entering tags + $("#update-tags-input").selectize({ + create: true, + createOnBlur: true, + delimiter: " ", + labelField: "value", + searchField: ["value"], + hideSelected: true, + highlight: false + }); + + var tagsSelectize = document.getElementById("update-tags-input").selectize; + $("#my-checks-tags div").each(function(idx, el) { + tagsSelectize.addOption({value: el.textContent}); + }); + }); diff --git a/static/js/details.js b/static/js/details.js index cf364d4f..014860a0 100644 --- a/static/js/details.js +++ b/static/js/details.js @@ -6,6 +6,24 @@ $(function () { return false; }); + // Configure Selectize for entering tags + var options = []; + var allTags = $("#update-tags-input").data("all-tags").split(" "); + for (var i=0, tag; tag = allTags[i]; i++) { + options.push({value: tag}); + } + + $("#update-tags-input").selectize({ + create: true, + createOnBlur: true, + delimiter: " ", + labelField: "value", + searchField: ["value"], + hideSelected: true, + highlight: false, + options: options + }); + $("#new-check-alert a").click(function() { $("#" + this.dataset.target).click(); return false; @@ -152,5 +170,4 @@ $(function () { $("#transfer-confirm").prop("disabled", !this.value); }); - }); diff --git a/static/js/selectize.min.js b/static/js/selectize.min.js new file mode 100644 index 00000000..43046c90 --- /dev/null +++ b/static/js/selectize.min.js @@ -0,0 +1,4 @@ +/*! selectize.js - v0.12.6 | https://github.com/selectize/selectize.js | Apache License (v2) */ + +!function(a,b){"function"==typeof define&&define.amd?define("sifter",b):"object"==typeof exports?module.exports=b():a.Sifter=b()}(this,function(){var a=function(a,b){this.items=a,this.settings=b||{diacritics:!0}};a.prototype.tokenize=function(a){if(!(a=e(String(a||"").toLowerCase()))||!a.length)return[];var b,c,d,g,i=[],j=a.split(/ +/);for(b=0,c=j.length;b0)&&d.items.push({score:c,id:e})}):g.iterator(g.items,function(a,b){d.items.push({score:1,id:b})}),e=g.getSortFunction(d,b),e&&d.items.sort(e),d.total=d.items.length,"number"==typeof b.limit&&(d.items=d.items.slice(0,b.limit)),d};var b=function(a,b){return"number"==typeof a&&"number"==typeof b?a>b?1:ab?1:b>a?-1:0)},c=function(a,b){var c,d,e,f;for(c=1,d=arguments.length;c=0&&a.data.length>0){var f=a.data.match(c),g=document.createElement("span");g.className="highlight";var h=a.splitText(e),i=(h.splitText(f[0].length),h.cloneNode(!0));g.appendChild(i),h.parentNode.replaceChild(g,h),b=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName)&&("highlight"!==a.className||"SPAN"!==a.tagName))for(var j=0;j/g,">").replace(/"/g,""")},m={};m.before=function(a,b,c){var d=a[b];a[b]=function(){return c.apply(a,arguments),d.apply(a,arguments)}},m.after=function(a,b,c){var d=a[b];a[b]=function(){var b=d.apply(a,arguments);return c.apply(a,arguments),b}};var n=function(a){var b=!1;return function(){b||(b=!0,a.apply(this,arguments))}},o=function(a,b){var c;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},p=function(a,b,c){var d,e=a.trigger,f={};a.trigger=function(){var c=arguments[0];if(-1===b.indexOf(c))return e.apply(a,arguments);f[c]=arguments},c.apply(a,[]),a.trigger=e;for(d in f)f.hasOwnProperty(d)&&e.apply(a,f[d])},q=function(a,b,c,d){a.on(b,c,function(b){for(var c=b.target;c&&c.parentNode!==a[0];)c=c.parentNode;return b.currentTarget=c,d.apply(this,[b])})},r=function(a){var b={};if("selectionStart"in a)b.start=a.selectionStart,b.length=a.selectionEnd-b.start;else if(document.selection){a.focus();var c=document.selection.createRange(),d=document.selection.createRange().text.length;c.moveStart("character",-a.value.length),b.start=c.text.length-d,b.length=d}return b},s=function(a,b,c){var d,e,f={};if(c)for(d=0,e=c.length;d").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).appendTo("body")),w.$testInput.text(b),s(c,w.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),w.$testInput.width()):0},u=function(a){var b=null,c=function(c,d){var e,f,g,h,i,j,k,l;c=c||window.event||{},d=d||{},c.metaKey||c.altKey||(d.force||!1!==a.data("grow"))&&(e=a.val(),c.type&&"keydown"===c.type.toLowerCase()&&(f=c.keyCode,g=f>=48&&f<=57||f>=65&&f<=90||f>=96&&f<=111||f>=186&&f<=222||32===f,46===f||8===f?(l=r(a[0]),l.length?e=e.substring(0,l.start)+e.substring(l.start+l.length):8===f&&l.start?e=e.substring(0,l.start-1)+e.substring(l.start+1):46===f&&void 0!==l.start&&(e=e.substring(0,l.start)+e.substring(l.start+1))):g&&(j=c.shiftKey,k=String.fromCharCode(c.keyCode),k=j?k.toUpperCase():k.toLowerCase(),e+=k)),h=a.attr("placeholder"),!e&&h&&(e=h),(i=t(e,a)+4)!==b&&(b=i,a.width(i),a.triggerHandler("resize")))};a.on("keydown keyup update blur",c),c()},v=function(a){var b=document.createElement("div");return b.appendChild(a.cloneNode(!0)),b.innerHTML},w=function(c,d){var e,f,g,h,i=this;h=c[0],h.selectize=i;var j=window.getComputedStyle&&window.getComputedStyle(h,null);if(g=j?j.getPropertyValue("direction"):h.currentStyle&&h.currentStyle.direction,g=g||c.parents("[dir]:first").attr("dir")||"",a.extend(i,{order:0,settings:d,$input:c,tabIndex:c.attr("tabindex")||"",tagType:"select"===h.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(g),eventNS:".selectize"+ ++w.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:c.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===d.loadThrottle?i.onSearchChange:o(i.onSearchChange,d.loadThrottle)}),i.sifter=new b(this.options,{diacritics:d.diacritics}),i.settings.options){for(e=0,f=i.settings.options.length;e").addClass(r.wrapperClass).addClass(m).addClass(l),c=a("
").addClass(r.inputClass).addClass("items").appendTo(b),d=a('').appendTo(c).attr("tabindex",w.is(":disabled")?"-1":p.tabIndex),k=a(r.dropdownParent||b),e=a("
").addClass(r.dropdownClass).addClass(l).hide().appendTo(k),j=a("
").addClass(r.dropdownContentClass).appendTo(e),(o=w.attr("id"))&&(d.attr("id",o+"-selectized"),a("label[for='"+o+"']").attr("for",o+"-selectized")),p.settings.copyClassesToDropdown&&e.addClass(m),b.css({width:w[0].style.width}),p.plugins.names.length&&(n="plugin-"+p.plugins.names.join(" plugin-"),b.addClass(n),e.addClass(n)),(null===r.maxItems||r.maxItems>1)&&1===p.tagType&&w.attr("multiple","multiple"),p.settings.placeholder&&d.attr("placeholder",r.placeholder),!p.settings.splitOn&&p.settings.delimiter){var x=p.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");p.settings.splitOn=new RegExp("\\s*"+x+"+\\s*")}w.attr("autocorrect")&&d.attr("autocorrect",w.attr("autocorrect")),w.attr("autocapitalize")&&d.attr("autocapitalize",w.attr("autocapitalize")),d[0].type=w[0].type,p.$wrapper=b,p.$control=c,p.$control_input=d,p.$dropdown=e,p.$dropdown_content=j,e.on("mouseenter mousedown click","[data-disabled]>[data-selectable]",function(a){a.stopImmediatePropagation()}),e.on("mouseenter","[data-selectable]",function(){return p.onOptionHover.apply(p,arguments)}),e.on("mousedown click","[data-selectable]",function(){return p.onOptionSelect.apply(p,arguments)}),q(c,"mousedown","*:not(input)",function(){return p.onItemSelect.apply(p,arguments)}),u(d),c.on({mousedown:function(){return p.onMouseDown.apply(p,arguments)},click:function(){return p.onClick.apply(p,arguments)}}),d.on({mousedown:function(a){a.stopPropagation()},keydown:function(){return p.onKeyDown.apply(p,arguments)},keyup:function(){return p.onKeyUp.apply(p,arguments)},keypress:function(){return p.onKeyPress.apply(p,arguments)},resize:function(){p.positionDropdown.apply(p,[])},blur:function(){return p.onBlur.apply(p,arguments)},focus:function(){return p.ignoreBlur=!1,p.onFocus.apply(p,arguments)},paste:function(){return p.onPaste.apply(p,arguments)}}),v.on("keydown"+s,function(a){p.isCmdDown=a[f?"metaKey":"ctrlKey"],p.isCtrlDown=a[f?"altKey":"ctrlKey"],p.isShiftDown=a.shiftKey}),v.on("keyup"+s,function(a){a.keyCode===h&&(p.isCtrlDown=!1),16===a.keyCode&&(p.isShiftDown=!1),a.keyCode===g&&(p.isCmdDown=!1)}),v.on("mousedown"+s,function(a){if(p.isFocused){if(a.target===p.$dropdown[0]||a.target.parentNode===p.$dropdown[0])return!1;p.$control.has(a.target).length||a.target===p.$control[0]||p.blur(a.target)}}),t.on(["scroll"+s,"resize"+s].join(" "),function(){p.isOpen&&p.positionDropdown.apply(p,arguments)}),t.on("mousemove"+s,function(){p.ignoreHover=!1}),this.revertSettings={$children:w.children().detach(),tabindex:w.attr("tabindex")},w.attr("tabindex",-1).hide().after(p.$wrapper),a.isArray(r.items)&&(p.setValue(r.items),delete r.items),i&&w.on("invalid"+s,function(a){a.preventDefault(),p.isInvalid=!0,p.refreshState()}),p.updateOriginalInput(),p.refreshItems(),p.refreshState(),p.updatePlaceholder(),p.isSetup=!0,w.is(":disabled")&&p.disable(),p.on("change",this.onChange),w.data("selectize",p),w.addClass("selectized"),p.trigger("initialize"),!0===r.preload&&p.onSearchChange("")},setupTemplates:function(){var b=this,c=b.settings.labelField,d=b.settings.optgroupLabelField,e={optgroup:function(a){return'
'+a.html+"
"},optgroup_header:function(a,b){return'
'+b(a[d])+"
"},option:function(a,b){return'
'+b(a[c])+"
"},item:function(a,b){return'
'+b(a[c])+"
"},option_create:function(a,b){return'
Add '+b(a.input)+"
"}};b.settings.render=a.extend({},e,b.settings.render)},setupCallbacks:function(){var a,b,c={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(a in c)c.hasOwnProperty(a)&&(b=this.settings[c[a]])&&this.on(a,b)},onClick:function(a){var b=this;b.isFocused&&b.isOpen||(b.focus(),a.preventDefault())},onMouseDown:function(b){var c=this,d=b.isDefaultPrevented();a(b.target);if(c.isFocused){if(b.target!==c.$control_input[0])return"single"===c.settings.mode?c.isOpen?c.close():c.open():d||c.setActiveItem(null),!1}else d||window.setTimeout(function(){c.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(b){var c=this;if(c.isFull()||c.isInputHidden||c.isLocked)return void b.preventDefault();c.settings.splitOn&&setTimeout(function(){var b=c.$control_input.val();if(b.match(c.settings.splitOn))for(var d=a.trim(b).split(c.settings.splitOn),e=0,f=d.length;eh&&(j=g,g=h,h=j),e=g;e<=h;e++)i=l.$control[0].childNodes[e],-1===l.$activeItems.indexOf(i)&&(a(i).addClass("active"),l.$activeItems.push(i));c.preventDefault()}else"mousedown"===d&&l.isCtrlDown||"keydown"===d&&this.isShiftDown?b.hasClass("active")?(f=l.$activeItems.indexOf(b[0]),l.$activeItems.splice(f,1),b.removeClass("active")):l.$activeItems.push(b.addClass("active")[0]):(a(l.$activeItems).removeClass("active"),l.$activeItems=[b.addClass("active")[0]]);l.hideInput(),this.isFocused||l.focus()}},setActiveOption:function(b,c,d){var e,f,g,h,i,k=this;k.$activeOption&&k.$activeOption.removeClass("active"),k.$activeOption=null,b=a(b),b.length&&(k.$activeOption=b.addClass("active"),!c&&j(c)||(e=k.$dropdown_content.height(),f=k.$activeOption.outerHeight(!0),c=k.$dropdown_content.scrollTop()||0,g=k.$activeOption.offset().top-k.$dropdown_content.offset().top+c,h=g,i=g-e+f,g+f>e+c?k.$dropdown_content.stop().animate({scrollTop:i},d?k.settings.scrollDuration:0):g=0;c--)-1!==f.items.indexOf(k(d.items[c].id))&&d.items.splice(c,1);return d},refreshOptions:function(b){var c,e,f,g,h,i,j,l,m,n,o,p,q,r,s,t;void 0===b&&(b=!0);var u=this,w=a.trim(u.$control_input.val()),x=u.search(w),y=u.$dropdown_content,z=u.$activeOption&&k(u.$activeOption.attr("data-value"));for(g=x.items.length,"number"==typeof u.settings.maxOptions&&(g=Math.min(g,u.settings.maxOptions)),h={},i=[],c=0;c0||q,u.hasOptions?(x.items.length>0?(s=z&&u.getOption(z),s&&s.length?r=s:"single"===u.settings.mode&&u.items.length&&(r=u.getOption(u.items[0])),r&&r.length||(r=t&&!u.settings.addPrecedence?u.getAdjacentOption(t,1):y.find("[data-selectable]:first"))):r=t,u.setActiveOption(r),b&&!u.isOpen&&u.open()):(u.setActiveOption(null),b&&u.isOpen&&u.close())},addOption:function(b){var c,d,e,f=this;if(a.isArray(b))for(c=0,d=b.length;c=0&&e0),b.$control_input.data("grow",!c&&!d)},isFull:function(){ +return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(a){var b,c,d,e,f=this;if(a=a||{},1===f.tagType){for(d=[],b=0,c=f.items.length;b'+l(e)+"");d.length||this.$input.attr("multiple")||d.push(''),f.$input.html(d.join(""))}else f.$input.val(f.getValue()),f.$input.attr("value",f.$input.val());f.isSetup&&(a.silent||f.trigger("change",f.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var a=this.$control_input;this.items.length?a.removeAttr("placeholder"):a.attr("placeholder",this.settings.placeholder),a.triggerHandler("update",{force:!0})}},open:function(){var a=this;a.isLocked||a.isOpen||"multi"===a.settings.mode&&a.isFull()||(a.focus(),a.isOpen=!0,a.refreshState(),a.$dropdown.css({visibility:"hidden",display:"block"}),a.positionDropdown(),a.$dropdown.css({visibility:"visible"}),a.trigger("dropdown_open",a.$dropdown))},close:function(){var a=this,b=a.isOpen;"single"===a.settings.mode&&a.items.length&&(a.hideInput(),a.isBlurring||a.$control_input.blur()),a.isOpen=!1,a.$dropdown.hide(),a.setActiveOption(null),a.refreshState(),b&&a.trigger("dropdown_close",a.$dropdown)},positionDropdown:function(){var a=this.$control,b="body"===this.settings.dropdownParent?a.offset():a.position();b.top+=a.outerHeight(!0),this.$dropdown.css({width:a[0].getBoundingClientRect().width,top:b.top,left:b.left})},clear:function(a){var b=this;b.items.length&&(b.$control.children(":not(input)").remove(),b.items=[],b.lastQuery=null,b.setCaret(0),b.setActiveItem(null),b.updatePlaceholder(),b.updateOriginalInput({silent:a}),b.refreshState(),b.showInput(),b.trigger("clear"))},insertAtCaret:function(a){var b=Math.min(this.caretPos,this.items.length),c=a[0],d=this.buffer||this.$control[0];0===b?d.insertBefore(c,d.firstChild):d.insertBefore(c,d.childNodes[b]),this.setCaret(b+1)},deleteSelection:function(b){var c,d,e,f,g,h,i,j,k,l=this;if(e=b&&8===b.keyCode?-1:1,f=r(l.$control_input[0]),l.$activeOption&&!l.settings.hideSelected&&(i=l.getAdjacentOption(l.$activeOption,-1).attr("data-value")),g=[],l.$activeItems.length){for(k=l.$control.children(".active:"+(e>0?"last":"first")),h=l.$control.children(":not(input)").index(k),e>0&&h++,c=0,d=l.$activeItems.length;c0&&f.start===l.$control_input.val().length&&g.push(l.items[l.caretPos]));if(!g.length||"function"==typeof l.settings.onDelete&&!1===l.settings.onDelete.apply(l,[g]))return!1;for(void 0!==h&&l.setCaret(h);g.length;)l.removeItem(g.pop());return l.showInput(),l.positionDropdown(),l.refreshOptions(!0),i&&(j=l.getOption(i),j.length&&l.setActiveOption(j)),!0},advanceSelection:function(a,b){var c,d,e,f,g,h=this;0!==a&&(h.rtl&&(a*=-1),c=a>0?"last":"first",d=r(h.$control_input[0]),h.isFocused&&!h.isInputHidden?(f=h.$control_input.val().length,(a<0?0===d.start&&0===d.length:d.start===f)&&!f&&h.advanceCaret(a,b)):(g=h.$control.children(".active:"+c),g.length&&(e=h.$control.children(":not(input)").index(g),h.setActiveItem(null),h.setCaret(a>0?e+1:e))))},advanceCaret:function(a,b){var c,d,e=this;0!==a&&(c=a>0?"next":"prev",e.isShiftDown?(d=e.$control_input[c](),d.length&&(e.hideInput(),e.setActiveItem(d),b&&b.preventDefault())):e.setCaret(e.caretPos+a))},setCaret:function(b){var c=this;if(b="single"===c.settings.mode?c.items.length:Math.max(0,Math.min(c.items.length,b)),!c.isPending){var d,e,f,g;for(f=c.$control.children(":not(input)"),d=0,e=f.length;d
'+a.title+'×
'}},b),c.setup=function(){var d=c.setup;return function(){d.apply(c,arguments),c.$dropdown_header=a(b.html(b)),c.$dropdown.prepend(c.$dropdown_header)}}()}),w.define("optgroup_columns",function(b){var c=this;b=a.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(b,c){var d=b.closest("[data-group]").find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e
',a=a.firstChild,c.body.appendChild(a),b=d.width=a.offsetWidth-a.clientWidth,c.body.removeChild(a)),b},e=function(){var e,f,g,h,i,j,k;if(k=a("[data-group]",c.$dropdown_content),(f=k.length)&&c.$dropdown_content.width()){if(b.equalizeHeight){for(g=0,e=0;e1&&(i=j-h*(f-1),k.eq(f-1).css({width:i})))}};(b.equalizeHeight||b.equalizeWidth)&&(m.after(this,"positionDropdown",e),m.after(this,"refreshOptions",e))}),w.define("remove_button",function(b){b=a.extend({label:"×",title:"Remove",className:"remove",append:!0},b);if("single"===this.settings.mode)return void function(b,c){c.className="remove-single";var d=b,e=''+c.label+"",f=function(b,c){return a("").append(b).append(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=a(d.$input.context).attr("id"),i=(a("#"+h),d.settings.render.item);d.settings.render.item=function(a){return f(i.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(a){a.preventDefault(),d.isLocked||d.clear()})}}()}(this,b);!function(b,c){var d=b,e=''+c.label+"",f=function(a,b){var c=a.search(/(<\/[^>]+>\s*)$/);return a.substring(0,c)+b+a.substring(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=d.settings.render.item;d.settings.render.item=function(a){return f(h.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(b){if(b.preventDefault(),!d.isLocked){var c=a(b.currentTarget).parent();d.setActiveItem(c),d.deleteSelection()&&d.setCaret(d.items.length)}})}}()}(this,b)}),w.define("restore_on_backspace",function(a){var b=this;a.text=a.text||function(a){return a[this.settings.labelField]},this.onKeyDown=function(){var c=b.onKeyDown;return function(b){var d,e;return 8===b.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&(d=this.caretPos-1)>=0&&d + */ + +@import "../bootstrap/variables.less"; +@import "../bootstrap/mixins.less"; +@import "selectize"; + +@selectize-font-family: inherit; +@selectize-font-size: inherit; +@selectize-line-height: @line-height-computed; + +@selectize-color-text: @text-color; +@selectize-color-highlight: rgba(255,237,40,0.4); +@selectize-color-input: @input-bg; +@selectize-color-input-full: @input-bg; +@selectize-color-input-error: @state-danger-text; +@selectize-color-input-error-focus: darken(@selectize-color-input-error, 10%); +@selectize-color-disabled: @input-bg; +@selectize-color-item: #efefef; +@selectize-color-item-border: rgba(0,0,0,0); +@selectize-color-item-active: @component-active-bg; +@selectize-color-item-active-text: #fff; +@selectize-color-item-active-border: rgba(0,0,0,0); +@selectize-color-optgroup: @dropdown-bg; +@selectize-color-optgroup-text: @dropdown-header-color; +@selectize-color-optgroup-border: @dropdown-divider-bg; +@selectize-color-dropdown: @dropdown-bg; +@selectize-color-dropdown-border-top: mix(@input-border, @input-bg, 0.8); +@selectize-color-dropdown-item-active: @dropdown-link-hover-bg; +@selectize-color-dropdown-item-active-text: @dropdown-link-hover-color; +@selectize-color-dropdown-item-create-active-text: @dropdown-link-hover-color; +@selectize-opacity-disabled: 0.5; +@selectize-shadow-input: none; +@selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15); +@selectize-shadow-input-error: inset 0 1px 1px rgba(0, 0, 0, .075); +@selectize-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten(@selectize-color-input-error, 20%); +@selectize-border: 1px solid @input-border; +@selectize-border-radius: @input-border-radius; + +@selectize-width-item-border: 0; +@selectize-padding-x: @padding-base-horizontal; +@selectize-padding-y: @padding-base-vertical; +@selectize-padding-dropdown-item-x: @padding-base-horizontal; +@selectize-padding-dropdown-item-y: 3px; +@selectize-padding-item-x: 6px; +@selectize-padding-item-y: 2px; +@selectize-margin-item-x: 3px; +@selectize-margin-item-y: 3px; +@selectize-caret-margin: 0; + +@selectize-arrow-size: 5px; +@selectize-arrow-color: @selectize-color-text; +@selectize-arrow-offset: @selectize-padding-x + 5px; + +.selectize-dropdown, .selectize-dropdown.form-control { + height: auto; + padding: 0; + margin: 2px 0 0 0; + z-index: @zindex-dropdown; + background: @selectize-color-dropdown; + border: 1px solid @dropdown-fallback-border; + border: 1px solid @dropdown-border; + .selectize-border-radius(@border-radius-base); + .selectize-box-shadow(0 6px 12px rgba(0,0,0,.175)); +} + +.selectize-dropdown { + .optgroup-header { + font-size: @font-size-small; + line-height: @line-height-base; + } + .optgroup:first-child:before { + display: none; + } + .optgroup:before { + content: ' '; + display: block; + .nav-divider(); + margin-left: @selectize-padding-dropdown-item-x * -1; + margin-right: @selectize-padding-dropdown-item-x * -1; + } +} + +.selectize-dropdown-content { + padding: 5px 0; +} + +.selectize-dropdown-header { + padding: @selectize-padding-dropdown-item-y * 2 @selectize-padding-dropdown-item-x; +} + +.selectize-input { + min-height: @input-height-base; + + &.dropdown-active { + .selectize-border-radius(@selectize-border-radius); + } + &.dropdown-active::before { + display: none; + } + &.focus { + @color: @input-border-focus; + @color-rgba: rgba(red(@color), green(@color), blue(@color), .2); + border-color: @color; + outline: 0; + .selectize-box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 0 4px @{color-rgba}"); + } +} + +.has-error .selectize-input { + border-color: @selectize-color-input-error; + .selectize-box-shadow(@selectize-shadow-input-error); + + &:focus { + border-color: @selectize-color-input-error-focus; + .selectize-box-shadow(@selectize-shadow-input-error-focus); + } +} + +.selectize-control { + &.multi { + .selectize-input.has-items { + padding-left: @selectize-padding-x - @selectize-padding-item-x; + padding-right: @selectize-padding-x - @selectize-padding-item-x; + } + .selectize-input > div { + .selectize-border-radius(@selectize-border-radius - 1px); + } + } +} + +.form-control.selectize-control { + padding: 0; + height: auto; + border: none; + background: none; + .selectize-box-shadow(none); + .selectize-border-radius(0); +} diff --git a/stuff/selectize/selectize.less b/stuff/selectize/selectize.less new file mode 100644 index 00000000..bdc099bb --- /dev/null +++ b/stuff/selectize/selectize.less @@ -0,0 +1,298 @@ +// base styles + +@selectize-font-family: inherit; +@selectize-font-smoothing: inherit; +@selectize-font-size: 13px; +@selectize-line-height: 18px; + +@selectize-color-text: #303030; +@selectize-color-border: #d0d0d0; +@selectize-color-highlight: rgba(125,168,208,0.2); +@selectize-color-input: #fff; +@selectize-color-input-full: @selectize-color-input; +@selectize-color-disabled: #fafafa; +@selectize-color-item: #f2f2f2; +@selectize-color-item-text: @selectize-color-text; +@selectize-color-item-border: #d0d0d0; +@selectize-color-item-active: #e8e8e8; +@selectize-color-item-active-text: @selectize-color-text; +@selectize-color-item-active-border: #cacaca; +@selectize-color-dropdown: #fff; +@selectize-color-dropdown-border: @selectize-color-border; +@selectize-color-dropdown-border-top: #f0f0f0; +@selectize-color-dropdown-item-active: #f5fafd; +@selectize-color-dropdown-item-active-text: #495c68; +@selectize-color-dropdown-item-create-text: rgba(red(@selectize-color-text), green(@selectize-color-text), blue(@selectize-color-text), 0.5); +@selectize-color-dropdown-item-create-active-text: @selectize-color-dropdown-item-active-text; +@selectize-color-optgroup: @selectize-color-dropdown; +@selectize-color-optgroup-text: @selectize-color-text; +@selectize-lighten-disabled-item: 30%; +@selectize-lighten-disabled-item-text: 30%; +@selectize-lighten-disabled-item-border: 30%; +@selectize-opacity-disabled: 0.5; + +@selectize-shadow-input: inset 0 1px 1px rgba(0,0,0,0.1); +@selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15); +@selectize-border: 1px solid @selectize-color-border; +@selectize-dropdown-border: 1px solid @selectize-color-dropdown-border; +@selectize-border-radius: 3px; + +@selectize-width-item-border: 0; +@selectize-max-height-dropdown: 200px; + +@selectize-padding-x: 8px; +@selectize-padding-y: 8px; +@selectize-padding-item-x: 6px; +@selectize-padding-item-y: 2px; +@selectize-padding-dropdown-item-x: @selectize-padding-x; +@selectize-padding-dropdown-item-y: 5px; +@selectize-margin-item-x: 3px; +@selectize-margin-item-y: 3px; + +@selectize-arrow-size: 5px; +@selectize-arrow-color: #808080; +@selectize-arrow-offset: 15px; + +@selectize-caret-margin: 0 2px 0 0; +@selectize-caret-margin-rtl: 0 4px 0 -2px; + +.selectize-border-radius (@radii) { + -webkit-border-radius: @radii; + -moz-border-radius: @radii; + border-radius: @radii; +} +.selectize-unselectable () { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.selectize-box-shadow (@shadow) { + -webkit-box-shadow: @shadow; + box-shadow: @shadow; +} +.selectize-box-sizing (@type: border-box) { + -webkit-box-sizing: @type; + -moz-box-sizing: @type; + box-sizing: @type; +} +.selectize-vertical-gradient (@color-top, @color-bottom) { + background-color: mix(@color-top, @color-bottom, 60%); + background-image: -moz-linear-gradient(top, @color-top, @color-bottom); // FF 3.6+ + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@color-top), to(@color-bottom)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @color-top, @color-bottom); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, @color-top, @color-bottom); // Opera 11.10 + background-image: linear-gradient(to bottom, @color-top, @color-bottom); // Standard, IE10 + background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@color-top),argb(@color-bottom))); // IE9 and down +} + +.selectize-control { + position: relative; +} + +.selectize-dropdown, .selectize-input, .selectize-input input { + color: @selectize-color-text; + font-family: @selectize-font-family; + font-size: @selectize-font-size; + line-height: @selectize-line-height; + -webkit-font-smoothing: @selectize-font-smoothing; +} + +.selectize-input, .selectize-control.single .selectize-input.input-active { + background: @selectize-color-input; + cursor: text; + display: inline-block; +} + +.selectize-input { + border: @selectize-border; + padding: @selectize-padding-y @selectize-padding-x; + display: inline-block; + width: 100%; + overflow: hidden; + position: relative; + z-index: 1; + .selectize-box-sizing(border-box); + .selectize-box-shadow(@selectize-shadow-input); + .selectize-border-radius(@selectize-border-radius); + + .selectize-control.multi &.has-items { + @padding-x: @selectize-padding-x; + @padding-top: @selectize-padding-y - @selectize-padding-item-y - @selectize-width-item-border; + @padding-bottom: @selectize-padding-y - @selectize-padding-item-y - @selectize-margin-item-y - @selectize-width-item-border; + padding: @padding-top @padding-x @padding-bottom; + } + + &.full { + background-color: @selectize-color-input-full; + } + &.disabled, &.disabled * { + cursor: default !important; + } + &.focus { + .selectize-box-shadow(@selectize-shadow-input-focus); + } + &.dropdown-active { + .selectize-border-radius(@selectize-border-radius @selectize-border-radius 0 0); + } + + > * { + vertical-align: baseline; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; + *display: inline; + } + .selectize-control.multi & > div { + cursor: pointer; + margin: 0 @selectize-margin-item-x @selectize-margin-item-y 0; + padding: @selectize-padding-item-y @selectize-padding-item-x; + background: @selectize-color-item; + color: @selectize-color-item-text; + border: @selectize-width-item-border solid @selectize-color-item-border; + + &.active { + background: @selectize-color-item-active; + color: @selectize-color-item-active-text; + border: @selectize-width-item-border solid @selectize-color-item-active-border; + } + } + .selectize-control.multi &.disabled > div { + &, &.active { + color: lighten(desaturate(@selectize-color-item-text, 100%), @selectize-lighten-disabled-item-text); + background: lighten(desaturate(@selectize-color-item, 100%), @selectize-lighten-disabled-item); + border: @selectize-width-item-border solid lighten(desaturate(@selectize-color-item-border, 100%), @selectize-lighten-disabled-item-border); + } + } + > input { + &::-ms-clear { + display: none; + } + display: inline-block !important; + padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; + margin: @selectize-caret-margin !important; + text-indent: 0 !important; + border: 0 none !important; + background: none !important; + line-height: inherit !important; + -webkit-user-select: auto !important; + .selectize-box-shadow(none) !important; + &:focus { outline: none !important; } + } +} + +.selectize-input::after { + content: ' '; + display: block; + clear: left; +} + +.selectize-input.dropdown-active::before { + content: ' '; + display: block; + position: absolute; + background: @selectize-color-dropdown-border-top; + height: 1px; + bottom: 0; + left: 0; + right: 0; +} + +.selectize-dropdown { + position: absolute; + z-index: 10; + border: @selectize-dropdown-border; + background: @selectize-color-dropdown; + margin: -1px 0 0 0; + border-top: 0 none; + .selectize-box-sizing(border-box); + .selectize-box-shadow(0 1px 3px rgba(0,0,0,0.1)); + .selectize-border-radius(0 0 @selectize-border-radius @selectize-border-radius); + + [data-selectable] { + cursor: pointer; + overflow: hidden; + .highlight { + background: @selectize-color-highlight; + .selectize-border-radius(1px); + } + } + .option, .optgroup-header { + padding: @selectize-padding-dropdown-item-y @selectize-padding-dropdown-item-x; + } + .option, [data-disabled], [data-disabled] [data-selectable].option { + cursor: inherit; + opacity: 0.5; + } + [data-selectable].option { + opacity: 1; + } + .optgroup:first-child .optgroup-header { + border-top: 0 none; + } + .optgroup-header { + color: @selectize-color-optgroup-text; + background: @selectize-color-optgroup; + cursor: default; + } + .active { + background-color: @selectize-color-dropdown-item-active; + color: @selectize-color-dropdown-item-active-text; + &.create { + color: @selectize-color-dropdown-item-create-active-text; + } + } + .create { + color: @selectize-color-dropdown-item-create-text; + } +} + +.selectize-dropdown-content { + overflow-y: auto; + overflow-x: hidden; + max-height: @selectize-max-height-dropdown; + -webkit-overflow-scrolling: touch; +} + +.selectize-control.single .selectize-input { + &, input { cursor: pointer; } + &.input-active, &.input-active input { cursor: text; } + + &:after { + content: ' '; + display: block; + position: absolute; + top: 50%; + right: @selectize-arrow-offset; + margin-top: round((-1 * @selectize-arrow-size / 2)); + width: 0; + height: 0; + border-style: solid; + border-width: @selectize-arrow-size @selectize-arrow-size 0 @selectize-arrow-size; + border-color: @selectize-arrow-color transparent transparent transparent; + } + &.dropdown-active:after { + margin-top: @selectize-arrow-size * -0.8; + border-width: 0 @selectize-arrow-size @selectize-arrow-size @selectize-arrow-size; + border-color: transparent transparent @selectize-arrow-color transparent; + } +} + +.selectize-control.rtl { + &.single .selectize-input:after { + left: @selectize-arrow-offset; + right: auto; + } + .selectize-input > input { + margin: @selectize-caret-margin-rtl !important; + } +} + +.selectize-control .selectize-input.disabled { + opacity: @selectize-opacity-disabled; + background-color: @selectize-color-disabled; +} diff --git a/templates/base.html b/templates/base.html index 29d36080..f5f85f60 100644 --- a/templates/base.html +++ b/templates/base.html @@ -17,13 +17,14 @@ {% block head %}{% endblock %} {% compress css %} + + - diff --git a/templates/front/details.html b/templates/front/details.html index 0aadc9d8..1eb7e008 100644 --- a/templates/front/details.html +++ b/templates/front/details.html @@ -43,7 +43,6 @@ {{ check.name_then_code }} (edit…) - {{ check.project }} {% for tag in check.tags_list %} {{ tag }} {% endfor %} @@ -294,6 +293,7 @@ {% compress js %} + diff --git a/templates/front/my_checks.html b/templates/front/my_checks.html index ec26c533..b4b130f9 100644 --- a/templates/front/my_checks.html +++ b/templates/front/my_checks.html @@ -85,6 +85,7 @@ + diff --git a/templates/front/update_name_modal.html b/templates/front/update_name_modal.html index 2d892dda..c38e2ea3 100644 --- a/templates/front/update_name_modal.html +++ b/templates/front/update_name_modal.html @@ -43,9 +43,8 @@ name="tags" type="text" maxlength="500" - value="{{ check.tags }}" - placeholder="production www" - class="form-control" /> + data-all-tags="{{ all_tags }}" + value="{{ check.tags }}" /> Use tags for easy filtering and for status badges. @@ -63,9 +62,12 @@ id="update-desc-input" class="form-control" rows="5" - placeholder="Additional notes for your own reference. -Will appear in email alerts about this check going DOWN and in Slack notifications." name="desc">{{ check.desc }} + + Additional notes for your own reference. Will appear + in email alerts about this check going down and in + Slack notifications. +