Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
0ad95142f5
@ -4,7 +4,7 @@ define(function() {
|
|||||||
/* Select the buttons displayed on the main page to create new collaborative sessions
|
/* Select the buttons displayed on the main page to create new collaborative sessions
|
||||||
* Existing types : pad, code, poll, slide
|
* Existing types : pad, code, poll, slide
|
||||||
*/
|
*/
|
||||||
config.availablePadTypes = ['pad', 'code', 'slide', 'poll'];
|
config.availablePadTypes = ['drive', 'pad', 'code', 'slide', 'poll'];
|
||||||
|
|
||||||
/* Cryptpad apps use a common API to display notifications to users
|
/* Cryptpad apps use a common API to display notifications to users
|
||||||
* by default, notifications are hidden after 5 seconds
|
* by default, notifications are hidden after 5 seconds
|
||||||
|
|||||||
@ -70,14 +70,14 @@
|
|||||||
<div id="main">
|
<div id="main">
|
||||||
<div class="mainOverlay"></div>
|
<div class="mainOverlay"></div>
|
||||||
<div id="main-container">
|
<div id="main-container">
|
||||||
<div id="data">
|
<div id="data" class="hidden">
|
||||||
<p class="left" data-localization="main_p1"><!-- Zero Knowledge collaborative realtime editor. Protected from the NSA. --></p>
|
<p class="left" data-localization="main_p1"><!-- Zero Knowledge collaborative realtime editor. Protected from the NSA. --></p>
|
||||||
|
|
||||||
<div id="buttons" class="buttons"><button class="btn btn-secondary nologin" data-localization="login_nologin"></button></div>
|
<div id="buttons" class="buttons"><button class="btn btn-secondary nologin" data-localization="login_nologin"></button></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="userForm" class="form-group">
|
<div id="userForm" class="form-group hidden">
|
||||||
<!--<center>
|
<!--<center>
|
||||||
<h1 data-localization="form_title"></h1>
|
<h1 data-localization="form_title"></h1>
|
||||||
</center>-->
|
</center>-->
|
||||||
@ -89,6 +89,11 @@
|
|||||||
<div style="display: none;"><span class="remember form-check"><label for="rememberme" class="form-check-label" data-localization-append="login_remember"><input type="checkbox" id="rememberme" class="form-check-input" checked="checked"></label></span><br></div>
|
<div style="display: none;"><span class="remember form-check"><label for="rememberme" class="form-check-label" data-localization-append="login_remember"><input type="checkbox" id="rememberme" class="form-check-input" checked="checked"></label></span><br></div>
|
||||||
<button class="btn btn-secondary login half first" data-localization="login_login"></button> <button class="btn btn-primary register half" data-localization="login_register"></button><br>
|
<button class="btn btn-secondary login half first" data-localization="login_login"></button> <button class="btn btn-primary register half" data-localization="login_register"></button><br>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="loggedIn" class="hidden">
|
||||||
|
<p id="loggedInHello"></p>
|
||||||
|
<p><button class="btn btn-primary nologin" data-localization="login_accessDrive"></button></p>
|
||||||
|
<p><button id="loggedInLogOut" class="btn btn-secondary" data-localization="logoutButton"></button></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="page category first" id="knowmore">
|
<div class="page category first" id="knowmore">
|
||||||
|
|||||||
@ -679,9 +679,6 @@ html.cp,
|
|||||||
background-color: #000;
|
background-color: #000;
|
||||||
opacity: 0.35;
|
opacity: 0.35;
|
||||||
}
|
}
|
||||||
.cp #mainBlock.hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.cp #noscriptContainer {
|
.cp #noscriptContainer {
|
||||||
color: black;
|
color: black;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -714,6 +711,9 @@ html.cp,
|
|||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
.cp #main .hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
.cp #main_other {
|
.cp #main_other {
|
||||||
padding: 0 15vw;
|
padding: 0 15vw;
|
||||||
background-color: #fafafa;
|
background-color: #fafafa;
|
||||||
@ -783,6 +783,32 @@ html.cp,
|
|||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
.cp #main #loggedIn,
|
||||||
|
.cp #main_other #loggedIn {
|
||||||
|
color: #fff;
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 0;
|
||||||
|
margin-left: 50px;
|
||||||
|
width: 350px;
|
||||||
|
max-width: 35%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.cp #main #loggedIn button,
|
||||||
|
.cp #main_other #loggedIn button {
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.cp #main #loggedIn p,
|
||||||
|
.cp #main_other #loggedIn p {
|
||||||
|
margin: 20px;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
.cp #main #userForm,
|
.cp #main #userForm,
|
||||||
.cp #main_other #userForm {
|
.cp #main_other #userForm {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@ -6,37 +6,55 @@ define([
|
|||||||
'/customize/languageSelector.js',
|
'/customize/languageSelector.js',
|
||||||
'/bower_components/jquery/dist/jquery.min.js',
|
'/bower_components/jquery/dist/jquery.min.js',
|
||||||
], function (Messages, Config, Cryptpad, LilUri, LS) {
|
], function (Messages, Config, Cryptpad, LilUri, LS) {
|
||||||
if (Cryptpad.isLoggedIn()) {
|
|
||||||
document.location.href = '/drive';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var $ = window.$;
|
var $ = window.$;
|
||||||
|
var $main = $('#mainBlock');
|
||||||
var USE_TABLE = Config.USE_HOMEPAGE_TABLE;
|
|
||||||
var USE_FS_STORE = Config.USE_FS_STORE;
|
|
||||||
|
|
||||||
var APP = window.APP = {
|
var APP = window.APP = {
|
||||||
Cryptpad: Cryptpad,
|
Cryptpad: Cryptpad,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Language selector
|
||||||
|
var $sel = $('#language-selector');
|
||||||
|
Cryptpad.createLanguageSelector(undefined, $sel);
|
||||||
|
$sel.find('button').addClass('btn').addClass('btn-secondary');
|
||||||
|
$sel.show();
|
||||||
|
|
||||||
|
$(window).click(function () {
|
||||||
|
$('.cryptpad-dropdown').hide();
|
||||||
|
});
|
||||||
|
|
||||||
// main block is hidden in case javascript is disabled
|
// main block is hidden in case javascript is disabled
|
||||||
$('#mainBlock').removeClass('hidden');
|
$main.removeClass('hidden');
|
||||||
|
|
||||||
var padTypes = {
|
// Make sure we don't display non-translated content (empty button)
|
||||||
'/pad/': Messages.type.pad,
|
$main.find('#data').removeClass('hidden');
|
||||||
'/code/': Messages.type.code,
|
|
||||||
'/poll/': Messages.type.poll,
|
|
||||||
'/slide/': Messages.type.slide,
|
|
||||||
};
|
|
||||||
|
|
||||||
var now = new Date();
|
if (Cryptpad.isLoggedIn()) {
|
||||||
var hasRecent = false;
|
var name = localStorage[Cryptpad.userNameKey] || sessionStorage[Cryptpad.userNameKey];
|
||||||
|
var $loggedInBlock = $main.find('#loggedIn');
|
||||||
|
var $hello = $loggedInBlock.find('#loggedInHello');
|
||||||
|
var $logout = $loggedInBlock.find('#loggedInLogOut');
|
||||||
|
|
||||||
|
$hello.text(Messages._getKey('login_hello', [name]));
|
||||||
|
$('#buttons').find('.nologin').hide();
|
||||||
|
|
||||||
|
$logout.click(function () {
|
||||||
|
Cryptpad.logout(function () {
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$loggedInBlock.removeClass('hidden');
|
||||||
|
//return;
|
||||||
|
} else {
|
||||||
|
$main.find('#userForm').removeClass('hidden');
|
||||||
|
}
|
||||||
|
|
||||||
var displayCreateButtons = function () {
|
var displayCreateButtons = function () {
|
||||||
var $parent = $('#buttons');
|
var $parent = $('#buttons');
|
||||||
var options = [];
|
var options = [];
|
||||||
Config.availablePadTypes.forEach(function (el) {
|
Config.availablePadTypes.forEach(function (el) {
|
||||||
|
if (el === 'drive') { return; }
|
||||||
options.push({
|
options.push({
|
||||||
tag: 'a',
|
tag: 'a',
|
||||||
attributes: {
|
attributes: {
|
||||||
@ -55,17 +73,6 @@ define([
|
|||||||
$block.find('button').addClass('btn').addClass('btn-success');
|
$block.find('button').addClass('btn').addClass('btn-success');
|
||||||
$block.appendTo($parent);
|
$block.appendTo($parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Language selector
|
|
||||||
var $sel = $('#language-selector');
|
|
||||||
Cryptpad.createLanguageSelector(undefined, $sel);
|
|
||||||
$sel.find('button').addClass('btn').addClass('btn-secondary');
|
|
||||||
$sel.show();
|
|
||||||
|
|
||||||
$(window).click(function () {
|
|
||||||
$sel.find('.cryptpad-dropdown').hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
var addButtonHandlers = function () {
|
var addButtonHandlers = function () {
|
||||||
$('button.login').click(function (e) {
|
$('button.login').click(function (e) {
|
||||||
var username = $('#name').val();
|
var username = $('#name').val();
|
||||||
|
|||||||
@ -3,14 +3,14 @@
|
|||||||
<div id="main">
|
<div id="main">
|
||||||
<div class="mainOverlay"></div>
|
<div class="mainOverlay"></div>
|
||||||
<div id="main-container">
|
<div id="main-container">
|
||||||
<div id="data">
|
<div id="data" class="hidden">
|
||||||
<p class="left" data-localization="main_p1"><!-- Zero Knowledge collaborative realtime editor. Protected from the NSA. --></p>
|
<p class="left" data-localization="main_p1"><!-- Zero Knowledge collaborative realtime editor. Protected from the NSA. --></p>
|
||||||
|
|
||||||
<div id="buttons" class="buttons"><button class="btn btn-secondary nologin" data-localization="login_nologin"></button></div>
|
<div id="buttons" class="buttons"><button class="btn btn-secondary nologin" data-localization="login_nologin"></button></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="userForm" class="form-group">
|
<div id="userForm" class="form-group hidden">
|
||||||
<!--<center>
|
<!--<center>
|
||||||
<h1 data-localization="form_title"></h1>
|
<h1 data-localization="form_title"></h1>
|
||||||
</center>-->
|
</center>-->
|
||||||
@ -22,6 +22,11 @@
|
|||||||
<div style="display: none;"><span class="remember form-check"><label for="rememberme" class="form-check-label" data-localization-append="login_remember"><input type="checkbox" id="rememberme" class="form-check-input" checked="checked"></label></span><br></div>
|
<div style="display: none;"><span class="remember form-check"><label for="rememberme" class="form-check-label" data-localization-append="login_remember"><input type="checkbox" id="rememberme" class="form-check-input" checked="checked"></label></span><br></div>
|
||||||
<button class="btn btn-secondary login half first" data-localization="login_login"></button> <button class="btn btn-primary register half" data-localization="login_register"></button><br>
|
<button class="btn btn-secondary login half first" data-localization="login_login"></button> <button class="btn btn-primary register half" data-localization="login_register"></button><br>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="loggedIn" class="hidden">
|
||||||
|
<p id="loggedInHello"></p>
|
||||||
|
<p><button class="btn btn-primary nologin" data-localization="login_accessDrive"></button></p>
|
||||||
|
<p><button id="loggedInLogOut" class="btn btn-secondary" data-localization="logoutButton"></button></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="page category first" id="knowmore">
|
<div class="page category first" id="knowmore">
|
||||||
|
|||||||
@ -251,11 +251,6 @@ body.html {
|
|||||||
opacity: 0.35;
|
opacity: 0.35;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#mainBlock {
|
|
||||||
&.hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#noscriptContainer {
|
#noscriptContainer {
|
||||||
color: black;
|
color: black;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -287,6 +282,9 @@ body.html {
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
.hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#main_other {
|
#main_other {
|
||||||
padding: 0 @main-border-width;
|
padding: 0 @main-border-width;
|
||||||
@ -355,6 +353,31 @@ body.html {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#loggedIn {
|
||||||
|
color: @main-color;
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 0;
|
||||||
|
margin-left: 50px;
|
||||||
|
width: 350px;
|
||||||
|
max-width: 35%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
button {
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin: 20px;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#userForm {
|
#userForm {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|||||||
@ -13,6 +13,7 @@ define(function () {
|
|||||||
out.type.code = 'Code';
|
out.type.code = 'Code';
|
||||||
out.type.poll = 'Sondage';
|
out.type.poll = 'Sondage';
|
||||||
out.type.slide = 'Présentation';
|
out.type.slide = 'Présentation';
|
||||||
|
out.type.drive = 'Drive';
|
||||||
|
|
||||||
out.errorBox_errorType_disconnected = 'Connexion perdue';
|
out.errorBox_errorType_disconnected = 'Connexion perdue';
|
||||||
out.errorBox_errorExplanation_disconnected = [
|
out.errorBox_errorExplanation_disconnected = [
|
||||||
@ -82,8 +83,8 @@ define(function () {
|
|||||||
out.shareSuccess = 'URL copiée dans le presse-papiers';
|
out.shareSuccess = 'URL copiée dans le presse-papiers';
|
||||||
out.shareFailed = "Échec de la copie de l'URL dans le presse-papiers";
|
out.shareFailed = "Échec de la copie de l'URL dans le presse-papiers";
|
||||||
|
|
||||||
out.newPadButton = 'Nouveau';
|
out.appsButton = 'Apps';
|
||||||
out.newPadButtonTitle = 'Créer un nouveau document';
|
out.appsButtonTitle = 'Accéder aux autres applications';
|
||||||
|
|
||||||
out.presentButton = 'PRÉSENTER';
|
out.presentButton = 'PRÉSENTER';
|
||||||
out.presentButtonTitle = "Entrer en mode présentation";
|
out.presentButtonTitle = "Entrer en mode présentation";
|
||||||
@ -278,6 +279,8 @@ define(function () {
|
|||||||
|
|
||||||
out.loginText = '<p>Votre nom d\'utilisateur et votre mot d epasse sont utilisés pour générer une clé unique qui reste inconnue de notre serveur.</p>\n' +
|
out.loginText = '<p>Votre nom d\'utilisateur et votre mot d epasse sont utilisés pour générer une clé unique qui reste inconnue de notre serveur.</p>\n' +
|
||||||
'<p>Faîtes attention de ne pas perdre vos identifiants, puisqu\'il est impossible de les récupérer</p>';
|
'<p>Faîtes attention de ne pas perdre vos identifiants, puisqu\'il est impossible de les récupérer</p>';
|
||||||
|
out.login_hello = 'Bonjour {0},'; // {0} is the username
|
||||||
|
out.login_accessDrive = 'Accédez à votre drive';
|
||||||
|
|
||||||
// index.html
|
// index.html
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@ define(function () {
|
|||||||
out.type.code = 'Code';
|
out.type.code = 'Code';
|
||||||
out.type.poll = 'Poll';
|
out.type.poll = 'Poll';
|
||||||
out.type.slide = 'Presentation';
|
out.type.slide = 'Presentation';
|
||||||
|
out.type.drive = 'Drive';
|
||||||
|
|
||||||
out.errorBox_errorType_disconnected = 'Connection Lost';
|
out.errorBox_errorType_disconnected = 'Connection Lost';
|
||||||
out.errorBox_errorExplanation_disconnected = [
|
out.errorBox_errorExplanation_disconnected = [
|
||||||
@ -87,8 +88,8 @@ define(function () {
|
|||||||
out.shareSuccess = 'Copied URL to clipboard';
|
out.shareSuccess = 'Copied URL to clipboard';
|
||||||
out.shareFailed = "Failed to copy URL to clipboard";
|
out.shareFailed = "Failed to copy URL to clipboard";
|
||||||
|
|
||||||
out.newPadButton = 'New';
|
out.appsButton = 'Apps';
|
||||||
out.newPadButtonTitle = 'Create a new document';
|
out.appsButtonTitle = 'Access other applications';
|
||||||
|
|
||||||
out.presentButton = 'PRESENT';
|
out.presentButton = 'PRESENT';
|
||||||
out.presentButtonTitle = "Enter presentation mode";
|
out.presentButtonTitle = "Enter presentation mode";
|
||||||
@ -280,6 +281,8 @@ define(function () {
|
|||||||
|
|
||||||
out.loginText = '<p>Your username and password are used to generate a unique key which is never known by our server.</p>\n' +
|
out.loginText = '<p>Your username and password are used to generate a unique key which is never known by our server.</p>\n' +
|
||||||
'<p>Be careful not to forget your credentials, as they are impossible to recover</p>';
|
'<p>Be careful not to forget your credentials, as they are impossible to recover</p>';
|
||||||
|
out.login_hello = 'Hello {0},'; // {0} is the username
|
||||||
|
out.login_accessDrive = 'Access your drive';
|
||||||
|
|
||||||
// index.html
|
// index.html
|
||||||
|
|
||||||
|
|||||||
@ -65,22 +65,26 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var userHashKey = common.userHashKey = 'User_hash';
|
var userHashKey = common.userHashKey = 'User_hash';
|
||||||
|
var userNameKey = common.userNameKey = 'User_name';
|
||||||
var fileHashKey = common.fileHashKey = 'FS_hash';
|
var fileHashKey = common.fileHashKey = 'FS_hash';
|
||||||
|
|
||||||
var login = common.login = function (hash, remember, cb) {
|
var login = common.login = function (hash, name, remember, cb) {
|
||||||
if (!hash) { throw new Error('expected a user hash'); }
|
if (!hash) { throw new Error('expected a user hash'); }
|
||||||
|
if (!name) { throw new Error('expected a user name'); }
|
||||||
if (!remember) {
|
if (!remember) {
|
||||||
sessionStorage.setItem(userHashKey, hash);
|
sessionStorage.setItem(userHashKey, hash);
|
||||||
|
sessionStorage.setItem(userNameKey, name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
localStorage.setItem(userHashKey, hash);
|
localStorage.setItem(userHashKey, hash);
|
||||||
|
localStorage.setItem(userNameKey, name);
|
||||||
}
|
}
|
||||||
if (cb) { cb(); }
|
if (cb) { cb(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
var logout = common.logout = function (cb) {
|
var logout = common.logout = function (cb) {
|
||||||
[
|
[
|
||||||
// fileHashKey,
|
userNameKey,
|
||||||
userHashKey,
|
userHashKey,
|
||||||
].forEach(function (k) {
|
].forEach(function (k) {
|
||||||
sessionStorage.removeItem(k);
|
sessionStorage.removeItem(k);
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
define([
|
define([
|
||||||
'/customize/messages.js',
|
'/customize/messages.js',
|
||||||
|
'/customize/application_config.js',
|
||||||
'/bower_components/jquery/dist/jquery.min.js'
|
'/bower_components/jquery/dist/jquery.min.js'
|
||||||
], function (Messages) {
|
], function (Messages, Config) {
|
||||||
var $ = window.jQuery;
|
var $ = window.jQuery;
|
||||||
|
|
||||||
var Bar = {
|
var Bar = {
|
||||||
@ -349,24 +350,24 @@ define([
|
|||||||
|
|
||||||
if (config.displayed.indexOf('newpad') !== -1) {
|
if (config.displayed.indexOf('newpad') !== -1) {
|
||||||
var pads_options = [];
|
var pads_options = [];
|
||||||
['pad', 'code', 'slide', 'poll'].forEach(function (p) {
|
Config.availablePadTypes.forEach(function (p) {
|
||||||
pads_options.push({
|
pads_options.push({
|
||||||
tag: 'a',
|
tag: 'a',
|
||||||
attributes: {
|
attributes: {
|
||||||
'target': '_blank', // TODO: open in the same window?
|
'target': '_blank',
|
||||||
'href': '/' + p,
|
'href': '/' + p,
|
||||||
},
|
},
|
||||||
content: Messages.type[p] // Pretty name of the language value
|
content: Messages.type[p]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
var $newButton = $('<div>').append($('<span>', {'class': 'fa fa-plus'})).append(Messages.newPadButton);
|
var $newButton = $('<div>').append($('<span>', {'class': 'fa fa-th-large'})).append(Messages.appsButton);
|
||||||
var dropdownConfig = {
|
var dropdownConfig = {
|
||||||
text: $newButton.html(), // Button initial text
|
text: $newButton.html(), // Button initial text
|
||||||
options: pads_options, // Entries displayed in the menu
|
options: pads_options, // Entries displayed in the menu
|
||||||
left: true, // Open to the left of the button
|
left: true, // Open to the left of the button
|
||||||
};
|
};
|
||||||
var $newPadBlock = Cryptpad.createDropdown(dropdownConfig);
|
var $newPadBlock = Cryptpad.createDropdown(dropdownConfig);
|
||||||
$newPadBlock.find('button').attr('title', Messages.newPadButtonTitle);
|
$newPadBlock.find('button').attr('title', Messages.appsButtonTitle);
|
||||||
$newPadBlock.appendTo($userContainer);
|
$newPadBlock.appendTo($userContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -452,6 +452,12 @@ define([
|
|||||||
$menu.find('a.own').parent('li').hide();
|
$menu.find('a.own').parent('li').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$menu.find('[data-type]').each(function (idx, el) {
|
||||||
|
if (AppConfig.availablePadTypes.indexOf($(el).attr('data-type')) === -1) {
|
||||||
|
$(el).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$menu.css({
|
$menu.css({
|
||||||
display: "block",
|
display: "block",
|
||||||
left: e.pageX,
|
left: e.pageX,
|
||||||
@ -893,6 +899,7 @@ define([
|
|||||||
options.push({tag: 'hr'});
|
options.push({tag: 'hr'});
|
||||||
}
|
}
|
||||||
AppConfig.availablePadTypes.forEach(function (type) {
|
AppConfig.availablePadTypes.forEach(function (type) {
|
||||||
|
if (type === 'drive') { return; }
|
||||||
var path = filesOp.isPathInTrash(currentPath) ? '' : '/#?path=' + encodeURIComponent(currentPath);
|
var path = filesOp.isPathInTrash(currentPath) ? '' : '/#?path=' + encodeURIComponent(currentPath);
|
||||||
var attributes = {
|
var attributes = {
|
||||||
'class': 'newdoc',
|
'class': 'newdoc',
|
||||||
|
|||||||
@ -131,7 +131,7 @@ define([
|
|||||||
APP.setAccountName(getAccountName(proxy));
|
APP.setAccountName(getAccountName(proxy));
|
||||||
APP.setDisplayName(getDisplayName(proxy));
|
APP.setDisplayName(getDisplayName(proxy));
|
||||||
|
|
||||||
Cryptpad.login(opt.userHash, opt.remember);
|
Cryptpad.login(opt.userHash, getAccountName(proxy), opt.remember);
|
||||||
APP.revealLogin(false);
|
APP.revealLogin(false);
|
||||||
APP.revealUser(true);
|
APP.revealUser(true);
|
||||||
APP.revealLogout(true);
|
APP.revealLogout(true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user