Add properties modal to calendars

pull/1/head
yflory 4 years ago
parent 09b229203c
commit 690621000e

@ -398,7 +398,6 @@ Messages.calendar_import = "Import to my calendars";
content: h('span', Messages.accessButton), content: h('span', Messages.accessButton),
action: function (e) { action: function (e) {
e.stopPropagation(); e.stopPropagation();
var friends = common.getFriends();
var cal = APP.calendars[id]; var cal = APP.calendars[id];
var title = Util.find(cal, ['content', 'metadata', 'title']); var title = Util.find(cal, ['content', 'metadata', 'title']);
var color = Util.find(cal, ['content', 'metadata', 'color']); var color = Util.find(cal, ['content', 'metadata', 'color']);
@ -420,6 +419,33 @@ Messages.calendar_import = "Import to my calendars";
return true; return true;
} }
}); });
options.push({
tag: 'a',
attributes: {
'class': 'fa fa-info-circle',
},
content: h('span', Messages.propertiesButton),
action: function (e) {
e.stopPropagation();
var friends = common.getFriends();
var cal = APP.calendars[id];
var title = Util.find(cal, ['content', 'metadata', 'title']);
var color = Util.find(cal, ['content', 'metadata', 'color']);
var h = cal.hashes || {};
var href = Hash.hashToHref(h.editHash || h.viewHash, 'calendar');
Properties.getPropertiesModal(common, {
calendar: {
title: title,
color: color,
channel: id,
},
common: common,
channel: id,
href: href
});
return true;
}
});
} }
if (!cantRemove) { if (!cantRemove) {
options.push({ options.push({

Loading…
Cancel
Save