mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-10 15:44:45 +00:00
add data attribute tag for pages loaded via ajax Fixes #2432
This commit is contained in:
parent
fbd113bad4
commit
c426aefd76
2 changed files with 10 additions and 2 deletions
|
|
@ -269,8 +269,12 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
|
||||
}).listview();
|
||||
|
||||
//on pagehide, remove any nested pages along with the parent page, as long as they aren't active
|
||||
if( hasSubPages && parentPage.data("page").options.domCache === false ){
|
||||
// on pagehide, remove any nested pages along with the parent page, as long as they aren't active
|
||||
// and aren't embedded
|
||||
if( hasSubPages &&
|
||||
parentPage.is( "jqmData(external-page='true')" ) &&
|
||||
parentPage.data("page").options.domCache === false ) {
|
||||
|
||||
var newRemove = function( e, ui ){
|
||||
var nextPage = ui.nextPage, npURL;
|
||||
|
||||
|
|
|
|||
|
|
@ -784,8 +784,12 @@
|
|||
}
|
||||
|
||||
//append to page and enhance
|
||||
// TODO taging a page with external to make sure that embedded pages aren't removed
|
||||
// by the various page handling code is bad. Having page handling code in many
|
||||
// places is bad. Solutions post 1.0
|
||||
page
|
||||
.attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) )
|
||||
.attr( "data-" + $.mobile.ns + "external-page", true )
|
||||
.appendTo( settings.pageContainer );
|
||||
|
||||
// wait for page creation to leverage options defined on widget
|
||||
|
|
|
|||
Loading…
Reference in a new issue