dolla dolla bills y'all.

Fixes #126, Fixes #346
This commit is contained in:
scottjehl 2010-11-11 10:49:15 -05:00
parent 2c1760482c
commit a24196e550
20 changed files with 86 additions and 86 deletions

View file

@ -4,12 +4,12 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function( jQuery ) {
(function($, undefined ) {
jQuery.fn.buttonMarkup = function( options ){
$.fn.buttonMarkup = function( options ){
return this.each( function() {
var el = jQuery( this ),
o = jQuery.extend( {}, jQuery.fn.buttonMarkup.defaults, el.data(), options),
var el = $( this ),
o = $.extend( {}, $.fn.buttonMarkup.defaults, el.data(), options),
// Classes Defined
buttonClass,
@ -74,7 +74,7 @@ jQuery.fn.buttonMarkup = function( options ){
});
};
jQuery.fn.buttonMarkup.defaults = {
$.fn.buttonMarkup.defaults = {
corners: true,
shadow: true,
iconshadow: true,
@ -82,22 +82,22 @@ jQuery.fn.buttonMarkup.defaults = {
};
var attachEvents = function() {
jQuery(".ui-btn").live({
$(".ui-btn").live({
mousedown: function() {
var theme = jQuery(this).attr( "data-theme" );
jQuery(this).removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme );
var theme = $(this).attr( "data-theme" );
$(this).removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme );
},
mouseup: function() {
var theme = jQuery(this).attr( "data-theme" );
jQuery(this).removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
var theme = $(this).attr( "data-theme" );
$(this).removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
},
"mouseover focus": function() {
var theme = jQuery(this).attr( "data-theme" );
jQuery(this).removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme );
var theme = $(this).attr( "data-theme" );
$(this).removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme );
},
"mouseout blur": function() {
var theme = jQuery(this).attr( "data-theme" );
jQuery(this).removeClass( "ui-btn-hover-" + theme ).addClass( "ui-btn-up-" + theme );
var theme = $(this).attr( "data-theme" );
$(this).removeClass( "ui-btn-hover-" + theme ).addClass( "ui-btn-up-" + theme );
}
});

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( $ ) {
(function($, undefined ) {
$.widget( "mobile.collapsible", $.mobile.widget, {
options: {
expandCueText: ' click to expand contents',

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function($){
(function($, undefined ) {
$.fn.controlgroup = function(options){
return $(this).each(function(){

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( $ ) {
(function($, undefined ) {
$.widget( "mobile.dialog", $.mobile.widget, {
options: {},
_create: function(){

View file

@ -1,4 +1,4 @@
(function( $ ) {
(function($, undefined ) {
// add new event shortcuts
$.each( "touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split( " " ), function( i, name ) {
@ -158,19 +158,19 @@ $.event.special.swipe = {
}
};
(function(jQuery){
(function($){
// "Cowboy" Ben Alman
var win = jQuery(window),
var win = $(window),
special_event,
get_orientation,
last_orientation;
jQuery.event.special.orientationchange = special_event = {
$.event.special.orientationchange = special_event = {
setup: function(){
// If the event is supported natively, return false so that jQuery
// will bind to the event using DOM methods.
if ( jQuery.support.orientation ) { return false; }
if ( $.support.orientation ) { return false; }
// Get the current orientation to avoid initial double-triggering.
last_orientation = get_orientation();
@ -182,7 +182,7 @@ $.event.special.swipe = {
teardown: function(){
// If the event is not supported natively, return false so that
// jQuery will unbind the event using DOM methods.
if ( jQuery.support.orientation ) { return false; }
if ( $.support.orientation ) { return false; }
// Because the orientationchange event doesn't exist, unbind the
// resize event handler.

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function($){
(function($, undefined ) {
$.fn.fieldcontain = function(options){
var o = $.extend({
theme: 'c'

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function($){
(function($, undefined ) {
$.fn.fixHeaderFooter = function(options){
if( !$.support.scrollTop ){ return $(this); }
return $(this).each(function(){
@ -58,7 +58,7 @@ $.fixedToolbars = (function(){
//function to return another footer already in the dom with the same data-id
function findStickyFooter(el){
var thisFooter = el.find('[data-role="footer"]');
return jQuery( '.ui-footer[data-id="'+ thisFooter.data('id') +'"]:not(.ui-footer-duplicate)' ).not(thisFooter);
return $( '.ui-footer[data-id="'+ thisFooter.data('id') +'"]:not(.ui-footer-duplicate)' ).not(thisFooter);
}
//before page is shown, check for duplicate footer

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( $ ) {
(function($, undefined ) {
$.widget( "mobile.button", $.mobile.widget, {
options: {
theme: null,

View file

@ -4,14 +4,14 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( $ ) {
(function($, undefined ) {
$.widget( "mobile.checkboxradio", $.mobile.widget, {
options: {
theme: null
},
_create: function(){
var input = this.element,
label = jQuery("label[for='" + input.attr( "id" ) + "']"),
label = $("label[for='" + input.attr( "id" ) + "']"),
inputtype = input.attr( "type" ),
checkedicon = "ui-icon-" + inputtype + "-on",
uncheckedicon = "ui-icon-" + inputtype + "-off";
@ -53,7 +53,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
.bind({
click: function() {
jQuery( "input[name='" + input.attr( "name" ) + "'][type='" + inputtype + "']" ).checkboxradio( "refresh" );
$( "input[name='" + input.attr( "name" ) + "'][type='" + inputtype + "']" ).checkboxradio( "refresh" );
},
focus: function() {
@ -71,7 +71,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
refresh: function( ){
var input = this.element,
label = jQuery("label[for='" + input.attr( "id" ) + "']"),
label = $("label[for='" + input.attr( "id" ) + "']"),
inputtype = input.attr( "type" ),
icon = label.find( ".ui-icon" ),
checkedicon = "ui-icon-" + inputtype + "-on",

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( $ ) {
(function($, undefined ) {
$.widget( "mobile.selectmenu", $.mobile.widget, {
options: {
theme: null,

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( $ ) {
(function($, undefined ) {
$.widget( "mobile.slider", $.mobile.widget, {
options: {
theme: null,

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( $ ) {
(function($, undefined ) {
$.widget( "mobile.textinput", $.mobile.widget, {
options: {
theme: null

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function($){
(function($, undefined ) {
$.fn.grid = function(options){
return $(this).each(function(){
var o = $.extend({

View file

@ -10,7 +10,7 @@
(function( $, window, undefined ) {
//jQuery.mobile configurable options
jQuery.mobile = {
$.mobile = {
//define the url parameter used for referencing widget-generated sub-pages.
//Translates to to example.html&ui-page=subpageIdentifier
@ -51,7 +51,7 @@
//support conditions that must be met in order to proceed
gradeA: function(){
return jQuery.support.mediaquery;
return $.support.mediaquery;
}
};
@ -60,14 +60,14 @@
//if device support condition(s) aren't met, leave things as they are -> a basic, usable experience,
//otherwise, proceed with the enhancements
if ( !jQuery.mobile.gradeA() ) {
if ( !$.mobile.gradeA() ) {
return;
}
//define vars for interal use
var $window = jQuery(window),
$html = jQuery('html'),
$head = jQuery('head'),
var $window = $(window),
$html = $('html'),
$head = $('head'),
//to be populated at DOM ready
$body,
@ -75,7 +75,7 @@
//loading div which appears during Ajax requests
//will not appear if $.mobile.loadingMessage is false
$loader = $.mobile.loadingMessage ?
jQuery('<div class="ui-loader ui-body-a ui-corner-all">'+
$('<div class="ui-loader ui-body-a ui-corner-all">'+
'<span class="ui-icon ui-icon-loading spin"></span>'+
'<h1>'+ $.mobile.loadingMessage +'</h1>'+
'</div>')
@ -140,12 +140,12 @@
// hide address bar
function silentScroll( ypos ) {
// prevent scrollstart and scrollstop events
jQuery.event.special.scrollstart.enabled = false;
$.event.special.scrollstart.enabled = false;
setTimeout(function() {
window.scrollTo( 0, ypos || 0 );
},20);
setTimeout(function() {
jQuery.event.special.scrollstart.enabled = true;
$.event.special.scrollstart.enabled = true;
}, 150 );
}
@ -201,7 +201,7 @@
});
//click routing - direct to HTTP or Ajax, accordingly
jQuery( "a" ).live( "click", function(event) {
$( "a" ).live( "click", function(event) {
var $this = $(this),
//get href, remove same-domain protocol and host
href = $this.attr( "href" ).replace( location.protocol + "//" + location.host, ""),
@ -352,7 +352,7 @@
function transitionPages() {
//kill the keyboard
jQuery( window.document.activeElement ).blur();
$( window.document.activeElement ).blur();
//get current scroll distance
var currScroll = $window.scrollTop();
@ -415,12 +415,12 @@
//get the actual file in a jq-mobile nested url
function getFileURL( url ){
return url.match( '&' + jQuery.mobile.subPageUrlKey ) ? url.split( '&' + jQuery.mobile.subPageUrlKey )[0] : url;
return url.match( '&' + $.mobile.subPageUrlKey ) ? url.split( '&' + $.mobile.subPageUrlKey )[0] : url;
}
//if url is a string
if( url ){
to = jQuery( "[id='" + url + "']" ),
to = $( "[id='" + url + "']" ),
fileUrl = getFileURL(url);
}
else{ //find base url of element, if avail
@ -454,7 +454,7 @@
data: data,
success: function( html ) {
setBaseURL(fileUrl);
var all = jQuery("<div></div>");
var all = $("<div></div>");
//workaround to allow scripts to execute when included in page divs
all.get(0).innerHTML = html;
to = all.find('[data-role="page"]');
@ -490,7 +490,7 @@
error: function() {
pageLoading( true );
removeActiveLinkClass(true);
jQuery("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>Error Loading Page</h1></div>")
$("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>Error Loading Page</h1></div>")
.css({ "display": "block", "opacity": 0.96, "top": $(window).scrollTop() + 100 })
.appendTo( $pageContainer )
.delay( 800 )
@ -504,9 +504,9 @@
};
jQuery(function() {
$(function() {
$body = jQuery( "body" );
$body = $( "body" );
pageLoading();
// needs to be bound at domready (for IE6)
@ -600,9 +600,9 @@
//animation complete callback
//TODO - update support test and create special event for transitions
//check out transitionEnd (opera per Paul's request)
jQuery.fn.animationComplete = function(callback){
if(jQuery.support.cssTransitions){
return jQuery(this).one('webkitAnimationEnd', callback);
$.fn.animationComplete = function(callback){
if($.support.cssTransitions){
return $(this).one('webkitAnimationEnd', callback);
}
else{
callback();
@ -610,22 +610,22 @@
};
//TODO - add to jQuery.mobile, not $
jQuery.extend({
$.extend({
pageLoading: pageLoading,
changePage: changePage,
silentScroll: silentScroll
});
//dom-ready
jQuery(function(){
var $pages = jQuery("[data-role='page']");
$(function(){
var $pages = $("[data-role='page']");
//set up active page
$startPage = $.activePage = $pages.first();
//set page container
$pageContainer = $startPage.parent().addClass('ui-mobile-viewport');
jQuery.extend({
$.extend({
pageContainer: $pageContainer
});

View file

@ -1,4 +1,4 @@
(function( $ ) {
(function($, undefined ) {
$.mobile.listview.prototype.options.filter = false;

View file

@ -4,9 +4,9 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function( jQuery ) {
(function($, undefined ) {
jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
$.widget( "mobile.listview", $.mobile.widget, {
options: {
theme: "c",
countTheme: "c",
@ -31,7 +31,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
}
$list.delegate( ".ui-li", "focusin", function() {
jQuery( this ).attr( "tabindex", "0" );
$( this ).attr( "tabindex", "0" );
});
this._itemApply( $list, $list );
@ -40,7 +40,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
//keyboard events for menu items
$list.keydown(function( e ) {
var target = jQuery( e.target ),
var target = $( e.target ),
li = target.closest( "li" );
// switch logic based on which key was pressed
@ -111,8 +111,8 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
// tapping the whole LI triggers click on the first link
$list.delegate( "li", "click", function(event) {
if ( !jQuery( event.target ).closest( "a" ).length ) {
jQuery( this ).find( "a" ).first().trigger( "click" );
if ( !$( event.target ).closest( "a" ).length ) {
$( this ).find( "a" ).first().trigger( "click" );
return false;
}
});
@ -128,8 +128,8 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
item.find( "p, dl" ).addClass( "ui-li-desc" );
item.find( "img" ).addClass( "ui-li-thumb" ).each(function() {
jQuery( this ).closest( "li" )
.addClass( jQuery(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
$( this ).closest( "li" )
.addClass( $(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
});
var aside = item.find( ".ui-li-aside" );
@ -140,7 +140,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
});
}
if ( jQuery.support.cssPseudoElement || !jQuery.nodeName( item[0], "ol" ) ) {
if ( $.support.cssPseudoElement || !$.nodeName( item[0], "ol" ) ) {
return;
}
},
@ -153,7 +153,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
self = this,
dividertheme = $list.data( "dividertheme" ) || o.dividerTheme,
li = $list.children( "li" ),
counter = jQuery.support.cssPseudoElement || !jQuery.nodeName( $list[0], "ol" ) ? 0 : 1;
counter = $.support.cssPseudoElement || !$.nodeName( $list[0], "ol" ) ? 0 : 1;
if ( counter ) {
$list.find( ".ui-li-dec" ).remove();
@ -164,7 +164,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
li.first().attr( "tabindex", "0" );
li.each(function( pos ) {
var item = jQuery( this ),
var item = $( this ),
itemClass = "ui-li";
// If we're creating the element, we update it regardless
@ -205,7 +205,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
iconpos: false
})
.find( ".ui-btn-inner" )
.append( jQuery( "<span>" ).buttonMarkup({
.append( $( "<span>" ).buttonMarkup({
shadow: true,
corners: true,
theme: splittheme,
@ -277,8 +277,8 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
o = this.options,
persistentFooterID = parentPage.find( "[data-role='footer']" ).data( "id" );
jQuery( parentList.find( "ul, ol" ).toArray().reverse() ).each(function( i ) {
var list = jQuery( this ),
$( parentList.find( "ul, ol" ).toArray().reverse() ).each(function( i ) {
var list = $( this ),
parent = list.parent(),
title = parent.contents()[ 0 ].nodeValue.split("\n")[0],
id = parentId + "&" + $.mobile.subPageUrlKey + "=" + $.mobile.idStringEscape(title + " " + i),
@ -294,7 +294,7 @@ jQuery.widget( "mobile.listview", jQuery.mobile.widget, {
"data-theme": theme,
"data-count-theme": countTheme
})
.appendTo( jQuery.pageContainer );
.appendTo( $.pageContainer );

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( $ ) {
(function($, undefined ) {
$.widget( "mobile.navbar", $.mobile.widget, {
options: {
iconpos: 'top'

View file

@ -4,9 +4,9 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function ( jQuery ) {
(function($, undefined ) {
jQuery.widget( "mobile.page", jQuery.mobile.widget, {
$.widget( "mobile.page", $.mobile.widget, {
options: {
backBtnText: "Back",
addBackBtn: true,
@ -39,7 +39,7 @@ jQuery.widget( "mobile.page", jQuery.mobile.widget, {
// classes so we'll handle page and content roles outside of the main role processing
// loop below.
$elem.find( "[data-role='page'], [data-role='content']" ).andSelf().each(function() {
jQuery(this).addClass( "ui-" + jQuery(this).data( "role" ) );
$(this).addClass( "ui-" + $(this).data( "role" ) );
});
$elem.find( "[data-role='nojs']" ).addClass( "ui-nojs" );
@ -48,7 +48,7 @@ jQuery.widget( "mobile.page", jQuery.mobile.widget, {
// pre-find data els
var $dataEls = $elem.find( "[data-role]" ).andSelf().each(function() {
var $this = jQuery( this ),
var $this = $( this ),
role = $this.data( "role" ),
theme = $this.data( "theme" );
@ -74,10 +74,10 @@ jQuery.widget( "mobile.page", jQuery.mobile.widget, {
// auto-add back btn on pages beyond first view
if ( o.addBackBtn && role === "header" &&
(jQuery.mobile.urlStack.length > 1 || jQuery(".ui-page").length > 1) &&
($.mobile.urlStack.length > 1 || $(".ui-page").length > 1) &&
!leftbtn && !$this.data( "noBackBtn" ) ) {
jQuery( "<a href='#' class='ui-btn-left' data-icon='arrow-l'>"+ o.backBtnText +"</a>" )
$( "<a href='#' class='ui-btn-left' data-icon='arrow-l'>"+ o.backBtnText +"</a>" )
.click(function() {
history.back();
return false;
@ -143,8 +143,8 @@ jQuery.widget( "mobile.page", jQuery.mobile.widget, {
this.element.find( "input" ).each(function() {
var type = this.getAttribute( "type" );
if ( o.degradeInputs[ type ] ) {
jQuery( this ).replaceWith(
jQuery( "<div>" ).html( jQuery(this).clone() ).html()
$( this ).replaceWith(
$( "<div>" ).html( $(this).clone() ).html()
.replace( /type="([a-zA-Z]+)"/, "data-type='$1'" ) );
}
});

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function( $ ) {
(function($, undefined ) {
// test whether a CSS media type or query applies
$.media = (function() {

View file

@ -4,7 +4,7 @@
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* Note: Code is in draft form and is subject to change
*/
(function( $ ) {
(function($, undefined ) {
$.widget( "mobile.widget", {
_getCreateOptions: function() {