1 {% load i18n extra_tags %}
 
   5 Would you like to copy the permanent link to your clipboard?
 
  10 <p><label for="permanent_link_url" style="font-size: 13px;">{% trans "Permanent link" %}:</label></p>
 
  11 <p><textarea id="permanent_link_url" name="permanent_link_url" style="font-size: 12px;" readonly="readonly">{{ url }}</textarea></p>
 
  14 <script type="text/javascript" src="{% media  "/media/js/ZeroClipboard.js" %}"></script>
 
  15 <script type="text/javascript">
 
  16 $(document).ready(function() {
 
  17     // We highlight the content of the text field on click event
 
  18     $('#permanent_link_url').click(function() {
 
  22     // We use ZeroClipboard to copy the URL
 
  23     ZeroClipboard.setMoviePath('{% media '/media/js/ZeroClipboard.swf' %}');
 
  25     // Create the Client Clip
 
  26     var clip = new ZeroClipboard.Client();
 
  28     // Create the glue when on mouse-over event
 
  29     $('#copy_clip_button').live('mouseover', function() {
 
  30         // Take the URL from the input
 
  31         clip.setText($('#permanent_link_url').val());
 
  34         clip.glue('copy_clip_button');
 
  36         // Simulate click on the OK button when we hear a moseDown event on the glue
 
  37         clip.addEventListener('mouseDown', function() {
 
  38             $('#copy_clip_button').click();
 
  41         // Reposition the clip
 
  42         clip.addEventListener('complete', function() {
 
  47     // Hide the clip if someone clicks on the cancel button
 
  48     $('.dialog-no').live('click', function() {