diff options
Diffstat (limited to 'plugins/CorePluginsAdmin/angularjs/marketplace/marketplace.directive.js')
-rw-r--r-- | plugins/CorePluginsAdmin/angularjs/marketplace/marketplace.directive.js | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/plugins/CorePluginsAdmin/angularjs/marketplace/marketplace.directive.js b/plugins/CorePluginsAdmin/angularjs/marketplace/marketplace.directive.js deleted file mode 100644 index e528c03bd0..0000000000 --- a/plugins/CorePluginsAdmin/angularjs/marketplace/marketplace.directive.js +++ /dev/null @@ -1,59 +0,0 @@ -/*! - * Piwik - free/libre analytics platform - * - * @link http://piwik.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -/** - * Usage: - * <div piwik-marketplace> - */ -(function () { - - angular.module('piwikApp').directive('piwikMarketplace', piwikMarketplace); - - piwikMarketplace.$inject = ['piwik', '$timeout']; - - function piwikMarketplace(piwik, $timeout){ - - return { - restrict: 'A', - compile: function (element, attrs) { - - return function (scope, element, attrs) { - - $timeout(function () { - - $('.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')); - } - }); - - // Keeps the plugin descriptions the same height - $('.marketplace .plugin .description').dotdotdot({ - after: 'a.more', - watch: 'window' - }); - }); - }; - } - }; - } -})();
\ No newline at end of file |