Popup: reverse orientation bug has been fixed
[platform/framework/web/web-ui-fw.git] / libs / patch / 0010-JQM-Applied-Tizen-Button-Style.patch
1 From 189014d78087fa36d63f399a0fb756b61252a4dc Mon Sep 17 00:00:00 2001
2 From: "hjnim.kim" <hjnim.kim@samsung.com>
3 Date: Mon, 26 Nov 2012 20:22:14 +0900
4 Subject: [PATCH] JQM: Applied Tizen Button Style
5
6 Signed-off-by: hjnim.kim <hjnim.kim@samsung.com>
7 ---
8  .../js/jquery.mobile.buttonMarkup.js               |   56 ++++++++++++++++++++
9  1 files changed, 56 insertions(+), 0 deletions(-)
10
11 diff --git a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js
12 index 3d7d884..0be6999 100644
13 --- a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js
14 +++ b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.buttonMarkup.js
15 @@ -80,6 +80,62 @@ $.fn.buttonMarkup = function( options ) {
16                 buttonClass += o.shadow ? " ui-shadow" : "";
17                 buttonClass += o.corners ? " ui-btn-corner-all" : "";
18  
19 +               // To distinguish real buttons
20 +               if( el.jqmData("role") == "button" || e.tagName == "BUTTON" || e.tagName == "DIV" ){
21 +                       buttonClass += " ui-btn-box-" + o.theme;
22 +               }
23 +
24 +               /* TIZEN style markup */
25 +               buttonStyle = el.jqmData("style");
26 +
27 +               if ( buttonStyle == "circle" && !($(el).text().length > 0) ) {
28 +                       /* style : no text, Icon only */
29 +                       buttonClass += " ui-btn-corner-circle";
30 +                       buttonClass += " ui-btn-icon_only";
31 +               } else if ( buttonStyle == "nobg" ) {
32 +                       /* style : no text, Icon only, no bg */
33 +                       buttonClass += " ui-btn-icon-nobg";
34 +                       buttonClass += " ui-btn-icon_only";
35 +               } else if ( buttonStyle == "edit" ) {
36 +                       buttonClass += " ui-btn-edit";
37 +               } else if ( buttonStyle == "round" || ( buttonStyle == "circle" && $(el).text().length > 0 ) ) {
38 +                       buttonClass += " ui-btn-round";
39 +               }
40 +               if ( o.icon ) {
41 +                       if ( $(el).text().length > 0 ) {
42 +
43 +                               switch ( o.iconpos ) {
44 +                               case "right" :
45 +                               case "left" :
46 +                               case "top" :
47 +                               case "bottom" :
48 +                                       textClass += " ui-btn-text-padding-" + o.iconpos;
49 +                                       break;
50 +                               default:
51 +                                       textClass += " ui-btn-text-padding-left";
52 +                                       break;
53 +                               }
54 +
55 +                               innerClass += " ui-btn-hastxt";
56 +                       } else {
57 +                               if ( buttonStyle == "circle" ) {
58 +                                       /* style : no text, Icon only */
59 +                                       innerClass += " ui-btn-corner-circle";
60 +                               } else if ( buttonStyle == "nobg" ) {
61 +                                       /* style : no text, Icon only, no bg */
62 +                                       innerClass += " ui-btn-icon-nobg";
63 +                               }
64 +
65 +                               buttonClass += " ui-btn-icon_only";
66 +                               innerClass += " ui-btn-icon-only";
67 +                       }
68 +               } else {
69 +                       if ( $(el).text().length > 0 ) {
70 +                               innerClass += " ui-btn-hastxt";
71 +                       } else if ( buttonStyle == "circle" ){
72 +                               buttonClass += " ui-btn-round";
73 +                       }
74 +               }
75                 if ( o.mini !== undefined ) {
76                         // Used to control styling in headers/footers, where buttons default to `mini` style.
77                         buttonClass += o.mini === true ? " ui-mini" : " ui-fullsize";
78 -- 
79 1.7.5.4
80