Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.

Development#1

Open
EloquentShashank wants to merge 18 commits into
masterfrom
development
Open

Development#1
EloquentShashank wants to merge 18 commits into
masterfrom
development

Conversation

@EloquentShashank

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread app/assets/javascripts/application.js Outdated
Comment thread app/assets/javascripts/custom.js Outdated
Comment thread app/assets/javascripts/custom.js Outdated
Comment thread app/assets/javascripts/custom.js Outdated
Comment thread app/assets/javascripts/custom.js Outdated
Comment thread app/views/tasklists/_tasks.html.haml Outdated
Comment thread app/views/tasklists/index.html.haml Outdated
Comment thread app/views/tasklists/index.html.haml Outdated
Comment thread app/views/tasks/_task.html.haml Outdated
Comment thread config/routes.rb Outdated
Comment thread app/assets/javascripts/custom.js Outdated
}

var taskNamePartial = [];
var taskChecked = [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong datastructure

Comment thread app/assets/javascripts/custom.js Outdated
$(".tasklistUpdateButton").on("click", renderUpdateTasklist);
});

function inputForTask(tasklistId) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use moustache templates

Comment thread app/assets/javascripts/custom.js Outdated
if (taskChecked[taskId] == true) {
$("#checkbox" + taskId).attr("checked", "checked");
}
$(".taskname").on("click", renderUpdate);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not the right place to do this.

Comment thread app/assets/javascripts/custom.js Outdated
$("#newtasks").show();
$("#newtasks").addClass("card");
$("#newtasks").append(input);
$(".createNewTaskButton").on("click", createTask);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment thread app/assets/javascripts/custom.js Outdated
$("#newtasklist")
.html(inputForTasklist())
.append("<br>");
$("#createTasklistButton").on("click", createTasklist);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Comment thread app/controllers/tasks_controller.rb Outdated
else
render 'edit'
end
@task = @tasklist.tasks.find(params[:id])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use before_action

Comment thread app/views/tasklists/_tasklist.html.haml Outdated
@@ -0,0 +1,8 @@
.row.algin-middle.tasklistname{id: "tasklist_list#{@tasklist.id}"}
.col-sm-8
.tasklist_list{"data-index": current_user.tasklists.count - 1, "data-tasklistid": @tasklist.id, id: "tasklist#{@tasklist.id}"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"tasklist-#{@tasklist.id}"

Comment thread app/views/tasklists/_tasks.html.haml Outdated
@@ -0,0 +1,22 @@
.tab-content
-@tasks.each do |task|
.row

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use lists

Comment thread app/views/tasklists/_tasks.html.haml Outdated
%br
.row
%br
%button.btn.btn-primary#addTaskButton{"data-tasklistid": params[:id]} Add Task

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

params should be referenced in view

Comment thread config/routes.rb Outdated
resources :tasklists do
resources :tasks
member do
get 'render_tasks'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tasks
consider using nested resource routes

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read up shallow nested routes

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stupid name

Comment thread app/assets/javascripts/custom.js Outdated
@@ -0,0 +1,370 @@
$(document).ready(function() {
const storage = localStorage.getItem("selectedTasklistCount");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why such a stupid name? storage
What does the store contain?

Comment thread app/views/tasks/_task.html.haml Outdated
%span.fa.fa-edit#taskUpdate.updateTask{"data-tasklistid": @task.tasklist.id, "data-taskid": @task.id}
.col-sm-1.align-self-center
%span.far.fa-trash-alt.taskDelete#taskDelete{"data-tasklistid": @task.tasklist.id, "data-taskid": @task.id}
%br No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line at end of file

Comment thread config/routes.rb Outdated
resources :tasklists do
resources :tasks
member do
get 'render_tasks'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stupid name

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants