This commit is contained in:
yflory 2017-07-24 14:13:47 +02:00
parent e3b9c03fc0
commit 4345fc0662
1 changed files with 18 additions and 13 deletions

View File

@ -21,22 +21,26 @@ define([
var andThen = function () {
var ifrw = $('#pad-iframe')[0].contentWindow;
var $iframe = $('#pad-iframe').contents();
var $body = $iframe.find('body');
var addTask = function () {};
var editTask = function () {};
var display = function () {
};
};
var onInit = function () {
Cryptpad.addLoadingScreen();
var $body = $iframe.find('body');
$body.on('dragover', function (e) { e.preventDefault(); });
$body.on('drop', function (e) { e.preventDefault(); });
Cryptpad.addLoadingScreen();
var Title;
var $bar = $iframe.find('.toolbar-container');
var secret;
if (window.location.hash) {
secret = Cryptpad.getSecrets();
if (!secret.keys) { throw new Error("You need a hash"); } // TODO
}
Title = Cryptpad.createTitle({}, function(){}, Cryptpad);
var configTb = {
@ -53,6 +57,7 @@ define([
// we're in upload mode
Cryptpad.removeLoadingScreen();
andThen();
};
var createTodo = function() {
@ -63,7 +68,7 @@ define([
hash = obj.todo;
}
Cryptpad.getSecrets('todo', hash);
var secret = Cryptpad.getSecrets('todo', hash);
var listmapConfig = {
data: {},
@ -74,12 +79,12 @@ define([
userName: 'todo',
logLevel: 1,
};
var lm = Listmap.create(listmapConfig);
var lm = APP.lm = Listmap.create(listmapConfig);
}
Cryptpad.ready(function () {
andThen();
//Cryptpad.reportAppUsage();
createTodo();
Cryptpad.reportAppUsage();
});
});