[SensorBall] updated SensorBall sources
authorPiotr Dabrowski <p.dabrowski2@samsung.com>
Thu, 26 Sep 2013 14:12:58 +0000 (16:12 +0200)
committerPiotr Dabrowski <p.dabrowski2@samsung.com>
Thu, 26 Sep 2013 14:12:58 +0000 (16:12 +0200)
Change-Id: I71f931c8ff7536c47a5551cfd3e578635b2c4d82

js/main.js

index afb8f79..df5b632 100644 (file)
@@ -490,20 +490,26 @@ $(document).ready(function () {
        });
 
        $('#btnBall').bind('click', function (event) {
-               $('#sun').remove();
+               preventSecClick(this);
                app.startBall();
        });
 
        $('#btnSky').bind('click', function (event) {
-               $('#sun').remove();
+               preventSecClick(this);
                app.startSky();
        });
 
-       $('#btnSpace').bind('click', function (event) {
-               $('#sun').remove();
+       $('#btnSpace').bind('click', function () {
+               preventSecClick(this);
                app.startSpace();
        });
 
+       function preventSecClick(current) {
+               $('#sun').remove();
+               $("#footerControls li a.ui-disabled").removeClass('ui-disabled');
+               $(current).addClass("ui-disabled");
+       }
+
        $('#mainPage').on('pageshow', function () {
                app.startBall();
        });