aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/CurrentUserUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r--src/client/util/CurrentUserUtils.ts40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 4b1c48bd3..b439b8b43 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -36,7 +36,7 @@ export class CurrentUserUtils {
@computed public static get UserDocument() { return Doc.UserDoc(); }
@observable public static GuestTarget: Doc | undefined;
- @observable public static GuestScene: Doc | undefined;
+ @observable public static GuestDashboard: Doc | undefined;
@observable public static GuestMobile: Doc | undefined;
@observable public static propertiesWidth: number = 0;
@@ -510,11 +510,11 @@ export class CurrentUserUtils {
}[] {
this.setupSharingSidebar(doc); // sets up the right sidebar collection for mobile upload documents and sharing
return [
- { title: "Sharing", target: Cast(doc["sidebar-sharing"], Doc, null), icon: "users", click: 'selectMainMenu(self)', watchedDocuments: doc["sidebar-sharing"] as Doc },
- { title: "Scenes", target: Cast(doc["sidebar-scenes"], Doc, null), icon: "desktop", click: 'selectMainMenu(self)' },
+ { title: "Dashboards", target: Cast(doc["sidebar-dashboards"], Doc, null), icon: "desktop", click: 'selectMainMenu(self)' },
{ title: "Catalog", target: undefined as any, icon: "file", click: 'selectMainMenu(self)' },
{ title: "Archive", target: Cast(doc["sidebar-recentlyClosed"], Doc, null), icon: "archive", click: 'selectMainMenu(self)' },
{ title: "Import", target: Cast(doc["sidebar-import"], Doc, null), icon: "upload", click: 'selectMainMenu(self)' },
+ { title: "Sharing", target: Cast(doc["sidebar-sharing"], Doc, null), icon: "users", click: 'selectMainMenu(self)', watchedDocuments: doc["sidebar-sharing"] as Doc },
{ title: "Tools", target: Cast(doc["sidebar-tools"], Doc, null), icon: "wrench", click: 'selectMainMenu(self)' },
{ title: "Help", target: undefined as any, icon: "question-circle", click: 'selectMainMenu(self)' },
{ title: "Settings", target: undefined as any, icon: "cog", click: 'selectMainMenu(self)' },
@@ -592,7 +592,7 @@ export class CurrentUserUtils {
// SEts up mobile buttons for inside mobile menu
static setupMobileButtons(doc?: Doc, buttons?: string[]) {
const docProtoData: { title: string, icon: string, drag?: string, ignoreClick?: boolean, click?: string, ischecked?: string, activePen?: Doc, backgroundColor?: string, info: string, dragFactory?: Doc }[] = [
- { title: "SCENES", icon: "bars", click: 'switchToMobileLibrary()', backgroundColor: "lightgrey", info: "Access your Scenes from your mobile, and navigate through all of your documents. " },
+ { title: "SCENES", icon: "bars", click: 'switchToMobileLibrary()', backgroundColor: "lightgrey", info: "Access your Dashboards from your mobile, and navigate through all of your documents. " },
{ title: "UPLOAD", icon: "upload", click: 'openMobileUploads()', backgroundColor: "lightgrey", info: "Upload files from your mobile device so they can be accessed on Dash Web." },
{ title: "MOBILE UPLOAD", icon: "mobile", click: 'switchToMobileUploadCollection()', backgroundColor: "lightgrey", info: "Access the collection of your mobile uploads." },
{ title: "RECORD", icon: "microphone", click: 'openMobileAudio()', backgroundColor: "lightgrey", info: "Use your phone to record, dictate and then upload audio onto Dash Web." },
@@ -689,7 +689,7 @@ export class CurrentUserUtils {
}
static setupLibrary(userDoc: Doc) {
- return CurrentUserUtils.setupScenes(userDoc);
+ return CurrentUserUtils.setupDashboards(userDoc);
}
// setup the Creator button which will display the creator panel. This panel will include the drag creators and the color picker.
@@ -724,28 +724,28 @@ export class CurrentUserUtils {
}
}
- static async setupScenes(doc: Doc) {
- // setup scenes library item
- await doc.myScenes;
- if (doc.myScenes === undefined) {
- doc.myScenes = new PrefetchProxy(Docs.Create.TreeDocument([], {
+ static async setupDashboards(doc: Doc) {
+ // setup dashboards library item
+ await doc.myDashboards;
+ if (doc.myDashboards === undefined) {
+ doc.myDashboards = new PrefetchProxy(Docs.Create.TreeDocument([], {
title: "SCENES", _height: 100, forceActive: true, boxShadow: "0 0", lockedPosition: true, treeViewOpen: true, system: true
}));
}
- if (doc["sidebar-scenes"] === undefined) {
- const newScene = ScriptField.MakeScript(`createNewScene()`);
- (doc.myScenes as Doc).contextMenuScripts = new List<ScriptField>([newScene!]);
- (doc.myScenes as Doc).contextMenuLabels = new List<string>(["Create New Scene"]);
+ if (doc["sidebar-dashboards"] === undefined) {
+ const newDashboard = ScriptField.MakeScript(`createNewDashboard()`);
+ (doc.myDashboards as Doc).contextMenuScripts = new List<ScriptField>([newDashboard!]);
+ (doc.myDashboards as Doc).contextMenuLabels = new List<string>(["Create New Dashboard"]);
- const scenes = doc.myScenes as Doc;
+ const dashboards = doc.myDashboards as Doc;
- doc["sidebar-scenes"] = new PrefetchProxy(Docs.Create.TreeDocument([scenes], {
+ doc["sidebar-dashboards"] = new PrefetchProxy(Docs.Create.TreeDocument([dashboards], {
treeViewHideTitle: true, _xMargin: 5, _yMargin: 5, _gridGap: 5, forceActive: true, childDropAction: "alias",
treeViewTruncateTitleWidth: 150, hideFilterView: true, treeViewPreventOpen: false, treeViewOpen: true,
lockedPosition: true, boxShadow: "0 0", dontRegisterChildViews: true, targetDropAction: "same", system: true
})) as any as Doc;
}
- return doc.myScenes as any as Doc;
+ return doc.myDashboards as any as Doc;
}
static setupCatalog(doc: Doc) {
@@ -821,7 +821,7 @@ export class CurrentUserUtils {
static async setupSidebarButtons(doc: Doc) {
CurrentUserUtils.setupSidebarContainer(doc);
await CurrentUserUtils.setupToolsBtnPanel(doc);
- CurrentUserUtils.setupScenes(doc);
+ CurrentUserUtils.setupDashboards(doc);
CurrentUserUtils.setupCatalog(doc);
CurrentUserUtils.setupRecentlyClosed(doc);
CurrentUserUtils.setupUserDoc(doc);
@@ -1002,8 +1002,8 @@ export class CurrentUserUtils {
}
}
-Scripting.addGlobal(function createNewScene() { return MainView.Instance.createNewScene(); },
- "creates a new scene when called");
+Scripting.addGlobal(function createNewDashboard() { return MainView.Instance.createNewDashboard(); },
+ "creates a new dashboard when called");
Scripting.addGlobal(function links(doc: any) { return new List(LinkManager.Instance.getAllRelatedLinks(doc)); },
"returns all the links to the document or its annotations", "(doc: any)");