rework localization
This commit is contained in:
parent
b1f6f8486a
commit
043f8b7889
82 changed files with 83316 additions and 96 deletions
|
@ -9,17 +9,9 @@
|
|||
*/
|
||||
|
||||
(function ( root, doc, factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery" ], function ( $ ) {
|
||||
factory( $, root, doc );
|
||||
return $.mobile;
|
||||
});
|
||||
} else {
|
||||
// Browser globals
|
||||
factory( root.jQuery, root, doc );
|
||||
}
|
||||
}( this, document, function ( jQuery, window, document, undefined ) {/*!
|
||||
// Browser globals
|
||||
factory(root.jQuery, root, doc);
|
||||
}(this, document, function (jQuery, window, document, undefined) {/*!
|
||||
* jQuery hashchange event - v1.3 - 7/21/2010
|
||||
* http://benalman.com/projects/jquery-hashchange-plugin/
|
||||
*
|
||||
|
@ -5424,28 +5416,28 @@ $.fn.grid = function( options ) {
|
|||
},
|
||||
|
||||
_parse: function( html, fileUrl ) {
|
||||
// TODO consider allowing customization of this method. It's very JQM specific
|
||||
var page, all = $("<div></div>");
|
||||
// TODO consider allowing customization of this method. It's very JQM specific
|
||||
var page, all = $( "<div></div>" );
|
||||
|
||||
//workaround to allow scripts to execute when included in page divs
|
||||
all.get(0).innerHTML = html;
|
||||
//workaround to allow scripts to execute when included in page divs
|
||||
all.get( 0 ).innerHTML = html;
|
||||
|
||||
page = all.find(":jqmData(role='page'), :jqmData(role='dialog')");
|
||||
page = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first();
|
||||
|
||||
//if page elem couldn't be found, create one and insert the body element's contents
|
||||
if (!page.length) {
|
||||
page = $("<div data-" + this._getNs() + "role='page'>" +
|
||||
(html.split(/<\/?body[^>]*>/gmi)[1] || "") +
|
||||
"</div>");
|
||||
}
|
||||
//if page elem couldn't be found, create one and insert the body element's contents
|
||||
if ( !page.length ) {
|
||||
page = $( "<div data-" + this._getNs() + "role='page'>" +
|
||||
( html.split( /<\/?body[^>]*>/gmi )[1] || "" ) +
|
||||
"</div>" );
|
||||
}
|
||||
|
||||
// TODO tagging 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-" + this._getNs() + "url", this._createDataUrl(fileUrl))
|
||||
.attr("data-" + this._getNs() + "external-page", true);
|
||||
// TODO tagging 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-" + this._getNs() + "url", this._createDataUrl( fileUrl ) )
|
||||
.attr( "data-" + this._getNs() + "external-page", true );
|
||||
|
||||
return page;
|
||||
return page;
|
||||
},
|
||||
|
||||
_setLoadedTitle: function( page, html ) {
|
||||
|
@ -5493,7 +5485,11 @@ $.fn.grid = function( options ) {
|
|||
_loadSuccess: function( absUrl, triggerData, settings, deferred ) {
|
||||
var fileUrl = this._createFileUrl( absUrl );
|
||||
|
||||
return $.proxy(function( html, textStatus, xhr ) {
|
||||
return $.proxy(function (html, textStatus, xhr) {
|
||||
|
||||
if ($.mobile.filterHtml) {
|
||||
html = $.mobile.filterHtml(html);
|
||||
}
|
||||
//pre-parse html to check for a data-url,
|
||||
//use it as the new fileUrl, base path, etc
|
||||
var content,
|
||||
|
@ -5524,8 +5520,7 @@ $.fn.grid = function( options ) {
|
|||
}
|
||||
|
||||
content = this._parse( html, fileUrl );
|
||||
var allPages = content;
|
||||
content = content.first();
|
||||
|
||||
this._setLoadedTitle( content, html );
|
||||
|
||||
// Add the content reference and xhr to our triggerData.
|
||||
|
@ -5552,7 +5547,7 @@ $.fn.grid = function( options ) {
|
|||
this._getBase().rewrite( fileUrl, content );
|
||||
}
|
||||
|
||||
this._include(allPages, settings);
|
||||
this._include( content, settings );
|
||||
|
||||
// Remove loading message.
|
||||
if ( settings.showLoadMsg ) {
|
||||
|
@ -12024,4 +12019,4 @@ $.widget( "mobile.table", $.mobile.table, {
|
|||
})( jQuery );
|
||||
|
||||
|
||||
}));
|
||||
}));
|
Loading…
Add table
Add a link
Reference in a new issue