diff options
-rw-r--r-- | js/util.js | 9 | ||||
-rw-r--r-- | lib/jabber.php | 2 | ||||
-rw-r--r-- | lib/stream.php | 1 | ||||
-rw-r--r-- | theme/default/display.css | 5 | ||||
-rw-r--r-- | theme/stoica/display.css | 4 |
5 files changed, 19 insertions, 2 deletions
diff --git a/js/util.js b/js/util.js index 4f2e7c724..50c311f99 100644 --- a/js/util.js +++ b/js/util.js @@ -19,5 +19,14 @@ $(document).ready(function(){ // run once in case there's something in there 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(); + } + } diff --git a/lib/jabber.php b/lib/jabber.php index 66ff24e63..8890f6456 100644 --- a/lib/jabber.php +++ b/lib/jabber.php @@ -19,7 +19,7 @@ if (!defined('LACONICA')) { exit(1); } -require_once('XMPPHP/XMPP.php'); +require_once('xmpp.php'); function jabber_valid_base_jid($jid) { # Cheap but effective diff --git a/lib/stream.php b/lib/stream.php index 8da07c316..bef3abff0 100644 --- a/lib/stream.php +++ b/lib/stream.php @@ -86,6 +86,7 @@ class StreamAction extends Action { 'href' => $noticeurl, 'title' => common_exact_date($notice->created)), common_date_string($notice->created)); + common_element('a', array('href' => "#", 'onclick' => 'javascript: doreply("'.$profile->nickname.'")', 'class' => 'replybutton'), 'reply'); if ($replied_id) { $replyurl = common_local_url('shownotice', array('notice' => $replied_id)); common_text('('); diff --git a/theme/default/display.css b/theme/default/display.css index 98dad5d02..0e681b909 100644 --- a/theme/default/display.css +++ b/theme/default/display.css @@ -568,4 +568,7 @@ input#openid_url { } /* ===== End Forms Styling ===== */ - + +.replybutton { + margin-left: 55%; +} diff --git a/theme/stoica/display.css b/theme/stoica/display.css index fb300326a..6a706dc6a 100644 --- a/theme/stoica/display.css +++ b/theme/stoica/display.css @@ -595,3 +595,7 @@ input#openid_url { } /* ===== End Forms Styling ===== */ + +.replybutton { + margin-left: 55%; +} |