Dotclear

Changeset 2200


Ignore:
Timestamp:
04/18/10 22:07:35 (13 years ago)
Author:
Moe
Message:

@ Reply 1.4.1-alpha2 :

  • recreate links and events every time the switch is clicked
Location:
plugins/atReply
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/atReply/_define.php

    r2194 r2200  
    3030  /* Description*/  'Easily reply to comments', 
    3131  /* Author */           'Moe (http://gniark.net/) append extension by buns.fr', 
    32   /* Version */               '1.4.1-alpha1', 
     32  /* Version */               '1.4.1-alpha2', 
    3333  /* Permissions */ 'admin' 
    3434); 
  • plugins/atReply/js/atReply.js

    r2194 r2200  
    1 /* Inspired by http://iyus.info/at-reply-petit-plugin-wordpress-inspire-par-twitter/ */ 
    21$(function() { 
     2     atReply(); 
     3}); 
     4 
     5/* Inspired by 
     6 * http://iyus.info/at-reply-petit-plugin-wordpress-inspire-par-twitter/ 
     7 */ 
     8function atReply() { 
     9     // empty and remove old links, 
     10     //  see http://api.jquery.com/remove/#comment-41237758 
     11     $('a.at_reply_link').empty().remove(); 
     12      
     13     // add links 
    314     $('span.commentAuthor').each(function() { 
    415          /* duplicate the link to create an element on-the-fly, 
     
    3041          }); 
    3142     }); 
    32 }); 
     43} 
  • plugins/atReply/js/atReplyThread.js

    r2194 r2200  
    147147          } 
    148148     } 
    149      //atReplySimple(); 
     149     atReply(); 
    150150} 
    151151 
     
    223223                         }); 
    224224} 
    225  
    226 function atReplySimple() 
    227 { 
    228      /* re-create link event */ 
    229      $('a.at_reply_link').each(function() { 
    230           $(this).click( function () { 
    231                var commentAuthor = $(this).parent().children('.commentAuthor'); 
    232                var id = commentAuthor.attr('id').replace('atreply_','c'); 
    233                var name = commentAuthor.attr('title'); 
    234                $('#c_content').val($('#c_content').val()+'@['+name+'|#'+id+'] : '); 
    235                /* show comment form on Noviny theme and its derivatives */ 
    236                $('#comment-form h3').find('a').trigger('click'); 
    237                /* Noviny will put the focus on the name field, 
    238                     set the focus to the comment content*/ 
    239                $('#c_content').focus(); 
    240                return false; 
    241                }); 
    242      }); 
    243       
    244      if (atReplyDisplayTitle != true) {return;} 
    245      $('span.commentAuthor').each(function() { 
    246           /* add an hover effect */ 
    247           $(this).parent().hover( 
    248           function () { 
    249                $(this).find('.at_reply_title').show(); 
    250           }, 
    251           function () { 
    252                $(this).find('.at_reply_title').hide(); 
    253           }); 
    254      }); 
    255 } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map