~johnsca/charms/trusty/cloudfoundry/better-basic-reconciler-status

« back to all changes in this revision

Viewing changes to reconciler/ui/static/semantic/uncompressed/modules/transition.js

  • Committer: Whit Morriss
  • Date: 2014-10-13 06:50:17 UTC
  • mto: (132.2.1 reconciler) (145.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 156.
  • Revision ID: whit.morriss@canonical.com-20141013065017-0feo2ku3yllymkol
reorg reconciler

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * # Semantic - Transition
 
3
 * http://github.com/jlukic/semantic-ui/
 
4
 *
 
5
 *
 
6
 * Copyright 2014 Contributors
 
7
 * Released under the MIT license
 
8
 * http://opensource.org/licenses/MIT
 
9
 *
 
10
 */
 
11
 
 
12
;(function ( $, window, document, undefined ) {
 
13
 
 
14
$.fn.transition = function() {
 
15
  var
 
16
    $allModules     = $(this),
 
17
    moduleSelector  = $allModules.selector || '',
 
18
 
 
19
    time            = new Date().getTime(),
 
20
    performance     = [],
 
21
 
 
22
    moduleArguments = arguments,
 
23
    query           = moduleArguments[0],
 
24
    queryArguments  = [].slice.call(arguments, 1),
 
25
    methodInvoked   = (typeof query === 'string'),
 
26
 
 
27
    requestAnimationFrame = window.requestAnimationFrame
 
28
      || window.mozRequestAnimationFrame
 
29
      || window.webkitRequestAnimationFrame
 
30
      || window.msRequestAnimationFrame
 
31
      || function(callback) { setTimeout(callback, 0); },
 
32
 
 
33
    returnedValue
 
34
  ;
 
35
  $allModules
 
36
    .each(function() {
 
37
      var
 
38
        $module  = $(this),
 
39
        element  = this,
 
40
 
 
41
        // set at run time
 
42
        settings,
 
43
        instance,
 
44
 
 
45
        error,
 
46
        className,
 
47
        metadata,
 
48
        animationEnd,
 
49
        animationName,
 
50
 
 
51
        namespace,
 
52
        moduleNamespace,
 
53
        module
 
54
      ;
 
55
 
 
56
      module = {
 
57
 
 
58
        initialize: function() {
 
59
          // get settings
 
60
          settings        = module.get.settings.apply(element, moduleArguments);
 
61
          module.verbose('Converted arguments into settings object', settings);
 
62
 
 
63
          // set shortcuts
 
64
          error           = settings.error;
 
65
          className       = settings.className;
 
66
          namespace       = settings.namespace;
 
67
          metadata        = settings.metadata;
 
68
          moduleNamespace = 'module-' + namespace;
 
69
 
 
70
          animationEnd    = module.get.animationEvent();
 
71
          animationName   = module.get.animationName();
 
72
 
 
73
          instance        = $module.data(moduleNamespace) || module;
 
74
 
 
75
          if(methodInvoked) {
 
76
            methodInvoked = module.invoke(query);
 
77
          }
 
78
          // no internal method was found matching query or query not made
 
79
          if(methodInvoked === false) {
 
80
            module.animate();
 
81
          }
 
82
          module.instantiate();
 
83
        },
 
84
 
 
85
        instantiate: function() {
 
86
          module.verbose('Storing instance of module', module);
 
87
          $module
 
88
            .data(moduleNamespace, instance)
 
89
          ;
 
90
        },
 
91
 
 
92
        destroy: function() {
 
93
          module.verbose('Destroying previous module for', element);
 
94
          $module
 
95
            .removeData(moduleNamespace)
 
96
          ;
 
97
        },
 
98
 
 
99
        refresh: function() {
 
100
          module.verbose('Refreshing display type on next animation');
 
101
          delete instance.displayType;
 
102
        },
 
103
 
 
104
        forceRepaint: function() {
 
105
          module.verbose('Forcing element repaint');
 
106
          var
 
107
            $parentElement = $module.parent(),
 
108
            $nextElement = $module.next()
 
109
          ;
 
110
          if($nextElement.size() === 0) {
 
111
            $module.detach().appendTo($parentElement);
 
112
          }
 
113
          else {
 
114
            $module.detach().insertBefore($nextElement);
 
115
          }
 
116
        },
 
117
 
 
118
        repaint: function() {
 
119
          module.verbose('Repainting element');
 
120
          var
 
121
            fakeAssignment = element.offsetWidth
 
122
          ;
 
123
        },
 
124
 
 
125
        animate: function(overrideSettings) {
 
126
          settings = overrideSettings || settings;
 
127
          if(!module.is.supported()) {
 
128
            module.error(error.support);
 
129
            return false;
 
130
          }
 
131
          module.debug('Preparing animation', settings.animation);
 
132
          if(module.is.animating() && settings.queue) {
 
133
            if(!settings.allowRepeats && module.has.direction() && module.is.occuring() && instance.queuing !== true) {
 
134
              module.error(error.repeated);
 
135
            }
 
136
            else {
 
137
              module.queue(settings.animation);
 
138
            }
 
139
            return false;
 
140
          }
 
141
          if(module.can.animate) {
 
142
            module.set.animating(settings.animation);
 
143
          }
 
144
          else {
 
145
            module.error(error.noAnimation, settings.animation);
 
146
          }
 
147
        },
 
148
 
 
149
        reset: function() {
 
150
          module.debug('Resetting animation to beginning conditions');
 
151
          $module.off(animationEnd);
 
152
          module.restore.conditions();
 
153
          module.hide();
 
154
          module.remove.animating();
 
155
        },
 
156
 
 
157
        queue: function(animation) {
 
158
          module.debug('Queueing animation of', animation);
 
159
          instance.queuing = true;
 
160
          $module
 
161
            .one(animationEnd, function() {
 
162
              instance.queuing = false;
 
163
              module.repaint();
 
164
              module.animate.apply(this, settings);
 
165
            })
 
166
          ;
 
167
        },
 
168
 
 
169
        complete: function () {
 
170
          module.verbose('CSS animation complete', settings.animation);
 
171
          if(!module.is.looping()) {
 
172
            if( module.is.outward() ) {
 
173
              module.verbose('Animation is outward, hiding element');
 
174
              module.restore.conditions();
 
175
              module.remove.display();
 
176
              module.hide();
 
177
              $.proxy(settings.onHide, this)();
 
178
            }
 
179
            else if( module.is.inward() ) {
 
180
              module.verbose('Animation is outward, showing element');
 
181
              module.restore.conditions();
 
182
              module.show();
 
183
              $.proxy(settings.onShow, this)();
 
184
            }
 
185
            else {
 
186
              module.restore.conditions();
 
187
            }
 
188
            module.remove.duration();
 
189
            module.remove.animating();
 
190
          }
 
191
          $.proxy(settings.complete, this)();
 
192
        },
 
193
 
 
194
        has: {
 
195
          direction: function(animation) {
 
196
            animation = animation || settings.animation;
 
197
            if( animation.search(className.inward) !== -1 || animation.search(className.outward) !== -1) {
 
198
              module.debug('Direction already set in animation');
 
199
              return true;
 
200
            }
 
201
            return false;
 
202
          }
 
203
        },
 
204
 
 
205
        set: {
 
206
 
 
207
          animating: function(animation) {
 
208
            animation = animation || settings.animation;
 
209
            module.save.conditions();
 
210
            if(module.can.transition() && !module.has.direction()) {
 
211
              module.set.direction();
 
212
            }
 
213
            module.remove.hidden();
 
214
            module.set.display();
 
215
            $module
 
216
              .addClass(className.animating)
 
217
              .addClass(className.transition)
 
218
              .addClass(animation)
 
219
              .one(animationEnd, module.complete)
 
220
            ;
 
221
            module.set.duration(settings.duration);
 
222
            module.debug('Starting tween', settings.animation, $module.attr('class'));
 
223
          },
 
224
 
 
225
          display: function() {
 
226
            var
 
227
              displayType = module.get.displayType()
 
228
            ;
 
229
            if(displayType !== 'block' && displayType !== 'none') {
 
230
              module.verbose('Setting final visibility to', displayType);
 
231
              $module
 
232
                .css({
 
233
                  display: displayType
 
234
                })
 
235
              ;
 
236
            }
 
237
          },
 
238
 
 
239
          direction: function() {
 
240
            if($module.is(':visible')) {
 
241
              module.debug('Automatically determining the direction of animation', 'Outward');
 
242
              $module
 
243
                .removeClass(className.inward)
 
244
                .addClass(className.outward)
 
245
              ;
 
246
            }
 
247
            else {
 
248
              module.debug('Automatically determining the direction of animation', 'Inward');
 
249
              $module
 
250
                .removeClass(className.outward)
 
251
                .addClass(className.inward)
 
252
              ;
 
253
            }
 
254
          },
 
255
 
 
256
          looping: function() {
 
257
            module.debug('Transition set to loop');
 
258
            $module
 
259
              .addClass(className.looping)
 
260
            ;
 
261
          },
 
262
 
 
263
          duration: function(duration) {
 
264
            duration = duration || settings.duration;
 
265
            duration = (typeof duration == 'number')
 
266
              ? duration + 'ms'
 
267
              : duration
 
268
            ;
 
269
            module.verbose('Setting animation duration', duration);
 
270
            $module
 
271
              .css({
 
272
                '-webkit-animation-duration': duration,
 
273
                '-moz-animation-duration': duration,
 
274
                '-ms-animation-duration': duration,
 
275
                '-o-animation-duration': duration,
 
276
                'animation-duration': duration
 
277
              })
 
278
            ;
 
279
          },
 
280
 
 
281
          hidden: function() {
 
282
            $module
 
283
              .addClass(className.transition)
 
284
              .addClass(className.hidden)
 
285
            ;
 
286
          },
 
287
 
 
288
          visible: function() {
 
289
            $module
 
290
              .addClass(className.transition)
 
291
              .addClass(className.visible)
 
292
            ;
 
293
          }
 
294
        },
 
295
 
 
296
        save: {
 
297
          displayType: function(displayType) {
 
298
            instance.displayType = displayType;
 
299
          },
 
300
          transitionExists: function(animation, exists) {
 
301
            $.fn.transition.exists[animation] = exists;
 
302
            module.verbose('Saving existence of transition', animation, exists);
 
303
          },
 
304
          conditions: function() {
 
305
            instance.cache = {
 
306
              className : $module.attr('class'),
 
307
              style     : $module.attr('style')
 
308
            };
 
309
            module.verbose('Saving original attributes', instance.cache);
 
310
          }
 
311
        },
 
312
 
 
313
        restore: {
 
314
          conditions: function() {
 
315
            if(instance.cache === undefined) {
 
316
              return false;
 
317
            }
 
318
            if(instance.cache.className) {
 
319
              $module.attr('class', instance.cache.className);
 
320
            }
 
321
            else {
 
322
              $module.removeAttr('class');
 
323
            }
 
324
            if(instance.cache.style) {
 
325
              $module.attr('style', instance.cache.style);
 
326
            }
 
327
            else {
 
328
              if(module.get.displayType() === 'block') {
 
329
                $module.removeAttr('style');
 
330
              }
 
331
            }
 
332
            if(module.is.looping()) {
 
333
              module.remove.looping();
 
334
            }
 
335
            module.verbose('Restoring original attributes', instance.cache);
 
336
          }
 
337
        },
 
338
 
 
339
        remove: {
 
340
 
 
341
          animating: function() {
 
342
            $module.removeClass(className.animating);
 
343
          },
 
344
 
 
345
          display: function() {
 
346
            if(instance.displayType !== undefined) {
 
347
              $module.css('display', '');
 
348
            }
 
349
          },
 
350
 
 
351
          duration: function() {
 
352
            $module
 
353
              .css({
 
354
                '-webkit-animation-duration' : '',
 
355
                '-moz-animation-duration'    : '',
 
356
                '-ms-animation-duration'     : '',
 
357
                '-o-animation-duration'      : '',
 
358
                'animation-duration'         : ''
 
359
              })
 
360
            ;
 
361
          },
 
362
 
 
363
          hidden: function() {
 
364
            $module.removeClass(className.hidden);
 
365
          },
 
366
 
 
367
          visible: function() {
 
368
            $module.removeClass(className.visible);
 
369
          },
 
370
 
 
371
          looping: function() {
 
372
            module.debug('Transitions are no longer looping');
 
373
            $module
 
374
              .removeClass(className.looping)
 
375
            ;
 
376
            module.forceRepaint();
 
377
          }
 
378
 
 
379
        },
 
380
 
 
381
        get: {
 
382
 
 
383
          settings: function(animation, duration, complete) {
 
384
            // single settings object
 
385
            if(typeof animation == 'object') {
 
386
              return $.extend(true, {}, $.fn.transition.settings, animation);
 
387
            }
 
388
            // all arguments provided
 
389
            else if(typeof complete == 'function') {
 
390
              return $.extend({}, $.fn.transition.settings, {
 
391
                animation : animation,
 
392
                complete  : complete,
 
393
                duration  : duration
 
394
              });
 
395
            }
 
396
            // only duration provided
 
397
            else if(typeof duration == 'string' || typeof duration == 'number') {
 
398
              return $.extend({}, $.fn.transition.settings, {
 
399
                animation : animation,
 
400
                duration  : duration
 
401
              });
 
402
            }
 
403
            // duration is actually settings object
 
404
            else if(typeof duration == 'object') {
 
405
              return $.extend({}, $.fn.transition.settings, duration, {
 
406
                animation : animation
 
407
              });
 
408
            }
 
409
            // duration is actually callback
 
410
            else if(typeof duration == 'function') {
 
411
              return $.extend({}, $.fn.transition.settings, {
 
412
                animation : animation,
 
413
                complete  : duration
 
414
              });
 
415
            }
 
416
            // only animation provided
 
417
            else {
 
418
              return $.extend({}, $.fn.transition.settings, {
 
419
                animation : animation
 
420
              });
 
421
            }
 
422
            return $.fn.transition.settings;
 
423
          },
 
424
 
 
425
          displayType: function() {
 
426
            if(instance.displayType === undefined) {
 
427
              // create fake element to determine display state
 
428
              module.can.transition();
 
429
            }
 
430
            return instance.displayType;
 
431
          },
 
432
 
 
433
          transitionExists: function(animation) {
 
434
            return $.fn.transition.exists[animation];
 
435
          },
 
436
 
 
437
          animationName: function() {
 
438
            var
 
439
              element     = document.createElement('div'),
 
440
              animations  = {
 
441
                'animation'       :'animationName',
 
442
                'OAnimation'      :'oAnimationName',
 
443
                'MozAnimation'    :'mozAnimationName',
 
444
                'WebkitAnimation' :'webkitAnimationName'
 
445
              },
 
446
              animation
 
447
            ;
 
448
            for(animation in animations){
 
449
              if( element.style[animation] !== undefined ){
 
450
                module.verbose('Determined animation vendor name property', animations[animation]);
 
451
                return animations[animation];
 
452
              }
 
453
            }
 
454
            return false;
 
455
          },
 
456
 
 
457
          animationEvent: function() {
 
458
            var
 
459
              element     = document.createElement('div'),
 
460
              animations  = {
 
461
                'animation'       :'animationend',
 
462
                'OAnimation'      :'oAnimationEnd',
 
463
                'MozAnimation'    :'animationend',
 
464
                'WebkitAnimation' :'webkitAnimationEnd'
 
465
              },
 
466
              animation
 
467
            ;
 
468
            for(animation in animations){
 
469
              if( element.style[animation] !== undefined ){
 
470
                module.verbose('Determined animation vendor end event', animations[animation]);
 
471
                return animations[animation];
 
472
              }
 
473
            }
 
474
            return false;
 
475
          }
 
476
 
 
477
        },
 
478
 
 
479
        can: {
 
480
          animate: function() {
 
481
            if($module.css(settings.animation) !== 'none') {
 
482
              module.debug('CSS definition found',  $module.css(settings.animation));
 
483
              return true;
 
484
            }
 
485
            else {
 
486
              module.debug('Unable to find css definition', $module.attr('class'));
 
487
              return false;
 
488
            }
 
489
          },
 
490
          transition: function() {
 
491
            var
 
492
              elementClass     = $module.attr('class'),
 
493
              animation        = settings.animation,
 
494
              transitionExists = module.get.transitionExists(settings.animation),
 
495
              $clone,
 
496
              currentAnimation,
 
497
              inAnimation,
 
498
              displayType
 
499
            ;
 
500
            if( transitionExists === undefined || instance.displayType === undefined) {
 
501
              module.verbose('Determining whether animation exists');
 
502
              $clone = $('<div>').addClass( elementClass ).appendTo($('body'));
 
503
              currentAnimation = $clone
 
504
                .removeClass(className.inward)
 
505
                .removeClass(className.outward)
 
506
                .addClass(className.animating)
 
507
                .addClass(className.transition)
 
508
                .addClass(animation)
 
509
                .css(animationName)
 
510
              ;
 
511
              inAnimation = $clone
 
512
                .addClass(className.inward)
 
513
                .css(animationName)
 
514
              ;
 
515
              displayType = $clone
 
516
                .attr('class', elementClass)
 
517
                .show()
 
518
                .css('display')
 
519
              ;
 
520
              module.verbose('Determining final display state', displayType);
 
521
              if(currentAnimation != inAnimation) {
 
522
                module.debug('Transition exists for animation', animation);
 
523
                transitionExists = true;
 
524
              }
 
525
              else {
 
526
                module.debug('Static animation found', animation, displayType);
 
527
                transitionExists = false;
 
528
              }
 
529
              $clone.remove();
 
530
              module.save.displayType(displayType);
 
531
              module.save.transitionExists(animation, transitionExists);
 
532
            }
 
533
            return transitionExists;
 
534
          }
 
535
        },
 
536
 
 
537
        is: {
 
538
          animating: function() {
 
539
            return $module.hasClass(className.animating);
 
540
          },
 
541
          inward: function() {
 
542
            return $module.hasClass(className.inward);
 
543
          },
 
544
          outward: function() {
 
545
            return $module.hasClass(className.outward);
 
546
          },
 
547
          looping: function() {
 
548
            return $module.hasClass(className.looping);
 
549
          },
 
550
          occuring: function(animation) {
 
551
            animation = animation || settings.animation;
 
552
            return ( $module.hasClass(animation) );
 
553
          },
 
554
          visible: function() {
 
555
            return $module.is(':visible');
 
556
          },
 
557
          supported: function() {
 
558
            return(animationName !== false && animationEnd !== false);
 
559
          }
 
560
        },
 
561
 
 
562
        hide: function() {
 
563
          module.verbose('Hiding element');
 
564
          module.remove.visible();
 
565
          module.set.hidden();
 
566
          module.repaint();
 
567
        },
 
568
 
 
569
        show: function(display) {
 
570
          module.verbose('Showing element', display);
 
571
          module.remove.hidden();
 
572
          module.set.visible();
 
573
          module.repaint();
 
574
        },
 
575
 
 
576
        start: function() {
 
577
          module.verbose('Starting animation');
 
578
          $module.removeClass(className.disabled);
 
579
        },
 
580
 
 
581
        stop: function() {
 
582
          module.debug('Stopping animation');
 
583
          $module.addClass(className.disabled);
 
584
        },
 
585
 
 
586
        toggle: function() {
 
587
          module.debug('Toggling play status');
 
588
          $module.toggleClass(className.disabled);
 
589
        },
 
590
 
 
591
        setting: function(name, value) {
 
592
          if( $.isPlainObject(name) ) {
 
593
            $.extend(true, settings, name);
 
594
          }
 
595
          else if(value !== undefined) {
 
596
            settings[name] = value;
 
597
          }
 
598
          else {
 
599
            return settings[name];
 
600
          }
 
601
        },
 
602
        internal: function(name, value) {
 
603
          if( $.isPlainObject(name) ) {
 
604
            $.extend(true, module, name);
 
605
          }
 
606
          else if(value !== undefined) {
 
607
            module[name] = value;
 
608
          }
 
609
          else {
 
610
            return module[name];
 
611
          }
 
612
        },
 
613
        debug: function() {
 
614
          if(settings.debug) {
 
615
            if(settings.performance) {
 
616
              module.performance.log(arguments);
 
617
            }
 
618
            else {
 
619
              module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
 
620
              module.debug.apply(console, arguments);
 
621
            }
 
622
          }
 
623
        },
 
624
        verbose: function() {
 
625
          if(settings.verbose && settings.debug) {
 
626
            if(settings.performance) {
 
627
              module.performance.log(arguments);
 
628
            }
 
629
            else {
 
630
              module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
 
631
              module.verbose.apply(console, arguments);
 
632
            }
 
633
          }
 
634
        },
 
635
        error: function() {
 
636
          module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
 
637
          module.error.apply(console, arguments);
 
638
        },
 
639
        performance: {
 
640
          log: function(message) {
 
641
            var
 
642
              currentTime,
 
643
              executionTime,
 
644
              previousTime
 
645
            ;
 
646
            if(settings.performance) {
 
647
              currentTime   = new Date().getTime();
 
648
              previousTime  = time || currentTime;
 
649
              executionTime = currentTime - previousTime;
 
650
              time          = currentTime;
 
651
              performance.push({
 
652
                'Element'        : element,
 
653
                'Name'           : message[0],
 
654
                'Arguments'      : [].slice.call(message, 1) || '',
 
655
                'Execution Time' : executionTime
 
656
              });
 
657
            }
 
658
            clearTimeout(module.performance.timer);
 
659
            module.performance.timer = setTimeout(module.performance.display, 100);
 
660
          },
 
661
          display: function() {
 
662
            var
 
663
              title = settings.name + ':',
 
664
              totalTime = 0
 
665
            ;
 
666
            time = false;
 
667
            clearTimeout(module.performance.timer);
 
668
            $.each(performance, function(index, data) {
 
669
              totalTime += data['Execution Time'];
 
670
            });
 
671
            title += ' ' + totalTime + 'ms';
 
672
            if(moduleSelector) {
 
673
              title += ' \'' + moduleSelector + '\'';
 
674
            }
 
675
            if($allModules.size() > 1) {
 
676
              title += ' ' + '(' + $allModules.size() + ')';
 
677
            }
 
678
            if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
 
679
              console.groupCollapsed(title);
 
680
              if(console.table) {
 
681
                console.table(performance);
 
682
              }
 
683
              else {
 
684
                $.each(performance, function(index, data) {
 
685
                  console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
 
686
                });
 
687
              }
 
688
              console.groupEnd();
 
689
            }
 
690
            performance = [];
 
691
          }
 
692
        },
 
693
        invoke: function(query, passedArguments, context) {
 
694
          var
 
695
            object = instance,
 
696
            maxDepth,
 
697
            found,
 
698
            response
 
699
          ;
 
700
          passedArguments = passedArguments || queryArguments;
 
701
          context         = element         || context;
 
702
          if(typeof query == 'string' && object !== undefined) {
 
703
            query    = query.split(/[\. ]/);
 
704
            maxDepth = query.length - 1;
 
705
            $.each(query, function(depth, value) {
 
706
              var camelCaseValue = (depth != maxDepth)
 
707
                ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
 
708
                : query
 
709
              ;
 
710
              if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
 
711
                object = object[camelCaseValue];
 
712
              }
 
713
              else if( object[camelCaseValue] !== undefined ) {
 
714
                found = object[camelCaseValue];
 
715
                return false;
 
716
              }
 
717
              else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
 
718
                object = object[value];
 
719
              }
 
720
              else if( object[value] !== undefined ) {
 
721
                found = object[value];
 
722
                return false;
 
723
              }
 
724
              else {
 
725
                return false;
 
726
              }
 
727
            });
 
728
          }
 
729
          if ( $.isFunction( found ) ) {
 
730
            response = found.apply(context, passedArguments);
 
731
          }
 
732
          else if(found !== undefined) {
 
733
            response = found;
 
734
          }
 
735
          if($.isArray(returnedValue)) {
 
736
            returnedValue.push(response);
 
737
          }
 
738
          else if(returnedValue !== undefined) {
 
739
            returnedValue = [returnedValue, response];
 
740
          }
 
741
          else if(response !== undefined) {
 
742
            returnedValue = response;
 
743
          }
 
744
          return found || false;
 
745
        }
 
746
      };
 
747
      module.initialize();
 
748
    })
 
749
  ;
 
750
  return (returnedValue !== undefined)
 
751
    ? returnedValue
 
752
    : this
 
753
  ;
 
754
};
 
755
 
 
756
$.fn.transition.exists = {};
 
757
 
 
758
$.fn.transition.settings = {
 
759
 
 
760
  // module info
 
761
  name        : 'Transition',
 
762
 
 
763
  // debug content outputted to console
 
764
  debug       : false,
 
765
 
 
766
  // verbose debug output
 
767
  verbose     : true,
 
768
 
 
769
  // performance data output
 
770
  performance : true,
 
771
 
 
772
  // event namespace
 
773
  namespace   : 'transition',
 
774
 
 
775
  // animation complete event
 
776
  complete    : function() {},
 
777
  onShow      : function() {},
 
778
  onHide      : function() {},
 
779
 
 
780
  // whether animation can occur twice in a row
 
781
  allowRepeats : false,
 
782
 
 
783
  // animation duration
 
784
  animation  : 'fade',
 
785
  duration   : '700ms',
 
786
 
 
787
  // new animations will occur after previous ones
 
788
  queue       : true,
 
789
 
 
790
  className   : {
 
791
    animating  : 'animating',
 
792
    disabled   : 'disabled',
 
793
    hidden     : 'hidden',
 
794
    inward     : 'in',
 
795
    loading    : 'loading',
 
796
    looping    : 'looping',
 
797
    outward    : 'out',
 
798
    transition : 'ui transition',
 
799
    visible    : 'visible'
 
800
  },
 
801
 
 
802
  // possible errors
 
803
  error: {
 
804
    noAnimation : 'There is no css animation matching the one you specified.',
 
805
    repeated    : 'That animation is already occurring, cancelling repeated animation',
 
806
    method      : 'The method you called is not defined',
 
807
    support     : 'This browser does not support CSS animations'
 
808
  }
 
809
 
 
810
};
 
811
 
 
812
 
 
813
})( jQuery, window , document );