Commit 0fa0f2c8 by Rocky Duan

add cancel button for new post

parent dd4f8963
......@@ -54,12 +54,10 @@ initializeFollowDiscussion = (discussion) ->
Discussion.setContentInfo response.content['id'], 'editable', true
Discussion.initializeContent($thread)
Discussion.bindContentEvents($thread)
$(".new-post-form").hide()
$local(".discussion-new-post").show()
$(".new-post-form").addClass("collapsed")
handleCancelNewPost = (elem) ->
$local(".new-post-form").hide()
$local(".discussion-new-post").show()
$(".new-post-form").addClass("collapsed")
handleSimilarPost = (elem) ->
$title = $local(".new-post-title")
......
......@@ -18,7 +18,8 @@ Discussion = @Discussion
<input type="checkbox" class="discussion-auto-watch" id="discussion-autowatch-${discussion_id}" checked="">
<label for="discussion-auto-watch-${discussion_id}">follow this thread</label>
</div>
<div class="reply-post-control">
<div class="new-post-control post-control">
<a class="discussion-cancel-post" href="javascript:void(0)">Cancel</a>
<a class="discussion-submit-post control-button" href="javascript:void(0)">Submit</a>
</div>
</form>
......
......@@ -656,8 +656,8 @@ $tag-text-color: #5b614f;
height: 0;
}
.reply-post-control {
height: 0;
.post-control {
display: none;
}
.tagsinput {
......@@ -666,7 +666,7 @@ $tag-text-color: #5b614f;
}
.new-post-control {
margin-left: 80%;
margin-left: 75%;
margin-top: 1%;
}
......@@ -775,7 +775,7 @@ $tag-text-color: #5b614f;
}
}
.reply-post-control {
.post-control {
overflow: hidden;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment