|
|
@ -20,9 +20,9 @@ define([
|
|
|
|
common.addFriendRequest(data);
|
|
|
|
common.addFriendRequest(data);
|
|
|
|
|
|
|
|
|
|
|
|
// Display the notification
|
|
|
|
// Display the notification
|
|
|
|
$(el).find('.cp-notification-content').addClass("cp-clickable");
|
|
|
|
|
|
|
|
$(el).find('.cp-notification-content p')
|
|
|
|
$(el).find('.cp-notification-content p')
|
|
|
|
.html(Messages._getKey('friendRequest_notification', [msg.content.displayName || Messages.anonymous]))
|
|
|
|
.html(Messages._getKey('friendRequest_notification', [msg.content.displayName || Messages.anonymous]));
|
|
|
|
|
|
|
|
$(el).find('.cp-notification-content').addClass("cp-clickable")
|
|
|
|
.click(function () {
|
|
|
|
.click(function () {
|
|
|
|
UIElements.displayFriendRequestModal(common, data);
|
|
|
|
UIElements.displayFriendRequestModal(common, data);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -49,13 +49,13 @@ define([
|
|
|
|
handlers['SHARE_PAD'] = function (common, data, el) {
|
|
|
|
handlers['SHARE_PAD'] = function (common, data, el) {
|
|
|
|
var content = data.content;
|
|
|
|
var content = data.content;
|
|
|
|
var msg = content.msg;
|
|
|
|
var msg = content.msg;
|
|
|
|
$(el).find('.cp-notification-content').addClass("cp-clickable");
|
|
|
|
|
|
|
|
var type = Hash.parsePadUrl(msg.content.href).type;
|
|
|
|
var type = Hash.parsePadUrl(msg.content.href).type;
|
|
|
|
var key = type === 'drive' ? 'notification_folderShared' :
|
|
|
|
var key = type === 'drive' ? 'notification_folderShared' :
|
|
|
|
(type === 'file' ? 'notification_fileShared' :
|
|
|
|
(type === 'file' ? 'notification_fileShared' :
|
|
|
|
'notification_padShared');
|
|
|
|
'notification_padShared');
|
|
|
|
$(el).find('.cp-notification-content p')
|
|
|
|
$(el).find('.cp-notification-content p')
|
|
|
|
.html(Messages._getKey(key, [msg.content.name || Messages.anonymous, msg.content.title]))
|
|
|
|
.html(Messages._getKey(key, [msg.content.name || Messages.anonymous, msg.content.title]));
|
|
|
|
|
|
|
|
$(el).find('.cp-notification-content').addClass("cp-clickable")
|
|
|
|
.click(function () {
|
|
|
|
.click(function () {
|
|
|
|
common.openURL(msg.content.href);
|
|
|
|
common.openURL(msg.content.href);
|
|
|
|
});
|
|
|
|
});
|
|
|
|