mirror of https://github.com/xwiki-labs/cryptpad
Merge branch 'accessibility' into staging
This commit is contained in:
commit
fd90827da9
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<title data-localization="main_title">CryptPad: Collaboration suite, encrypted and open-source</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
|
||||
<script src="/customize/pre-loading.js?ver=1.1"></script>
|
||||
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
|
||||
|
|
|
@ -8,9 +8,12 @@ define([
|
|||
var urlArgs = window.location.href.replace(/^.*\?([^\?]*)$/, function (all, x) { return x; });
|
||||
var elem = document.createElement('div');
|
||||
elem.setAttribute('id', 'cp-loading');
|
||||
|
||||
Messages.label_logo = "CryptPad logo"; // XXX Logo
|
||||
|
||||
elem.innerHTML = [
|
||||
'<div class="cp-loading-logo">',
|
||||
'<img class="cp-loading-cryptofist" src="/customize/CryptPad_logo.svg?' + urlArgs + '">',
|
||||
'<img class="cp-loading-cryptofist" src="/customize/CryptPad_logo.svg?' + urlArgs + '" alt="' + Messages.label_logo + '">',
|
||||
'</div>',
|
||||
'<div class="cp-loading-container">',
|
||||
'<div class="cp-loading-spinner-container">',
|
||||
|
|
|
@ -589,7 +589,8 @@ define([
|
|||
break;
|
||||
case 'INVAL_USER':
|
||||
UI.removeLoadingScreen(function () {
|
||||
UI.alert(Messages.login_invalUser, function () {
|
||||
Messages.login_notFilledUser = 'Please fill in a username'; // XXX
|
||||
UI.alert(Messages.login_notFilledUser , function () {
|
||||
hashing = false;
|
||||
$('#password').focus();
|
||||
});
|
||||
|
@ -597,7 +598,8 @@ define([
|
|||
break;
|
||||
case 'INVAL_PASS':
|
||||
UI.removeLoadingScreen(function () {
|
||||
UI.alert(Messages.login_invalPass, function () {
|
||||
Messages.login_notFilledPass = 'Please fill in a password'; // XXX
|
||||
UI.alert(Messages.login_notFilledPass, function () {
|
||||
hashing = false;
|
||||
$('#password').focus();
|
||||
});
|
||||
|
|
|
@ -56,16 +56,16 @@ define([
|
|||
};
|
||||
|
||||
var languageSelector = function () {
|
||||
var options = [];
|
||||
var languages = Msg._languages;
|
||||
var selected = Msg._languageUsed;
|
||||
var keys = Object.keys(languages).sort();
|
||||
keys.forEach(function (l) {
|
||||
var attr = { value: l, role: 'option'};
|
||||
var options = keys.map(function (l) {
|
||||
var attr = { value: l };
|
||||
if (selected === l) { attr.selected = 'selected'; }
|
||||
options.push(h('option', attr, languages[l]));
|
||||
return h('option', attr, languages[l]);
|
||||
});
|
||||
var select = h('select', {role: 'listbox', 'label': 'language'}, options);
|
||||
Msg.selectLanguage = "Select a language"; // XXX
|
||||
var select = h('select', { 'aria-label': Msg.selectLanguage }, options);
|
||||
$(select).change(function () {
|
||||
Language.setLanguage($(select).val() || '', null, function () {
|
||||
window.location.reload();
|
||||
|
|
|
@ -15,28 +15,36 @@ define([
|
|||
h('div.col-md-3'),
|
||||
h('div#userForm.form-group.hidden.col-md-6', [
|
||||
h('div.cp-login-instance', Msg._getKey('login_instance', [ Pages.Instance.name ])),
|
||||
h('input.form-control#name', {
|
||||
name: 'name',
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
autocorrect: 'off',
|
||||
autocapitalize: 'off',
|
||||
spellcheck: false,
|
||||
placeholder: Msg.login_username,
|
||||
autofocus: true,
|
||||
}),
|
||||
h('input.form-control#password', {
|
||||
type: 'password',
|
||||
'name': 'password',
|
||||
placeholder: Msg.login_password,
|
||||
}),
|
||||
h('div.big-container', [
|
||||
h('div.input-container', [
|
||||
h('label.cp-default-label', { for: 'name' }, Msg.login_username), // XXX label not visible
|
||||
h('input.form-control#name', {
|
||||
name: 'name',
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
autocorrect: 'off',
|
||||
autocapitalize: 'off',
|
||||
spellcheck: false,
|
||||
placeholder: Msg.login_username,
|
||||
autofocus: true,
|
||||
}),
|
||||
]),
|
||||
h('div.input-container', [
|
||||
h('label.cp-default-label', { for: 'password' }, Msg.login_password), // XXX label not visible
|
||||
h('input.form-control#password', {
|
||||
type: 'password',
|
||||
'name': 'password',
|
||||
placeholder: Msg.login_password,
|
||||
}),
|
||||
]),
|
||||
]),
|
||||
h('div.checkbox-container', [
|
||||
UI.createCheckbox('import-recent', Msg.register_importRecent),
|
||||
]),
|
||||
h('div.extra', [
|
||||
(Config.restrictRegistration?
|
||||
undefined:
|
||||
h('button#register.cp-secondary', Msg.login_register)
|
||||
undefined:
|
||||
h('button#register.cp-secondary', Msg.login_register)
|
||||
),
|
||||
h('button.login', Msg.login_login)
|
||||
])
|
||||
|
@ -53,4 +61,3 @@ define([
|
|||
])];
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ define([
|
|||
|
||||
return function () {
|
||||
document.title = Msg.recovery_header;
|
||||
|
||||
var frame = function (content) {
|
||||
return [
|
||||
h('div#cp-main', [
|
||||
|
@ -21,7 +20,6 @@ define([
|
|||
]),
|
||||
];
|
||||
};
|
||||
|
||||
return frame([
|
||||
h('div.row.cp-recovery-det', [
|
||||
h('div.hidden.col-md-3'),
|
||||
|
@ -29,25 +27,33 @@ define([
|
|||
h('div.cp-recovery-step.step1', [
|
||||
h('p', Msg.recovery_mfa_description),
|
||||
h('div.alert.alert-danger.wrong-cred.cp-hidden', Msg.login_noSuchUser),
|
||||
h('input.form-control#username', {
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
autocorrect: 'off',
|
||||
autocapitalize: 'off',
|
||||
spellcheck: false,
|
||||
placeholder: Msg.login_username,
|
||||
autofocus: true,
|
||||
}),
|
||||
h('input.form-control#password', {
|
||||
type: 'password',
|
||||
placeholder: Msg.login_password,
|
||||
}),
|
||||
h('div.big-container', [
|
||||
h('div.input-container', [
|
||||
h('label.cp-default-label', {for: 'username'}, Msg.login_username), // XXX label not visible
|
||||
h('input.form-control#username', {
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
autocorrect: 'off',
|
||||
autocapitalize: 'off',
|
||||
spellcheck: false,
|
||||
placeholder: Msg.login_username,
|
||||
autofocus: true,
|
||||
}),
|
||||
]),
|
||||
h('div.input-container', [
|
||||
h('label.cp-default-label', {for: 'password'}, Msg.login_password), // XXX label not visible
|
||||
h('input.form-control#password', {
|
||||
type: 'password',
|
||||
placeholder: Msg.login_password,
|
||||
}),
|
||||
]),
|
||||
]),
|
||||
h('div.cp-recover-button',
|
||||
h('button.btn.btn-primary#cp-recover-login', Msg.continue)
|
||||
)
|
||||
]),
|
||||
h('div.cp-recovery-step.step2', { style: 'display: none;' }, [
|
||||
h('label', Msg.recovery_mfa_secret),
|
||||
h('div.cp-recovery-step.step2', {style: 'display: none;'}, [
|
||||
h('label', Msg.recovery_mfa_secret), // XXX label not visible
|
||||
h('input.form-control#mfarecovery', {
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
|
@ -61,7 +67,7 @@ define([
|
|||
h('i.fa.fa-caret-right'),
|
||||
h('span', Msg.recovery_forgot)
|
||||
]),
|
||||
h('div.cp-recovery-alt', { style: 'display: none;' }, [
|
||||
h('div.cp-recovery-alt', {style: 'display: none;'}, [
|
||||
UI.setHTML(h('div'),
|
||||
Msg._getKey('recovery_forgot_text', [Config.adminEmail || ''])),
|
||||
h('textarea.cp-recover-email', {readonly: 'readonly'}),
|
||||
|
@ -71,7 +77,7 @@ define([
|
|||
h('button.btn.btn-primary#cp-recover', Msg.mfa_disable)
|
||||
)
|
||||
]),
|
||||
h('div.cp-recovery-step.step-info', { style: 'display: none;' }, [
|
||||
h('div.cp-recovery-step.step-info', {style: 'display: none;'}, [
|
||||
h('div.alert.alert-info.cp-hidden.disabled', Msg.recovery_mfa_disabled),
|
||||
h('div.alert.alert-danger.cp-hidden.unknown-error', Msg.recovery_mfa_error),
|
||||
]),
|
||||
|
|
|
@ -8,7 +8,6 @@ define([
|
|||
], function (Config, $, h, UI, Msg, Pages) {
|
||||
return function () {
|
||||
document.title = Msg.register_header;
|
||||
|
||||
var tos = $(UI.createCheckbox('accept-terms')).find('.cp-checkmark-label').append(Msg.register_acceptTerms).parent()[0];
|
||||
|
||||
var termsLink = Pages.customURLs.terms;
|
||||
|
@ -52,29 +51,40 @@ define([
|
|||
h('div.cp-reg-form.col-md-6', [
|
||||
h('div#userForm.form-group.hidden', [
|
||||
h('div.cp-register-instance', [
|
||||
Msg._getKey('register_instance', [ Pages.Instance.name ]),
|
||||
Msg._getKey('register_instance', [Pages.Instance.name]),
|
||||
h('br'),
|
||||
h('a', {
|
||||
href: '/features.html'
|
||||
}, Msg.register_whyRegister)
|
||||
]),
|
||||
h('input.form-control#username', {
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
autocorrect: 'off',
|
||||
autocapitalize: 'off',
|
||||
spellcheck: false,
|
||||
placeholder: Msg.login_username,
|
||||
autofocus: true,
|
||||
}),
|
||||
h('input.form-control#password', {
|
||||
type: 'password',
|
||||
placeholder: Msg.login_password,
|
||||
}),
|
||||
h('input.form-control#password-confirm', {
|
||||
type: 'password',
|
||||
placeholder: Msg.login_confirm,
|
||||
}),
|
||||
h('div.big-container', [
|
||||
h('div.input-container', [
|
||||
h('label.cp-register-label', { for: 'username' }, Msg.login_username),
|
||||
h('input.form-control#username', {
|
||||
type: 'text',
|
||||
autocomplete: 'off',
|
||||
autocorrect: 'off',
|
||||
autocapitalize: 'off',
|
||||
spellcheck: false,
|
||||
placeholder: Msg.login_username,
|
||||
autofocus: true,
|
||||
}),
|
||||
]),
|
||||
h('div.input-container', [
|
||||
h('label.cp-register-label', { for: 'password' }, Msg.login_password), // XXX label not visible
|
||||
h('input.form-control#password', {
|
||||
type: 'password',
|
||||
placeholder: Msg.login_password,
|
||||
}),
|
||||
]),
|
||||
h('div.input-container', [
|
||||
h('label.cp-register-label', { for: 'password-confirm' }, Msg.login_confirm), // XXX label not visible
|
||||
h('input.form-control#password-confirm', {
|
||||
type: 'password',
|
||||
placeholder: Msg.login_confirm,
|
||||
}),
|
||||
]),
|
||||
]),
|
||||
h('div.checkbox-container', [
|
||||
UI.createCheckbox('import-recent', Msg.register_importRecent, true)
|
||||
]),
|
||||
|
@ -85,6 +95,4 @@ define([
|
|||
])
|
||||
]);
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ var elem = document.createElement('div');
|
|||
elem.setAttribute('id', 'placeholder');
|
||||
elem.innerHTML = [
|
||||
'<div class="placeholder-logo-container">',
|
||||
'<img class="placeholder-logo" src="' + logoPath + '">',
|
||||
'<img class="placeholder-logo" alt="CryptPad Logo" src="' + logoPath + '">',
|
||||
'</div>',
|
||||
'<div class="placeholder-message-container">',
|
||||
'<p>Loading...</p>',
|
||||
|
|
|
@ -147,6 +147,14 @@ body.html {
|
|||
margin-right: 0.5em;
|
||||
}
|
||||
}
|
||||
.big-container {
|
||||
width: 100%;
|
||||
}
|
||||
.input-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
footer {
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
pre {
|
||||
color: @cryptpad_text_col;
|
||||
}
|
||||
label:not(.noTitle), .label {
|
||||
label:not(.noTitle), .cp-default-label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0;
|
||||
|
@ -90,7 +90,7 @@
|
|||
.cp-sidebarlayout-description {
|
||||
display: block;
|
||||
color: @cp_sidebar-hint;
|
||||
margin-bottom: 5px;
|
||||
margin-bottom: 0.5rem;
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
margin: 0 10px 10px 10px;
|
||||
border-radius: @infopages-radius-L;
|
||||
.cp-login-instance {
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.form-control {
|
||||
border-radius: @infopages-radius;
|
||||
|
@ -52,6 +52,9 @@
|
|||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
.cp-default-label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.cp-password-form {
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
.cp-hidden {
|
||||
display: none;
|
||||
}
|
||||
.cp-default-label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.alertify {
|
||||
// workaround for alertify making empty p
|
||||
|
|
|
@ -26,6 +26,16 @@
|
|||
min-width: 30%;
|
||||
}
|
||||
}
|
||||
.input-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
input {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
.cp-register-label { display: none; }
|
||||
padding-bottom: 3em;
|
||||
min-height: 5vh;
|
||||
}
|
||||
|
@ -94,6 +104,7 @@
|
|||
.tools_placeholder-color();
|
||||
}
|
||||
.checkbox-container {
|
||||
margin-top: 0.5rem;
|
||||
color: @cryptpad_text_col;
|
||||
}
|
||||
button#register {
|
||||
|
|
|
@ -184,6 +184,7 @@ Pinning.pinChannel = function (Env, safeKey, channels, cb) {
|
|||
Env.pinStore.message(safeKey, JSON.stringify(['PIN', toStore, +new Date()]),
|
||||
function (e) {
|
||||
if (e) { return void cb(e); }
|
||||
if (!session || !session.channels) { return; }
|
||||
toStore.forEach(function (channel) {
|
||||
session.channels[channel] = true;
|
||||
});
|
||||
|
|
|
@ -13,8 +13,13 @@
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
label{
|
||||
margin-top:0.5rem;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
a {
|
||||
color: @cryptpad_color_link;
|
||||
text-decoration: underline;
|
||||
|
@ -35,7 +40,7 @@
|
|||
}
|
||||
nav {
|
||||
display: flex;
|
||||
margin-top: 5px;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
}
|
||||
.cp-admin-setlimit-form,
|
||||
|
|
|
@ -1292,11 +1292,15 @@ define([
|
|||
// XXX translation keys
|
||||
var $div = makeBlock(key, true); // Msg.admin_totpRecoveryHint.totpRecoveryTitle
|
||||
|
||||
var textarea = h('textarea', {});
|
||||
var textarea = h('textarea', { id: 'textarea-input' });
|
||||
var $input = $(textarea);
|
||||
|
||||
Messages.add_here = "Add here"; // XXX temporary solution
|
||||
var label = h('label', { for: 'textarea-input' },Messages.add_here);
|
||||
|
||||
var box = h('div.cp-admin-setter', [
|
||||
textarea,
|
||||
label,
|
||||
textarea
|
||||
]);
|
||||
|
||||
$div.find('.cp-sidebarlayout-description').after(box);
|
||||
|
@ -1476,10 +1480,18 @@ Example
|
|||
|
||||
var input = h('input', {
|
||||
type: 'email',
|
||||
value: ApiConfig.adminEmail || ''
|
||||
value: ApiConfig.adminEmail || '',
|
||||
id: 'emailInput'
|
||||
});
|
||||
var $input = $(input);
|
||||
var innerDiv = h('div.cp-admin-setter.cp-admin-setlimit-form', input);
|
||||
|
||||
Messages.email = "Email"; // XXX temporary solution
|
||||
var label = h('label', {
|
||||
for: 'emailInput'
|
||||
},Messages.email);
|
||||
|
||||
var innerDiv = h('div.cp-admin-setter.cp-admin-setlimit-form', [label, input]);
|
||||
|
||||
var spinner = UI.makeSpinner($(innerDiv));
|
||||
|
||||
$button.click(function () {
|
||||
|
@ -1568,9 +1580,15 @@ Example
|
|||
type: 'text',
|
||||
value: getInstanceString('instanceNotice'),
|
||||
placeholder: '',
|
||||
id: 'instance-notice'
|
||||
});
|
||||
|
||||
var label = h('label', {
|
||||
for: 'instance-notice'
|
||||
});
|
||||
|
||||
var $input = $(input);
|
||||
var innerDiv = h('div.cp-admin-setter', input);
|
||||
var innerDiv = h('div.cp-admin-setter', [label,input]);
|
||||
var spinner = UI.makeSpinner($(innerDiv));
|
||||
|
||||
$button.click(function () {
|
||||
|
@ -1696,17 +1714,24 @@ Example
|
|||
var _limit = APP.instanceStatus.defaultStorageLimit;
|
||||
var _limitMB = Util.bytesToMegabytes(_limit);
|
||||
var limit = getPrettySize(_limit);
|
||||
var newLimit = h('input', {type: 'number', min: 0, value: _limitMB});
|
||||
var newLimit = h('input', { type: 'number', min: 0, value: _limitMB, id: 'default-limit' });
|
||||
var set = h('button.btn.btn-primary', Messages.admin_setlimitButton);
|
||||
|
||||
Messages.admin_defaultLimitMB = "Default Limit"; // XXX Messages.admin_defaultLimitMB is empty
|
||||
$div.append(h('div', [
|
||||
h('span.cp-admin-defaultlimit-value', Messages._getKey('admin_limit', [limit])),
|
||||
h('div.cp-admin-setlimit-form', [
|
||||
h('label', Messages.admin_defaultLimitMB),
|
||||
newLimit,
|
||||
h('div', [
|
||||
h('label', { for: 'default-limit' }, Messages.admin_defaultLimitMB),
|
||||
newLimit
|
||||
]),
|
||||
h('nav', [set])
|
||||
])
|
||||
]));
|
||||
|
||||
|
||||
|
||||
|
||||
UI.confirmButton(set, {
|
||||
classes: 'btn-primary',
|
||||
multiple: true,
|
||||
|
@ -1815,21 +1840,23 @@ Example
|
|||
var key = 'setlimit';
|
||||
var $div = makeBlock(key); // Msg.admin_setlimitHint, .admin_setlimitTitle
|
||||
|
||||
var user = h('input.cp-setlimit-key');
|
||||
var user = h('input.cp-setlimit-key', { id: 'user-input' });
|
||||
var $key = $(user);
|
||||
var limit = h('input.cp-setlimit-quota', {type: 'number', min: 0, value: 0});
|
||||
var note = h('input.cp-setlimit-note');
|
||||
var limit = h('input.cp-setlimit-quota', { type: 'number', min: 0, value: 0, id: 'limit-input' });
|
||||
var note = h('input.cp-setlimit-note', { id: 'note-input' });
|
||||
var remove = h('button.btn.btn-danger', Messages.fc_remove);
|
||||
var set = h('button.btn.btn-primary', Messages.admin_setlimitButton);
|
||||
|
||||
var form = h('div.cp-admin-setlimit-form', [
|
||||
h('label', Messages.admin_limitUser),
|
||||
h('label', { for: 'user-input' }, Messages.admin_limitUser),
|
||||
user,
|
||||
h('label', Messages.admin_limitMB),
|
||||
h('label', { for: 'limit-input' }, Messages.admin_limitMB),
|
||||
limit,
|
||||
h('label', Messages.admin_limitSetNote),
|
||||
h('label', { for: 'note-input' }, Messages.admin_limitSetNote),
|
||||
note,
|
||||
h('nav', [set, remove])
|
||||
]);
|
||||
|
||||
var $note = $(note);
|
||||
|
||||
var getValues = function () {
|
||||
|
@ -2643,10 +2670,14 @@ Example
|
|||
'data-lang': l,
|
||||
label: {class: 'noTitle'}
|
||||
});
|
||||
|
||||
var label = h('label', { for: 'kanban-body' }, Messages.kanban_body);
|
||||
var textarea = h('textarea', { id: 'kanban-body' });
|
||||
|
||||
$container.append(h('div.cp-broadcast-lang', { 'data-lang': l }, [
|
||||
h('h4', languages[l]),
|
||||
h('label', Messages.kanban_body),
|
||||
h('textarea'),
|
||||
label,
|
||||
textarea,
|
||||
radio,
|
||||
preview
|
||||
]));
|
||||
|
@ -2781,8 +2812,8 @@ Example
|
|||
}
|
||||
|
||||
// Start and end date pickers
|
||||
var start = h('input');
|
||||
var end = h('input');
|
||||
var start = h('input#cp-admin-start-input');
|
||||
var end = h('input#cp-admin-end-input');
|
||||
var $start = $(start);
|
||||
var $end = $(end);
|
||||
var is24h = UIElements.is24h();
|
||||
|
@ -2853,9 +2884,9 @@ Example
|
|||
|
||||
$form.empty().append([
|
||||
active,
|
||||
h('label', Messages.broadcast_start),
|
||||
h('label', { for: 'cp-admin-start-input' }, Messages.broadcast_start),
|
||||
start,
|
||||
h('label', Messages.broadcast_end),
|
||||
h('label', { for: 'cp-admin-end-input' }, Messages.broadcast_end),
|
||||
end,
|
||||
h('br'),
|
||||
h('div.cp-broadcast-form-submit', [
|
||||
|
@ -2901,8 +2932,8 @@ Example
|
|||
}
|
||||
|
||||
// Survey form
|
||||
var label = h('label', Messages.broadcast_surveyURL);
|
||||
var input = h('input');
|
||||
var label = h('label', { for: 'cp-admin-survey-url-input' }, Messages.broadcast_surveyURL);
|
||||
var input = h('input#cp-admin-survey-url-input');
|
||||
var $input = $(input);
|
||||
|
||||
// Extract form data
|
||||
|
@ -3084,16 +3115,20 @@ Example
|
|||
|
||||
var duration = APP.instanceStatus.profilingWindow;
|
||||
if (!isPositiveInteger(duration)) { duration = 10000; }
|
||||
var newDuration = h('input', {type: 'number', min: 0, value: duration});
|
||||
var newDuration = h('input#cp-admin-duration-input', { type: 'number', min: 0, value: duration });
|
||||
var set = h('button.btn.btn-primary', Messages.admin_setDuration);
|
||||
|
||||
var label = h('label', { for: 'cp-admin-duration-input' }, Messages.ui_ms);
|
||||
|
||||
$div.append(h('div', [
|
||||
h('span.cp-admin-bytes-written-duration', Messages.ui_ms),
|
||||
h('div.cp-admin-setlimit-form', [
|
||||
label,
|
||||
newDuration,
|
||||
h('nav', [set])
|
||||
])
|
||||
]));
|
||||
|
||||
|
||||
UI.confirmButton(set, {
|
||||
classes: 'btn-primary',
|
||||
multiple: true,
|
||||
|
|
|
@ -30,6 +30,17 @@
|
|||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
.tui-full-calendar-confirm {
|
||||
span, i {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
span {
|
||||
padding-left: 0;
|
||||
}
|
||||
width: unset;
|
||||
}
|
||||
|
||||
.tui-full-calendar-layout {
|
||||
background-color: @cp_sidebar-right-bg !important;
|
||||
color: @cryptpad_text_col;
|
||||
|
@ -343,7 +354,10 @@
|
|||
// margin-bottom: 20px;
|
||||
input {
|
||||
width: 80px;
|
||||
margin-right: 5px;
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
.fa-plus{
|
||||
margin-left:0.3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -656,5 +670,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -714,12 +714,14 @@ define([
|
|||
}
|
||||
});
|
||||
}
|
||||
Messages.calendar_settings = "Calendar Settings"; // XXX
|
||||
var dropdownConfig = {
|
||||
text: '',
|
||||
options: options, // Entries displayed in the menu
|
||||
common: common,
|
||||
buttonCls: 'btn btn-default fa fa-gear small cp-calendar-actions'
|
||||
};
|
||||
buttonCls: 'btn btn-default fa fa-gear small cp-calendar-actions',
|
||||
ariaLabel: Messages.calendar_settings,
|
||||
};
|
||||
return UIElements.createDropdown(dropdownConfig)[0];
|
||||
};
|
||||
var makeCalendarEntry = function (id, teamId) {
|
||||
|
@ -1193,10 +1195,13 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v
|
|||
}).appendTo(APP.toolbar.$bottomL);
|
||||
|
||||
// Change page
|
||||
var goLeft = h('button.fa.fa-chevron-left');
|
||||
var goRight = h('button.fa.fa-chevron-right');
|
||||
Messages.goLeft = "Left"; // XXX
|
||||
Messages.goRight = "Right"; // XXX
|
||||
Messages.date = "Date"; // XXX
|
||||
var goLeft = h('button.fa.fa-chevron-left',{'aria-label': Messages.goLeft});
|
||||
var goRight = h('button.fa.fa-chevron-right', {'aria-label': Messages.goRight});
|
||||
var goToday = h('button', Messages.calendar_today);
|
||||
var goDate = h('button.fa.fa-calendar');
|
||||
var goDate = h('button.fa.fa-calendar',{'aria-label': Messages.date});
|
||||
$(goLeft).click(function () {
|
||||
cal.prev();
|
||||
updateDateRange();
|
||||
|
|
|
@ -827,6 +827,7 @@ define([
|
|||
}
|
||||
button = $('<button>', {
|
||||
title: Messages.historyButton,
|
||||
'aria-label': Messages.historyButton,
|
||||
'class': "fa fa-history cp-toolbar-icon-history",
|
||||
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'}).text(Messages.historyText));
|
||||
if (data.histConfig) {
|
||||
|
@ -1490,15 +1491,18 @@ define([
|
|||
if (config.buttonContent) {
|
||||
$button = $(h('button', {
|
||||
class: config.buttonCls || '',
|
||||
'aria-label': config.ariaLabel || '',
|
||||
}, [
|
||||
h('span.cp-dropdown-button-title', config.buttonContent),
|
||||
]));
|
||||
} else {
|
||||
$button = $('<button>', {
|
||||
'class': config.buttonCls || ''
|
||||
'class': config.buttonCls || '',
|
||||
'aria-label': config.ariaLabel || '',
|
||||
}).append($('<span>', {'class': 'cp-dropdown-button-title'}).text(config.text || ""));
|
||||
}
|
||||
|
||||
|
||||
if (config.caretDown) {
|
||||
$('<span>', {
|
||||
'class': 'fa fa-caret-down',
|
||||
|
@ -1738,11 +1742,14 @@ define([
|
|||
var termsLine = template(Messages.info_termsFlavour, Pages.termsLink);
|
||||
var sourceLine = template(Messages.info_sourceFlavour, Pages.sourceLink);
|
||||
|
||||
Messages.label_logo = "CryptPad logo"; // XXX Logo
|
||||
|
||||
var content = h('div.cp-info-menu-container', [
|
||||
h('div.logo-block', [
|
||||
h('img', {
|
||||
src: '/customize/CryptPad_logo.svg?' + urlArgs
|
||||
}),
|
||||
h('div.logo-block', [
|
||||
h('img', {
|
||||
src: '/customize/CryptPad_logo.svg?' + urlArgs,
|
||||
alt: Messages.label_logo
|
||||
}),
|
||||
h('h6', "CryptPad"),
|
||||
h('span', Pages.versionString)
|
||||
]),
|
||||
|
|
|
@ -1490,6 +1490,8 @@ define([
|
|||
$li = findDataHolder($tree.find('.cp-app-drive-element-active'));
|
||||
}
|
||||
var $button = $driveToolbar.find('#cp-app-drive-toolbar-context-mobile');
|
||||
Messages.context_menu = 'Context menu'; // XXX
|
||||
$button.attr('aria-label', Messages.context_menu);
|
||||
if ($button.length) { // mobile
|
||||
if ($li.length !== 1
|
||||
|| !$._data($li[0], 'events').contextmenu
|
||||
|
@ -2693,6 +2695,7 @@ define([
|
|||
gridIcon,
|
||||
listIcon
|
||||
]));
|
||||
$button.attr('aria-label', 'View Mode Button'); // XXX missing key?
|
||||
var $gridIcon = $(gridIcon);
|
||||
var $listIcon = $(listIcon);
|
||||
var showMode = function (mode) {
|
||||
|
|
|
@ -615,7 +615,7 @@ define([
|
|||
label: {style: "display: none;"}
|
||||
}) : undefined;
|
||||
var rights = h('div.msg.cp-inline-radio-group', [
|
||||
h('label', Messages.share_linkAccess),
|
||||
h('label',{ for: 'cp-share-editable-true' }, Messages.share_linkAccess),
|
||||
h('div.radio-group',[
|
||||
UI.createRadio('accessRights', 'cp-share-editable-false',
|
||||
labelView, true, { mark: {tabindex:1} }),
|
||||
|
|
|
@ -1239,6 +1239,8 @@ define([
|
|||
};
|
||||
addCommonRpc(sframeChan, isSafe);
|
||||
|
||||
var SecureModal = {};
|
||||
|
||||
var currentTitle;
|
||||
var currentTabTitle;
|
||||
var titleSuffix = (Utils.Util.find(Utils, ['Instance','name','default']) || '').trim();
|
||||
|
@ -1246,12 +1248,16 @@ define([
|
|||
titleSuffix = window.location.hostname;
|
||||
}
|
||||
var setDocumentTitle = function () {
|
||||
var newTitle;
|
||||
if (!currentTabTitle) {
|
||||
document.title = currentTitle || 'CryptPad';
|
||||
return;
|
||||
newTitle = currentTitle || 'CryptPad';
|
||||
} else {
|
||||
var title = currentTabTitle.replace(/\{title\}/g, currentTitle || 'CryptPad');
|
||||
newTitle = title + ' - ' + titleSuffix;
|
||||
}
|
||||
var title = currentTabTitle.replace(/\{title\}/g, currentTitle || 'CryptPad');
|
||||
document.title = title + ' - ' + titleSuffix;
|
||||
document.title = newTitle;
|
||||
sframeChan.event('EV_IFRAME_TITLE', newTitle);
|
||||
if (SecureModal.modal) { SecureModal.modal.setTitle(newTitle); }
|
||||
};
|
||||
|
||||
var setPadTitle = function (data, cb) {
|
||||
|
@ -1522,7 +1528,6 @@ define([
|
|||
});
|
||||
|
||||
// Secure modal
|
||||
var SecureModal = {};
|
||||
// Create or display the iframe and modal
|
||||
var getPropChannels = function () {
|
||||
var channels = {};
|
||||
|
@ -1564,6 +1569,7 @@ define([
|
|||
SecureModal.$iframe = $('<iframe>', {id: 'sbox-secure-iframe'}).appendTo($('body'));
|
||||
SecureModal.modal = SecureIframe.create(config);
|
||||
}
|
||||
setDocumentTitle();
|
||||
if (!cfg.hidden) {
|
||||
SecureModal.modal.refresh(cfg, function () {
|
||||
SecureModal.$iframe.show();
|
||||
|
|
|
@ -999,6 +999,10 @@ define([
|
|||
UI.alert(Messages.chrome68);
|
||||
});
|
||||
|
||||
ctx.sframeChan.on('EV_IFRAME_TITLE', function (title) {
|
||||
document.title = title;
|
||||
});
|
||||
|
||||
funcs.isPadStored(function (err, val) {
|
||||
if (err || !val) { return; }
|
||||
UIElements.displayCrowdfunding(funcs);
|
||||
|
|
|
@ -862,11 +862,12 @@ MessengerUI, Messages, Pages) {
|
|||
|
||||
var href = toMain ? origin+'/index.html' : origin+'/drive/';
|
||||
var buttonTitle = toMain ? Messages.header_homeTitle : Messages.header_logoTitle;
|
||||
|
||||
Messages.homeButton = "Home button"; // XXX
|
||||
var $aTag = $('<a>', {
|
||||
href: href,
|
||||
title: buttonTitle,
|
||||
'class': "cp-toolbar-link-logo"
|
||||
'class': "cp-toolbar-link-logo",
|
||||
'aria-label': Messages.homeButton,
|
||||
}).append(UI.getIcon(privateData.app));
|
||||
|
||||
var onClick = function (e) {
|
||||
|
@ -1019,6 +1020,7 @@ MessengerUI, Messages, Pages) {
|
|||
$userAdmin.find('> button').attr({
|
||||
title: Messages.userAccountButton,
|
||||
alt: Messages.userAccountButton,
|
||||
'aria-label': Messages.userAccountButton,
|
||||
});
|
||||
|
||||
return $userAdmin;
|
||||
|
@ -1120,6 +1122,9 @@ MessengerUI, Messages, Pages) {
|
|||
var $button = $newPadBlock.find('button');
|
||||
$button.attr('title', Messages.notificationsPage);
|
||||
$button.addClass('fa fa-bell-o cp-notifications-bell');
|
||||
$button.addClass('fa fa-bell-o cp-notifications-bell');
|
||||
Messages.notificationBell = "Notification Bell"; // XXX
|
||||
$button.attr('aria-label', Messages.notificationBell);
|
||||
var $n = $button.find('.cp-dropdown-button-title').hide();
|
||||
var $empty = $(div).find('.cp-notifications-empty');
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ define([
|
|||
Sortable
|
||||
)
|
||||
{
|
||||
|
||||
var APP = window.APP = {
|
||||
blocks: {}
|
||||
};
|
||||
|
|
|
@ -52,7 +52,6 @@ define([
|
|||
jKanban,
|
||||
Export)
|
||||
{
|
||||
|
||||
var verbose = function (x) { console.log(x); };
|
||||
verbose = function () {}; // comment out to enable verbose logging
|
||||
var onRedraw = Util.mkEvent();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<title data-localization="main_title">CryptPad: Collaboration suite, encrypted and open-source</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
|
||||
<script src="/customize/pre-loading.js?ver=1.1"></script>
|
||||
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<title data-localization="main_title">CryptPad: Collaboration suite, encrypted and open-source</title>
|
||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
|
||||
<script src="/customize/pre-loading.js?ver=1.1"></script>
|
||||
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
|
||||
|
|
|
@ -4,11 +4,12 @@ define([
|
|||
'/api/config',
|
||||
'jquery',
|
||||
'/common/requireconfig.js',
|
||||
'/common/common-util.js',
|
||||
'/customize/messages.js',
|
||||
], function (nThen, ApiConfig, $, RequireConfig, Messages) {
|
||||
], function (nThen, ApiConfig, $, RequireConfig, Util, Messages) {
|
||||
var requireConfig = RequireConfig();
|
||||
|
||||
var ready = false;
|
||||
var readyEvt = Util.mkEvent(true);
|
||||
|
||||
var create = function (config) {
|
||||
// Loaded in load #2
|
||||
|
@ -169,26 +170,24 @@ define([
|
|||
});
|
||||
|
||||
sframeChan.onReady(function () {
|
||||
if (ready === true) { return; }
|
||||
if (typeof ready === "function") {
|
||||
ready();
|
||||
}
|
||||
ready = true;
|
||||
readyEvt.fire();
|
||||
});
|
||||
});
|
||||
});
|
||||
var refresh = function (data, cb) {
|
||||
if (!ready) {
|
||||
ready = function () {
|
||||
refresh(data, cb);
|
||||
};
|
||||
return;
|
||||
}
|
||||
sframeChan.event('EV_REFRESH', data);
|
||||
cb();
|
||||
readyEvt.reg(() => {
|
||||
sframeChan.event('EV_REFRESH', data);
|
||||
cb();
|
||||
});
|
||||
};
|
||||
var setTitle = function (title) {
|
||||
readyEvt.reg(() => {
|
||||
sframeChan.event('EV_IFRAME_TITLE', title);
|
||||
});
|
||||
};
|
||||
return {
|
||||
refresh: refresh
|
||||
refresh: refresh,
|
||||
setTitle: setTitle
|
||||
};
|
||||
};
|
||||
return {
|
||||
|
|
|
@ -25,6 +25,13 @@
|
|||
|
||||
.export_main();
|
||||
|
||||
.cp-settings-displayname .fa{
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
.cp-settings-mediatag-size .fa{
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
#cp-sidebarlayout-container {
|
||||
#cp-sidebarlayout-rightside {
|
||||
input[type="checkbox"] {
|
||||
|
@ -82,7 +89,8 @@
|
|||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
label {
|
||||
margin-right: 40px;
|
||||
padding-right: 1rem;
|
||||
padding-bottom:0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ define([
|
|||
|
||||
var $account = $('<div>', { 'class': 'cp-sidebarlayout-element' }).appendTo($div);
|
||||
var accountName = privateData.accountName;
|
||||
var $label = $('<span>', { 'class': 'label' }).text(Messages.user_accountName);
|
||||
var $label = $('<span>', { 'class': 'cp-default-label' }).text(Messages.user_accountName);
|
||||
var $name = $('<span>').text(accountName || '');
|
||||
if (!accountName) {
|
||||
$label.text('');
|
||||
|
@ -190,11 +190,13 @@ define([
|
|||
if (publicKey) {
|
||||
var $key = $('<div>', { 'class': 'cp-sidebarlayout-element' }).appendTo($div);
|
||||
var userHref = Hash.getPublicSigningKeyString(privateData.origin, accountName, publicKey);
|
||||
var $pubLabel = $('<span>', { 'class': 'label' })
|
||||
var $pubLabel = $('<label>', { 'class': 'cp-default-label', 'for': 'publicKey' })
|
||||
.text(Messages.settings_publicSigningKey);
|
||||
$key.append($pubLabel).append(UI.dialog.selectable(userHref));
|
||||
var $pubInput = $('<input>', { 'type': 'text', 'value': userHref, 'id': 'publicKey' });
|
||||
$key.append($pubLabel).append($pubInput);
|
||||
}
|
||||
|
||||
|
||||
return $div;
|
||||
};
|
||||
|
||||
|
@ -288,7 +290,7 @@ define([
|
|||
create['autostore'] = function() {
|
||||
var $div = $('<div>', { 'class': 'cp-settings-autostore cp-sidebarlayout-element' });
|
||||
|
||||
$('<span>', { 'class': 'label' }).text(Messages.settings_autostoreTitle).appendTo($div);
|
||||
$('<span>', { 'class': 'cp-default-label' }).text(Messages.settings_autostoreTitle).appendTo($div);
|
||||
|
||||
$('<span>', { 'class': 'cp-sidebarlayout-description' })
|
||||
.append(Messages.settings_autostoreHint).appendTo($div);
|
||||
|
@ -343,7 +345,7 @@ define([
|
|||
create['userfeedback'] = function() {
|
||||
var $div = $('<div>', { 'class': 'cp-settings-userfeedback cp-sidebarlayout-element' });
|
||||
|
||||
$('<span>', { 'class': 'label' }).text(Messages.settings_userFeedbackTitle).appendTo($div);
|
||||
$('<span>', { 'class': 'cp-default-label' }).text(Messages.settings_userFeedbackTitle).appendTo($div);
|
||||
|
||||
$div.append(h('span.cp-sidebarlayout-description', [
|
||||
Messages.settings_userFeedbackHint1,
|
||||
|
@ -379,8 +381,7 @@ define([
|
|||
|
||||
makeBlock('cache', function (cb) { // Msg.settings_cacheHint, .settings_cacheTitle
|
||||
var store = window.cryptpadStore;
|
||||
|
||||
var $cbox = $(UI.createCheckbox('cp-settings-cache',
|
||||
var $cbox = $(UI.createCheckbox('cp-settings-cache-1',
|
||||
Messages.settings_cacheCheckbox,
|
||||
false, { label: { class: 'noTitle' } }));
|
||||
var spinner = UI.makeSpinner($cbox);
|
||||
|
@ -657,7 +658,7 @@ define([
|
|||
|
||||
var $div = $('<div>', { 'class': 'cp-settings-change-password cp-sidebarlayout-element' });
|
||||
|
||||
$('<span>', { 'class': 'label' }).text(Messages.settings_changePasswordTitle).appendTo($div);
|
||||
$('<span>', { 'class': 'cp-default-label' }).text(Messages.settings_changePasswordTitle).appendTo($div);
|
||||
|
||||
$('<span>', { 'class': 'cp-sidebarlayout-description' })
|
||||
.append(Messages.settings_changePasswordHint).appendTo($div);
|
||||
|
@ -860,17 +861,18 @@ define([
|
|||
cb(form);
|
||||
}, true);
|
||||
|
||||
makeBlock('mediatag-size', function(cb) { // Msg.settings_mediatagSizeHint, .settings_mediatagSizeTitle
|
||||
makeBlock('mediatag-size', function(cb, $div) { // Msg.settings_mediatagSizeHint, .settings_mediatagSizeTitle
|
||||
var $inputBlock = $('<div>', {
|
||||
'class': 'cp-sidebarlayout-input-block',
|
||||
});
|
||||
|
||||
var spinner;
|
||||
var $input = $('<input>', {
|
||||
var $input = $(h('input#cp-automatic-download', {
|
||||
'min': -1,
|
||||
'max': 1000,
|
||||
type: 'number',
|
||||
}).appendTo($inputBlock);
|
||||
})).appendTo($inputBlock);
|
||||
$div.find('label').attr('for', 'cp-automatic-download');
|
||||
|
||||
var oldVal;
|
||||
|
||||
|
@ -1292,7 +1294,7 @@ define([
|
|||
if (!common.isLoggedIn()) { return; }
|
||||
var $div = $('<div>', { 'class': 'cp-settings-redirect cp-sidebarlayout-element' });
|
||||
|
||||
$('<span>', { 'class': 'label' }).text(Messages.settings_driveRedirectTitle).appendTo($div);
|
||||
$('<span>', { 'class': 'cp-default-label' }).text(Messages.settings_driveRedirectTitle).appendTo($div);
|
||||
|
||||
$div.append(h('span', {
|
||||
class: 'cp-sidebarlayout-description',
|
||||
|
@ -1751,7 +1753,7 @@ define([
|
|||
var $div = $('<div>', {
|
||||
'class': 'cp-settings-pad-width cp-sidebarlayout-element'
|
||||
});
|
||||
$('<span>', { 'class': 'label' }).text(Messages.settings_padWidth).appendTo($div);
|
||||
$('<span>', { 'class': 'cp-default-label' }).text(Messages.settings_padWidth).appendTo($div);
|
||||
|
||||
$('<span>', { 'class': 'cp-sidebarlayout-description' })
|
||||
.text(Messages.settings_padWidthHint).appendTo($div);
|
||||
|
@ -1889,7 +1891,10 @@ define([
|
|||
var $div = $('<div>', {
|
||||
'class': 'cp-settings-code-indent-unit cp-sidebarlayout-element'
|
||||
});
|
||||
$('<label>').text(Messages.settings_codeIndentation).appendTo($div);
|
||||
$('<label>')
|
||||
.text(Messages.settings_codeIndentation)
|
||||
.attr('for', 'indent-unit')
|
||||
.appendTo($div);
|
||||
|
||||
var $inputBlock = $('<div>', {
|
||||
'class': 'cp-sidebarlayout-input',
|
||||
|
@ -1899,6 +1904,7 @@ define([
|
|||
'min': 1,
|
||||
'max': 8,
|
||||
type: 'number',
|
||||
id: 'indent-unit',
|
||||
}).on('change', function() {
|
||||
var val = parseInt($input.val());
|
||||
if (typeof(val) !== 'number') { return; }
|
||||
|
@ -1984,7 +1990,10 @@ define([
|
|||
var $div = $('<div>', {
|
||||
'class': 'cp-settings-code-font-size cp-sidebarlayout-element'
|
||||
});
|
||||
$('<label>').text(Messages.settings_codeFontSize).appendTo($div);
|
||||
$('<label>')
|
||||
.text(Messages.settings_codeFontSize)
|
||||
.attr('for', 'font-size')
|
||||
.appendTo($div);
|
||||
|
||||
var $inputBlock = $('<div>', {
|
||||
'class': 'cp-sidebarlayout-input',
|
||||
|
@ -1994,6 +2003,7 @@ define([
|
|||
'min': 8,
|
||||
'max': 30,
|
||||
type: 'number',
|
||||
id: 'font-size',
|
||||
}).on('change', function() {
|
||||
var val = parseInt($input.val());
|
||||
if (typeof(val) !== 'number') { return; }
|
||||
|
@ -2091,7 +2101,7 @@ define([
|
|||
|
||||
makeBlock('notif-calendar', function(cb) { // Msg.settings_notifCalendarHint, .settings_notifCalendarTitle
|
||||
|
||||
var $cbox = $(UI.createCheckbox('cp-settings-cache',
|
||||
var $cbox = $(UI.createCheckbox('cp-settings-cache-2',
|
||||
Messages.settings_notifCalendarCheckbox,
|
||||
false, { label: { class: 'noTitle' } }));
|
||||
var spinner = UI.makeSpinner($cbox);
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
@import (reference) "../../customize/src/less2/include/colortheme-all.less";
|
||||
@import (reference) '../../customize/src/less2/include/export.less';
|
||||
|
||||
.fa-spinner,.fa-check{
|
||||
margin-left:0.5rem;
|
||||
}
|
||||
|
||||
&.cp-app-team {
|
||||
.framework_min_main(
|
||||
|
@ -143,14 +146,13 @@
|
|||
.avatar_main(200px);
|
||||
}
|
||||
.cp-team-list-name {
|
||||
word-wrap: break-word;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
white-space: pre-wrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 500px;
|
||||
max-width: 250px;
|
||||
font-size: 25px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
&.empty {
|
||||
white-space: initial;
|
||||
text-align: center;
|
||||
|
|
|
@ -529,8 +529,9 @@ define([
|
|||
}
|
||||
|
||||
content.push(h('h3', Messages.team_createLabel));
|
||||
content.push(h('label', Messages.team_createName));
|
||||
var input = h('input', {type:'text'});
|
||||
let label = h('label', { for: 'cp-team-name' } , Messages.team_createName);
|
||||
content.push(label);
|
||||
let input = h('input#cp-team-name', {type:'text', maxlength:50});
|
||||
content.push(input);
|
||||
var button = h('button.btn.btn-success', Messages.creation_create);
|
||||
content.push(h('br'));
|
||||
|
@ -543,6 +544,8 @@ define([
|
|||
if (state) { return; }
|
||||
var name = $(input).val();
|
||||
if (!name.trim()) { return; }
|
||||
Messages.team_nameTooLong = "Team name is too long"; // XXX
|
||||
if(name.length > 50) { return UI.warn(Messages.team_nameTooLong); }
|
||||
state = true;
|
||||
$spinner.show();
|
||||
APP.module.execCommand('CREATE_TEAM', {
|
||||
|
@ -1024,7 +1027,7 @@ define([
|
|||
if (publicKey) {
|
||||
var $key = $('<div>', {'class': 'cp-sidebarlayout-element'}).appendTo($div);
|
||||
var userHref = Hash.getPublicSigningKeyString(privateData.origin, name, publicKey);
|
||||
var $pubLabel = $('<span>', {'class': 'label'})
|
||||
var $pubLabel = $('<span>', {'class': 'cp-default-label'})
|
||||
.text(Messages.settings_publicSigningKey);
|
||||
$key.append($pubLabel).append(UI.dialog.selectable(userHref));
|
||||
}
|
||||
|
@ -1046,11 +1049,19 @@ define([
|
|||
var todo = function () {
|
||||
var newName = $input.val();
|
||||
if (!newName.trim()) { return; }
|
||||
$spinner.show();
|
||||
Messages.team_nameTooLong = "Team name is too long"; // XXX
|
||||
if(newName.length > 50){
|
||||
return UI.warn(Messages.team_nameTooLong);
|
||||
}
|
||||
APP.module.execCommand('GET_TEAM_METADATA', {
|
||||
teamId: APP.team
|
||||
}, function (obj) {
|
||||
Messages.team_nameAlreadySet = "Team name is already set to {0}"; // XXX
|
||||
if (obj && obj.error) { return void UI.warn(Messages.error); }
|
||||
if (obj.name === newName) {
|
||||
return void UI.warn(Messages._getKey('team_nameAlreadySet', [Util.fixHTML(newName)]));
|
||||
}
|
||||
$spinner.show();
|
||||
var oldName = obj.name;
|
||||
obj.name = newName;
|
||||
APP.module.execCommand('SET_TEAM_METADATA', {
|
||||
|
|
Loading…
Reference in New Issue