Add .standalone class to <body> when in standalone mode (#6811)

* Add .standalone class to <body> when in standalone mode

* Add test for .standalone class on <body>
This commit is contained in:
Raphaël Merx 2019-02-05 09:44:17 +09:00 committed by Maxime Beauchemin
parent 5a40f71710
commit 6e9130550d
2 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,7 @@
>
</head>
<body>
<body {% if standalone_mode %}class="standalone"{% endif %}>
{% block navbar %}
{% if not standalone_mode %}
<header class="top" role="header">

View File

@ -93,6 +93,7 @@ class DashboardTests(SupersetTestCase):
resp = self.get_resp(url + 'edit=true&standalone=true')
self.assertIn('editMode&#34;: true', resp)
self.assertIn('standalone_mode&#34;: true', resp)
self.assertIn('<body class="standalone">', resp)
def test_save_dash(self, username='admin'):
self.login(username=username)