diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 108308b8..a45ccdd7 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -13,11 +13,13 @@ module.exports = (grunt) -> grunt.loadNpmTasks('grunt-contrib-uglify') grunt.loadNpmTasks('grunt-contrib-watch') grunt.loadNpmTasks('grunt-release') + grunt.loadNpmTasks('grunt-karma') grunt.initConfig pkg: '' distFolder: 'dist' + testFolder: 'test' jst: all: @@ -63,5 +65,11 @@ module.exports = (grunt) -> release: npm: false + karma: + unit: + configFile: '<%= testFolder %>/karma.conf.coffee' + + grunt.registerTask 'default', ALL_TASKS grunt.registerTask 'dist', ['cssmin:dist', 'uglify:dist'] + grunt.registerTask 'test', ['dist', 'karma'] diff --git a/bower.json b/bower.json index 8a3044ec..21f361ac 100644 --- a/bower.json +++ b/bower.json @@ -6,7 +6,7 @@ "adamjacobbecker " ], "description": "Graphical form builder for the web.", - "main": "dist", + "main": "index.js", "license": "MIT", "ignore": [ "**/.*", @@ -16,14 +16,14 @@ "tests" ], "dependencies": { - "jquery": "*", - "jquery-ui": "*", + "jquery": "~2.0.3", + "jquery-ui": "~1.10.3", "jquery.scrollWindowTo": "https://gist.github.com/adamjacobbecker/6519570/raw/cd741057495d0fb19e545a0f9a098efba3bef9c8/jquery.scrollWindowTo.js", - "underscore": "*", + "underscore": "~1.5.2", "underscore.mixin.deepExtend": "https://gist.github.com/adamjacobbecker/6519561/raw/63682037af9b10200b05c1a3d5890903397b2103/underscore.mixin.deepExtend.js", - "backbone": "*", - "backbone-deep-model": "*", - "rivets": "*", - "font-awesome": "~4.0.1" + "backbone": "~1.1.0", + "backbone-deep-model": "~0.10.4", + "rivets": "~0.5.13", + "font-awesome": "~3.2.1" } -} +} \ No newline at end of file diff --git a/bower_components/backbone-deep-model/.bower.json b/bower_components/backbone-deep-model/.bower.json index 5fcad0cc..731c929f 100644 --- a/bower_components/backbone-deep-model/.bower.json +++ b/bower_components/backbone-deep-model/.bower.json @@ -9,6 +9,6 @@ "commit": "709ca367afa864253517f05690984179a0504664" }, "_source": "git://github.com/powmedia/backbone-deep-model.git", - "_target": "*", + "_target": "~0.10.4", "_originalSource": "backbone-deep-model" } \ No newline at end of file diff --git a/bower_components/backbone/.bower.json b/bower_components/backbone/.bower.json index 998f6b4e..7cc42d12 100644 --- a/bower_components/backbone/.bower.json +++ b/bower_components/backbone/.bower.json @@ -1,14 +1,14 @@ { "name": "backbone", "homepage": "https://github.com/jashkenas/backbone", - "version": "1.0.0", - "_release": "1.0.0", + "version": "1.1.0", + "_release": "1.1.0", "_resolution": { "type": "version", - "tag": "1.0.0", - "commit": "699fe3271262043bb137bae97bd0003d6d193f27" + "tag": "1.1.0", + "commit": "0a4399e3de5cb2ab75a0338669582f18c1fae3ae" }, "_source": "git://github.com/jashkenas/backbone.git", - "_target": "*", + "_target": "~1.1.0", "_originalSource": "backbone" } \ No newline at end of file diff --git a/bower_components/backbone/CONTRIBUTING.md b/bower_components/backbone/CONTRIBUTING.md index 5f4ff1a4..55403616 100644 --- a/bower_components/backbone/CONTRIBUTING.md +++ b/bower_components/backbone/CONTRIBUTING.md @@ -1,15 +1,20 @@ -## How to contribute to Backbone.js +## How to Open a Backbone.js Ticket + +* Do not use tickets to ask for help with (debugging) your application. Ask on +the [mailing list](https://groups.google.com/forum/#!forum/backbonejs), +in the IRC channel (`#documentcloud` on Freenode), or if you understand your +specific problem, on [StackOverflow](http://stackoverflow.com/questions/tagged/backbone.js). * Before you open a ticket or send a pull request, -[search](https://github.com/documentcloud/backbone/issues) for previous +[search](https://github.com/jashkenas/backbone/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. * Before sending a pull request for a feature or bug fix, be sure to have -[tests](http://backbonejs.org/test/test.html). +[tests](http://backbonejs.org/test/). * Use the same coding style as the rest of the -[codebase](https://github.com/documentcloud/backbone/blob/master/backbone.js). +[codebase](https://github.com/jashkenas/backbone/blob/master/backbone.js). * In your pull request, do not add documentation or rebuild the minified `backbone-min.js` file. We'll do that before cutting a new release. diff --git a/bower_components/backbone/README.md b/bower_components/backbone/README.md index 75aa0780..7b0482df 100644 --- a/bower_components/backbone/README.md +++ b/bower_components/backbone/README.md @@ -1,26 +1,29 @@ - ____ __ __ - /\ _`\ /\ \ /\ \ __ - \ \ \ \ \ __ ___\ \ \/'\\ \ \____ ___ ___ __ /\_\ ____ - \ \ _ <' /'__`\ /'___\ \ , < \ \ '__`\ / __`\ /' _ `\ /'__`\ \/\ \ /',__\ + ____ __ __ + /\ _`\ /\ \ /\ \ __ + \ \ \ \ \ __ ___\ \ \/'\\ \ \____ ___ ___ __ /\_\ ____ + \ \ _ <' /'__`\ /'___\ \ , < \ \ '__`\ / __`\ /' _ `\ /'__`\ \/\ \ /',__\ \ \ \ \ \/\ \ \.\_/\ \__/\ \ \\`\\ \ \ \ \/\ \ \ \/\ \/\ \/\ __/ __ \ \ \/\__, `\ \ \____/\ \__/.\_\ \____\\ \_\ \_\ \_,__/\ \____/\ \_\ \_\ \____\/\_\_\ \ \/\____/ - \/___/ \/__/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/_/\/_/\/____/\/_/\ \_\ \/___/ - \ \____/ - \/___/ + \/___/ \/__/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/_/\/_/\/____/\/_/\ \_\ \/___/ + \ \____/ + \/___/ (_'_______________________________________________________________________________'_) (_.———————————————————————————————————————————————————————————————————————————————._) - - + + Backbone supplies structure to JavaScript-heavy applications by providing models key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface. For Docs, License, Tests, pre-packed downloads, and everything else, really, see: http://backbonejs.org To suggest a feature, report a bug, or general discussion: -http://github.com/documentcloud/backbone/issues/ +http://github.com/jashkenas/backbone/issues + +Backbone is an open-sourced component of DocumentCloud: +https://github.com/documentcloud -All contributors are listed here: -http://github.com/documentcloud/backbone/contributors +Many thanks to our contributors: +http://github.com/jashkenas/backbone/contributors -Special thanks to Robert Kieffer for the original philosophy behind Backbone. +Special thanks to Robert Kieffer for the original philosophy behind Backbone. http://github.com/broofa diff --git a/bower_components/backbone/Rakefile b/bower_components/backbone/Rakefile deleted file mode 100644 index e9723648..00000000 --- a/bower_components/backbone/Rakefile +++ /dev/null @@ -1,24 +0,0 @@ -desc "rebuild the backbone-min.js files for distribution" -task :build do - check 'uglifyjs', 'UglifyJS', 'https://github.com/mishoo/UglifyJS2' - system 'uglifyjs backbone.js --source-map backbone-min.map -o backbone-min.js' -end - -desc "build the docco documentation" -task :doc do - check 'docco', 'docco', 'https://github.com/jashkenas/docco' - system 'docco backbone.js && docco examples/todos/todos.js examples/backbone.localstorage.js' -end - -desc "run JavaScriptLint on the source" -task :lint do - check 'jsl', 'JavaScript Lint', 'http://www.javascriptlint.com/' - system "jsl -nofilelisting -nologo -conf docs/jsl.conf -process backbone.js" -end - -# Check for the existence of an executable. -def check(exec, name, url) - return unless `which #{exec}`.empty? - puts "#{name} not found.\nInstall it from #{url}" - exit -end diff --git a/bower_components/backbone/backbone-min.js b/bower_components/backbone/backbone-min.js index 7243e5f0..3b2593dd 100644 --- a/bower_components/backbone/backbone-min.js +++ b/bower_components/backbone/backbone-min.js @@ -1,4 +1,2 @@ -(function(){var root=this;var previousBackbone=root.Backbone;var array=[];var push=array.push;var slice=array.slice;var splice=array.splice;var Backbone;if(typeof exports!=="undefined"){Backbone=exports}else{Backbone=root.Backbone={}}Backbone.VERSION="1.0.0";var _=root._;if(!_&&typeof require!=="undefined")_=require("underscore");Backbone.$=root.jQuery||root.Zepto||root.ender||root.$;Backbone.noConflict=function(){root.Backbone=previousBackbone;return this};Backbone.emulateHTTP=false;Backbone.emulateJSON=false;var Events=Backbone.Events={on:function(name,callback,context){if(!eventsApi(this,"on",name,[callback,context])||!callback)return this;this._events||(this._events={});var events=this._events[name]||(this._events[name]=[]);events.push({callback:callback,context:context,ctx:context||this});return this},once:function(name,callback,context){if(!eventsApi(this,"once",name,[callback,context])||!callback)return this;var self=this;var once=_.once(function(){self.off(name,once);callback.apply(this,arguments)});once._callback=callback;return this.on(name,once,context)},off:function(name,callback,context){var retain,ev,events,names,i,l,j,k;if(!this._events||!eventsApi(this,"off",name,[callback,context]))return this;if(!name&&!callback&&!context){this._events={};return this}names=name?[name]:_.keys(this._events);for(i=0,l=names.length;i").attr(attrs);this.setElement($el,false)}else{this.setElement(_.result(this,"el"),false)}}});Backbone.sync=function(method,model,options){var type=methodMap[method];_.defaults(options||(options={}),{emulateHTTP:Backbone.emulateHTTP,emulateJSON:Backbone.emulateJSON});var params={type:type,dataType:"json"};if(!options.url){params.url=_.result(model,"url")||urlError()}if(options.data==null&&model&&(method==="create"||method==="update"||method==="patch")){params.contentType="application/json";params.data=JSON.stringify(options.attrs||model.toJSON(options))}if(options.emulateJSON){params.contentType="application/x-www-form-urlencoded";params.data=params.data?{model:params.data}:{}}if(options.emulateHTTP&&(type==="PUT"||type==="DELETE"||type==="PATCH")){params.type="POST";if(options.emulateJSON)params.data._method=type;var beforeSend=options.beforeSend;options.beforeSend=function(xhr){xhr.setRequestHeader("X-HTTP-Method-Override",type);if(beforeSend)return beforeSend.apply(this,arguments)}}if(params.type!=="GET"&&!options.emulateJSON){params.processData=false}if(params.type==="PATCH"&&window.ActiveXObject&&!(window.external&&window.external.msActiveXFilteringEnabled)){params.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var xhr=options.xhr=Backbone.ajax(_.extend(params,options));model.trigger("request",model,xhr,options);return xhr};var methodMap={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};Backbone.ajax=function(){return Backbone.$.ajax.apply(Backbone.$,arguments)};var Router=Backbone.Router=function(options){options||(options={});if(options.routes)this.routes=options.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var optionalParam=/\((.*?)\)/g;var namedParam=/(\(\?)?:\w+/g;var splatParam=/\*\w+/g;var escapeRegExp=/[\-{}\[\]+?.,\\\^$|#\s]/g;_.extend(Router.prototype,Events,{initialize:function(){},route:function(route,name,callback){if(!_.isRegExp(route))route=this._routeToRegExp(route);if(_.isFunction(name)){callback=name;name=""}if(!callback)callback=this[name];var router=this;Backbone.history.route(route,function(fragment){var args=router._extractParameters(route,fragment);callback&&callback.apply(router,args);router.trigger.apply(router,["route:"+name].concat(args));router.trigger("route",name,args);Backbone.history.trigger("route",router,name,args)});return this},navigate:function(fragment,options){Backbone.history.navigate(fragment,options);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=_.result(this,"routes");var route,routes=_.keys(this.routes);while((route=routes.pop())!=null){this.route(route,this.routes[route])}},_routeToRegExp:function(route){route=route.replace(escapeRegExp,"\\$&").replace(optionalParam,"(?:$1)?").replace(namedParam,function(match,optional){return optional?match:"([^/]+)"}).replace(splatParam,"(.*?)");return new RegExp("^"+route+"$")},_extractParameters:function(route,fragment){var params=route.exec(fragment).slice(1);return _.map(params,function(param){return param?decodeURIComponent(param):null})}});var History=Backbone.History=function(){this.handlers=[];_.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var routeStripper=/^[#\/]|\s+$/g;var rootStripper=/^\/+|\/+$/g;var isExplorer=/msie [\w.]+/;var trailingSlash=/\/$/;History.started=false;_.extend(History.prototype,Events,{interval:50,getHash:function(window){var match=(window||this).location.href.match(/#(.*)$/);return match?match[1]:""},getFragment:function(fragment,forcePushState){if(fragment==null){if(this._hasPushState||!this._wantsHashChange||forcePushState){fragment=this.location.pathname;var root=this.root.replace(trailingSlash,"");if(!fragment.indexOf(root))fragment=fragment.substr(root.length)}else{fragment=this.getHash()}}return fragment.replace(routeStripper,"")},start:function(options){if(History.started)throw new Error("Backbone.history has already been started");History.started=true;this.options=_.extend({},{root:"/"},this.options,options);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var fragment=this.getFragment();var docMode=document.documentMode;var oldIE=isExplorer.exec(navigator.userAgent.toLowerCase())&&(!docMode||docMode<=7);this.root=("/"+this.root+"/").replace(rootStripper,"/");if(oldIE&&this._wantsHashChange){this.iframe=Backbone.$('