forked from CGM_Public/pretix_original
Control: Remove empty help-text for colorpickers with no-contrast (#3042)
This commit is contained in:
committed by
GitHub
parent
b29efb9694
commit
6c3e745d5d
@@ -291,7 +291,7 @@ var form_handlers = function (el) {
|
|||||||
maxTop: 200
|
maxTop: 200
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).on('changeColor create', function (e) {
|
}).not(".no-contrast").on('changeColor create', function (e) {
|
||||||
var rgb = $(this).colorpicker('color').toRGB();
|
var rgb = $(this).colorpicker('color').toRGB();
|
||||||
var c = contrast([255,255,255], [rgb.r, rgb.g, rgb.b]);
|
var c = contrast([255,255,255], [rgb.r, rgb.g, rgb.b]);
|
||||||
var mark = 'times';
|
var mark = 'times';
|
||||||
@@ -302,7 +302,6 @@ var form_handlers = function (el) {
|
|||||||
if ($(this).val() === "") {
|
if ($(this).val() === "") {
|
||||||
$note.remove();
|
$note.remove();
|
||||||
}
|
}
|
||||||
if (!$(this).is(".no-contrast")) {
|
|
||||||
if (c > 7) {
|
if (c > 7) {
|
||||||
$note.html("<span class='fa fa-fw fa-check-circle'></span>")
|
$note.html("<span class='fa fa-fw fa-check-circle'></span>")
|
||||||
.append(gettext('Your color has great contrast and is very easy to read!'));
|
.append(gettext('Your color has great contrast and is very easy to read!'));
|
||||||
@@ -317,7 +316,6 @@ var form_handlers = function (el) {
|
|||||||
'shade.'));
|
'shade.'));
|
||||||
$note.addClass("text-danger").removeClass("text-success").removeClass("text-warning");
|
$note.addClass("text-danger").removeClass("text-success").removeClass("text-warning");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
el.find("input[data-checkbox-dependency]").each(function () {
|
el.find("input[data-checkbox-dependency]").each(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user