mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 07:48:16 -05:00
Hide the flair selector text customizer when it's disabled.
This commit is contained in:
@@ -751,7 +751,7 @@ a.author { margin-right: 0.5em; }
|
||||
}
|
||||
|
||||
.flairselector .customizer { display: inline-block; }
|
||||
.flairselector .customizer input { display: block; }
|
||||
.flairselector .customizer input { display: none; }
|
||||
.flairselector .customizer button { display: inline !important; }
|
||||
|
||||
.media-button .option { color: red; }
|
||||
|
||||
@@ -44,16 +44,18 @@ $(function() {
|
||||
$(form).children('input[name="flair_template_id"]').val(this.id);
|
||||
var customizer = $(form).children(".customizer");
|
||||
var input = customizer.children("input");
|
||||
input.val($.trim($(this).children(".flair").text())).select();
|
||||
input.keyup(function() {
|
||||
$(".flairselection .flair").text($(input).val());
|
||||
});
|
||||
if ($(this).hasClass("texteditable")) {
|
||||
customizer.addClass("texteditable");
|
||||
input.removeAttr("disabled");
|
||||
input.css("display", "block");
|
||||
input.val($.trim($(this).children(".flair").text())).select();
|
||||
input.keyup(function() {
|
||||
$(".flairselection .flair").text($(input).val());
|
||||
});
|
||||
} else {
|
||||
customizer.removeClass("texteditable");
|
||||
input.attr("disabled", "disabled");
|
||||
input.css("display", "none");
|
||||
}
|
||||
$(".flairselection").html($(this).first().children().clone());
|
||||
$(".flairselector button").removeAttr("disabled");
|
||||
|
||||
Reference in New Issue
Block a user