From 4d7794d888f3453194a4e34f68451ceed7200881 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 5 Feb 2011 05:22:05 -0500 Subject: [PATCH] Don't duplicate group properties in subgroups. --HG-- branch : groups --- common/content/contexts.js | 4 +--- common/content/mappings.js | 10 ++++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/common/content/contexts.js b/common/content/contexts.js index f674b3bc..1f3b63cb 100644 --- a/common/content/contexts.js +++ b/common/content/contexts.js @@ -37,9 +37,7 @@ var Group = Class("Group", { this.Group = constructor; this.name = name; - memoize(Group.prototype, name, - function () constructor(this.name, this.description, - this.filter, this.persist)); + memoize(Group.prototype, name, function () constructor(this)); memoize(Group.subGroupMap, name, function () Object.create(Object.create(contexts.subGroupProto, diff --git a/common/content/mappings.js b/common/content/mappings.js index dac1e459..3930400c 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -138,16 +138,14 @@ var Map = Class("Map", { }); var MapHive = Class("MapHive", { - init: function init(name, description, filter) { - this.name = name; + init: function init(group) { + this.group = group; this.stacks = {}; - this.description = description; - this.filter = filter || function (uri) true; }, - get toStringParams() [this.name], + get toStringParams() [this.group.name], - get builtin() mappings.builtinHives.indexOf(this) >= 0, + get builtin() this.group.builtin, /** * Iterates over all mappings present in all of the given *modes*.