aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-05 02:23:02 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-05 02:23:02 -0400
commitef78d21ca79b62f57b4f32dfd8309eed5616377c (patch)
treebd65eff0642b9a3d74d0675f7953da8c17c25717
parenta698a3cea10fed25127f5dd933b23fb7de5d469b (diff)
added an icon view for buxton docs
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index f2b0e3155..297c11e35 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -33,6 +33,7 @@ import { CollectionSubView } from "./CollectionSubView";
import "./CollectionTreeView.scss";
import { CollectionViewType } from './CollectionView';
import React = require("react");
+import { makeTemplate } from '../../util/DropConverter';
export interface TreeViewProps {
@@ -743,9 +744,16 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll
Doc.GetProto(img).doubleClickView = doubleClickView;
}
});
+ Doc.GetProto(d).type = "buxton";
Doc.GetProto(d).proto = heroView; // all devices "are" heroViews that share the same layout & defaults. Seems better than making them all be independent and copy a layout string // .layout = ImageBox.LayoutString("hero");
});
+ const iconBuxtonView = ImageDocument(fallbackImg, { title: "hero", _width: 60, onDoubleClick: ScriptField.MakeScript("deiconifyView(self)") });
+ iconBuxtonView.isTemplateDoc = makeTemplate(iconBuxtonView, true, "icon_buxton");
+ Doc.UserDoc()["template-icon-view-buxton"] = new PrefetchProxy(iconBuxtonView);
+ const tempIcons = Doc.GetProto(Cast(Doc.UserDoc()["template-icons"], Doc, null));
+ Doc.AddDocToList(tempIcons, "data", iconBuxtonView);
+
Document.childLayoutTemplate = heroView;
Document.childClickedOpenTemplateView = new PrefetchProxy(detailView);
Document._viewType = CollectionViewType.Time;