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

Brightspace / react-valence-ui-fileviewer / 7111280825

06 Dec 2023 07:04AM UTC coverage: 56.35% (-32.8%) from 89.198%
7111280825

push

github

web-flow
Merge pull request #114 from Brightspace/venkata/node-sass-update-2

adding npm i in release.yml

604 of 1444 branches covered (0.0%)

1624 of 2882 relevant lines covered (56.35%)

11.45 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');
2!
4

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

×
9
var Download = React.createClass({
10
        contextTypes : {
11
                getIntlMessage: React.PropTypes.func
12
        },
2✔
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
                }
8✔
28
                return <div className="vui-fileviewer-generic-download">
8✔
29
                        <button onClick={this.download}>{downloadButtonText}</button>
2✔
30
                </div>;
31
        }
6✔
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