Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
20518a3e88
@ -135,6 +135,11 @@ define([
|
|||||||
if (typeof(f) === 'function') {
|
if (typeof(f) === 'function') {
|
||||||
f(void 0, store);
|
f(void 0, store);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof(proxy.allowUserFeedback) !== 'boolean') {
|
||||||
|
proxy.allowUserFeedback = true;
|
||||||
|
}
|
||||||
|
|
||||||
proxy.on('change', [Cryptpad.displayNameKey], function (o, n, p) {
|
proxy.on('change', [Cryptpad.displayNameKey], function (o, n, p) {
|
||||||
if (typeof(n) !== "string") { return; }
|
if (typeof(n) !== "string") { return; }
|
||||||
Cryptpad.changeDisplayName(n);
|
Cryptpad.changeDisplayName(n);
|
||||||
|
|||||||
@ -255,6 +255,7 @@ define(function () {
|
|||||||
out.settings_resetTips = "Tips in CryptDrive";
|
out.settings_resetTips = "Tips in CryptDrive";
|
||||||
out.settings_resetTipsButton = "Reset the available tips in CryptDrive";
|
out.settings_resetTipsButton = "Reset the available tips in CryptDrive";
|
||||||
out.settings_resetTipsDone = "All the tips are now visible again.";
|
out.settings_resetTipsDone = "All the tips are now visible again.";
|
||||||
|
out.settings_userFeedback = "disable user feedback";
|
||||||
|
|
||||||
// index.html
|
// index.html
|
||||||
|
|
||||||
|
|||||||
@ -168,6 +168,30 @@ define([
|
|||||||
return $div;
|
return $div;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var createUserFeedbackToggle = function (obj) {
|
||||||
|
var $div = $('<div>', { 'class': 'userFeedback', });
|
||||||
|
var $label = $('<label>', { 'for': 'userFeedback'})
|
||||||
|
.text(Messages.settings_userFeedback);
|
||||||
|
|
||||||
|
$('<br>').appendTo($div);
|
||||||
|
|
||||||
|
var $checkbox = $('<input>', {
|
||||||
|
'type': 'checkbox',
|
||||||
|
}).on('change', function () {
|
||||||
|
obj.proxy.allowUserFeedback = $checkbox.is(':checked') || false;
|
||||||
|
console.log("wut");
|
||||||
|
console.log($box.is(':checked'));
|
||||||
|
});
|
||||||
|
|
||||||
|
$checkbox.appendTo($div);
|
||||||
|
$label.appendTo($div);
|
||||||
|
|
||||||
|
if (obj.proxy.allowUserFeedback) {
|
||||||
|
$checkbox[0].checked = true;
|
||||||
|
}
|
||||||
|
return $div;
|
||||||
|
};
|
||||||
|
|
||||||
var andThen = function (obj) {
|
var andThen = function (obj) {
|
||||||
APP.$container.append(createTitle());
|
APP.$container.append(createTitle());
|
||||||
APP.$container.append(createInfoBlock(obj));
|
APP.$container.append(createInfoBlock(obj));
|
||||||
@ -175,6 +199,7 @@ define([
|
|||||||
APP.$container.append(createResetTips());
|
APP.$container.append(createResetTips());
|
||||||
APP.$container.append(createBackupDrive(obj));
|
APP.$container.append(createBackupDrive(obj));
|
||||||
APP.$container.append(createResetDrive(obj));
|
APP.$container.append(createResetDrive(obj));
|
||||||
|
APP.$container.append(createUserFeedbackToggle(obj));
|
||||||
obj.proxy.on('change', [], refresh);
|
obj.proxy.on('change', [], refresh);
|
||||||
obj.proxy.on('remove', [], refresh);
|
obj.proxy.on('remove', [], refresh);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user