a639dc62924979996791da97e94d6ca2dd0559e3
[platform/framework/web/web-ui-fw.git] / libs / patch / jqm-1.1.0 / 0021-JQM-add-event-blocker-when-load-a-first-page.patch
1 From 90c6c1dae398b40abfd2f9325bd1ed57ecd69178 Mon Sep 17 00:00:00 2001
2 From: Minkyu Kang <mk7.kang@samsung.com>
3 Date: Wed, 26 Sep 2012 14:34:50 +0900
4 Subject: [PATCH] JQM: add event blocker when load a first page
5
6 Change-Id: I4b159977e158cf8358bdd118682b8291e3adb6d8
7 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
8 ---
9  .../jquery-mobile-1.1.0/js/jquery.mobile.init.js   |   13 +++++++++++++
10  .../js/jquery.mobile.navigation.js                 |    4 ++++
11  2 files changed, 17 insertions(+)
12
13 diff --git a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.init.js b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.init.js
14 index 93c03e8..54c4615 100644
15 --- a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.init.js
16 +++ b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.init.js
17 @@ -106,6 +106,18 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.support", "./jquery
18                         $( window ).unbind( "scroll", checkLoaderPosition );
19                 },
20  
21 +               addEventBlocker: function () {
22 +                       $html.addClass( "ui-blocker" );
23 +                       $html.bind( "touchstart touchend vclick mousedown mouseup click", function () {
24 +                               return false;
25 +                       } );
26 +               },
27 +
28 +               removeEventBlocker: function () {
29 +                       $html.removeClass( "ui-blocker" );
30 +                       $html.unbind( "touchstart touchend vclick mousedown mouseup click" );
31 +               },
32 +
33                 // find and enhance the pages in the dom and transition to the first page.
34                 initializePage: function() {
35                         // find present pages
36 @@ -138,6 +150,7 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.support", "./jquery
37  
38                         // cue page loading message
39                         $.mobile.showPageLoadingMsg();
40 +                       $.mobile.addEventBlocker();
41  
42                         //remove initial build class (only present on first pageshow)
43                         hideRenderingClass();
44 diff --git a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.navigation.js b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.navigation.js
45 index f6e11b3..841e8a9 100644
46 --- a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.navigation.js
47 +++ b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.navigation.js
48 @@ -529,6 +529,10 @@ define( [
49  
50                         //trigger pageshow, define prevPage as either fromPage or empty jQuery obj
51                         toPage.data( "page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } );
52 +
53 +                       setTimeout( function () {
54 +                               $.mobile.removeEventBlocker();
55 +                       }, 0 );
56                 });
57  
58                 return promise;
59 -- 
60 1.7.9.5
61