Commit 1401c201 authored by ransome1's avatar ransome1
Browse files

Removed priority reset shortcut on MacOS, optimised CSS,

parent 71782d9a
......@@ -1941,6 +1941,7 @@ body.compact #autoCompleteContainer h4 {
padding: 0 2.5em 1.5em 2.5em;
}
#todoTable .todo {
width: 100%;
position: relative;
display: flex;
flex-flow: row wrap;
......@@ -1993,6 +1994,7 @@ body.compact #autoCompleteContainer h4 {
background: #3273dc;
}
#todoTable .cell {
float: left;
line-height: 1.7em;
padding: 0.75em 0;
margin: 0 1em 0 0;
......@@ -2031,6 +2033,7 @@ body.compact #autoCompleteContainer h4 {
padding: 0.1em 0.4em;
}
#todoTable a.cell.text .priority {
float: left;
background: transparent;
color: #666666;
margin-right: 0.5em;
......@@ -2039,6 +2042,10 @@ body.compact #autoCompleteContainer h4 {
font-size: 0.9em;
padding: 0.1em 0.4em !important;
}
#todoTable a.cell.text .text {
float: left;
margin-right: 0.5em;
}
#todoTable .cell.text:focus-visible {
background: #f0f0f0;
border-radius: 0.65em;
......@@ -2070,22 +2077,27 @@ body.compact #autoCompleteContainer h4 {
#todoTable .cell .projects {
background: #f1d6f1;
}
#todoTable .cell.recurrence {
padding: 0 0.25em;
margin: 0;
}
#todoTable .cell.itemDueDate {
color: #5a5a5a;
position: relative;
white-space: nowrap;
margin-left: 0.25em;
padding: 0 0.25em;
margin: 0;
text-transform: lowercase;
}
#todoTable .cell.itemDueDate .fa-sort-down {
position: absolute;
right: 0.2em;
top: -0.35em;
right: 0.45em;
top: -1.25em;
display: none;
}
#todoTable .cell.itemDueDate .tags {
position: absolute;
top: -1.4em;
top: -2.3em;
right: -1.5em;
z-index: 40;
display: none;
......
This diff is collapsed.
......@@ -665,7 +665,7 @@
<tr>
<td id="helpTabKeyboardTR14TD1"></td>
<td><span class="tag is-dark is-large">Alt</span>&nbsp;<i class="fas fa-plus"></i>&nbsp;<span class="tag is-info is-large"><i class="fas fa-arrow-left"></i>&nbsp;/&nbsp;<i class="fas fa-arrow-right"></i></span></td>
<td><span class="tag is-dark is-large">Alt</span>&nbsp;<i class="fas fa-plus"></i>&nbsp;<span class="tag is-info is-large"><i class="fas fa-arrow-left"></i>&nbsp;/&nbsp;<i class="fas fa-arrow-right"></i></span></td>
<td></td>
</tr>
<tr>
<td id ="helpTabKeyboardTR15TD1"></td>
......
......@@ -318,25 +318,6 @@ function generateTableRow(todo) {
if(userData.matomoEvents) _paq.push(["trackEvent", "Todo-Table", "Click on Todo item"]);
}
}
// add the text cell to the row
todoTableBodyRow.appendChild(todoTableBodyCellText);
// cell for the categories
categories.forEach(category => {
if(todo[category] && category!="priority") {
todo[category].forEach(element => {
let todoTableBodyCellCategory = document.createElement("a");
todoTableBodyCellCategory.setAttribute("class", "tag " + category);
todoTableBodyCellCategory.onclick = function() {
console.log(element);
selectFilter(element, category);
}
todoTableBodyCellCategory.innerHTML = element;
tableContainerCategories.appendChild(todoTableBodyCellCategory);
});
}
});
// only add the categories to text cell if it has child nodes
if(tableContainerCategories.hasChildNodes()) todoTableBodyRow.appendChild(tableContainerCategories);
// check for and add a given due date
if(todo.due) {
var tag = convertDate(todo.due);
......@@ -356,15 +337,34 @@ function generateTableRow(todo) {
</div>
<i class="fas fa-sort-down"></i>`;
// append the due date to the text item
todoTableBodyRow.appendChild(todoTableBodyCellDueDate);
todoTableBodyCellText.appendChild(todoTableBodyCellDueDate);
}
// add recurrence icon
if(todo.rec) {
todoTableBodyCellRecurrence.innerHTML = "<i class=\"fas fa-redo\"></i>";
// append the due date to the text item
todoTableBodyRow.appendChild(todoTableBodyCellRecurrence);
todoTableBodyCellText.appendChild(todoTableBodyCellRecurrence);
}
// add the text cell to the row
todoTableBodyRow.appendChild(todoTableBodyCellText);
// cell for the categories
categories.forEach(category => {
if(todo[category] && category!="priority") {
todo[category].forEach(element => {
let todoTableBodyCellCategory = document.createElement("a");
todoTableBodyCellCategory.setAttribute("class", "tag " + category);
todoTableBodyCellCategory.onclick = function() {
console.log(element);
selectFilter(element, category);
}
todoTableBodyCellCategory.innerHTML = element;
tableContainerCategories.appendChild(todoTableBodyCellCategory);
});
}
});
// only add the categories to text cell if it has child nodes
if(tableContainerCategories.hasChildNodes()) todoTableBodyRow.appendChild(tableContainerCategories);
todoTableBodyRow.addEventListener("contextmenu", event => {
//todoContextUseAsTemplate.focus();
todoContext.style.left = event.x + "px";
......
......@@ -565,9 +565,9 @@ function registerKeyboardShortcuts() {
form.setPriority("down");
}
// clear priority
if(!(event.ctrlKey || event.metaKey) && event.altKey && (event.key === "ArrowRight" || event.key === "ArrowLeft")) {
form.setPriority(null);
}
// if(!(event.ctrlKey || event.metaKey) && event.altKey && (event.key === "ArrowRight" || event.key === "ArrowLeft")) {
// form.setPriority(null);
// }
// set priority directly
if(event.altKey && event.key.length===1 && event.key.match(/[A-Z]/i)) {
form.setPriority(event.key.substr(0,1)).then(response => {
......
......@@ -67,6 +67,7 @@
display: none;
padding: 0 2.5em 1.5em 2.5em;
.todo {
width: 100%;
position: relative;
display: flex;
flex-flow: row wrap;
......@@ -123,6 +124,7 @@
}
}
.cell {
float: left;
line-height: 1.7em;
padding: .75em 0;
margin: 0 1em 0 0;
......@@ -166,6 +168,7 @@
padding: 0.1em 0.4em;
}
.priority {
float: left;
background: transparent;
color: darken($mid-grey, 40%);
margin-right: .5em;
......@@ -174,9 +177,10 @@
padding: 0.1em 0.4em!important;
}
}
// .text {
// margin-right: .5em;
// }
.text {
float: left;
margin-right: .5em;
}
}
.cell.text:focus-visible {
background: $almost-white;
......@@ -209,21 +213,26 @@
.cell .projects {
background: $sleek-projects-button;
}
.cell.recurrence {
padding: 0 .25em;
margin: 0;
}
.cell.itemDueDate {
color: $dark-grey;
position: relative;
white-space: nowrap;
margin-left: .25em;
padding: 0 .25em;
margin: 0;
text-transform: lowercase;
.fa-sort-down {
position: absolute;
right: 0.2em;
top: -0.35em;
right: .45em;
top: -1.25em;
display: none;
}
.tags {
position: absolute;
top: -1.4em;
top: -2.3em;
right: -1.5em;
z-index: 40;
display: none;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment