Commit 0fa0f2c8 by Rocky Duan

add cancel button for new post

parent dd4f8963
...@@ -54,12 +54,10 @@ initializeFollowDiscussion = (discussion) -> ...@@ -54,12 +54,10 @@ initializeFollowDiscussion = (discussion) ->
Discussion.setContentInfo response.content['id'], 'editable', true Discussion.setContentInfo response.content['id'], 'editable', true
Discussion.initializeContent($thread) Discussion.initializeContent($thread)
Discussion.bindContentEvents($thread) Discussion.bindContentEvents($thread)
$(".new-post-form").hide() $(".new-post-form").addClass("collapsed")
$local(".discussion-new-post").show()
handleCancelNewPost = (elem) -> handleCancelNewPost = (elem) ->
$local(".new-post-form").hide() $(".new-post-form").addClass("collapsed")
$local(".discussion-new-post").show()
handleSimilarPost = (elem) -> handleSimilarPost = (elem) ->
$title = $local(".new-post-title") $title = $local(".new-post-title")
......
...@@ -18,7 +18,8 @@ Discussion = @Discussion ...@@ -18,7 +18,8 @@ Discussion = @Discussion
<input type="checkbox" class="discussion-auto-watch" id="discussion-autowatch-${discussion_id}" checked=""> <input type="checkbox" class="discussion-auto-watch" id="discussion-autowatch-${discussion_id}" checked="">
<label for="discussion-auto-watch-${discussion_id}">follow this thread</label> <label for="discussion-auto-watch-${discussion_id}">follow this thread</label>
</div> </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> <a class="discussion-submit-post control-button" href="javascript:void(0)">Submit</a>
</div> </div>
</form> </form>
......
...@@ -656,8 +656,8 @@ $tag-text-color: #5b614f; ...@@ -656,8 +656,8 @@ $tag-text-color: #5b614f;
height: 0; height: 0;
} }
.reply-post-control { .post-control {
height: 0; display: none;
} }
.tagsinput { .tagsinput {
...@@ -666,7 +666,7 @@ $tag-text-color: #5b614f; ...@@ -666,7 +666,7 @@ $tag-text-color: #5b614f;
} }
.new-post-control { .new-post-control {
margin-left: 80%; margin-left: 75%;
margin-top: 1%; margin-top: 1%;
} }
...@@ -775,7 +775,7 @@ $tag-text-color: #5b614f; ...@@ -775,7 +775,7 @@ $tag-text-color: #5b614f;
} }
} }
.reply-post-control { .post-control {
overflow: hidden; 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