Merge pull request #697 from matrix-org/dbkr/missed_accessiblebuttons

Convert some missed buttons to AccessibleButton
This commit is contained in:
Richard van der Hoff 2017-02-15 13:10:14 +00:00 committed by GitHub
commit a5325ee14a

View File

@ -14,17 +14,18 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
var q = require("q"); import q from 'q';
var React = require('react'); import React from 'react';
var MatrixClientPeg = require('../../../MatrixClientPeg'); import MatrixClientPeg from '../../../MatrixClientPeg';
var SdkConfig = require('../../../SdkConfig'); import SdkConfig from '../../../SdkConfig';
var sdk = require('../../../index'); import sdk from '../../../index';
var Modal = require('../../../Modal'); import Modal from '../../../Modal';
var ObjectUtils = require("../../../ObjectUtils"); import ObjectUtils from '../../../ObjectUtils';
var dis = require("../../../dispatcher"); import dis from '../../../dispatcher';
var ScalarAuthClient = require("../../../ScalarAuthClient"); import ScalarAuthClient from '../../../ScalarAuthClient';
var ScalarMessaging = require('../../../ScalarMessaging'); import ScalarMessaging from '../../../ScalarMessaging';
var UserSettingsStore = require('../../../UserSettingsStore'); import UserSettingsStore from '../../../UserSettingsStore';
import AccessibleButton from '../elements/AccessibleButton';
// parse a string as an integer; if the input is undefined, or cannot be parsed // parse a string as an integer; if the input is undefined, or cannot be parsed
@ -635,16 +636,16 @@ module.exports = React.createClass({
if (myMember) { if (myMember) {
if (myMember.membership === "join") { if (myMember.membership === "join") {
leaveButton = ( leaveButton = (
<div className="mx_RoomSettings_leaveButton" onClick={ this.onLeaveClick }> <AccessibleButton className="mx_RoomSettings_leaveButton" onClick={ this.onLeaveClick }>
Leave room Leave room
</div> </AccessibleButton>
); );
} }
else if (myMember.membership === "leave") { else if (myMember.membership === "leave") {
leaveButton = ( leaveButton = (
<div className="mx_RoomSettings_leaveButton" onClick={ this.onForgetClick }> <AccessibleButton className="mx_RoomSettings_leaveButton" onClick={ this.onForgetClick }>
Forget room Forget room
</div> </AccessibleButton>
); );
} }
} }