define([
'jquery',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad-listmap/chainpad-listmap.js',
'/common/toolbar2.js',
'/common/cryptpad-common.js',
'/todo/todo.js',
//'/common/media-tag.js',
//'/bower_components/file-saver/FileSaver.min.js',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/customize/src/less/cryptpad.less',
], function ($, Crypto, Listmap, Toolbar, Cryptpad, Todo) {
var Messages = Cryptpad.Messages;
var APP = window.APP = {};
$(function () {
var $iframe = $('#pad-iframe').contents();
var $body = $iframe.find('body');
var ifrw = $('#pad-iframe')[0].contentWindow;
var onReady = function () {
var todo = Todo.init(APP.lm.proxy, Cryptpad);
var deleteTask = function(id) {
todo.remove(id);
APP.display();
};
var display = APP.display = function () {
var $list = $iframe.find('#tasksList');
$list.empty();
APP.lm.proxy.order.forEach(function(el) {
var $taskDiv = $('
', {
'class': 'cp-task'
}).appendTo($list);
$('', { 'class': 'cp-task-text' })
.text(APP.lm.proxy.data[el].task)
.appendTo($taskDiv);
$('', { 'class': 'cp-task-date' })
.text(new Date(APP.lm.proxy.data[el].ctime).toLocaleString())
.appendTo($taskDiv);
$('