Merge branch 'clipboard_js' of https://github.com/mtanda/grafana into mtanda-clipboard_js

This commit is contained in:
Torkel Ödegaard 2017-01-16 20:57:16 +01:00
commit 09cec8535e
2 changed files with 1 additions and 1 deletions

View File

@ -72,6 +72,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
link: (scope, elem) => {
var ignoreSideMenuHide;
var body = $('body');
$.fn.modal.Constructor.prototype.enforceFocus = function() {}; // see https://github.com/zenorocha/clipboard.js/issues/155
// handle sidemenu open state
scope.$watch('contextSrv.sidemenu', newVal => {

View File

@ -90,7 +90,6 @@ 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
scope.clipboard = new Clipboard(elem[0]);
});