refactoring due to facebook/react/pull/15047
This commit is contained in:
@@ -39,7 +39,6 @@ export default class EditAccountView extends React.Component {
|
||||
this.handlePasswordUpdate = this.handlePasswordUpdate.bind(this);
|
||||
this.handleImageChanged = this.handleImageChanged.bind(this);
|
||||
this.handleCheckboxClick = this.handleCheckboxClick.bind(this);
|
||||
this.handleStartAddCred = this.handleStartAddCred.bind(this);
|
||||
this.handleCredChange = this.handleCredChange.bind(this);
|
||||
this.handleCredKeyDown = this.handleCredKeyDown.bind(this);
|
||||
this.handleCredEntered = this.handleCredEntered.bind(this);
|
||||
@@ -92,10 +91,6 @@ export default class EditAccountView extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
handleStartAddCred() {
|
||||
this.setState({addCredActive: true});
|
||||
}
|
||||
|
||||
handleCredChange(e) {
|
||||
this.setState({newCred: e.target.value, addCredInvalid: false});
|
||||
}
|
||||
@@ -169,12 +164,11 @@ export default class EditAccountView extends React.Component {
|
||||
this.state.credentials.map((cred) => {
|
||||
credentials.push(<div key={cred.meth + ":" + cred.val + ":" + cred.done}>{cred.meth}: <tt>{cred.val}</tt>
|
||||
<span > {!cred.done ?
|
||||
<a href="javascript:;"
|
||||
onClick={this.props.onCredConfirm.bind(this, cred.meth, cred.val)}>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.onCredConfirm(cred.meth, cred.val);}}>
|
||||
<FormattedMessage id="validate_credential_action" defaultMessage="confirm"
|
||||
description="Validate credentail call to action" />
|
||||
</a>
|
||||
: null} <a href="javascript:;" onClick={this.props.onCredDelete.bind(this, cred.meth, cred.val)}><i
|
||||
: null} <a href="#" onClick={(e) => {e.preventDefault(); this.props.onCredDelete(cred.meth, cred.val);}}><i
|
||||
className="material-icons gray">delete_outline</i></a></span></div>);
|
||||
});
|
||||
|
||||
@@ -270,7 +264,7 @@ export default class EditAccountView extends React.Component {
|
||||
placeholder="Phone number or email" required="required" autoFocus
|
||||
onChange={this.handleCredChange} onKeyDown={this.handleCredKeyDown} onBlur={this.handleCredEntered} />
|
||||
: null}
|
||||
<div><a href="javascript:;" onClick={this.handleStartAddCred}>+ Add another</a></div>
|
||||
<div><a href="#" onClick={(e) => {e.preventDefault(); this.setState({addCredActive: true});}}>+ Add another</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="hr" />
|
||||
@@ -295,7 +289,7 @@ export default class EditAccountView extends React.Component {
|
||||
</div>
|
||||
<div className="hr" />
|
||||
<div className="panel-form-column">
|
||||
<a href="javascript:;" className="red flat-button" onClick={this.props.onLogout}>
|
||||
<a href="#" className="red flat-button" onClick={(e) => {e.preventDefault(); this.props.onLogout();}}>
|
||||
<i className="material-icons">exit_to_app</i> <FormattedMessage id="button_logout"
|
||||
defaultMessage="Logout" description="Button [Logout]" />
|
||||
</a>
|
||||
|
||||
@@ -339,7 +339,8 @@ class InfoView extends React.Component {
|
||||
this.setState({showPermissionEditorFor: undefined});
|
||||
}
|
||||
|
||||
handleShowAddMembers() {
|
||||
handleShowAddMembers(e) {
|
||||
e.preventDefault();
|
||||
this.props.onInitFind();
|
||||
this.setState({showMemberPanel: true});
|
||||
}
|
||||
@@ -354,6 +355,7 @@ class InfoView extends React.Component {
|
||||
}
|
||||
|
||||
handleLeave() {
|
||||
e.preventDefault();
|
||||
this.props.onLeaveTopic(this.props.topic);
|
||||
}
|
||||
|
||||
@@ -594,13 +596,13 @@ class InfoView extends React.Component {
|
||||
</div>
|
||||
<div className="panel-form-row">
|
||||
{this.state.sharer ?
|
||||
<a href="javascript:;" className="flat-button" onClick={this.handleShowAddMembers}>
|
||||
<a href="#" className="flat-button" onClick={this.handleShowAddMembers}>
|
||||
<i className="material-icons">person_add</i> <FormattedMessage id="button_add_members"
|
||||
defaultMessage="Add members" description="Flat button [Add members] (to topic)" />
|
||||
</a>
|
||||
: null}
|
||||
{!this.state.owner ?
|
||||
<a href="javascript:;" className="red flat-button" onClick={this.handleLeave}>
|
||||
<a href="#" className="red flat-button" onClick={this.handleLeave}>
|
||||
<i className="material-icons">exit_to_app</i> <FormattedMessage id="button_leave"
|
||||
defaultMessage="Leave" description="Flat button [Leave] (topic)" />
|
||||
</a>
|
||||
@@ -624,7 +626,7 @@ class InfoView extends React.Component {
|
||||
</div>
|
||||
:
|
||||
<div className="panel-form-row">
|
||||
<a href="javascript:;" className="red flat-button" onClick={this.handleLeave}>
|
||||
<a href="#" className="red flat-button" onClick={this.handleLeave}>
|
||||
<i className="material-icons">exit_to_app</i> <FormattedMessage id="action_leave_chat"
|
||||
defaultMessage="Leave" description="Action [Leave] chat" />
|
||||
</a>
|
||||
|
||||
@@ -73,7 +73,6 @@ class MessagesView extends React.Component {
|
||||
this.handleFormResponse = this.handleFormResponse.bind(this);
|
||||
this.handleContextClick = this.handleContextClick.bind(this);
|
||||
this.handleShowContextMenuMessage = this.handleShowContextMenuMessage.bind(this);
|
||||
this.handleBackNavigation = this.handleBackNavigation.bind(this);
|
||||
this.handleNewChatAcceptance = this.handleNewChatAcceptance.bind(this);
|
||||
this.handleEnablePeer = this.handleEnablePeer.bind(this);
|
||||
}
|
||||
@@ -486,15 +485,12 @@ class MessagesView extends React.Component {
|
||||
this.props.showContextMenu(params, menuItems);
|
||||
}
|
||||
|
||||
handleBackNavigation() {
|
||||
this.props.onHideMessagesView();
|
||||
}
|
||||
|
||||
handleNewChatAcceptance(action) {
|
||||
this.props.onNewChat(this.state.topic, action);
|
||||
}
|
||||
|
||||
handleEnablePeer() {
|
||||
handleEnablePeer(e) {
|
||||
e.preventDefault();
|
||||
this.props.onChangePermissions(this.state.topic, DEFAULT_ACCESS_MODE, this.state.topic);
|
||||
}
|
||||
|
||||
@@ -579,7 +575,7 @@ class MessagesView extends React.Component {
|
||||
<div id="topic-view" className={this.props.hideSelf ? 'nodisplay' : null}>
|
||||
<div id="topic-caption-panel" className="caption-panel">
|
||||
{this.props.displayMobile ?
|
||||
<a href="javascript:;" id="hide-message-view" onClick={this.handleBackNavigation}>
|
||||
<a href="#" id="hide-message-view" onClick={(e) => {e.preventDefault(); this.props.onHideMessagesView();}}>
|
||||
<i className="material-icons">arrow_back</i>
|
||||
</a>
|
||||
:
|
||||
@@ -605,7 +601,7 @@ class MessagesView extends React.Component {
|
||||
<div id="topic-users" />
|
||||
}
|
||||
<div>
|
||||
<a href="javascript:;" onClick={this.handleContextClick}>
|
||||
<a href="#" onClick={this.handleContextClick}>
|
||||
<i className="material-icons">more_vert</i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -638,7 +634,7 @@ class MessagesView extends React.Component {
|
||||
<div id="peer-messaging-disabled-note">
|
||||
<i className="material-icons secondary">block</i> <FormattedMessage
|
||||
id="peers_messaging_disabled" defaultMessage="Peer's messaging is disabled."
|
||||
description="Shown when the p2p peer's messaging is disabled" /> <a href="javascript:;"
|
||||
description="Shown when the p2p peer's messaging is disabled" /> <a href="#"
|
||||
onClick={this.handleEnablePeer}><FormattedMessage id="enable_peers_messaging"
|
||||
defaultMessage="Enable" description="Call to action to enable peer's messaging" /></a>.
|
||||
</div> : null}
|
||||
|
||||
@@ -56,19 +56,19 @@ export default class NewTopicView extends React.Component {
|
||||
<div className="flex-column">
|
||||
<ul className="tabbar">
|
||||
<li className={this.state.tabSelected === "p2p" ? "active" : null}>
|
||||
<a href="javascript:;" data-id="p2p" onClick={this.handleTabClick}>
|
||||
<a href="#" data-id="p2p" onClick={this.handleTabClick}>
|
||||
<FormattedMessage id="tabtitle_find_user" defaultMessage="find"
|
||||
description="Tab title Find" />
|
||||
</a>
|
||||
</li>
|
||||
<li className={this.state.tabSelected === "grp" ? "active" : null}>
|
||||
<a href="javascript:;" data-id="grp" onClick={this.handleTabClick}>
|
||||
<a href="#" data-id="grp" onClick={this.handleTabClick}>
|
||||
<FormattedMessage id="tabtitle_new_group" defaultMessage="new group"
|
||||
description="Tab title New Group" />
|
||||
</a>
|
||||
</li>
|
||||
<li className={this.state.tabSelected === "byid" ? "active" : null}>
|
||||
<a href="javascript:;" data-id="byid" onClick={this.handleTabClick}>
|
||||
<a href="#" data-id="byid" onClick={this.handleTabClick}>
|
||||
<FormattedMessage id="tabtitle_group_by_id" defaultMessage="by id"
|
||||
description="Tab title Find topic by ID" />
|
||||
</a>
|
||||
|
||||
@@ -56,8 +56,9 @@ export default class Attachment extends React.Component {
|
||||
if (!this.props.uploader && !this.state.downloader &&
|
||||
!(/^(?:(?:[a-z]+:)?\/\/)/i.test(this.props.downloadUrl))) {
|
||||
// Relative URL. Use download helper.
|
||||
url = "javascript:;";
|
||||
url = '#';
|
||||
helperFunc = (e) => {
|
||||
e.preventDefault();
|
||||
this.downloadFile(this.props.downloadUrl, this.props.filename, this.props.mimetype);
|
||||
};
|
||||
} else {
|
||||
|
||||
@@ -14,7 +14,6 @@ export default class AvatarUpload extends React.Component {
|
||||
};
|
||||
|
||||
this.handleFileUpload = this.handleFileUpload.bind(this);
|
||||
this.handleClear = this.handleClear.bind(this);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
@@ -39,10 +38,6 @@ export default class AvatarUpload extends React.Component {
|
||||
e.target.value = '';
|
||||
}
|
||||
|
||||
handleClear() {
|
||||
this.props.onImageChanged(null);
|
||||
}
|
||||
|
||||
render() {
|
||||
// Randomize id value in case more than one AvatarUpload is shown
|
||||
// at the same time.
|
||||
@@ -51,7 +46,7 @@ export default class AvatarUpload extends React.Component {
|
||||
<div className="avatar-upload">
|
||||
{this.props.readOnly || !this.state.dataUrl ?
|
||||
null :
|
||||
<a href="javascript:;" className="clear-avatar" onClick={this.handleClear}>
|
||||
<a href="#" className="clear-avatar" onClick={(e) => {e.preventDefault(); this.props.onImageChanged(null);}}>
|
||||
<i className="material-icons">clear</i>
|
||||
</a>}
|
||||
{this.state.dataUrl ?
|
||||
|
||||
@@ -125,7 +125,7 @@ export default class ChatMessage extends React.Component {
|
||||
received={this.props.received} />
|
||||
</div>
|
||||
<span className="menuTrigger">
|
||||
<a href="javascript:;" onClick={this.handleContextClick}>
|
||||
<a href="#" onClick={this.handleContextClick}>
|
||||
<i className="material-icons">expand_more</i>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
@@ -39,23 +39,7 @@ export default class ChipInput extends React.Component {
|
||||
this.setState({input: ''});
|
||||
}
|
||||
}
|
||||
/*
|
||||
static getDerivedStateFromProps(nextProps, prevState) {
|
||||
const state = {
|
||||
placeholder: nextProps.chips ? '' : nextProps.prompt,
|
||||
sortedChips: ChipInput.sortChips(nextProps.chips, nextProps.required),
|
||||
chipIndex: ChipInput.indexChips(nextProps.chips),
|
||||
focused: prevState && prevState.focused
|
||||
};
|
||||
|
||||
if (!prevState || nextProps.chips.length > prevState.sortedChips.length) {
|
||||
// Chip added: clear input.
|
||||
state.input = '';
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
*/
|
||||
// Map chip index to user name
|
||||
static indexChips(chips) {
|
||||
const index = {};
|
||||
|
||||
@@ -9,7 +9,8 @@ export default class Chip extends React.PureComponent {
|
||||
this.handleCancel = this.handleCancel.bind(this);
|
||||
}
|
||||
|
||||
handleCancel() {
|
||||
handleCancel(e) {
|
||||
e.preventDefault();
|
||||
this.props.onCancel(this.props.topic, this.props.index);
|
||||
}
|
||||
|
||||
@@ -29,7 +30,7 @@ export default class Chip extends React.PureComponent {
|
||||
}
|
||||
<span>{title}</span>
|
||||
{this.props.onCancel && !this.props.required ?
|
||||
<a href="javascript:;" onClick={this.handleCancel} >×</a>
|
||||
<a href="#" onClick={this.handleCancel} >×</a>
|
||||
: <span className="spacer" />}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class Contact extends React.Component {
|
||||
</div>
|
||||
{this.props.showContextMenu ?
|
||||
<span className="menuTrigger">
|
||||
<a href="javascript:;" onClick={this.handleContextClick}>
|
||||
<a href="#" onClick={this.handleContextClick}>
|
||||
<i className="material-icons">expand_more</i>
|
||||
</a>
|
||||
</span> : null}
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class ErrorPanel extends React.PureComponent {
|
||||
<span>
|
||||
<span dangerouslySetInnerHTML={{__html: this.props.text}} />
|
||||
{this.props.action ?
|
||||
<a href="javascript:;" onClick={this.props.action}>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.action();}}>
|
||||
{this.props.actionText}
|
||||
</a>
|
||||
: null}
|
||||
|
||||
@@ -8,7 +8,7 @@ export default class FileProgress extends React.PureComponent {
|
||||
<div className="uploader">
|
||||
<div><span style={{width: (this.props.progress * 100) + "%"}}></span></div>
|
||||
{this.props.progress < 0.999 ?
|
||||
<a href="javascript:;" onClick={this.props.onCancel}>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.onCancel();}}>
|
||||
<i className="material-icons">close</i> <FormattedMessage id="action_cancel"
|
||||
defaultMessage="cancel" description="Call to action [cancel]" />
|
||||
</a>
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class ImagePreview extends React.PureComponent {
|
||||
<i className="material-icons">file_download</i> <FormattedMessage
|
||||
id="download_action" defaultMessage="download" description="Call to action [download]" />
|
||||
</a>
|
||||
<a href="javascript:;" onClick={this.props.onClose}><i className="material-icons gray">close</i></a>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.onClose();}}><i className="material-icons gray">close</i></a>
|
||||
</div>
|
||||
<div id="image-preview-container" ref={function(ref) {instance.container = ref;}}>
|
||||
<img src={this.props.content.url} style={size} />
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
import React from 'react';
|
||||
|
||||
export default class MenuCancel extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<a href="javascript:;" onClick={this.props.onCancel}><i className="material-icons">close</i></a>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.onCancel();}}><i className="material-icons">close</i></a>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ export default class MenuContacts extends React.PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<a href="javascript:;" onClick={this.props.onNewTopic}><i className="material-icons">chat</i></a>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.onNewTopic();}}><i className="material-icons">chat</i></a>
|
||||
|
||||
<a href="javascript:;" onClick={this.props.onSettings}><i className="material-icons">settings</i></a>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.onSettings();}}><i className="material-icons">settings</i></a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ export default class MenuStart extends React.PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<a href="javascript:;" onClick={this.props.onSignUp}><i className="material-icons">person_add</i></a>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.onSignUp();}}><i className="material-icons">person_add</i></a>
|
||||
|
||||
<a href="javascript:;" onClick={this.props.onSettings}><i className="material-icons">settings</i></a>
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.props.onSettings();}}><i className="material-icons">settings</i></a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ export default class SearchContacts extends React.PureComponent {
|
||||
this.props.onSearchContacts(query.length > 0 ? query : Tinode.DEL_CHAR);
|
||||
}
|
||||
|
||||
handleClear() {
|
||||
handleClear(e) {
|
||||
e.preventDefault();
|
||||
if (this.state.edited) {
|
||||
this.props.onSearchContacts(Tinode.DEL_CHAR);
|
||||
}
|
||||
@@ -63,7 +64,7 @@ export default class SearchContacts extends React.PureComponent {
|
||||
value={this.state.search} onChange={this.handleSearchChange}
|
||||
onKeyDown={this.handleKeyDown} required autoFocus />
|
||||
}</FormattedMessage>
|
||||
<a href="javascript:;" onClick={this.handleClear}>
|
||||
<a href="#" onClick={this.handleClear}>
|
||||
<i className="material-icons">close</i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -149,7 +149,8 @@ class SendMessage extends React.PureComponent {
|
||||
e.target.value = '';
|
||||
}
|
||||
|
||||
handleSend() {
|
||||
handleSend(e) {
|
||||
e.preventDefault();
|
||||
const message = this.state.message.trim();
|
||||
if (message) {
|
||||
this.props.sendMessage(this.state.message.trim());
|
||||
@@ -193,12 +194,12 @@ class SendMessage extends React.PureComponent {
|
||||
<div id="send-message-panel">
|
||||
{this.props.disabled ?
|
||||
<i className="material-icons disabled">photo</i> :
|
||||
<a href="javascript:;" onClick={(e) => {this.attachImage.click();}} title="Add image">
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.attachImage.click();}} title="Add image">
|
||||
<i className="material-icons secondary">photo</i>
|
||||
</a>}
|
||||
{this.props.disabled ?
|
||||
<i className="material-icons disabled">attach_file</i> :
|
||||
<a href="javascript:;" onClick={(e) => {this.attachFile.click();}} title="Attach file">
|
||||
<a href="#" onClick={(e) => {e.preventDefault(); this.attachFile.click();}} title="Attach file">
|
||||
<i className="material-icons secondary">attach_file</i>
|
||||
</a>}
|
||||
<textarea id="sendMessage" placeholder={prompt}
|
||||
@@ -208,7 +209,7 @@ class SendMessage extends React.PureComponent {
|
||||
autoFocus />
|
||||
{this.props.disabled ?
|
||||
<i className="material-icons disabled">send</i> :
|
||||
<a href="javascript:;" onClick={this.handleSend} title="Send">
|
||||
<a href="#" onClick={this.handleSend} title="Send">
|
||||
<i className="material-icons">send</i>
|
||||
</a>}
|
||||
<input type="file" ref={(ref) => {this.attachFile = ref;}}
|
||||
|
||||
@@ -17,7 +17,6 @@ export default class TagManager extends React.Component {
|
||||
activated: this.props.activated
|
||||
};
|
||||
|
||||
this.handleShowTagManager = this.handleShowTagManager.bind(this);
|
||||
this.handleTagInput = this.handleTagInput.bind(this);
|
||||
this.handleAddTag = this.handleAddTag.bind(this);
|
||||
this.handleRemoveTag = this.handleRemoveTag.bind(this);
|
||||
@@ -32,10 +31,6 @@ export default class TagManager extends React.Component {
|
||||
return null;
|
||||
}
|
||||
|
||||
handleShowTagManager() {
|
||||
this.setState({activated: true});
|
||||
}
|
||||
|
||||
handleTagInput(text) {
|
||||
this.setState({tagInput: text});
|
||||
if (text.length > 0) {
|
||||
@@ -138,7 +133,7 @@ export default class TagManager extends React.Component {
|
||||
</div>
|
||||
:
|
||||
<div>
|
||||
<a href="javascript:;" className="flat-button" onClick={this.handleShowTagManager}>
|
||||
<a href="#" className="flat-button" onClick={(e) => {e.preventDefault(); this.setState({activated: true});}}>
|
||||
<i className="material-icons">edit</i> <FormattedMessage id="title_manage_tags" defaultMessage="Manage"
|
||||
description="Section title for the list of tags" />
|
||||
</a>
|
||||
|
||||
+146
-81
@@ -1323,7 +1323,6 @@ var EditAccountView = function (_React$Component) {
|
||||
_this.handlePasswordUpdate = _this.handlePasswordUpdate.bind(_assertThisInitialized(_this));
|
||||
_this.handleImageChanged = _this.handleImageChanged.bind(_assertThisInitialized(_this));
|
||||
_this.handleCheckboxClick = _this.handleCheckboxClick.bind(_assertThisInitialized(_this));
|
||||
_this.handleStartAddCred = _this.handleStartAddCred.bind(_assertThisInitialized(_this));
|
||||
_this.handleCredChange = _this.handleCredChange.bind(_assertThisInitialized(_this));
|
||||
_this.handleCredKeyDown = _this.handleCredKeyDown.bind(_assertThisInitialized(_this));
|
||||
_this.handleCredEntered = _this.handleCredEntered.bind(_assertThisInitialized(_this));
|
||||
@@ -1395,13 +1394,6 @@ var EditAccountView = function (_React$Component) {
|
||||
this.props.onTogglePushNotifications(checked);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "handleStartAddCred",
|
||||
value: function handleStartAddCred() {
|
||||
this.setState({
|
||||
addCredActive: true
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "handleCredChange",
|
||||
value: function handleCredChange(e) {
|
||||
@@ -1506,14 +1498,22 @@ var EditAccountView = function (_React$Component) {
|
||||
credentials.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
key: cred.meth + ":" + cred.val + ":" + cred.done
|
||||
}, cred.meth, ": ", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tt", null, cred.val), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, " ", !cred.done ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: _this2.props.onCredConfirm.bind(_this2, cred.meth, cred.val)
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this2.props.onCredConfirm(cred.meth, cred.val);
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], {
|
||||
id: "validate_credential_action",
|
||||
defaultMessage: "confirm"
|
||||
})) : null, " ", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: _this2.props.onCredDelete.bind(_this2, cred.meth, cred.val)
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this2.props.onCredDelete(cred.meth, cred.val);
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons gray"
|
||||
}, "delete_outline")))));
|
||||
@@ -1626,8 +1626,14 @@ var EditAccountView = function (_React$Component) {
|
||||
onKeyDown: this.handleCredKeyDown,
|
||||
onBlur: this.handleCredEntered
|
||||
}) : null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.handleStartAddCred
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this2.setState({
|
||||
addCredActive: true
|
||||
});
|
||||
}
|
||||
}, "+ Add another")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
className: "hr"
|
||||
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
@@ -1657,9 +1663,13 @@ var EditAccountView = function (_React$Component) {
|
||||
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
className: "panel-form-column"
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
className: "red flat-button",
|
||||
onClick: this.props.onLogout
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this2.props.onLogout();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "exit_to_app"), " ", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], {
|
||||
@@ -2121,7 +2131,8 @@ var InfoView = function (_React$Component) {
|
||||
}
|
||||
}, {
|
||||
key: "handleShowAddMembers",
|
||||
value: function handleShowAddMembers() {
|
||||
value: function handleShowAddMembers(e) {
|
||||
e.preventDefault();
|
||||
this.props.onInitFind();
|
||||
this.setState({
|
||||
showMemberPanel: true
|
||||
@@ -2145,6 +2156,7 @@ var InfoView = function (_React$Component) {
|
||||
}, {
|
||||
key: "handleLeave",
|
||||
value: function handleLeave() {
|
||||
e.preventDefault();
|
||||
this.props.onLeaveTopic(this.props.topic);
|
||||
}
|
||||
}, {
|
||||
@@ -2368,7 +2380,7 @@ var InfoView = function (_React$Component) {
|
||||
}))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
className: "panel-form-row"
|
||||
}, this.state.sharer ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
className: "flat-button",
|
||||
onClick: this.handleShowAddMembers
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
@@ -2377,7 +2389,7 @@ var InfoView = function (_React$Component) {
|
||||
id: "button_add_members",
|
||||
defaultMessage: "Add members"
|
||||
})) : null, !this.state.owner ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
className: "red flat-button",
|
||||
onClick: this.handleLeave
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
@@ -2404,7 +2416,7 @@ var InfoView = function (_React$Component) {
|
||||
})) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
className: "panel-form-row"
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
className: "red flat-button",
|
||||
onClick: this.handleLeave
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
@@ -2790,7 +2802,6 @@ var MessagesView = function (_React$Component) {
|
||||
_this.handleFormResponse = _this.handleFormResponse.bind(_assertThisInitialized(_this));
|
||||
_this.handleContextClick = _this.handleContextClick.bind(_assertThisInitialized(_this));
|
||||
_this.handleShowContextMenuMessage = _this.handleShowContextMenuMessage.bind(_assertThisInitialized(_this));
|
||||
_this.handleBackNavigation = _this.handleBackNavigation.bind(_assertThisInitialized(_this));
|
||||
_this.handleNewChatAcceptance = _this.handleNewChatAcceptance.bind(_assertThisInitialized(_this));
|
||||
_this.handleEnablePeer = _this.handleEnablePeer.bind(_assertThisInitialized(_this));
|
||||
return _this;
|
||||
@@ -3146,11 +3157,6 @@ var MessagesView = function (_React$Component) {
|
||||
|
||||
this.props.showContextMenu(params, menuItems);
|
||||
}
|
||||
}, {
|
||||
key: "handleBackNavigation",
|
||||
value: function handleBackNavigation() {
|
||||
this.props.onHideMessagesView();
|
||||
}
|
||||
}, {
|
||||
key: "handleNewChatAcceptance",
|
||||
value: function handleNewChatAcceptance(action) {
|
||||
@@ -3158,12 +3164,15 @@ var MessagesView = function (_React$Component) {
|
||||
}
|
||||
}, {
|
||||
key: "handleEnablePeer",
|
||||
value: function handleEnablePeer() {
|
||||
value: function handleEnablePeer(e) {
|
||||
e.preventDefault();
|
||||
this.props.onChangePermissions(this.state.topic, _config_js__WEBPACK_IMPORTED_MODULE_12__["DEFAULT_ACCESS_MODE"], this.state.topic);
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this6 = this;
|
||||
|
||||
var formatMessage = this.props.intl.formatMessage;
|
||||
var component;
|
||||
|
||||
@@ -3257,9 +3266,13 @@ var MessagesView = function (_React$Component) {
|
||||
id: "topic-caption-panel",
|
||||
className: "caption-panel"
|
||||
}, this.props.displayMobile ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
id: "hide-message-view",
|
||||
onClick: this.handleBackNavigation
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this6.props.onHideMessagesView();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "arrow_back")) : null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
@@ -3285,7 +3298,7 @@ var MessagesView = function (_React$Component) {
|
||||
}) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
id: "topic-users"
|
||||
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: this.handleContextClick
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
@@ -3318,7 +3331,7 @@ var MessagesView = function (_React$Component) {
|
||||
id: "peers_messaging_disabled",
|
||||
defaultMessage: "Peer's messaging is disabled."
|
||||
}), " ", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: this.handleEnablePeer
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], {
|
||||
id: "enable_peers_messaging",
|
||||
@@ -3587,7 +3600,7 @@ var NewTopicView = function (_React$Component) {
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("li", {
|
||||
className: this.state.tabSelected === "p2p" ? "active" : null
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
"data-id": "p2p",
|
||||
onClick: this.handleTabClick
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], {
|
||||
@@ -3596,7 +3609,7 @@ var NewTopicView = function (_React$Component) {
|
||||
}))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("li", {
|
||||
className: this.state.tabSelected === "grp" ? "active" : null
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
"data-id": "grp",
|
||||
onClick: this.handleTabClick
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], {
|
||||
@@ -3605,7 +3618,7 @@ var NewTopicView = function (_React$Component) {
|
||||
}))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("li", {
|
||||
className: this.state.tabSelected === "byid" ? "active" : null
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
"data-id": "byid",
|
||||
onClick: this.handleTabClick
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], {
|
||||
@@ -6198,9 +6211,11 @@ var Attachment = function (_React$Component) {
|
||||
var url, helperFunc;
|
||||
|
||||
if (!this.props.uploader && !this.state.downloader && !/^(?:(?:[a-z]+:)?\/\/)/i.test(this.props.downloadUrl)) {
|
||||
url = "javascript:;";
|
||||
url = '#';
|
||||
|
||||
helperFunc = function helperFunc(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this3.downloadFile(_this3.props.downloadUrl, _this3.props.filename, _this3.props.mimetype);
|
||||
};
|
||||
} else {
|
||||
@@ -6289,7 +6304,6 @@ var AvatarUpload = function (_React$Component) {
|
||||
dataUrl: props.avatar
|
||||
};
|
||||
_this.handleFileUpload = _this.handleFileUpload.bind(_assertThisInitialized(_this));
|
||||
_this.handleClear = _this.handleClear.bind(_assertThisInitialized(_this));
|
||||
return _this;
|
||||
}
|
||||
|
||||
@@ -6323,21 +6337,22 @@ var AvatarUpload = function (_React$Component) {
|
||||
});
|
||||
e.target.value = '';
|
||||
}
|
||||
}, {
|
||||
key: "handleClear",
|
||||
value: function handleClear() {
|
||||
this.props.onImageChanged(null);
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this3 = this;
|
||||
|
||||
var randId = "file-input-avatar-" + (Math.random() + '').substr(2);
|
||||
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
className: "avatar-upload"
|
||||
}, this.props.readOnly || !this.state.dataUrl ? null : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
className: "clear-avatar",
|
||||
onClick: this.handleClear
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this3.props.onImageChanged(null);
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "clear")), this.state.dataUrl ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", {
|
||||
@@ -6559,7 +6574,7 @@ var ChatMessage = function (_React$Component) {
|
||||
})), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
||||
className: "menuTrigger"
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: this.handleContextClick
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
@@ -6977,7 +6992,8 @@ var Chip = function (_React$PureComponent) {
|
||||
|
||||
_createClass(Chip, [{
|
||||
key: "handleCancel",
|
||||
value: function handleCancel() {
|
||||
value: function handleCancel(e) {
|
||||
e.preventDefault();
|
||||
this.props.onCancel(this.props.topic, this.props.index);
|
||||
}
|
||||
}, {
|
||||
@@ -6996,7 +7012,7 @@ var Chip = function (_React$PureComponent) {
|
||||
topic: this.props.topic,
|
||||
title: this.props.title
|
||||
})), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, title), this.props.onCancel && !this.props.required ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: this.handleCancel
|
||||
}, "\xD7") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
||||
className: "spacer"
|
||||
@@ -7473,7 +7489,7 @@ var Contact = function (_React$Component) {
|
||||
}))), this.props.showContextMenu ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
||||
className: "menuTrigger"
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: this.handleContextClick
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
@@ -7967,6 +7983,8 @@ var ErrorPanel = function (_React$PureComponent) {
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this2 = this;
|
||||
|
||||
var icons = {
|
||||
err: 'error',
|
||||
warn: 'warning',
|
||||
@@ -7985,8 +8003,12 @@ var ErrorPanel = function (_React$PureComponent) {
|
||||
__html: this.props.text
|
||||
}
|
||||
}), this.props.action ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.props.action
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this2.props.action();
|
||||
}
|
||||
}, this.props.actionText) : null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
className: "cancel"
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_menu_cancel_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
||||
@@ -8050,6 +8072,8 @@ var FileProgress = function (_React$PureComponent) {
|
||||
_createClass(FileProgress, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this = this;
|
||||
|
||||
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
className: "uploader"
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", {
|
||||
@@ -8057,8 +8081,12 @@ var FileProgress = function (_React$PureComponent) {
|
||||
width: this.props.progress * 100 + "%"
|
||||
}
|
||||
})), this.props.progress < 0.999 ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.props.onCancel
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this.props.onCancel();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "close"), " ", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], {
|
||||
@@ -8601,6 +8629,8 @@ var ImagePreview = function (_React$PureComponent) {
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this2 = this;
|
||||
|
||||
if (!this.props.content) {
|
||||
return null;
|
||||
}
|
||||
@@ -8640,8 +8670,12 @@ var ImagePreview = function (_React$PureComponent) {
|
||||
id: "download_action",
|
||||
defaultMessage: "download"
|
||||
})), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.props.onClose
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this2.props.onClose();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons gray"
|
||||
}, "close"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
||||
@@ -9047,18 +9081,24 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
||||
var MenuCancel = function (_React$PureComponent) {
|
||||
_inherits(MenuCancel, _React$PureComponent);
|
||||
|
||||
function MenuCancel(props) {
|
||||
function MenuCancel() {
|
||||
_classCallCheck(this, MenuCancel);
|
||||
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(MenuCancel).call(this, props));
|
||||
return _possibleConstructorReturn(this, _getPrototypeOf(MenuCancel).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(MenuCancel, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this = this;
|
||||
|
||||
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.props.onCancel
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this.props.onCancel();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "close"));
|
||||
@@ -9116,14 +9156,24 @@ var MenuContacts = function (_React$PureComponent) {
|
||||
_createClass(MenuContacts, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this = this;
|
||||
|
||||
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.props.onNewTopic
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this.props.onNewTopic();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "chat")), "\xA0", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.props.onSettings
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this.props.onSettings();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "settings")));
|
||||
@@ -9182,14 +9232,24 @@ var MenuStart = function (_React$PureComponent) {
|
||||
_createClass(MenuStart, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this = this;
|
||||
|
||||
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.props.onSignUp
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this.props.onSignUp();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "person_add")), "\xA0", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
onClick: this.props.onSettings
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this.props.onSettings();
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "settings")));
|
||||
@@ -10019,7 +10079,9 @@ var SearchContacts = function (_React$PureComponent) {
|
||||
}
|
||||
}, {
|
||||
key: "handleClear",
|
||||
value: function handleClear() {
|
||||
value: function handleClear(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (this.state.edited) {
|
||||
this.props.onSearchContacts(tinode_sdk__WEBPACK_IMPORTED_MODULE_2___default.a.DEL_CHAR);
|
||||
}
|
||||
@@ -10064,7 +10126,7 @@ var SearchContacts = function (_React$PureComponent) {
|
||||
autoFocus: true
|
||||
});
|
||||
}), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: this.handleClear
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
@@ -10257,7 +10319,8 @@ var SendMessage = function (_React$PureComponent) {
|
||||
}
|
||||
}, {
|
||||
key: "handleSend",
|
||||
value: function handleSend() {
|
||||
value: function handleSend(e) {
|
||||
e.preventDefault();
|
||||
var message = this.state.message.trim();
|
||||
|
||||
if (message) {
|
||||
@@ -10310,8 +10373,10 @@ var SendMessage = function (_React$PureComponent) {
|
||||
}, this.props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons disabled"
|
||||
}, "photo") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this5.attachImage.click();
|
||||
},
|
||||
title: "Add image"
|
||||
@@ -10320,8 +10385,10 @@ var SendMessage = function (_React$PureComponent) {
|
||||
}, "photo")), this.props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons disabled"
|
||||
}, "attach_file") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this5.attachFile.click();
|
||||
},
|
||||
title: "Attach file"
|
||||
@@ -10341,7 +10408,7 @@ var SendMessage = function (_React$PureComponent) {
|
||||
}), this.props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons disabled"
|
||||
}, "send") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
onClick: this.handleSend,
|
||||
title: "Send"
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
@@ -10517,7 +10584,6 @@ var TagManager = function (_React$Component) {
|
||||
tagInput: '',
|
||||
activated: _this.props.activated
|
||||
};
|
||||
_this.handleShowTagManager = _this.handleShowTagManager.bind(_assertThisInitialized(_this));
|
||||
_this.handleTagInput = _this.handleTagInput.bind(_assertThisInitialized(_this));
|
||||
_this.handleAddTag = _this.handleAddTag.bind(_assertThisInitialized(_this));
|
||||
_this.handleRemoveTag = _this.handleRemoveTag.bind(_assertThisInitialized(_this));
|
||||
@@ -10527,13 +10593,6 @@ var TagManager = function (_React$Component) {
|
||||
}
|
||||
|
||||
_createClass(TagManager, [{
|
||||
key: "handleShowTagManager",
|
||||
value: function handleShowTagManager() {
|
||||
this.setState({
|
||||
activated: true
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "handleTagInput",
|
||||
value: function handleTagInput(text) {
|
||||
this.setState({
|
||||
@@ -10675,9 +10734,15 @@ var TagManager = function (_React$Component) {
|
||||
defautMessage: "Cancel",
|
||||
description: "Rejection button [Cancel]"
|
||||
}))) : null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", {
|
||||
href: "javascript:;",
|
||||
href: "#",
|
||||
className: "flat-button",
|
||||
onClick: this.handleShowTagManager
|
||||
onClick: function onClick(e) {
|
||||
e.preventDefault();
|
||||
|
||||
_this2.setState({
|
||||
activated: true
|
||||
});
|
||||
}
|
||||
}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("i", {
|
||||
className: "material-icons"
|
||||
}, "edit"), " ", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_intl__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], {
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user