Skip to content

Commit

Permalink
Merge pull request #399 from kentmw/master
Browse files Browse the repository at this point in the history
Fixed problem with 'when' fields processing 'on' and 'listenTo's inco…
  • Loading branch information
kentmw authored Jun 18, 2019
2 parents 31d5d94 + 9c42263 commit 6dc5c78
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 93 deletions.
2 changes: 1 addition & 1 deletion modules/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,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
Expand Down
182 changes: 91 additions & 91 deletions torso-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion torso-bundle.min.js

Large diffs are not rendered by default.

0 comments on commit 6dc5c78

Please sign in to comment.