replybutton.darc
Add a simple reply button to notices darcs-hash:20080708112016-f7d30-321142883159fa91338754140ac4ea37e54bb746.gz
This commit is contained in:
parent
99eaec8c89
commit
606297e453
|
@ -19,5 +19,14 @@ $(document).ready(function(){
|
||||||
// run once in case there's something in there
|
// run once in case there's something in there
|
||||||
counter();
|
counter();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function doreply(nick) {
|
||||||
|
rgx_username = /^[0-9a-zA-Z\-_.]*$/;
|
||||||
|
if (nick.match(rgx_username)) {
|
||||||
|
replyto = "@" + nick + " ";
|
||||||
|
document.getElementById("status_textarea").value=replyto;
|
||||||
|
document.getElementById("status_textarea").focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
if (!defined('LACONICA')) { exit(1); }
|
if (!defined('LACONICA')) { exit(1); }
|
||||||
|
|
||||||
require_once('XMPPHP/XMPP.php');
|
require_once('xmpp.php');
|
||||||
|
|
||||||
function jabber_valid_base_jid($jid) {
|
function jabber_valid_base_jid($jid) {
|
||||||
# Cheap but effective
|
# Cheap but effective
|
||||||
|
|
|
@ -86,6 +86,7 @@ class StreamAction extends Action {
|
||||||
'href' => $noticeurl,
|
'href' => $noticeurl,
|
||||||
'title' => common_exact_date($notice->created)),
|
'title' => common_exact_date($notice->created)),
|
||||||
common_date_string($notice->created));
|
common_date_string($notice->created));
|
||||||
|
common_element('a', array('href' => "#", 'onclick' => 'javascript: doreply("'.$profile->nickname.'")', 'class' => 'replybutton'), 'reply');
|
||||||
if ($replied_id) {
|
if ($replied_id) {
|
||||||
$replyurl = common_local_url('shownotice', array('notice' => $replied_id));
|
$replyurl = common_local_url('shownotice', array('notice' => $replied_id));
|
||||||
common_text('(');
|
common_text('(');
|
||||||
|
|
|
@ -568,4 +568,7 @@ input#openid_url {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== End Forms Styling ===== */
|
/* ===== End Forms Styling ===== */
|
||||||
|
|
||||||
|
.replybutton {
|
||||||
|
margin-left: 55%;
|
||||||
|
}
|
||||||
|
|
|
@ -595,3 +595,7 @@ input#openid_url {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== End Forms Styling ===== */
|
/* ===== End Forms Styling ===== */
|
||||||
|
|
||||||
|
.replybutton {
|
||||||
|
margin-left: 55%;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user