]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 18 Sep 2013 16:50:43 +0000 (16:50 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 18 Sep 2013 16:50:43 +0000 (16:50 +0000)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.support.js

index 17b728a78bd91d14ac70b9ed049db36c80d8dd16..ab86c70763e1f5cab6102571bdf49d93f619f2b2 100644 (file)
@@ -107,7 +107,7 @@ Fluidbook.prototype = {
                this.ready();\r
                $("#main").css('visibility', 'visible');\r
                this.hideLoader(0, true);\r
-               $("#splash").css('opacity', 0).one(this.support.getTransitionEndEvent(), function() {\r
+               $("#splash").css('opacity', 0).one(this.support.getTransitionEndEvent(true), function() {\r
                        $(this).remove();\r
                });\r
        },\r
index 05b7db35d13c44885a0b19f9e16fd0a1cd01e0b0..1c185ac3c0988a875eb2c280d249aa6ce00ef538 100644 (file)
@@ -31,9 +31,14 @@ function FluidbookSupport(fluidbook) {
 }
 
 FluidbookSupport.prototype = {
-       getTransitionEndEvent: function() {
-               fb(this.transitionEndEvent);
-               return this.transitionEndEvent;
+       getTransitionEndEvent: function(all) {
+               if (all == undefined) {
+                       all = false;
+               }
+               if (!all) {
+                       return this.transitionEndEvent;
+               }
+               return "webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd transitionEnd";
        },
        hasNetwork: function() {
                if (navigator.onLine != undefined) {
@@ -75,27 +80,26 @@ FluidbookSupport.prototype = {
                        $(window).resize(function() {
                                resize();
                        });
-                       return;
-               }
+               } else {
 
-               if ("onorientationchange" in window) {
-                       window.addEventListener('orientationchange', function() {
-                               if ($this.iOS) {
-                                       resize();
-                               } else {
-                                       resize();
-                                       setTimeout(function() {
+                       if ("onorientationchange" in window) {
+                               window.addEventListener('orientationchange', function() {
+                                       if ($this.iOS) {
                                                resize();
-                                       }, 750);
-                               }
-                       }, false);
-               } else {
-                       setInterval(function() {
-                               $this.checkOrientation();
-                       }, 100);
+                                       } else {
+                                               resize();
+                                               setTimeout(function() {
+                                                       resize();
+                                               }, 750);
+                                       }
+                               }, false);
+                       } else {
+                               setInterval(function() {
+                                       $this.checkOrientation();
+                               }, 100);
+                       }
                }
 
-
                // Test transition end event
                var div = document.createElement('div');
                div.id = "my-transition-test";
@@ -111,6 +115,7 @@ FluidbookSupport.prototype = {
                $('#my-transition-test').one("webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd transitionEnd", function(e) {
                        if ($this.transitionEndEvent !== e.type) {
                                $this.transitionEndEvent = e.type;
+                               fb($this.transitionEndEvent);
                        }
                        window.document.body.removeChild(div);
                });