Page loading error method #363
Description
The same way the framework expose a pageLoading method, it would be great if it could make available a page loading error method. That way any error feedback that have to be made by the application could use the framework.
Based on the code already existing, this wouldonly mean some minor changes changes :
New method :
function popErrorMessage(errorMessage){
jQuery("
" + errorMessage + "
.css({ "display": "block", "opacity": 0.96, "top": $(window).scrollTop() + 100 })
.appendTo( $pageContainer )
.delay( 800 )
.fadeOut( 400, function(){
$(this).remove();
});
}
This function could be used by jquery mobile in ajax page insertion :
error: function() {
pageLoading( true );
removeActiveLinkClass();
popErrorMessage("Error Loading Page");
}
And made available to all :
jQuery.extend({
pageLoading: pageLoading,
changePage: changePage,
hideBrowserChrome: hideBrowserChrome
popErrorMessage: popErrorMessage
});
This is only a small change and would be very usefull I think.