/* event from comment textarea button popups */
/* insert returned bbcode at cursor position or replace selected text */
- $("body").on("fbrowser.image.comment", function(e, filename, bbcode, id) {
+ $('body').on('fbrowser.photo.comment', function(e, filename, bbcode, id) {
$.colorbox.close();
var textarea = document.getElementById("comment-edit-text-" +id);
var start = textarea.selectionStart;
$('#mail-update-li').html(mail);
- $(".sidebar-group-li .notify").removeClass("show");
- $(data.groups).each(function(key, group) {
- var gid = group.id;
- var gcount = group.count;
- $(".group-"+gid+" .notify").addClass("show").text(gcount);
+ $(".sidebar-circle-li .notify").removeClass("show");
+ $(data.circles).each(function(key, circle) {
+ var gid = circle.id;
+ var gcount = circle.count;
+ $(".circle-"+gid+" .notify").addClass("show").text(gcount);
});
- $(".forum-widget-entry .notify").removeClass("show");
- $(data.forums).each(function(key, forum) {
- var fid = forum.id;
- var fcount = forum.count;
- $(".forum-"+fid+" .notify").addClass("show").text(fcount);
+ $(".group-widget-entry .notify").removeClass("show");
+ $(data.groups).each(function(key, group) {
+ var fid = group.id;
+ var fcount = group.count;
+ $(".group-"+fid+" .notify").addClass("show").text(fcount);
});
if (data.notifications.length == 0) {
// Allow folks to stop the ajax page updates with the pause/break key
$(document).keydown(function(event) {
- if (event.keyCode == '8') {
- var target = event.target || event.srcElement;
- if (!/input|textarea/i.test(target.nodeName)) {
- return false;
- }
- }
-
- if (event.keyCode == '19' || (event.ctrlKey && event.which == '32')) {
+ // Pause/Break or Ctrl + Space
+ if (event.which === 19 || (!event.shiftKey && !event.altKey && event.ctrlKey && event.which === 32)) {
event.preventDefault();
- if (stopped == false) {
+ if (stopped === false) {
stopped = true;
if (event.ctrlKey) {
totStopped = true;
$('nav').trigger('nav-update', data.result);
// start live update
- ['network', 'profile', 'community', 'notes', 'display', 'contact'].forEach(function (src) {
+ ['network', 'profile', 'channel', 'community', 'notes', 'display', 'contact'].forEach(function (src) {
if ($('#live-' + src).length) {
liveUpdate(src);
}
var orgHeight = $("section").height();
- var udargs = ((netargs.length) ? netargs : '');
+ var udargs = ((netargs.length) ? '/' + netargs : '');
var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&force=' + (force ? 1 : 0) + '&item=' + update_item;
update_url += '&max_id=' + getUrlParameter('max_id');
}
+ match = $("span.received").first();
+ if (match.length > 0) {
+ update_url += '&first_received=' + match[0].innerHTML;
+ }
+
+ match = $("span.created").first();
+ if (match.length > 0) {
+ update_url += '&first_created=' + match[0].innerHTML;
+ }
+
+ match = $("span.commented").first();
+ if (match.length > 0) {
+ update_url += '&first_commented=' + match[0].innerHTML;
+ }
+
+ match = $("span.uriid").first();
+ if (match.length > 0) {
+ update_url += '&first_uriid=' + match[0].innerHTML;
+ }
+
$.get(update_url, function(data) {
in_progress = false;
update_item = 0;
return a.join('');
}
-function groupChangeMember(gid, cid, sec_token) {
+function circleChangeMember(gid, cid, sec_token) {
$('body .fakelink').css('cursor', 'wait');
- $.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) {
- $('#group-update-wrapper').html(data);
+ $.get('circle/' + gid + '/' + cid + "?t=" + sec_token, function(data) {
+ $('#circle-update-wrapper').html(data);
$('body .fakelink').css('cursor', 'auto');
});
}
-function contactgroupChangeMember(checkbox, gid, cid) {
+function contactCircleChangeMember(checkbox, gid, cid) {
let url;
// checkbox.checked is the checkbox state after the click
if (checkbox.checked) {
- url = 'group/' + gid + '/add/' + cid;
+ url = 'circle/' + gid + '/add/' + cid;
} else {
- url = 'group/' + gid + '/remove/' + cid;
+ url = 'circle/' + gid + '/remove/' + cid;
}
$('body').css('cursor', 'wait');
$.post(url)
* to the event handler
*/
doImageBrowser : function (name, id) {
- var url = Dialog._get_url("image",name,id);
+ var url = Dialog._get_url('photo', name, id);
return Dialog.show(url);
},
* to the event handler
*/
doFileBrowser : function (name, id) {
- var url = Dialog._get_url("file",name,id);
+ var url = Dialog._get_url('attachment', name, id);
return Dialog.show(url);
},
if (id !== undefined) {
hash = hash + "-" + id;
}
- return baseurl + "/fbrowser/"+type+"/?mode=minimal#"+hash;
+ return 'media/' + type + '/browser?mode=minimal#' + hash;
},
_get_size: function() {