Skip to content

Commit

Permalink
hide/show syllabus edit button when editing/not
Browse files Browse the repository at this point in the history
fixes CNVS-30062

Hides the "Edit" button while editing a syllabus and shows it again
after you finish editing

Test Plan:
* Edit a syllabus
* Stop editing the syllabus in various ways (cancel/submit/trigger an
  error somehow, if that's even possible)
* Verify that the "Edit" button is visible if and only if you are not
  currently editing the syllabus

Change-Id: I0e2e4f7f44b8cf0b8e2ed46b9540b95cf1186a2a
Reviewed-on: https://gerrit.instructure.com/82865
Tested-by: Jenkins
Reviewed-by: Steven Burnett <[email protected]>
QA-Review: Deepeeca Soundarrajan <[email protected]>
Product-Review: Andrew Huff <[email protected]>
  • Loading branch information
ahuff44 committed Jun 22, 2016
1 parent 1ffd8a3 commit 851830f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/coffeescripts/behaviors/SyllabusBehaviors.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ define [

$edit_course_syllabus_form.on 'edit', ->
$edit_course_syllabus_form.show()
$edit_syllabus_link.hide()
$course_syllabus.hide()
$course_syllabus_details.hide()
$course_syllabus_body.val($course_syllabus.data('syllabus_body'))
Expand All @@ -206,6 +207,7 @@ define [

$edit_course_syllabus_form.on 'hide_edit', ->
$edit_course_syllabus_form.hide()
$edit_syllabus_link.show()
$course_syllabus.show()
text = $.trim $course_syllabus.html()
$course_syllabus_details.showIf not text
Expand Down

0 comments on commit 851830f

Please sign in to comment.