-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #399 from kentmw/master
Fixed problem with 'when' fields processing 'on' and 'listenTo's inco…
- Loading branch information
Showing
3 changed files
with
93 additions
and
93 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
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 |
---|---|---|
|
@@ -60,19 +60,6 @@ | |
return Backbone.Router.extend(/** @lends Router.prototype */{}); | ||
})); | ||
|
||
(function(root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['backbone', 'jquery'], factory); | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('backbone'), require('jquery')); | ||
} else { | ||
factory(root.Backbone, root.$); | ||
} | ||
}(this, function(Backbone, $) { | ||
'use strict'; | ||
Backbone.$ = $; | ||
return true; | ||
})); | ||
/** | ||
* The handlebars reference | ||
* @external Handlebars | ||
|
@@ -296,6 +283,19 @@ | |
}); | ||
}; | ||
})); | ||
(function(root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['backbone', 'jquery'], factory); | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('backbone'), require('jquery')); | ||
} else { | ||
factory(root.Backbone, root.$); | ||
} | ||
}(this, function(Backbone, $) { | ||
'use strict'; | ||
Backbone.$ = $; | ||
return true; | ||
})); | ||
/** | ||
* The backbone History reference | ||
* @external Backbone-History | ||
|
@@ -491,40 +491,6 @@ | |
return registry; | ||
})); | ||
|
||
(function(root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['backbone', 'backbone.stickit'], factory); | ||
} else if (typeof exports === 'object') { | ||
require('backbone.stickit'); | ||
factory(require('backbone')); | ||
} else { | ||
factory(root.Backbone); | ||
} | ||
}(this, function(Backbone) { | ||
'use strict'; | ||
|
||
/** | ||
* Extensions to stickit handlers. | ||
* | ||
* @function stickitUtils | ||
* | ||
* @author [email protected], [email protected] | ||
* | ||
* @see <a href="../annotated/modules/stickitUtils.html">stickitUtils Annotated Source</a> | ||
*/ | ||
Backbone.Stickit.addHandler({ | ||
selector: 'input[type="radio"]', | ||
events: ['change'], | ||
update: function($el, val) { | ||
$el.prop('checked', false); | ||
$el.filter('[value="' + val + '"]').prop('checked', true); | ||
}, | ||
getVal: function($el) { | ||
return $el.filter(':checked').val(); | ||
} | ||
}); | ||
})); | ||
|
||
/** | ||
* The jQuery reference | ||
* @external jQuery | ||
|
@@ -845,6 +811,40 @@ | |
return templateRenderer; | ||
})); | ||
|
||
(function(root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['backbone', 'backbone.stickit'], factory); | ||
} else if (typeof exports === 'object') { | ||
require('backbone.stickit'); | ||
factory(require('backbone')); | ||
} else { | ||
factory(root.Backbone); | ||
} | ||
}(this, function(Backbone) { | ||
'use strict'; | ||
|
||
/** | ||
* Extensions to stickit handlers. | ||
* | ||
* @function stickitUtils | ||
* | ||
* @author [email protected], [email protected] | ||
* | ||
* @see <a href="../annotated/modules/stickitUtils.html">stickitUtils Annotated Source</a> | ||
*/ | ||
Backbone.Stickit.addHandler({ | ||
selector: 'input[type="radio"]', | ||
events: ['change'], | ||
update: function($el, val) { | ||
$el.prop('checked', false); | ||
$el.filter('[value="' + val + '"]').prop('checked', true); | ||
}, | ||
getVal: function($el) { | ||
return $el.filter(':checked').val(); | ||
} | ||
}); | ||
})); | ||
|
||
(function(root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['underscore', 'backbone'], factory); | ||
|
@@ -1678,49 +1678,6 @@ | |
|
||
return pollingMixin; | ||
})); | ||
(function(root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['underscore', './Model', './mixins/cellMixin', './registry'], factory); | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('underscore'), require('./Model'), require('./mixins/cellMixin'), require('./registry')); | ||
} else { | ||
root.Torso = root.Torso || {}; | ||
root.Torso.Cell = factory(root._, root.Torso.Model, root.Torso.Mixins.cell, root.Torso.registry); | ||
} | ||
}(this, function(_, Model, cellMixin, registry) { | ||
'use strict'; | ||
/** | ||
* An non-persistable object that can listen to and emit events like a models. | ||
* | ||
* @class Cell | ||
* @extends {external:Backbone-Model} | ||
* @mixes cellMixin | ||
* | ||
* @param {Object} attributes the initial attributes to use for this cell. | ||
* @param {Object} [options={}] the options for setting up this cell. | ||
* @param {boolean} [options.register=false] whether to register this cell in the app-level registry. | ||
* By default this will NOT add it to the registry unless set to true because | ||
* we have not mechanism that will make sure the cells get removed from the registry | ||
* at the appropriate times. | ||
* @author [email protected], [email protected] | ||
* | ||
* @see <a href="../annotated/modules/Cell.html">Cell Annotated Source</a> | ||
*/ | ||
var Cell = Model.extend(/** @lends Cell.prototype */{ | ||
/** | ||
* Register this item with the cell registry after initialize. | ||
* @private | ||
* @override | ||
*/ | ||
__register: function() { | ||
registry.cellInitialized(this); | ||
} | ||
}); | ||
_.extend(Cell.prototype, cellMixin); | ||
|
||
return Cell; | ||
})); | ||
|
||
/** | ||
* The backbone Collection reference | ||
* @external Backbone-Collection | ||
|
@@ -1782,6 +1739,49 @@ | |
return Collection; | ||
})); | ||
|
||
(function(root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['underscore', './Model', './mixins/cellMixin', './registry'], factory); | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('underscore'), require('./Model'), require('./mixins/cellMixin'), require('./registry')); | ||
} else { | ||
root.Torso = root.Torso || {}; | ||
root.Torso.Cell = factory(root._, root.Torso.Model, root.Torso.Mixins.cell, root.Torso.registry); | ||
} | ||
}(this, function(_, Model, cellMixin, registry) { | ||
'use strict'; | ||
/** | ||
* An non-persistable object that can listen to and emit events like a models. | ||
* | ||
* @class Cell | ||
* @extends {external:Backbone-Model} | ||
* @mixes cellMixin | ||
* | ||
* @param {Object} attributes the initial attributes to use for this cell. | ||
* @param {Object} [options={}] the options for setting up this cell. | ||
* @param {boolean} [options.register=false] whether to register this cell in the app-level registry. | ||
* By default this will NOT add it to the registry unless set to true because | ||
* we have not mechanism that will make sure the cells get removed from the registry | ||
* at the appropriate times. | ||
* @author [email protected], [email protected] | ||
* | ||
* @see <a href="../annotated/modules/Cell.html">Cell Annotated Source</a> | ||
*/ | ||
var Cell = Model.extend(/** @lends Cell.prototype */{ | ||
/** | ||
* Register this item with the cell registry after initialize. | ||
* @private | ||
* @override | ||
*/ | ||
__register: function() { | ||
registry.cellInitialized(this); | ||
} | ||
}); | ||
_.extend(Cell.prototype, cellMixin); | ||
|
||
return Cell; | ||
})); | ||
|
||
/** | ||
* The backbone Model reference | ||
* @external Backbone-Model | ||
|
@@ -3587,7 +3587,7 @@ | |
qualifiedFields = [whenField], | ||
useAtNotation = (whenField.charAt(0) === '@'); | ||
|
||
if (whenField !== 'on' || whenField !== 'listenTo') { | ||
if (whenField !== 'on' && whenField !== 'listenTo') { | ||
if (useAtNotation) { | ||
whenField = whenField.substring(1); | ||
// substitute indices in to "when" placeholders | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.