From e6712f9d34bc91b85653042366f7b14bd95702b8 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 8 Jun 2014 12:31:35 -0700 Subject: [PATCH] hide name/email/subject field when not useable --- src/General/css/style.css | 13 ++++++------- src/Posting/QR.coffee | 6 +++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/General/css/style.css b/src/General/css/style.css index dcaddf123..c0d65f5b4 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -845,9 +845,9 @@ span.hide-announcement { font-size: 10pt; } .persona { - width: 248px; - max-width: 100%; - min-width: 100%; + width: 100%; + display: flex; + flex-direction: row; } #dump-button { width: 10%; @@ -865,10 +865,9 @@ span.hide-announcement { padding: 1px 0px 2px; opacity: 0.6; } -.persona .field:not(#dump) { - width: 95px; - min-width: 33.3%; - max-width: 33.3%; +.persona .field { + flex: 1; + width: 0; } #qr textarea.field { height: 14.8em; diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 9447ab7c4..2fc10c4a4 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -474,7 +474,11 @@ QR = QR.max_width_video = QR.max_height_video = 2048 QR.max_duration_video = 120 - QR.spoiler = !!$ 'input[name=spoiler]' + QR.nodes.name.hidden = !$ '.postForm input[name=name]:not([type=hidden])' + QR.nodes.email.hidden = !$ '.postForm input[name=email]:not([type=hidden])' + QR.nodes.sub.hidden = !$ '.postForm input[name=sub]:not([type=hidden])' + + QR.spoiler = !!$ '.postForm input[name=spoiler]' if QR.spoiler $.addClass QR.nodes.el, 'has-spoiler' else