Use the file name as initial title

This commit is contained in:
yflory
2017-02-21 17:42:58 +01:00
parent 20b08a7847
commit c72bbd4c37
6 changed files with 33 additions and 11 deletions

View File

@@ -897,8 +897,11 @@ define([
}
var onNamed = function (name) {
if (!name) { return; }
// TODO
var path = '/#?name=' + encodeURIComponent(name) + '&path=' + encodeURIComponent(currentPath);
window.open('/' + type + path);
sessionStorage[Cryptpad.newPadNameKey] = name;
sessionStorage[Cryptpad.newPadPathKey] = currentPath;
window.open('/' + type + '/');
};
Cryptpad.prompt(Messages.fm_nameFile, Cryptpad.getDefaultName({type: type}), onNamed);
};