From df3bc91f801024c8801e282ba48713066f6dbd6c Mon Sep 17 00:00:00 2001 From: Mitch Foley Date: Mon, 13 Dec 2010 10:54:26 -0500 Subject: [PATCH 1/2] renaming nobackbtn to backbtn. --- docs/api/themes.html | 10 +++++----- docs/toolbars/docs-headers.html | 8 ++++---- experiments/converter/index.html | 2 +- js/jquery.mobile.page.js | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/api/themes.html b/docs/api/themes.html index 1e7f7805..8d73bab9 100755 --- a/docs/api/themes.html +++ b/docs/api/themes.html @@ -151,7 +151,7 @@

If you want to add visual emphasis to a button and help it stand out visually from its parent toolbar, an alternate swatch color can be set by adding a data-theme="a" to the anchor. Once an alternate swatch color is set on a button in the markup, the framework won't override that color if the parent theme is changed, because you made a conscious decision to set it.

-
+
A B @@ -160,7 +160,7 @@ E
-
+
A B @@ -169,7 +169,7 @@ E
-
+
A B @@ -178,7 +178,7 @@ E
-
+
A B @@ -187,7 +187,7 @@ E
-
+
A B diff --git a/docs/toolbars/docs-headers.html b/docs/toolbars/docs-headers.html index bf3e66bf..2d5219db 100755 --- a/docs/toolbars/docs-headers.html +++ b/docs/toolbars/docs-headers.html @@ -39,7 +39,7 @@

Page title

-

See that "back" button? The framework automatically generates a "back" button on every page, to simplify the process of including this common navigation element. To prevent the back button from being added to a header, either add your own button to the left slot (see below) or, add this attribute: data-nobackbtn="true" to the header container. +

See that "back" button? The framework automatically generates a "back" button on every page, to simplify the process of including this common navigation element. To prevent the back button from being added to a header, either add your own button to the left slot (see below) or, add this attribute: data-backbtn="false" to the header container.

Adding buttons

@@ -86,20 +86,20 @@

The button position can also be controlled by adding classes to the button anchors, rather than relying on source order. This is especially useful if you only want a button in the right slot. To specify the button position, add the class of ui-btn-left or ui-btn-right to the anchor.

-

In this example, we're adding only a single button to the right slot so the data-nobackbtn="true" needs to be added to the header container to suppress the automatic Back button behavior and the button needs the ui-btn-right class on the link.

+

In this example, we're adding only a single button to the right slot so the data-backbtn="false" needs to be added to the header container to suppress the automatic Back button behavior and the button needs the ui-btn-right class on the link.


-<div data-role="header" data-position="inline" data-nobackbtn="true">
+<div data-role="header" data-position="inline" data-backbtn="false">
 	<h1>Page Title</h1>
 	<a href="index.html" data-icon="gear" class="ui-btn-right">Options</a>
 </div>
 
-
+

Page Title

Options
diff --git a/experiments/converter/index.html b/experiments/converter/index.html index e6aa4b9c..eace69ba 100644 --- a/experiments/converter/index.html +++ b/experiments/converter/index.html @@ -49,7 +49,7 @@
-
+

Edit conversions

Done
diff --git a/js/jquery.mobile.page.js b/js/jquery.mobile.page.js index 80283117..9274d915 100644 --- a/js/jquery.mobile.page.js +++ b/js/jquery.mobile.page.js @@ -78,7 +78,7 @@ $.widget( "mobile.page", $.mobile.widget, { // auto-add back btn on pages beyond first view if ( o.addBackBtn && role === "header" && ($.mobile.urlStack.length > 1 || $(".ui-page").length > 1) && - !leftbtn && !$this.data( "noBackBtn" ) ) { + !leftbtn && !$this.data( "backBtn" ) ) { $( ""+ o.backBtnText +"" ) .click(function() { From ad757718c46dc8ccf79a45b5c35d107136fba0de Mon Sep 17 00:00:00 2001 From: Mitch Foley Date: Mon, 13 Dec 2010 11:11:21 -0500 Subject: [PATCH 2/2] actually reversing backbtn logic this time. --- js/jquery.mobile.page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.page.js b/js/jquery.mobile.page.js index 9274d915..1271a0cf 100644 --- a/js/jquery.mobile.page.js +++ b/js/jquery.mobile.page.js @@ -78,7 +78,7 @@ $.widget( "mobile.page", $.mobile.widget, { // auto-add back btn on pages beyond first view if ( o.addBackBtn && role === "header" && ($.mobile.urlStack.length > 1 || $(".ui-page").length > 1) && - !leftbtn && !$this.data( "backBtn" ) ) { + !leftbtn && $this.data( "backBtn" ) === false ) { $( ""+ o.backBtnText +"" ) .click(function() {