diff options
| author | fat <[email protected]> | 2015-05-13 14:46:50 -0700 |
|---|---|---|
| committer | fat <[email protected]> | 2015-05-13 14:46:50 -0700 |
| commit | eaab1def7af7d7e1ab32ff69d043b46e2815ca22 (patch) | |
| tree | 495965eef95b6c7e1ca485c04311e6e451695b29 /js/dist/tooltip.js | |
| parent | c2ced2292a6467b9c8a9fec3151982fd7ac8a239 (diff) | |
| download | bootstrap-eaab1def7af7d7e1ab32ff69d043b46e2815ca22.tar.xz bootstrap-eaab1def7af7d7e1ab32ff69d043b46e2815ca22.zip | |
add simple type checker implementation
Diffstat (limited to 'js/dist/tooltip.js')
| -rw-r--r-- | js/dist/tooltip.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/js/dist/tooltip.js b/js/dist/tooltip.js index b4db8deca..864e0bb76 100644 --- a/js/dist/tooltip.js +++ b/js/dist/tooltip.js @@ -37,7 +37,20 @@ var Tooltip = (function ($) { selector: false, placement: 'top', offset: '0 0', - constraints: null + constraints: [] + }; + + var DefaultType = { + animation: 'boolean', + template: 'string', + title: '(string|function)', + trigger: 'string', + delay: '(number|object)', + html: 'boolean', + selector: '(string|boolean)', + placement: '(string|function)', + offset: 'string', + constraints: 'array' }; var AttachmentMap = { @@ -476,6 +489,8 @@ var Tooltip = (function ($) { }; } + Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); + return config; } }, { @@ -528,6 +543,11 @@ var Tooltip = (function ($) { return EVENT_KEY; } }, { + key: 'DefaultType', + get: function () { + return DefaultType; + } + }, { key: '_jQueryInterface', // static |
