add cancel button for new post

This commit is contained in:
Rocky Duan
2012-08-13 21:15:04 -07:00
parent dd4f89638d
commit 0fa0f2c8ae
3 changed files with 8 additions and 9 deletions

View File

@@ -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")

View File

@@ -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>

View File

@@ -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;
}
}