Footer don't keep room state
This commit is contained in:
@@ -136,8 +136,7 @@ angular.module('app')
|
|||||||
this.rooms = [];
|
this.rooms = [];
|
||||||
|
|
||||||
modelManager.addItemSyncObserver("room-bar", "SN|Component", (allItems, validItems, deletedItems, source) => {
|
modelManager.addItemSyncObserver("room-bar", "SN|Component", (allItems, validItems, deletedItems, source) => {
|
||||||
var incomingRooms = allItems.filter((candidate) => {return candidate.area == "rooms"});
|
this.rooms = modelManager.components.filter((candidate) => {return candidate.area == "rooms" && !candidate.deleted});
|
||||||
this.rooms = _.uniq(this.rooms.concat(incomingRooms)).filter((candidate) => {return !candidate.deleted});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
componentManager.registerHandler({identifier: "roomBar", areas: ["rooms", "modal"], activationHandler: (component) => {
|
componentManager.registerHandler({identifier: "roomBar", areas: ["rooms", "modal"], activationHandler: (component) => {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class ActionsManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get extensions() {
|
get extensions() {
|
||||||
return this.modelManager.extensions;
|
return this.modelManager.validItemsForContentType("Extension");
|
||||||
}
|
}
|
||||||
|
|
||||||
extensionsInContextOfItem(item) {
|
extensionsInContextOfItem(item) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class ModelManager extends SFModelManager {
|
|||||||
super();
|
super();
|
||||||
this.notes = [];
|
this.notes = [];
|
||||||
this.tags = [];
|
this.tags = [];
|
||||||
this._extensions = [];
|
this.components = [];
|
||||||
|
|
||||||
this.storageManager = storageManager;
|
this.storageManager = storageManager;
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ class ModelManager extends SFModelManager {
|
|||||||
super.resetLocalMemory();
|
super.resetLocalMemory();
|
||||||
this.notes.length = 0;
|
this.notes.length = 0;
|
||||||
this.tags.length = 0;
|
this.tags.length = 0;
|
||||||
this._extensions.length = 0;
|
this.components.length = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
findOrCreateTagByTitle(title) {
|
findOrCreateTagByTitle(title) {
|
||||||
@@ -58,9 +58,9 @@ class ModelManager extends SFModelManager {
|
|||||||
if(!_.find(this.notes, {uuid: item.uuid})) {
|
if(!_.find(this.notes, {uuid: item.uuid})) {
|
||||||
this.notes.unshift(item);
|
this.notes.unshift(item);
|
||||||
}
|
}
|
||||||
} else if(item.content_type == "Extension") {
|
} else if(item.content_type == "SN|Component") {
|
||||||
if(!_.find(this._extensions, {uuid: item.uuid})) {
|
if(!_.find(this.components, {uuid: item.uuid})) {
|
||||||
this._extensions.unshift(item);
|
this.components.unshift(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,8 +100,8 @@ class ModelManager extends SFModelManager {
|
|||||||
_.remove(this.tags, {uuid: item.uuid});
|
_.remove(this.tags, {uuid: item.uuid});
|
||||||
} else if(item.content_type == "Note") {
|
} else if(item.content_type == "Note") {
|
||||||
_.remove(this.notes, {uuid: item.uuid});
|
_.remove(this.notes, {uuid: item.uuid});
|
||||||
} else if(item.content_type == "Extension") {
|
} else if(item.content_type == "SN|Component") {
|
||||||
_.remove(this._extensions, {uuid: item.uuid});
|
_.remove(this.components, {uuid: item.uuid});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,6 +118,7 @@ class ModelManager extends SFModelManager {
|
|||||||
return {
|
return {
|
||||||
"Note" : "note",
|
"Note" : "note",
|
||||||
"Tag" : "tag",
|
"Tag" : "tag",
|
||||||
|
"SN|SmartTag": "smart tag",
|
||||||
"Extension" : "action-based extension",
|
"Extension" : "action-based extension",
|
||||||
"SN|Component" : "component",
|
"SN|Component" : "component",
|
||||||
"SN|Editor" : "editor",
|
"SN|Editor" : "editor",
|
||||||
|
|||||||
Reference in New Issue
Block a user