materialize-sass 0.99.0 → 0.100.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/app/assets/javascripts/materialize.js +6015 -5060
- data/app/assets/javascripts/materialize/animation.js +4 -5
- data/app/assets/javascripts/materialize/buttons.js +24 -38
- data/app/assets/javascripts/materialize/cards.js +13 -21
- data/app/assets/javascripts/materialize/carousel.js +122 -110
- data/app/assets/javascripts/materialize/character_counter.js +14 -22
- data/app/assets/javascripts/materialize/chips.js +41 -44
- data/app/assets/javascripts/materialize/collapsible.js +41 -46
- data/app/assets/javascripts/materialize/date_picker/picker.date.js +965 -1167
- data/app/assets/javascripts/materialize/date_picker/picker.js +546 -634
- data/app/assets/javascripts/materialize/date_picker/picker.time.js +166 -212
- data/app/assets/javascripts/materialize/dropdown.js +53 -68
- data/app/assets/javascripts/materialize/extras/nouislider.js +3 -1
- data/app/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
- data/app/assets/javascripts/materialize/forms.js +156 -154
- data/app/assets/javascripts/materialize/global.js +34 -43
- data/app/assets/javascripts/materialize/hammer.min.js +424 -1
- data/app/assets/javascripts/materialize/initial.js +3 -3
- data/app/assets/javascripts/materialize/jquery.easing.1.4.js +120 -142
- data/app/assets/javascripts/materialize/jquery.hammer.js +9 -9
- data/app/assets/javascripts/materialize/materialbox.js +81 -107
- data/app/assets/javascripts/materialize/modal.js +373 -162
- data/app/assets/javascripts/materialize/parallax.js +11 -15
- data/app/assets/javascripts/materialize/pushpin.js +2 -5
- data/app/assets/javascripts/materialize/scrollFire.js +9 -11
- data/app/assets/javascripts/materialize/scrollspy.js +84 -92
- data/app/assets/javascripts/materialize/sideNav.js +128 -139
- data/app/assets/javascripts/materialize/slider.js +83 -112
- data/app/assets/javascripts/materialize/tabs.js +196 -196
- data/app/assets/javascripts/materialize/tapTarget.js +170 -173
- data/app/assets/javascripts/materialize/toasts.js +330 -112
- data/app/assets/javascripts/materialize/tooltip.js +134 -145
- data/app/assets/javascripts/materialize/transitions.js +43 -49
- data/app/assets/javascripts/materialize/velocity.min.js +623 -2
- data/app/assets/javascripts/materialize/waves.js +42 -47
- data/app/assets/stylesheets/materialize/components/_buttons.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_carousel.scss +4 -5
- data/app/assets/stylesheets/materialize/components/_chips.scss +1 -0
- data/app/assets/stylesheets/materialize/components/_collapsible.scss +4 -7
- data/app/assets/stylesheets/materialize/components/_color.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_global.scss +8 -14
- data/app/assets/stylesheets/materialize/components/_navbar.scss +0 -1
- data/app/assets/stylesheets/materialize/components/_tabs.scss +1 -7
- data/app/assets/stylesheets/materialize/components/_toast.scss +6 -12
- data/app/assets/stylesheets/materialize/components/_variables.scss +55 -43
- data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +1 -0
- data/app/assets/stylesheets/materialize/components/forms/_checkboxes.scss +2 -12
- data/app/assets/stylesheets/materialize/components/forms/_file-input.scss +6 -0
- data/app/assets/stylesheets/materialize/components/forms/_input-fields.scss +67 -37
- data/app/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +1 -3
- data/app/assets/stylesheets/materialize/components/forms/_select.scss +72 -11
- data/app/assets/stylesheets/materialize/components/forms/_switches.scss +2 -4
- data/app/assets/stylesheets/materialize/extras/nouislider.css +8 -1
- data/lib/materialize-sass/version.rb +1 -1
- metadata +2 -5
- data/app/assets/javascripts/materialize/init.js +0 -214
- data/app/assets/javascripts/materialize/jquery.timeago.min.js +0 -1
- data/app/assets/javascripts/materialize/prism.js +0 -8
@@ -1,185 +1,396 @@
|
|
1
|
-
(function(
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
2
|
+
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4
|
+
|
5
|
+
(function ($) {
|
6
|
+
'use strict';
|
7
|
+
|
8
|
+
var _defaults = {
|
9
|
+
opacity: 0.5,
|
10
|
+
inDuration: 250,
|
11
|
+
outDuration: 250,
|
12
|
+
ready: undefined,
|
13
|
+
complete: undefined,
|
14
|
+
dismissible: true,
|
15
|
+
startingTop: '4%',
|
16
|
+
endingTop: '10%'
|
7
17
|
};
|
8
18
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
19
|
+
/**
|
20
|
+
* @class
|
21
|
+
*
|
22
|
+
*/
|
23
|
+
|
24
|
+
var Modal = function () {
|
25
|
+
/**
|
26
|
+
* Construct Modal instance and set up overlay
|
27
|
+
* @constructor
|
28
|
+
* @param {jQuery} $el
|
29
|
+
* @param {Object} options
|
30
|
+
*/
|
31
|
+
function Modal($el, options) {
|
32
|
+
_classCallCheck(this, Modal);
|
33
|
+
|
34
|
+
// If exists, destroy and reinitialize
|
35
|
+
if (!!$el[0].M_Modal) {
|
36
|
+
$el[0].M_Modal.destroy();
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The jQuery element
|
41
|
+
* @type {jQuery}
|
42
|
+
*/
|
43
|
+
this.$el = $el;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Options for the modal
|
47
|
+
* @member Modal#options
|
48
|
+
* @prop {Number} [opacity=0.5] - Opacity of the modal overlay
|
49
|
+
* @prop {Number} [inDuration=250] - Length in ms of enter transition
|
50
|
+
* @prop {Number} [outDuration=250] - Length in ms of exit transition
|
51
|
+
* @prop {Function} ready - Callback function called when modal is finished entering
|
52
|
+
* @prop {Function} complete - Callback function called when modal is finished exiting
|
53
|
+
* @prop {Boolean} [dismissible=true] - Allow modal to be dismissed by keyboard or overlay click
|
54
|
+
* @prop {String} [startingTop='4%'] - startingTop
|
55
|
+
* @prop {String} [endingTop='10%'] - endingTop
|
56
|
+
*/
|
57
|
+
this.options = $.extend({}, Modal.defaults, options);
|
58
|
+
|
59
|
+
/**
|
60
|
+
* Describes open/close state of modal
|
61
|
+
* @type {Boolean}
|
62
|
+
*/
|
63
|
+
this.isOpen = false;
|
64
|
+
|
65
|
+
this.$el[0].M_Modal = this;
|
66
|
+
this.id = $el.attr('id');
|
67
|
+
this.openingTrigger = undefined;
|
68
|
+
this.$overlay = $('<div class="modal-overlay"></div>');
|
69
|
+
|
70
|
+
Modal._increment++;
|
71
|
+
Modal._count++;
|
72
|
+
this.$overlay[0].style.zIndex = 1000 + Modal._increment * 2;
|
73
|
+
this.$el[0].style.zIndex = 1000 + Modal._increment * 2 + 1;
|
74
|
+
this.setupEventHandlers();
|
75
|
+
}
|
76
|
+
|
77
|
+
_createClass(Modal, [{
|
78
|
+
key: 'getInstance',
|
79
|
+
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Get Instance
|
83
|
+
*/
|
84
|
+
value: function getInstance() {
|
85
|
+
return this;
|
86
|
+
}
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Teardown component
|
90
|
+
*/
|
91
|
+
|
92
|
+
}, {
|
93
|
+
key: 'destroy',
|
94
|
+
value: function destroy() {
|
95
|
+
this.removeEventHandlers();
|
96
|
+
this.$el[0].removeAttribute('style');
|
97
|
+
if (!!this.$overlay[0].parentNode) {
|
98
|
+
this.$overlay[0].parentNode.removeChild(this.$overlay[0]);
|
99
|
+
}
|
100
|
+
this.$el[0].M_Modal = undefined;
|
101
|
+
Modal._count--;
|
102
|
+
}
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Setup Event Handlers
|
106
|
+
*/
|
107
|
+
|
108
|
+
}, {
|
109
|
+
key: 'setupEventHandlers',
|
110
|
+
value: function setupEventHandlers() {
|
111
|
+
this.handleOverlayClickBound = this.handleOverlayClick.bind(this);
|
112
|
+
this.handleModalCloseClickBound = this.handleModalCloseClick.bind(this);
|
113
|
+
|
114
|
+
if (Modal._count === 1) {
|
115
|
+
document.addEventListener('click', this.handleTriggerClick);
|
116
|
+
}
|
117
|
+
this.$overlay[0].addEventListener('click', this.handleOverlayClickBound);
|
118
|
+
this.$el[0].addEventListener('click', this.handleModalCloseClickBound);
|
119
|
+
}
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Remove Event Handlers
|
123
|
+
*/
|
124
|
+
|
125
|
+
}, {
|
126
|
+
key: 'removeEventHandlers',
|
127
|
+
value: function removeEventHandlers() {
|
128
|
+
if (Modal._count === 0) {
|
129
|
+
document.removeEventListener('click', this.handleTriggerClick);
|
130
|
+
}
|
131
|
+
this.$overlay[0].removeEventListener('click', this.handleOverlayClickBound);
|
132
|
+
this.$el[0].removeEventListener('click', this.handleModalCloseClickBound);
|
133
|
+
}
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Handle Trigger Click
|
137
|
+
* @param {Event} e
|
138
|
+
*/
|
139
|
+
|
140
|
+
}, {
|
141
|
+
key: 'handleTriggerClick',
|
142
|
+
value: function handleTriggerClick(e) {
|
143
|
+
var $trigger = $(e.target).closest('.modal-trigger');
|
144
|
+
if (e.target && $trigger.length) {
|
145
|
+
var modalId = $trigger[0].getAttribute('href');
|
146
|
+
if (modalId) {
|
147
|
+
modalId = modalId.slice(1);
|
148
|
+
} else {
|
149
|
+
modalId = $trigger[0].getAttribute('data-target');
|
65
150
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
exitVelocityOptions
|
70
|
-
);
|
151
|
+
var modalInstance = document.getElementById(modalId).M_Modal;
|
152
|
+
if (modalInstance) {
|
153
|
+
modalInstance.open($trigger);
|
71
154
|
}
|
72
|
-
|
155
|
+
e.preventDefault();
|
156
|
+
}
|
157
|
+
}
|
73
158
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
$body.css('overflow', 'hidden');
|
78
|
-
$body.width(oldWidth);
|
159
|
+
/**
|
160
|
+
* Handle Overlay Click
|
161
|
+
*/
|
79
162
|
|
80
|
-
|
81
|
-
|
82
|
-
|
163
|
+
}, {
|
164
|
+
key: 'handleOverlayClick',
|
165
|
+
value: function handleOverlayClick() {
|
166
|
+
if (this.options.dismissible) {
|
167
|
+
this.close();
|
168
|
+
}
|
169
|
+
}
|
83
170
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
171
|
+
/**
|
172
|
+
* Handle Modal Close Click
|
173
|
+
* @param {Event} e
|
174
|
+
*/
|
175
|
+
|
176
|
+
}, {
|
177
|
+
key: 'handleModalCloseClick',
|
178
|
+
value: function handleModalCloseClick(e) {
|
179
|
+
if (e.target && e.target.classList.contains('modal-close')) {
|
180
|
+
this.close();
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
184
|
+
/**
|
185
|
+
* Handle Keydown
|
186
|
+
* @param {Event} e
|
187
|
+
*/
|
188
|
+
|
189
|
+
}, {
|
190
|
+
key: 'handleKeydown',
|
191
|
+
value: function handleKeydown(e) {
|
192
|
+
// ESC key
|
193
|
+
if (e.keyCode === 27 && this.options.dismissible) {
|
194
|
+
this.close();
|
195
|
+
}
|
196
|
+
}
|
106
197
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
198
|
+
/**
|
199
|
+
* Animate in modal
|
200
|
+
*/
|
201
|
+
|
202
|
+
}, {
|
203
|
+
key: 'animateIn',
|
204
|
+
value: function animateIn() {
|
205
|
+
var _this = this;
|
206
|
+
|
207
|
+
// Set initial styles
|
208
|
+
$.extend(this.$el[0].style, {
|
209
|
+
display: 'block',
|
210
|
+
opacity: 0
|
211
|
+
});
|
212
|
+
$.extend(this.$overlay[0].style, {
|
213
|
+
display: 'block',
|
214
|
+
opacity: 0
|
215
|
+
});
|
216
|
+
|
217
|
+
// Animate overlay
|
218
|
+
Vel(this.$overlay[0], { opacity: this.options.opacity }, { duration: this.options.inDuration, queue: false, ease: 'easeOutCubic' });
|
219
|
+
|
220
|
+
// Define modal animation options
|
221
|
+
var enterVelocityOptions = {
|
222
|
+
duration: this.options.inDuration,
|
223
|
+
queue: false,
|
224
|
+
ease: 'easeOutCubic',
|
225
|
+
// Handle modal ready callback
|
226
|
+
complete: function () {
|
227
|
+
if (typeof _this.options.ready === 'function') {
|
228
|
+
_this.options.ready.call(_this, _this.$el, _this.openingTrigger);
|
131
229
|
}
|
132
|
-
};
|
133
|
-
if ($modal.hasClass('bottom-sheet')) {
|
134
|
-
$modal.velocity({bottom: "0", opacity: 1}, enterVelocityOptions);
|
135
|
-
}
|
136
|
-
else {
|
137
|
-
$.Velocity.hook($modal, "scaleX", 0.7);
|
138
|
-
$modal.css({ top: options.startingTop });
|
139
|
-
$modal.velocity({top: options.endingTop, opacity: 1, scaleX: '1'}, enterVelocityOptions);
|
140
230
|
}
|
231
|
+
};
|
232
|
+
|
233
|
+
// Bottom sheet animation
|
234
|
+
if (this.$el[0].classList.contains('bottom-sheet')) {
|
235
|
+
Vel(this.$el[0], { bottom: 0, opacity: 1 }, enterVelocityOptions);
|
236
|
+
|
237
|
+
// Normal modal animation
|
238
|
+
} else {
|
239
|
+
Vel.hook(this.$el[0], 'scaleX', 0.7);
|
240
|
+
this.$el[0].style.top = this.options.startingTop;
|
241
|
+
Vel(this.$el[0], { top: this.options.endingTop, opacity: 1, scaleX: 1 }, enterVelocityOptions);
|
242
|
+
}
|
243
|
+
}
|
244
|
+
|
245
|
+
/**
|
246
|
+
* Animate out modal
|
247
|
+
*/
|
248
|
+
|
249
|
+
}, {
|
250
|
+
key: 'animateOut',
|
251
|
+
value: function animateOut() {
|
252
|
+
var _this2 = this;
|
253
|
+
|
254
|
+
// Animate overlay
|
255
|
+
Vel(this.$overlay[0], { opacity: 0 }, { duration: this.options.outDuration, queue: false, ease: 'easeOutQuart' });
|
141
256
|
|
257
|
+
// Define modal animation options
|
258
|
+
var exitVelocityOptions = {
|
259
|
+
duration: this.options.outDuration,
|
260
|
+
queue: false,
|
261
|
+
ease: 'easeOutCubic',
|
262
|
+
// Handle modal ready callback
|
263
|
+
complete: function () {
|
264
|
+
_this2.$el[0].style.display = 'none';
|
265
|
+
// Call complete callback
|
266
|
+
if (typeof _this2.options.complete === 'function') {
|
267
|
+
_this2.options.complete.call(_this2, _this2.$el);
|
268
|
+
}
|
269
|
+
_this2.$overlay[0].remove();
|
270
|
+
}
|
142
271
|
};
|
143
272
|
|
144
|
-
//
|
145
|
-
|
146
|
-
|
147
|
-
$(this).off('closeModal');
|
273
|
+
// Bottom sheet animation
|
274
|
+
if (this.$el[0].classList.contains('bottom-sheet')) {
|
275
|
+
Vel(this.$el[0], { bottom: '-100%', opacity: 0 }, exitVelocityOptions);
|
148
276
|
|
149
|
-
|
150
|
-
|
151
|
-
options.startingTop
|
152
|
-
|
153
|
-
|
154
|
-
|
277
|
+
// Normal modal animation
|
278
|
+
} else {
|
279
|
+
Vel(this.$el[0], { top: this.options.startingTop, opacity: 0, scaleX: 0.7 }, exitVelocityOptions);
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
/**
|
284
|
+
* Open Modal
|
285
|
+
* @param {jQuery} [$trigger]
|
286
|
+
*/
|
287
|
+
|
288
|
+
}, {
|
289
|
+
key: 'open',
|
290
|
+
value: function open($trigger) {
|
291
|
+
if (this.isOpen) {
|
292
|
+
return;
|
293
|
+
}
|
294
|
+
|
295
|
+
this.isOpen = true;
|
296
|
+
var body = document.body;
|
297
|
+
body.style.overflow = 'hidden';
|
298
|
+
this.$el[0].classList.add('open');
|
299
|
+
body.appendChild(this.$overlay[0]);
|
300
|
+
|
301
|
+
// Set opening trigger, undefined indicates modal was opened by javascript
|
302
|
+
this.openingTrigger = !!$trigger ? $trigger : undefined;
|
303
|
+
|
304
|
+
if (this.options.dismissible) {
|
305
|
+
this.handleKeydownBound = this.handleKeydown.bind(this);
|
306
|
+
document.addEventListener('keydown', this.handleKeydownBound);
|
307
|
+
}
|
155
308
|
|
156
|
-
|
157
|
-
|
158
|
-
|
309
|
+
this.animateIn();
|
310
|
+
|
311
|
+
return this;
|
312
|
+
}
|
313
|
+
|
314
|
+
/**
|
315
|
+
* Close Modal
|
316
|
+
*/
|
317
|
+
|
318
|
+
}, {
|
319
|
+
key: 'close',
|
320
|
+
value: function close() {
|
321
|
+
if (!this.isOpen) {
|
322
|
+
return;
|
323
|
+
}
|
324
|
+
|
325
|
+
this.isOpen = false;
|
326
|
+
this.$el[0].classList.remove('open');
|
327
|
+
document.body.style.overflow = null;
|
328
|
+
|
329
|
+
if (this.options.dismissible) {
|
330
|
+
document.removeEventListener('keydown', this.handleKeydownBound);
|
331
|
+
}
|
332
|
+
|
333
|
+
this.animateOut();
|
334
|
+
|
335
|
+
return this;
|
336
|
+
}
|
337
|
+
}], [{
|
338
|
+
key: 'init',
|
339
|
+
value: function init($els, options) {
|
340
|
+
var arr = [];
|
341
|
+
$els.each(function () {
|
342
|
+
arr.push(new Modal($(this), options));
|
159
343
|
});
|
344
|
+
return arr;
|
345
|
+
}
|
346
|
+
}, {
|
347
|
+
key: 'defaults',
|
348
|
+
get: function () {
|
349
|
+
return _defaults;
|
350
|
+
}
|
351
|
+
}]);
|
352
|
+
|
353
|
+
return Modal;
|
354
|
+
}();
|
355
|
+
|
356
|
+
/**
|
357
|
+
* @static
|
358
|
+
* @memberof Modal
|
359
|
+
*/
|
160
360
|
|
161
|
-
|
162
|
-
|
361
|
+
|
362
|
+
Modal._increment = 0;
|
363
|
+
|
364
|
+
/**
|
365
|
+
* @static
|
366
|
+
* @memberof Modal
|
367
|
+
*/
|
368
|
+
Modal._count = 0;
|
369
|
+
|
370
|
+
window.Materialize.Modal = Modal;
|
371
|
+
|
372
|
+
$.fn.modal = function (methodOrOptions) {
|
373
|
+
// Call plugin method if valid method name is passed in
|
374
|
+
if (Modal.prototype[methodOrOptions]) {
|
375
|
+
// Getter methods
|
376
|
+
if (methodOrOptions.slice(0, 3) === 'get') {
|
377
|
+
return this.first()[0].M_Modal[methodOrOptions]();
|
378
|
+
|
379
|
+
// Void methods
|
380
|
+
} else {
|
381
|
+
return this.each(function () {
|
382
|
+
this.M_Modal[methodOrOptions]();
|
163
383
|
});
|
164
|
-
}
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
close : function() {
|
171
|
-
$(this).trigger('closeModal');
|
172
|
-
}
|
173
|
-
};
|
384
|
+
}
|
385
|
+
|
386
|
+
// Initialize plugin if options or no argument is passed in
|
387
|
+
} else if (typeof methodOrOptions === 'object' || !methodOrOptions) {
|
388
|
+
Modal.init(this, arguments[0]);
|
389
|
+
return this;
|
174
390
|
|
175
|
-
|
176
|
-
if ( methods[methodOrOptions] ) {
|
177
|
-
return methods[ methodOrOptions ].apply( this, Array.prototype.slice.call( arguments, 1 ));
|
178
|
-
} else if ( typeof methodOrOptions === 'object' || ! methodOrOptions ) {
|
179
|
-
// Default to "init"
|
180
|
-
return methods.init.apply( this, arguments );
|
391
|
+
// Return error if an unrecognized method name is passed in
|
181
392
|
} else {
|
182
|
-
$.error(
|
393
|
+
$.error('Method ' + methodOrOptions + ' does not exist on jQuery.modal');
|
183
394
|
}
|
184
395
|
};
|
185
396
|
})(jQuery);
|