Guys, i have change a little bit of util.js in my site so whenever you want to reply someone, it will automatically mention the user, how can i update it on gitorious? Do i have to be a special member for that? Or just put it here? Thx
on NoticeReply function ---- NoticeReply: function() { $('#content .notice_reply').live('click', function(e) { e.preventDefault(); //SaGad-start var a = $(this).closest("li.notice"); var b = $(this).closest("ul.notices");
var x = $(a.find("a[class=url]")); var y = x.attr('title'); var z = "@"+y;
if (b.hasClass("threaded-replies")) { var c = b.closest("li.notice"); var j = $(c.find("a[class=url]")); var k = j.attr('title'); if (y!=k) { var z = "@"+k+" "+z; } } SN.U.NoticeInlineReplyTrigger(a, z); // var notice = $(this).closest('li.notice'); // SN.U.NoticeInlineReplyTrigger(notice); //SaGad-end return false; }); },
on NoticeInlineReplySetup function ---- NoticeInlineReplySetup: function() { $('li.notice-reply-placeholder input') .live('focus', function() { //SaGad-start var a = $(this).closest("li.notice"); var x = $(a.find("a[class=url]")); var y = x.attr('title'); SN.U.NoticeInlineReplyTrigger(a, "@"+y); //SaGad-end // var notice = $(this).closest('li.notice'); // SN.U.NoticeInlineReplyTrigger(notice); return false; }); $('li.notice-reply-comments a') .live('click', function() { var url = $(this).attr('href'); var area = $(this).closest('.threaded-replies'); $.get(url, {ajax: 1}, function(data, textStatus, xhr) { var replies = $('.threaded-replies', data); if (replies.length) { area.replaceWith(document._importNode(replies[0], true)); } }); return false; }); },
Comments
----
NoticeReply: function() {
$('#content .notice_reply').live('click', function(e) {
e.preventDefault();
//SaGad-start
var a = $(this).closest("li.notice");
var b = $(this).closest("ul.notices");
var x = $(a.find("a[class=url]"));
var y = x.attr('title');
var z = "@"+y;
if (b.hasClass("threaded-replies")) {
var c = b.closest("li.notice");
var j = $(c.find("a[class=url]"));
var k = j.attr('title');
if (y!=k)
{
var z = "@"+k+" "+z;
}
}
SN.U.NoticeInlineReplyTrigger(a, z);
// var notice = $(this).closest('li.notice');
// SN.U.NoticeInlineReplyTrigger(notice);
//SaGad-end
return false;
});
},
on NoticeInlineReplySetup function
----
NoticeInlineReplySetup: function() {
$('li.notice-reply-placeholder input')
.live('focus', function() {
//SaGad-start
var a = $(this).closest("li.notice");
var x = $(a.find("a[class=url]"));
var y = x.attr('title');
SN.U.NoticeInlineReplyTrigger(a, "@"+y);
//SaGad-end
// var notice = $(this).closest('li.notice');
// SN.U.NoticeInlineReplyTrigger(notice);
return false;
});
$('li.notice-reply-comments a')
.live('click', function() {
var url = $(this).attr('href');
var area = $(this).closest('.threaded-replies');
$.get(url, {ajax: 1}, function(data, textStatus, xhr) {
var replies = $('.threaded-replies', data);
if (replies.length) {
area.replaceWith(document._importNode(replies[0], true));
}
});
return false;
});
},
if you want to see in action, go to http://fupei.com