Browse files

[widgets] Moving references to widget instances to the new namespaced…

… key
  • Loading branch information...
1 parent 245e5ae commit 8cecf0d70587801e1a841fa44b6f69b90c355802 @gabrielschulhof gabrielschulhof committed Nov 13, 2012
View
2 js/jquery.mobile.core.js
@@ -193,7 +193,7 @@ define( [ "jquery", "text!../version.txt" ], function( $, __version__ ) {
closestPageData: function( $target ) {
return $target
.closest( ':jqmData(role="page"), :jqmData(role="dialog")' )
- .data( "page" );
+ .data( "mobile-page" );
},
enhanceable: function( $set ) {
View
10 js/jquery.mobile.navigation.js
@@ -552,10 +552,10 @@ define( [
if ( fromPage ) {
//trigger before show/hide events
- fromPage.data( "page" )._trigger( "beforehide", null, { nextPage: toPage } );
+ fromPage.data( "mobile-page" )._trigger( "beforehide", null, { nextPage: toPage } );
}
- toPage.data( "page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } );
+ toPage.data( "mobile-page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } );
//clear page loader
$.mobile.hidePageLoadingMsg();
@@ -572,11 +572,11 @@ define( [
//trigger show/hide events
if ( fromPage ) {
- fromPage.data( "page" )._trigger( "hide", null, { nextPage: toPage } );
+ fromPage.data( "mobile-page" )._trigger( "hide", null, { nextPage: toPage } );
}
//trigger pageshow, define prevPage as either fromPage or empty jQuery obj
- toPage.data( "page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } );
+ toPage.data( "mobile-page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } );
});
return promise;
@@ -649,7 +649,7 @@ define( [
var page = $( this );
// when dom caching is not enabled or the page is embedded bind to remove the page on hide
- if ( !page.data( "page" ).options.domCache &&
+ if ( !page.data( "mobile-page" ).options.domCache &&
page.is( ":jqmData(external-page='true')" ) ) {
page.bind( 'pagehide.remove', function() {
View
2 js/widgets/forms/select.custom.js
@@ -559,7 +559,7 @@ define( [
// issue #3894 - core doesn't trigger events on disabled delegates
$( document ).bind( "selectmenubeforecreate", function( event ) {
- var selectmenuWidget = $( event.target ).data( "selectmenu" );
+ var selectmenuWidget = $( event.target ).data( "mobile-selectmenu" );
if ( !selectmenuWidget.options.nativeMenu &&
selectmenuWidget.element.parents( ":jqmData(role='popup')" ).length === 0 ) {
View
2 js/widgets/listview.autodividers.js
@@ -24,7 +24,7 @@ $.mobile.listview.prototype.options.autodividersSelector = function( elt ) {
$( document ).delegate( "ul,ol", "listviewcreate", function() {
var list = $( this ),
- listview = list.data( "listview" );
+ listview = list.data( "mobile-listview" );
if ( !listview || !listview.options.autodividers ) {
return;
View
2 js/widgets/listview.filter.js
@@ -22,7 +22,7 @@ $.mobile.listview.prototype.options.filterCallback = defaultFilterCallback;
$( document ).delegate( "ul, ol", "listviewcreate", function() {
var list = $( this ),
- listview = list.data( "listview" );
+ listview = list.data( "mobile-listview" );
if ( !listview.options.filter ) {
return;
View
2 js/widgets/listview.js
@@ -347,7 +347,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
// and aren't embedded
if ( hasSubPages &&
parentPage.is( ":jqmData(external-page='true')" ) &&
- parentPage.data( "page" ).options.domCache === false ) {
+ parentPage.data( "mobile-page" ).options.domCache === false ) {
var newRemove = function( e, ui ) {
var nextPage = ui.nextPage, npURL,
View
2 js/widgets/page.sections.js
@@ -20,7 +20,7 @@ $.mobile.page.prototype.options.contentTheme = null;
// on which it depends
$( document ).bind( "pagecreate", function( e ) {
var $page = $( e.target ),
- o = $page.data( "page" ).options,
+ o = $page.data( "mobile-page" ).options,
pageRole = $page.jqmData( "role" ),
pageTheme = o.theme;
View
2 js/widgets/popup.js
@@ -838,7 +838,7 @@ define( [ "jquery",
popup = $( $.mobile.path.parseUrl($link.attr( "href" )).hash, scope[0] ),
offset;
- if ( popup.data( "popup" ) ) {
+ if ( popup.data( "mobile-popup" ) ) {
offset = $link.offset();
popup.popup( "open", {
x: offset.left + $link.outerWidth() / 2,

0 comments on commit 8cecf0d

Please sign in to comment.