From 99ea0e1af86be52dd238594a19a4e119d6eba6a7 Mon Sep 17 00:00:00 2001 From: diminator Date: Thu, 6 Aug 2015 13:56:37 +0200 Subject: [PATCH] action-panel WIP --- js/components/ascribe_forms/form_signup.js | 3 +- js/components/ascribe_panel/action_panel.js | 71 +++++++++++++++++++ .../prize/components/settings_container.js | 35 ++++----- sass/ascribe_panel.scss | 13 ++++ sass/main.scss | 1 + 5 files changed, 102 insertions(+), 21 deletions(-) create mode 100644 js/components/ascribe_panel/action_panel.js create mode 100644 sass/ascribe_panel.scss diff --git a/js/components/ascribe_forms/form_signup.js b/js/components/ascribe_forms/form_signup.js index 91479e4b..55aff4b8 100644 --- a/js/components/ascribe_forms/form_signup.js +++ b/js/components/ascribe_forms/form_signup.js @@ -75,7 +75,7 @@ let SignupForm = React.createClass({ let tooltipPassword = getLangText('Your password must be at least 10 characters') + '.\n ' + getLangText('This password is securing your digital property like a bank account') + '.\n ' + getLangText('Store it in a safe place') + '!'; - + let email = this.getQuery().email ? this.getQuery().email : null; return (
+
+ {this.props.title} +
+
+ + {this.props.content} + + + {this.props.buttons} + +
+ + ); + } +}); + +export default ActionPanel; \ No newline at end of file diff --git a/js/components/whitelabel/prize/components/settings_container.js b/js/components/whitelabel/prize/components/settings_container.js index af72ac18..fecc1fd0 100644 --- a/js/components/whitelabel/prize/components/settings_container.js +++ b/js/components/whitelabel/prize/components/settings_container.js @@ -16,6 +16,8 @@ import Form from '../../../ascribe_forms/form'; import Property from '../../../ascribe_forms/property'; import FormPropertyHeader from '../../../ascribe_forms/form_property_header'; +import ActionPanel from '../../../ascribe_panel/action_panel'; + import Table from '../../../ascribe_table/table'; import TableItem from '../../../ascribe_table/table_item'; import TableItemText from '../../../ascribe_table/table_item_text'; @@ -49,13 +51,13 @@ let Settings = React.createClass({ }, render() { - let prize_settings = null; + let prizeSettings = null; if (this.state.currentUser.is_admin){ - prize_settings = ; + prizeSettings = ; } return ( - {prize_settings} + {prizeSettings} ); } @@ -139,6 +141,7 @@ let PrizeJurySettings = React.createClass({ PrizeJuryActions.fetchJury(); let notification = new GlobalNotificationModel(response.notification, 'success', 5000); GlobalNotificationActions.appendGlobalNotification(notification); + this.refs.form.refs.email.refs.input.getDOMNode().value = null; }, render() { @@ -150,30 +153,21 @@ let PrizeJurySettings = React.createClass({ if (this.state.members.length > -1) { content = this.state.members.map(function(member, i) { return ( - -
-
- {member.status} -
-
- -
-
-
); + } + />); }, this); content = (
- - {content} -
- + {content}
); } return ( @@ -181,6 +175,7 @@ let PrizeJurySettings = React.createClass({

Jury Members

diff --git a/sass/ascribe_panel.scss b/sass/ascribe_panel.scss new file mode 100644 index 00000000..43f8f15f --- /dev/null +++ b/sass/ascribe_panel.scss @@ -0,0 +1,13 @@ +.ascribe-panel-wrapper { + border: 1px solid #F5F5F5; +} + +.ascribe-panel-title { + padding: 1em 0 1em 1.5em; +} + +.ascribe-panel-content { + padding: .75em 0 .75em 1em; + font-size: 1em; + color: #616161; +} \ No newline at end of file diff --git a/sass/main.scss b/sass/main.scss index d8e5e7ff..5f00d2c9 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -27,6 +27,7 @@ $BASE_URL: '<%= BASE_URL %>'; @import 'ascribe_settings'; @import 'ascribe_slides_container'; @import 'ascribe_form'; +@import 'ascribe_panel'; @import 'whitelabel/index';