Ignore:
Timestamp:
Sep 14, 2012, 5:37:41 PM (12 years ago)
Author:
mistic100
Message:

display public url in a input with auto-select

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/template/edit.tpl

    r17519 r17914  
    1010    afterCopy: function() {ldelim}
    1111      $('.confirm').remove();
     12      $("#publicURL .url").select();
    1213      $('<span class="confirm" style="display:none;">{'Copied'|@translate}</span>').appendTo("#publicURL")
    1314        .fadeIn(400).delay(1000).fadeOut(400, function(){ldelim} $(this).remove(); });
    1415    }
     16  });
     17  $("#publicURL .url").click(function() {ldelim}
     18    $(this).select();
    1519  });
    1620}
     
    6266    <label><input type="radio" name="public" value="0" {if not $collection.PUBLIC}checked="checked"{/if}> {'No'|@translate}</label>
    6367    <label><input type="radio" name="public" value="1" {if $collection.PUBLIC}checked="checked"{/if}> {'Yes'|@translate}</label>
    64     <span id="publicURL" {if not $collection.PUBLIC}style="display:none;"{/if}><span class="button" title="{'Copy to clipboard'|@translate}">&nbsp;</span><span class="url">{$collection.U_PUBLIC}</span></span>
     68    <span id="publicURL" {if not $collection.PUBLIC}style="display:none;"{/if}><span class="button" title="{'Copy to clipboard'|@translate}">&nbsp;</span><input type="text" class="url" value="{$collection.U_PUBLIC}" size="{$collection.U_PUBLIC|strlen}"></span>
    6569  </p>
    6670  <p>
Note: See TracChangeset for help on using the changeset viewer.