2010-11-10 00:55:52 +00:00
|
|
|
/*
|
|
|
|
|
* jQuery Mobile Framework : "page" plugin
|
|
|
|
|
* Copyright (c) jQuery Project
|
2010-11-20 03:47:47 +00:00
|
|
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
|
|
|
* http://jquery.org/license
|
2010-11-10 00:55:52 +00:00
|
|
|
*/
|
2011-06-29 13:27:58 +00:00
|
|
|
|
|
|
|
|
(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-08-27 15:26:16 +00:00
|
|
|
this._trigger( "beforecreate" );
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})( jQuery );
|