Skip to content

Commit

Permalink
Fetch working in ie7 now with ie.cors #14 #15
Browse files Browse the repository at this point in the history
Error handling added
Error timeout added
Host unreachable error added
Template customisable
Readme updated
  • Loading branch information
JasonH1 committed Dec 16, 2013
1 parent ff4aa1f commit f7d9a32
Show file tree
Hide file tree
Showing 20 changed files with 1,926 additions and 3,129 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module.exports = function(grunt) {
immed: true,
jquery: true,
latedef: true,
newcap: true,
newcap: false,
noarg: true,
node: true,
nonew: true,
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ install all of the dependencies:

In order to compile the Chiropractor code for release you must run:

grunt
grunt

Which will generate `chiropractor.js` as well as `chiropractor.min.js` in the
root of the project. Whenever you wish to run this command, please be sure to
Expand All @@ -74,23 +74,31 @@ Tests

There are two ways to run tests:

npm test
npm test

Or if you want more control over how your tests are run (such as continuous
testing with auto-running tests on file changes you can run:

./node_modules/.bin/karma start --dev --browsers Chrome,PhantomJS
./node_modules/.bin/karma start --dev --browsers Chrome,PhantomJS

Previewing
-----

You can preview example functionality of Chiropractor by first running:

grunt devserver


goto: http://localhost:8888

Also you check out the /example folder for the source code of these examples
in how to integrate Chiropractor into your project.


Enabling ErrorHandling
-----

You can enable Chiropractor default error handler for api unreachable or error
codes by setting the property: enableErrorHandler: true in your model or collection.

You can also override or create your own custom error template by overriding the row "error" template with your own.

4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "chiropractor",
"version": "0.1.14",
"dependencies": {
"jquery": ">=1.7",
"jquery": "~1.9.1",
"jquery.cookie": "~1.3.1",
"require-handlebars-plugin": "~0.4.0",
"requirejs-plugins": "~1.0.2",
"underscore": "~1.5.1",
"backbone-amd": "~1.0.0",
"backbone-amd": "~1.1.0",
"backbone.subroute": "~0.4.0",
"requirejs": "~2.1.8",
"json3": "~3.2.5",
Expand Down
6 changes: 5 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require.config({
'backbone.deep.model': 'bower_components/backbone-deep-model/src/deep-model',
'underscore.mixin.deepextend': './lib/underscore.mixin.deepextend',
'json-ie7': './lib/JSON',
'backbone.crossdomain': './lib/Backbone.CrossDomain'
'jquery.ie.cors': './lib/jquery.ie.cors'
},

skipModuleInsertion: false,
Expand All @@ -53,6 +53,9 @@ require.config({
'json-ie7': {
exports: 'JSON'
},
'jquery.ie.cors': {
deps: ['jquery']
},
'jquery.cookie': {
deps: ['jquery'],
exports: 'jQuery.cookie'
Expand All @@ -61,6 +64,7 @@ require.config({

deps: [
'jquery',
'jquery.ie.cors',
'hbs',
'underscore'
],
Expand Down
Loading

0 comments on commit f7d9a32

Please sign in to comment.