[DE] removed ZeroClipboard library

This commit is contained in:
Maxim Kadushkin 2016-10-31 16:16:56 +03:00
parent e50396f5ae
commit 1ce369cd54
3 changed files with 7 additions and 62 deletions

View file

@ -319,7 +319,6 @@
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="../../../vendor/ZeroClipboard/ZeroClipboard.min.js"></script>
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>

View file

@ -61,16 +61,6 @@ var ApplicationController = new(function(){
}
// Initialize ZeroClipboard
// -------------------------
ZeroClipboard.setMoviePath('../../../vendor/ZeroClipboard/ZeroClipboard10.swf');
var clipShortUrl = new ZeroClipboard.Client();
var clipEmbedObj = new ZeroClipboard.Client();
clipShortUrl.zIndex = maxZIndex;
clipEmbedObj.zIndex = maxZIndex;
// Utils
// -------------------------
@ -315,6 +305,13 @@ var ApplicationController = new(function(){
handlerToolbarSize();
hidePreloader();
function _copytext(el, event) {
el.select();
if ( !document.execCommand('copy') ) {
window.alert('Browser\'s error! Use keyboard shortcut [Ctrl] + [C]');
}
}
Common.Analytics.trackEvent('Load', 'Complete');
}
@ -556,41 +553,6 @@ var ApplicationController = new(function(){
var documentMoveTimer;
// Initialize clipboard objects
clipShortUrl.addEventListener('mousedown', function() {
if ($('#id-btn-copy-short').hasClass('copied'))
return;
$('#id-btn-copy-short').button('copied');
$('#id-btn-copy-short').addClass('copied');
clipShortUrl.setText($('#id-short-url').val());
setTimeout(function(){
$('#id-btn-copy-short').button('reset');
$('#id-btn-copy-short').removeClass('copied');
}, 2000);
});
clipEmbedObj.addEventListener('mousedown', function(){
if ($('#id-btn-copy-embed').hasClass('copied'))
return;
$('#id-btn-copy-embed').button('copied');
$('#id-btn-copy-embed').addClass('copied');
clipEmbedObj.setText($('#id-textarea-embed').text());
setTimeout(function(){
$('#id-btn-copy-embed').button('reset');
$('#id-btn-copy-embed').removeClass('copied');
}, 2000);
});
clipShortUrl.glue('id-btn-copy-short');
clipEmbedObj.glue('id-btn-copy-embed');
// popover ui handlers

View file

@ -483,21 +483,6 @@
"dest": "../deploy/web-apps/vendor/requirejs/require.js"
}
},
"zeroclipboard": {
"clean": [
"../deploy/web-apps/vendor/ZeroClipboard"
],
"copy": {
"script": {
"expand": true,
"cwd": "../vendor/ZeroClipboard/",
"src": [
"**"
],
"dest": "../deploy/web-apps/vendor/ZeroClipboard/"
}
}
},
"obf_api": {
"ccvars": "../../sdkjs/word/variable.map",
"ccprops": "../../sdkjs/word/property.map",
@ -535,7 +520,6 @@
"deploy-touch",
"deploy-jquery",
"deploy-underscore",
"deploy-zeroclipboard",
"deploy-bootstrap",
"deploy-jszip",
"deploy-jsziputils",