2010-11-10 00:55:52 +00:00
|
|
|
/*
|
2011-11-08 23:43:36 +00:00
|
|
|
* "page" plugin
|
2010-11-10 00:55:52 +00:00
|
|
|
*/
|
2011-06-29 13:27:58 +00:00
|
|
|
|
2011-12-16 02:09:25 +00:00
|
|
|
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
|
|
|
|
|
define( [ "jquery.mobile.widget" ], function() {
|
|
|
|
|
//>>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
|
|
|
|
|
if( !this._trigger( "beforecreate" ) ){
|
|
|
|
|
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");
|