diff --git a/app/components/project-long-description.js b/app/components/project-long-description.js index ae7875f57..19ccef0b5 100644 --- a/app/components/project-long-description.js +++ b/app/components/project-long-description.js @@ -56,21 +56,21 @@ export default Component.extend({ actions: { /** - Action that toggles edit mode. + Action that leaves edit mode without saving changes. - @method edit + @method cancel */ - edit() { - this._enterEditMode(); + cancel() { + this._enterReadMode(); }, /** - Action that leaves edit mode without saving changes. + Action that toggles edit mode. - @method cancel + @method edit */ - cancel() { - this._enterReadMode(); + edit() { + this._enterEditMode(); }, /** diff --git a/app/index.html b/app/index.html index 008312764..65b37a324 100644 --- a/app/index.html +++ b/app/index.html @@ -3,7 +3,7 @@ - + diff --git a/app/styles/components/project-long-description.scss b/app/styles/components/project-long-description.scss index 00445797f..898863214 100644 --- a/app/styles/components/project-long-description.scss +++ b/app/styles/components/project-long-description.scss @@ -35,7 +35,7 @@ margin-top: 10px; margin-bottom: 10px; - button.save { + .actions { float: right; } } diff --git a/app/templates/components/editor-with-preview.hbs b/app/templates/components/editor-with-preview.hbs index 9c90b8ca0..6175e3e32 100644 --- a/app/templates/components/editor-with-preview.hbs +++ b/app/templates/components/editor-with-preview.hbs @@ -11,6 +11,7 @@ {{#if editing}}
{{submittable-textarea + autoresize=true classNameBindings="textareaFocused:focused" max-height=350 modifiedSubmit="modifiedSubmit" diff --git a/app/templates/components/project-long-description.hbs b/app/templates/components/project-long-description.hbs index dac20d9ee..035394d62 100644 --- a/app/templates/components/project-long-description.hbs +++ b/app/templates/components/project-long-description.hbs @@ -1,46 +1,55 @@ -{{#if descriptionIsBlank}} -
-
- {{#if (can "manage project" project)}} -
-

Add your project description.

-
-

Let's add some detailed information about your project:

-
    -
  • What do you hope to accomplish?
  • -
  • What real problem is this solving?
  • -
  • What kind of support will you need, both right now and in the future?
  • -
  • What risks and challenges will you face?
  • -
-
- {{else}} -
-

Nothing to see here!

-
-

Looks like this project is still getting set up!

-
- {{/if}} -
-
-{{else}} -
- {{#unless inEditMode}} -
-

About this project

+{{#unless isEditing}} + {{#if descriptionIsBlank}} +
+
{{#if (can "manage project" project)}} - +
+

Add your project description.

+
+

Let's add some detailed information about your project:

+
    +
  • What do you hope to accomplish?
  • +
  • What real problem is this solving?
  • +
  • What kind of support will you need, both right now and in the future?
  • +
  • What risks and challenges will you face?
  • +
+
+ {{else}} +
+

Nothing to see here!

+
+

Looks like this project is still getting set up!

+
{{/if}}
- {{{project.longDescriptionBody}}} - {{/unless}} -
-{{/if}} +
+ {{else}} +
+ {{#unless inEditMode}} +
+

About this project

+ {{#if (can "manage project" project)}} + + {{/if}} +
+ {{{project.longDescriptionBody}}} + {{/unless}} +
+ {{/if}} +{{/unless}} {{#if (can "manage project" project)}} {{#if shouldDisplayEditor}}
{{editor-with-preview input=project.longDescriptionMarkdown isLoading=project.isSaving modifiedSubmit="save"}} - + {{log project.errors.longDescriptionMarkdown}} + {{#each project.errors.longDescriptionMarkdown as |error|}} +

{{error.message}}

+ {{/each}} +
+ + +
{{/if}} {{/if}}