• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Brightspace / react-valence-ui-fileviewer / 7995792934

21 Feb 2024 09:25PM UTC coverage: 56.315% (-0.04%) from 56.35%
7995792934

Pull #117

github

web-flow
Merge c19bfe4c3 into 82efc8be8
Pull Request #117: GAUD-5048 - Use new release token

603 of 1444 branches covered (41.76%)

1623 of 2882 relevant lines covered (56.32%)

5.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.43
/src/plugins/generic/download.js
1
'use strict';
2

3
var React = require('react');
1!
4

5
var isIOS = function() {
1✔
6
        return /iP[ao]d|iPhone/.test(window.navigator.userAgent);
7
};
1✔
8

×
9
var Download = React.createClass({
10
        contextTypes : {
11
                getIntlMessage: React.PropTypes.func
12
        },
1✔
13
        propTypes: {
14
                src: React.PropTypes.string
15
        },
16
        download: function() {
17
                if (isIOS()) {
18
                        window.open(this.props.src);
19
                } else {
20
                        document.location.href = this.props.src;
×
21
                }
×
22
        },
23
        render: function() {
×
24
                var downloadButtonText = this.context.getIntlMessage('Plugins.Generic.Download');
25
                if (!this.props.src) {
26
                        return null;
27
                }
4✔
28
                return <div className="vui-fileviewer-generic-download">
4✔
29
                        <button onClick={this.download}>{downloadButtonText}</button>
1✔
30
                </div>;
31
        }
3✔
32
});
33

34
module.exports = Download;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc