diff --git a/skins/base/css/molecules/MemberTile.css b/skins/base/css/molecules/MemberTile.css index 2f735f62..af78ce06 100644 --- a/skins/base/css/molecules/MemberTile.css +++ b/skins/base/css/molecules/MemberTile.css @@ -17,6 +17,7 @@ limitations under the License. .mx_MemberTile { cursor: pointer; display: table-row; + height: 49px; } .mx_MemberTile_avatar { @@ -36,6 +37,24 @@ limitations under the License. background-color: #dbdbdb; } +.mx_MemberTile_inviteEditing .mx_MemberTile_avatar { + display: none; +} + +.mx_MemberTile_inviteEditing .mx_MemberTile_name { + position: absolute; + width: 200px; +} + +.mx_MemberTile_inviteEditing .mx_MemberTile_name input { + border-radius: 3px; + border: 1px solid #c7c7c7; + font-weight: 300; + font-size: 14px; + padding: 9px; + margin-top: 6px; +} + .mx_MemberTile_power { z-index: 10; position: absolute; diff --git a/skins/base/views/atoms/EditableText.js b/skins/base/views/atoms/EditableText.js index a4508744..38aa5c8d 100644 --- a/skins/base/views/atoms/EditableText.js +++ b/skins/base/views/atoms/EditableText.js @@ -33,6 +33,7 @@ module.exports = React.createClass({ }, onClickDiv: function() { + console.log("onClickDiv triggered"); this.setState({ phase: this.Phases.Edit, }) @@ -57,12 +58,12 @@ module.exports = React.createClass({ if (this.state.value) { editable_el =
{this.state.value}
; } else { - editable_el =
{this.props.placeHolder}
; + editable_el =
{this.props.label}
; } } else if (this.state.phase == this.Phases.Edit) { editable_el = (
- +
); } diff --git a/skins/base/views/molecules/MemberTile.js b/skins/base/views/molecules/MemberTile.js index 1286173d..8dd3f00a 100644 --- a/skins/base/views/molecules/MemberTile.js +++ b/skins/base/views/molecules/MemberTile.js @@ -59,8 +59,7 @@ module.exports = React.createClass({ mainClassName += presenceClass; return ( -
+
- ); - } + // if (this.state.inviting) { + // return ( + //
+ // ); + // } + + var classes = classNames({ + mx_MemberTile: true, + mx_MemberTile_inviteEditing: this.state.editing, + }); + + console.log("rendering inviteTile, with phase as " + (this.refs.invite ? this.refs.invite.state.phase : "unknown")); + return ( -
+
- +
); diff --git a/skins/base/views/organisms/UserSettings.js b/skins/base/views/organisms/UserSettings.js index 9afa3c03..7a57ec76 100644 --- a/skins/base/views/organisms/UserSettings.js +++ b/skins/base/views/organisms/UserSettings.js @@ -73,7 +73,7 @@ module.exports = React.createClass({
- +
Edit
diff --git a/src/controllers/atoms/EditableText.js b/src/controllers/atoms/EditableText.js index 15ee58a7..5ea4ce8c 100644 --- a/src/controllers/atoms/EditableText.js +++ b/src/controllers/atoms/EditableText.js @@ -22,6 +22,7 @@ module.exports = { propTypes: { onValueChanged: React.PropTypes.func, initialValue: React.PropTypes.string, + label: React.PropTypes.string, placeHolder: React.PropTypes.string, }, @@ -34,7 +35,8 @@ module.exports = { return { onValueChanged: function() {}, initialValue: '', - placeHolder: 'Click to set', + label: 'Click to set', + placeholder: '', }; }, @@ -77,6 +79,7 @@ module.exports = { this.setState({ phase: this.Phases.Display, }); + this.onValueChanged(false); }, onValueChanged: function(shouldSubmit) { diff --git a/src/controllers/molecules/MessageComposer.js b/src/controllers/molecules/MessageComposer.js index a9de008d..2ece5636 100644 --- a/src/controllers/molecules/MessageComposer.js +++ b/src/controllers/molecules/MessageComposer.js @@ -200,7 +200,7 @@ module.exports = { }, function(err) { console.error("Command failure: %s", err); Modal.createDialog(ErrorDialog, { - title: "Server Error", + title: "Server error", description: err.message }); }); @@ -208,7 +208,7 @@ module.exports = { else if (cmd.error) { console.error(cmd.error); Modal.createDialog(ErrorDialog, { - title: "Command Error", + title: "Command error", description: cmd.error }); } diff --git a/src/controllers/organisms/MemberList.js b/src/controllers/organisms/MemberList.js index 06952700..29d4f20a 100644 --- a/src/controllers/organisms/MemberList.js +++ b/src/controllers/organisms/MemberList.js @@ -101,7 +101,7 @@ module.exports = { }, function(err) { console.error("Failed to invite: %s", JSON.stringify(err)); Modal.createDialog(ErrorDialog, { - title: "Invite Server Error", + title: "Server error whilst inviting", description: err.message }); self.setState({