src/widgets/Social.js
changeset 1071 02c04d2c8fd8
parent 1013 392ddcd212d7
child 1072 ac1eacb3aa33
--- a/src/widgets/Social.js	Thu Dec 31 15:51:09 2015 +0100
+++ b/src/widgets/Social.js	Sun Nov 12 22:07:33 2017 +0100
@@ -2,7 +2,6 @@
 
 IriSP.Widgets.Social = function(player, config) {
     IriSP.Widgets.Widget.call(this, player, config);
-    ZeroClipboard.setMoviePath( IriSP.getLib('zeroClipboardSwf') );
 };
 
 IriSP.Widgets.Social.prototype = new IriSP.Widgets.Widget();
@@ -19,7 +18,7 @@
 
 IriSP.Widgets.Social.prototype.template =
     '<span class="Ldt-Social">{{#show_url}}<div class="Ldt-Social-Url-Container"><a href="#" draggable="true" target="_blank" class="Ldt-Social-Square Ldt-Social-Url Ldt-TraceMe" title="{{l10n.share_link}}">'
-    + '</a><div class="Ldt-Social-UrlPop"><input class="Ldt-Social-Input"/><div class="Ldt-Social-CopyBtn">{{l10n.copy}}</div></div></div>{{/show_url}}'
+    + '</a><div class="Ldt-Social-UrlPop"><input class="Ldt-Social-Input"/></div></div>{{/show_url}}'
     + '{{#show_fb}}<a href="#" target="_blank" class="Ldt-Social-Fb Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Facebook"></a>{{/show_fb}}'
     + '{{#show_twitter}}<a href="#" target="_blank" class="Ldt-Social-Twitter Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Twitter"></a>{{/show_twitter}}'
     + '{{#show_gplus}}<a href="#" target="_blank" class="Ldt-Social-Gplus Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Google+"></a>{{/show_gplus}}'
@@ -68,23 +67,7 @@
 IriSP.Widgets.Social.prototype.toggleCopy = function() {
     var _pop = this.$.find(".Ldt-Social-UrlPop");
     _pop.toggle();
-    if (_pop.is(":visible")) {
-        if (typeof this.clip == "undefined") {
-            this.clip = new ZeroClipboard.Client();
-            this.clip.setHandCursor( true );
-            this.clip.glue(this.clipId);
-            var _this = this;
-            this.clip.addEventListener( 'onMouseUp', function() {
-                _pop.hide();
-                _this.clip.hide();
-            });
-        }
-        this.clip.show();
-        this.clip.setText( this.url );
-        this.$.find(".Ldt-Social-Input").val(this.url).focus();
-    } else {
-        this.clip.hide();
-    }
+    this.$.find(".Ldt-Social-Input").val(this.url).focus();
 };
 
 IriSP.Widgets.Social.prototype.updateUrls = function(_url, _text) {