Enable title in pad2

This commit is contained in:
yflory
2017-08-17 18:28:05 +02:00
parent 887a26b1a6
commit fab3d67b75
4 changed files with 204 additions and 63 deletions

View File

@@ -5,6 +5,7 @@ define([
], function ($, Config, ApiConfig) {
var Messages = {};
var Cryptpad;
var Common;
var Bar = {
constants: {},
@@ -567,7 +568,9 @@ define([
if (name === "") {
name = $input.attr('placeholder');
}
Cryptpad.renamePad(name, null, function (err, newtitle) {
console.log('here');
Common.setPadTitleInDrive(name, function (err, newtitle) {
console.log('here');
if (err) { return console.error(err); }
$text.text(newtitle);
callback(null, newtitle);
@@ -957,6 +960,7 @@ define([
Bar.create = function (cfg) {
var config = cfg || {};
Cryptpad = config.common;
Common = config.sfCommon;
Messages = Cryptpad.Messages;
config.readOnly = (typeof config.readOnly !== "undefined") ? (config.readOnly ? 1 : 0) : -1;
config.displayed = config.displayed || [];