GithubHelp home page GithubHelp logo

bartcc / app.todos Goto Github PK

View Code? Open in Web Editor NEW
19.0 6.0 17.0 9.46 MB

Modified Todos App based on Spine.js / Backbone.js

PHP 67.31% Shell 0.03% CSS 4.75% JavaScript 22.83% CoffeeScript 5.01% Batchfile 0.03% HTML 0.05%

app.todos's Introduction

#Modified Spine / Backbone Todos

Summary of 2 Todo examples based on Spine and Backbone JavaScript libraries.

Both examples work in conjunction with CakePHP framework as the backend.

#Live Demo

Checkout the live Backbone based demo and Spine based demo

#Features

  • Todo CRUD
  • Login (Backbone only)
  • Server Storage persistens
  • Toggle Local Storage <-> Server Storage persistens (Backbone only)
  • Mark all Tasks done/undone in memory and sync later
  • Drag'n Drop to reorder Tasks

#Usage

  1. Checkout the Git repository
  2. Create MySql Databases todos_backbone and/or todos_spine
  3. Save database.php.default as database.php, fill in your login and password values
  4. Setup your MySql server using *.sql files located in root directory
  5. Check out js files under /app/webroot/js/spine/app/todos respectively /app/webroot/js/backbone/app/todos to see how everything works

#Screenshot

Todos

app.todos's People

Contributors

anito avatar

Stargazers

 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

app.todos's Issues

Can't connect to the database

I created "todos_backbone" database and imported "todos_backbone" tables.

I also changed 30th line of "routes.php" file:
Router::connect('/', array('controller' => 'todos_app'));

When I'm trying to login to the application, I get these errors:

Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source director_spine [APP\cake\libs\model\connection_manager.php, line 102]

and

SyntaxError: JSON.parse: unexpected character

that.trigger('flash', JSON.parse(xhr.responseText).flash, true);
login.js (line 89)

Comparator in Backbone

Hello,
You have a little bug with comparator in Backbone. The order in you app is 0 1 10 11 12 2 You need to change you comparator in collection and set :

// Todos are sorted by their original insertion order.
comparator: function(todo) {
return Number(todo.get('order'));
}

Thank you for the sample !

Connection Manager Fatal

I'm getting this error after following your instructions.

Fatal Error (256): ConnectionManager::getDataSource - Non-existent data source director_spine [APP\cake\libs\model\connection_manager.php, line 102]

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.