Skip to content

Commit e3f7bbf

Browse files
committed
Fix for pages where only global content can be edited
1 parent d96a25c commit e3f7bbf

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

module/index.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,19 @@ export function init(
174174
)
175175

176176
// Initialize the page flow manager
177-
flowMgr.init(
178-
'[data-cf-flow]',
179-
new FlowAPI(
180-
baseFlowURL,
181-
baseParams,
182-
updateSignalKey
177+
if ($.one('[data-cf-snippet]')) {
178+
flowMgr.init(
179+
'[data-cf-flow]',
180+
new FlowAPI(
181+
baseFlowURL,
182+
baseParams,
183+
updateSignalKey
184+
)
183185
)
184-
)
186+
} else {
187+
// Flag that the page has no data flows
188+
document.body.dataset.mhNoDataFlows = ''
189+
}
185190

186191
// Create an element in which manhattan specific UI elements should be
187192
// rooted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "manhattan-content",
3-
"version": "1.0.0-beta.4",
3+
"version": "1.0.0-beta.5",
44
"description": "Content editing for the manhattan web framework",
55
"engines": {
66
"node": ">=8.9.4"

scss/content.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

22
[data-mh-content-ui] {
33
@import 'ui/image-uploader';
4+
}
5+
6+
[data-mh-no-data-flows] {
7+
.ct-ignition {
8+
right: 64px;
9+
}
410
}

0 commit comments

Comments
 (0)