From: Jinhyuk Jun Date: Sat, 13 Apr 2013 06:01:07 +0000 (+0900) Subject: Naviframe : support data-role="button" in header X-Git-Tag: accepted/tizen_2.1/20130425.023924~1^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2117b6628c1e591350a5c68ff8b0ea17737d3750;p=framework%2Fweb%2Fweb-ui-fw.git Naviframe : support data-role="button" in header Change-Id: I7a7137d91fa63cd2adcd28a0a9f0c99129028249 --- diff --git a/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_1_btn.html b/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_1_btn.html index 3a72d6d..68c18df 100644 --- a/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_1_btn.html +++ b/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_1_btn.html @@ -20,7 +20,7 @@

TITLE 1 BUTTON

- +

Title text Button 01 sample

diff --git a/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_2_btn.html b/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_2_btn.html index d62b128..ef9e1a4 100644 --- a/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_2_btn.html +++ b/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_2_btn.html @@ -20,8 +20,8 @@

TITLE 2 BUTTONS

- - + +

Title text Button 02 sample

diff --git a/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_multiline_src_2_btn.html b/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_multiline_src_2_btn.html index d79d029..53d1ddc 100644 --- a/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_multiline_src_2_btn.html +++ b/demos/tizen-winsets/widgets/naviframe/naviframe_title_text_multiline_src_2_btn.html @@ -23,8 +23,8 @@

TITLE DEMO

TITLE IMAGE MULTILINE 2 BUTTONS - - + +

Image Title text Multiline Button 02 sample

diff --git a/libs/patch/0043-JQM-add-default-header-s-button-style.patch b/libs/patch/0043-JQM-add-default-header-s-button-style.patch new file mode 100644 index 0000000..8708553 --- /dev/null +++ b/libs/patch/0043-JQM-add-default-header-s-button-style.patch @@ -0,0 +1,26 @@ +From f26f427a175fce4893bba829db2061d2dfa14cb0 Mon Sep 17 00:00:00 2001 +From: Jinhyuk Jun +Date: Sat, 13 Apr 2013 13:33:21 +0900 +Subject: [PATCH] JQM add default header's button style + +Change-Id: Iffcc090fb16f464c4fa970ac9d1ff447fda993ed +--- + .../js/widgets/page.sections.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libs/js/jquery-mobile-1.2.0/js/widgets/page.sections.js b/libs/js/jquery-mobile-1.2.0/js/widgets/page.sections.js +index 134a059..1ea6479 100644 +--- a/libs/js/jquery-mobile-1.2.0/js/widgets/page.sections.js ++++ b/libs/js/jquery-mobile-1.2.0/js/widgets/page.sections.js +@@ -54,7 +54,7 @@ $.mobile.$document.bind( "pagecreate", function( e ) { + + if ( role === "header") { + // Right,left buttons +- $headeranchors = $this.children( "a, button" ); ++ $headeranchors = $this.children( "a, div.naviframe-button, a.naviframe-button, button" ); + leftbtn = $headeranchors.hasClass( "ui-btn-left" ); + rightbtn = $headeranchors.hasClass( "ui-btn-right" ); + +-- +1.7.9.5 + diff --git a/src/themes/tizen/common/jquery.mobile.button.less b/src/themes/tizen/common/jquery.mobile.button.less index 0bf1c2f..4f60202 100644 --- a/src/themes/tizen/common/jquery.mobile.button.less +++ b/src/themes/tizen/common/jquery.mobile.button.less @@ -105,6 +105,10 @@ box-shadow: none; } +.ui-header .naviframe-button.ui-btn.ui-btn-box-s.ui-btn-down-s { + background : @color_bar_btn_press; +} + .ui-btn-icon-top .ui-btn-inner.ui-btn-hastxt, .ui-li .ui-btn-icon-top .ui-btn-inner.ui-btn-hastxt { padding-top: 52 * @unit_base; diff --git a/src/themes/tizen/common/jquery.mobile.theme.less b/src/themes/tizen/common/jquery.mobile.theme.less index 491f72e..f27fe00 100644 --- a/src/themes/tizen/common/jquery.mobile.theme.less +++ b/src/themes/tizen/common/jquery.mobile.theme.less @@ -69,7 +69,8 @@ } /* header button position : need to press area more... */ - >.ui-btn { + >.ui-btn, + >.naviframe-button.ui-btn { .ui-btn-inner.ui-btn-icon-only { .LESSbox-boxsizing( border-box ); height : 100%; @@ -79,13 +80,21 @@ } } - >.ui-btn:not(.ui-btn-icon-notext) { + >.naviframe-button.ui-btn { + .ui-btn-inner .ui-icon { + margin-top : 0px; + } + } + + >.ui-btn:not(.ui-btn-icon-notext), + >.naviframe-button.ui-btn:not(.ui-btn-icon-notext) { .ui-btn-inner.ui-btn-icon-only { padding-left : 0px; } } - >.ui-btn:not(.ui-btn-icon_only) { + >.ui-btn:not(.ui-btn-icon_only), + >.naviframe-button.ui-btn:not(.ui-btn-icon_only) { width : 53 * @unit_base; height : 18 * @unit_base; top : auto; @@ -124,7 +133,8 @@ } } - > .ui-btn{ + > .ui-btn, + > .naviframe-button.ui-btn { position : absolute; top : 16 * @unit_base; margin-top : 0px; @@ -144,7 +154,8 @@ top: 8 * @unit_base; } - > .ui-btn.ui-btn-icon_only { + > .ui-btn.ui-btn-icon_only, + > .naviframe-button.ui-btn.ui-btn-icon_only { -o-border-radius : 0px; -ms-border-radius : 0px; -moz-border-radius : 0px; @@ -160,29 +171,37 @@ right : 56 * @unit_base; } - > .ui-btn:not(.ui-btn-icon_only):nth-child(2) { + > .ui-btn:not(.ui-btn-icon_only):nth-child(2), + > .naviframe-button.ui-btn:not(.ui-btn-icon_only):nth-child(2) { right : 7 * @unit_base; } - > .ui-btn:not(.ui-btn-icon_only):nth-child(3) { + > .ui-btn:not(.ui-btn-icon_only):nth-child(3), + > .naviframe-button.ui-btn:not(.ui-btn-icon_only):nth-child(3) { right : 62 * @unit_base; } - > img + h1 + .ui-btn:not(.ui-btn-icon_only):nth-child(3) { + > img + h1 + .ui-btn:not(.ui-btn-icon_only):nth-child(3), + > img + h1 + .naviframe-button.ui-btn:not(.ui-btn-icon_only):nth-child(3) { + right : 7 * @unit_base; } - > img + h1 + .ui-btn:not(.ui-btn-icon_only):nth-child(3) + .ui-btn:not(.ui-btn-icon_only) { + > img + h1 + .ui-btn:not(.ui-btn-icon_only):nth-child(3) + .ui-btn:not(.ui-btn-icon_only), + > img + h1 + .naviframe-button.ui-btn:not(.ui-btn-icon_only):nth-child(3) + .naviframe-button.ui-btn:not(.ui-btn-icon_only) { right : 62 * @unit_base; } - > img + h1 + span.ui-title-text-sub + .ui-btn:not(.ui-btn-icon_only):nth-child(4) { + > img + h1 + span.ui-title-text-sub + .ui-btn:not(.ui-btn-icon_only):nth-child(4), + > img + h1 + span.ui-title-text-sub + .naviframe-button.ui-btn:not(.ui-btn-icon_only):nth-child(4) { right : 7 * @unit_base; } - > img + h1 + span.ui-title-text-sub + .ui-btn:not(.ui-btn-icon_only):nth-child(4) + .ui-btn:not(.ui-btn-icon_only) { + > img + h1 + span.ui-title-text-sub + .ui-btn:not(.ui-btn-icon_only):nth-child(4) + .ui-btn:not(.ui-btn-icon_only), + > img + h1 + span.ui-title-text-sub + .naviframe-button.ui-btn:not(.ui-btn-icon_only):nth-child(4) + .naviframe-button.ui-btn:not(.ui-btn-icon_only) { right : 62 * @unit_base; } + > .ui-btn.ui-btn-down-s { background : @color_bar_btn_press; color : @color_bar_title_button_text_press;