Remove default value in new page.
This commit is contained in:
@@ -154,14 +154,6 @@ $(document).ready(function() {
|
|||||||
$('#minibutton-new-page').click(function(e) {
|
$('#minibutton-new-page').click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var path = location.pathname;
|
|
||||||
// ensure there's more than one slash in pathname.
|
|
||||||
if (path.split('/').length > 2) {
|
|
||||||
path = path.substr(0, path.lastIndexOf('/') + 1);
|
|
||||||
} else {
|
|
||||||
path = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$.GollumDialog.init({
|
$.GollumDialog.init({
|
||||||
title: 'Create New Page',
|
title: 'Create New Page',
|
||||||
fields: [
|
fields: [
|
||||||
@@ -169,7 +161,7 @@ $(document).ready(function() {
|
|||||||
id: 'name',
|
id: 'name',
|
||||||
name: 'Page Name',
|
name: 'Page Name',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
defaultValue: path || ''
|
defaultValue: ''
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
OK: function( res ) {
|
OK: function( res ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user