GithubHelp home page GithubHelp logo

spine.todos's Introduction

#Spine Todos

Spine Todos is an example application for the Spine JavaScript library.

#Live Demo

Checkout the live demo in Safari/Chrome.

#Features

  • Todo CRUD
  • Local Storage persistence

#Usage

  1. Checkout the Git repository
  2. Open index.html in Safari/Chrome
  3. Check out app/application.js and app/models to see how everything works

#Screenshot

Todos

spine.todos's People

Contributors

jaitaiwan avatar maccman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spine.todos's Issues

No context

Needs a README explaining what the motivation for the project was.

it doesn't show the count on the very first load

Instead of saying 0 left it just says left. If I go into the web inspector (I'm using Chrome) and delete "Task" from LocalStorage or change its value to the empty string it says just left again.

It does properly say 0 left after adding records and deleting them all. In that case, if I look at the localStorage value in Web Inspector, it shows [] as the value.

I looked for a fix briefly but an elegant solution didn't jump out at me. I'm not very familiar with Spine so I thought I'd just report the issue and see what you come up with. I look forward to hearing it!

To sum it up:

  • If it's the first page load or I delete Task from localStorage, the value for Task in localStorage is either non-existent or the empty string, and it says left.
  • If I add an item and delete it, the value for Task in localStorage is [] and it says 0 left.

Incorrect model method call

In the TasksController, the remove function causes an error because this.destroy() doesn't exist. Replacing it with this.item.destroy causes an infinite loop. I left the line out and it worked for me

remove: function(){
    this.el.remove();
    this.destroy();
 }

Example task doesn't work

I have done this http://spinejs.com/docs/example_tasks example over and over again and cant get it to work...
I get the error "Task" is undefined... my code is exactly that as instructed in the guide but it doesn't work, the source code that you have provided on here is not the same as the websites boasted syntax and doesn't follow the guide so I can't reference it.

Could you please either provide a accurate source for the guide on the website or update the website with a guide that either works from following it, or follows the same code as this source.

This would be much appreciated for low level Javascripters :)

Thanks very much.

Missing jQuery selector in javascript version

The TaskApp::create() function should be like this :

create : function(e){
e.preventDefault();
console.log ( this ) ;
Task.create({name:this.$("input").val()});
this.$("input").val("");
} ,

rather than

create : function(e){
e.preventDefault();
console.log ( this ) ;
Task.create({name:this.input.val()});
this.input.val("");
} ,

where the jQuery selector is missing causing an error to be thrown when trying to access undefined "input" property of this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.