start changing the reply areas on camper news from text areas to text fields
This commit is contained in:
@ -62,8 +62,7 @@
|
|||||||
var commentId = $(this).attr('id');
|
var commentId = $(this).attr('id');
|
||||||
$(div).html(
|
$(div).html(
|
||||||
"<div class='formgroup comment-to-comment-formgroup'>" +
|
"<div class='formgroup comment-to-comment-formgroup'>" +
|
||||||
"<textarea class='form-control' id='comment-to-comment-textarea' maxlength='140' autofocus></textarea>" +
|
"<text class='form-control' id='comment-to-comment-textarea' maxlength='140' autofocus></textarea>" +
|
||||||
'<div class="clearfix">' +
|
|
||||||
'<span class="pull-left" id="textarea_feedback"></span>' +
|
'<span class="pull-left" id="textarea_feedback"></span>' +
|
||||||
"<button class='btn btn-small btn-primary pull-right' id='submit-comment-to-comment'>Submit</button>" +
|
"<button class='btn btn-small btn-primary pull-right' id='submit-comment-to-comment'>Submit</button>" +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
|
@ -34,18 +34,13 @@
|
|||||||
| ·
|
| ·
|
||||||
a#reply-to-main-post Reply
|
a#reply-to-main-post Reply
|
||||||
.col-xs-12#reply-area
|
.col-xs-12#reply-area
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.hidden-element#initial-comment-submit
|
.hidden-element#initial-comment-submit
|
||||||
form.form-horizontal.control-label-story-submission
|
form.form-horizontal.control-label-story-submission
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
.form-group
|
.input-group
|
||||||
h3.row
|
input#comment-box.big-text-field.field-responsive.form-control(type='text', placeholder='Enter your reply', autofocus)
|
||||||
textarea#comment-box.form-control(name="comment-box", rows=5)
|
span.input-group-btn
|
||||||
h3.row.text-center
|
button#comment-button.btn.btn-big.btn-primary.btn-responsive(type='button') Send
|
||||||
.col-xs-6.col-xs-offset-3
|
|
||||||
button.btn.btn-block.btn-primary#comment-button Comment
|
|
||||||
|
|
||||||
script.
|
script.
|
||||||
$('#reply-to-main-post').on('click', function() {
|
$('#reply-to-main-post').on('click', function() {
|
||||||
|
@ -14,16 +14,23 @@
|
|||||||
.col-xs-12.col-md-1
|
.col-xs-12.col-md-1
|
||||||
label.control-label.control-label-story-submission(for='name') Title
|
label.control-label.control-label-story-submission(for='name') Title
|
||||||
.col-xs-12.col-md-11
|
.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
|
.form-group
|
||||||
.col-xs-12.col-md-1
|
.col-xs-12.col-md-1
|
||||||
label.control-label.control-label-story-submission(for='name') Description
|
label.control-label.control-label-story-submission(for='name') Description
|
||||||
.col-xs-12.col-md-11
|
.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
|
.spacer
|
||||||
.form-group
|
.form-group
|
||||||
button.btn.btn-big.btn-block.btn-primary#story-submit Submit
|
button.btn.btn-big.btn-block.btn-primary#story-submit Submit
|
||||||
script.
|
script.
|
||||||
$('#story-url').val(storyURL).attr('disabled', 'disabled');
|
$('#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');
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user