2011-12-16 02:09:25 +00:00
|
|
|
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
|
2012-01-07 00:28:54 +00:00
|
|
|
//>>description: Basic page formatting.
|
|
|
|
|
//>>label: Pages
|
|
|
|
|
|
2012-01-13 05:22:00 +00:00
|
|
|
define( [ "jquery", "jquery.mobile.widget" ], function( $ ) {
|
2011-12-16 02:09:25 +00:00
|
|
|
//>>excludeEnd("jqmBuildExclude");
|
|
|
|
|
(function( $, undefined ) {
|
2010-10-09 18:34:21 +00:00
|
|
|
|
2010-11-11 15:49:15 +00:00
|
|
|
$.widget( "mobile.page", $.mobile.widget, {
|
2010-11-06 16:30:40 +00:00
|
|
|
options: {
|
2011-07-25 13:16:09 +00:00
|
|
|
theme: "c",
|
2011-10-10 18:43:57 +00:00
|
|
|
domCache: false,
|
|
|
|
|
keepNativeDefault: ":jqmData(role='none'), :jqmData(role='nojs')"
|
2010-11-06 16:30:40 +00:00
|
|
|
},
|
2010-12-08 08:12:05 +00:00
|
|
|
|
2010-10-09 18:34:21 +00:00
|
|
|
_create: function() {
|
2010-12-08 08:12:05 +00:00
|
|
|
|
2011-12-21 00:58:23 +00:00
|
|
|
// if false is returned by the callbacks do not create the page
|
2012-01-04 21:14:43 +00:00
|
|
|
if( this._trigger( "beforecreate" ) === false ){
|
2011-12-21 00:58:23 +00:00
|
|
|
return false;
|
|
|
|
|
}
|
2011-08-27 15:26:16 +00:00
|
|
|
|
2011-09-06 15:31:18 +00:00
|
|
|
this.element
|
|
|
|
|
.attr( "tabindex", "0" )
|
|
|
|
|
.addClass( "ui-page ui-body-" + this.options.theme );
|
2011-10-10 18:43:57 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
keepNativeSelector: function() {
|
|
|
|
|
var options = this.options,
|
2011-10-11 15:31:10 +00:00
|
|
|
keepNativeDefined = options.keepNative && $.trim(options.keepNative);
|
2011-10-10 18:43:57 +00:00
|
|
|
|
|
|
|
|
if( keepNativeDefined && options.keepNative !== options.keepNativeDefault ){
|
|
|
|
|
return [options.keepNative, options.keepNativeDefault].join(", ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return options.keepNativeDefault;
|
2010-10-09 18:34:21 +00:00
|
|
|
}
|
|
|
|
|
});
|
2011-12-16 02:09:25 +00:00
|
|
|
})( jQuery );
|
|
|
|
|
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
|
2011-10-31 05:03:56 +00:00
|
|
|
});
|
2011-12-16 02:09:25 +00:00
|
|
|
//>>excludeEnd("jqmBuildExclude");
|