Changeset 20282

Show
Ignore:
Timestamp:
09/30/08 15:29:06 (5 years ago)
Author:
kenji
Message:

Make javascript external

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • events/phpframework/codeigniter/trunk/system/application/views/public_timeline/main_logged_in.php

    r20198 r20282  
    1 <script type="text/javascript"> 
    2         /* ページ表示後にテキストエリアにフォーカス */ 
    3         $(document).ready(function(){ 
    4                 $('#message').val('').focus(); 
    5         }); 
    6  
    7         /* つぶやきの投稿 */ 
    8         $(function(){ 
    9                 $('#twitter').click(function(){ 
    10                         comment = $('#message').val(); 
    11                         $.post('<?=site_url('status/update')?>', {msg: comment,  
    12                                         ticket: $('#ticket').val(), p: $('#page_').val()}, addComment, 'html'); 
    13                         $('#message').val('').focus(); 
    14                         $('p#last_comment').text(comment); 
    15                 }); 
    16         }); 
    17         function addComment(data){ 
    18                 $('tbody:first').prepend(data);          
    19         } 
    20  
    21         /* 削除 */ 
    22         function delComment(id){ 
    23                 if (confirm('削除してもよいですか?取り消しできません!')){ 
    24                         $.post('<?=site_url('status/delete')?>', {id: id, ticket: $('#ticket').val()}, removeComment, 'html');                   
    25                 }; 
    26         } 
    27         function removeComment(id){ 
    28                 $('tr').remove(id); 
    29         } 
    30  
    31         /* 返事をする */ 
    32         function replyTo(username){ 
    33                 oldValue = $('#message').val().replace(/\s?@\w+\s?/, ''); 
    34                 $('#message').val("@" + username + " " + oldValue); 
    35         } 
    36 </script> 
     1<script type="text/javascript" src="<?=site_url('js')?>"></script> 
    372 
    383