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

compassinformatics / cpsi-mapview / 12788678247

15 Jan 2025 12:49PM UTC coverage: 26.194% (-0.04%) from 26.231%
12788678247

push

github

web-flow
Add a new permalink button (#694)

487 of 2332 branches covered (20.88%)

Branch coverage included in aggregate %.

2 of 14 new or added lines in 2 files covered. (14.29%)

1449 of 5059 relevant lines covered (28.64%)

1.15 hits per line

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

5.88
/app/controller/button/PermalinkButtonController.js
1
/**
2
 * This class is the controller for the {@link CpsiMapview.view.button.PermalinkButton} button.
3
 */
4
Ext.define('CpsiMapview.controller.button.PermalinkButtonController', {
1✔
5
    extend: 'Ext.app.ViewController',
6

7
    alias: 'controller.cmv_permalink_button',
8
    /**
9
    * Zoom to a permalink
10
    **/
11
    onPermalinkClick: function () {
12

NEW
13
        const me = this;
×
NEW
14
        const defaultValue = window.location.href;
×
NEW
15
        const dialogWidth = me.getView().dialogWidth;
×
NEW
16
        const cfg = {
×
17
            prompt: true,
18
            title: 'Zoom to Permalink',
19
            minWidth: dialogWidth,
20
            message: 'Please enter the permalink below:',
21
            buttons: Ext.Msg.OKCANCEL,
22
            callback: function (btn, text) {
NEW
23
                if (btn == 'ok') {
×
NEW
24
                    var map = me.getView().up('cmv_map');
×
NEW
25
                    var parts = text.split('#map='); // only get the permalink from the URL
×
NEW
26
                    var permalink = null;
×
27

NEW
28
                    if (parts.length === 2) {
×
NEW
29
                        permalink = parts[1];
×
NEW
30
                        map.mapCmp.applyState(
×
31
                            map.permalinkProvider.readPermalinkHash(permalink)
32
                        );
33
                    }
34
                }
35
            },
36
            scope: me,
37
            multiline: false,
38
            value: defaultValue
39
        };
40

NEW
41
        Ext.Msg.prompt(cfg);
×
42
    },
43

44
});
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

© 2026 Coveralls, Inc