Button: bug fix ( when data style circle button on text )
authorhjnim.kim <hjnim.kim@samsung.com>
Sun, 13 Jan 2013 07:59:02 +0000 (16:59 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Tue, 15 Jan 2013 07:26:05 +0000 (16:26 +0900)
If the text on the button(data-style="circle"), change the corner property to "round"

Change-Id: Ie4f14b2995e65cd950f3084a6f8b3a2c6c16376d

demos/tizen-winsets/widgets/button/button.html
libs/patch/0010-JQM-Applied-Tizen-Button-Style.patch

index 2e30a35..0154e37 100755 (executable)
@@ -22,6 +22,7 @@
                        <li class="ui-li-1line-btn1">List item 2<div data-role="button" data-inline="true" data-icon="arrow-r">Call Icon</div></li>
                        <li class="ui-li-1line-btn1">List item 3<div data-role="button" data-inline="true" data-icon="arrow-r">Longer Call Icon</div></li>
                        <li class="ui-li-1line-btn1">List item 4<div data-role="button" data-inline="true" data-icon="call" data-iconpos="right">Icon Text</div></li>
+                       <li class="ui-li-1line-btn1">List item 3<div data-role="button" data-inline="true"  data-style="circle">data-style, circle</div></li>
                        <li data-role="list-divider">Only icon buttons for Tizen</li>
                        <li class="ui-li-1line-btn1">data-icon = "call" <div data-role="button" data-inline="true" data-icon="call"></div></li>
                        <li class="ui-li-1line-btn1">data-icon = "rename" <div data-role="button" data-inline="true" data-icon="rename"></div></li>
index fc07173..d99135e 100644 (file)
@@ -24,7 +24,7 @@ index 3d7d884..0be6999 100644
 +              /* TIZEN style markup */
 +              buttonStyle = el.jqmData("style");
 +
-+              if ( buttonStyle == "circle" ) {
++              if ( buttonStyle == "circle" && !($(el).text().length > 0) ) {
 +                      /* style : no text, Icon only */
 +                      buttonClass += " ui-btn-corner-circle";
 +                      buttonClass += " ui-btn-icon_only";
@@ -34,7 +34,7 @@ index 3d7d884..0be6999 100644
 +                      buttonClass += " ui-btn-icon_only";
 +              } else if ( buttonStyle == "edit" ) {
 +                      buttonClass += " ui-btn-edit";
-+              } else if ( buttonStyle == "round" ) {
++              } else if ( buttonStyle == "round" || ( buttonStyle == "circle" && $(el).text().length > 0 ) ) {
 +                      buttonClass += " ui-btn-round";
 +              }
 +