From: Michael J. Rubinsky Date: Wed, 10 Mar 2010 18:34:06 +0000 (-0500) Subject: disable tagging for events without perms_edit X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=db1539016668574b1753a4031926776250a4ba32;p=horde.git disable tagging for events without perms_edit --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 4df9b6b76..33c0f6a15 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -3853,12 +3853,13 @@ KronolithCore = { $('kronolithEventSave').show(); $('kronolithEventDelete').show(); $('kronolithEventForm').down('.kronolithFormActions .kronolithSeparator').show(); - this.doAction('listTopTags', null, this.topTagsCallback.curry('kronolithEventTopTags', 'kronolithEventTag')); if (id) { RedBox.loading(); this.doAction('getEvent', { cal: calendar, id: id, date: date }, this.editEventCallback.bind(this)); + $('kronolithEventTopTags').update(); } else { kronolithETagAc.reset(); + this.doAction('listTopTags', null, this.topTagsCallback.curry('kronolithEventTopTags', 'kronolithEventTag')); var d; if (date) { if (date.endsWith('all')) { @@ -3944,6 +3945,7 @@ KronolithCore = { topTagsCallback: function(update, tagclass, r) { + $('kronolithEventTabTags').select('label').each(function(e) {e.show()}); if (!r.response.tags) { $(update).update(); return; @@ -4121,6 +4123,10 @@ KronolithCore = { if (!ev.pe) { $('kronolithEventSave').hide(); $('kronolithEventForm').disable(); + kronolithETagAc.disable(); + $('kronolithEventTabTags').select('label').each(function(e) {e.hide()}); + } else { + this.doAction('listTopTags', null, this.topTagsCallback.curry('kronolithEventTopTags', 'kronolithEventTag')); } if (!ev.pd) { $('kronolithEventDelete').hide();