Skip to content

Commit

Permalink
version 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
probablykasper committed Nov 2, 2017
1 parent d067b3b commit ce2b6a6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion chrome-extension/extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Taskler",
"version": "1.2.0",
"version": "1.2.1",
"description": "A simple todo New Tab page",
"icons": {
"128": "icon128.png",
Expand Down
Empty file removed chrome-extension/variables.css
Empty file.
2 changes: 1 addition & 1 deletion docs/todo.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions docs/todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@ function globalCode() {
textarea.style.height = newHeight - padding+"px";
textarea.parentElement.style.height = newHeight+"px";
}
function resizeTextareas() {
window.resizeTextareas = function() {
var textareas = document.querySelectorAll("textarea");
for (var i = 0; i < textareas.length-1; i++) {
resizeTextarea(i);
}
}
resizeTextareas();
window.addEventListener("resize", resizeTextareas);

var itemsToSave = [];
Expand Down Expand Up @@ -126,7 +125,7 @@ function globalCode() {
mousePosY = e.clientY;
var difference = mousePosY - mousePosStartY;

var itemDivs = document.querySelectorAll(".todos .item");
var itemDivs = document.querySelectorAll(".todos .item:not(.removed)");
for (var i = 0; i < itemDivs.length; i++) {
itemDivs[i].style.transform = "translateY(0px)";
}
Expand Down Expand Up @@ -170,7 +169,7 @@ function globalCode() {

var todos = document.querySelector(".todos");
todos.classList.add("no-transition");
var itemDivs = document.querySelectorAll(".todos .item");
var itemDivs = document.querySelectorAll(".todos .item:not(.removed)");
var newPos;
for (var i = 0; i < items.length; i++) {
itemDivs[i].style.transform = "translateY(0px)";
Expand All @@ -190,7 +189,7 @@ function globalCode() {
}
});
function updateColIds() {
var textareas = document.querySelectorAll(".todos .item:not(.new-item) textarea");
var textareas = document.querySelectorAll(".todos .item:not(.new-item):not(.removed) textarea");
for (var i = 0; i < items.length; i++) {
textareas[i].setAttribute("data-id", i);
}
Expand Down Expand Up @@ -342,19 +341,22 @@ function reloadTasks(callback) {
findGist(personalAccessToken, gistId, function(content, updatedAt) {
gistFound(content, updatedAt);
if (callback) callback();
resizeTextareas();
});
} else {
findGistId(personalAccessToken, function(id) {
if (id) {
findGist(personalAccessToken, id, function(content, updatedAt) {
gistFound(content, updatedAt);
if (callback) callback();
resizeTextareas();
});
} else {
createGist(personalAccessToken, function(id, updatedAt) {
updateGistId(id);
updateGistDate(id, updatedAt);
if (callback) callback();
resizeTextareas();
});
}
});
Expand All @@ -365,6 +367,7 @@ function reloadTasks(callback) {
} else {
addLocalItems();
if (callback) callback();
resizeTextareas();
}
}

Expand Down
21 changes: 11 additions & 10 deletions docs/todo.sass
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,23 @@ body
height: 100%
.container
position: fixed
display: flex
justify-content: center
width: 100%
height: 100%
overflow-y: scroll
.todos.no-transition .item
transition: none
.todos
display: flex
z-index: 1
align-items: center
justify-content: center
width: 100%
height: 100%
flex-direction: column
min-height: min-content
width: 550px
margin: 0px 60px
height: fit-content
padding: 10px 0px
max-height: calc(100% - 10px*2)
overflow-y: auto
margin-top: auto
margin-bottom: auto
.item
margin: 0px 30px
display: flex
max-width: 100%
align-items: center
Expand Down Expand Up @@ -226,7 +227,7 @@ body
outline: none
border: none
font-size: 16px
width: 450px
width: 100%
padding: 13px 8px
color: #FFFFFF
resize: none
Expand Down
Empty file removed docs/variables.css
Empty file.

0 comments on commit ce2b6a6

Please sign in to comment.