semantic-ui-sass 1.12.3.0 → 2.0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/javascripts/semantic-ui.js +1 -0
- data/app/assets/javascripts/semantic-ui/accordion.js +67 -53
- data/app/assets/javascripts/semantic-ui/api.js +395 -189
- data/app/assets/javascripts/semantic-ui/checkbox.js +322 -114
- data/app/assets/javascripts/semantic-ui/colorize.js +4 -2
- data/app/assets/javascripts/semantic-ui/dimmer.js +74 -50
- data/app/assets/javascripts/semantic-ui/dropdown.js +2046 -584
- data/app/assets/javascripts/semantic-ui/embed.js +662 -0
- data/app/assets/javascripts/semantic-ui/form.js +345 -163
- data/app/assets/javascripts/semantic-ui/modal.js +119 -90
- data/app/assets/javascripts/semantic-ui/nag.js +8 -9
- data/app/assets/javascripts/semantic-ui/popup.js +390 -228
- data/app/assets/javascripts/semantic-ui/progress.js +112 -103
- data/app/assets/javascripts/semantic-ui/rating.js +79 -55
- data/app/assets/javascripts/semantic-ui/search.js +305 -123
- data/app/assets/javascripts/semantic-ui/shape.js +94 -48
- data/app/assets/javascripts/semantic-ui/sidebar.js +84 -151
- data/app/assets/javascripts/semantic-ui/site.js +5 -5
- data/app/assets/javascripts/semantic-ui/state.js +4 -4
- data/app/assets/javascripts/semantic-ui/sticky.js +108 -35
- data/app/assets/javascripts/semantic-ui/tab.js +220 -125
- data/app/assets/javascripts/semantic-ui/transition.js +205 -171
- data/app/assets/javascripts/semantic-ui/visibility.js +220 -100
- data/app/assets/javascripts/semantic-ui/visit.js +6 -4
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +17 -16
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +223 -121
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +462 -448
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +949 -665
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +134 -92
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +270 -208
- data/app/assets/stylesheets/semantic-ui/elements/_all.scss +1 -0
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +1357 -521
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +125 -0
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +51 -31
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +270 -144
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +241 -110
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +30 -16
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +88 -53
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +432 -281
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +172 -128
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +16 -14
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +15 -7
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +32 -13
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +329 -212
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +291 -99
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +19 -18
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +17 -18
- data/app/assets/stylesheets/semantic-ui/modules/_all.scss +1 -0
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +265 -161
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +29 -15
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +441 -156
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +168 -0
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +163 -85
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +8 -8
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +88 -23
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +185 -129
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +75 -60
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +99 -52
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +11 -11
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +16 -12
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +4 -4
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +31 -39
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/views/_all.scss +1 -0
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +204 -162
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +6 -6
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +51 -26
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +62 -36
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +265 -90
- data/lib/semantic/ui/sass/version.rb +2 -2
- data/semantic-ui-sass.gemspec +2 -2
- metadata +9 -6
@@ -1,9 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* # Semantic UI
|
2
|
+
* # Semantic UI - Transition
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright
|
6
|
+
* Copyright 2015 Contributors
|
7
7
|
* Released under the MIT license
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
@@ -47,7 +47,6 @@ $.fn.transition = function() {
|
|
47
47
|
error,
|
48
48
|
className,
|
49
49
|
metadata,
|
50
|
-
animationStart,
|
51
50
|
animationEnd,
|
52
51
|
animationName,
|
53
52
|
|
@@ -76,8 +75,6 @@ $.fn.transition = function() {
|
|
76
75
|
|
77
76
|
// get vendor specific events
|
78
77
|
animationEnd = module.get.animationEndEvent();
|
79
|
-
animationName = module.get.animationName();
|
80
|
-
animationStart = module.get.animationStartEvent();
|
81
78
|
|
82
79
|
if(methodInvoked) {
|
83
80
|
methodInvoked = module.invoke(query);
|
@@ -139,15 +136,22 @@ $.fn.transition = function() {
|
|
139
136
|
|
140
137
|
delay: function(interval) {
|
141
138
|
var
|
142
|
-
|
143
|
-
shouldReverse
|
139
|
+
direction = module.get.animationDirection(),
|
140
|
+
shouldReverse,
|
144
141
|
delay
|
145
142
|
;
|
146
|
-
|
143
|
+
if(!direction) {
|
144
|
+
direction = module.can.transition()
|
145
|
+
? module.get.direction()
|
146
|
+
: 'static'
|
147
|
+
;
|
148
|
+
}
|
149
|
+
interval = (interval !== undefined)
|
147
150
|
? interval
|
148
151
|
: settings.interval
|
149
152
|
;
|
150
|
-
|
153
|
+
shouldReverse = (settings.reverse == 'auto' && direction == className.outward);
|
154
|
+
delay = (shouldReverse || settings.reverse == true)
|
151
155
|
? ($allModules.length - index) * settings.interval
|
152
156
|
: index * settings.interval
|
153
157
|
;
|
@@ -178,7 +182,7 @@ $.fn.transition = function() {
|
|
178
182
|
}
|
179
183
|
else {
|
180
184
|
module.debug('New animation started, completing previous early', settings.animation);
|
181
|
-
|
185
|
+
instance.complete();
|
182
186
|
}
|
183
187
|
}
|
184
188
|
if( module.can.animate() ) {
|
@@ -217,21 +221,56 @@ $.fn.transition = function() {
|
|
217
221
|
module.verbose('Animation is outward, hiding element');
|
218
222
|
module.restore.conditions();
|
219
223
|
module.hide();
|
220
|
-
settings.onHide.call(this);
|
221
224
|
}
|
222
225
|
else if( module.is.inward() ) {
|
223
226
|
module.verbose('Animation is outward, showing element');
|
224
227
|
module.restore.conditions();
|
225
228
|
module.show();
|
226
|
-
settings.onShow.call(this);
|
227
229
|
}
|
228
230
|
else {
|
229
231
|
module.restore.conditions();
|
230
232
|
}
|
231
|
-
module.remove.animation();
|
232
|
-
module.remove.animating();
|
233
233
|
}
|
234
|
-
|
234
|
+
},
|
235
|
+
|
236
|
+
force: {
|
237
|
+
visible: function() {
|
238
|
+
var
|
239
|
+
style = $module.attr('style'),
|
240
|
+
userStyle = module.get.userStyle(),
|
241
|
+
displayType = module.get.displayType(),
|
242
|
+
overrideStyle = userStyle + 'display: ' + displayType + ' !important;',
|
243
|
+
currentDisplay = $module.css('display'),
|
244
|
+
emptyStyle = (style === undefined || style === '')
|
245
|
+
;
|
246
|
+
if(currentDisplay !== displayType) {
|
247
|
+
module.verbose('Overriding default display to show element', displayType);
|
248
|
+
$module
|
249
|
+
.attr('style', overrideStyle)
|
250
|
+
;
|
251
|
+
}
|
252
|
+
else if(emptyStyle) {
|
253
|
+
$module.removeAttr('style');
|
254
|
+
}
|
255
|
+
},
|
256
|
+
hidden: function() {
|
257
|
+
var
|
258
|
+
style = $module.attr('style'),
|
259
|
+
currentDisplay = $module.css('display'),
|
260
|
+
emptyStyle = (style === undefined || style === '')
|
261
|
+
;
|
262
|
+
if(currentDisplay !== 'none' && !module.is.hidden()) {
|
263
|
+
module.verbose('Overriding default display to hide element');
|
264
|
+
$module
|
265
|
+
.css('display', 'none')
|
266
|
+
;
|
267
|
+
}
|
268
|
+
else if(emptyStyle) {
|
269
|
+
$module
|
270
|
+
.removeAttr('style')
|
271
|
+
;
|
272
|
+
}
|
273
|
+
}
|
235
274
|
},
|
236
275
|
|
237
276
|
has: {
|
@@ -260,28 +299,28 @@ $.fn.transition = function() {
|
|
260
299
|
|
261
300
|
set: {
|
262
301
|
animating: function(animation) {
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
302
|
+
var
|
303
|
+
animationClass,
|
304
|
+
direction
|
305
|
+
;
|
306
|
+
// remove previous callbacks
|
268
307
|
module.remove.completeCallback();
|
269
|
-
|
270
|
-
|
271
|
-
|
308
|
+
|
309
|
+
// determine exact animation
|
310
|
+
animation = animation || settings.animation;
|
311
|
+
animationClass = module.get.animationClass(animation);
|
312
|
+
|
313
|
+
// save animation class in cache to restore class names
|
314
|
+
module.save.animation(animationClass);
|
315
|
+
|
316
|
+
// override display if necessary so animation appears visibly
|
317
|
+
module.force.visible();
|
318
|
+
|
272
319
|
module.remove.hidden();
|
273
|
-
module.
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
.one(animationEnd + '.complete' + eventNamespace, module.complete)
|
278
|
-
;
|
279
|
-
if(settings.useFailSafe) {
|
280
|
-
module.add.failSafe();
|
281
|
-
}
|
282
|
-
module.set.duration(settings.duration);
|
283
|
-
settings.onStart.call(this);
|
284
|
-
module.debug('Starting tween', animation, $module.attr('class'));
|
320
|
+
module.remove.direction();
|
321
|
+
|
322
|
+
module.start.animation(animationClass);
|
323
|
+
|
285
324
|
},
|
286
325
|
duration: function(animationName, duration) {
|
287
326
|
duration = duration || settings.duration;
|
@@ -293,44 +332,18 @@ $.fn.transition = function() {
|
|
293
332
|
module.verbose('Setting animation duration', duration);
|
294
333
|
$module
|
295
334
|
.css({
|
296
|
-
'-webkit-animation-duration': duration,
|
297
|
-
'-moz-animation-duration': duration,
|
298
|
-
'-ms-animation-duration': duration,
|
299
|
-
'-o-animation-duration': duration,
|
300
335
|
'animation-duration': duration
|
301
336
|
})
|
302
337
|
;
|
303
338
|
}
|
304
339
|
},
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
overrideStyle = style + 'display: ' + displayType + ' !important;'
|
310
|
-
;
|
311
|
-
$module.css('display', '');
|
312
|
-
module.refresh();
|
313
|
-
if( $module.css('display') !== displayType ) {
|
314
|
-
module.verbose('Setting inline visibility to', displayType);
|
315
|
-
$module
|
316
|
-
.attr('style', overrideStyle)
|
317
|
-
;
|
318
|
-
}
|
319
|
-
},
|
320
|
-
direction: function() {
|
321
|
-
if($module.is(':visible') && !module.is.hidden()) {
|
322
|
-
module.debug('Automatically determining the direction of animation', 'Outward');
|
323
|
-
$module
|
324
|
-
.removeClass(className.inward)
|
325
|
-
.addClass(className.outward)
|
326
|
-
;
|
340
|
+
direction: function(direction) {
|
341
|
+
direction = direction || module.get.direction();
|
342
|
+
if(direction == className.inward) {
|
343
|
+
module.set.inward();
|
327
344
|
}
|
328
345
|
else {
|
329
|
-
module.
|
330
|
-
$module
|
331
|
-
.removeClass(className.outward)
|
332
|
-
.addClass(className.inward)
|
333
|
-
;
|
346
|
+
module.set.outward();
|
334
347
|
}
|
335
348
|
},
|
336
349
|
looping: function() {
|
@@ -340,18 +353,24 @@ $.fn.transition = function() {
|
|
340
353
|
;
|
341
354
|
},
|
342
355
|
hidden: function() {
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
356
|
+
$module
|
357
|
+
.addClass(className.transition)
|
358
|
+
.addClass(className.hidden)
|
359
|
+
;
|
360
|
+
},
|
361
|
+
inward: function() {
|
362
|
+
module.debug('Setting direction to inward');
|
363
|
+
$module
|
364
|
+
.removeClass(className.outward)
|
365
|
+
.addClass(className.inward)
|
366
|
+
;
|
367
|
+
},
|
368
|
+
outward: function() {
|
369
|
+
module.debug('Setting direction to outward');
|
370
|
+
$module
|
371
|
+
.removeClass(className.inward)
|
372
|
+
.addClass(className.outward)
|
373
|
+
;
|
355
374
|
},
|
356
375
|
visible: function() {
|
357
376
|
$module
|
@@ -361,49 +380,52 @@ $.fn.transition = function() {
|
|
361
380
|
}
|
362
381
|
},
|
363
382
|
|
383
|
+
start: {
|
384
|
+
animation: function(animationClass) {
|
385
|
+
animationClass = animationClass || module.get.animationClass();
|
386
|
+
module.debug('Starting tween', animationClass);
|
387
|
+
$module
|
388
|
+
.addClass(animationClass)
|
389
|
+
.one(animationEnd + '.complete' + eventNamespace, module.complete)
|
390
|
+
;
|
391
|
+
if(settings.useFailSafe) {
|
392
|
+
module.add.failSafe();
|
393
|
+
}
|
394
|
+
module.set.duration(settings.duration);
|
395
|
+
settings.onStart.call(this);
|
396
|
+
}
|
397
|
+
},
|
398
|
+
|
364
399
|
save: {
|
400
|
+
animation: function(animation) {
|
401
|
+
if(!module.cache) {
|
402
|
+
module.cache = {};
|
403
|
+
}
|
404
|
+
module.cache.animation = animation;
|
405
|
+
},
|
365
406
|
displayType: function(displayType) {
|
366
|
-
|
407
|
+
if(displayType !== 'none') {
|
408
|
+
$module.data(metadata.displayType, displayType);
|
409
|
+
}
|
367
410
|
},
|
368
411
|
transitionExists: function(animation, exists) {
|
369
412
|
$.fn.transition.exists[animation] = exists;
|
370
413
|
module.verbose('Saving existence of transition', animation, exists);
|
371
|
-
},
|
372
|
-
conditions: function() {
|
373
|
-
var
|
374
|
-
clasName = $module.attr('class') || false,
|
375
|
-
style = $module.attr('style') || ''
|
376
|
-
;
|
377
|
-
$module.removeClass(settings.animation);
|
378
|
-
module.remove.direction();
|
379
|
-
module.cache = {
|
380
|
-
className : $module.attr('class'),
|
381
|
-
style : module.get.style()
|
382
|
-
};
|
383
|
-
module.verbose('Saving original attributes', module.cache);
|
384
414
|
}
|
385
415
|
},
|
386
416
|
|
387
417
|
restore: {
|
388
418
|
conditions: function() {
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
if(
|
393
|
-
$module
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
}
|
398
|
-
if(module.cache.style) {
|
399
|
-
module.verbose('Restoring original style attribute', module.cache.style);
|
400
|
-
$module.attr('style', module.cache.style);
|
401
|
-
}
|
402
|
-
else {
|
403
|
-
module.verbose('Clearing style attribute');
|
404
|
-
$module.removeAttr('style');
|
419
|
+
var
|
420
|
+
animation = module.get.currentAnimation()
|
421
|
+
;
|
422
|
+
if(animation) {
|
423
|
+
$module
|
424
|
+
.removeClass(animation)
|
425
|
+
;
|
426
|
+
module.verbose('Removing animation class', module.cache);
|
405
427
|
}
|
406
|
-
module.
|
428
|
+
module.remove.duration();
|
407
429
|
}
|
408
430
|
},
|
409
431
|
|
@@ -413,7 +435,7 @@ $.fn.transition = function() {
|
|
413
435
|
duration = module.get.duration()
|
414
436
|
;
|
415
437
|
module.timer = setTimeout(function() {
|
416
|
-
$module.
|
438
|
+
$module.triggerHandler(animationEnd);
|
417
439
|
}, duration + settings.failSafeDelay);
|
418
440
|
module.verbose('Adding fail safe timer', module.timer);
|
419
441
|
}
|
@@ -423,23 +445,12 @@ $.fn.transition = function() {
|
|
423
445
|
animating: function() {
|
424
446
|
$module.removeClass(className.animating);
|
425
447
|
},
|
426
|
-
animation: function() {
|
427
|
-
$module
|
428
|
-
.css({
|
429
|
-
'-webkit-animation' : '',
|
430
|
-
'-moz-animation' : '',
|
431
|
-
'-ms-animation' : '',
|
432
|
-
'-o-animation' : '',
|
433
|
-
'animation' : ''
|
434
|
-
})
|
435
|
-
;
|
436
|
-
},
|
437
448
|
animationCallbacks: function() {
|
438
449
|
module.remove.queueCallback();
|
439
450
|
module.remove.completeCallback();
|
440
451
|
},
|
441
452
|
queueCallback: function() {
|
442
|
-
$module.off('.queue' + eventNamespace)
|
453
|
+
$module.off('.queue' + eventNamespace);
|
443
454
|
},
|
444
455
|
completeCallback: function() {
|
445
456
|
$module.off('.complete' + eventNamespace);
|
@@ -453,6 +464,11 @@ $.fn.transition = function() {
|
|
453
464
|
.removeClass(className.outward)
|
454
465
|
;
|
455
466
|
},
|
467
|
+
duration: function() {
|
468
|
+
$module
|
469
|
+
.css('animation-duration', '')
|
470
|
+
;
|
471
|
+
},
|
456
472
|
failSafe: function() {
|
457
473
|
module.verbose('Removing fail safe timer', module.timer);
|
458
474
|
if(module.timer) {
|
@@ -523,30 +539,59 @@ $.fn.transition = function() {
|
|
523
539
|
}
|
524
540
|
return $.fn.transition.settings;
|
525
541
|
},
|
526
|
-
|
527
|
-
|
542
|
+
animationClass: function(animation) {
|
543
|
+
var
|
544
|
+
animationClass = animation || settings.animation,
|
545
|
+
directionClass = (module.can.transition() && !module.has.direction())
|
546
|
+
? module.get.direction() + ' '
|
547
|
+
: ''
|
548
|
+
;
|
549
|
+
return className.animating + ' '
|
550
|
+
+ className.transition + ' '
|
551
|
+
+ directionClass
|
552
|
+
+ animationClass
|
553
|
+
;
|
554
|
+
},
|
555
|
+
currentAnimation: function() {
|
556
|
+
return (module.cache && module.cache.animation !== undefined)
|
557
|
+
? module.cache.animation
|
558
|
+
: false
|
559
|
+
;
|
560
|
+
},
|
561
|
+
currentDirection: function() {
|
562
|
+
return module.is.inward()
|
563
|
+
? className.inward
|
564
|
+
: className.outward
|
565
|
+
;
|
566
|
+
},
|
567
|
+
direction: function() {
|
568
|
+
return module.is.hidden() || !module.is.visible()
|
569
|
+
? className.inward
|
570
|
+
: className.outward
|
571
|
+
;
|
572
|
+
},
|
573
|
+
animationDirection: function(animation) {
|
574
|
+
var
|
575
|
+
direction
|
576
|
+
;
|
528
577
|
animation = animation || settings.animation;
|
529
578
|
if(typeof animation === 'string') {
|
530
579
|
animation = animation.split(' ');
|
580
|
+
// search animation name for out/in class
|
531
581
|
$.each(animation, function(index, word){
|
532
582
|
if(word === className.inward) {
|
533
|
-
|
583
|
+
direction = className.inward;
|
534
584
|
}
|
535
585
|
else if(word === className.outward) {
|
536
|
-
|
586
|
+
direction = className.outward;
|
537
587
|
}
|
538
588
|
});
|
539
589
|
}
|
540
|
-
//
|
541
|
-
if(
|
542
|
-
return
|
543
|
-
}
|
544
|
-
if($module.is(':visible') && !module.is.hidden()) {
|
545
|
-
return className.outward;
|
546
|
-
}
|
547
|
-
else {
|
548
|
-
return className.inward;
|
590
|
+
// return found direction
|
591
|
+
if(direction) {
|
592
|
+
return direction;
|
549
593
|
}
|
594
|
+
return false;
|
550
595
|
},
|
551
596
|
duration: function(duration) {
|
552
597
|
duration = duration || settings.duration;
|
@@ -570,33 +615,13 @@ $.fn.transition = function() {
|
|
570
615
|
}
|
571
616
|
return $module.data(metadata.displayType);
|
572
617
|
},
|
573
|
-
|
574
|
-
|
575
|
-
style = $module.attr('style') || ''
|
576
|
-
;
|
618
|
+
userStyle: function(style) {
|
619
|
+
style = style || $module.attr('style') || '';
|
577
620
|
return style.replace(/display.*?;/, '');
|
578
621
|
},
|
579
622
|
transitionExists: function(animation) {
|
580
623
|
return $.fn.transition.exists[animation];
|
581
624
|
},
|
582
|
-
animationName: function() {
|
583
|
-
var
|
584
|
-
element = document.createElement('div'),
|
585
|
-
animations = {
|
586
|
-
'animation' :'animationName',
|
587
|
-
'OAnimation' :'oAnimationName',
|
588
|
-
'MozAnimation' :'mozAnimationName',
|
589
|
-
'WebkitAnimation' :'webkitAnimationName'
|
590
|
-
},
|
591
|
-
animation
|
592
|
-
;
|
593
|
-
for(animation in animations){
|
594
|
-
if( element.style[animation] !== undefined ){
|
595
|
-
return animations[animation];
|
596
|
-
}
|
597
|
-
}
|
598
|
-
return false;
|
599
|
-
},
|
600
625
|
animationStartEvent: function() {
|
601
626
|
var
|
602
627
|
element = document.createElement('div'),
|
@@ -639,10 +664,10 @@ $.fn.transition = function() {
|
|
639
664
|
can: {
|
640
665
|
transition: function(forced) {
|
641
666
|
var
|
642
|
-
elementClass = $module.attr('class'),
|
643
|
-
tagName = $module.prop('tagName'),
|
644
667
|
animation = settings.animation,
|
645
668
|
transitionExists = module.get.transitionExists(animation),
|
669
|
+
elementClass,
|
670
|
+
tagName,
|
646
671
|
$clone,
|
647
672
|
currentAnimation,
|
648
673
|
inAnimation,
|
@@ -651,6 +676,9 @@ $.fn.transition = function() {
|
|
651
676
|
;
|
652
677
|
if( transitionExists === undefined || forced) {
|
653
678
|
module.verbose('Determining whether animation exists');
|
679
|
+
elementClass = $module.attr('class');
|
680
|
+
tagName = $module.prop('tagName');
|
681
|
+
|
654
682
|
$clone = $('<' + tagName + ' />').addClass( elementClass ).insertAfter($module);
|
655
683
|
currentAnimation = $clone
|
656
684
|
.addClass(animation)
|
@@ -658,11 +686,11 @@ $.fn.transition = function() {
|
|
658
686
|
.removeClass(className.outward)
|
659
687
|
.addClass(className.animating)
|
660
688
|
.addClass(className.transition)
|
661
|
-
.css(animationName)
|
689
|
+
.css('animationName')
|
662
690
|
;
|
663
691
|
inAnimation = $clone
|
664
692
|
.addClass(className.inward)
|
665
|
-
.css(animationName)
|
693
|
+
.css('animationName')
|
666
694
|
;
|
667
695
|
displayType = $clone
|
668
696
|
.attr('class', elementClass)
|
@@ -726,7 +754,7 @@ $.fn.transition = function() {
|
|
726
754
|
return $module.css('visibility') === 'hidden';
|
727
755
|
},
|
728
756
|
supported: function() {
|
729
|
-
return(
|
757
|
+
return(animationEnd !== false);
|
730
758
|
}
|
731
759
|
},
|
732
760
|
|
@@ -735,18 +763,24 @@ $.fn.transition = function() {
|
|
735
763
|
if( module.is.animating() ) {
|
736
764
|
module.reset();
|
737
765
|
}
|
766
|
+
element.blur(); // IE will trigger focus change if element is not blurred before hiding
|
738
767
|
module.remove.display();
|
739
768
|
module.remove.visible();
|
740
769
|
module.set.hidden();
|
741
|
-
module.
|
770
|
+
module.force.hidden();
|
771
|
+
settings.onHide.call(this);
|
772
|
+
settings.onComplete.call(this);
|
773
|
+
// module.repaint();
|
742
774
|
},
|
743
775
|
|
744
776
|
show: function(display) {
|
745
777
|
module.verbose('Showing element', display);
|
746
778
|
module.remove.hidden();
|
747
779
|
module.set.visible();
|
748
|
-
module.
|
749
|
-
|
780
|
+
module.force.visible();
|
781
|
+
settings.onShow.call(this);
|
782
|
+
settings.onComplete.call(this);
|
783
|
+
// module.repaint();
|
750
784
|
},
|
751
785
|
|
752
786
|
toggle: function() {
|
@@ -760,18 +794,18 @@ $.fn.transition = function() {
|
|
760
794
|
|
761
795
|
stop: function() {
|
762
796
|
module.debug('Stopping current animation');
|
763
|
-
$module.
|
797
|
+
$module.triggerHandler(animationEnd);
|
764
798
|
},
|
765
799
|
|
766
800
|
stopAll: function() {
|
767
801
|
module.debug('Stopping all animation');
|
768
802
|
module.remove.queueCallback();
|
769
|
-
$module.
|
803
|
+
$module.triggerHandler(animationEnd);
|
770
804
|
},
|
771
805
|
|
772
806
|
clear: {
|
773
807
|
queue: function() {
|
774
|
-
module.debug('Clearing animation queue')
|
808
|
+
module.debug('Clearing animation queue');
|
775
809
|
module.remove.queueCallback();
|
776
810
|
}
|
777
811
|
},
|
@@ -855,7 +889,7 @@ $.fn.transition = function() {
|
|
855
889
|
});
|
856
890
|
}
|
857
891
|
clearTimeout(module.performance.timer);
|
858
|
-
module.performance.timer = setTimeout(module.performance.display,
|
892
|
+
module.performance.timer = setTimeout(module.performance.display, 500);
|
859
893
|
},
|
860
894
|
display: function() {
|
861
895
|
var
|
@@ -969,7 +1003,7 @@ $.fn.transition.settings = {
|
|
969
1003
|
debug : false,
|
970
1004
|
|
971
1005
|
// verbose debug output
|
972
|
-
verbose :
|
1006
|
+
verbose : false,
|
973
1007
|
|
974
1008
|
// performance data output
|
975
1009
|
performance : true,
|
@@ -1026,7 +1060,7 @@ $.fn.transition.settings = {
|
|
1026
1060
|
|
1027
1061
|
// possible errors
|
1028
1062
|
error: {
|
1029
|
-
noAnimation : 'There is no css animation matching the one you specified.',
|
1063
|
+
noAnimation : 'There is no css animation matching the one you specified. Please make sure your css is vendor prefixed, and you have included transition css.',
|
1030
1064
|
repeated : 'That animation is already occurring, cancelling repeated animation',
|
1031
1065
|
method : 'The method you called is not defined',
|
1032
1066
|
support : 'This browser does not support CSS animations'
|