Some more poll changes <3
parent
05785e96ea
commit
7a05462eb3
|
@ -356,5 +356,10 @@ define(function () {
|
|||
out.register_warning = "Zero Knowledge significa que no podemos recuperar tus datos si pierdes tu contraseña.";
|
||||
out.register_alreadyRegistered = "Este usuario ya existe, ¿iniciar sesión?";
|
||||
|
||||
out.poll_remove = "Quitar";
|
||||
out.poll_edit = "Editar";
|
||||
out.poll_locked = "Cerrado";
|
||||
out.poll_unlocked = "Abierto";
|
||||
|
||||
return out;
|
||||
});
|
||||
|
|
|
@ -151,6 +151,11 @@ define(function () {
|
|||
out.poll_titleHint = "Title";
|
||||
out.poll_descriptionHint = "Describe your poll, and use the 'publish' button when you're done. Anyone with the link can change the description, but this is discouraged.";
|
||||
|
||||
out.poll_remove = "Remove";
|
||||
out.poll_edit = "Edit";
|
||||
out.poll_locked = "Locked";
|
||||
out.poll_unlocked = "Unlocked";
|
||||
|
||||
// Canvas
|
||||
out.canvas_clear = "Clear";
|
||||
out.canvas_delete = "Delete selection";
|
||||
|
|
|
@ -114,7 +114,7 @@ define([
|
|||
$('input[disabled="disabled"][data-rt-id^="' + id + '"]').removeAttr('disabled');
|
||||
$('input[type="checkbox"][data-rt-id^="' + id + '"]').addClass('enabled');
|
||||
$('[data-rt-id="' + id + '"] ~ .edit').css('visibility', 'hidden');
|
||||
$('.lock[data-rt-id="' + id + '"]').html(unlockHTML);
|
||||
$('.lock[data-rt-id="' + id + '"]').html(unlockHTML).attr('title', Messages.poll_unlocked);
|
||||
|
||||
if (isOwnColumnCommitted()) { return; }
|
||||
$('[data-rt-id^="' + id + '"]').closest('td').addClass("uncommitted");
|
||||
|
@ -132,7 +132,7 @@ define([
|
|||
$('input[disabled="disabled"][data-rt-id^="' + id + '"]').removeAttr('disabled');
|
||||
$('input[type="checkbox"][data-rt-id^="' + id + '"]').addClass('enabled');
|
||||
$('span.edit[data-rt-id="' + id + '"]').css('visibility', 'hidden');
|
||||
$('.lock[data-rt-id="' + id + '"]').html(unlockHTML);
|
||||
$('.lock[data-rt-id="' + id + '"]').html(unlockHTML).attr('title', Messages.poll_unlocked);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -369,7 +369,7 @@ define([
|
|||
if (!isKeyup && $(e.target).is('[type="text"]')) {
|
||||
return;
|
||||
}
|
||||
$('.lock[data-rt-id!="' + APP.userid + '"]').html(lockHTML);
|
||||
$('.lock[data-rt-id!="' + APP.userid + '"]').html(lockHTML).attr('title', Messages.poll_lock);
|
||||
var $cells = APP.$table.find('thead td:not(.uncommitted), tbody td');
|
||||
$cells.find('[type="text"][data-rt-id!="' + APP.userid + '"]').attr('disabled', true);
|
||||
$('.edit[data-rt-id!="' + APP.userid + '"]').css('visibility', 'visible');
|
||||
|
|
|
@ -33,7 +33,7 @@ textarea[disabled] {
|
|||
border: 0px;
|
||||
}
|
||||
input[type="text"]::placeholder {
|
||||
color: #333;
|
||||
color: #666;
|
||||
}
|
||||
table#table {
|
||||
margin: 0px;
|
||||
|
@ -69,7 +69,7 @@ table#table {
|
|||
#tableScroll {
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
margin-left: calc(30% - 50px + 29px);
|
||||
margin-left: calc(30% - 50px + 31px);
|
||||
max-width: 70%;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
|
@ -107,6 +107,9 @@ table {
|
|||
tbody {
|
||||
border: 1px solid #555;
|
||||
}
|
||||
tbody * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
tbody tr {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -299,9 +302,13 @@ div.realtime table tbody .text-cell .remove {
|
|||
float: left;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
form.realtime table tbody td label,
|
||||
div.realtime table tbody td label {
|
||||
border: 0.5px solid #555;
|
||||
form.realtime table tbody tr td:nth-child(2),
|
||||
div.realtime table tbody tr td:nth-child(2) {
|
||||
border-left: 1px solid #555;
|
||||
}
|
||||
form.realtime table tbody tr:not(:first-child) td:not(:first-child) label,
|
||||
div.realtime table tbody tr:not(:first-child) td:not(:first-child) label {
|
||||
border-top: 1px solid #555;
|
||||
}
|
||||
form.realtime table .edit,
|
||||
div.realtime table .edit {
|
||||
|
|
|
@ -83,7 +83,7 @@ table#table {
|
|||
#tableScroll {
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
margin-left: calc(~"30% - 50px + 29px");
|
||||
margin-left: calc(~"30% - 50px + 31px");
|
||||
max-width: 70%;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
|
@ -126,6 +126,9 @@ table {
|
|||
}
|
||||
tbody {
|
||||
border: 1px solid @poll-border-color;
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
tr {
|
||||
text-align: center;
|
||||
&:first-of-type th{
|
||||
|
@ -326,9 +329,11 @@ form.realtime, div.realtime {
|
|||
margin: 0 0 0 10px;
|
||||
}
|
||||
}
|
||||
td {
|
||||
label {
|
||||
border: .5px solid @poll-border-color;
|
||||
tr:not(:first-child) {
|
||||
td:not(:first-child) {
|
||||
label {
|
||||
border-top: 1px solid @poll-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -252,6 +252,7 @@ var Renderer = function (Cryptpad) {
|
|||
var makeRemoveElement = Render.makeRemoveElement = function (id) {
|
||||
return ['SPAN', {
|
||||
'data-rt-id': id,
|
||||
'title': Cryptpad.Messages.poll_remove,
|
||||
class: 'remove',
|
||||
}, ['✖']];
|
||||
};
|
||||
|
@ -259,6 +260,7 @@ var Renderer = function (Cryptpad) {
|
|||
var makeEditElement = Render.makeEditElement = function (id) {
|
||||
return ['SPAN', {
|
||||
'data-rt-id': id,
|
||||
'title': Cryptpad.Messages.poll_edit,
|
||||
class: 'edit',
|
||||
}, ['✐']];
|
||||
};
|
||||
|
@ -266,6 +268,7 @@ var Renderer = function (Cryptpad) {
|
|||
var makeLockElement = Render.makeLockElement = function (id) {
|
||||
return ['SPAN', {
|
||||
'data-rt-id': id,
|
||||
'title': Cryptpad.Messages.poll_locked,
|
||||
class: 'lock',
|
||||
}, [['i', {
|
||||
class: 'fa fa-lock',
|
||||
|
@ -277,14 +280,11 @@ var Renderer = function (Cryptpad) {
|
|||
var makeHeadingCell = Render.makeHeadingCell = function (cell, readOnly) {
|
||||
if (!cell) { return ['TD', {}, []]; }
|
||||
if (cell.type === 'text') {
|
||||
var removeElement = makeRemoveElement(cell['data-rt-id']);
|
||||
var editElement = makeEditElement(cell['data-rt-id']);
|
||||
var lockElement = makeLockElement(cell['data-rt-id']);
|
||||
var elements = [['INPUT', cell, []]];
|
||||
if (!readOnly) {
|
||||
elements.unshift(removeElement);
|
||||
elements.unshift(lockElement);
|
||||
elements.unshift(editElement);
|
||||
elements.unshift(makeRemoveElement(cell['data-rt-id']));
|
||||
elements.unshift(makeLockElement(cell['data-rt-id']));
|
||||
elements.unshift(makeEditElement(cell['data-rt-id']));
|
||||
}
|
||||
return ['TD', {}, elements];
|
||||
}
|
||||
|
@ -321,12 +321,10 @@ var Renderer = function (Cryptpad) {
|
|||
|
||||
var makeBodyCell = Render.makeBodyCell = function (cell, readOnly) {
|
||||
if (cell && cell.type === 'text') {
|
||||
var removeElement = makeRemoveElement(cell['data-rt-id']);
|
||||
var editElement = makeEditElement(cell['data-rt-id']);
|
||||
var elements = [['INPUT', cell, []]];
|
||||
if (!readOnly) {
|
||||
elements.push(removeElement);
|
||||
elements.push(editElement);
|
||||
elements.push(makeRemoveElement(cell['data-rt-id']));
|
||||
elements.push(makeEditElement(cell['data-rt-id']));
|
||||
}
|
||||
return ['TD', {}, [
|
||||
['DIV', {class: 'text-cell'}, elements]
|
||||
|
|
Loading…
Reference in New Issue