Dotclear

Changeset 2248:f5e96d714a3c


Ignore:
Timestamp:
10/04/13 13:40:57 (10 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Add icon and append "new window" to title for external links
Closes #1726

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/common.js

    r2225 r2248  
    407407 
    408408     // manage outgoing links 
    409      $('.outgoing').each(function() { 
    410           $(this).prop('title',$(this).attr('title')+' ('+dotclear.msg.new_window+')'); 
     409     $('a').filter(function() { 
     410          return ((this.hostname && this.hostname!=location.hostname) 
     411               || $(this).hasClass('outgoing')); 
     412     }).each(function() { 
     413          $(this).prop('title',$(this).prop('title')+' ('+dotclear.msg.new_window+')'); 
     414          if (!$(this).hasClass('outgoing')) { 
     415               $(this).append(' <img src="images/outgoing-blue.png" alt=""/>'); 
     416          } 
    411417     }).click(function(e) { 
    412418          e.preventDefault(); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map