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