start changing the reply areas on camper news from text areas to text fields

pull/166/head
Michael Q Larson 2015-03-08 17:51:27 -07:00
parent 48ce07058d
commit 9475c2a899
3 changed files with 19 additions and 18 deletions

View File

@ -62,10 +62,9 @@
var commentId = $(this).attr('id');
$(div).html(
"<div class='formgroup comment-to-comment-formgroup'>" +
"<textarea class='form-control' id='comment-to-comment-textarea' maxlength='140' autofocus></textarea>" +
'<div class="clearfix">' +
'<span class="pull-left" id="textarea_feedback"></span>' +
"<button class='btn btn-small btn-primary pull-right' id='submit-comment-to-comment'>Submit</button>" +
"<text class='form-control' id='comment-to-comment-textarea' maxlength='140' autofocus></textarea>" +
'<span class="pull-left" id="textarea_feedback"></span>' +
"<button class='btn btn-small btn-primary pull-right' id='submit-comment-to-comment'>Submit</button>" +
'</div>' +
"</div>"

View File

@ -34,18 +34,13 @@
| &nbsp;·&nbsp;
a#reply-to-main-post Reply
.col-xs-12#reply-area
.hidden-element#initial-comment-submit
form.form-horizontal.control-label-story-submission
.col-xs-12
.form-group
h3.row
textarea#comment-box.form-control(name="comment-box", rows=5)
h3.row.text-center
.col-xs-6.col-xs-offset-3
button.btn.btn-block.btn-primary#comment-button Comment
.col-xs-12
.input-group
input#comment-box.big-text-field.field-responsive.form-control(type='text', placeholder='Enter your reply', autofocus)
span.input-group-btn
button#comment-button.btn.btn-big.btn-primary.btn-responsive(type='button') Send
script.
$('#reply-to-main-post').on('click', function() {

View File

@ -14,16 +14,23 @@
.col-xs-12.col-md-1
label.control-label.control-label-story-submission(for='name') Title
.col-xs-12.col-md-11
input#story-title.form-control(placeholder='Type a headline for your link here', name='Title', autofocus)
input#story-title.form-control(placeholder='Type a headline for your link here', name='Title', maxlength='140' autofocus)
.form-group
.col-xs-12.col-md-1
label.control-label.control-label-story-submission(for='name') Description
.col-xs-12.col-md-11
textarea#description-box.form-control(name="comment-box", rows=5, placeholder="Start off the discussion with a description of your post")
input#description-box.form-control(name="comment-box", placeholder="Start off the discussion with a description of your post" maxlength='140')
span.pull-left#textarea_feedback
.spacer
.form-group
button.btn.btn-big.btn-block.btn-primary#story-submit Submit
script.
$('#story-url').val(storyURL).attr('disabled', 'disabled');
$('#story-title').val(storyTitle);
$('#story-title').val(storyTitle);
var text_max = 140;
$('#textarea_feedback').html(text_max + ' characters remaining');
$('#description-box').keyup(function () {
var text_length = $('#description-box').val().length;
var text_remaining = text_max - text_length;
$('#textarea_feedback').html(text_remaining + ' characters remaining');
});