From 1a6afc2ef09810e3bd77e584a6d99d5f1453090f Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 26 Nov 2015 17:38:01 +0000 Subject: [PATCH] Move and merge UserSelector --- src/skins/vector/skindex.js | 2 +- .../vector/views/molecules/UserSelector.js | 46 ------------------- .../vector/views/organisms/CreateRoom.js | 2 +- 3 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 src/skins/vector/views/molecules/UserSelector.js diff --git a/src/skins/vector/skindex.js b/src/skins/vector/skindex.js index a9c96c66d5..31622830ce 100644 --- a/src/skins/vector/skindex.js +++ b/src/skins/vector/skindex.js @@ -37,6 +37,7 @@ skin['settings.ChangeDisplayName'] = require('matrix-react-sdk/lib/components/vi skin['settings.ChangePassword'] = require('matrix-react-sdk/lib/components/views/settings/ChangePassword'); skin['elements.EditableText'] = require('matrix-react-sdk/lib/components/views/elements/EditableText'); skin['elements.ProgressBar'] = require('matrix-react-sdk/lib/components/views/elements/ProgressBar'); +skin['elements.UserSelector'] = require('matrix-react-sdk/lib/components/views/elements/UserSelector'); skin['messages.MessageComposer'] = require('matrix-react-sdk/lib/components/views/messages/MessageComposer'); skin['create_room.CreateRoomButton'] = require('matrix-react-sdk/lib/components/views/create_room/CreateRoomButton'); skin['create_room.Presets'] = require('matrix-react-sdk/lib/components/views/create_room/Presets'); @@ -73,7 +74,6 @@ skin['molecules.RoomTooltip'] = require('./views/molecules/RoomTooltip'); skin['molecules.SearchBar'] = require('./views/molecules/SearchBar'); skin['molecules.SenderProfile'] = require('./views/molecules/SenderProfile'); skin['molecules.UnknownMessageTile'] = require('./views/molecules/UnknownMessageTile'); -skin['molecules.UserSelector'] = require('./views/molecules/UserSelector'); skin['organisms.CreateRoom'] = require('./views/organisms/CreateRoom'); skin['organisms.ErrorDialog'] = require('./views/organisms/ErrorDialog'); skin['organisms.LeftPanel'] = require('./views/organisms/LeftPanel'); diff --git a/src/skins/vector/views/molecules/UserSelector.js b/src/skins/vector/views/molecules/UserSelector.js deleted file mode 100644 index 58cb7d215a..0000000000 --- a/src/skins/vector/views/molecules/UserSelector.js +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2015 OpenMarket Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -'use strict'; - -var React = require('react'); - -var UserSelectorController = require('matrix-react-sdk/lib/controllers/molecules/UserSelector') - -module.exports = React.createClass({ - displayName: 'UserSelector', - mixins: [UserSelectorController], - - onAddUserId: function() { - this.addUser(this.refs.user_id_input.value); - this.refs.user_id_input.value = ""; - }, - - render: function() { - var self = this; - return ( -
- - - -
- ); - } -}); diff --git a/src/skins/vector/views/organisms/CreateRoom.js b/src/skins/vector/views/organisms/CreateRoom.js index f18279dbfc..28786ea573 100644 --- a/src/skins/vector/views/organisms/CreateRoom.js +++ b/src/skins/vector/views/organisms/CreateRoom.js @@ -140,7 +140,7 @@ module.exports = React.createClass({ var CreateRoomButton = sdk.getComponent("create_room.CreateRoomButton"); var RoomAlias = sdk.getComponent("create_room.RoomAlias"); var Presets = sdk.getComponent("create_room.Presets"); - var UserSelector = sdk.getComponent("molecules.UserSelector"); + var UserSelector = sdk.getComponent("elements.UserSelector"); var RoomHeader = sdk.getComponent("molecules.RoomHeader"); return (