repared metadataplayer url sharing button
authorbellierp
Thu, 06 Jul 2017 11:24:32 +0200
changeset 1490 fac490bffd45
parent 1489 92d9f58eb6ad
child 1491 95823dc12802
repared metadataplayer url sharing button
src/ldt/ldt/static/ldt/metadataplayer/Social.css
src/ldt/ldt/static/ldt/metadataplayer/Social.js
--- a/src/ldt/ldt/static/ldt/metadataplayer/Social.css	Wed Jul 05 13:00:28 2017 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Social.css	Thu Jul 06 11:24:32 2017 +0200
@@ -30,7 +30,7 @@
 }
 
 .Ldt-Social-Input {
-    width: 150px;
+    width: 200px;
 }
 
 .Ldt-Social-CopyBtn {
--- a/src/ldt/ldt/static/ldt/metadataplayer/Social.js	Wed Jul 05 13:00:28 2017 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Social.js	Thu Jul 06 11:24:32 2017 +0200
@@ -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) {