Merge branch 'maybe' into staging
This commit is contained in:
@@ -4,13 +4,7 @@
|
||||
<title>CryptPad</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.1.0",
|
||||
});
|
||||
</script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<link rel="icon" type="image/png"
|
||||
href="/customize/main-favicon.png"
|
||||
|
||||
@@ -49,11 +43,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="iframe-container">
|
||||
<iframe id="pad-iframe"></iframe>
|
||||
<script>
|
||||
document.getElementById('pad-iframe').setAttribute('src', 'inner.html?' + new Date().getTime());
|
||||
</script>
|
||||
<iframe id="pad-iframe"></iframe><script src="/common/noscriptfix.js"></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -689,7 +689,7 @@ define([
|
||||
// inform of network disconnect
|
||||
setEditable(false);
|
||||
toolbar.failed();
|
||||
Cryptpad.alert(Messages.common_connectionLost);
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, force);
|
||||
};
|
||||
|
||||
var onConnectionChange = config.onConnectionChange = function (info) {
|
||||
@@ -700,7 +700,7 @@ define([
|
||||
toolbar.reconnecting(info.myId);
|
||||
Cryptpad.findOKButton().click();
|
||||
} else {
|
||||
Cryptpad.alert(Messages.common_connectionLost);
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, force);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
5
www/common/boot.js
Normal file
5
www/common/boot.js
Normal file
@@ -0,0 +1,5 @@
|
||||
// Stage 0, this gets cached which means we can't change it. boot2.js is changable.
|
||||
define(['/api/config?cb=' + (+new Date()).toString(16)], function (Config) {
|
||||
if (Config.requireConf) { require.config(Config.requireConf); }
|
||||
require(['/common/boot2.js']);
|
||||
});
|
||||
6
www/common/boot2.js
Normal file
6
www/common/boot2.js
Normal file
@@ -0,0 +1,6 @@
|
||||
// This is stage 1, it can be changed but you must bump the version of the project.
|
||||
define([], function () {
|
||||
// fix up locations so that relative urls work.
|
||||
require.config({ baseUrl: window.location.pathname });
|
||||
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
|
||||
});
|
||||
@@ -1,5 +1,5 @@
|
||||
define([
|
||||
'/api/config?cb=' + Math.random().toString(16).slice(2),
|
||||
'/api/config',
|
||||
'/customize/messages.js?app=' + window.location.pathname.split('/').filter(function (x) { return x; }).join('.'),
|
||||
'/customize/fsStore.js',
|
||||
'/bower_components/chainpad-crypto/crypto.js?v=0.1.5',
|
||||
@@ -163,10 +163,14 @@ define([
|
||||
// var isArray = function (o) { return Object.prototype.toString.call(o) === '[object Array]'; };
|
||||
var isArray = common.isArray = $.isArray;
|
||||
|
||||
var fixHTML = common.fixHTML = function (html) {
|
||||
return html.replace(/</g, '<');
|
||||
var fixHTML = common.fixHTML = function (str) {
|
||||
if (!str) { return ''; }
|
||||
return str.replace(/[<>&"']/g, function (x) {
|
||||
return ({ "<": "<", ">": ">", "&": "&", '"': """, "'": "'" })[x];
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
var truncate = common.truncate = function (text, len) {
|
||||
if (typeof(text) === 'string' && text.length > len) {
|
||||
return text.slice(0, len) + '…';
|
||||
@@ -851,7 +855,7 @@ define([
|
||||
if (!$('#' + LOADING).is(':visible')) { common.addLoadingScreen(); }
|
||||
$('.spinnerContainer').hide();
|
||||
if (transparent) { $('#' + LOADING).css('opacity', 0.8); }
|
||||
$('#' + LOADING).find('p').html(error || Messages.error);
|
||||
$('#' + LOADING).find('p').text(error || Messages.error);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -924,7 +928,7 @@ define([
|
||||
switch (type) {
|
||||
case 'export':
|
||||
button = $('<button>', {
|
||||
title: Messages.exportButton + '\n' + Messages.exportButtonTitle,
|
||||
title: Messages.exportButtonTitle,
|
||||
}).append($('<span>', {'class':'fa fa-download', style: 'font:'+size+' FontAwesome'}));
|
||||
if (callback) {
|
||||
button.click(callback);
|
||||
@@ -932,7 +936,7 @@ define([
|
||||
break;
|
||||
case 'import':
|
||||
button = $('<button>', {
|
||||
title: Messages.importButton + '\n' + Messages.importButtonTitle,
|
||||
title: Messages.importButtonTitle,
|
||||
}).append($('<span>', {'class':'fa fa-upload', style: 'font:'+size+' FontAwesome'}));
|
||||
if (callback) {
|
||||
button.click(common.importContent('text/plain', function (content, file) {
|
||||
@@ -943,7 +947,7 @@ define([
|
||||
case 'forget':
|
||||
button = $('<button>', {
|
||||
id: 'cryptpad-forget',
|
||||
title: Messages.forgetButton + '\n' + Messages.forgetButtonTitle,
|
||||
title: Messages.forgetButtonTitle,
|
||||
'class': "fa fa-trash cryptpad-forget",
|
||||
style: 'font:'+size+' FontAwesome'
|
||||
});
|
||||
@@ -974,7 +978,7 @@ define([
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
common.alert(Messages.movedToTrash);
|
||||
common.alert(Messages.movedToTrash, undefined, true);
|
||||
return;
|
||||
});
|
||||
});
|
||||
@@ -1032,14 +1036,14 @@ define([
|
||||
break;
|
||||
case 'present':
|
||||
button = $('<button>', {
|
||||
title: Messages.presentButton + '\n' + Messages.presentButtonTitle,
|
||||
title: Messages.presentButtonTitle,
|
||||
'class': "fa fa-play-circle cryptpad-present-button", // class used in slide.js
|
||||
style: 'font:'+size+' FontAwesome'
|
||||
});
|
||||
break;
|
||||
case 'source':
|
||||
button = $('<button>', {
|
||||
title: Messages.sourceButton + '\n' + Messages.sourceButtonTitle,
|
||||
title: Messages.sourceButtonTitle,
|
||||
'class': "fa fa-stop-circle cryptpad-source-button", // class used in slide.js
|
||||
style: 'font:'+size+' FontAwesome'
|
||||
});
|
||||
@@ -1158,22 +1162,22 @@ define([
|
||||
var $displayedName = $('<span>', {'class': config.displayNameCls || 'displayName'});
|
||||
var accountName = localStorage[common.userNameKey];
|
||||
var account = isLoggedIn();
|
||||
var $userAdminContent = $('<p>');
|
||||
if (account) {
|
||||
var $userAccount = $('<span>', {'class': 'userAccount'}).append(Messages.user_accountName + ': ' + accountName);
|
||||
$userAdminContent.append($userAccount);
|
||||
$userAdminContent.append($('<br>'));
|
||||
}
|
||||
var $userName = $('<span>', {'class': 'userDisplayName'});
|
||||
if (config.displayName) {
|
||||
// Hide "Display name:" in read only mode
|
||||
$userName.append(Messages.user_displayName + ': ');
|
||||
$userName.append($displayedName.clone());
|
||||
}
|
||||
//$userName.append($displayedName.clone()); TODO remove ?
|
||||
$userAdminContent.append($userName);
|
||||
var options = [];
|
||||
if (config.displayNameCls) {
|
||||
var $userAdminContent = $('<p>');
|
||||
if (account) {
|
||||
var $userAccount = $('<span>', {'class': 'userAccount'}).append(Messages.user_accountName + ': ' + fixHTML(accountName));
|
||||
$userAdminContent.append($userAccount);
|
||||
$userAdminContent.append($('<br>'));
|
||||
}
|
||||
if (config.displayName) {
|
||||
// Hide "Display name:" in read only mode
|
||||
$userName.append(Messages.user_displayName + ': ');
|
||||
$userName.append($displayedName.clone());
|
||||
}
|
||||
//$userName.append($displayedName.clone()); TODO remove ?
|
||||
$userAdminContent.append($userName);
|
||||
options.push({
|
||||
tag: 'p',
|
||||
attributes: {'class': 'accountData'},
|
||||
@@ -1305,8 +1309,9 @@ define([
|
||||
$(window).off('keyup', handler);
|
||||
};
|
||||
|
||||
common.alert = function (msg, cb) {
|
||||
common.alert = function (msg, cb, force) {
|
||||
cb = cb || function () {};
|
||||
if (force !== true) { msg = fixHTML(msg); }
|
||||
var keyHandler = listenForKeys(function (e) { // yes
|
||||
findOKButton().click();
|
||||
});
|
||||
@@ -1319,9 +1324,10 @@ define([
|
||||
});
|
||||
};
|
||||
|
||||
common.prompt = function (msg, def, cb, opt) {
|
||||
common.prompt = function (msg, def, cb, opt, force) {
|
||||
opt = opt || {};
|
||||
cb = cb || function () {};
|
||||
if (force !== true) { msg = fixHTML(msg); }
|
||||
|
||||
var keyHandler = listenForKeys(function (e) { // yes
|
||||
findOKButton().click();
|
||||
@@ -1342,9 +1348,11 @@ define([
|
||||
});
|
||||
};
|
||||
|
||||
common.confirm = function (msg, cb, opt) {
|
||||
common.confirm = function (msg, cb, opt, force) {
|
||||
opt = opt || {};
|
||||
cb = cb || function () {};
|
||||
if (force !== true) { msg = fixHTML(msg); }
|
||||
|
||||
var keyHandler = listenForKeys(function (e) {
|
||||
findOKButton().click();
|
||||
}, function (e) {
|
||||
@@ -1364,11 +1372,11 @@ define([
|
||||
};
|
||||
|
||||
common.log = function (msg) {
|
||||
Alertify.success(msg);
|
||||
Alertify.success(fixHTML(msg));
|
||||
};
|
||||
|
||||
common.warn = function (msg) {
|
||||
Alertify.error(msg);
|
||||
Alertify.error(fixHTML(msg));
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
3
www/common/noscriptfix.js
Normal file
3
www/common/noscriptfix.js
Normal file
@@ -0,0 +1,3 @@
|
||||
// Fix for noscript bugs when caching iframe content.
|
||||
// Caution, this file will get cached, you must change the name if you change it.
|
||||
document.getElementById('pad-iframe').setAttribute('src', 'inner.html?cb=' + (+new Date()));
|
||||
@@ -207,32 +207,35 @@ define([
|
||||
var anonymous = numberOfEditUsers - editUsersNames.length;
|
||||
|
||||
// Update the userlist
|
||||
var $usersTitle = $('<h2>').text(Messages.users);
|
||||
var $editUsers = $userButtons.find('.' + USERLIST_CLS);
|
||||
$editUsers.html('').append($usersTitle);
|
||||
|
||||
var editUsersList = '';
|
||||
var $editUsersList = $('<pre>');
|
||||
if (readOnly !== 1) {
|
||||
editUsersNames.unshift('<span class="yourself">' + Messages.yourself + '</span>');
|
||||
$editUsers.append('<span class="yourself">' + Messages.yourself + '</span>');
|
||||
anonymous--;
|
||||
}
|
||||
if (editUsersNames.length > 0) {
|
||||
$editUsersList.text(editUsersNames.join('\n')); // .text() to avoid XSS
|
||||
$editUsers.append($editUsersList);
|
||||
}
|
||||
if (anonymous > 0) {
|
||||
var text = anonymous === 1 ? Messages.anonymousUser : Messages.anonymousUsers;
|
||||
editUsersNames.push('<span class="anonymous">' + anonymous + ' ' + text + '</span>');
|
||||
$editUsers.push('<span class="anonymous">' + anonymous + ' ' + text + '</span>');
|
||||
}
|
||||
if (numberOfViewUsers > 0) {
|
||||
var viewText = '<span class="viewer">';
|
||||
if (numberOfEditUsers > 0) {
|
||||
editUsersNames.push('');
|
||||
$editUsers.append('<br>');
|
||||
viewText += Messages.and + ' ';
|
||||
}
|
||||
var viewerText = numberOfViewUsers !== 1 ? Messages.viewers : Messages.viewer;
|
||||
viewText += numberOfViewUsers + ' ' + viewerText + '</span>';
|
||||
editUsersNames.push(viewText);
|
||||
}
|
||||
if (editUsersNames.length > 0) {
|
||||
editUsersList += editUsersNames.join('<br>');
|
||||
$editUsers.append(viewText);
|
||||
}
|
||||
|
||||
var $usersTitle = $('<h2>').text(Messages.users);
|
||||
var $editUsers = $userButtons.find('.' + USERLIST_CLS);
|
||||
$editUsers.html('').append($usersTitle).append(editUsersList);
|
||||
|
||||
// Update the buttons
|
||||
var fa_editusers = '<span class="fa fa-users"></span>';
|
||||
|
||||
@@ -10,13 +10,7 @@
|
||||
data-alt-favicon="/customize/alt-favicon.png"
|
||||
id="favicon" />
|
||||
<link rel="stylesheet" href="/customize/main.css" />
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.1.0",
|
||||
});
|
||||
</script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0px;
|
||||
@@ -38,10 +32,6 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="pad-iframe"></iframe>
|
||||
<script>
|
||||
document.getElementById('pad-iframe').setAttribute('src', 'inner.html?' + new Date().getTime());
|
||||
</script>
|
||||
<iframe id="pad-iframe"></iframe><script src="/common/noscriptfix.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ define([
|
||||
|
||||
// Use `$(function () {});` to make sure the html is loaded before doing anything else
|
||||
$(function () {
|
||||
|
||||
var $iframe = $('#pad-iframe').contents();
|
||||
var ifrw = $('#pad-iframe')[0].contentWindow;
|
||||
|
||||
@@ -1803,7 +1802,7 @@ define([
|
||||
if (path.length !== 4) { return; }
|
||||
var element = filesOp.getTrashElementData(path);
|
||||
var sPath = stringifyPath(element.path);
|
||||
Cryptpad.alert('<strong>' + Messages.fm_originalPath + "</strong>:<br>" + sPath);
|
||||
Cryptpad.alert('<strong>' + Messages.fm_originalPath + "</strong>:<br>" + sPath, undefined, true);
|
||||
}
|
||||
module.hideMenu();
|
||||
});
|
||||
@@ -1947,7 +1946,7 @@ define([
|
||||
|
||||
var setName = APP.setName = function (newName) {
|
||||
if (typeof(newName) !== 'string') { return; }
|
||||
var myUserNameTemp = Cryptpad.fixHTML(newName.trim());
|
||||
var myUserNameTemp = newName.trim();
|
||||
if(myUserNameTemp.length > 32) {
|
||||
myUserNameTemp = myUserNameTemp.substr(0, 32);
|
||||
}
|
||||
@@ -2065,7 +2064,7 @@ define([
|
||||
$backupButton.attr('title', Messages.fm_backup_title);
|
||||
$backupButton.on('click', function() {
|
||||
var url = window.location.origin + window.location.pathname + '#' + editHash;
|
||||
Cryptpad.alert(Messages._getKey('fm_alert_backupUrl', [url]));
|
||||
Cryptpad.alert(Messages._getKey('fm_alert_backupUrl', [url]), undefined, true);
|
||||
$('#fm_backupUrl').val(url);
|
||||
$('#fm_backupUrl').click(function () {
|
||||
$(this).select();
|
||||
@@ -2090,7 +2089,7 @@ define([
|
||||
setEditable(false);
|
||||
if (APP.refresh) { APP.refresh(); }
|
||||
APP.toolbar.failed();
|
||||
Cryptpad.alert(Messages.common_connectionLost);
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
|
||||
};
|
||||
var onReconnect = function (info) {
|
||||
setEditable(true);
|
||||
@@ -2123,6 +2122,5 @@ define([
|
||||
onConnectError();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -10,12 +10,7 @@
|
||||
data-alt-favicon="/customize/alt-favicon.png"
|
||||
id="favicon" />
|
||||
<link rel="stylesheet" href="/customize/main.css" />
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
});
|
||||
</script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
width: 100;
|
||||
@@ -100,4 +95,3 @@
|
||||
<div id="lists"></div>
|
||||
<span id="create-list">Add List</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body{
|
||||
padding: 0px;
|
||||
@@ -59,7 +59,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<canvas id="canvas" width="600" height="600" ></canvas>
|
||||
<canvas id="canvas" width="600" height="600" ></canvas>
|
||||
|
||||
<div id="copy">
|
||||
<h2>Welcome to CryptCanvas!</h2>
|
||||
@@ -76,4 +76,3 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body{
|
||||
padding: 0px;
|
||||
@@ -41,7 +41,7 @@
|
||||
<body>
|
||||
|
||||
<form>
|
||||
<input type="radio" name="radio" value="one" checked>One
|
||||
<input type="radio" name="radio" value="one" checked>One
|
||||
<input type="radio" name="radio" value="two">Two
|
||||
<input type="radio" name="radio" value="three">Three<br>
|
||||
|
||||
@@ -76,4 +76,3 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body{
|
||||
padding: 0px;
|
||||
@@ -75,4 +75,3 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body{
|
||||
padding: 0px;
|
||||
@@ -48,4 +48,3 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -2,12 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
});
|
||||
</script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<link rel="icon" type="image/png"
|
||||
href="/customize/main-favicon.png"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" href="/common/render-sd.css" />
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
padding: 0;
|
||||
@@ -38,5 +38,5 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="target">
|
||||
<div id="inner"></div>
|
||||
<div id="inner"></div>
|
||||
</div>
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style></style>
|
||||
</head>
|
||||
<body>
|
||||
<a id="edit" href="#" target="_blank">Edit this document's style</a>
|
||||
|
||||
<h1>HTML Ipsum Presents</h1>
|
||||
|
||||
|
||||
<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>
|
||||
|
||||
<h2>Header Level 2</h2>
|
||||
|
||||
|
||||
<ol>
|
||||
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
|
||||
<li>Aliquam tincidunt mauris eu risus.</li>
|
||||
@@ -30,10 +30,10 @@
|
||||
</ul>
|
||||
|
||||
<pre><code>
|
||||
#header h1 a {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 80px;
|
||||
#header h1 a {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 80px;
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
@@ -58,4 +58,3 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body{
|
||||
padding: 0px;
|
||||
@@ -36,4 +36,3 @@
|
||||
<textarea></textarea>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -2,12 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
});
|
||||
</script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<link rel="icon" type="image/png"
|
||||
href="/customize/main-favicon.png"
|
||||
|
||||
@@ -31,4 +26,3 @@ pre {
|
||||
<h1>Upload</h1>
|
||||
|
||||
<input type="file">
|
||||
|
||||
|
||||
@@ -9,14 +9,7 @@
|
||||
<link rel="icon" type="image/png" href="/customize/main-favicon.png" id="favicon"/>
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.1.0",
|
||||
});
|
||||
</script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<div id="cryptpadTopBar">
|
||||
@@ -77,4 +70,3 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -10,13 +10,7 @@
|
||||
data-alt-favicon="/customize/alt-favicon.png"
|
||||
id="favicon" />
|
||||
<link rel="stylesheet" href="/customize/main.css" />
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.1.0",
|
||||
});
|
||||
</script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0px;
|
||||
@@ -61,10 +55,6 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="pad-iframe"></iframe>
|
||||
<script>
|
||||
document.getElementById('pad-iframe').setAttribute('src', 'inner.html?' + new Date().getTime());
|
||||
</script>
|
||||
<iframe id="pad-iframe"></iframe><script src="/common/noscriptfix.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ define([
|
||||
|
||||
var setName = module.setName = function (newName) {
|
||||
if (typeof(newName) !== 'string') { return; }
|
||||
var myUserNameTemp = Cryptpad.fixHTML(newName.trim());
|
||||
var myUserNameTemp = newName.trim();
|
||||
if(myUserNameTemp.length > 32) {
|
||||
myUserNameTemp = myUserNameTemp.substr(0, 32);
|
||||
}
|
||||
@@ -524,13 +524,7 @@ define([
|
||||
};
|
||||
|
||||
var getHTML = function (Dom) {
|
||||
var data = inner.innerHTML;
|
||||
Dom = Dom || (new DOMParser()).parseFromString(data,"text/html");
|
||||
return ('<!DOCTYPE html>\n' +
|
||||
'<html>\n' +
|
||||
(typeof(Hyperjson.toString) === 'function'?
|
||||
Hyperjson.toString(Hyperjson.fromDOM(Dom.body)):
|
||||
Dom.head.outerHTML) + '\n');
|
||||
return ('<!DOCTYPE html>\n' + '<html>\n' + inner.innerHTML);
|
||||
};
|
||||
|
||||
var domFromHTML = function (html) {
|
||||
@@ -732,7 +726,7 @@ define([
|
||||
setEditable(false);
|
||||
// TODO inform them that the session was torn down
|
||||
toolbar.failed();
|
||||
Cryptpad.alert(Messages.common_connectionLost);
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
|
||||
};
|
||||
|
||||
var onConnectionChange = realtimeOptions.onConnectionChange = function (info) {
|
||||
@@ -743,7 +737,7 @@ define([
|
||||
toolbar.reconnecting(info.myId);
|
||||
Cryptpad.findOKButton().click();
|
||||
} else {
|
||||
Cryptpad.alert(Messages.common_connectionLost);
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -11,11 +11,7 @@
|
||||
id="favicon" />
|
||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="/customize/main.css" />
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script> require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.1.0",
|
||||
}); </script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
width: 100%;
|
||||
|
||||
@@ -440,7 +440,7 @@ define([
|
||||
|
||||
var setName = APP.setName = function (newName) {
|
||||
if (typeof(newName) !== 'string') { return; }
|
||||
var myUserNameTemp = Cryptpad.fixHTML(newName.trim());
|
||||
var myUserNameTemp = newName.trim();
|
||||
if(myUserNameTemp.length > 32) {
|
||||
myUserNameTemp = myUserNameTemp.substr(0, 32);
|
||||
}
|
||||
@@ -662,7 +662,7 @@ define([
|
||||
|
||||
var disconnect = function (info) {
|
||||
//setEditable(false); // TODO
|
||||
Cryptpad.alert(Messages.common_connectionLost);
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
|
||||
};
|
||||
|
||||
var create = function (info) {
|
||||
|
||||
@@ -5,15 +5,9 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Cryptpad: login</title>
|
||||
<link rel="stylesheet" href="/bower_components/components-font-awesome/css/font-awesome.min.css">
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<link rel="stylesheet" href="/customize/main.css" />
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.1.0",
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<div id="cryptpadTopBar">
|
||||
@@ -89,4 +83,3 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="cp">
|
||||
<!-- If this file is not called customize.dist/src/template.html, it is generated -->
|
||||
<head>
|
||||
<title data-localization="main_title">Cryptpad: Zero Knowledge, Collaborative Real Time Editing</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
@@ -10,16 +11,8 @@
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
<script src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.1.0",
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="html">
|
||||
<div id="cryptpadTopBar">
|
||||
@@ -68,8 +61,7 @@
|
||||
|
||||
|
||||
<div id="mainBlock" class="hidden">
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<div id="container"></div>
|
||||
<div id="container"></div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -118,4 +110,3 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ define([
|
||||
}
|
||||
obj.proxy.drive = Cryptpad.getStore().getEmptyObject();
|
||||
Cryptpad.alert(Messages.settings_resetDone);
|
||||
});
|
||||
}, undefined, true);
|
||||
});
|
||||
|
||||
return $div;
|
||||
|
||||
@@ -3,13 +3,7 @@
|
||||
<head>
|
||||
<title>CryptPad</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
waitSeconds: 60,
|
||||
urlArgs: "bust=1.1.0",
|
||||
});
|
||||
</script>
|
||||
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||
<link rel="icon" type="image/png"
|
||||
href="/customize/main-favicon.png"
|
||||
|
||||
@@ -52,11 +46,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="iframe-container">
|
||||
<iframe id="pad-iframe"></iframe>
|
||||
<script>
|
||||
document.getElementById('pad-iframe').setAttribute('src', 'inner.html?' + new Date().getTime());
|
||||
</script>
|
||||
<iframe id="pad-iframe"></iframe><script src="/common/noscriptfix.js"></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ define([
|
||||
Slide.setModal($modal, $content, $pad, ifrw, initialState);
|
||||
|
||||
var enterPresentationMode = function (shouldLog) {
|
||||
Slide.show(true, $textarea.val());
|
||||
Slide.show(true, editor.getValue());
|
||||
if (shouldLog) {
|
||||
Cryptpad.log(Messages.presentSuccess);
|
||||
}
|
||||
@@ -530,13 +530,13 @@ define([
|
||||
id: SLIDE_BACKCOLOR_ID,
|
||||
'class': 'fa fa-square rightside-button',
|
||||
'style': 'font-family: FontAwesome; color: #000;',
|
||||
title: Messages.backgroundButton + '\n' + Messages.backgroundButtonTitle
|
||||
title: Messages.backgroundButtonTitle
|
||||
});
|
||||
var $text = $('<button>', {
|
||||
id: SLIDE_COLOR_ID,
|
||||
'class': 'fa fa-i-cursor rightside-button',
|
||||
'style': 'font-family: FontAwesome; font-weight: bold; color: #fff; background: #000;',
|
||||
title: Messages.colorButton + '\n' + Messages.colorButtonTitle
|
||||
title: Messages.colorButtonTitle
|
||||
});
|
||||
var $testColor = $('<input>', { type: 'color', value: '!' });
|
||||
var $check = $pad.contents().find("#colorPicker_check");
|
||||
@@ -771,7 +771,7 @@ define([
|
||||
// inform of network disconnect
|
||||
setEditable(false);
|
||||
toolbar.failed();
|
||||
Cryptpad.alert(Messages.common_connectionLost);
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
|
||||
};
|
||||
|
||||
var onConnectionChange = config.onConnectionChange = function (info) {
|
||||
@@ -782,7 +782,7 @@ define([
|
||||
toolbar.reconnecting(info.myId);
|
||||
Cryptpad.findOKButton().click();
|
||||
} else {
|
||||
Cryptpad.alert(Messages.common_connectionLost);
|
||||
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user