Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfat <fat@folders.local>2015-05-11 05:45:38 +0300
committerfat <fat@folders.local>2015-05-11 05:45:38 +0300
commitca9c850ebbfc880dc5021b451ffc9fa12184ff87 (patch)
tree8db34e73d402c3f71fd2e8c853b7fddf6cee33d6 /js/dist/collapse.js
parentbbb97a8660639002e70b1786e595ef9171bfecc6 (diff)
add getters for Version and Default where applicable
add modal my gawd
Diffstat (limited to 'js/dist/collapse.js')
-rw-r--r--js/dist/collapse.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/js/dist/collapse.js b/js/dist/collapse.js
index a537f426e6..7a5e5df9b6 100644
--- a/js/dist/collapse.js
+++ b/js/dist/collapse.js
@@ -25,7 +25,7 @@ var Collapse = (function ($) {
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 600;
- var Defaults = {
+ var Default = {
toggle: true,
parent: null
};
@@ -67,7 +67,7 @@ var Collapse = (function ($) {
this._isTransitioning = false;
this._element = element;
- this._config = $.extend({}, Defaults, config);
+ this._config = $.extend({}, Default, config);
this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]')));
this._parent = this._config.parent ? this._getParent() : null;
@@ -252,6 +252,19 @@ var Collapse = (function ($) {
}
}
}], [{
+ key: 'VERSION',
+
+ // getters
+
+ get: function () {
+ return VERSION;
+ }
+ }, {
+ key: 'Default',
+ get: function () {
+ return Default;
+ }
+ }, {
key: '_getTargetFromElement',
// static
@@ -266,7 +279,7 @@ var Collapse = (function ($) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DATA_KEY);
- var _config = $.extend({}, Defaults, $this.data(), typeof config === 'object' && config);
+ var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config);
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;