-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(master) Ajoutes les dépendances manquantes
- Loading branch information
Showing
268 changed files
with
83,121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
bower_components | ||
!docs/bower_components | ||
dist | ||
node_modules | ||
.gitconfig | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "backbone.babysitter", | ||
"version": "0.1.12", | ||
"homepage": "https://github.com/marionettejs/backbone.babysitter", | ||
"authors": [ | ||
"Derick Bailey <[email protected]>" | ||
], | ||
"description": "Manage child views in a Backbone.View", | ||
"main": "lib/backbone.babysitter.js", | ||
"keywords": [ | ||
"backbone", | ||
"plugin", | ||
"computed", | ||
"field", | ||
"model", | ||
"client", | ||
"browser" | ||
], | ||
"dependencies": { | ||
"backbone": ">=0.9.9 <=1.3.x", | ||
"underscore": ">=1.4.0 <=1.8.3" | ||
}, | ||
"license": "MIT", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"public", | ||
"specs", | ||
".gitignore", | ||
".jshintrc", | ||
".travis.yml", | ||
"Gruntfile.js", | ||
"component.json", | ||
"package.json" | ||
], | ||
"_release": "0.1.12", | ||
"_resolution": { | ||
"type": "version", | ||
"tag": "v0.1.12", | ||
"commit": "e21524f2fd5164d2fb7a48c3c12d14c22175af4d" | ||
}, | ||
"_source": "https://github.com/marionettejs/backbone.babysitter.git", | ||
"_target": "^0.1.0", | ||
"_originalSource": "backbone.babysitter" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Change log | ||
|
||
### v0.1.12 | ||
|
||
* Bump version range of backbone support. | ||
|
||
### v0.1.11 | ||
|
||
* Bump version range of backbone support. | ||
|
||
### v0.1.10 | ||
|
||
* Bump version range of backbone support. | ||
|
||
### v0.1.9 | ||
|
||
* Bump version range of backbone support. | ||
|
||
### v0.1.8 | ||
|
||
* Bump version range of backbone and underscore support. | ||
|
||
### v0.1.7 | ||
|
||
* Bump version range of backbone support. | ||
|
||
### v0.1.6 | ||
|
||
* Expose `reduce` to babysitter collections. Thanks @romanbsd | ||
|
||
### v0.1.5 | ||
|
||
* Minor updates to bower.json | ||
|
||
### v0.1.4 | ||
|
||
* Update UMD Wrapper and build process | ||
|
||
### v0.1.2 | ||
|
||
* Add .VERSION and n.oConflict | ||
* General cleanups to tests and package.json | ||
* Add travis build info | ||
|
||
### v0.1.1 | ||
* Remove AMD builds and replace with a single UMD style wrapper. | ||
|
||
### v0.1.0 | ||
* allow chaining of add and remove methods | ||
* add component.json | ||
|
||
#### General | ||
* update grunt file | ||
* readme fixed | ||
* fix gruntfile url | ||
|
||
### v0.0.6 | ||
|
||
* Removed `.findByCollection` method | ||
* Added `.findByModelCid` method | ||
|
||
### v0.0.5 | ||
|
||
* Updated build process to use GruntJS v0.4 | ||
|
||
### v0.0.4 | ||
|
||
* Added a fix for IE < 9, when applying a function to the views | ||
* Added `.pluck` as a method, from Underscore.js | ||
* Can specify an array of views to the container constructor | ||
|
||
### v0.0.3 | ||
|
||
* Added iterators and other collection processing functions from Underscore.js | ||
|
||
### v0.0.2 | ||
|
||
* Added `.length` attribute | ||
* Added `.findByIndex` method | ||
|
||
### v0.0.1 | ||
|
||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Backbone.BabySitter | ||
|
||
Copyright (C)2013 Derick Bailey, Muted Solutions, LLC | ||
|
||
Distributed Under [MIT License](http://mutedsolutions.mit-license.org/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "backbone.babysitter", | ||
"version": "0.1.11", | ||
"homepage": "https://github.com/marionettejs/backbone.babysitter", | ||
"authors": [ | ||
"Derick Bailey <[email protected]>" | ||
], | ||
"description": "Manage child views in a Backbone.View", | ||
"main": "lib/backbone.babysitter.js", | ||
"keywords": [ | ||
"backbone", | ||
"plugin", | ||
"computed", | ||
"field", | ||
"model", | ||
"client", | ||
"browser" | ||
], | ||
"dependencies": { | ||
"backbone": ">=0.9.9 <=1.3.x", | ||
"underscore": ">=1.4.0 <=1.8.3" | ||
}, | ||
"license": "MIT", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"public", | ||
"specs", | ||
".gitignore", | ||
".jshintrc", | ||
".travis.yml", | ||
"Gruntfile.js", | ||
"component.json", | ||
"package.json" | ||
] | ||
} |
190 changes: 190 additions & 0 deletions
190
docs/bower_components/backbone.babysitter/lib/backbone.babysitter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
// Backbone.BabySitter | ||
// ------------------- | ||
// v0.1.11 | ||
// | ||
// Copyright (c)2016 Derick Bailey, Muted Solutions, LLC. | ||
// Distributed under MIT license | ||
// | ||
// http://github.com/marionettejs/backbone.babysitter | ||
|
||
(function(root, factory) { | ||
|
||
if (typeof define === 'function' && define.amd) { | ||
define(['backbone', 'underscore'], function(Backbone, _) { | ||
return factory(Backbone, _); | ||
}); | ||
} else if (typeof exports !== 'undefined') { | ||
var Backbone = require('backbone'); | ||
var _ = require('underscore'); | ||
module.exports = factory(Backbone, _); | ||
} else { | ||
factory(root.Backbone, root._); | ||
} | ||
|
||
}(this, function(Backbone, _) { | ||
'use strict'; | ||
|
||
var previousChildViewContainer = Backbone.ChildViewContainer; | ||
|
||
// BabySitter.ChildViewContainer | ||
// ----------------------------- | ||
// | ||
// Provide a container to store, retrieve and | ||
// shut down child views. | ||
|
||
Backbone.ChildViewContainer = (function (Backbone, _) { | ||
|
||
// Container Constructor | ||
// --------------------- | ||
|
||
var Container = function(views){ | ||
this._views = {}; | ||
this._indexByModel = {}; | ||
this._indexByCustom = {}; | ||
this._updateLength(); | ||
|
||
_.each(views, this.add, this); | ||
}; | ||
|
||
// Container Methods | ||
// ----------------- | ||
|
||
_.extend(Container.prototype, { | ||
|
||
// Add a view to this container. Stores the view | ||
// by `cid` and makes it searchable by the model | ||
// cid (and model itself). Optionally specify | ||
// a custom key to store an retrieve the view. | ||
add: function(view, customIndex){ | ||
var viewCid = view.cid; | ||
|
||
// store the view | ||
this._views[viewCid] = view; | ||
|
||
// index it by model | ||
if (view.model){ | ||
this._indexByModel[view.model.cid] = viewCid; | ||
} | ||
|
||
// index by custom | ||
if (customIndex){ | ||
this._indexByCustom[customIndex] = viewCid; | ||
} | ||
|
||
this._updateLength(); | ||
return this; | ||
}, | ||
|
||
// Find a view by the model that was attached to | ||
// it. Uses the model's `cid` to find it. | ||
findByModel: function(model){ | ||
return this.findByModelCid(model.cid); | ||
}, | ||
|
||
// Find a view by the `cid` of the model that was attached to | ||
// it. Uses the model's `cid` to find the view `cid` and | ||
// retrieve the view using it. | ||
findByModelCid: function(modelCid){ | ||
var viewCid = this._indexByModel[modelCid]; | ||
return this.findByCid(viewCid); | ||
}, | ||
|
||
// Find a view by a custom indexer. | ||
findByCustom: function(index){ | ||
var viewCid = this._indexByCustom[index]; | ||
return this.findByCid(viewCid); | ||
}, | ||
|
||
// Find by index. This is not guaranteed to be a | ||
// stable index. | ||
findByIndex: function(index){ | ||
return _.values(this._views)[index]; | ||
}, | ||
|
||
// retrieve a view by its `cid` directly | ||
findByCid: function(cid){ | ||
return this._views[cid]; | ||
}, | ||
|
||
// Remove a view | ||
remove: function(view){ | ||
var viewCid = view.cid; | ||
|
||
// delete model index | ||
if (view.model){ | ||
delete this._indexByModel[view.model.cid]; | ||
} | ||
|
||
// delete custom index | ||
_.any(this._indexByCustom, function(cid, key) { | ||
if (cid === viewCid) { | ||
delete this._indexByCustom[key]; | ||
return true; | ||
} | ||
}, this); | ||
|
||
// remove the view from the container | ||
delete this._views[viewCid]; | ||
|
||
// update the length | ||
this._updateLength(); | ||
return this; | ||
}, | ||
|
||
// Call a method on every view in the container, | ||
// passing parameters to the call method one at a | ||
// time, like `function.call`. | ||
call: function(method){ | ||
this.apply(method, _.tail(arguments)); | ||
}, | ||
|
||
// Apply a method on every view in the container, | ||
// passing parameters to the call method one at a | ||
// time, like `function.apply`. | ||
apply: function(method, args){ | ||
_.each(this._views, function(view){ | ||
if (_.isFunction(view[method])){ | ||
view[method].apply(view, args || []); | ||
} | ||
}); | ||
}, | ||
|
||
// Update the `.length` attribute on this container | ||
_updateLength: function(){ | ||
this.length = _.size(this._views); | ||
} | ||
}); | ||
|
||
// Borrowing this code from Backbone.Collection: | ||
// http://backbonejs.org/docs/backbone.html#section-106 | ||
// | ||
// Mix in methods from Underscore, for iteration, and other | ||
// collection related features. | ||
var methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter', | ||
'select', 'reject', 'every', 'all', 'some', 'any', 'include', | ||
'contains', 'invoke', 'toArray', 'first', 'initial', 'rest', | ||
'last', 'without', 'isEmpty', 'pluck', 'reduce']; | ||
|
||
_.each(methods, function(method) { | ||
Container.prototype[method] = function() { | ||
var views = _.values(this._views); | ||
var args = [views].concat(_.toArray(arguments)); | ||
return _[method].apply(_, args); | ||
}; | ||
}); | ||
|
||
// return the public API | ||
return Container; | ||
})(Backbone, _); | ||
|
||
|
||
Backbone.ChildViewContainer.VERSION = '0.1.11'; | ||
|
||
Backbone.ChildViewContainer.noConflict = function () { | ||
Backbone.ChildViewContainer = previousChildViewContainer; | ||
return this; | ||
}; | ||
|
||
return Backbone.ChildViewContainer; | ||
|
||
})); |
1 change: 1 addition & 0 deletions
1
docs/bower_components/backbone.babysitter/lib/backbone.babysitter.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
docs/bower_components/backbone.babysitter/lib/backbone.babysitter.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
docs/bower_components/backbone.babysitter/lib/backbone.babysitter.min.js.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.