Initial commit
This commit is contained in:
53
api-wiaas/client/js/bower_components/ngclipboard/dist/ngclipboard.js
vendored
Normal file
53
api-wiaas/client/js/bower_components/ngclipboard/dist/ngclipboard.js
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/*! ngclipboard - v2.0.0 - 2018-03-03
|
||||
* https://github.com/sachinchoolur/ngclipboard
|
||||
* Copyright (c) 2018 Sachin; Licensed MIT */
|
||||
(function() {
|
||||
'use strict';
|
||||
var MODULE_NAME = 'ngclipboard';
|
||||
var angular, ClipboardJS;
|
||||
|
||||
// Check for CommonJS support
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
angular = require('angular');
|
||||
ClipboardJS = require('clipboard');
|
||||
module.exports = MODULE_NAME;
|
||||
} else {
|
||||
angular = window.angular;
|
||||
ClipboardJS = window.ClipboardJS;
|
||||
}
|
||||
|
||||
angular.module(MODULE_NAME, []).directive('ngclipboard', function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
scope: {
|
||||
ngclipboardSuccess: '&',
|
||||
ngclipboardError: '&'
|
||||
},
|
||||
link: function(scope, element) {
|
||||
//constructor for clipboardjs changed to ClipboardJS
|
||||
var clipboard = new ClipboardJS(element[0]);
|
||||
|
||||
clipboard.on('success', function(e) {
|
||||
scope.$apply(function () {
|
||||
scope.ngclipboardSuccess({
|
||||
e: e
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
clipboard.on('error', function(e) {
|
||||
scope.$apply(function () {
|
||||
scope.ngclipboardError({
|
||||
e: e
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
element.on('$destroy', function() {
|
||||
clipboard.destroy();
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
})();
|
||||
4
api-wiaas/client/js/bower_components/ngclipboard/dist/ngclipboard.min.js
vendored
Normal file
4
api-wiaas/client/js/bower_components/ngclipboard/dist/ngclipboard.min.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/*! ngclipboard - v2.0.0 - 2018-03-03
|
||||
* https://github.com/sachinchoolur/ngclipboard
|
||||
* Copyright (c) 2018 Sachin; Licensed MIT */
|
||||
!function(){"use strict";var a,b,c="ngclipboard";"object"==typeof module&&module.exports?(a=require("angular"),b=require("clipboard"),module.exports=c):(a=window.angular,b=window.ClipboardJS),a.module(c,[]).directive("ngclipboard",function(){return{restrict:"A",scope:{ngclipboardSuccess:"&",ngclipboardError:"&"},link:function(a,c){var d=new b(c[0]);d.on("success",function(b){a.$apply(function(){a.ngclipboardSuccess({e:b})})}),d.on("error",function(b){a.$apply(function(){a.ngclipboardError({e:b})})}),c.on("$destroy",function(){d.destroy()})}}})}();
|
||||
Reference in New Issue
Block a user