Permalink
Browse files

Page: change option enhance to enhanceWithin

We cant use the name enhance because it potentially conflicts with
data-enhance=false for ignoreContentEnabled
  • Loading branch information...
arschmitz committed May 5, 2015
1 parent d053ad6 commit fe18ab292f1da2da52a9430d1ef00ef4a92c1511
@@ -33,7 +33,7 @@ if ( $.mobileBackcompat !== false ) {
if ( $.mobile.ignoreContentEnabled ) {
elements.each( function() {
if ( $( this ).closest( "[data-" + $.mobile.ns + "enhanced='false']" ).length ) {
if ( $( this ).closest( "[data-" + $.mobile.ns + "enhance='false']" ).length ) {
elements = elements.not( this );
}
} );
View
@@ -74,7 +74,7 @@ $.widget( "mobile.page", {
// Deprecated in 1.4 remove in 1.5
contentTheme: null,
enhance: true,
enhanceWithin: true,
enhanced: false
},
@@ -100,7 +100,7 @@ $.widget( "mobile.page", {
pagebeforeshow: "_handlePageBeforeShow"
} );
if ( this.options.enhance ) {
if ( this.options.enhanceWithin ) {
this.element.enhanceWithin();
}
// Dialog widget is deprecated in 1.4 remove this in 1.5
@@ -2,7 +2,7 @@
<head>
<title>Do Not Enhance Page</title>
<body>
<div data-nstest-role="page" id="no-enhance" data-nstest-enhance="false">
<div data-nstest-role="page" id="no-enhance" data-nstest-enhance-within="false">
<div data-nstest-role="header" id="no-enhance-header">
<h2>Page Header</h2>
</div>
@@ -1,4 +1,4 @@
asyncTest( "Option enhance", function() {
asyncTest( "Option enhanceWithin", function() {
$.testHelper.pageSequence( [
function() {
$( "#open-enhance" ).click();

0 comments on commit fe18ab2

Please sign in to comment.