-
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.
Fixing broken order of registry and history
- Loading branch information
kent.willis
committed
Jul 23, 2018
1 parent
48b7526
commit 6f61439
Showing
4 changed files
with
37 additions
and
37 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
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 |
---|---|---|
|
@@ -258,6 +258,40 @@ | |
return Backbone.history; | ||
})); | ||
|
||
(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. | ||
* | ||
* @module Torso | ||
* @namespace Torso.Utils | ||
* @class stickitUtils | ||
* @static | ||
* @author [email protected], [email protected] | ||
*/ | ||
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); | ||
|
@@ -400,40 +434,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. | ||
* | ||
* @module Torso | ||
* @namespace Torso.Utils | ||
* @class stickitUtils | ||
* @static | ||
* @author [email protected], [email protected] | ||
*/ | ||
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); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.