Add support to disable/enable Homescreen animation 89/33289/1 accepted/tizen_3.0_ivi accepted/tizen_ivi tizen tizen_3.0_ivi accepted/tizen/ivi/20150114.045510 submit/tizen_ivi/20150114.001044 tizen_3.0_ivi_release
authorJimmy Huang <jimmy.huang@intel.com>
Wed, 7 Jan 2015 23:52:18 +0000 (15:52 -0800)
committerJimmy Huang <jimmy.huang@intel.com>
Wed, 7 Jan 2015 23:53:26 +0000 (15:53 -0800)
Change-Id: If3b590a98e69fc1af624e2f90a333077ea6e5103
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
css/style.css
js/main.js
packaging/modello-homescreen.changes

index f14a161..a037eea 100644 (file)
     -webkit-animation-duration: 10s;
     -webkit-animation-delay: 0s;
     -webkit-animation-timing-function: linear;
-    -webkit-animation-iteration-count: 1;/*infinite;*/
+    -webkit-animation-iteration-count: infinite;
+    -webkit-animation-play-state: paused;
 }
 
 .rollLeft {
     -webkit-animation-duration: 10s;
     -webkit-animation-delay: 0s;
     -webkit-animation-timing-function: linear;
-    -webkit-animation-iteration-count: 1;/*infinite;*/
+    -webkit-animation-iteration-count: infinite;
+    -webkit-animation-play-state: paused;
 }
 
 .liveBg {
     -webkit-animation-duration: 7s;
     -webkit-animation-delay: 0s;
     -webkit-animation-timing-function: ease-out;
-    -webkit-animation-iteration-count: 1;
+    -webkit-animation-iteration-count: infinite;
     -webkit-transition: opacity 500ms ease-out;
+    -webkit-animation-play-state: paused;
 }
 
 @-webkit-keyframes rotateR {
index b058062..90515db 100644 (file)
@@ -84,27 +84,26 @@ var init = function() {
 
     });
 
+    var checkAnimationConfig = function() {
+        var animation = Configuration.get("animationEnabled");
+        if (animation === undefined || animation) {
+            $(".rollRight").css("-webkit-animation-play-state", "running");
+            $(".rollLeft").css("-webkit-animation-play-state", "running");
+            $(".liveBg").css("-webkit-animation-play-state", "running");
+        } else {
+            $(".rollRight").css("-webkit-animation-play-state", "paused");
+            $(".rollLeft").css("-webkit-animation-play-state", "paused");
+            $(".liveBg").css("-webkit-animation-play-state", "paused");
+        }
+    };
+
     /* fixed webkit animation bugs */
     window.setTimeout(function() {
-        window.setInterval(function() {
-            $("#innerRing").removeClass("rollLeft");
-            $("#outerRing").removeClass("rollRight");
-            window.setTimeout(function() {
-                $("#innerRing").addClass("rollLeft");
-                $("#outerRing").addClass("rollRight");
-            }, 50);
-
-        }, 10000);
-   }, 1000);
-    window.setTimeout(function() {
-        window.setInterval(function() {
-          $('#wrapper .step9').removeClass('liveBg');
-            window.setTimeout(function() {
-                $('#wrapper .step9').addClass('liveBg');
-            }, 50);
-
-        }, 7000);
-    }, 500);
+        checkAnimationConfig();
+        Configuration.addUpdateListener(function() {
+            checkAnimationConfig();
+        });
+    }, 1000);
     /* end fixed webkit animation bugs */
 };
 
index bb41073..815076d 100644 (file)
@@ -1,3 +1,6 @@
+* Wed Jan 07 2015 Jimmy Huang <jimmy.huang@intel.com> accepted/tizen/ivi/20141112.110519-1-g9a41e9e
+- Add support to disable/enable Homescreen animation
+
 * Tue Oct 07 2014 Brian Jones <brian.j.jones@intel.com> submit/tizen_ivi/20141007.175535-1-g0b3ff06
 - Fix systemd install path on 64-bit architecture
 - use systemd macro for path.