diff --git a/lib/gollum/frontend/public/css/editor.css b/lib/gollum/frontend/public/css/editor.css index b87816f7..ad1862e4 100644 --- a/lib/gollum/frontend/public/css/editor.css +++ b/lib/gollum/frontend/public/css/editor.css @@ -77,13 +77,17 @@ } /* @control function-bar */ -#gollum-editor #gollum-editor-function-bar { +#gollum-editor #gollum-editor-function-bar { border-bottom: 1px solid #ddd; overflow: hidden; - padding: 0.6em 0 1.1em 0; + padding: 0 0 1.1em 0; display: none; } +#gollum-editor-title-field + #gollum-editor-function-bar { + margin-top: 0.6em; +} + #gollum-editor #gollum-editor-function-bar.active { display: block; } diff --git a/lib/gollum/frontend/public/javascript/gollum-editor/gollum.editor.js b/lib/gollum/frontend/public/javascript/gollum-editor/gollum.editor.js index 34485953..613c706e 100644 --- a/lib/gollum/frontend/public/javascript/gollum-editor/gollum.editor.js +++ b/lib/gollum/frontend/public/javascript/gollum-editor/gollum.editor.js @@ -37,6 +37,11 @@ if ( EditorHas.editSummaryMarkup() ) { Placeholder.add( $('#gollum-editor-edit-summary input') ) + $('#gollum-editor form[name="gollum-editor"]').submit(function( e ) { + e.preventDefault(); + Placeholder.clearAll(); + $(this).submit(); + }); } if ( EditorHas.collapsibleInputs() ) { diff --git a/lib/gollum/frontend/templates/editor.mustache b/lib/gollum/frontend/templates/editor.mustache index 80c3599f..436a957b 100644 --- a/lib/gollum/frontend/templates/editor.mustache +++ b/lib/gollum/frontend/templates/editor.mustache @@ -1,10 +1,15 @@
+ {{#show_title}}
+ {{/show_title}} + {{#hidden_title}} + + {{/hidden_title}}
Bold diff --git a/lib/gollum/frontend/templates/history.mustache b/lib/gollum/frontend/templates/history.mustache index cf99c254..a2ef1e88 100644 --- a/lib/gollum/frontend/templates/history.mustache +++ b/lib/gollum/frontend/templates/history.mustache @@ -4,7 +4,7 @@
diff --git a/lib/gollum/frontend/views/create.rb b/lib/gollum/frontend/views/create.rb index 515d3e1d..a4cce0cf 100644 --- a/lib/gollum/frontend/views/create.rb +++ b/lib/gollum/frontend/views/create.rb @@ -8,6 +8,14 @@ module Precious def title "Create a new page" end + + def show_title + true + end + + def hidden_title + false + end def page_name @name.gsub('-', ' ') diff --git a/lib/gollum/frontend/views/edit.rb b/lib/gollum/frontend/views/edit.rb index 7165b801..15bc5727 100644 --- a/lib/gollum/frontend/views/edit.rb +++ b/lib/gollum/frontend/views/edit.rb @@ -5,9 +5,22 @@ module Precious attr_reader :page, :content - def title - "Editing #{@page.title}" + def page_name + @name.gsub('-', ' ') end + + def edit_title + false + end + + def hidden_title + true + end + + def title + "#{@page.title}" + end + end end end diff --git a/lib/gollum/frontend/views/history.rb b/lib/gollum/frontend/views/history.rb index d7628d56..d3cb143f 100644 --- a/lib/gollum/frontend/views/history.rb +++ b/lib/gollum/frontend/views/history.rb @@ -4,7 +4,7 @@ module Precious attr_reader :page, :page_num def title - "History of #{@page.title}" + @page.title end def versions