mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-04 20:54:46 +00:00
Specified more dependencies
This commit is contained in:
parent
6f13267af7
commit
f3e3121166
16 changed files with 38 additions and 23 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* "buttons" plugin - for making button-like links
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.vmouse" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.core", "jquery.mobile.vmouse" ], function() {
|
||||
|
||||
$.fn.buttonMarkup = function( options ) {
|
||||
options = options || {};
|
||||
|
|
@ -76,6 +76,7 @@ $.fn.buttonMarkup = function( options ) {
|
|||
el.removeClass( "ui-link" ).addClass( buttonClass );
|
||||
|
||||
buttonInner.className = innerClass;
|
||||
buttonInner.setAttribute("aria-hidden", "true");
|
||||
|
||||
buttonText.className = textClass;
|
||||
buttonInner.appendChild( buttonText );
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "collapsible" plugin
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.widget" ], function() {
|
||||
|
||||
$.widget( "mobile.collapsible", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc
|
||||
*/
|
||||
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.buttonMarkup" ], function() {
|
||||
|
||||
$.fn.controlgroup = function( options ) {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ define( [ "jquery" ], function( $, undefined ) {
|
|||
var nsNormalizeDict = {};
|
||||
|
||||
// jQuery.mobile configurable options
|
||||
$.extend( $.mobile, {
|
||||
$.extend( { mobile: {
|
||||
|
||||
// Namespace used framework-wide for data-attrs. Default is no namespace
|
||||
ns: "",
|
||||
|
|
@ -174,7 +174,7 @@ define( [ "jquery" ], function( $, undefined ) {
|
|||
.closest(':jqmData(role="page"), :jqmData(role="dialog")')
|
||||
.data("page");
|
||||
}
|
||||
});
|
||||
}});
|
||||
|
||||
// Mobile version of data and removeData and hasData methods
|
||||
// ensures all data is set and retrieved using jQuery Mobile's data namespace
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "events" plugin - Handles events
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.support", "jquery.mobile.vmouse" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.core", "jquery.mobile.support", "jquery.mobile.vmouse" ], function() {
|
||||
|
||||
// add new event shortcuts
|
||||
$.each( ( "touchstart touchmove touchend orientationchange throttledresize " +
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "checkboxradio" plugin
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.core", "jquery.mobile.widget" ], function() {
|
||||
|
||||
$.widget( "mobile.checkboxradio", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* custom "selectmenu" plugin
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.forms.select", "jquery.mobile.buttonMarkup" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.core", "jquery.mobile.forms.select" ], function() {
|
||||
var extendSelect = function( widget ){
|
||||
|
||||
var select = widget.select,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "selectmenu" plugin
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.core", "jquery.mobile.widget" ], function() {
|
||||
|
||||
$.widget( "mobile.selectmenu", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "slider" plugin
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup", "jquery.mobile.vmouse" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.core", "jquery.mobile.widget", "jquery.mobile.forms.textInput" ], function() {
|
||||
|
||||
$.widget( "mobile.slider", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "textinput" plugin for text inputs, textareas
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.core", "jquery.mobile.widget", "jquery.mobile.degradeInputs" ], function() {
|
||||
|
||||
$.widget( "mobile.textinput", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
|
|||
|
|
@ -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", "jquery.mobile.navigation.pushState" ], function() {
|
||||
var $html = $( "html" ),
|
||||
$head = $( "head" ),
|
||||
$window = $( window );
|
||||
|
|
@ -98,6 +98,24 @@ define( [ "jquery", "jquery.mobile.core", "jquery.mobile.navigation" ], function
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// This function injects a meta viewport tag to prevent scaling. Off by default, on by default when touchOverflow scrolling is enabled
|
||||
function disableZoom() {
|
||||
var cont = "user-scalable=no",
|
||||
meta = $( "meta[name='viewport']" );
|
||||
|
||||
if( meta.length ){
|
||||
meta.attr( "content", meta.attr( "content" ) + ", " + cont );
|
||||
}
|
||||
else{
|
||||
$( "head" ).prepend( "<meta>", { "name": "viewport", "content": cont } );
|
||||
}
|
||||
}
|
||||
|
||||
// if touch-overflow is enabled, disable user scaling, as it creates usability issues
|
||||
if( $.support.touchOverflow && $.mobile.touchOverflowEnabled && !$.mobile.touchOverflowZoomEnabled ){
|
||||
disableZoom();
|
||||
}
|
||||
|
||||
// initialize events now, after mobileinit has occurred
|
||||
$.mobile._registerInternalEvents();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "links" plugin - simple class additions for links
|
||||
*/
|
||||
|
||||
define( [ "jquery" ], function( $, undefined ) {
|
||||
define( function() {
|
||||
|
||||
$( document ).bind( "pagecreate create", function( e ){
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "listview" plugin
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.widget" ], function() {
|
||||
|
||||
//Keeps track of the number of lists per page UID
|
||||
//This allows support for multiple nested list in the same page
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* "navbar" plugin
|
||||
*/
|
||||
|
||||
define( [ "jquery", "jquery.mobile.widget", "jquery.mobile.buttonMarkup" ], function( $, undefined ) {
|
||||
define( [ "jquery.mobile.widget" ], function() {
|
||||
|
||||
$.widget( "mobile.navbar", $.mobile.widget, {
|
||||
options: {
|
||||
|
|
|
|||
|
|
@ -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", "jquery.mobile.page" ], function() {
|
||||
|
||||
//define vars for interal use
|
||||
var $window = $( window ),
|
||||
|
|
@ -536,6 +536,8 @@ define( [ "jquery", "jquery.mobile.core", "jquery.mobile.hashchange", "jquery.mo
|
|||
//reset toPage height back
|
||||
if( !touchOverflow ){
|
||||
toPage.height( "" );
|
||||
// Send focus to the newly shown page
|
||||
reFocus( toPage );
|
||||
}
|
||||
|
||||
// Jump to top or prev scroll, sometimes on iOS the page has not rendered yet.
|
||||
|
|
@ -1164,12 +1166,6 @@ define( [ "jquery", "jquery.mobile.core", "jquery.mobile.hashchange", "jquery.mo
|
|||
//remove initial build class (only present on first pageshow)
|
||||
$html.removeClass( "ui-mobile-rendering" );
|
||||
|
||||
// Send focus to the newly shown page. Moved from promise .done binding in transitionPages
|
||||
// itself to avoid ie bug that reports offsetWidth as > 0 (core check for visibility)
|
||||
// despite visibility: hidden addresses issue #2965
|
||||
// https://github.com/jquery/jquery-mobile/issues/2965
|
||||
reFocus( toPage );
|
||||
|
||||
releasePageTransitionLock();
|
||||
|
||||
// Let listeners know we're all done changing the current page.
|
||||
|
|
|
|||
|
|
@ -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", "jquery.mobile.core" ], function() {
|
||||
|
||||
$.mobile.page.prototype.options.backBtnText = "Back";
|
||||
$.mobile.page.prototype.options.addBackBtn = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue