Changeset 51923 in spip-zone
- Timestamp:
- Sep 27, 2011, 1:43:53 PM (9 years ago)
- Location:
- _plugins_/zeroclipboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/zeroclipboard/plugin.xml
r51367 r51923 3 3 <auteur>kent1</auteur> 4 4 <licence>© 2010-2011 GNU/GPL</licence> 5 <version>0.1. 1</version>5 <version>0.1.2</version> 6 6 <icon>images/zeroclipboard_logo.png</icon> 7 7 <etat>dev</etat> -
_plugins_/zeroclipboard/zeroclipboard.js.html
r51367 r51923 10 10 11 11 $(function(){ 12 clip = new ZeroClipboard.Client();13 clip.setHandCursor(true);14 clip.addEventListener('mouseOver',function(client){});15 clip.addEventListener('complete',clipcomplete);16 clip.reposition();17 12 function clipcomplete(client,text){ 18 13 $(client.domElement) … … 22 17 .attr('title','<:zeroclipboard:link_title_copied:>'); 23 18 $(client.domElement).parent().next('.copypaste').focus().select(); 19 var width = $(client.domElement).width(); 20 var height = $(client.domElement).height(); 21 clip.div.innerHTML = clip.getHTML(width,height); 22 clip.reposition(client.domElement); 23 var style = clip.div.style; 24 style.width = '' + width + 'px'; 25 style.height = '' + height + 'px'; 24 26 $('.copypaste_copied').not($(client.domElement)[0]).each(function(){ 25 27 $(this) … … 31 33 32 34 var copypaste_init = function(){ 35 if(clip){ 36 clip.destroy(); 37 } 38 clip = new ZeroClipboard.Client(); 39 clip.setHandCursor(true); 40 clip.addEventListener('mouseOver',function(client){}); 41 clip.addEventListener('complete',clipcomplete); 33 42 $('.copypaste').each(function(){ 34 43 if(!$(this).prev().is('.copypaste_container')) … … 36 45 $(this).prev('div').find('a').unbind('mouseover').mouseover( function() { 37 46 clip.setText($(this).parent().next('.copypaste').val()); 38 clip.glue(this);39 47 clip.receiveEvent('mouseover', null); 40 } ); 48 if(!clip.div) 49 clip.glue(this); 50 else{ 51 clip.reposition(this); 52 var width = $(this).width(); 53 var height = $(this).height(); 54 clip.div.innerHTML = clip.getHTML(width,height); 55 var style = clip.div.style; 56 style.width = '' + width + 'px'; 57 style.height = '' + height + 'px'; 58 } 59 }); 41 60 }); 42 61 var copies = $('.copypaste_container');
Note: See TracChangeset
for help on using the changeset viewer.