From abb53ad8a5cbf2439aac420e9ec16a3a461dec1e Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Wed, 10 Jul 2019 15:58:04 -0400 Subject: Added color for ReadOnly mode --- src/client/DocServer.ts | 2 ++ src/client/views/collections/CollectionDockingView.tsx | 1 + 2 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts index 443f70bb1..97147f5e4 100644 --- a/src/client/DocServer.ts +++ b/src/client/DocServer.ts @@ -32,6 +32,8 @@ export namespace DocServer { // _cache = {}; } + export function isReadOnly() { return _isReadOnly; } + export function prepend(extension: string): string { return window.location.origin + extension; } diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index d477f96f0..57964442d 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -426,6 +426,7 @@ export class CollectionDockingView extends React.Component { //stack.header.controlsContainer.find('.lm_popout').hide(); + stack.header.element[0].style.backgroundColor = DocServer.isReadOnly() ? "#228540" : undefined; stack.header.controlsContainer.find('.lm_close') //get the close icon .off('click') //unbind the current click handler .click(action(function () { -- cgit v1.2.3-70-g09d2