diff --git a/.gitignore b/.gitignore index a73ae101..ad8d0959 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ gitstatus.log refreshCDN *.swp .gitignore +tests/speed/stats/stats.db diff --git a/Makefile b/Makefile index 0b4ef527..55f403e8 100644 --- a/Makefile +++ b/Makefile @@ -174,7 +174,7 @@ nightly: pull zip @@find ${VER} -type f -name '*.html' -exec sed -i 's|rel="stylesheet" href="../|rel="stylesheet" href="|g' {} \; # Change the empty paths to the location of this nightly file - @@find ${VER} -type f -name '*.html' -exec sed -i 's|href="css/themes/${CSSTHME}/"|href="${NIGHTLY_WEBPATH}/${DIR}.min.css"|g' {} \; + @@find ${VER} -type f -name '*.html' -exec sed -i 's|href="css/themes/${CSSTHEME}/"|href="${NIGHTLY_WEBPATH}/${DIR}.min.css"|g' {} \; @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="js/jquery.js"|src="http://code.jquery.com/jquery-${JQUERY}.min.js"|' {} \; @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="js/"|src="${NIGHTLY_WEBPATH}/${DIR}.min.js"|g' {} \; @@ -182,7 +182,7 @@ nightly: pull zip @@mv ${VER} ${OUTPUT}/demos # Copy the images as well - @@cp -R css/themes/${CSSTHME}/images ${OUTPUT} + @@cp -R css/themes/${CSSTHEME}/images ${OUTPUT} @@${RMLATEST} @@scp -r ${OUTPUT} jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/${NIGHTLY_OUTPUT} diff --git a/css/themes/default/jquery.mobile.theme.css b/css/themes/default/jquery.mobile.theme.css index e6a94ecb..406d90f5 100644 --- a/css/themes/default/jquery.mobile.theme.css +++ b/css/themes/default/jquery.mobile.theme.css @@ -15,7 +15,7 @@ color: #ffffff /*{a-bar-color}*/; font-weight: bold; text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 1px /*{a-bar-shadow-radius}*/ #000000 /*{a-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c /*{a-bar-background-start}*/), to(#111 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #3c3c3c /*{a-bar-background-start}*/), to( #111 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* IE10 */ @@ -49,13 +49,14 @@ .ui-bar-a .ui-link:visited { color: #2489CE /*{a-bar-link-visited}*/; } -.ui-body-a { +.ui-body-a, +.ui-dialog.ui-overlay-a { border: 1px solid #2A2A2A /*{a-body-border}*/; background: #222222 /*{a-body-background-color}*/; color: #fff /*{a-body-color}*/; text-shadow: 0 /*{a-body-shadow-x}*/ 1px /*{a-body-shadow-y}*/ 0 /*{a-body-shadow-radius}*/ #000 /*{a-body-shadow-color}*/; font-weight: normal; - background-image: -webkit-gradient(linear, left top, left bottom, from(#666 /*{a-body-background-start}*/), to(#222 /*{a-body-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #666 /*{a-body-background-start}*/), to( #222 /*{a-body-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#666 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#666 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#666 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* IE10 */ @@ -96,7 +97,7 @@ font-weight: bold; color: #fff /*{a-bup-color}*/; text-shadow: 0 /*{a-bup-shadow-x}*/ -1px /*{a-bup-shadow-y}*/ 1px /*{a-bup-shadow-radius}*/ #000 /*{a-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#555 /*{a-bup-background-start}*/), to(#333 /*{a-bup-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #555 /*{a-bup-background-start}*/), to( #333 /*{a-bup-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#555 /*{a-bup-background-start}*/, #333 /*{a-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#555 /*{a-bup-background-start}*/, #333 /*{a-bup-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#555 /*{a-bup-background-start}*/, #333 /*{a-bup-background-end}*/); /* IE10 */ @@ -112,7 +113,7 @@ font-weight: bold; color: #fff /*{a-bhover-color}*/; text-shadow: 0 /*{a-bhover-shadow-x}*/ -1px /*{a-bhover-shadow-y}*/ 1px /*{a-bhover-shadow-radius}*/ #000 /*{a-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#666 /*{a-bhover-background-start}*/), to(#444 /*{a-bhover-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #666 /*{a-bhover-background-start}*/), to( #444 /*{a-bhover-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#666 /*{a-bhover-background-start}*/, #444 /*{a-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#666 /*{a-bhover-background-start}*/, #444 /*{a-bhover-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#666 /*{a-bhover-background-start}*/, #444 /*{a-bhover-background-end}*/); /* IE10 */ @@ -128,7 +129,7 @@ font-weight: bold; color: #fff /*{a-bdown-color}*/; text-shadow: 0 /*{a-bdown-shadow-x}*/ -1px /*{a-bdown-shadow-y}*/ 1px /*{a-bdown-shadow-radius}*/ #000 /*{a-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#333 /*{a-bdown-background-start}*/), to(#5a5a5a /*{a-bdown-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #333 /*{a-bdown-background-start}*/), to( #5a5a5a /*{a-bdown-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#333 /*{a-bdown-background-start}*/, #5a5a5a /*{a-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#333 /*{a-bdown-background-start}*/, #5a5a5a /*{a-bdown-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#333 /*{a-bdown-background-start}*/, #5a5a5a /*{a-bdown-background-end}*/); /* IE10 */ @@ -155,7 +156,7 @@ color: #fff /*{b-bar-color}*/; font-weight: bold; text-shadow: 0 /*{b-bar-shadow-x}*/ -1px /*{b-bar-shadow-y}*/ 1px /*{b-bar-shadow-radius}*/ #254f7a /*{b-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#81a8ce /*{b-bar-background-start}*/), to(#5e87b0 /*{b-bar-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #81a8ce /*{b-bar-background-start}*/), to( #5e87b0 /*{b-bar-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#81a8ce /*{b-bar-background-start}*/, #5e87b0 /*{b-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#81a8ce /*{b-bar-background-start}*/, #5e87b0 /*{b-bar-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#81a8ce /*{b-bar-background-start}*/, #5e87b0 /*{b-bar-background-end}*/); /* IE10 */ @@ -188,13 +189,14 @@ .ui-bar-b .ui-link:visited { color: #ddf0f8 /*{b-bar-link-visited}*/; } -.ui-body-b { +.ui-body-b, +.ui-dialog.ui-overlay-b { border: 1px solid #C6C6C6 /*{b-body-border}*/; background: #cccccc /*{b-body-background-color}*/; color: #333333 /*{b-body-color}*/; text-shadow: 0 /*{b-body-shadow-x}*/ 1px /*{b-body-shadow-y}*/ 0 /*{b-body-shadow-radius}*/ #fff /*{b-body-shadow-color}*/; font-weight: normal; - background-image: -webkit-gradient(linear, left top, left bottom, from(#e6e6e6 /*{b-body-background-start}*/), to(#ccc /*{b-body-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #e6e6e6 /*{b-body-background-start}*/), to( #ccc /*{b-body-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#e6e6e6 /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#e6e6e6 /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#e6e6e6 /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* IE10 */ @@ -235,7 +237,7 @@ font-weight: bold; color: #fff /*{b-bup-color}*/; text-shadow: 0 /*{b-bup-shadow-x}*/ -1px /*{b-bup-shadow-y}*/ 1px /*{b-bup-shadow-radius}*/ #145072 /*{b-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#5f9cc5 /*{b-bup-background-start}*/), to(#396b9e /*{b-bup-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #5f9cc5 /*{b-bup-background-start}*/), to( #396b9e /*{b-bup-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* IE10 */ @@ -251,7 +253,7 @@ font-weight: bold; color: #fff /*{b-bhover-color}*/; text-shadow: 0 /*{b-bhover-shadow-x}*/ -1px /*{b-bhover-shadow-y}*/ 1px /*{b-bhover-shadow-radius}*/ #014D68 /*{b-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#72b0d4 /*{b-bhover-background-start}*/), to(#4b88b6 /*{b-bhover-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #72b0d4 /*{b-bhover-background-start}*/), to( #4b88b6 /*{b-bhover-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#72b0d4 /*{b-bhover-background-start}*/, #4b88b6 /*{b-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#72b0d4 /*{b-bhover-background-start}*/, #4b88b6 /*{b-bhover-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#72b0d4 /*{b-bhover-background-start}*/, #4b88b6 /*{b-bhover-background-end}*/); /* IE10 */ @@ -267,7 +269,7 @@ font-weight: bold; color: #fff /*{b-bdown-color}*/; text-shadow: 0 /*{b-bdown-shadow-x}*/ -1px /*{b-bdown-shadow-y}*/ 1px /*{b-bdown-shadow-radius}*/ #225377 /*{b-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#396b9e /*{b-bdown-background-start}*/), to(#4e89c5 /*{b-bdown-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #396b9e /*{b-bdown-background-start}*/), to( #4e89c5 /*{b-bdown-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#396b9e /*{b-bdown-background-start}*/, #4e89c5 /*{b-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#396b9e /*{b-bdown-background-start}*/, #4e89c5 /*{b-bdown-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#396b9e /*{b-bdown-background-start}*/, #4e89c5 /*{b-bdown-background-end}*/); /* IE10 */ @@ -294,7 +296,7 @@ color: #3E3E3E /*{c-bar-color}*/; font-weight: bold; text-shadow: 0 /*{c-bar-shadow-x}*/ 1px /*{c-bar-shadow-y}*/ 1px /*{c-bar-shadow-radius}*/ #fff /*{c-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0 /*{c-bar-background-start}*/), to(#e9eaeb /*{c-bar-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #f0f0f0 /*{c-bar-background-start}*/), to( #e9eaeb /*{c-bar-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#f0f0f0 /*{c-bar-background-start}*/, #e9eaeb /*{c-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#f0f0f0 /*{c-bar-background-start}*/, #e9eaeb /*{c-bar-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#f0f0f0 /*{c-bar-background-start}*/, #e9eaeb /*{c-bar-background-end}*/); /* IE10 */ @@ -329,12 +331,13 @@ .ui-bar-c button { font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; } -.ui-body-c { +.ui-body-c, +.ui-dialog.ui-overlay-c { border: 1px solid #B3B3B3 /*{c-body-border}*/; color: #333333 /*{c-body-color}*/; text-shadow: 0 /*{c-body-shadow-x}*/ 1px /*{c-body-shadow-y}*/ 0 /*{c-body-shadow-radius}*/ #fff /*{c-body-shadow-color}*/; background: #f0f0f0 /*{c-body-background-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee /*{c-body-background-start}*/), to(#ddd /*{c-body-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #eee /*{c-body-background-start}*/), to( #ddd /*{c-body-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#eee /*{c-body-background-start}*/, #ddd /*{c-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#eee /*{c-body-background-start}*/, #ddd /*{c-body-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#eee /*{c-body-background-start}*/, #ddd /*{c-body-background-end}*/); /* IE10 */ @@ -376,7 +379,7 @@ font-weight: bold; color: #444 /*{c-bup-color}*/; text-shadow: 0 /*{c-bup-shadow-x}*/ 1px /*{c-bup-shadow-y}*/ 1px /*{c-bup-shadow-radius}*/ #f6f6f6 /*{c-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd /*{c-bup-background-start}*/), to(#eee /*{c-bup-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fdfdfd /*{c-bup-background-start}*/), to( #eee /*{c-bup-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fdfdfd /*{c-bup-background-start}*/, #eee /*{c-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fdfdfd /*{c-bup-background-start}*/, #eee /*{c-bup-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fdfdfd /*{c-bup-background-start}*/, #eee /*{c-bup-background-end}*/); /* IE10 */ @@ -393,7 +396,7 @@ font-weight: bold; color: #101010 /*{c-bhover-color}*/; text-shadow: 0 /*{c-bhover-shadow-x}*/ 1px /*{c-bhover-shadow-y}*/ 1px /*{c-bhover-shadow-radius}*/ #fff /*{c-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#ededed /*{c-bhover-background-start}*/), to(#dadada /*{c-bhover-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #ededed /*{c-bhover-background-start}*/), to( #dadada /*{c-bhover-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#ededed /*{c-bhover-background-start}*/, #dadada /*{c-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#ededed /*{c-bhover-background-start}*/, #dadada /*{c-bhover-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#ededed /*{c-bhover-background-start}*/, #dadada /*{c-bhover-background-end}*/); /* IE10 */ @@ -409,7 +412,7 @@ font-weight: bold; color: #111111 /*{c-bdown-color}*/; text-shadow: 0 /*{c-bdown-shadow-x}*/ 1px /*{c-bdown-shadow-y}*/ 1px /*{c-bdown-shadow-radius}*/ #ffffff /*{c-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee /*{c-bdown-background-start}*/), to(#fdfdfd /*{c-bdown-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #eee /*{c-bdown-background-start}*/), to( #fdfdfd /*{c-bdown-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#eee /*{c-bdown-background-start}*/, #fdfdfd /*{c-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#eee /*{c-bdown-background-start}*/, #fdfdfd /*{c-bdown-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#eee /*{c-bdown-background-start}*/, #fdfdfd /*{c-bdown-background-end}*/); /* IE10 */ @@ -435,7 +438,7 @@ background: #bbb /*{d-bar-background-color}*/; color: #333 /*{d-bar-color}*/; text-shadow: 0 /*{d-bar-shadow-x}*/ 1px /*{d-bar-shadow-y}*/ 0 /*{d-bar-shadow-radius}*/ #eee /*{d-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#ddd /*{d-bar-background-start}*/), to(#bbb /*{d-bar-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #ddd /*{d-bar-background-start}*/), to( #bbb /*{d-bar-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* IE10 */ @@ -470,12 +473,13 @@ color: #2489CE /*{d-bar-link-visited}*/; } -.ui-body-d { +.ui-body-d, +.ui-dialog.ui-overlay-d { border: 1px solid #ccc /*{d-body-border}*/; color: #333333 /*{d-body-color}*/; text-shadow: 0 /*{d-body-shadow-x}*/ 1px /*{d-body-shadow-y}*/ 0 /*{d-body-shadow-radius}*/ #fff /*{d-body-shadow-color}*/; background: #ffffff /*{d-body-background-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#fff /*{d-body-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fff), to( #fff /*{d-body-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* IE10 */ @@ -517,7 +521,7 @@ font-weight: bold; color: #444 /*{d-bup-color}*/; text-shadow: 0 /*{d-bup-shadow-x}*/ 1px /*{d-bup-shadow-y}*/ 1px /*{d-bup-shadow-radius}*/ #fff /*{d-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#fff /*{d-bup-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fff), to( #fff /*{d-bup-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fff /*{d-bup-background-start}*/, #fff /*{d-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fff /*{d-bup-background-start}*/, #fff /*{d-bup-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fff /*{d-bup-background-start}*/, #fff /*{d-bup-background-end}*/); /* IE10 */ @@ -534,7 +538,7 @@ color: #222 /*{d-bhover-color}*/; cursor: pointer; text-shadow: 0 /*{d-bhover-shadow-x}*/ 1px /*{d-bhover-shadow-y}*/ 1px /*{d-bhover-shadow-radius}*/ #fff /*{d-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#eee /*{d-bhover-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fdfdfd), to( #eee /*{d-bhover-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fdfdfd /*{d-bhover-background-start}*/, #eee /*{d-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fdfdfd /*{d-bhover-background-start}*/, #eee /*{d-bhover-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fdfdfd /*{d-bhover-background-start}*/, #eee /*{d-bhover-background-end}*/); /* IE10 */ @@ -550,7 +554,7 @@ font-weight: bold; color: #111 /*{d-bdown-color}*/; text-shadow: 0 /*{d-bdown-shadow-x}*/ 1px /*{d-bdown-shadow-y}*/ 1px /*{d-bdown-shadow-radius}*/ #ffffff /*{d-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee /*{d-bdown-background-start}*/), to(#fff /*{d-bdown-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #eee /*{d-bdown-background-start}*/), to( #fff /*{d-bdown-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#eee /*{d-bdown-background-start}*/, #fff /*{d-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#eee /*{d-bdown-background-start}*/, #fff /*{d-bdown-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#eee /*{d-bdown-background-start}*/, #fff /*{d-bdown-background-end}*/); /* IE10 */ @@ -576,7 +580,7 @@ background: #fadb4e /*{e-bar-background-color}*/; color: #333 /*{e-bar-color}*/; text-shadow: 0 /*{e-bar-shadow-x}*/ 1px /*{e-bar-shadow-y}*/ 0 /*{e-bar-shadow-radius}*/ #fff /*{e-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fceda7 /*{e-bar-background-start}*/), to(#fadb4e /*{e-bar-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fceda7 /*{e-bar-background-start}*/), to( #fadb4e /*{e-bar-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fceda7 /*{e-bar-background-start}*/, #fadb4e /*{e-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fceda7 /*{e-bar-background-start}*/, #fadb4e /*{e-bar-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fceda7 /*{e-bar-background-start}*/, #fadb4e /*{e-bar-background-end}*/); /* IE10 */ @@ -610,12 +614,13 @@ color: #2489CE /*{e-bar-link-visited}*/; } -.ui-body-e { +.ui-body-e, +.ui-dialog.ui-overlay-e { border: 1px solid #F7C942 /*{e-body-border}*/; color: #333333 /*{e-body-color}*/; text-shadow: 0 /*{e-body-shadow-x}*/ 1px /*{e-body-shadow-y}*/ 0 /*{e-body-shadow-radius}*/ #fff /*{e-body-shadow-color}*/; background: #faeb9e /*{e-body-background-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fff /*{e-body-background-start}*/), to(#faeb9e /*{e-body-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fff /*{e-body-background-start}*/), to( #faeb9e /*{e-body-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fff /*{e-body-background-start}*/, #faeb9e /*{e-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fff /*{e-body-background-start}*/, #faeb9e /*{e-body-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fff /*{e-body-background-start}*/, #faeb9e /*{e-body-background-end}*/); /* IE10 */ @@ -656,7 +661,7 @@ font-weight: bold; color: #333 /*{e-bup-color}*/; text-shadow: 0 /*{e-bup-shadow-x}*/ 1px /*{e-bup-shadow-y}*/ 0 /*{e-bup-shadow-radius}*/ #fff /*{e-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fceda7 /*{e-bup-background-start}*/), to(#fadb4e /*{e-bup-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fceda7 /*{e-bup-background-start}*/), to( #fadb4e /*{e-bup-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fceda7 /*{e-bup-background-start}*/, #fadb4e /*{e-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fceda7 /*{e-bup-background-start}*/, #fadb4e /*{e-bup-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fceda7 /*{e-bup-background-start}*/, #fadb4e /*{e-bup-background-end}*/); /* IE10 */ @@ -672,7 +677,7 @@ font-weight: bold; color: #111 /*{e-bhover-color}*/; text-shadow: 0 /*{e-bhover-shadow-x}*/ 1px /*{e-bhover-shadow-y}*/ 1px /*{e-bhover-shadow-radius}*/ #fff /*{e-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf0b5 /*{e-bhover-background-start}*/), to(#fbe26f /*{e-bhover-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fcf0b5 /*{e-bhover-background-start}*/), to( #fbe26f /*{e-bhover-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fcf0b5 /*{e-bhover-background-start}*/, #fbe26f /*{e-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fcf0b5 /*{e-bhover-background-start}*/, #fbe26f /*{e-bhover-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fcf0b5 /*{e-bhover-background-start}*/, #fbe26f /*{e-bhover-background-end}*/); /* IE10 */ @@ -689,7 +694,7 @@ font-weight: bold; color: #111 /*{e-bdown-color}*/; text-shadow: 0 /*{e-bdown-shadow-x}*/ 1px /*{e-bdown-shadow-y}*/ 1px /*{e-bdown-shadow-radius}*/ #ffffff /*{e-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from(#fadb4e /*{e-bdown-background-start}*/), to(#fceda7 /*{e-bdown-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #fadb4e /*{e-bdown-background-start}*/), to( #fceda7 /*{e-bdown-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#fadb4e /*{e-bdown-background-start}*/, #fceda7 /*{e-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#fadb4e /*{e-bdown-background-start}*/, #fceda7 /*{e-bdown-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#fadb4e /*{e-bdown-background-start}*/, #fceda7 /*{e-bdown-background-end}*/); /* IE10 */ @@ -727,7 +732,7 @@ a.ui-link-inherit { cursor: pointer; text-shadow: 0 /*{global-active-shadow-x}*/ -1px /*{global-active-shadow-y}*/ 1px /*{global-active-shadow-radius}*/ #145072 /*{global-active-shadow-color}*/; text-decoration: none; - background-image: -webkit-gradient(linear, left top, left bottom, from(#85bae4 /*{global-active-background-start}*/), to(#5393c5 /*{global-active-background-end}*/)); /* Saf4+, Chrome */ + background-image: -webkit-gradient(linear, left top, left bottom, from( #85bae4 /*{global-active-background-start}*/), to( #5393c5 /*{global-active-background-end}*/)); /* Saf4+, Chrome */ background-image: -webkit-linear-gradient(#85bae4 /*{global-active-background-start}*/, #5393c5 /*{global-active-background-end}*/); /* Chrome 10+, Saf5.1+ */ background-image: -moz-linear-gradient(#85bae4 /*{global-active-background-start}*/, #5393c5 /*{global-active-background-end}*/); /* FF3.6 */ background-image: -ms-linear-gradient(#85bae4 /*{global-active-background-start}*/, #5393c5 /*{global-active-background-end}*/); /* IE10 */ diff --git a/css/themes/valencia/jquery.mobile.theme.css b/css/themes/valencia/jquery.mobile.theme.css index 2e3c5a72..5981b4ec 100644 --- a/css/themes/valencia/jquery.mobile.theme.css +++ b/css/themes/valencia/jquery.mobile.theme.css @@ -86,7 +86,8 @@ color: #7cc4e7; font-weight: bold; } -.ui-body-a { +.ui-body-a, +.ui-dialog.ui-overlay-a { font-weight: normal; border: 1px solid #222; background: #444; @@ -199,7 +200,8 @@ color: #7cc4e7; font-weight: bold; } -.ui-body-b { +.ui-body-b, +.ui-dialog.ui-overlay-b { font-weight: normal; border: 1px solid #999; background-color: #e5e5e5; @@ -298,7 +300,8 @@ .ui-btn-down-c a.ui-link-inherit { color: #111; } -.ui-body-c { +.ui-body-c, +.ui-dialog.ui-overlay-c { border: 1px solid #ddd; color: #333333; text-shadow: 0 1px 0px #fff; @@ -414,7 +417,8 @@ .ui-body-d .ui-link-inherit { color: #333333; } -.ui-body-d { +.ui-body-d, +.ui-dialog.ui-overlay-d { border: 1px solid #aaa; color: #666; text-shadow: 0 1px 0px #fff; @@ -525,7 +529,8 @@ text-decoration: none; text-shadow: 0 1px 0px #fff; } -.ui-body-e { +.ui-body-e, +.ui-dialog.ui-overlay-e { font-weight: normal; border: 1px solid #aaa; background: #ccc; diff --git a/docs/api/data-attributes.html b/docs/api/data-attributes.html new file mode 100644 index 00000000..9e562f50 --- /dev/null +++ b/docs/api/data-attributes.html @@ -0,0 +1,424 @@ + + + + + + jQuery Mobile Docs - Data Attribute Reference + + + + + + + + + +
+ +
+

Data Attributes

+ Home +
+ +
+ +
+ + + +

Button

+

Links with data-role="button". Input-based buttons and button elements are auto-enhanced, no data-role required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data-cornerstrue | false
data-iconhome | delete | plus | arrow-u | arrow-d | check | gear | grid | star | custom | arrow-r | arrow-l | minus | refresh | forward | back | alert | info | search
data-iconposleft | right | top | bottom | notext
data-iconshadowtrue | false
data-inlinetrue | false
data-shadowtrue | false
data-themeswatch letter (a-z)
+

Multiple buttons can be wrapped in a container with a data-role="controlgroup" attribute for a vertically grouped set. Add the data-type="horizontal" attribute for the buttons to sit side-by-side.

+ + +

Checkbox

+

Pairs of labels and inputs with type="checkbox" are auto-enhanced, no data-role required

+ + + + + + + + + +
data-rolenone (prevents auto-enhancement to use native control)
data-themeswatch letter (a-z) - Added to the form element
+ +

Collapsible

+

A heading and content wrapped in a container with the data-role="collapsible"

+ + + + + + + + + + + + + +
data-collapsedtrue | false
data-content-themeswatch letter (a-z)
data-themeswatch letter (a-z)
+ +

Collapsible set

+

A number of collapsibles wrapped in a container with the data-role="collapsible-set"

+ + + + + + + + + +
data-content-themeswatch letter (a-z) - Sets all collapsibles in set
data-themeswatch letter (a-z) - Sets all collapsibles in set
+ +

Dialog

+ + + + + +
data-overlay-themeswatch letter (a-z) - overlay theme
+ +

Content

+

Container with data-role="content"

+ + + + + +
data-themeswatch letter (a-z)
+ + +

Field container

+

Container with data-role="fieldcontain" wrapped around label/form element pair

+ +

Flip toggle switch

+

Select with data-role="slider", two options only

+ + + + + + + + + + + + + +
data-rolenone (prevents auto-enhancement to use native control)
data-themeswatch letter (a-z) - Added to the form element
data-track-themeswatch letter (a-z) - Added to the form element
+ +

Footer

+

Container with data-role="footer"

+ + + + + + + + + + + + + +
data-idstring (unique id, useful in persistent footers)
data-positionfixed
data-themeswatch letter (a-z)
+ +

Header

+

Container with data-role="header"

+ + + + + + + + + + + + + + + + + + + + + + + + + +
data-add-back-btntrue | false (auto add back button, header only)
data-back-btn-textstring
data-back-btn-themeswatch letter (a-z)
data-positionfixed
data-themeswatch letter (a-z)
data-titlestring (title used when page is shown)
+ +

Link

+

Links, including those with a data-role="button", and form submit buttons share these attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + +
data-ajaxtrue | false
data-directionreverse (reverse page transition animation)
data-dom-cachetrue | false
data-prefetchtrue | false
data-relback (to move one step back in history)
+ dialog (to open link styled as dialog, not tracked in history)
+ external (for linking to another domain)
data-transitionslide | slideup | slidedown | pop | fade | flip
+ +

Listview

+

OL or UL with data-role="listview"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data-count-themeswatch letter (a-z)
data-dividerthemeswatch letter (a-z)
data-filtertrue | false
data-filter-placeholderstring
data-filter-themeswatch letter (a-z)
data-insettrue | false
data-split-iconhome | delete | plus | arrow-u | arrow-d | check | gear | grid | star | custom | arrow-r | arrow-l | minus | refresh | forward | back | alert | info | search
data-themeswatch letter (a-z)
+ +

Listview item

+

LI within a listview

+ + + + + + + + + + + + + +
data-iconhome | delete | plus | arrow-u | arrow-d | check | gear | grid | star | custom | arrow-r | arrow-l | minus | refresh | forward | back | alert | info | search
data-rolelist-divider
data-themeswatch letter (a-z) - can also be set on individual LIs
+ +

Page

+

Container with data-role="page" or "dialog"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data-close-btn-textstring (text for the close button, dialog only)
data-dom-cachetrue | false
data-idstring (unique id for the page)
data-fullscreentrue | false (used in conjunction with fixed toolbars)
data-overlay-themeswatch letter (a-z) - overlay theme when the page is opened in a dialog
data-themeswatch letter (a-z)
data-titlestring (title used when page is shown)
+ +

Radio button

+

Pairs of labels and inputs with type="radio" are auto-enhanced, no data-role required

+ + + + + + + + + +
data-rolenone (prevents auto-enhancement to use native control)
data-themeswatch letter (a-z) - Added to the form element
+ +

Select

+

All select form elements are auto-enhanced, no data-role required

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data-iconhome | delete | plus | arrow-u | arrow-d | check | gear | grid | star | custom | arrow-r | arrow-l | minus | refresh | forward | back | alert | info | search
data-iconposleft | right | top | bottom | notext
data-inlinetrue | false
data-native-menutrue | false
data-placeholdertrue | false - Add to the Option
data-rolenone (prevents auto-enhancement to use native control)
data-overlay-themeswatch letter (a-z) - overlay theme for non-native selects
data-themeswatch letter (a-z) - Added to the form element
+

Multiple selects can be wrapped in a fieldset with a data-role="controlgroup" attribute for a vertically grouped set. Add the data-type="horizontal" attribute for the selects to sit side-by-side.

+ +

Slider

+

Inputs with type="range" are auto-enhanced, no data-role required

+ + + + + + + + + + + + + +
data-rolenone (prevents auto-enhancement to use native control)
data-themeswatch letter (a-z) - Added to the form element
data-track-themeswatch letter (a-z) - Added to the form element
+ +

Text input & Textarea

+

Input type="text|number|search|etc." or textarea elements are auto-enhanced, no data-role required

+ + + + + + + + + +
data-rolenone (prevents auto-enhancement to use native control)
data-themeswatch letter (a-z) - Added to the form element
+ +
+ + + +
+ + + +
+ + + \ No newline at end of file diff --git a/docs/api/events.html b/docs/api/events.html index bd7e68aa..359ebb1a 100755 --- a/docs/api/events.html +++ b/docs/api/events.html @@ -493,6 +493,7 @@ $( '#foo' ).hide().trigger( 'updatelayout' );
  • Configuring defaults
  • Events
  • Methods & Utilities
  • +
  • Data attribute reference
  • Theme framework
  • diff --git a/docs/api/globalconfig.html b/docs/api/globalconfig.html index b8ee7bdb..55745e83 100755 --- a/docs/api/globalconfig.html +++ b/docs/api/globalconfig.html @@ -145,6 +145,7 @@ $(document).bind("mobileinit", function(){
  • Configuring defaults
  • Events
  • Methods & Utilities
  • +
  • Data attribute reference
  • Theme framework
  • diff --git a/docs/api/index.html b/docs/api/index.html index 181ba309..1ef55565 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -27,6 +27,7 @@
  • Configuring defaults
  • Events
  • Methods & Utilities
  • +
  • Data attribute reference
  • Theme framework
  • diff --git a/docs/api/mediahelpers.html b/docs/api/mediahelpers.html index d5eff4fb..0bf717c6 100755 --- a/docs/api/mediahelpers.html +++ b/docs/api/mediahelpers.html @@ -31,7 +31,7 @@

    Orientation Classes

    -

    The HTML element will always have a class of either "portrait" or "landscape", depending on the orientation of the browser or device. You can utilize these in your CSS like this:

    +

    The HTML element will always have a class of either "portrait" or "landscape", depending on the orientation of the browser or device. You can utilize these in your CSS like this:

     			
     .portrait {
    @@ -44,7 +44,7 @@
     			

    Min/Max Width Breakpoint Classes

    -

    By default, we create min and max breakpoint classes at the following widths: 320,480,768,1024. These translate to classes that look like this: "min-width-320px", "max-width-480px", and are meant to be used as a replacement of (or in addition to) the media query equivalents they mimic.

    +

    By default, we create min and max breakpoint classes at the following widths: 320,480,768,1024. These translate to classes that look like this: "min-width-320px", "max-width-480px", and are meant to be used as a replacement of (or in addition to) the media query equivalents they mimic.

     			
     .myelement { 
    @@ -113,6 +113,7 @@ $.mobile.media("screen and (-webkit-min-device-pixel-ratio: 2)");
     					
  • Events
  • Methods & Utilities
  • Responsive Layout
  • +
  • Data attribute reference
  • Theme framework
  • diff --git a/docs/api/methods.html b/docs/api/methods.html index e81b4ee0..ebd2f78b 100755 --- a/docs/api/methods.html +++ b/docs/api/methods.html @@ -548,6 +548,7 @@ $.mobile.silentScroll(100);
  • Configuring defaults
  • Events
  • Methods & Utilities
  • +
  • Data attribute reference
  • Theme framework
  • diff --git a/docs/api/themes.html b/docs/api/themes.html index cc4bd26a..5dedc2b3 100755 --- a/docs/api/themes.html +++ b/docs/api/themes.html @@ -267,9 +267,10 @@
  • Configuring defaults
  • Events
  • Methods & Utilities
  • +
  • Data attribute reference
  • Theme framework
  • - + diff --git a/docs/lists/lists-themes.html b/docs/lists/lists-themes.html index 0880fee6..7ea1184e 100755 --- a/docs/lists/lists-themes.html +++ b/docs/lists/lists-themes.html @@ -28,7 +28,7 @@ <ul data-role="listview" data-inset="true"> -
      +
      • Divider
      • Inbox 12
      • Outbox 0
      • diff --git a/docs/toolbars/docs-headers.html b/docs/toolbars/docs-headers.html index a91a66a7..b20eebb3 100644 --- a/docs/toolbars/docs-headers.html +++ b/docs/toolbars/docs-headers.html @@ -123,10 +123,10 @@

        Customizing the back button text

        -

        If you'd like to configure the back button text, you can either use the data-back-btn-text="previous" attribute on your page element, or set it programmatically via the page plugin's options: $.mobile.page.prototype.options.backBtnText = "previous";. +

        If you'd like to configure the back button text, you can either use the data-back-btn-text="previous" attribute on your page element, or set it programmatically via the page plugin's options:
        $.mobile.page.prototype.options.backBtnText = "previous";

        Default back button style

        -

        If you'd like to configure the back button role-theme, you can use: $.mobile.page.prototype.options.backBtnTheme = "a";. +

        If you'd like to configure the back button role-theme, you can use:
        $.mobile.page.prototype.options.backBtnTheme = "a";
        If you're doing this programmatically, set this option inside the mobileinit event handler.

        Custom header configurations

        diff --git a/experiments/scrollview/scrollview.js b/experiments/scrollview/scrollview.js index eb6cb020..f033c784 100644 --- a/experiments/scrollview/scrollview.js +++ b/experiments/scrollview/scrollview.js @@ -1,50 +1,45 @@ -function ResizePageContentHeight(page) -{ - var $page = $(page); - var $content = $page.children(".ui-content"); - var hh = $page.children(".ui-header").outerHeight(); hh = hh ? hh : 0; - var fh = $page.children(".ui-footer").outerHeight(); fh = fh ? fh : 0; - var pt = parseFloat($content.css("padding-top")); - var pb = parseFloat($content.css("padding-bottom")); - var wh = window.innerHeight; +function ResizePageContentHeight(page) { + var $page = $(page), + $content = $page.children( ".ui-content" ), + hh = $page.children( ".ui-header" ).outerHeight() : 0, + fh = $page.children( ".ui-footer" ).outerHeight() : 0, + pt = parseFloat($content.css( "padding-top" )), + pb = parseFloat($content.css( "padding-bottom" )), + wh = window.innerHeight; + $content.height(wh - (hh + fh) - (pt + pb)); } -$(":jqmData(role='page')").live("pageshow", function(event) { - var $page = $(this); +$( ":jqmData(role='page')" ).live( "pageshow", function(event) { + var $page = $( this ); // For the demos that use this script, we want the content area of each // page to be scrollable in the 'y' direction. - $page.find(".ui-content").attr("data-"+ $.mobile.ns +"scroll", "y"); + $page.find( ".ui-content" ).attr( "data-" + $.mobile.ns + "scroll", "y" ); // This code that looks for [data-scroll] will eventually be folded // into the jqm page processing code when scrollview support is "official" // instead of "experimental". - $page.find(":jqmData(scroll):not(.ui-scrollview-clip)").each(function(){ - var $this = $(this); + $page.find( ":jqmData(scroll):not(.ui-scrollview-clip)" ).each(function () { + var $this = $( this ); // XXX: Remove this check for ui-scrolllistview once we've // integrated list divider support into the main scrollview class. - if ($this.hasClass("ui-scrolllistview")) + if ( $this.hasClass( "ui-scrolllistview" ) ) { $this.scrolllistview(); - else - { - var st = $this.jqmData("scroll") + ""; - var paging = st && st.search(/^[xy]p$/) != -1; - var dir = st && st.search(/^[xy]/) != -1 ? st.charAt(0) : null; + } else { + var st = $this.jqmData( "scroll" ) + "", + paging = st && st.search(/^[xy]p$/) != -1, + dir = st && st.search(/^[xy]/) != -1 ? st.charAt(0) : null, - var opts = {}; - if (dir) - opts.direction = dir; - if (paging) - opts.pagingEnabled = true; + opts = { + direction: dir || undefined, + paging: paging || undefined, + scrollMethod: $this.jqmData("scroll-method") || undefined + }; - var method = $this.jqmData("scroll-method"); - if (method) - opts.scrollMethod = method; - - $this.scrollview(opts); + $this.scrollview( opts ); } }); @@ -52,9 +47,9 @@ $(":jqmData(role='page')").live("pageshow", function(event) { // area that is sized to fit completely within the viewport. This should // also handle the case where pages are loaded dynamically. - ResizePageContentHeight(event.target); + ResizePageContentHeight( event.target ); }); -$(window).bind("orientationchange", function(event) { - ResizePageContentHeight($(".ui-page")); -}); +$( window ).bind( "orientationchange", function( event ) { + ResizePageContentHeight( $( ".ui-page" ) ); +}); \ No newline at end of file diff --git a/index.html b/index.html index 8ab3a3ab..24ed9d69 100755 --- a/index.html +++ b/index.html @@ -55,6 +55,7 @@
      • Configuring defaults
      • Events
      • Methods & Utilities
      • +
      • Data attribute reference
      • Theme framework
      • diff --git a/js/jquery.mobile.core.js b/js/jquery.mobile.core.js index a5b3068a..e8480381 100644 --- a/js/jquery.mobile.core.js +++ b/js/jquery.mobile.core.js @@ -130,13 +130,27 @@ }, getInheritedTheme: function( el, defaultTheme ) { - // Find the closest parent with a theme class on it. - var themedParent = el.closest( "[class*='ui-bar-'],[class*='ui-body-']" ), - // If there's a themed parent, extract the theme letter - // from the theme class . - ltr = ( themedParent.length && /ui-(bar|body)-([a-z])\b/.exec( themedParent.attr( "class" ) )[ 2 ] || "" ) || ""; + // Find the closest parent with a theme class on it. Note that + // we are not using $.fn.closest() on purpose here because this + // method gets called quite a bit and we need it to be as fast + // as possible. + var e = el[ 0 ], + ltr = "", + re = /ui-(bar|body)-([a-z])\b/, + c, m; + + while ( e ) { + var c = e.className || ""; + if ( ( m = re.exec( c ) ) && ( ltr = m[ 2 ] ) ) { + // We found a parent with a theme class + // on it so bail from this loop. + break; + } + e = e.parentNode; + } + // Return the theme letter we found, if none, return the // specified default. diff --git a/js/jquery.mobile.dialog.js b/js/jquery.mobile.dialog.js index 4b81899d..1d1ea560 100644 --- a/js/jquery.mobile.dialog.js +++ b/js/jquery.mobile.dialog.js @@ -9,20 +9,15 @@ $.widget( "mobile.dialog", $.mobile.widget, { options: { closeBtnText : "Close", - theme : "a", + overlayTheme : "a", initSelector : ":jqmData(role='dialog')" }, _create: function() { var self = this, $el = this.element, - pageTheme = $el.attr( "class" ).match( /ui-body-[a-z]/ ), headerCloseButton = $( ""+ this.options.closeBtnText + "" ); - if( pageTheme.length ){ - $el.removeClass( pageTheme[ 0 ] ); - } - - $el.addClass( "ui-body-" + this.options.theme ); + $el.addClass( "ui-overlay-" + this.options.overlayTheme ); // Class the markup for dialog styling // Set aria role diff --git a/js/jquery.mobile.forms.select.custom.js b/js/jquery.mobile.forms.select.custom.js index e6881234..2bccb6ab 100644 --- a/js/jquery.mobile.forms.select.custom.js +++ b/js/jquery.mobile.forms.select.custom.js @@ -17,14 +17,14 @@ isMultiple = widget.isMultiple = widget.select[ 0 ].multiple, buttonId = selectID + "-button", menuId = selectID + "-menu", - menuPage = $( "
        " + + menuPage = $( "
        " + "
        " + "
        " + label.getEncodedText() + "
        "+ "
        "+ "
        "+ "
        " ).appendTo( $.mobile.pageContainer ).page(), - listbox = $("
        ", { "class": "ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-" + widget.options.overlayTheme + " " + $.mobile.defaultDialogTransition } ).insertAfter(screen), + listbox = $("
        ", { "class": "ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-overlay-" + widget.options.overlayTheme + " " + $.mobile.defaultDialogTransition } ).insertAfter(screen), list = $( "
          ", { "class": "ui-selectmenu-list", @@ -33,9 +33,7 @@ "aria-labelledby": buttonId }).attr( "data-" + $.mobile.ns + "theme", widget.options.theme ).appendTo( listbox ), - header = $( "
          ", { - "class": "ui-header ui-bar-" + widget.options.theme - }).prependTo( listbox ), + header = $( "
          " ).attr( "data-" + $.mobile.ns + "theme", widget.options.theme ).prependTo( listbox ), headerTitle = $( "

          ", { "class": "ui-title" diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 74448c1f..7181ff4a 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -748,7 +748,17 @@ // to the first page and refers to non-existent embedded page, error out. if ( page.length === 0 ) { if ( $.mobile.firstPage && path.isFirstPageUrl( fileUrl ) ) { - page = $( $.mobile.firstPage ); + // Check to make sure our cached-first-page is actually + // in the DOM. Some user deployed apps are pruning the first + // page from the DOM for various reasons, we check for this + // case here because we don't want a first-page with an id + // falling through to the non-existent embedded page error + // case. If the first-page is not in the DOM, then we let + // things fall through to the ajax loading code below so + // that it gets reloaded. + if ( $.mobile.firstPage.parent().length ) { + page = $( $.mobile.firstPage ); + } } else if ( path.isEmbeddedPage( fileUrl ) ) { deferred.reject( absUrl, options ); return deferred.promise(); diff --git a/js/jquery.mobile.page.sections.js b/js/jquery.mobile.page.sections.js index 6e04bfbe..04d77b04 100644 --- a/js/jquery.mobile.page.sections.js +++ b/js/jquery.mobile.page.sections.js @@ -24,6 +24,7 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi var $this = $( this ), role = $this.jqmData( "role" ), theme = $this.jqmData( "theme" ), + contentTheme = theme || o.contentTheme || pageTheme, $headeranchors, leftbtn, rightbtn, @@ -75,8 +76,8 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi }); } else if ( role === "content" ) { - if (theme || o.contentTheme) { - $this.addClass( "ui-body-" + ( theme || o.contentTheme ) ); + if ( contentTheme ) { + $this.addClass( "ui-body-" + ( contentTheme ) ); } // Add ARIA role diff --git a/tests/speed/lists-ul-record.php b/tests/speed/lists-ul-record.php new file mode 100644 index 00000000..a7760956 --- /dev/null +++ b/tests/speed/lists-ul-record.php @@ -0,0 +1,429 @@ + + + + + + jQuery Mobile Docs - Lists + + + + + + + + +
          + +
          +

          400 item list

          +
          + +
          + + +
          +
          + + + diff --git a/tests/speed/lists-ul.html b/tests/speed/lists-ul.html old mode 100755 new mode 100644 index d0614ea7..11e371bc --- a/tests/speed/lists-ul.html +++ b/tests/speed/lists-ul.html @@ -1,14 +1,14 @@ - - + + - - jQuery Mobile Docs - Lists - - + + jQuery Mobile Docs - Lists + + - - + +
          @@ -17,7 +17,7 @@
          - +
          • Acura
          • Audi
          • @@ -425,3 +425,4 @@ + diff --git a/tests/speed/stats/index.php b/tests/speed/stats/index.php new file mode 100644 index 00000000..6c3335e3 --- /dev/null +++ b/tests/speed/stats/index.php @@ -0,0 +1,34 @@ +query('CREATE TABLE stats (id INTEGER, agent TEXT, point TEXT, value REAL, time TIMESTAMP, PRIMARY KEY (id))'); + + // making a sad attempt here to provide a clean REST-respecting url scheme. + // stats with a GET returns - wait for it - the stats, and a post with the + // the right params will create a new entry + if ( $_SERVER['REQUEST_METHOD'] == "GET" ) { + $json = Array(); + $results = $db->query( 'SELECT agent, point, value, time FROM stats' ); + + // TODO not sure if there's a better way to convert db results into + // a json encodable data structure + while($row = $results->fetch(SQLITE3_ASSOC)){ + array_push($json, $row); + } + + header("Content-Type: application/json"); + echo json_encode($json); + } elseif ( $_POST['datapoint'] && $_POST['value'] && $_POST['agent'] ){ + // TODO it is not clear from the docs if there's an easier way to do the + // escaped query interpolation here. Suggestions welcome :( + $data_point = sqlite_escape_string( $_POST['datapoint'] ); + $value = sqlite_escape_string( $_POST['value'] ); + $agent = sqlite_escape_string( $_POST['agent'] ); + $db->query('INSERT INTO stats (agent, point, value, time) VALUES ("' . $agent . '", "' . $data_point . '",' . $value . ', DATETIME(\'now\'))'); + + echo "success"; + } +?> \ No newline at end of file diff --git a/tests/speed/stats/perf.js b/tests/speed/stats/perf.js new file mode 100644 index 00000000..343c0be6 --- /dev/null +++ b/tests/speed/stats/perf.js @@ -0,0 +1,39 @@ +window.Perf = (function($, Perf) { + $.extend(Perf, { + reportUrl: 'stats/', + revUrl: 'stats/rev.php', + + // should be defined before report or poll are run + currentRev: undefined, + + report: function( data, after ) { + var self = this; + + $.post( self.reportUrl, data, after ); + }, + + poll: function() { + var self = this; + + setInterval(function() { + $.get( self.revUrl, function( data ) { + + // if there's a new revision refresh or currentRev isn't being set + if( self.currentRev && self.currentRev !== data ){ + location.href = location.href; + } + }); + }, 60000); + }, + + setCurrentRev: function() { + var self = this; + + $.get( self.revUrl, function( data ) { + self.currentRev = data; + }); + } + }); + + return Perf; +})(jQuery, window.Perf || {}); diff --git a/tests/speed/stats/rev.php b/tests/speed/stats/rev.php new file mode 100644 index 00000000..bc6faccb --- /dev/null +++ b/tests/speed/stats/rev.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/speed/stats/startup.js b/tests/speed/stats/startup.js new file mode 100644 index 00000000..c3e5bccd --- /dev/null +++ b/tests/speed/stats/startup.js @@ -0,0 +1,41 @@ +(function(Perf) { + var $listPage = $( "#list-page" ), firstCounter = 0; + + Perf.setCurrentRev(); + Perf.pageLoadStart = Date.now(); + + $listPage.live( "pagebeforecreate", function() { + if( firstCounter == 0 ) { + Perf.pageCreateStart = Date.now(); + firstCounter++; + } + }); + + $listPage.live( "pageinit", function( event ) { + // if a child page init is fired ignore it, we only + // want the top level page init event + if( event.target !== $("#list-page")[0] ){ + return; + } + + Perf.pageLoadEnd = Date.now(); + + // report the time taken for a full app boot + Perf.report({ + agent: window.navigator.userAgent, + datapoint: "fullboot", + value: Perf.pageLoadEnd - Perf.pageLoadStart + }); + + // record the time taken to load and enhance the page + // start polling for a new revision + Perf.report({ + agent: window.navigator.userAgent, + datapoint: "pageload", + value: Perf.pageCreateStart - Perf.pageLoadStart, + after: function() { + Perf.poll(); + } + }); + }); +})(window.Perf); diff --git a/tests/unit/dialog/dialog_events.js b/tests/unit/dialog/dialog_events.js index 0e53179f..fb80fa2f 100644 --- a/tests/unit/dialog/dialog_events.js +++ b/tests/unit/dialog/dialog_events.js @@ -2,12 +2,20 @@ * mobile dialog unit tests */ (function($) { - module( "jquery.mobile.dialog.js" ); + module( "jquery.mobile.dialog.js", { + setup: function() { + $.mobile.page.prototype.options.contentTheme = "d"; + } + }); asyncTest( "dialog hash is added when the dialog is opened and removed when closed", function() { - expect( 6 ); + expect( 2 ); $.testHelper.pageSequence([ + function() { + $.mobile.changePage( $( "#mypage" ) ); + }, + function() { //bring up the dialog $( "#foo-dialog-link" ).click(); @@ -19,12 +27,6 @@ // make sure the dialog came up ok( /&ui-state=dialog/.test(location.hash), "ui-state=dialog =~ location.hash", "dialog open" ); - // Assert dialog theme inheritance (issue 1375): - ok( fooDialog.hasClass( "ui-body-b" ), "Expected explicit theme ui-body-b" ); - ok( fooDialog.find( ":jqmData(role=header)" ).hasClass( "ui-bar-a" ), "Expected header to inherit from $.mobile.page.prototype.options.headerTheme" ); - ok( fooDialog.find( ":jqmData(role=content)" ).hasClass( "ui-body-d" ), "Expect content to inherit from $.mobile.page.prototype.options.contentTheme" ); - ok( fooDialog.find( ":jqmData(role=footer)" ).hasClass( "ui-bar-a" ), "Expected footer to inherit from $.mobile.page.prototype.options.footerTheme" ); - // close the dialog $( ".ui-dialog" ).dialog( "close" ); }, @@ -35,4 +37,90 @@ } ]); }); + + asyncTest( "dialog element with no theming", function() { + expect(4); + + $.testHelper.pageSequence([ + function() { + $.mobile.changePage( $( "#mypage" ) ); + }, + + function() { + //bring up the dialog + $( "#link-a" ).click(); + }, + + function() { + var dialog = $( "#dialog-a" ); + + // Assert dialog theme inheritance (issue 1375): + ok( dialog.hasClass( "ui-body-c" ), "Expected explicit theme ui-body-c" ); + ok( dialog.find( ":jqmData(role=header)" ).hasClass( "ui-bar-" + $.mobile.page.prototype.options.footerTheme ), "Expected header to inherit from $.mobile.page.prototype.options.headerTheme" ); + ok( dialog.find( ":jqmData(role=content)" ).hasClass( "ui-body-" + $.mobile.page.prototype.options.contentTheme ), "Expect content to inherit from $.mobile.page.prototype.options.contentTheme" ); + ok( dialog.find( ":jqmData(role=footer)" ).hasClass( "ui-bar-" + $.mobile.page.prototype.options.footerTheme ), "Expected footer to inherit from $.mobile.page.prototype.options.footerTheme" ); + + start(); + } + ]); + }); + + asyncTest( "dialog element with data-theme", function() { + // Reset fallback theme for content + $.mobile.page.prototype.options.contentTheme = null; + + expect(5); + + $.testHelper.pageSequence([ + function() { + $.mobile.changePage( $( "#mypage" ) ); + }, + + function() { + //bring up the dialog + $( "#link-b" ).click(); + }, + + function() { + var dialog = $( "#dialog-b" ); + + // Assert dialog theme inheritance (issue 1375): + ok( dialog.hasClass( "ui-body-e" ), "Expected explicit theme ui-body-e" ); + ok( !dialog.hasClass( "ui-overlay-b" ), "Expected no theme ui-overlay-b" ); + ok( dialog.find( ":jqmData(role=header)" ).hasClass( "ui-bar-" + $.mobile.page.prototype.options.footerTheme ), "Expected header to inherit from $.mobile.page.prototype.options.headerTheme" ); + ok( dialog.find( ":jqmData(role=content)" ).hasClass( "ui-body-e" ), "Expect content to inherit from data-theme" ); + ok( dialog.find( ":jqmData(role=footer)" ).hasClass( "ui-bar-" + $.mobile.page.prototype.options.footerTheme ), "Expected footer to inherit from $.mobile.page.prototype.options.footerTheme" ); + + start(); + } + ]); + }); + + asyncTest( "dialog element with data-theme & data-overlay-theme", function() { + expect(5); + + $.testHelper.pageSequence([ + function() { + $.mobile.changePage( $( "#mypage" ) ); + }, + + function() { + //bring up the dialog + $( "#link-c" ).click(); + }, + + function() { + var dialog = $( "#dialog-c" ); + + // Assert dialog theme inheritance (issue 1375): + ok( dialog.hasClass( "ui-body-e" ), "Expected explicit theme ui-body-e" ); + ok( dialog.hasClass( "ui-overlay-b" ), "Expected explicit theme ui-overlay-b" ); + ok( dialog.find( ":jqmData(role=header)" ).hasClass( "ui-bar-" + $.mobile.page.prototype.options.footerTheme ), "Expected header to inherit from $.mobile.page.prototype.options.headerTheme" ); + ok( dialog.find( ":jqmData(role=content)" ).hasClass( "ui-body-" + $.mobile.page.prototype.options.contentTheme ), "Expect content to inherit from $.mobile.page.prototype.options.contentTheme" ); + ok( dialog.find( ":jqmData(role=footer)" ).hasClass( "ui-bar-" + $.mobile.page.prototype.options.footerTheme ), "Expected footer to inherit from $.mobile.page.prototype.options.footerTheme" ); + + start(); + } + ]); + }); })( jQuery ); diff --git a/tests/unit/dialog/index.html b/tests/unit/dialog/index.html index 8318069e..415b1dca 100644 --- a/tests/unit/dialog/index.html +++ b/tests/unit/dialog/index.html @@ -33,8 +33,11 @@
            - +
            +
            +

            No theme set

            +
            +
            + Some text here.... +
            +
            + footer +
            +
            + +
            +
            +

            data-nstest-theme set

            +
            +
            + Some text here.... +
            +
            + footer +
            +
            + +
            +
            +

            data-nstest-theme & data-nstest-overlay-theme set

            +
            +
            + Some text here.... +
            +
            + footer +
            +
            + diff --git a/tests/unit/navigation/navigation_core.js b/tests/unit/navigation/navigation_core.js index 8d80bd50..a4bfb4e2 100644 --- a/tests/unit/navigation/navigation_core.js +++ b/tests/unit/navigation/navigation_core.js @@ -1043,4 +1043,77 @@ } ]); }); + + asyncTest( "first page gets reloaded if pruned from the DOM", function(){ + var hideCallbackTriggered = false; + + function hideCallback( e, data ) + { + var page = e.target; + ok( ( page === $.mobile.firstPage[ 0 ] ), "hide called with prevPage set to firstPage"); + if ( page === $.mobile.firstPage[ 0 ] ) { + $( page ).remove(); + } + hideCallbackTriggered = true; + } + + $(document).bind('pagehide', hideCallback); + + $.testHelper.pageSequence([ + function(){ + // Make sure the first page is actually in the DOM. + ok( $.mobile.firstPage.parent().length !== 0, "first page is currently in the DOM" ); + + // Make sure the first page is the active page. + ok( $.mobile.activePage[ 0 ] === $.mobile.firstPage[ 0 ], "first page is the active page" ); + + // Now make sure the first page has an id that we can use to reload it. + ok( $.mobile.firstPage[ 0 ].id, "first page has an id" ); + + // Make sure there is only one first page in the DOM. + same( $( ".first-page" ).length, 1, "only one instance of the first page in the DOM" ); + + // Navigate to any page except the first page of the application. + $.testHelper.openPage("#foo"); + }, + + function(){ + // Make sure the active page is #foo. + ok( $.mobile.activePage[ 0 ] === $( "#foo" )[ 0 ], "navigated successfully to #foo" ); + + // Make sure our hide callback was triggered. + ok( hideCallbackTriggered, "hide callback was triggered" ); + + // Make sure the first page was actually pruned from the document. + ok( $.mobile.firstPage.parent().length === 0, "first page was pruned from the DOM" ); + same( $( ".first-page" ).length, 0, "no instance of the first page in the DOM" ); + + // Remove our hideCallback. + $(document).unbind('pagehide', hideCallback); + + // Navigate back to the first page! + $.testHelper.openPage( "#" + $.mobile.firstPage[0].id ); + }, + + function(){ + var firstPage = $( ".first-page" ); + + // We should only have one first page in the document at any time! + same( firstPage.length, 1, "single instance of first page recreated in the DOM" ); + + // Make sure the first page in the DOM is actually a different DOM element than the original + // one we started with. + ok( $.mobile.firstPage[ 0 ] !== firstPage[ 0 ], "first page is a new DOM element"); + + // Make sure we actually navigated to the new first page. + ok( $.mobile.activePage[ 0 ] === firstPage[ 0 ], "navigated successfully to new first-page"); + + // Reset the $.mobile.firstPage for subsequent tests. + // XXX: Should we just get rid of the new one and restore the old? + $.mobile.firstPage = $.mobile.activePage; + + start(); + } + ]); + }); })(jQuery);