1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Disable editing shared calendars name.

This commit is contained in:
Thomas Tanghus 2012-09-06 01:48:30 +02:00
parent 7325961335
commit 742f175872

View File

@ -47,7 +47,12 @@ OC.Contacts.Settings = OC.Contacts.Settings || {
},
doEdit:function(id) {
console.log('doEdit: ', id);
this.showActions(['active', 'name', 'description', 'save', 'cancel']);
var owner = this.adrsettings.find('[data-id="'+id+'"]').data('owner');
var actions = ['active', 'description', 'save', 'cancel'];
if(owner == OC.currentUser) {
actions.push('name');
}
this.showActions(actions);
var name = this.adrsettings.find('[data-id="'+id+'"]').find('.name').text();
var description = this.adrsettings.find('[data-id="'+id+'"]').find('.description').text();
var active = this.adrsettings.find('[data-id="'+id+'"]').find(':checkbox').is(':checked');