Merge remote branch 'upstream/master'

This commit is contained in:
Chris Case 2011-02-14 11:50:08 -08:00
commit 7b26500510
8 changed files with 40 additions and 10 deletions

View file

@ -1978,8 +1978,9 @@ function smilies($s) {
$a = get_app();
return str_replace(
array( ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'),
array( '<3', ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'),
array(
'<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',

BIN
images/smiley-heart.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

View file

@ -44,6 +44,8 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false) {
$a = get_app();
$o = '';
// When used for private messages, we limit correspondence to mutual friends and the selector

View file

@ -29,6 +29,7 @@
$(document).ready(function() {
$.ajaxSetup({cache: false});
msie = $.browser.msie ;
NavUpdate();
// Allow folks to stop the ajax page updates with the pause/break key
@ -210,3 +211,23 @@
$('#panel').hide();
}
function post_comment(id) {
$.post(
"item",
$("#comment-edit-form-" + id).serialize(),
function(data) {
if(data.success) {
$("#comment-edit-wrapper-" + id).hide();
$("#comment-edit-text-" + id).val('');
var tarea = document.getElementById("comment-edit-text-" + id);
if(tarea)
commentClose(tarea,id);
if(timer) clearTimeout(timer);
timer = setTimeout(NavUpdate,10);
}
},
"json"
);
return false;
}

View file

@ -490,7 +490,12 @@ function item_post(&$a) {
}
}
goaway($a->get_baseurl() . "/" . $_POST['return'] );
if((x($_POST,'return')) && strlen($_POST['return']))
goaway($a->get_baseurl() . "/" . $_POST['return'] );
$json = array('success' => 1);
echo json_encode($json);
killme();
// NOTREACHED
}

View file

@ -340,7 +340,7 @@ function network_content(&$a, $update = 0) {
if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array(
'$return_path' => $_SESSION['return_url'],
'$return_path' => '', // $_SESSION['return_url'],
'$type' => 'net-comment',
'$id' => $item['item_id'],
'$parent' => $item['parent'],

View file

@ -293,7 +293,7 @@ function profile_content(&$a, $update = 0) {
}
if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array(
'$return_path' => $_SESSION['return_url'],
'$return_path' => '', // $_SESSION['return_url'],
'$type' => 'wall-comment',
'$id' => $item['item_id'],
'$parent' => $item['parent'],

View file

@ -1,9 +1,9 @@
<div class="comment-$wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" >
<input id="f-type-$id" type="hidden" name="type" value="$type" />
<input id="f-profile-uid-$id" type="hidden" name="profile_uid" value="$profile_uid" />
<input id="f-parent-$id" type="hidden" name="parent" value="$parent" />
<input id="f-return-path-$id" type="hidden" name="return" value="$return_path" />
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
<input type="hidden" name="type" value="$type" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
<input type="hidden" name="parent" value="$parent" />
<input type="hidden" name="return" value="$return_path" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
@ -13,9 +13,10 @@
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
<input type="submit" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="Submit" />
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="Submit" />
</div>
<div class="comment-edit-end"></div>
</form>
</div>