Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pluginExtend.js « javascripts « CorePluginsAdmin « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ecaf872504400784db55fb2b24f97525fbc368b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*!
 * Piwik - free/libre analytics platform
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */

$(document).ready(function () {

    $('.pluginslistActionBar .uploadPlugin').click(function (event) {
        event.preventDefault();

        piwikHelper.modalConfirm('#installPluginByUpload', {
            yes: function () {
                window.location = link;
            }
        });
    });

    $('#uploadPluginForm').submit(function (event) {

        var $zipFile = $('[name=pluginZip]');
        var fileName = $zipFile.val();

        if (!fileName || '.zip' != fileName.slice(-4)) {
            event.preventDefault();
            alert(_pk_translate('CorePluginsAdmin_NoZipFileSelected'));
        }
    });

});