From 5abb62da3a1c25fdd7cfe00fcee1dcbb080826e6 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 2 Dec 2016 01:57:59 -0300 Subject: [PATCH] Ivan - Update font awesome, add edit topic form with icon and icon color components [skip ci] --- client/src/app-components/topic-edit-modal.js | 17 +- .../src/app-components/topic-edit-modal.scss | 19 + client/src/app-components/topic-viewer.js | 29 +- client/src/app/demo/components-demo-page.js | 2 +- client/src/core-components/color-selector.js | 10 +- .../src/core-components/color-selector.scss | 21 + client/src/core-components/icon-selector.js | 18 +- client/src/core-components/icon-selector.scss | 34 + client/src/core-components/tooltip.js | 38 +- client/src/core-components/tooltip.scss | 33 +- client/src/data/fixtures/article-fixtures.js | 20 + client/src/data/languages/en.js | 8 +- .../src/scss/font_awesome/_font-awesome.scss | 17 - client/src/scss/font_awesome/_icons.scss | 114 +- client/src/scss/font_awesome/_mixins.scss | 38 +- client/src/scss/font_awesome/_variables.scss | 118 +- .../scss/font_awesome/fonts/FontAwesome.otf | Bin 106260 -> 134808 bytes .../fonts/fontawesome-webfont.eot | Bin 68875 -> 165742 bytes .../fonts/fontawesome-webfont.svg | 3305 +++++++++++++---- .../fonts/fontawesome-webfont.ttf | Bin 138204 -> 165548 bytes .../fonts/fontawesome-webfont.woff | Bin 81284 -> 98024 bytes .../fonts/fontawesome-webfont.woff2 | Bin 64464 -> 77160 bytes 22 files changed, 3145 insertions(+), 696 deletions(-) delete mode 100644 client/src/scss/font_awesome/_font-awesome.scss diff --git a/client/src/app-components/topic-edit-modal.js b/client/src/app-components/topic-edit-modal.js index a02c813e..a22b73c4 100644 --- a/client/src/app-components/topic-edit-modal.js +++ b/client/src/app-components/topic-edit-modal.js @@ -31,14 +31,14 @@ class TopicEditModal extends React.Component {
- - - + + + - + {i18n('SAVE')} - +
); @@ -62,10 +62,9 @@ class TopicEditModal extends React.Component { }); } - onDiscardClick() { - this.setState({ - values: this.props.defaultValues - }, this.context.closeModal); + onDiscardClick(event) { + event.preventDefault(); + this.context.closeModal(); } } diff --git a/client/src/app-components/topic-edit-modal.scss b/client/src/app-components/topic-edit-modal.scss index e69de29b..470f01ae 100644 --- a/client/src/app-components/topic-edit-modal.scss +++ b/client/src/app-components/topic-edit-modal.scss @@ -0,0 +1,19 @@ +.topic-edit-modal { + + &__icon { + display: inline-block; + float: left; + } + + &__color { + margin-left: 60px; + } + + &__save-button { + + } + + &__discard-button { + float: right; + } +} \ No newline at end of file diff --git a/client/src/app-components/topic-viewer.js b/client/src/app-components/topic-viewer.js index 390a24b7..81607982 100644 --- a/client/src/app-components/topic-viewer.js +++ b/client/src/app-components/topic-viewer.js @@ -5,6 +5,7 @@ import i18n from 'lib-app/i18n'; import API from 'lib-app/api-call'; import ModalContainer from 'app-components/modal-container'; import TopicEditModal from 'app-components/topic-edit-modal'; +import AreYouSure from 'app-components/are-you-sure'; import Header from 'core-components/header'; import Icon from 'core-components/icon'; @@ -33,6 +34,7 @@ class TopicViewer extends React.Component { {this.props.name} {(this.props.editable) ? this.renderEditButton() : null} + {(this.props.editable) ? this.renderDeleteButton() : null}