diff --git a/core/src/plugins/action.share/res/react-share-form.css b/core/src/plugins/action.share/res/react-share-form.css index 08454075ec..e88980d0e8 100644 --- a/core/src/plugins/action.share/res/react-share-form.css +++ b/core/src/plugins/action.share/res/react-share-form.css @@ -79,6 +79,15 @@ div#react_share_form .additional-actions-links a { display: inline-block; margin-left: 10px; } +div#react_share_form .additional-actions-links a.qrcode-active { + color: #333333; +} +div#react_share_form .qrCode { + text-align: center; +} +div#react_share_form .qrCode canvas { + margin-top: 10px; +} div#react_share_form .form-legend { color: #bbb; margin-top: -5px !important; diff --git a/core/src/plugins/action.share/res/react-share-form.less b/core/src/plugins/action.share/res/react-share-form.less index 1999099b36..c82238f231 100644 --- a/core/src/plugins/action.share/res/react-share-form.less +++ b/core/src/plugins/action.share/res/react-share-form.less @@ -98,6 +98,15 @@ div#react_share_form { cursor: pointer; display: inline-block; margin-left: 10px; + &.qrcode-active{ + color: #333333; + } + } + } + .qrCode{ + text-align: center; + canvas{ + margin-top: 10px; } } .form-legend { diff --git a/core/src/plugins/action.share/res/react/ShareDialog.js b/core/src/plugins/action.share/res/react/ShareDialog.js index dc8fd14a1e..eb6bbcefb6 100644 --- a/core/src/plugins/action.share/res/react/ShareDialog.js +++ b/core/src/plugins/action.share/res/react/ShareDialog.js @@ -854,7 +854,7 @@ showMailer:React.PropTypes.func }, getInitialState: function(){ - return {editLink: false, copyMessage:''}; + return {editLink: false, copyMessage:'', showQRCode: false}; }, toggleEditMode: function(){ if(this.state.editLink && this.state.customLink){ @@ -917,6 +917,10 @@ this.props.showMailer(mailData.subject, mailData.message, []); }, + toggleQRCode: function(){ + this.setState({showQRCode:!this.state.showQRCode}); + }, + render: function(){ var publicLink = this.props.linkData['public_link']; var editAllowed = this.props.editAllowed && !this.props.linkData['hash_is_shorten'] && !this.context.isReadonly() && this.props.shareModel.currentIsOwner(); @@ -944,6 +948,9 @@ if(editAllowed){ actionLinks.push({this.context.getMessage('193')}); } + if(ReactModel.Share.qrcodeEnabled()){ + actionLinks.push({this.context.getMessage('94')}) + } if(actionLinks.length){ actionLinks = (