Commit 3df11900 by Mitsuhiro Tanda

patch for clipboard.js work

parent db2718a6
define(['angular',
'lodash',
'jquery',
'require',
'app/core/config',
],
function (angular, _, require, config) {
function (angular, _, $, require, config) {
'use strict';
var module = angular.module('grafana.controllers');
......@@ -89,6 +90,7 @@ function (angular, _, require, config) {
module.directive('clipboardButton',function() {
return function(scope, elem) {
require(['vendor/clipboard/dist/clipboard'], function(Clipboard) {
$.fn.modal.Constructor.prototype.enforceFocus = function() {}; // see https://github.com/zenorocha/clipboard.js/issues/155
new Clipboard(elem[0]);
});
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment