diff --git a/lib/gollum/frontend/public/javascript/gollum.js b/lib/gollum/frontend/public/javascript/gollum.js index acd37458..8d264c01 100755 --- a/lib/gollum/frontend/public/javascript/gollum.js +++ b/lib/gollum/frontend/public/javascript/gollum.js @@ -24,6 +24,28 @@ $(document).ready(function() { ); } + if ($('#minibutton-new-page').length) { + $('#minibutton-new-page').click(function() { + $.GollumDialog.init({ + title: 'Create New Page', + fields: [ + { + id: 'name', + name: 'Page Name', + type: 'text' + } + ], + OK: function( res ) { + var n = 'New Page'; + if ( res['name'] ) + var n = res['name']; + n = encodeURIComponent( n ); + window.location = '/' + n; + } + }); + }); + } + if ($('#wiki-wrapper').hasClass('history')) { $('#wiki-history td.checkbox input').click(highlightChecked); @@ -38,8 +60,8 @@ $(document).ready(function() { var truncatedSha = commitSha.toString().substr(0, 7); // revert action $.GollumDialog.init({ - title: 'Revert to ' + truncatedSha + '?', - body: 'Are you sure you wish to revert to commit ' + + title: 'Reset to ' + truncatedSha + '?', + body: 'Are you sure you wish to reset to commit ' + truncatedSha + '' + ' ? This will overwrite any previous changes.', OK: function() { diff --git a/lib/gollum/frontend/templates/layout.mustache b/lib/gollum/frontend/templates/layout.mustache index a02ec805..d9877ddc 100755 --- a/lib/gollum/frontend/templates/layout.mustache +++ b/lib/gollum/frontend/templates/layout.mustache @@ -15,7 +15,6 @@ - diff --git a/lib/gollum/frontend/templates/page.mustache b/lib/gollum/frontend/templates/page.mustache index b9ac37a5..882187f9 100755 --- a/lib/gollum/frontend/templates/page.mustache +++ b/lib/gollum/frontend/templates/page.mustache @@ -2,6 +2,7 @@