From cf04068ebaa76ee2c553830e2dea78cafefdf618 Mon Sep 17 00:00:00 2001 From: Ghislain Seguin Date: Wed, 7 Dec 2011 22:08:30 -0800 Subject: [PATCH] Assume jquery is loaded so don't require it --- js/jquery.mobile.buttonMarkup.js | 2 +- js/jquery.mobile.collapsible.js | 2 +- js/jquery.mobile.collapsibleSet.js | 2 +- js/jquery.mobile.controlGroup.js | 2 +- js/jquery.mobile.core.js | 2 +- js/jquery.mobile.degradeInputs.js | 2 +- js/jquery.mobile.dialog.js | 2 +- js/jquery.mobile.event.js | 2 +- js/jquery.mobile.fieldContain.js | 2 +- js/jquery.mobile.fixHeaderFooter.js | 2 +- js/jquery.mobile.fixHeaderFooter.native.js | 2 +- js/jquery.mobile.forms.button.js | 2 +- js/jquery.mobile.forms.checkboxradio.js | 2 +- js/jquery.mobile.forms.select.custom.js | 2 +- js/jquery.mobile.forms.select.js | 2 +- js/jquery.mobile.forms.slider.js | 2 +- js/jquery.mobile.forms.textinput.js | 2 +- js/jquery.mobile.grid.js | 2 +- js/jquery.mobile.hashchange.js | 2 +- js/jquery.mobile.init.js | 2 +- js/jquery.mobile.js | 5 ++--- js/jquery.mobile.links.js | 2 +- js/jquery.mobile.listview.filter.js | 2 +- js/jquery.mobile.listview.js | 2 +- js/jquery.mobile.media.js | 2 +- js/jquery.mobile.navbar.js | 2 +- js/jquery.mobile.navigation.js | 2 +- js/jquery.mobile.navigation.pushstate.js | 2 +- js/jquery.mobile.nojs.js | 2 +- js/jquery.mobile.page.js | 2 +- js/jquery.mobile.page.sections.js | 2 +- js/jquery.mobile.support.js | 2 +- js/jquery.mobile.transition.js | 2 +- js/jquery.mobile.vmouse.js | 2 +- js/jquery.mobile.widget.js | 2 +- js/jquery.ui.widget.js | 2 +- 36 files changed, 37 insertions(+), 38 deletions(-) diff --git a/js/jquery.mobile.buttonMarkup.js b/js/jquery.mobile.buttonMarkup.js index a2d0832b..cd523244 100755 --- a/js/jquery.mobile.buttonMarkup.js +++ b/js/jquery.mobile.buttonMarkup.js @@ -2,7 +2,7 @@ * "buttons" plugin - for making button-like links */ -define( [ "jquery", "jquery.mobile.vmouse" ], function( $, undefined ) { +define( [ "jquery.mobile.vmouse" ], function() { $.fn.buttonMarkup = function( options ) { options = options || {}; diff --git a/js/jquery.mobile.collapsible.js b/js/jquery.mobile.collapsible.js index 969c419a..74495271 100644 --- a/js/jquery.mobile.collapsible.js +++ b/js/jquery.mobile.collapsible.js @@ -2,7 +2,7 @@ * "collapsible" plugin */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) { +define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { $.widget( "mobile.collapsible", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.collapsibleSet.js b/js/jquery.mobile.collapsibleSet.js index f0786297..749e0cb7 100644 --- a/js/jquery.mobile.collapsibleSet.js +++ b/js/jquery.mobile.collapsibleSet.js @@ -2,7 +2,7 @@ * "collapsibleset" plugin */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.collapsible" ], function( $ ) { +define( [ "jquery.mobile.widget", "jquery.mobile.collapsible" ], function() { $.widget( "mobile.collapsibleset", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.controlGroup.js b/js/jquery.mobile.controlGroup.js index ce5fd18a..9401cb3e 100644 --- a/js/jquery.mobile.controlGroup.js +++ b/js/jquery.mobile.controlGroup.js @@ -2,7 +2,7 @@ * "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc */ -define( [ "jquery" ], function( $, undefined ) { +define(function() { $.fn.controlgroup = function( options ) { diff --git a/js/jquery.mobile.core.js b/js/jquery.mobile.core.js index f2ef1202..b1a3af94 100644 --- a/js/jquery.mobile.core.js +++ b/js/jquery.mobile.core.js @@ -2,7 +2,7 @@ * "core" - The base file for jQm */ -define( [ "jquery" ], function( $, undefined ) { +define(function() { var nsNormalizeDict = {}; diff --git a/js/jquery.mobile.degradeInputs.js b/js/jquery.mobile.degradeInputs.js index 4350af13..061a63df 100644 --- a/js/jquery.mobile.degradeInputs.js +++ b/js/jquery.mobile.degradeInputs.js @@ -2,7 +2,7 @@ * "degradeInputs" plugin - degrades inputs to another type after custom enhancements are made. */ -define( [ "jquery", "jquery.mobile.page" ], function( $, undefined ) { +define( [ "jquery.mobile.page" ], function() { $.mobile.page.prototype.options.degradeInputs = { color: false, diff --git a/js/jquery.mobile.dialog.js b/js/jquery.mobile.dialog.js index 8d2922bd..256b0a92 100644 --- a/js/jquery.mobile.dialog.js +++ b/js/jquery.mobile.dialog.js @@ -2,7 +2,7 @@ * "dialog" plugin. */ -define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) { +define( [ "jquery.mobile.widget" ], function() { $.widget( "mobile.dialog", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.event.js b/js/jquery.mobile.event.js index a0f7d800..c44b3438 100644 --- a/js/jquery.mobile.event.js +++ b/js/jquery.mobile.event.js @@ -2,7 +2,7 @@ * "events" plugin - Handles events */ -define( [ "jquery", "jquery.mobile.support", "jquery.mobile.vmouse" ], function( $, undefined ) { +define( [ "jquery.mobile.support", "jquery.mobile.vmouse" ], function() { // add new event shortcuts $.each( ( "touchstart touchmove touchend orientationchange throttledresize " + diff --git a/js/jquery.mobile.fieldContain.js b/js/jquery.mobile.fieldContain.js index 896d2a72..b03cbea5 100644 --- a/js/jquery.mobile.fieldContain.js +++ b/js/jquery.mobile.fieldContain.js @@ -2,7 +2,7 @@ * "fieldcontain" plugin - simple class additions to make form row separators */ -define( [ "jquery" ], function( $, undefined ) { +define(function() { $.fn.fieldcontain = function( options ) { return this.addClass( "ui-field-contain ui-body ui-br" ); diff --git a/js/jquery.mobile.fixHeaderFooter.js b/js/jquery.mobile.fixHeaderFooter.js index 3db44397..e0276954 100644 --- a/js/jquery.mobile.fixHeaderFooter.js +++ b/js/jquery.mobile.fixHeaderFooter.js @@ -2,7 +2,7 @@ * "fixHeaderFooter" plugin - on-demand positioning for headers,footers */ -define( [ "jquery", "jquery.mobile.vmouse" ], function( $, undefined ) { +define( [ "jquery.mobile.vmouse" ], function() { var slideDownClass = "ui-header-fixed ui-fixed-inline fade", slideUpClass = "ui-footer-fixed ui-fixed-inline fade", diff --git a/js/jquery.mobile.fixHeaderFooter.native.js b/js/jquery.mobile.fixHeaderFooter.native.js index 44d91af9..0443f4c6 100644 --- a/js/jquery.mobile.fixHeaderFooter.native.js +++ b/js/jquery.mobile.fixHeaderFooter.native.js @@ -2,7 +2,7 @@ * "fixHeaderFooter" native plugin - Behavior for "fixed" headers,footers, and scrolling inner content */ -define( [ "jquery", "jquery.mobile.core" ], function( $, undefined ) { +define( [ "jquery.mobile.core" ], function() { // Enable touch overflow scrolling when it's natively supported $.mobile.touchOverflowEnabled = false; diff --git a/js/jquery.mobile.forms.button.js b/js/jquery.mobile.forms.button.js index 431fdff0..8304cb33 100644 --- a/js/jquery.mobile.forms.button.js +++ b/js/jquery.mobile.forms.button.js @@ -2,7 +2,7 @@ * "button" plugin - links that proxy to native input/buttons */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) { +define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { $.widget( "mobile.button", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.forms.checkboxradio.js b/js/jquery.mobile.forms.checkboxradio.js index b363a173..fcac3351 100644 --- a/js/jquery.mobile.forms.checkboxradio.js +++ b/js/jquery.mobile.forms.checkboxradio.js @@ -2,7 +2,7 @@ * "checkboxradio" plugin */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function( $, undefined ) { +define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function() { $.widget( "mobile.checkboxradio", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.forms.select.custom.js b/js/jquery.mobile.forms.select.custom.js index 099eca97..27979a8a 100644 --- a/js/jquery.mobile.forms.select.custom.js +++ b/js/jquery.mobile.forms.select.custom.js @@ -2,7 +2,7 @@ * custom "selectmenu" plugin */ -define( [ "jquery", "jquery.mobile.forms.select", "jquery.mobile.buttonMarkup" ], function( $, undefined ) { +define( [ "jquery.mobile.forms.select", "jquery.mobile.buttonMarkup" ], function() { var extendSelect = function( widget ){ var select = widget.select, diff --git a/js/jquery.mobile.forms.select.js b/js/jquery.mobile.forms.select.js index c6c419e7..952dc274 100644 --- a/js/jquery.mobile.forms.select.js +++ b/js/jquery.mobile.forms.select.js @@ -2,7 +2,7 @@ * "selectmenu" plugin */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function( $, undefined ) { +define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function() { $.widget( "mobile.selectmenu", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.forms.slider.js b/js/jquery.mobile.forms.slider.js index 975ea6ef..c47dbfce 100644 --- a/js/jquery.mobile.forms.slider.js +++ b/js/jquery.mobile.forms.slider.js @@ -2,7 +2,7 @@ * "slider" plugin */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function( $, undefined ) { +define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function() { $.widget( "mobile.slider", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.forms.textinput.js b/js/jquery.mobile.forms.textinput.js index a1b40cca..5f8e0fa5 100644 --- a/js/jquery.mobile.forms.textinput.js +++ b/js/jquery.mobile.forms.textinput.js @@ -2,7 +2,7 @@ * "textinput" plugin for text inputs, textareas */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) { +define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { $.widget( "mobile.textinput", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.grid.js b/js/jquery.mobile.grid.js index 44817427..c23864d1 100644 --- a/js/jquery.mobile.grid.js +++ b/js/jquery.mobile.grid.js @@ -2,7 +2,7 @@ * plugin for creating CSS grids */ -define( [ "jquery" ], function( $, undefined ) { +define(function() { $.fn.grid = function( options ) { return this.each(function() { diff --git a/js/jquery.mobile.hashchange.js b/js/jquery.mobile.hashchange.js index d3df16a1..f2993944 100644 --- a/js/jquery.mobile.hashchange.js +++ b/js/jquery.mobile.hashchange.js @@ -76,7 +76,7 @@ // extra awesomeness that BBQ provides. This plugin will be included as // part of jQuery BBQ, but also be available separately. -define( [ "jquery" ], function( $, undefined ){ +define(function(){ '$:nomunge'; // Used by YUI compressor. // Reused string. diff --git a/js/jquery.mobile.init.js b/js/jquery.mobile.init.js index 26c58412..dad22b01 100644 --- a/js/jquery.mobile.init.js +++ b/js/jquery.mobile.init.js @@ -2,7 +2,7 @@ * "init" - Initialize the framework */ -define( [ "jquery", "jquery.mobile.core", "jquery.mobile.navigation" ], function( $, undefined ) { +define( [ "jquery.mobile.core", "jquery.mobile.navigation" ], function() { var $html = $( "html" ), $head = $( "head" ), $window = $( window ); diff --git a/js/jquery.mobile.js b/js/jquery.mobile.js index 8d76f7ca..93d0e4d5 100644 --- a/js/jquery.mobile.js +++ b/js/jquery.mobile.js @@ -32,8 +32,7 @@ define([ 'order!jquery.mobile.controlGroup', 'jquery.mobile.links', 'jquery.mobile.fixHeaderFooter', - 'jquery.mobile.fixHeaderFooter.native', - 'order!jquery.mobile.init' + 'jquery.mobile.fixHeaderFooter.native' ], function() { - + require( [ 'jquery.mobile.init' ] ); }); \ No newline at end of file diff --git a/js/jquery.mobile.links.js b/js/jquery.mobile.links.js index c42263f4..49ebe923 100644 --- a/js/jquery.mobile.links.js +++ b/js/jquery.mobile.links.js @@ -2,7 +2,7 @@ * "links" plugin - simple class additions for links */ -define( [ "jquery" ], function( $, undefined ) { +define(function() { $( document ).bind( "pagecreate create", function( e ){ diff --git a/js/jquery.mobile.listview.filter.js b/js/jquery.mobile.listview.filter.js index 634556ee..e58c7e8c 100755 --- a/js/jquery.mobile.listview.filter.js +++ b/js/jquery.mobile.listview.filter.js @@ -2,7 +2,7 @@ * "listview" filter extension */ -define( [ "jquery", "jquery.mobile.listview" ], function( $, undefined ) { +define( [ "jquery.mobile.listview" ], function() { $.mobile.listview.prototype.options.filter = false; $.mobile.listview.prototype.options.filterPlaceholder = "Filter items..."; diff --git a/js/jquery.mobile.listview.js b/js/jquery.mobile.listview.js index 7521a8a4..b754244c 100644 --- a/js/jquery.mobile.listview.js +++ b/js/jquery.mobile.listview.js @@ -2,7 +2,7 @@ * "listview" plugin */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) { +define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { //Keeps track of the number of lists per page UID //This allows support for multiple nested list in the same page diff --git a/js/jquery.mobile.media.js b/js/jquery.mobile.media.js index 98c6683c..09b7efaf 100644 --- a/js/jquery.mobile.media.js +++ b/js/jquery.mobile.media.js @@ -2,7 +2,7 @@ * a workaround for window.matchMedia */ -define( [ "jquery", "jquery.mobile.core" ], function( $, undefined ) { +define( [ "jquery.mobile.core" ], function() { var $window = $( window ), $html = $( "html" ); diff --git a/js/jquery.mobile.navbar.js b/js/jquery.mobile.navbar.js index dad70fc3..cf031d11 100644 --- a/js/jquery.mobile.navbar.js +++ b/js/jquery.mobile.navbar.js @@ -2,7 +2,7 @@ * "navbar" plugin */ -define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) { +define( [ "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function() { $.widget( "mobile.navbar", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 8c85266e..da705dfd 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -2,7 +2,7 @@ * core utilities for auto ajax navigation, base tag mgmt, */ -define( [ "jquery", "jquery.mobile.core", "jquery.mobile.hashchange", "jquery.mobile.event" ], function( $, undefined ) { +define( [ "jquery.mobile.core", "jquery.mobile.hashchange", "jquery.mobile.event" ], function() { //define vars for interal use var $window = $( window ), diff --git a/js/jquery.mobile.navigation.pushstate.js b/js/jquery.mobile.navigation.pushstate.js index 8f868bbc..acbb4c7f 100644 --- a/js/jquery.mobile.navigation.pushstate.js +++ b/js/jquery.mobile.navigation.pushstate.js @@ -2,7 +2,7 @@ * history.pushState support, layered on top of hashchange */ -define( [ "jquery", "jquery.mobile.navigation" ], function( $ ) { +define( [ "jquery.mobile.navigation" ], function() { // For now, let's Monkeypatch this onto the end of $.mobile._registerInternalEvents // Scope self to pushStateHandler so we can reference it sanely within the // methods handed off as event handlers diff --git a/js/jquery.mobile.nojs.js b/js/jquery.mobile.nojs.js index b5d4be52..9989bf69 100644 --- a/js/jquery.mobile.nojs.js +++ b/js/jquery.mobile.nojs.js @@ -2,7 +2,7 @@ * "nojs" plugin - class to make elements hidden to A grade browsers */ -define( [ "jquery" ], function( $, undefined ) { +define(function() { $( document ).bind( "pagecreate create", function( e ){ $( ":jqmData(role='nojs')", e.target ).addClass( "ui-nojs" ); diff --git a/js/jquery.mobile.page.js b/js/jquery.mobile.page.js index d12760df..2f81d1e7 100644 --- a/js/jquery.mobile.page.js +++ b/js/jquery.mobile.page.js @@ -2,7 +2,7 @@ * "page" plugin */ -define( [ "jquery", "jquery.mobile.widget" ], function( $, undefined ) { +define( [ "jquery.mobile.widget" ], function() { $.widget( "mobile.page", $.mobile.widget, { options: { diff --git a/js/jquery.mobile.page.sections.js b/js/jquery.mobile.page.sections.js index 700883a6..5a3037fd 100644 --- a/js/jquery.mobile.page.sections.js +++ b/js/jquery.mobile.page.sections.js @@ -2,7 +2,7 @@ * This plugin handles theming and layout of headers, footers, and content areas */ -define( [ "jquery", "jquery.mobile.page" ], function( $, undefined ) { +define( [ "jquery.mobile.page" ], function() { $.mobile.page.prototype.options.backBtnText = "Back"; $.mobile.page.prototype.options.addBackBtn = false; diff --git a/js/jquery.mobile.support.js b/js/jquery.mobile.support.js index 4da33084..659bf0dc 100644 --- a/js/jquery.mobile.support.js +++ b/js/jquery.mobile.support.js @@ -2,7 +2,7 @@ * support tests */ -define( [ "jquery", "jquery.mobile.media" ], function( $, undefined ) { +define( [ "jquery.mobile.media" ], function() { var fakeBody = $( "" ).prependTo( "html" ), fbCSS = fakeBody[ 0 ].style, diff --git a/js/jquery.mobile.transition.js b/js/jquery.mobile.transition.js index d8fe487f..4ec6cc69 100644 --- a/js/jquery.mobile.transition.js +++ b/js/jquery.mobile.transition.js @@ -2,7 +2,7 @@ * "transitions" plugin - Page change tranistions */ -define( [ "jquery", "jquery.mobile.core" ], function( $, undefined ) { +define( [ "jquery.mobile.core" ], function() { function css3TransitionHandler( name, reverse, $to, $from ) { diff --git a/js/jquery.mobile.vmouse.js b/js/jquery.mobile.vmouse.js index 76a6090c..1a34e2b0 100644 --- a/js/jquery.mobile.vmouse.js +++ b/js/jquery.mobile.vmouse.js @@ -17,7 +17,7 @@ // The current version exposes the following virtual events to jQuery bind methods: // "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel" -define( [ "jquery" ], function( $, undefined ) { +define(function() { var dataPropertyName = "virtualMouseBindings", touchTargetPropertyName = "virtualTouchID", diff --git a/js/jquery.mobile.widget.js b/js/jquery.mobile.widget.js index 615c555f..65b575b4 100644 --- a/js/jquery.mobile.widget.js +++ b/js/jquery.mobile.widget.js @@ -2,7 +2,7 @@ * widget factory extentions for mobile */ -define( [ "jquery", "jquery.ui.widget" ], function( $, undefined ) { +define( [ "jquery.ui.widget" ], function() { $.widget( "mobile.widget", { // decorate the parent _createWidget to trigger `widgetinit` for users diff --git a/js/jquery.ui.widget.js b/js/jquery.ui.widget.js index b19ce840..5977c297 100644 --- a/js/jquery.ui.widget.js +++ b/js/jquery.ui.widget.js @@ -8,7 +8,7 @@ * http://docs.jquery.com/UI/Widget */ -define( [ "jquery" ], function( $, undefined ) { +define(function() { // jQuery 1.4+ if ( $.cleanData ) {