BigW Consortium Gitlab

Commit 7f938616 by Phil Hughes

Merge branch '40508-snippets-zen-mode' into 'master'

Init zenmode in snippets pages Closes #40508 See merge request gitlab-org/gitlab-ce!15742
parents c4667043 1e9eb3ea
...@@ -298,18 +298,21 @@ import ProjectVariables from './project_variables'; ...@@ -298,18 +298,21 @@ import ProjectVariables from './project_variables';
break; break;
case 'projects:snippets:show': case 'projects:snippets:show':
initNotes(); initNotes();
new ZenMode();
break; break;
case 'projects:snippets:new': case 'projects:snippets:new':
case 'projects:snippets:edit': case 'projects:snippets:edit':
case 'projects:snippets:create': case 'projects:snippets:create':
case 'projects:snippets:update': case 'projects:snippets:update':
new GLForm($('.snippet-form'), true); new GLForm($('.snippet-form'), true);
new ZenMode();
break; break;
case 'snippets:new': case 'snippets:new':
case 'snippets:edit': case 'snippets:edit':
case 'snippets:create': case 'snippets:create':
case 'snippets:update': case 'snippets:update':
new GLForm($('.snippet-form'), false); new GLForm($('.snippet-form'), false);
new ZenMode();
break; break;
case 'projects:releases:edit': case 'projects:releases:edit':
new ZenMode(); new ZenMode();
...@@ -546,6 +549,7 @@ import ProjectVariables from './project_variables'; ...@@ -546,6 +549,7 @@ import ProjectVariables from './project_variables';
new LineHighlighter(); new LineHighlighter();
new BlobViewer(); new BlobViewer();
initNotes(); initNotes();
new ZenMode();
break; break;
case 'import:fogbugz:new_user_map': case 'import:fogbugz:new_user_map':
new UsersSelect(); new UsersSelect();
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
= markdown_toolbar_button({ icon: "list-bulleted", data: { "md-tag" => "* ", "md-prepend" => true }, title: "Add a bullet list" }) = markdown_toolbar_button({ icon: "list-bulleted", data: { "md-tag" => "* ", "md-prepend" => true }, title: "Add a bullet list" })
= markdown_toolbar_button({ icon: "list-numbered", data: { "md-tag" => "1. ", "md-prepend" => true }, title: "Add a numbered list" }) = markdown_toolbar_button({ icon: "list-numbered", data: { "md-tag" => "1. ", "md-prepend" => true }, title: "Add a numbered list" })
= markdown_toolbar_button({ icon: "task-done", data: { "md-tag" => "* [ ] ", "md-prepend" => true }, title: "Add a task list" }) = markdown_toolbar_button({ icon: "task-done", data: { "md-tag" => "* [ ] ", "md-prepend" => true }, title: "Add a task list" })
%button.toolbar-btn.toolbar-fullscreen-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, aria: { label: "Go full screen" }, title: "Go full screen", data: { container: "body" } } %button.toolbar-btn.toolbar-fullscreen-btn.js-zen-enter.has-tooltip{ type: "button", tabindex: -1, "aria-label": "Go full screen", title: "Go full screen", data: { container: "body" } }
= sprite_icon("screen-full") = sprite_icon("screen-full")
.md-write-holder .md-write-holder
......
---
title: Init zen mode in snippets pages
merge_request:
author:
type: fixed
...@@ -39,6 +39,11 @@ describe 'Project snippets', :js do ...@@ -39,6 +39,11 @@ describe 'Project snippets', :js do
expect(page).to have_selector('.atwho-view') expect(page).to have_selector('.atwho-view')
end end
it 'should have zen mode' do
find('.js-zen-enter').click()
expect(page).to have_selector('.fullscreen')
end
end end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment