diff --git a/customize.dist/main.css b/customize.dist/main.css
index 3778b5d8c..0f5863932 100644
--- a/customize.dist/main.css
+++ b/customize.dist/main.css
@@ -191,9 +191,9 @@ tbody tr th,
tbody tr td {
color: #fafafa;
}
-tbody tr th.remove,
-tbody tr td.remove {
- cursor: pointer !important;
+tbody tr th .remove,
+tbody tr td .remove {
+ cursor: pointer;
color: #FF0073;
}
tbody tr th:last-child {
@@ -302,40 +302,54 @@ form.realtime table tr td.checkbox-cell div.checkbox-contain {
height: 100%;
width: 100%;
}
-form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.mine) {
+form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.editable) {
display: none;
}
-form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.mine) ~ .cover {
+form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.editable) ~ .cover {
font-weight: bold;
background-color: #FF0073;
color: #302B28;
display: block;
}
-form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.mine) ~ .cover:after {
+form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.editable) ~ .cover:after {
content: "✖";
}
-form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.mine) ~ .cover.yes {
+form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.editable) ~ .cover.yes {
background-color: #46E981;
}
-form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.mine) ~ .cover.yes:after {
+form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.editable) ~ .cover.yes:after {
content: "✔";
}
-form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.mine) ~ .cover.mine {
+form.realtime table tr td.checkbox-cell div.checkbox-contain input[type="checkbox"]:not(.editable) ~ .cover.mine {
display: none;
}
form.realtime table input[type="text"] {
height: 100%;
- width: 90%;
+ width: 80%;
border: 3px solid #302B28;
}
form.realtime table thead tr th .remove {
color: #FF0073;
cursor: pointer;
+ font-size: 20px;
+}
+form.realtime table thead tr th .edit {
+ color: #46E981;
+ cursor: pointer;
+ width: 10%;
+ font-size: 20px;
+}
+form.realtime table thead tr th .edit:after {
+ content: '✐';
+}
+form.realtime table thead tr th .edit.editable {
+ display: none;
}
form.realtime table tfoot tr td {
z-index: 4000;
cursor: pointer;
}
+form.realtime #adduser,
form.realtime #addoption {
color: #46E981;
border: 1px solid #46E981;
@@ -343,7 +357,6 @@ form.realtime #addoption {
}
form.realtime #adduser {
border-top-left-radius: 5px;
- padding: 15px;
}
form.realtime #addoption {
border-bottom-left-radius: 5px;
@@ -380,7 +393,7 @@ div.modal table input {
border: 3px solid #302B28;
}
div.modal table thead tr th span.remove {
- color: red;
+ color: #FF0073;
cursor: pointer;
}
div.modal table tfoot tr td {
diff --git a/customize.dist/src/cryptpad.less b/customize.dist/src/cryptpad.less
index 1cac19dfb..c36fad766 100644
--- a/customize.dist/src/cryptpad.less
+++ b/customize.dist/src/cryptpad.less
@@ -232,8 +232,8 @@ tbody {
th, td {
color: @fore;
- &.remove {
- cursor: pointer !important;
+ .remove {
+ cursor: pointer;
color: @cp-red;
}
}
@@ -373,11 +373,7 @@ form.realtime {
input {
&[type="checkbox"] {
- &.mine {
- // idk
- }
-
- &:not(.mine) {
+ &:not(.editable) {
display: none;
~ .cover {
@@ -408,7 +404,7 @@ form.realtime {
input {
&[type="text"] {
height: 100%;
- width: 90%;
+ width: 80%;
border: 3px solid @base;
}
}
@@ -419,8 +415,16 @@ form.realtime {
.remove {
color: @cp-red;
cursor: pointer;
+ font-size: 20px;
+ }
+ .edit {
+ color: @cp-green;
+ cursor: pointer;
+ width: 10%;
+ font-size: 20px;
+ &:after { content: '✐'; }
+ &.editable { display: none; }
}
-
}
}
}
@@ -441,18 +445,14 @@ form.realtime {
}
}
- //#adduser,
+ #adduser,
#addoption {
color: @cp-green;
border: 1px solid @cp-green;
padding: 15px;
}
- #adduser {
- .top-left;
- //border: 1px solid grey;
- padding: 15px;
- }
+ #adduser { .top-left; }
#addoption { .bottom-left; }
}
@@ -507,7 +507,7 @@ div.modal {
tr {
th {
span.remove {
- color: red;
+ color: @cp-red;
cursor: pointer;
}
}
diff --git a/www/poll/index.html b/www/poll/index.html
index 23d74cd9c..49d487487 100644
--- a/www/poll/index.html
+++ b/www/poll/index.html
@@ -62,7 +62,7 @@
diff --git a/www/poll/main.js b/www/poll/main.js
index 4aa455f78..49c276eec 100644
--- a/www/poll/main.js
+++ b/www/poll/main.js
@@ -100,10 +100,8 @@ define([
}
});
- if (p.x === module.userId) {
- $check.addClass('mine');
- } else {
- console.log(module.userId, p.x);
+ if (p.x === module.activeColumn) {
+ $check.addClass('editable');
}
$div.append($check);
@@ -183,6 +181,25 @@ define([
A.splice(i, 1);
};
+ var makeUserEditable = module.makeUserEditable = function (id, bool) {
+ var $name = $('input[type="text"][id="' + id + '"]').attr('disabled', !bool);
+
+ var $edit = $name.parent().find('.edit');
+
+ $edit[bool?'addClass':'removeClass']('editable');
+
+ var $sel = $('input[id^="' + id + '"]')
+ [bool?'addClass':'removeClass']('editable');
+
+ if (bool) {
+ module.rt.proxy.table.colsOrder.forEach(function (coluid) {
+ if (coluid !== id) { makeUserEditable(coluid, false); }
+ });
+ }
+
+ return $sel;
+ };
+
var makeUser = function (proxy, id, value) {
var $user = Input({
id: id,
@@ -193,11 +210,22 @@ define([
proxy.table.cols[id] = $user.val() || "";
});
- var $wrapper = $('
-
+