Title in pad2

This commit is contained in:
yflory
2017-08-17 19:01:03 +02:00
parent 604415b32c
commit d1affebd14
4 changed files with 22 additions and 18 deletions

View File

@@ -515,7 +515,7 @@ define([
console.error("config.title", config);
throw new Error("config.title is not an object");
}
var callback = config.title.onRename;
var updateTitle = config.title.updateTitle;
var placeholder = config.title.defaultName;
var suggestName = config.title.suggestName;
@@ -568,12 +568,9 @@ define([
if (name === "") {
name = $input.attr('placeholder');
}
console.log('here');
Common.setPadTitleInDrive(name, function (err, newtitle) {
console.log('here');
updateTitle(name, function (err, newtitle) {
if (err) { return console.error(err); }
$text.text(newtitle);
callback(null, newtitle);
//$text.text(newtitle);
$input.hide();
$text.show();
$pencilIcon.show();