~ubuntu-branches/ubuntu/quantal/lightning-extension/quantal-security

« back to all changes in this revision

Viewing changes to calendar/base/src/calItemBase.js

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-01-12 15:28:46 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20120112152846-ib27rzd0zldftoql
Tags: 1.2~b1+build1-0ubuntu1
* New upstream release from the beta channel (CALENDAR_1_2b1_BUILD1)
* Refresh debian/patches/01_no_sunbird.patch
* Bump maxVersion for lightning to 10.*, but drop changes to non-binary
  addons (gdata-provider / timezones) as these aren't needed anymore
  - update debian/patches/03_maxversion_override.patch
* Add some additional mailnews makefiles to the tarball, to make the build
  system not sad anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    mRelations: null,
76
76
    mCategories: null,
77
77
 
 
78
    mACLEntry: null,
 
79
 
78
80
    /**
79
81
     * Initialize the base item's attributes. Can be called from inheriting
80
82
     * objects in their constructor.
97
99
    /**
98
100
     * @see calIItemBase
99
101
     */
 
102
    get aclEntry() {
 
103
        let aclEntry = this.mACLEntry;
 
104
        let aclManager = (this.calendar && this.calendar.superCalendar.aclManager);
 
105
 
 
106
        if (!aclEntry && aclManager) {
 
107
            this.mACLEntry = aclManager.getItemEntry(this);
 
108
            aclEntry = this.mACLEntry;
 
109
        }
 
110
 
 
111
        if (!aclEntry && this.parentItem != this) {
 
112
            // No ACL entry on this item, check the parent
 
113
            aclEntry = this.parentItem.aclEntry;
 
114
        }
 
115
 
 
116
        return aclEntry;
 
117
    },
100
118
 
101
119
    // readonly attribute AUTF8String hashId;
102
120
    get hashId() {
265
283
     */
266
284
    cloneItemBaseInto: function cIB_cloneItemBaseInto(m, aNewParent) {
267
285
        m.mImmutable = false;
 
286
        m.mACLEntry = this.mACLEntry;
268
287
        m.mIsProxy = this.mIsProxy;
269
288
        m.mParentItem = (calTryWrappedJSObject(aNewParent) || this.mParentItem);
270
289
        m.mHashId = this.mHashId;
526
545
        if (this.mAttendees) {
527
546
            countObj.value = this.mAttendees.length;
528
547
            return this.mAttendees.concat([]); // clone
529
 
        }
530
 
        else {
 
548
        } else {
531
549
            countObj.value = 0;
532
550
            return [];
533
551
        }
1093
1111
function makeMemberAttr(ctor, varname, dflt, attr, asProperty) {
1094
1112
    // XXX handle defaults!
1095
1113
    var getter = function () {
1096
 
        if (asProperty)
 
1114
        if (asProperty) {
1097
1115
            return this.getProperty(varname);
1098
 
        else
 
1116
        } else {
1099
1117
            return (varname in this ? this[varname] : undefined);
 
1118
        }
1100
1119
    };
1101
1120
    var setter = function (v) {
1102
1121
        this.modify();
1103
 
        if (asProperty)
 
1122
        if (asProperty) {
1104
1123
            return this.setProperty(varname, v);
1105
 
        else
 
1124
        } else {
1106
1125
            return (this[varname] = v);
 
1126
        }
1107
1127
    };
1108
1128
    ctor.prototype.__defineGetter__(attr, getter);
1109
1129
    ctor.prototype.__defineSetter__(attr, setter);