fix merge conflicts
This commit is contained in:
commit
92a7970eb8
@ -451,5 +451,10 @@ define(function () {
|
|||||||
out.download_button = "Descifrar y descargar";
|
out.download_button = "Descifrar y descargar";
|
||||||
out.warn_notPinned = "Este pad no está en ningun CryptDrive. Expirará después de 3 meses. <a href='/about.html#pinning'>Acerca de...</a>";
|
out.warn_notPinned = "Este pad no está en ningun CryptDrive. Expirará después de 3 meses. <a href='/about.html#pinning'>Acerca de...</a>";
|
||||||
|
|
||||||
|
out.poll_remove = "Quitar";
|
||||||
|
out.poll_edit = "Editar";
|
||||||
|
out.poll_locked = "Cerrado";
|
||||||
|
out.poll_unlocked = "Abierto";
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -193,6 +193,11 @@ define(function () {
|
|||||||
out.poll_titleHint = "Titre";
|
out.poll_titleHint = "Titre";
|
||||||
out.poll_descriptionHint = "Description";
|
out.poll_descriptionHint = "Description";
|
||||||
|
|
||||||
|
out.poll_remove = "Supprimer";
|
||||||
|
out.poll_edit = "Modifier";
|
||||||
|
out.poll_locked = "Verrouillé";
|
||||||
|
out.poll_unlocked = "Déverrouillé";
|
||||||
|
|
||||||
// Canvas
|
// Canvas
|
||||||
out.canvas_clear = "Nettoyer";
|
out.canvas_clear = "Nettoyer";
|
||||||
out.canvas_delete = "Supprimer la sélection";
|
out.canvas_delete = "Supprimer la sélection";
|
||||||
|
|||||||
@ -196,6 +196,11 @@ define(function () {
|
|||||||
out.poll_titleHint = "Title";
|
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_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
|
// Canvas
|
||||||
out.canvas_clear = "Clear";
|
out.canvas_clear = "Clear";
|
||||||
out.canvas_delete = "Delete selection";
|
out.canvas_delete = "Delete selection";
|
||||||
|
|||||||
@ -15,8 +15,6 @@ define([
|
|||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
var unlockHTML = '<i class="fa fa-unlock" aria-hidden="true"></i>';
|
|
||||||
var lockHTML = '<i class="fa fa-lock" aria-hidden="true"></i>';
|
|
||||||
var HIDE_INTRODUCTION_TEXT = "hide_poll_text";
|
var HIDE_INTRODUCTION_TEXT = "hide_poll_text";
|
||||||
var defaultName;
|
var defaultName;
|
||||||
|
|
||||||
@ -100,12 +98,10 @@ define([
|
|||||||
// Enable the checkboxes for the user's column (committed or not)
|
// Enable the checkboxes for the user's column (committed or not)
|
||||||
$('input[disabled="disabled"][data-rt-id^="' + id + '"]').removeAttr('disabled');
|
$('input[disabled="disabled"][data-rt-id^="' + id + '"]').removeAttr('disabled');
|
||||||
$('input[type="checkbox"][data-rt-id^="' + id + '"]').addClass('enabled');
|
$('input[type="checkbox"][data-rt-id^="' + id + '"]').addClass('enabled');
|
||||||
$('[data-rt-id="' + id + '"] ~ .edit').css('visibility', 'hidden');
|
$('.lock[data-rt-id="' + id + '"]').addClass('fa-unlock').removeClass('fa-lock').attr('title', Messages.poll_unlocked);
|
||||||
$('.lock[data-rt-id="' + id + '"]').html(unlockHTML);
|
|
||||||
|
|
||||||
if (isOwnColumnCommitted()) { return; }
|
if (isOwnColumnCommitted()) { return; }
|
||||||
$('[data-rt-id^="' + id + '"]').closest('td').addClass("uncommitted");
|
$('[data-rt-id^="' + id + '"]').closest('td').addClass("uncommitted");
|
||||||
$('td.uncommitted .remove, td.uncommitted .edit').css('visibility', 'hidden');
|
|
||||||
$('td.uncommitted .cover').addClass("uncommitted");
|
$('td.uncommitted .cover').addClass("uncommitted");
|
||||||
$('.uncommitted input[type="text"]').attr("placeholder", Messages.poll_userPlaceholder);
|
$('.uncommitted input[type="text"]').attr("placeholder", Messages.poll_userPlaceholder);
|
||||||
};
|
};
|
||||||
@ -118,8 +114,7 @@ define([
|
|||||||
APP.editable.col.forEach(function (id) {
|
APP.editable.col.forEach(function (id) {
|
||||||
$('input[disabled="disabled"][data-rt-id^="' + id + '"]').removeAttr('disabled');
|
$('input[disabled="disabled"][data-rt-id^="' + id + '"]').removeAttr('disabled');
|
||||||
$('input[type="checkbox"][data-rt-id^="' + id + '"]').addClass('enabled');
|
$('input[type="checkbox"][data-rt-id^="' + id + '"]').addClass('enabled');
|
||||||
$('span.edit[data-rt-id="' + id + '"]').css('visibility', 'hidden');
|
$('.lock[data-rt-id="' + id + '"]').addClass('fa-unlock').removeClass('fa-lock').attr('title', Messages.poll_unlocked);
|
||||||
$('.lock[data-rt-id="' + id + '"]').html(unlockHTML);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -276,7 +271,6 @@ define([
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case 'text':
|
case 'text':
|
||||||
debug("text[rt-id='%s'] [%s]", id, input.value);
|
debug("text[rt-id='%s'] [%s]", id, input.value);
|
||||||
if (!input.value) { return void debug("Hit enter?"); }
|
|
||||||
Render.setValue(object, id, input.value);
|
Render.setValue(object, id, input.value);
|
||||||
change(null, null, null, 50);
|
change(null, null, null, 50);
|
||||||
break;
|
break;
|
||||||
@ -295,12 +289,26 @@ define([
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var hideInputs = function (target, isKeyup) {
|
||||||
|
if (!isKeyup && $(target).is('[type="text"]')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$('.lock[data-rt-id!="' + APP.userid + '"]').addClass('fa-lock').removeClass('fa-unlock').attr('title', Messages.poll_locked);
|
||||||
|
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');
|
||||||
|
APP.editable.col = [APP.userid];
|
||||||
|
APP.editable.row = [];
|
||||||
|
};
|
||||||
|
|
||||||
/* Called whenever an event is fired on a span */
|
/* Called whenever an event is fired on a span */
|
||||||
var handleSpan = function (span) {
|
var handleSpan = function (span) {
|
||||||
var id = span.getAttribute('data-rt-id');
|
var id = span.getAttribute('data-rt-id');
|
||||||
var type = Render.typeofId(id);
|
var type = Render.typeofId(id);
|
||||||
var isRemove = span.className && span.className.split(' ').indexOf('remove') !== -1;
|
var isRemove = span.className && span.className.split(' ').indexOf('remove') !== -1;
|
||||||
var isEdit = span.className && span.className.split(' ').indexOf('edit') !== -1;
|
var isEdit = span.className && span.className.split(' ').indexOf('edit') !== -1;
|
||||||
|
var isLock = span.className && span.className.split(' ').indexOf('lock') !== -1;
|
||||||
|
var isLocked = span.className && span.className.split(' ').indexOf('fa-lock') !== -1;
|
||||||
if (type === 'row') {
|
if (type === 'row') {
|
||||||
if (isRemove) {
|
if (isRemove) {
|
||||||
Cryptpad.confirm(Messages.poll_removeOption, function (res) {
|
Cryptpad.confirm(Messages.poll_removeOption, function (res) {
|
||||||
@ -310,6 +318,7 @@ define([
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else if (isEdit) {
|
} else if (isEdit) {
|
||||||
|
hideInputs(span);
|
||||||
unlockRow(id, function () {
|
unlockRow(id, function () {
|
||||||
change(null, null, null, null, function() {
|
change(null, null, null, null, function() {
|
||||||
$('input[data-rt-id="' + id + '"]').focus();
|
$('input[data-rt-id="' + id + '"]').focus();
|
||||||
@ -324,7 +333,8 @@ define([
|
|||||||
change();
|
change();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else if (isEdit) {
|
} else if (isLock && isLocked) {
|
||||||
|
hideInputs(span);
|
||||||
unlockColumn(id, function () {
|
unlockColumn(id, function () {
|
||||||
change(null, null, null, null, function() {
|
change(null, null, null, null, function() {
|
||||||
$('input[data-rt-id="' + id + '"]').focus();
|
$('input[data-rt-id="' + id + '"]').focus();
|
||||||
@ -338,48 +348,34 @@ define([
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var hideInputs = function (e, isKeyup) {
|
|
||||||
if (!isKeyup && $(e.target).is('[type="text"]')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$('.lock[data-rt-id!="' + APP.userid + '"]').html(lockHTML);
|
|
||||||
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');
|
|
||||||
APP.editable.col = [APP.userid];
|
|
||||||
APP.editable.row = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
$(window).click(hideInputs);
|
|
||||||
|
|
||||||
var handleClick = function (e, isKeyup) {
|
var handleClick = function (e, isKeyup) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
if (!APP.ready) { return; }
|
if (!APP.ready) { return; }
|
||||||
var target = e && e.target;
|
var target = e && e.target;
|
||||||
|
|
||||||
if (isKeyup) {
|
|
||||||
debug("Keyup!");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!target) { return void debug("NO TARGET"); }
|
if (!target) { return void debug("NO TARGET"); }
|
||||||
|
|
||||||
var nodeName = target && target.nodeName;
|
var nodeName = target && target.nodeName;
|
||||||
|
var shouldLock = $(target).hasClass('fa-unlock');
|
||||||
|
|
||||||
if (!$(target).parents('#table tbody').length || $(target).hasClass('edit')) {
|
if ((!$(target).parents('#table tbody').length && $(target).hasClass('lock'))) {
|
||||||
hideInputs(e);
|
hideInputs(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (nodeName) {
|
switch (nodeName) {
|
||||||
case 'INPUT':
|
case 'INPUT':
|
||||||
if (isKeyup && (e.keyCode === 13 || e.keyCode === 27)) {
|
if (isKeyup && (e.keyCode === 13 || e.keyCode === 27)) {
|
||||||
hideInputs(e, isKeyup);
|
hideInputs(target, isKeyup);
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
handleInput(target);
|
handleInput(target);
|
||||||
break;
|
break;
|
||||||
case 'SPAN':
|
case 'SPAN':
|
||||||
//case 'LABEL':
|
//case 'LABEL':
|
||||||
|
if (shouldLock) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
handleSpan(target);
|
handleSpan(target);
|
||||||
break;
|
break;
|
||||||
case undefined:
|
case undefined:
|
||||||
@ -459,7 +455,6 @@ var ready = function (info, userid, readOnly) {
|
|||||||
|
|
||||||
var $table = APP.$table = $(Render.asHTML(displayedObj, null, colsOrder, readOnly));
|
var $table = APP.$table = $(Render.asHTML(displayedObj, null, colsOrder, readOnly));
|
||||||
APP.$createRow = $('#create-option').click(function () {
|
APP.$createRow = $('#create-option').click(function () {
|
||||||
//console.error("BUTTON CLICKED! LOL");
|
|
||||||
Render.createRow(proxy, function (empty, id) {
|
Render.createRow(proxy, function (empty, id) {
|
||||||
change(null, null, null, null, function() {
|
change(null, null, null, null, function() {
|
||||||
$('.edit[data-rt-id="' + id + '"]').click();
|
$('.edit[data-rt-id="' + id + '"]').click();
|
||||||
@ -470,7 +465,7 @@ var ready = function (info, userid, readOnly) {
|
|||||||
APP.$createCol = $('#create-user').click(function () {
|
APP.$createCol = $('#create-user').click(function () {
|
||||||
Render.createColumn(proxy, function (empty, id) {
|
Render.createColumn(proxy, function (empty, id) {
|
||||||
change(null, null, null, null, function() {
|
change(null, null, null, null, function() {
|
||||||
$('.edit[data-rt-id="' + id + '"]').click();
|
$('.lock[data-rt-id="' + id + '"]').click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -532,6 +527,8 @@ var ready = function (info, userid, readOnly) {
|
|||||||
.click(handleClick)
|
.click(handleClick)
|
||||||
.on('keyup', function (e) { handleClick(e, true); });
|
.on('keyup', function (e) { handleClick(e, true); });
|
||||||
|
|
||||||
|
$(window).click(hideInputs);
|
||||||
|
|
||||||
proxy
|
proxy
|
||||||
.on('change', ['info'], function (o, n, p) {
|
.on('change', ['info'], function (o, n, p) {
|
||||||
if (p[1] === 'title') {
|
if (p[1] === 'title') {
|
||||||
|
|||||||
@ -32,6 +32,9 @@ textarea[disabled] {
|
|||||||
font: white;
|
font: white;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
input[type="text"]::placeholder {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
table#table {
|
table#table {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
@ -66,7 +69,7 @@ table#table {
|
|||||||
#tableScroll {
|
#tableScroll {
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
margin-left: calc(30% - 50px + 29px);
|
margin-left: calc(30% - 50px + 31px);
|
||||||
max-width: 70%;
|
max-width: 70%;
|
||||||
width: auto;
|
width: auto;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -104,6 +107,9 @@ table {
|
|||||||
tbody {
|
tbody {
|
||||||
border: 1px solid #555;
|
border: 1px solid #555;
|
||||||
}
|
}
|
||||||
|
tbody * {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
tbody tr {
|
tbody tr {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@ -260,23 +266,37 @@ div.realtime table input[type="text"] {
|
|||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
form.realtime table span,
|
||||||
|
div.realtime table span {
|
||||||
|
user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
}
|
||||||
form.realtime table thead td,
|
form.realtime table thead td,
|
||||||
div.realtime table thead td {
|
div.realtime table thead td {
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
background: #aaa;
|
background: #aaa;
|
||||||
border-radius: 20px 20px 0 0;
|
border-radius: 20px 20px 0 0;
|
||||||
text-align: center;
|
}
|
||||||
|
form.realtime table thead td:nth-of-type(2),
|
||||||
|
div.realtime table thead td:nth-of-type(2) {
|
||||||
|
background: #999;
|
||||||
|
}
|
||||||
|
form.realtime table thead td:nth-of-type(2) .lock,
|
||||||
|
div.realtime table thead td:nth-of-type(2) .lock {
|
||||||
|
cursor: default;
|
||||||
}
|
}
|
||||||
form.realtime table thead td input[type="text"],
|
form.realtime table thead td input[type="text"],
|
||||||
div.realtime table thead td input[type="text"] {
|
div.realtime table thead td input[type="text"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
padding: 1px 5px;
|
||||||
}
|
}
|
||||||
form.realtime table thead td input[type="text"][disabled],
|
form.realtime table thead td input[type="text"][disabled],
|
||||||
div.realtime table thead td input[type="text"][disabled] {
|
div.realtime table thead td input[type="text"][disabled] {
|
||||||
color: #000;
|
color: #000;
|
||||||
padding: 1px 5px;
|
border: 1px solid transparent;
|
||||||
border: none;
|
|
||||||
}
|
}
|
||||||
form.realtime table tbody .text-cell,
|
form.realtime table tbody .text-cell,
|
||||||
div.realtime table tbody .text-cell {
|
div.realtime table tbody .text-cell {
|
||||||
@ -296,9 +316,9 @@ div.realtime table tbody .text-cell .remove {
|
|||||||
float: left;
|
float: left;
|
||||||
margin: 0 0 0 10px;
|
margin: 0 0 0 10px;
|
||||||
}
|
}
|
||||||
form.realtime table tbody td label,
|
form.realtime table tbody tr:not(:first-child) td:not(:first-child) label,
|
||||||
div.realtime table tbody td label {
|
div.realtime table tbody tr:not(:first-child) td:not(:first-child) label {
|
||||||
border: 0.5px solid #555;
|
border-top: 1px solid #555;
|
||||||
}
|
}
|
||||||
form.realtime table .edit,
|
form.realtime table .edit,
|
||||||
div.realtime table .edit {
|
div.realtime table .edit {
|
||||||
@ -307,6 +327,13 @@ div.realtime table .edit {
|
|||||||
float: left;
|
float: left;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
form.realtime table .lock,
|
||||||
|
div.realtime table .lock {
|
||||||
|
margin-left: calc(50% - 0.5em);
|
||||||
|
cursor: pointer;
|
||||||
|
width: 1em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
form.realtime table .remove,
|
form.realtime table .remove,
|
||||||
div.realtime table .remove {
|
div.realtime table .remove {
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
@ -2,7 +2,9 @@
|
|||||||
@import "../../customize.dist/src/less/mixins.less";
|
@import "../../customize.dist/src/less/mixins.less";
|
||||||
|
|
||||||
@poll-th-bg: #aaa;
|
@poll-th-bg: #aaa;
|
||||||
|
@poll-th-user-bg: #999;
|
||||||
@poll-td-bg: #aaa;
|
@poll-td-bg: #aaa;
|
||||||
|
@poll-placeholder: #666;
|
||||||
@poll-border-color: #555;
|
@poll-border-color: #555;
|
||||||
@poll-cover-color: #000;
|
@poll-cover-color: #000;
|
||||||
@poll-fg: #000;
|
@poll-fg: #000;
|
||||||
@ -42,6 +44,13 @@ input[type="text"][disabled], textarea[disabled] {
|
|||||||
font: white;
|
font: white;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The placeholder color only seems to effect Safari when not set
|
||||||
|
|
||||||
|
input[type="text"]::placeholder {
|
||||||
|
color: @poll-placeholder;
|
||||||
|
}
|
||||||
|
|
||||||
table#table {
|
table#table {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
@ -75,7 +84,7 @@ table#table {
|
|||||||
#tableScroll {
|
#tableScroll {
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
margin-left: calc(~"30% - 50px + 29px");
|
margin-left: calc(~"30% - 50px + 31px");
|
||||||
max-width: 70%;
|
max-width: 70%;
|
||||||
width: auto;
|
width: auto;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -118,6 +127,9 @@ table {
|
|||||||
}
|
}
|
||||||
tbody {
|
tbody {
|
||||||
border: 1px solid @poll-border-color;
|
border: 1px solid @poll-border-color;
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
tr {
|
tr {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
&:first-of-type th{
|
&:first-of-type th{
|
||||||
@ -282,20 +294,32 @@ form.realtime, div.realtime {
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
span {
|
||||||
|
user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
}
|
||||||
thead {
|
thead {
|
||||||
td {
|
td {
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
background: @poll-th-bg;
|
background: @poll-th-bg;
|
||||||
border-radius: 20px 20px 0 0;
|
border-radius: 20px 20px 0 0;
|
||||||
text-align: center;
|
//text-align: center;
|
||||||
|
&:nth-of-type(2) {
|
||||||
|
background: @poll-th-user-bg;
|
||||||
|
.lock {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
}
|
||||||
input {
|
input {
|
||||||
&[type="text"] {
|
&[type="text"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
padding: 1px 5px;
|
||||||
&[disabled] {
|
&[disabled] {
|
||||||
color: @poll-fg;
|
color: @poll-fg;
|
||||||
padding: 1px 5px;
|
border: 1px solid transparent;
|
||||||
border: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -318,9 +342,11 @@ form.realtime, div.realtime {
|
|||||||
margin: 0 0 0 10px;
|
margin: 0 0 0 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
td {
|
tr:not(:first-child) {
|
||||||
|
td:not(:first-child) {
|
||||||
label {
|
label {
|
||||||
border: .5px solid @poll-border-color;
|
border-top: 1px solid @poll-border-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -331,6 +357,12 @@ form.realtime, div.realtime {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lock {
|
||||||
|
margin-left: ~"calc(50% - 0.5em)";
|
||||||
|
cursor: pointer;
|
||||||
|
width: 1em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
.remove {
|
.remove {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|||||||
@ -252,6 +252,7 @@ var Renderer = function (Cryptpad) {
|
|||||||
var makeRemoveElement = Render.makeRemoveElement = function (id) {
|
var makeRemoveElement = Render.makeRemoveElement = function (id) {
|
||||||
return ['SPAN', {
|
return ['SPAN', {
|
||||||
'data-rt-id': id,
|
'data-rt-id': id,
|
||||||
|
'title': Cryptpad.Messages.poll_remove,
|
||||||
class: 'remove',
|
class: 'remove',
|
||||||
}, ['✖']];
|
}, ['✖']];
|
||||||
};
|
};
|
||||||
@ -259,6 +260,7 @@ var Renderer = function (Cryptpad) {
|
|||||||
var makeEditElement = Render.makeEditElement = function (id) {
|
var makeEditElement = Render.makeEditElement = function (id) {
|
||||||
return ['SPAN', {
|
return ['SPAN', {
|
||||||
'data-rt-id': id,
|
'data-rt-id': id,
|
||||||
|
'title': Cryptpad.Messages.poll_edit,
|
||||||
class: 'edit',
|
class: 'edit',
|
||||||
}, ['✐']];
|
}, ['✐']];
|
||||||
};
|
};
|
||||||
@ -266,25 +268,18 @@ var Renderer = function (Cryptpad) {
|
|||||||
var makeLockElement = Render.makeLockElement = function (id) {
|
var makeLockElement = Render.makeLockElement = function (id) {
|
||||||
return ['SPAN', {
|
return ['SPAN', {
|
||||||
'data-rt-id': id,
|
'data-rt-id': id,
|
||||||
class: 'lock',
|
'title': Cryptpad.Messages.poll_locked,
|
||||||
}, [['i', {
|
class: 'lock fa fa-lock',
|
||||||
class: 'fa fa-lock',
|
}, []];
|
||||||
'aria-hidden': true,
|
|
||||||
}, []]
|
|
||||||
]];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var makeHeadingCell = Render.makeHeadingCell = function (cell, readOnly) {
|
var makeHeadingCell = Render.makeHeadingCell = function (cell, readOnly) {
|
||||||
if (!cell) { return ['TD', {}, []]; }
|
if (!cell) { return ['TD', {}, []]; }
|
||||||
if (cell.type === 'text') {
|
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, []]];
|
var elements = [['INPUT', cell, []]];
|
||||||
if (!readOnly) {
|
if (!readOnly) {
|
||||||
elements.unshift(removeElement);
|
elements.unshift(makeRemoveElement(cell['data-rt-id']));
|
||||||
elements.unshift(lockElement);
|
elements.unshift(makeLockElement(cell['data-rt-id']));
|
||||||
elements.unshift(editElement);
|
|
||||||
}
|
}
|
||||||
return ['TD', {}, elements];
|
return ['TD', {}, elements];
|
||||||
}
|
}
|
||||||
@ -321,12 +316,10 @@ var Renderer = function (Cryptpad) {
|
|||||||
|
|
||||||
var makeBodyCell = Render.makeBodyCell = function (cell, readOnly) {
|
var makeBodyCell = Render.makeBodyCell = function (cell, readOnly) {
|
||||||
if (cell && cell.type === 'text') {
|
if (cell && cell.type === 'text') {
|
||||||
var removeElement = makeRemoveElement(cell['data-rt-id']);
|
|
||||||
var editElement = makeEditElement(cell['data-rt-id']);
|
|
||||||
var elements = [['INPUT', cell, []]];
|
var elements = [['INPUT', cell, []]];
|
||||||
if (!readOnly) {
|
if (!readOnly) {
|
||||||
elements.push(removeElement);
|
elements.push(makeRemoveElement(cell['data-rt-id']));
|
||||||
elements.push(editElement);
|
elements.push(makeEditElement(cell['data-rt-id']));
|
||||||
}
|
}
|
||||||
return ['TD', {}, [
|
return ['TD', {}, [
|
||||||
['DIV', {class: 'text-cell'}, elements]
|
['DIV', {class: 'text-cell'}, elements]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user