aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-09-13 11:15:01 -0400
committerbob <bcz@cs.brown.edu>2019-09-13 11:15:01 -0400
commit106d7ca39e36fc114f79fd5fef27998a68fd3d5b (patch)
treee7522ce7a2df2980390661ed4a834506f8730be8 /src/client/documents/Documents.ts
parent32861c7cfcac8c03be5692fb98b5a7dc7786be83 (diff)
fixed video w/ templates. changed headings with text boxes, tweaked MakeTemplate titling
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 28e5e5f40..9db2ac558 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -121,7 +121,7 @@ export namespace Docs {
}],
[DocumentType.IMG, {
layout: { view: ImageBox, collectionView: [CollectionView, data, anno] as CollectionViewType },
- options: { nativeWidth: 600, curPage: 0 }
+ options: { curPage: 0 }
}],
[DocumentType.WEB, {
layout: { view: WebBox, collectionView: [CollectionView, data, anno] as CollectionViewType },
@@ -137,7 +137,7 @@ export namespace Docs {
}],
[DocumentType.VID, {
layout: { view: VideoBox, collectionView: [CollectionVideoView, data, anno] as CollectionViewType },
- options: { nativeWidth: 600, curPage: 0 },
+ options: { curPage: 0 },
}],
[DocumentType.AUDIO, {
layout: { view: AudioBox },
@@ -608,13 +608,10 @@ export namespace Docs {
export namespace DocUtils {
export function Publish(promoteDoc: Doc, targetID: string, addDoc: any, remDoc: any) {
- if (targetID.startsWith("-")) {
- targetID = targetID.substr(1, targetID.length - 1);
- Doc.GetProto(promoteDoc).title = targetID;
- }
+ targetID = targetID.replace(/^-/, "").replace(/\([0-9]*\)$/, "");
DocServer.GetRefField(targetID).then(doc => {
let copy = doc instanceof Doc ? doc : Doc.MakeCopy(promoteDoc, true, targetID);
- !doc && (Doc.GetProto(copy).title = targetID);
+ !doc && (copy.title = undefined) && (Doc.GetProto(copy).title = targetID);
addDoc && addDoc(copy);
!doc && remDoc && remDoc(promoteDoc);
if (!doc) {