Permalink
Browse files

Removed the dynamically-appended Meta tag, which was deprecated in Al…

…pha 4, and scheduled for removal in beta. jQM users must provide their own meta viewport tag in the head of jQM apps.
  • Loading branch information...
1 parent 04cb9c1 commit adf3808e842677feb23e9d1102c7203ab82a42a3 scottjehl committed May 17, 2011
Showing with 2 additions and 44 deletions.
  1. +0 −5 js/jquery.mobile.core.js
  2. +0 −5 js/jquery.mobile.init.js
  3. +2 −34 tests/unit/init/init_core.js
@@ -54,11 +54,6 @@
//error response message - appears when an Ajax page request fails
pageLoadErrorMessage: "Error Loading Page",
- //configure meta viewport tag's content attr:
- //note: this feature is deprecated in A4 in favor of adding
- //the meta viewport element directly in the markup
- metaViewportContent: "width=device-width, initial-scale=1",
-
//support conditions that must be met in order to proceed
//default enhanced qualifications are media query support OR IE 7+
gradeA: function(){
@@ -25,11 +25,6 @@
//add mobile, initial load "rendering" classes to docEl
$html.addClass( "ui-mobile ui-mobile-rendering" );
- //define & prepend meta viewport tag, if content is defined
- //NOTE: this is now deprecated. We recommend placing the meta viewport element in
- //the markup from the start.
- $.mobile.metaViewportContent && !$head.find( "meta[name='viewport']" ).length ? $( "<meta>", { name: "viewport", content: $.mobile.metaViewportContent}).prependTo( $head ) : undefined;
-
//loading div which appears during Ajax requests
//will not appear if $.mobile.loadingMessage is false
var $loader = $.mobile.loadingMessage ? $( "<div class='ui-loader ui-body-a ui-corner-all'>" + "<span class='ui-icon ui-icon-loading spin'></span>" + "<h1>" + $.mobile.loadingMessage + "</h1>" + "</div>" ) : undefined;
@@ -3,9 +3,7 @@
*/
(function($){
var mobilePage = undefined,
- mobileSelect = undefined,
- metaViewportContentDefault = $.mobile.metaViewportContent,
- libName = 'jquery.mobile.init.js',
+ libName = 'jquery.mobile.init.js',
coreLib = 'jquery.mobile.core.js',
extendFn = $.extend,
setGradeA = function(value) { $.mobile.gradeA = function(){ return value; }; },
@@ -39,18 +37,13 @@
// the event before the test check below
$(document).one("mobileinit", function(){
mobilePage = $.mobile.page;
- mobileSelect = $.mobile.selectmenu;
});
// NOTE for the following two tests see index html for the binding
test( "mobile.page is available when mobile init is fired", function(){
ok(mobilePage !== undefined, "$.mobile.page is defined");
});
- test( "mobile.selectmenu is available when mobile init is fired", function(){
- ok(mobileSelect !== undefined, "$.mobile.selectmenu is defined");
- });
-
$.testHelper.excludeFileProtocol(function(){
asyncTest( "loading the init library triggers mobilinit on the document", function(){
var initFired = false;
@@ -83,32 +76,7 @@
ok($("html").hasClass("ui-mobile"));
});
- var findMeta = function(){
- return $("head meta[name='viewport']");
- },
- setViewPortContent = function(){
- $.testHelper.reloadLib( libName );
- };
-
- test( "meta viewport element not added to head when not defined on mobile", function(){
- $.mobile.metaViewportContent = null;
- findMeta().remove();
- setViewPortContent();
- same( findMeta().length, 0);
- });
-
- test( "meta viewport element is added to head when defined on mobile and no meta already exists", function(){
- findMeta().remove();
- setViewPortContent();
- same( findMeta().length, 1);
- });
-
- test( "meta viewport element is not added to head when defined on mobile and a meta already exists", function(){
- findMeta().remove();
- $( '<meta name="viewport" content="width=device-width">').prependTo("head");
- setViewPortContent();
- same( findMeta().length, 1);
- });
+
var findFirstPage = function() {
return $(":jqmData(role='page')").first();

0 comments on commit adf3808

Please sign in to comment.