qedproject 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/qedproject +0 -0
- data/lib/qedproject/libraries/ember.rb +27 -0
- data/lib/qedproject/libraries/jquerymobile.rb +2 -2
- data/lib/qedproject/version.rb +1 -1
- data/lib/qedproject.rb +2 -2
- data/templates/suite.html +8 -1
- data/vendor/ember/app.js +7 -0
- data/vendor/ember/apple-touch-icon-114x114-precomposed.png +0 -0
- data/vendor/ember/apple-touch-icon-57x57-precomposed.png +0 -0
- data/vendor/ember/apple-touch-icon-72x72-precomposed.png +0 -0
- data/vendor/ember/apple-touch-icon-precomposed.png +0 -0
- data/vendor/ember/apple-touch-icon.png +0 -0
- data/vendor/ember/ember-0.9.js +14745 -0
- data/vendor/ember/favicon.ico +0 -0
- data/vendor/ember/style.css +141 -0
- data/vendor/ember/templates/index.html +57 -0
- data/vendor/jquerymobile/ajax-loader.png +0 -0
- data/vendor/jquerymobile/icons-18-black.png +0 -0
- data/vendor/jquerymobile/icons-18-white.png +0 -0
- data/vendor/jquerymobile/icons-36-black.png +0 -0
- data/vendor/jquerymobile/icons-36-white.png +0 -0
- data/vendor/jquerymobile/{jquery.mobile-1.0rc2.css → jquery.mobile-1.0.css} +250 -295
- data/vendor/jquerymobile/{jquery.mobile-1.0rc2.js → jquery.mobile-1.0.js} +456 -319
- metadata +19 -13
- data/lib/qedproject/libraries/jquerytmpl.rb +0 -10
- data/vendor/jquerytmpl/VERSION +0 -1
- data/vendor/jquerytmpl/jquery.tmpl.min.js +0 -10
@@ -1,11 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
/*
|
2
|
+
* jQuery Mobile Framework 1.0
|
3
|
+
* http://jquerymobile.com
|
4
|
+
*
|
5
|
+
* Copyright 2011 (c) jQuery Project
|
6
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7
|
+
* http://jquery.org/license
|
8
|
+
*
|
9
|
+
*/
|
9
10
|
/*!
|
10
11
|
* jQuery UI Widget @VERSION
|
11
12
|
*
|
@@ -15,6 +16,7 @@
|
|
15
16
|
*
|
16
17
|
* http://docs.jquery.com/UI/Widget
|
17
18
|
*/
|
19
|
+
|
18
20
|
(function( $, undefined ) {
|
19
21
|
|
20
22
|
// jQuery 1.4+
|
@@ -269,10 +271,7 @@ $.Widget.prototype = {
|
|
269
271
|
|
270
272
|
})( jQuery );
|
271
273
|
/*
|
272
|
-
*
|
273
|
-
* Copyright (c) jQuery Project
|
274
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
275
|
-
* http://jquery.org/license
|
274
|
+
* widget factory extentions for mobile
|
276
275
|
*/
|
277
276
|
|
278
277
|
(function( $, undefined ) {
|
@@ -312,20 +311,18 @@ $.widget( "mobile.widget", {
|
|
312
311
|
// TODO remove dependency on the page widget for the keepNative.
|
313
312
|
// Currently the keepNative value is defined on the page prototype so
|
314
313
|
// the method is as well
|
315
|
-
var page = $(target).data( "page" ),
|
316
|
-
keepNative = page && page.keepNativeSelector();
|
314
|
+
var page = $(target).closest(":jqmData(role='page')").data( "page" ),
|
315
|
+
keepNative = (page && page.keepNativeSelector()) || "";
|
317
316
|
|
318
|
-
$( this.options.initSelector, target ).not( keepNative
|
317
|
+
$( this.options.initSelector, target ).not( keepNative )[ this.widgetName ]();
|
319
318
|
}
|
320
319
|
});
|
321
320
|
|
322
321
|
})( jQuery );
|
323
322
|
/*
|
324
|
-
*
|
325
|
-
* Copyright (c) jQuery Project
|
326
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
327
|
-
* http://jquery.org/license
|
323
|
+
* a workaround for window.matchMedia
|
328
324
|
*/
|
325
|
+
|
329
326
|
(function( $, undefined ) {
|
330
327
|
|
331
328
|
var $window = $( window ),
|
@@ -366,10 +363,9 @@ $.mobile.media = (function() {
|
|
366
363
|
};
|
367
364
|
})();
|
368
365
|
|
369
|
-
})(jQuery)
|
370
|
-
|
371
|
-
*
|
372
|
-
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
366
|
+
})(jQuery);
|
367
|
+
/*
|
368
|
+
* support tests
|
373
369
|
*/
|
374
370
|
|
375
371
|
(function( $, undefined ) {
|
@@ -378,6 +374,7 @@ var fakeBody = $( "<body>" ).prependTo( "html" ),
|
|
378
374
|
fbCSS = fakeBody[ 0 ].style,
|
379
375
|
vendors = [ "Webkit", "Moz", "O" ],
|
380
376
|
webos = "palmGetResource" in window, //only used to rule out scrollTop
|
377
|
+
operamini = window.operamini && ({}).toString.call( window.operamini ) === "[object OperaMini]",
|
381
378
|
bb = window.blackberry; //only used to rule out box shadow, as it's filled opaque on BB
|
382
379
|
|
383
380
|
// thx Modernizr
|
@@ -440,7 +437,7 @@ $.extend( $.support, {
|
|
440
437
|
cssPseudoElement: !!propExists( "content" ),
|
441
438
|
touchOverflow: !!propExists( "overflowScrolling" ),
|
442
439
|
boxShadow: !!propExists( "boxShadow" ) && !bb,
|
443
|
-
scrollTop: ( "pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ] ) && !webos,
|
440
|
+
scrollTop: ( "pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ] ) && !webos && !operamini,
|
444
441
|
dynamicBaseTag: baseTagTest()
|
445
442
|
});
|
446
443
|
|
@@ -466,7 +463,7 @@ $.mobile.ajaxBlacklist =
|
|
466
463
|
// BlackBerry browsers, pre-webkit
|
467
464
|
window.blackberry && !window.WebKitPoint ||
|
468
465
|
// Opera Mini
|
469
|
-
|
466
|
+
operamini ||
|
470
467
|
// Symbian webkits pre 7.3
|
471
468
|
nokiaLTE7_3;
|
472
469
|
|
@@ -486,10 +483,7 @@ if ( !$.support.boxShadow ) {
|
|
486
483
|
|
487
484
|
})( jQuery );
|
488
485
|
/*
|
489
|
-
*
|
490
|
-
* Copyright (c) jQuery Project
|
491
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
492
|
-
* http://jquery.org/license
|
486
|
+
* "mouse" plugin
|
493
487
|
*/
|
494
488
|
|
495
489
|
// This plugin is an experiment for abstracting away the touch and mouse
|
@@ -983,12 +977,10 @@ if ( eventCaptureSupported ) {
|
|
983
977
|
}, true);
|
984
978
|
}
|
985
979
|
})( jQuery, window, document );
|
986
|
-
/*
|
987
|
-
*
|
988
|
-
* Copyright (c) jQuery Project
|
989
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
990
|
-
* http://jquery.org/license
|
980
|
+
/*
|
981
|
+
* "events" plugin - Handles events
|
991
982
|
*/
|
983
|
+
|
992
984
|
(function( $, window, undefined ) {
|
993
985
|
|
994
986
|
// add new event shortcuts
|
@@ -1223,7 +1215,7 @@ $.event.special.swipe = {
|
|
1223
1215
|
last_orientation = orientation;
|
1224
1216
|
win.trigger( "orientationchange" );
|
1225
1217
|
}
|
1226
|
-
}
|
1218
|
+
}
|
1227
1219
|
|
1228
1220
|
// Get the current page orientation. This method is exposed publicly, should it
|
1229
1221
|
// be needed, as jQuery.event.special.orientationchange.orientation()
|
@@ -1303,17 +1295,8 @@ $.each({
|
|
1303
1295
|
});
|
1304
1296
|
|
1305
1297
|
})( jQuery, this );
|
1306
|
-
/*!
|
1307
|
-
* jQuery hashchange event - v1.3 - 7/21/2010
|
1308
|
-
* http://benalman.com/projects/jquery-hashchange-plugin/
|
1309
|
-
*
|
1310
|
-
* Copyright (c) 2010 "Cowboy" Ben Alman
|
1311
|
-
* Dual licensed under the MIT and GPL licenses.
|
1312
|
-
* http://benalman.com/about/license/
|
1313
|
-
*/
|
1314
|
-
|
1315
1298
|
// Script: jQuery hashchange event
|
1316
|
-
//
|
1299
|
+
//
|
1317
1300
|
// *Version: 1.3, Last updated: 7/21/2010*
|
1318
1301
|
//
|
1319
1302
|
// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
|
@@ -1694,10 +1677,7 @@ $.each({
|
|
1694
1677
|
|
1695
1678
|
})(jQuery,this);
|
1696
1679
|
/*
|
1697
|
-
*
|
1698
|
-
* Copyright (c) jQuery Project
|
1699
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
1700
|
-
* http://jquery.org/license
|
1680
|
+
* "page" plugin
|
1701
1681
|
*/
|
1702
1682
|
|
1703
1683
|
(function( $, undefined ) {
|
@@ -1730,17 +1710,14 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
1730
1710
|
}
|
1731
1711
|
});
|
1732
1712
|
})( jQuery );
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
*
|
1737
|
-
* Copyright 2010, jQuery Project
|
1738
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
1739
|
-
* http://jquery.org/license
|
1740
|
-
*/
|
1713
|
+
/*
|
1714
|
+
* "core" - The base file for jQm
|
1715
|
+
*/
|
1741
1716
|
|
1742
1717
|
(function( $, window, undefined ) {
|
1743
1718
|
|
1719
|
+
var nsNormalizeDict = {};
|
1720
|
+
|
1744
1721
|
// jQuery.mobile configurable options
|
1745
1722
|
$.extend( $.mobile, {
|
1746
1723
|
|
@@ -1764,6 +1741,9 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
1764
1741
|
// Automatically load and show pages based on location.hash
|
1765
1742
|
hashListeningEnabled: true,
|
1766
1743
|
|
1744
|
+
// disable to prevent jquery from bothering with links
|
1745
|
+
linkBindingEnabled: true,
|
1746
|
+
|
1767
1747
|
// Set default page transition - 'none' for no transitions
|
1768
1748
|
defaultPageTransition: "slide",
|
1769
1749
|
|
@@ -1849,24 +1829,42 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
1849
1829
|
}, 150 );
|
1850
1830
|
},
|
1851
1831
|
|
1832
|
+
// Expose our cache for testing purposes.
|
1833
|
+
nsNormalizeDict: nsNormalizeDict,
|
1834
|
+
|
1852
1835
|
// Take a data attribute property, prepend the namespace
|
1853
|
-
// and then camel case the attribute string
|
1836
|
+
// and then camel case the attribute string. Add the result
|
1837
|
+
// to our nsNormalizeDict so we don't have to do this again.
|
1854
1838
|
nsNormalize: function( prop ) {
|
1855
1839
|
if ( !prop ) {
|
1856
1840
|
return;
|
1857
1841
|
}
|
1858
1842
|
|
1859
|
-
return $.camelCase( $.mobile.ns + prop );
|
1843
|
+
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
|
1860
1844
|
},
|
1861
1845
|
|
1862
1846
|
getInheritedTheme: function( el, defaultTheme ) {
|
1863
|
-
// Find the closest parent with a theme class on it.
|
1864
|
-
var themedParent = el.closest( "[class*='ui-bar-'],[class*='ui-body-']" ),
|
1865
|
-
|
1866
|
-
// If there's a themed parent, extract the theme letter
|
1867
|
-
// from the theme class .
|
1868
|
-
ltr = ( themedParent.length && /ui-(bar|body)-([a-z])\b/.exec( themedParent.attr( "class" ) )[ 2 ] || "" ) || "";
|
1869
1847
|
|
1848
|
+
// Find the closest parent with a theme class on it. Note that
|
1849
|
+
// we are not using $.fn.closest() on purpose here because this
|
1850
|
+
// method gets called quite a bit and we need it to be as fast
|
1851
|
+
// as possible.
|
1852
|
+
|
1853
|
+
var e = el[ 0 ],
|
1854
|
+
ltr = "",
|
1855
|
+
re = /ui-(bar|body)-([a-z])\b/,
|
1856
|
+
c, m;
|
1857
|
+
|
1858
|
+
while ( e ) {
|
1859
|
+
var c = e.className || "";
|
1860
|
+
if ( ( m = re.exec( c ) ) && ( ltr = m[ 2 ] ) ) {
|
1861
|
+
// We found a parent with a theme class
|
1862
|
+
// on it so bail from this loop.
|
1863
|
+
break;
|
1864
|
+
}
|
1865
|
+
e = e.parentNode;
|
1866
|
+
}
|
1867
|
+
|
1870
1868
|
// Return the theme letter we found, if none, return the
|
1871
1869
|
// specified default.
|
1872
1870
|
|
@@ -1929,10 +1927,11 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
1929
1927
|
};
|
1930
1928
|
|
1931
1929
|
// Monkey-patching Sizzle to filter the :jqmData selector
|
1932
|
-
var oldFind = $.find
|
1930
|
+
var oldFind = $.find,
|
1931
|
+
jqmDataRE = /:jqmData\(([^)]*)\)/g;
|
1933
1932
|
|
1934
1933
|
$.find = function( selector, context, ret, extra ) {
|
1935
|
-
selector = selector.replace(
|
1934
|
+
selector = selector.replace( jqmDataRE, "[data-" + ( $.mobile.ns || "" ) + "$1]" );
|
1936
1935
|
|
1937
1936
|
return oldFind.call( this, selector, context, ret, extra );
|
1938
1937
|
};
|
@@ -1949,11 +1948,9 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
1949
1948
|
})( jQuery, this );
|
1950
1949
|
|
1951
1950
|
/*
|
1952
|
-
*
|
1953
|
-
* Copyright (c) jQuery Project
|
1954
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
1955
|
-
* http://jquery.org/license
|
1951
|
+
* core utilities for auto ajax navigation, base tag mgmt,
|
1956
1952
|
*/
|
1953
|
+
|
1957
1954
|
( function( $, undefined ) {
|
1958
1955
|
|
1959
1956
|
//define vars for interal use
|
@@ -2515,7 +2512,7 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
2515
2512
|
|
2516
2513
|
//simply set the active page's minimum height to screen height, depending on orientation
|
2517
2514
|
function getScreenHeight(){
|
2518
|
-
var orientation =
|
2515
|
+
var orientation = $.event.special.orientationchange.orientation(),
|
2519
2516
|
port = orientation === "portrait",
|
2520
2517
|
winMin = port ? 480 : 320,
|
2521
2518
|
screenHeight = port ? screen.availHeight : screen.availWidth,
|
@@ -2689,13 +2686,29 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
2689
2686
|
// attribute and in need of enhancement.
|
2690
2687
|
if ( page.length === 0 && dataUrl && !path.isPath( dataUrl ) ) {
|
2691
2688
|
page = settings.pageContainer.children( "#" + dataUrl )
|
2692
|
-
.attr( "data-" + $.mobile.ns + "url", dataUrl )
|
2689
|
+
.attr( "data-" + $.mobile.ns + "url", dataUrl );
|
2693
2690
|
}
|
2694
2691
|
|
2695
2692
|
// If we failed to find a page in the DOM, check the URL to see if it
|
2696
|
-
// refers to the first page in the application.
|
2697
|
-
|
2698
|
-
|
2693
|
+
// refers to the first page in the application. If it isn't a reference
|
2694
|
+
// to the first page and refers to non-existent embedded page, error out.
|
2695
|
+
if ( page.length === 0 ) {
|
2696
|
+
if ( $.mobile.firstPage && path.isFirstPageUrl( fileUrl ) ) {
|
2697
|
+
// Check to make sure our cached-first-page is actually
|
2698
|
+
// in the DOM. Some user deployed apps are pruning the first
|
2699
|
+
// page from the DOM for various reasons, we check for this
|
2700
|
+
// case here because we don't want a first-page with an id
|
2701
|
+
// falling through to the non-existent embedded page error
|
2702
|
+
// case. If the first-page is not in the DOM, then we let
|
2703
|
+
// things fall through to the ajax loading code below so
|
2704
|
+
// that it gets reloaded.
|
2705
|
+
if ( $.mobile.firstPage.parent().length ) {
|
2706
|
+
page = $( $.mobile.firstPage );
|
2707
|
+
}
|
2708
|
+
} else if ( path.isEmbeddedPage( fileUrl ) ) {
|
2709
|
+
deferred.reject( absUrl, options );
|
2710
|
+
return deferred.promise();
|
2711
|
+
}
|
2699
2712
|
}
|
2700
2713
|
|
2701
2714
|
// Reset base to the default document base.
|
@@ -2755,7 +2768,7 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
2755
2768
|
type: settings.type,
|
2756
2769
|
data: settings.data,
|
2757
2770
|
dataType: "html",
|
2758
|
-
success: function( html ) {
|
2771
|
+
success: function( html, textStatus, xhr ) {
|
2759
2772
|
//pre-parse html to check for a data-url,
|
2760
2773
|
//use it as the new fileUrl, base path, etc
|
2761
2774
|
var all = $( "<div></div>" ),
|
@@ -2791,6 +2804,9 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
2791
2804
|
}
|
2792
2805
|
|
2793
2806
|
if ( newPageTitle && !page.jqmData( "title" ) ) {
|
2807
|
+
if ( ~newPageTitle.indexOf( "&" ) ) {
|
2808
|
+
newPageTitle = $( "<div>" + newPageTitle + "</div>" ).text();
|
2809
|
+
}
|
2794
2810
|
page.jqmData( "title", newPageTitle );
|
2795
2811
|
}
|
2796
2812
|
|
@@ -2841,7 +2857,9 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
2841
2857
|
hideMsg();
|
2842
2858
|
}
|
2843
2859
|
|
2844
|
-
// Add the page reference to our triggerData.
|
2860
|
+
// Add the page reference and xhr to our triggerData.
|
2861
|
+
triggerData.xhr = xhr;
|
2862
|
+
triggerData.textStatus = textStatus;
|
2845
2863
|
triggerData.page = page;
|
2846
2864
|
|
2847
2865
|
// Let listeners know the page loaded successfully.
|
@@ -2849,12 +2867,17 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
2849
2867
|
|
2850
2868
|
deferred.resolve( absUrl, options, page, dupCachedPage );
|
2851
2869
|
},
|
2852
|
-
error: function() {
|
2870
|
+
error: function( xhr, textStatus, errorThrown ) {
|
2853
2871
|
//set base back to current path
|
2854
2872
|
if( base ) {
|
2855
2873
|
base.set( path.get() );
|
2856
2874
|
}
|
2857
2875
|
|
2876
|
+
// Add error info to our triggerData.
|
2877
|
+
triggerData.xhr = xhr;
|
2878
|
+
triggerData.textStatus = textStatus;
|
2879
|
+
triggerData.errorThrown = errorThrown;
|
2880
|
+
|
2858
2881
|
var plfEvent = new $.Event( "pageloadfailed" );
|
2859
2882
|
|
2860
2883
|
// Let listeners know the page load failed.
|
@@ -3025,7 +3048,11 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
3025
3048
|
// Wrap this in a try/catch block since IE9 throw "Unspecified error" if document.activeElement
|
3026
3049
|
// is undefined when we are in an IFrame.
|
3027
3050
|
try {
|
3028
|
-
|
3051
|
+
if(document.activeElement && document.activeElement.nodeName.toLowerCase() != 'body') {
|
3052
|
+
$(document.activeElement).blur();
|
3053
|
+
} else {
|
3054
|
+
$( "input:focus, textarea:focus, select:focus" ).blur();
|
3055
|
+
}
|
3029
3056
|
} catch(e) {}
|
3030
3057
|
|
3031
3058
|
// If we're displaying the page as a dialog, we don't want the url
|
@@ -3047,11 +3074,15 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
3047
3074
|
path.set( url );
|
3048
3075
|
}
|
3049
3076
|
|
3050
|
-
//if title element wasn't found, try the page div data attr too
|
3051
|
-
|
3077
|
+
// if title element wasn't found, try the page div data attr too
|
3078
|
+
// If this is a deep-link or a reload ( active === undefined ) then just use pageTitle
|
3079
|
+
var newPageTitle = ( !active )? pageTitle : toPage.jqmData( "title" ) || toPage.children(":jqmData(role='header')").find(".ui-title" ).getEncodedText();
|
3052
3080
|
if( !!newPageTitle && pageTitle == document.title ) {
|
3053
3081
|
pageTitle = newPageTitle;
|
3054
3082
|
}
|
3083
|
+
if ( !toPage.jqmData( "title" ) ) {
|
3084
|
+
toPage.jqmData( "title", pageTitle );
|
3085
|
+
}
|
3055
3086
|
|
3056
3087
|
// Make sure we have a transition defined.
|
3057
3088
|
settings.transition = settings.transition
|
@@ -3109,7 +3140,14 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
3109
3140
|
function findClosestLink( ele )
|
3110
3141
|
{
|
3111
3142
|
while ( ele ) {
|
3112
|
-
|
3143
|
+
// Look for the closest element with a nodeName of "a".
|
3144
|
+
// Note that we are checking if we have a valid nodeName
|
3145
|
+
// before attempting to access it. This is because the
|
3146
|
+
// node we get called with could have originated from within
|
3147
|
+
// an embedded SVG document where some symbol instance elements
|
3148
|
+
// don't have nodeName defined on them, or strings are of type
|
3149
|
+
// SVGAnimatedString.
|
3150
|
+
if ( ( typeof ele.nodeName === "string" ) && ele.nodeName.toLowerCase() == "a" ) {
|
3113
3151
|
break;
|
3114
3152
|
}
|
3115
3153
|
ele = ele.parentNode;
|
@@ -3189,7 +3227,7 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
3189
3227
|
$( document ).bind( "vclick", function( event ) {
|
3190
3228
|
// if this isn't a left click we don't care. Its important to note
|
3191
3229
|
// that when the virtual event is generated it will create
|
3192
|
-
if ( event.which > 1 ){
|
3230
|
+
if ( event.which > 1 || !$.mobile.linkBindingEnabled ){
|
3193
3231
|
return;
|
3194
3232
|
}
|
3195
3233
|
|
@@ -3206,6 +3244,10 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
3206
3244
|
|
3207
3245
|
// click routing - direct to HTTP or Ajax, accordingly
|
3208
3246
|
$( document ).bind( "click", function( event ) {
|
3247
|
+
if( !$.mobile.linkBindingEnabled ){
|
3248
|
+
return;
|
3249
|
+
}
|
3250
|
+
|
3209
3251
|
var link = findClosestLink( event.target );
|
3210
3252
|
|
3211
3253
|
// If there is no link associated with the click or its not a left
|
@@ -3403,11 +3445,9 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
3403
3445
|
|
3404
3446
|
})( jQuery );
|
3405
3447
|
/*
|
3406
|
-
*
|
3407
|
-
* Copyright (c) jQuery Project
|
3408
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
3409
|
-
* http://jquery.org/license
|
3448
|
+
* history.pushState support, layered on top of hashchange
|
3410
3449
|
*/
|
3450
|
+
|
3411
3451
|
( function( $, window ) {
|
3412
3452
|
// For now, let's Monkeypatch this onto the end of $.mobile._registerInternalEvents
|
3413
3453
|
// Scope self to pushStateHandler so we can reference it sanely within the
|
@@ -3537,14 +3577,10 @@ $.widget( "mobile.page", $.mobile.widget, {
|
|
3537
3577
|
pushStateHandler.init();
|
3538
3578
|
}
|
3539
3579
|
});
|
3540
|
-
})( jQuery, this )
|
3541
|
-
|
3542
|
-
|
3543
|
-
|
3544
|
-
* Copyright 2010, jQuery Project
|
3545
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
3546
|
-
* http://jquery.org/license
|
3547
|
-
*/
|
3580
|
+
})( jQuery, this );
|
3581
|
+
/*
|
3582
|
+
* "transitions" plugin - Page change tranistions
|
3583
|
+
*/
|
3548
3584
|
|
3549
3585
|
(function( $, window, undefined ) {
|
3550
3586
|
|
@@ -3588,10 +3624,7 @@ if ( $.mobile.defaultTransitionHandler === $.mobile.noneTransitionHandler ) {
|
|
3588
3624
|
|
3589
3625
|
})( jQuery, this );
|
3590
3626
|
/*
|
3591
|
-
*
|
3592
|
-
* Copyright (c) jQuery Project
|
3593
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
3594
|
-
* http://jquery.org/license
|
3627
|
+
* "degradeInputs" plugin - degrades inputs to another type after custom enhancements are made.
|
3595
3628
|
*/
|
3596
3629
|
|
3597
3630
|
(function( $, undefined ) {
|
@@ -3644,9 +3677,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
3644
3677
|
});
|
3645
3678
|
|
3646
3679
|
})( jQuery );/*
|
3647
|
-
*
|
3648
|
-
* Copyright (c) jQuery Project
|
3649
|
-
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
3680
|
+
* "dialog" plugin.
|
3650
3681
|
*/
|
3651
3682
|
|
3652
3683
|
(function( $, window, undefined ) {
|
@@ -3654,20 +3685,15 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
3654
3685
|
$.widget( "mobile.dialog", $.mobile.widget, {
|
3655
3686
|
options: {
|
3656
3687
|
closeBtnText : "Close",
|
3657
|
-
|
3688
|
+
overlayTheme : "a",
|
3658
3689
|
initSelector : ":jqmData(role='dialog')"
|
3659
3690
|
},
|
3660
3691
|
_create: function() {
|
3661
3692
|
var self = this,
|
3662
3693
|
$el = this.element,
|
3663
|
-
pageTheme = $el.attr( "class" ).match( /ui-body-[a-z]/ ),
|
3664
3694
|
headerCloseButton = $( "<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" );
|
3665
3695
|
|
3666
|
-
|
3667
|
-
$el.removeClass( pageTheme[ 0 ] );
|
3668
|
-
}
|
3669
|
-
|
3670
|
-
$el.addClass( "ui-body-" + this.options.theme );
|
3696
|
+
$el.addClass( "ui-overlay-" + this.options.overlayTheme );
|
3671
3697
|
|
3672
3698
|
// Class the markup for dialog styling
|
3673
3699
|
// Set aria role
|
@@ -3678,8 +3704,9 @@ $.widget( "mobile.dialog", $.mobile.widget, {
|
|
3678
3704
|
.prepend( headerCloseButton )
|
3679
3705
|
.end()
|
3680
3706
|
.find( ":jqmData(role='content'),:jqmData(role='footer')" )
|
3707
|
+
.addClass( "ui-overlay-shadow" )
|
3681
3708
|
.last()
|
3682
|
-
.addClass( "ui-corner-bottom
|
3709
|
+
.addClass( "ui-corner-bottom" );
|
3683
3710
|
|
3684
3711
|
// this must be an anonymous function so that select menu dialogs can replace
|
3685
3712
|
// the close method. This is a change from previously just defining data-rel=back
|
@@ -3723,10 +3750,7 @@ $( $.mobile.dialog.prototype.options.initSelector ).live( "pagecreate", function
|
|
3723
3750
|
|
3724
3751
|
})( jQuery, this );
|
3725
3752
|
/*
|
3726
|
-
*
|
3727
|
-
* Copyright (c) jQuery Project
|
3728
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
3729
|
-
* http://jquery.org/license
|
3753
|
+
* This plugin handles theming and layout of headers, footers, and content areas
|
3730
3754
|
*/
|
3731
3755
|
|
3732
3756
|
(function( $, undefined ) {
|
@@ -3742,12 +3766,14 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi
|
|
3742
3766
|
|
3743
3767
|
var $page = $( this ),
|
3744
3768
|
o = $page.data( "page" ).options,
|
3769
|
+
pageRole = $page.jqmData( "role" ),
|
3745
3770
|
pageTheme = o.theme;
|
3746
3771
|
|
3747
3772
|
$( ":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')", this ).each(function() {
|
3748
3773
|
var $this = $( this ),
|
3749
3774
|
role = $this.jqmData( "role" ),
|
3750
3775
|
theme = $this.jqmData( "theme" ),
|
3776
|
+
contentTheme = theme || o.contentTheme || ( pageRole === "dialog" && pageTheme ),
|
3751
3777
|
$headeranchors,
|
3752
3778
|
leftbtn,
|
3753
3779
|
rightbtn,
|
@@ -3799,8 +3825,8 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi
|
|
3799
3825
|
});
|
3800
3826
|
|
3801
3827
|
} else if ( role === "content" ) {
|
3802
|
-
if (
|
3803
|
-
$this.addClass( "ui-body-" + (
|
3828
|
+
if ( contentTheme ) {
|
3829
|
+
$this.addClass( "ui-body-" + ( contentTheme ) );
|
3804
3830
|
}
|
3805
3831
|
|
3806
3832
|
// Add ARIA role
|
@@ -3810,11 +3836,9 @@ $( ":jqmData(role='page'), :jqmData(role='dialog')" ).live( "pagecreate", functi
|
|
3810
3836
|
});
|
3811
3837
|
|
3812
3838
|
})( jQuery );/*
|
3813
|
-
*
|
3814
|
-
* Copyright (c) jQuery Project
|
3815
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
3816
|
-
* http://jquery.org/license
|
3839
|
+
* "collapsible" plugin
|
3817
3840
|
*/
|
3841
|
+
|
3818
3842
|
(function( $, undefined ) {
|
3819
3843
|
|
3820
3844
|
$.widget( "mobile.collapsible", $.mobile.widget, {
|
@@ -3822,7 +3846,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|
3822
3846
|
expandCueText: " click to expand contents",
|
3823
3847
|
collapseCueText: " click to collapse contents",
|
3824
3848
|
collapsed: true,
|
3825
|
-
heading: "
|
3849
|
+
heading: "h1,h2,h3,h4,h5,h6,legend",
|
3826
3850
|
theme: null,
|
3827
3851
|
contentTheme: null,
|
3828
3852
|
iconTheme: "d",
|
@@ -3833,10 +3857,10 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|
3833
3857
|
var $el = this.element,
|
3834
3858
|
o = this.options,
|
3835
3859
|
collapsible = $el.addClass( "ui-collapsible" ),
|
3836
|
-
collapsibleHeading = $el.
|
3860
|
+
collapsibleHeading = $el.children( o.heading ).first(),
|
3837
3861
|
collapsibleContent = collapsible.wrapInner( "<div class='ui-collapsible-content'></div>" ).find( ".ui-collapsible-content" ),
|
3838
3862
|
collapsibleSet = $el.closest( ":jqmData(role='collapsible-set')" ).addClass( "ui-collapsible-set" ),
|
3839
|
-
|
3863
|
+
collapsiblesInSet = collapsibleSet.children( ":jqmData(role='collapsible')" );
|
3840
3864
|
|
3841
3865
|
// Replace collapsibleHeading if it's a legend
|
3842
3866
|
if ( collapsibleHeading.is( "legend" ) ) {
|
@@ -3865,7 +3889,8 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|
3865
3889
|
.addClass( "ui-collapsible-heading" )
|
3866
3890
|
.append( "<span class='ui-collapsible-heading-status'></span>" )
|
3867
3891
|
.wrapInner( "<a href='#' class='ui-collapsible-heading-toggle'></a>" )
|
3868
|
-
.find( "a
|
3892
|
+
.find( "a" )
|
3893
|
+
.first()
|
3869
3894
|
.buttonMarkup({
|
3870
3895
|
shadow: false,
|
3871
3896
|
corners: false,
|
@@ -3876,7 +3901,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|
3876
3901
|
|
3877
3902
|
if ( !collapsibleSet.length ) {
|
3878
3903
|
collapsibleHeading
|
3879
|
-
.find( "a
|
3904
|
+
.find( "a" ).first().add( collapsibleHeading.find( ".ui-btn-inner" ) )
|
3880
3905
|
.addClass( "ui-corner-top ui-corner-bottom" );
|
3881
3906
|
} else {
|
3882
3907
|
// If we are in a collapsible set
|
@@ -3896,15 +3921,17 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|
3896
3921
|
});
|
3897
3922
|
}
|
3898
3923
|
|
3899
|
-
|
3900
|
-
.find( "a
|
3924
|
+
collapsiblesInSet.first()
|
3925
|
+
.find( "a" )
|
3926
|
+
.first()
|
3901
3927
|
.addClass( "ui-corner-top" )
|
3902
3928
|
.find( ".ui-btn-inner" )
|
3903
3929
|
.addClass( "ui-corner-top" );
|
3904
3930
|
|
3905
|
-
|
3931
|
+
collapsiblesInSet.last()
|
3906
3932
|
.jqmData( "collapsible-last", true )
|
3907
|
-
.find( "a
|
3933
|
+
.find( "a" )
|
3934
|
+
.first()
|
3908
3935
|
.addClass( "ui-corner-bottom" )
|
3909
3936
|
.find( ".ui-btn-inner" )
|
3910
3937
|
.addClass( "ui-corner-bottom" );
|
@@ -3912,7 +3939,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|
3912
3939
|
|
3913
3940
|
if ( collapsible.jqmData( "collapsible-last" ) ) {
|
3914
3941
|
collapsibleHeading
|
3915
|
-
.find( "a
|
3942
|
+
.find( "a" ).first().add ( collapsibleHeading.find( ".ui-btn-inner" ) )
|
3916
3943
|
.addClass( "ui-corner-bottom" );
|
3917
3944
|
}
|
3918
3945
|
}
|
@@ -3942,7 +3969,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|
3942
3969
|
|
3943
3970
|
if ( contentTheme && ( !collapsibleSet.length || collapsible.jqmData( "collapsible-last" ) ) ) {
|
3944
3971
|
collapsibleHeading
|
3945
|
-
.find( "a
|
3972
|
+
.find( "a" ).first().add( collapsibleHeading.find( ".ui-btn-inner" ) )
|
3946
3973
|
.toggleClass( "ui-corner-bottom", isCollapse );
|
3947
3974
|
collapsibleContent.toggleClass( "ui-corner-bottom", !isCollapse );
|
3948
3975
|
}
|
@@ -3971,10 +3998,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
3971
3998
|
|
3972
3999
|
})( jQuery );
|
3973
4000
|
/*
|
3974
|
-
*
|
3975
|
-
* Copyright (c) jQuery Project
|
3976
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
3977
|
-
* http://jquery.org/license
|
4001
|
+
* "fieldcontain" plugin - simple class additions to make form row separators
|
3978
4002
|
*/
|
3979
4003
|
|
3980
4004
|
(function( $, undefined ) {
|
@@ -3989,10 +4013,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
3989
4013
|
});
|
3990
4014
|
|
3991
4015
|
})( jQuery );/*
|
3992
|
-
*
|
3993
|
-
* Copyright (c) jQuery Project
|
3994
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
3995
|
-
* http://jquery.org/license
|
4016
|
+
* plugin for creating CSS grids
|
3996
4017
|
*/
|
3997
4018
|
|
3998
4019
|
(function( $, undefined ) {
|
@@ -4041,10 +4062,7 @@ $.fn.grid = function( options ) {
|
|
4041
4062
|
});
|
4042
4063
|
};
|
4043
4064
|
})( jQuery );/*
|
4044
|
-
*
|
4045
|
-
* Copyright (c) jQuery Project
|
4046
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
4047
|
-
* http://jquery.org/license
|
4065
|
+
* "navbar" plugin
|
4048
4066
|
*/
|
4049
4067
|
|
4050
4068
|
(function( $, undefined ) {
|
@@ -4092,10 +4110,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
4092
4110
|
|
4093
4111
|
})( jQuery );
|
4094
4112
|
/*
|
4095
|
-
*
|
4096
|
-
* Copyright (c) jQuery Project
|
4097
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
4098
|
-
* http://jquery.org/license
|
4113
|
+
* "listview" plugin
|
4099
4114
|
*/
|
4100
4115
|
|
4101
4116
|
(function( $, undefined ) {
|
@@ -4107,7 +4122,7 @@ var listCountPerPage = {};
|
|
4107
4122
|
|
4108
4123
|
$.widget( "mobile.listview", $.mobile.widget, {
|
4109
4124
|
options: {
|
4110
|
-
theme:
|
4125
|
+
theme: null,
|
4111
4126
|
countTheme: "c",
|
4112
4127
|
headerTheme: "b",
|
4113
4128
|
dividerTheme: "b",
|
@@ -4128,25 +4143,6 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|
4128
4143
|
t.refresh( true );
|
4129
4144
|
},
|
4130
4145
|
|
4131
|
-
_itemApply: function( $list, item ) {
|
4132
|
-
var $countli = item.find( ".ui-li-count" );
|
4133
|
-
if ( $countli.length ) {
|
4134
|
-
item.addClass( "ui-li-has-count" );
|
4135
|
-
}
|
4136
|
-
$countli.addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme ) + " ui-btn-corner-all" );
|
4137
|
-
|
4138
|
-
// TODO class has to be defined in markup
|
4139
|
-
item.find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" ).end()
|
4140
|
-
.find( "p, dl" ).addClass( "ui-li-desc" ).end()
|
4141
|
-
.find( ">img:eq(0), .ui-link-inherit>img:eq(0)" ).addClass( "ui-li-thumb" ).each(function() {
|
4142
|
-
item.addClass( $(this).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
|
4143
|
-
}).end()
|
4144
|
-
.find( ".ui-li-aside" ).each(function() {
|
4145
|
-
var $this = $(this);
|
4146
|
-
$this.prependTo( $this.parent() ); //shift aside to front for css float
|
4147
|
-
});
|
4148
|
-
},
|
4149
|
-
|
4150
4146
|
_removeCorners: function( li, which ) {
|
4151
4147
|
var top = "ui-corner-top ui-corner-tr ui-corner-tl",
|
4152
4148
|
bot = "ui-corner-bottom ui-corner-br ui-corner-bl";
|
@@ -4179,8 +4175,11 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|
4179
4175
|
$topli = $visibleli.first()
|
4180
4176
|
.addClass( "ui-corner-top" );
|
4181
4177
|
|
4182
|
-
$topli.add( $topli.find( ".ui-btn-inner" )
|
4183
|
-
|
4178
|
+
$topli.add( $topli.find( ".ui-btn-inner" )
|
4179
|
+
.not( ".ui-li-link-alt span:first-child" ) )
|
4180
|
+
.addClass( "ui-corner-top" )
|
4181
|
+
.end()
|
4182
|
+
.find( ".ui-li-link-alt, .ui-li-link-alt span:first-child" )
|
4184
4183
|
.addClass( "ui-corner-tr" )
|
4185
4184
|
.end()
|
4186
4185
|
.find( ".ui-li-thumb" )
|
@@ -4204,6 +4203,56 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|
4204
4203
|
}
|
4205
4204
|
},
|
4206
4205
|
|
4206
|
+
// This is a generic utility method for finding the first
|
4207
|
+
// node with a given nodeName. It uses basic DOM traversal
|
4208
|
+
// to be fast and is meant to be a substitute for simple
|
4209
|
+
// $.fn.closest() and $.fn.children() calls on a single
|
4210
|
+
// element. Note that callers must pass both the lowerCase
|
4211
|
+
// and upperCase version of the nodeName they are looking for.
|
4212
|
+
// The main reason for this is that this function will be
|
4213
|
+
// called many times and we want to avoid having to lowercase
|
4214
|
+
// the nodeName from the element every time to ensure we have
|
4215
|
+
// a match. Note that this function lives here for now, but may
|
4216
|
+
// be moved into $.mobile if other components need a similar method.
|
4217
|
+
_findFirstElementByTagName: function( ele, nextProp, lcName, ucName )
|
4218
|
+
{
|
4219
|
+
var dict = {};
|
4220
|
+
dict[ lcName ] = dict[ ucName ] = true;
|
4221
|
+
while ( ele ) {
|
4222
|
+
if ( dict[ ele.nodeName ] ) {
|
4223
|
+
return ele;
|
4224
|
+
}
|
4225
|
+
ele = ele[ nextProp ];
|
4226
|
+
}
|
4227
|
+
return null;
|
4228
|
+
},
|
4229
|
+
_getChildrenByTagName: function( ele, lcName, ucName )
|
4230
|
+
{
|
4231
|
+
var results = [],
|
4232
|
+
dict = {};
|
4233
|
+
dict[ lcName ] = dict[ ucName ] = true;
|
4234
|
+
ele = ele.firstChild;
|
4235
|
+
while ( ele ) {
|
4236
|
+
if ( dict[ ele.nodeName ] ) {
|
4237
|
+
results.push( ele );
|
4238
|
+
}
|
4239
|
+
ele = ele.nextSibling;
|
4240
|
+
}
|
4241
|
+
return $( results );
|
4242
|
+
},
|
4243
|
+
|
4244
|
+
_addThumbClasses: function( containers )
|
4245
|
+
{
|
4246
|
+
var i, img, len = containers.length;
|
4247
|
+
for ( i = 0; i < len; i++ ) {
|
4248
|
+
img = $( this._findFirstElementByTagName( containers[ i ].firstChild, "nextSibling", "img", "IMG" ) );
|
4249
|
+
if ( img.length ) {
|
4250
|
+
img.addClass( "ui-li-thumb" );
|
4251
|
+
$( this._findFirstElementByTagName( img[ 0 ].parentNode, "parentNode", "li", "LI" ) ).addClass( img.is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
|
4252
|
+
}
|
4253
|
+
}
|
4254
|
+
},
|
4255
|
+
|
4207
4256
|
refresh: function( create ) {
|
4208
4257
|
this.parentPage = this.element.closest( ".ui-page" );
|
4209
4258
|
this._createSubPages();
|
@@ -4214,14 +4263,19 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|
4214
4263
|
dividertheme = $list.jqmData( "dividertheme" ) || o.dividerTheme,
|
4215
4264
|
listsplittheme = $list.jqmData( "splittheme" ),
|
4216
4265
|
listspliticon = $list.jqmData( "spliticon" ),
|
4217
|
-
li =
|
4266
|
+
li = this._getChildrenByTagName( $list[ 0 ], "li", "LI" ),
|
4218
4267
|
counter = $.support.cssPseudoElement || !$.nodeName( $list[ 0 ], "ol" ) ? 0 : 1,
|
4268
|
+
itemClassDict = {},
|
4219
4269
|
item, itemClass, itemTheme,
|
4220
|
-
a, last, splittheme, countParent, icon;
|
4270
|
+
a, last, splittheme, countParent, icon, imgParents, img;
|
4221
4271
|
|
4222
4272
|
if ( counter ) {
|
4223
4273
|
$list.find( ".ui-li-dec" ).remove();
|
4224
4274
|
}
|
4275
|
+
|
4276
|
+
if ( !o.theme ) {
|
4277
|
+
o.theme = $.mobile.getInheritedTheme( this.element, "c" );
|
4278
|
+
}
|
4225
4279
|
|
4226
4280
|
for ( var pos = 0, numli = li.length; pos < numli; pos++ ) {
|
4227
4281
|
item = li.eq( pos );
|
@@ -4230,7 +4284,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|
4230
4284
|
// If we're creating the element, we update it regardless
|
4231
4285
|
if ( create || !item.hasClass( "ui-li" ) ) {
|
4232
4286
|
itemTheme = item.jqmData("theme") || o.theme;
|
4233
|
-
a =
|
4287
|
+
a = this._getChildrenByTagName( item[ 0 ], "a", "A" );
|
4234
4288
|
|
4235
4289
|
if ( a.length ) {
|
4236
4290
|
icon = item.jqmData("icon");
|
@@ -4269,7 +4323,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|
4269
4323
|
})
|
4270
4324
|
.find( ".ui-btn-inner" )
|
4271
4325
|
.append(
|
4272
|
-
$( "
|
4326
|
+
$( document.createElement( "span" ) ).buttonMarkup({
|
4273
4327
|
shadow: true,
|
4274
4328
|
corners: true,
|
4275
4329
|
theme: splittheme,
|
@@ -4300,11 +4354,59 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|
4300
4354
|
.prepend( "<span class='ui-li-dec'>" + (counter++) + ". </span>" );
|
4301
4355
|
}
|
4302
4356
|
|
4303
|
-
|
4357
|
+
// Instead of setting item class directly on the list item and its
|
4358
|
+
// btn-inner at this point in time, push the item into a dictionary
|
4359
|
+
// that tells us what class to set on it so we can do this after this
|
4360
|
+
// processing loop is finished.
|
4361
|
+
|
4362
|
+
if ( !itemClassDict[ itemClass ] ) {
|
4363
|
+
itemClassDict[ itemClass ] = [];
|
4364
|
+
}
|
4365
|
+
|
4366
|
+
itemClassDict[ itemClass ].push( item[ 0 ] );
|
4367
|
+
}
|
4368
|
+
|
4369
|
+
// Set the appropriate listview item classes on each list item
|
4370
|
+
// and their btn-inner elements. The main reason we didn't do this
|
4371
|
+
// in the for-loop above is because we can eliminate per-item function overhead
|
4372
|
+
// by calling addClass() and children() once or twice afterwards. This
|
4373
|
+
// can give us a significant boost on platforms like WP7.5.
|
4304
4374
|
|
4305
|
-
|
4375
|
+
for ( itemClass in itemClassDict ) {
|
4376
|
+
$( itemClassDict[ itemClass ] ).addClass( itemClass ).children( ".ui-btn-inner" ).addClass( itemClass );
|
4306
4377
|
}
|
4307
4378
|
|
4379
|
+
$list.find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" )
|
4380
|
+
.end()
|
4381
|
+
|
4382
|
+
.find( "p, dl" ).addClass( "ui-li-desc" )
|
4383
|
+
.end()
|
4384
|
+
|
4385
|
+
.find( ".ui-li-aside" ).each(function() {
|
4386
|
+
var $this = $(this);
|
4387
|
+
$this.prependTo( $this.parent() ); //shift aside to front for css float
|
4388
|
+
})
|
4389
|
+
.end()
|
4390
|
+
|
4391
|
+
.find( ".ui-li-count" ).each( function() {
|
4392
|
+
$( this ).closest( "li" ).addClass( "ui-li-has-count" );
|
4393
|
+
}).addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" );
|
4394
|
+
|
4395
|
+
// The idea here is to look at the first image in the list item
|
4396
|
+
// itself, and any .ui-link-inherit element it may contain, so we
|
4397
|
+
// can place the appropriate classes on the image and list item.
|
4398
|
+
// Note that we used to use something like:
|
4399
|
+
//
|
4400
|
+
// li.find(">img:eq(0), .ui-link-inherit>img:eq(0)").each( ... );
|
4401
|
+
//
|
4402
|
+
// But executing a find() like that on Windows Phone 7.5 took a
|
4403
|
+
// really long time. Walking things manually with the code below
|
4404
|
+
// allows the 400 listview item page to load in about 3 seconds as
|
4405
|
+
// opposed to 30 seconds.
|
4406
|
+
|
4407
|
+
this._addThumbClasses( li );
|
4408
|
+
this._addThumbClasses( $list.find( ".ui-link-inherit" ) );
|
4409
|
+
|
4308
4410
|
this._refreshCorners( create );
|
4309
4411
|
},
|
4310
4412
|
|
@@ -4407,10 +4509,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
4407
4509
|
|
4408
4510
|
})( jQuery );
|
4409
4511
|
/*
|
4410
|
-
*
|
4411
|
-
* Copyright (c) jQuery Project
|
4412
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
4413
|
-
* http://jquery.org/license
|
4512
|
+
* "listview" filter extension
|
4414
4513
|
*/
|
4415
4514
|
|
4416
4515
|
(function( $, undefined ) {
|
@@ -4452,12 +4551,11 @@ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() {
|
|
4452
4551
|
|
4453
4552
|
// Change val as lastval for next execution
|
4454
4553
|
$this.jqmData( "lastval" , val );
|
4455
|
-
|
4456
|
-
change = val.replace( new RegExp( "^" + lastval ) , "" );
|
4554
|
+
change = val.substr( 0 , lastval.length - 1 ).replace( lastval , "" );
|
4457
4555
|
|
4458
4556
|
if ( val.length < lastval.length || change.length != ( val.length - lastval.length ) ) {
|
4459
4557
|
|
4460
|
-
// Removed chars or pasted something
|
4558
|
+
// Removed chars or pasted something totally different, check all items
|
4461
4559
|
listItems = list.children();
|
4462
4560
|
} else {
|
4463
4561
|
|
@@ -4487,7 +4585,7 @@ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() {
|
|
4487
4585
|
item.toggleClass( "ui-filter-hidequeue" , true );
|
4488
4586
|
} else {
|
4489
4587
|
|
4490
|
-
// There
|
4588
|
+
// There's a shown item in the bucket
|
4491
4589
|
childItems = true;
|
4492
4590
|
}
|
4493
4591
|
}
|
@@ -4524,10 +4622,7 @@ $( ":jqmData(role='listview')" ).live( "listviewcreate", function() {
|
|
4524
4622
|
});
|
4525
4623
|
|
4526
4624
|
})( jQuery );/*
|
4527
|
-
*
|
4528
|
-
* Copyright (c) jQuery Project
|
4529
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
4530
|
-
* http://jquery.org/license
|
4625
|
+
* "nojs" plugin - class to make elements hidden to A grade browsers
|
4531
4626
|
*/
|
4532
4627
|
|
4533
4628
|
(function( $, undefined ) {
|
@@ -4538,10 +4633,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
4538
4633
|
});
|
4539
4634
|
|
4540
4635
|
})( jQuery );/*
|
4541
|
-
*
|
4542
|
-
* Copyright (c) jQuery Project
|
4543
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
4544
|
-
* http://jquery.org/license
|
4636
|
+
* "checkboxradio" plugin
|
4545
4637
|
*/
|
4546
4638
|
|
4547
4639
|
(function( $, undefined ) {
|
@@ -4556,7 +4648,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|
4556
4648
|
input = this.element,
|
4557
4649
|
// NOTE: Windows Phone could not find the label through a selector
|
4558
4650
|
// filter works though.
|
4559
|
-
label = input.closest( "form,fieldset,:jqmData(role='page')" ).find( "label
|
4651
|
+
label = input.closest( "form,fieldset,:jqmData(role='page')" ).find( "label[for='" + input[ 0 ].id + "']"),
|
4560
4652
|
inputtype = input.attr( "type" ),
|
4561
4653
|
checkedState = inputtype + "-on",
|
4562
4654
|
uncheckedState = inputtype + "-off",
|
@@ -4613,6 +4705,13 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|
4613
4705
|
|
4614
4706
|
input.prop( "checked", inputtype === "radio" && true || !input.prop( "checked" ) );
|
4615
4707
|
|
4708
|
+
// trigger click handler's bound directly to the input as a substitute for
|
4709
|
+
// how label clicks behave normally in the browsers
|
4710
|
+
// TODO: it would be nice to let the browser's handle the clicks and pass them
|
4711
|
+
// through to the associate input. we can swallow that click at the parent
|
4712
|
+
// wrapper element level
|
4713
|
+
input.triggerHandler( 'click' );
|
4714
|
+
|
4616
4715
|
// Input set for common radio buttons will contain all the radio
|
4617
4716
|
// buttons, but will not for checkboxes. clearing the checked status
|
4618
4717
|
// of other radios ensures the active button state is applied properly
|
@@ -4627,11 +4726,10 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|
4627
4726
|
input
|
4628
4727
|
.bind({
|
4629
4728
|
vmousedown: function() {
|
4630
|
-
|
4729
|
+
self._cacheVals();
|
4631
4730
|
},
|
4632
4731
|
|
4633
4732
|
vclick: function() {
|
4634
|
-
|
4635
4733
|
var $this = $(this);
|
4636
4734
|
|
4637
4735
|
// Adds checked attribute to checked input when keyboard is used
|
@@ -4731,10 +4829,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
4731
4829
|
|
4732
4830
|
})( jQuery );
|
4733
4831
|
/*
|
4734
|
-
*
|
4735
|
-
* Copyright (c) jQuery Project
|
4736
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
4737
|
-
* http://jquery.org/license
|
4832
|
+
* "button" plugin - links that proxy to native input/buttons
|
4738
4833
|
*/
|
4739
4834
|
|
4740
4835
|
(function( $, undefined ) {
|
@@ -4781,15 +4876,18 @@ $.widget( "mobile.button", $.mobile.widget, {
|
|
4781
4876
|
// Add hidden input if it doesn’t already exist.
|
4782
4877
|
if( $buttonPlaceholder === undefined ) {
|
4783
4878
|
$buttonPlaceholder = $( "<input>", {
|
4784
|
-
|
4785
|
-
|
4786
|
-
|
4787
|
-
|
4788
|
-
.insertBefore( $el );
|
4879
|
+
type: "hidden",
|
4880
|
+
name: $el.attr( "name" ),
|
4881
|
+
value: $el.attr( "value" )
|
4882
|
+
}).insertBefore( $el );
|
4789
4883
|
|
4790
4884
|
// Bind to doc to remove after submit handling
|
4791
|
-
$( document ).submit
|
4792
|
-
|
4885
|
+
$( document ).one("submit", function(){
|
4886
|
+
$buttonPlaceholder.remove();
|
4887
|
+
|
4888
|
+
// reset the local var so that the hidden input
|
4889
|
+
// will be re-added on subsequent clicks
|
4890
|
+
$buttonPlaceholder = undefined;
|
4793
4891
|
});
|
4794
4892
|
}
|
4795
4893
|
});
|
@@ -4811,11 +4909,17 @@ $.widget( "mobile.button", $.mobile.widget, {
|
|
4811
4909
|
},
|
4812
4910
|
|
4813
4911
|
refresh: function() {
|
4814
|
-
|
4912
|
+
var $el = this.element;
|
4913
|
+
|
4914
|
+
if ( $el.prop("disabled") ) {
|
4815
4915
|
this.disable();
|
4816
4916
|
} else {
|
4817
4917
|
this.enable();
|
4818
4918
|
}
|
4919
|
+
|
4920
|
+
// the textWrapper is stored as a data element on the button object
|
4921
|
+
// to prevent referencing by it's implementation details (eg 'class')
|
4922
|
+
this.button.data( 'textWrapper' ).text( $el.text() || $el.val() );
|
4819
4923
|
}
|
4820
4924
|
});
|
4821
4925
|
|
@@ -4825,10 +4929,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
4825
4929
|
});
|
4826
4930
|
|
4827
4931
|
})( jQuery );/*
|
4828
|
-
*
|
4829
|
-
* Copyright (c) jQuery Project
|
4830
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
4831
|
-
* http://jquery.org/license
|
4932
|
+
* "slider" plugin
|
4832
4933
|
*/
|
4833
4934
|
|
4834
4935
|
( function( $, undefined ) {
|
@@ -4896,12 +4997,16 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|
4896
4997
|
handle: handle,
|
4897
4998
|
dragging: false,
|
4898
4999
|
beforeStart: null,
|
4899
|
-
userModified: false
|
5000
|
+
userModified: false,
|
5001
|
+
mouseMoved: false
|
4900
5002
|
});
|
4901
5003
|
|
4902
5004
|
if ( cType == "select" ) {
|
4903
5005
|
|
4904
5006
|
slider.wrapInner( "<div class='ui-slider-inneroffset'></div>" );
|
5007
|
+
|
5008
|
+
// make the handle move with a smooth transition
|
5009
|
+
handle.addClass( "ui-slider-handle-snapping" );
|
4905
5010
|
|
4906
5011
|
options = control.find( "option" );
|
4907
5012
|
|
@@ -4925,7 +5030,10 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|
4925
5030
|
// monitor the input for updated values
|
4926
5031
|
control.addClass( cType === "input" ? "ui-slider-input" : "ui-slider-switch" )
|
4927
5032
|
.change( function() {
|
4928
|
-
|
5033
|
+
// if the user dragged the handle, the "change" event was triggered from inside refresh(); don't call refresh() again
|
5034
|
+
if (!self.mouseMoved) {
|
5035
|
+
self.refresh( val(), true );
|
5036
|
+
}
|
4929
5037
|
})
|
4930
5038
|
.keyup( function() { // necessary?
|
4931
5039
|
self.refresh( val(), true, true );
|
@@ -4937,8 +5045,18 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|
4937
5045
|
// prevent screen drag when slider activated
|
4938
5046
|
$( document ).bind( "vmousemove", function( event ) {
|
4939
5047
|
if ( self.dragging ) {
|
5048
|
+
// self.mouseMoved must be updated before refresh() because it will be used in the control "change" event
|
5049
|
+
self.mouseMoved = true;
|
5050
|
+
|
5051
|
+
if ( cType === "select" ) {
|
5052
|
+
// make the handle move in sync with the mouse
|
5053
|
+
handle.removeClass( "ui-slider-handle-snapping" );
|
5054
|
+
}
|
5055
|
+
|
4940
5056
|
self.refresh( event );
|
4941
|
-
|
5057
|
+
|
5058
|
+
// only after refresh() you can calculate self.userModified
|
5059
|
+
self.userModified = self.beforeStart !== control[0].selectedIndex;
|
4942
5060
|
return false;
|
4943
5061
|
}
|
4944
5062
|
});
|
@@ -4946,10 +5064,12 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|
4946
5064
|
slider.bind( "vmousedown", function( event ) {
|
4947
5065
|
self.dragging = true;
|
4948
5066
|
self.userModified = false;
|
5067
|
+
self.mouseMoved = false;
|
4949
5068
|
|
4950
5069
|
if ( cType === "select" ) {
|
4951
5070
|
self.beforeStart = control[0].selectedIndex;
|
4952
5071
|
}
|
5072
|
+
|
4953
5073
|
self.refresh( event );
|
4954
5074
|
return false;
|
4955
5075
|
});
|
@@ -4960,14 +5080,31 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|
4960
5080
|
|
4961
5081
|
self.dragging = false;
|
4962
5082
|
|
4963
|
-
if ( cType === "select"
|
4964
|
-
|
4965
|
-
|
4966
|
-
|
4967
|
-
|
4968
|
-
|
5083
|
+
if ( cType === "select") {
|
5084
|
+
|
5085
|
+
// make the handle move with a smooth transition
|
5086
|
+
handle.addClass( "ui-slider-handle-snapping" );
|
5087
|
+
|
5088
|
+
if ( self.mouseMoved ) {
|
5089
|
+
|
5090
|
+
// this is a drag, change the value only if user dragged enough
|
5091
|
+
if ( self.userModified ) {
|
5092
|
+
self.refresh( self.beforeStart == 0 ? 1 : 0 );
|
5093
|
+
}
|
5094
|
+
else {
|
5095
|
+
self.refresh( self.beforeStart );
|
5096
|
+
}
|
5097
|
+
|
5098
|
+
}
|
5099
|
+
else {
|
5100
|
+
// this is just a click, change the value
|
5101
|
+
self.refresh( self.beforeStart == 0 ? 1 : 0 );
|
4969
5102
|
}
|
5103
|
+
|
4970
5104
|
}
|
5105
|
+
|
5106
|
+
self.mouseMoved = false;
|
5107
|
+
|
4971
5108
|
return false;
|
4972
5109
|
}
|
4973
5110
|
});
|
@@ -5041,8 +5178,7 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|
5041
5178
|
refresh: function( val, isfromControl, preventInputUpdate ) {
|
5042
5179
|
|
5043
5180
|
if ( this.options.disabled || this.element.attr('disabled')) {
|
5044
|
-
this.
|
5045
|
-
return;
|
5181
|
+
this.disable();
|
5046
5182
|
}
|
5047
5183
|
|
5048
5184
|
var control = this.element, percent,
|
@@ -5149,10 +5285,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
5149
5285
|
|
5150
5286
|
})( jQuery );
|
5151
5287
|
/*
|
5152
|
-
*
|
5153
|
-
* Copyright (c) jQuery Project
|
5154
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
5155
|
-
* http://jquery.org/license
|
5288
|
+
* "textinput" plugin for text inputs, textareas
|
5156
5289
|
*/
|
5157
5290
|
|
5158
5291
|
(function( $, undefined ) {
|
@@ -5167,20 +5300,13 @@ $.widget( "mobile.textinput", $.mobile.widget, {
|
|
5167
5300
|
|
5168
5301
|
var input = this.element,
|
5169
5302
|
o = this.options,
|
5170
|
-
theme = o.theme,
|
5171
|
-
themeclass
|
5172
|
-
|
5173
|
-
if ( !theme ) {
|
5174
|
-
theme = $.mobile.getInheritedTheme( this.element, "c" );
|
5175
|
-
}
|
5176
|
-
|
5177
|
-
themeclass = " ui-body-" + theme;
|
5303
|
+
theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ),
|
5304
|
+
themeclass = " ui-body-" + theme,
|
5305
|
+
focusedEl, clearbtn;
|
5178
5306
|
|
5179
5307
|
$( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" );
|
5180
5308
|
|
5181
|
-
input.addClass("ui-input-text ui-body-"+ theme );
|
5182
|
-
|
5183
|
-
focusedEl = input;
|
5309
|
+
focusedEl = input.addClass("ui-input-text ui-body-"+ theme );
|
5184
5310
|
|
5185
5311
|
// XXX: Temporary workaround for issue 785 (Apple bug 8910589).
|
5186
5312
|
// Turn off autocorrect and autocomplete on non-iOS 5 devices
|
@@ -5217,17 +5343,14 @@ $.widget( "mobile.textinput", $.mobile.widget, {
|
|
5217
5343
|
});
|
5218
5344
|
|
5219
5345
|
function toggleClear() {
|
5220
|
-
|
5221
|
-
clearbtn.
|
5222
|
-
}
|
5223
|
-
clearbtn.removeClass( "ui-input-clear-hidden" );
|
5224
|
-
}
|
5346
|
+
setTimeout(function() {
|
5347
|
+
clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() );
|
5348
|
+
}, 0);
|
5225
5349
|
}
|
5226
5350
|
|
5227
5351
|
toggleClear();
|
5228
5352
|
|
5229
|
-
input.
|
5230
|
-
.focus( toggleClear );
|
5353
|
+
input.bind('paste cut keyup focus change blur', toggleClear);
|
5231
5354
|
|
5232
5355
|
} else {
|
5233
5356
|
input.addClass( "ui-corner-all ui-shadow-inset" + themeclass );
|
@@ -5249,9 +5372,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
|
|
5249
5372
|
clientHeight = input[ 0 ].clientHeight;
|
5250
5373
|
|
5251
5374
|
if ( clientHeight < scrollHeight ) {
|
5252
|
-
input.
|
5253
|
-
height: (scrollHeight + extraLineHeight)
|
5254
|
-
});
|
5375
|
+
input.height(scrollHeight + extraLineHeight);
|
5255
5376
|
}
|
5256
5377
|
},
|
5257
5378
|
keyupTimeout;
|
@@ -5261,10 +5382,15 @@ $.widget( "mobile.textinput", $.mobile.widget, {
|
|
5261
5382
|
keyupTimeout = setTimeout( keyup, keyupTimeoutBuffer );
|
5262
5383
|
});
|
5263
5384
|
|
5264
|
-
// Issue 509: the browser is not
|
5265
|
-
|
5266
|
-
|
5267
|
-
|
5385
|
+
// Issue 509: the browser is not providing scrollHeight properly until the styles load
|
5386
|
+
if ( $.trim( input.val() ) ) {
|
5387
|
+
// bind to the window load to make sure the height is calculated based on BOTH
|
5388
|
+
// the DOM and CSS
|
5389
|
+
$( window ).load( keyup );
|
5390
|
+
|
5391
|
+
// binding to pagechange here ensures that for pages loaded via
|
5392
|
+
// ajax the height is recalculated without user input
|
5393
|
+
$( document ).one( "pagechange", keyup );
|
5268
5394
|
}
|
5269
5395
|
}
|
5270
5396
|
},
|
@@ -5287,10 +5413,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
5287
5413
|
|
5288
5414
|
})( jQuery );
|
5289
5415
|
/*
|
5290
|
-
*
|
5291
|
-
* Copyright (c) jQuery Project
|
5292
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
5293
|
-
* http://jquery.org/license
|
5416
|
+
* custom "selectmenu" plugin
|
5294
5417
|
*/
|
5295
5418
|
|
5296
5419
|
(function( $, undefined ) {
|
@@ -5305,7 +5428,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
5305
5428
|
isMultiple = widget.isMultiple = widget.select[ 0 ].multiple,
|
5306
5429
|
buttonId = selectID + "-button",
|
5307
5430
|
menuId = selectID + "-menu",
|
5308
|
-
menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' data-" +$.mobile.ns + "theme='"+ widget.options.
|
5431
|
+
menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' data-" +$.mobile.ns + "theme='"+ widget.options.theme +"' data-" +$.mobile.ns + "overlay-theme='"+ widget.options.overlayTheme +"'>" +
|
5309
5432
|
"<div data-" + $.mobile.ns + "role='header'>" +
|
5310
5433
|
"<div class='ui-title'>" + label.getEncodedText() + "</div>"+
|
5311
5434
|
"</div>"+
|
@@ -5612,7 +5735,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
5612
5735
|
// fall into a black hole
|
5613
5736
|
self.thisPage.unbind( "pagehide.remove" );
|
5614
5737
|
|
5615
|
-
//for
|
5738
|
+
//for WebOS/Opera Mini (set lastscroll using button offset)
|
5616
5739
|
if ( scrollTop == 0 && btnOffset > screenHeight ) {
|
5617
5740
|
self.thisPage.one( "pagehide", function() {
|
5618
5741
|
$( this ).jqmData( "lastScroll", btnOffset );
|
@@ -5783,10 +5906,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
5783
5906
|
});
|
5784
5907
|
})( jQuery );
|
5785
5908
|
/*
|
5786
|
-
*
|
5787
|
-
* Copyright (c) jQuery Project
|
5788
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
5789
|
-
* http://jquery.org/license
|
5909
|
+
* "selectmenu" plugin
|
5790
5910
|
*/
|
5791
5911
|
|
5792
5912
|
(function( $, undefined ) {
|
@@ -5991,30 +6111,36 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
5991
6111
|
});
|
5992
6112
|
})( jQuery );
|
5993
6113
|
/*
|
5994
|
-
*
|
5995
|
-
* Copyright (c) jQuery Project
|
5996
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
5997
|
-
* http://jquery.org/license
|
6114
|
+
* "buttons" plugin - for making button-like links
|
5998
6115
|
*/
|
6116
|
+
|
5999
6117
|
( function( $, undefined ) {
|
6000
6118
|
|
6001
6119
|
$.fn.buttonMarkup = function( options ) {
|
6002
|
-
|
6003
|
-
|
6120
|
+
options = options || {};
|
6121
|
+
|
6122
|
+
for ( var i = 0; i < this.length; i++ ) {
|
6123
|
+
var el = this.eq( i ),
|
6124
|
+
e = el[ 0 ],
|
6004
6125
|
o = $.extend( {}, $.fn.buttonMarkup.defaults, {
|
6005
|
-
icon: el.jqmData( "icon" ),
|
6006
|
-
iconpos: el.jqmData( "iconpos" ),
|
6007
|
-
theme: el.jqmData( "theme" ),
|
6008
|
-
inline: el.jqmData( "inline" ),
|
6009
|
-
|
6010
|
-
|
6011
|
-
|
6126
|
+
icon: options.icon !== undefined ? options.icon : el.jqmData( "icon" ),
|
6127
|
+
iconpos: options.iconpos !== undefined ? options.iconpos : el.jqmData( "iconpos" ),
|
6128
|
+
theme: options.theme !== undefined ? options.theme : el.jqmData( "theme" ),
|
6129
|
+
inline: options.inline !== undefined ? options.inline : el.jqmData( "inline" ),
|
6130
|
+
shadow: options.shadow !== undefined ? options.shadow : el.jqmData( "shadow" ),
|
6131
|
+
corners: options.corners !== undefined ? options.corners : el.jqmData( "corners" ),
|
6132
|
+
iconshadow: options.iconshadow !== undefined ? options.iconshadow : el.jqmData( "iconshadow" )
|
6012
6133
|
}, options ),
|
6013
6134
|
|
6014
6135
|
// Classes Defined
|
6015
6136
|
innerClass = "ui-btn-inner",
|
6137
|
+
textClass = "ui-btn-text",
|
6016
6138
|
buttonClass, iconClass,
|
6017
|
-
|
6139
|
+
|
6140
|
+
// Button inner markup
|
6141
|
+
buttonInner = document.createElement( o.wrapperEls ),
|
6142
|
+
buttonText = document.createElement( o.wrapperEls ),
|
6143
|
+
buttonIcon = o.icon ? document.createElement( "span" ) : null;
|
6018
6144
|
|
6019
6145
|
if ( attachEvents ) {
|
6020
6146
|
attachEvents();
|
@@ -6059,15 +6185,33 @@ $.fn.buttonMarkup = function( options ) {
|
|
6059
6185
|
buttonClass += " ui-shadow";
|
6060
6186
|
}
|
6061
6187
|
|
6062
|
-
|
6063
|
-
|
6188
|
+
e.setAttribute( "data-" + $.mobile.ns + "theme", o.theme );
|
6189
|
+
el.addClass( buttonClass );
|
6064
6190
|
|
6065
|
-
|
6066
|
-
|
6067
|
-
"</D>" ).replace( /D/g, o.wrapperEls );
|
6191
|
+
buttonInner.className = innerClass;
|
6192
|
+
buttonInner.setAttribute("aria-hidden", "true");
|
6068
6193
|
|
6069
|
-
|
6070
|
-
|
6194
|
+
buttonText.className = textClass;
|
6195
|
+
buttonInner.appendChild( buttonText );
|
6196
|
+
|
6197
|
+
if ( buttonIcon ) {
|
6198
|
+
buttonIcon.className = iconClass;
|
6199
|
+
buttonInner.appendChild( buttonIcon );
|
6200
|
+
}
|
6201
|
+
|
6202
|
+
while ( e.firstChild ) {
|
6203
|
+
buttonText.appendChild( e.firstChild );
|
6204
|
+
}
|
6205
|
+
|
6206
|
+
e.appendChild( buttonInner );
|
6207
|
+
|
6208
|
+
// TODO obviously it would be nice to pull this element out instead of
|
6209
|
+
// retrieving it from the DOM again, but this change is much less obtrusive
|
6210
|
+
// and 1.0 draws nigh
|
6211
|
+
$.data( e, 'textWrapper', $( buttonText ) );
|
6212
|
+
}
|
6213
|
+
|
6214
|
+
return this;
|
6071
6215
|
};
|
6072
6216
|
|
6073
6217
|
$.fn.buttonMarkup.defaults = {
|
@@ -6079,14 +6223,23 @@ $.fn.buttonMarkup.defaults = {
|
|
6079
6223
|
};
|
6080
6224
|
|
6081
6225
|
function closestEnabledButton( element ) {
|
6082
|
-
|
6083
|
-
|
6084
|
-
|
6085
|
-
|
6086
|
-
|
6087
|
-
|
6088
|
-
|
6089
|
-
|
6226
|
+
var cname;
|
6227
|
+
|
6228
|
+
while ( element ) {
|
6229
|
+
// Note that we check for typeof className below because the element we
|
6230
|
+
// handed could be in an SVG DOM where className on SVG elements is defined to
|
6231
|
+
// be of a different type (SVGAnimatedString). We only operate on HTML DOM
|
6232
|
+
// elements, so we look for plain "string".
|
6233
|
+
|
6234
|
+
cname = ( typeof element.className === 'string' ) && element.className.split(' ');
|
6235
|
+
|
6236
|
+
if ( cname && $.inArray( "ui-btn", cname ) > -1 && $.inArray( "ui-disabled", cname ) < 0 ) {
|
6237
|
+
break;
|
6238
|
+
}
|
6239
|
+
element = element.parentNode;
|
6240
|
+
}
|
6241
|
+
|
6242
|
+
return element;
|
6090
6243
|
}
|
6091
6244
|
|
6092
6245
|
var attachEvents = function() {
|
@@ -6128,7 +6281,7 @@ var attachEvents = function() {
|
|
6128
6281
|
if ( btn ) {
|
6129
6282
|
$btn = $( btn );
|
6130
6283
|
theme = $btn.attr( "data-" + $.mobile.ns + "theme" );
|
6131
|
-
$btn.removeClass( "ui-btn-hover-" + theme ).addClass( "ui-btn-up-" + theme );
|
6284
|
+
$btn.removeClass( "ui-btn-hover-" + theme + " ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
|
6132
6285
|
}
|
6133
6286
|
}
|
6134
6287
|
});
|
@@ -6146,12 +6299,10 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
6146
6299
|
});
|
6147
6300
|
|
6148
6301
|
})( jQuery );
|
6149
|
-
/*
|
6150
|
-
*
|
6151
|
-
* Copyright (c) jQuery Project
|
6152
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6153
|
-
* http://jquery.org/license
|
6302
|
+
/*
|
6303
|
+
* "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc
|
6154
6304
|
*/
|
6305
|
+
|
6155
6306
|
(function( $, undefined ) {
|
6156
6307
|
|
6157
6308
|
$.fn.controlgroup = function( options ) {
|
@@ -6164,9 +6315,9 @@ $.fn.controlgroup = function( options ) {
|
|
6164
6315
|
shadow: false,
|
6165
6316
|
excludeInvisible: true
|
6166
6317
|
}, options ),
|
6167
|
-
groupheading = $el.
|
6318
|
+
groupheading = $el.children( "legend" ),
|
6168
6319
|
flCorners = o.direction == "horizontal" ? [ "ui-corner-left", "ui-corner-right" ] : [ "ui-corner-top", "ui-corner-bottom" ],
|
6169
|
-
type = $el.find( "input
|
6320
|
+
type = $el.find( "input" ).first().attr( "type" );
|
6170
6321
|
|
6171
6322
|
// Replace legend with more stylable replacement div
|
6172
6323
|
if ( groupheading.length ) {
|
@@ -6183,7 +6334,7 @@ $.fn.controlgroup = function( options ) {
|
|
6183
6334
|
els.removeClass( "ui-btn-corner-all ui-shadow" )
|
6184
6335
|
.eq( 0 ).addClass( flCorners[ 0 ] )
|
6185
6336
|
.end()
|
6186
|
-
.
|
6337
|
+
.last().addClass( flCorners[ 1 ] ).addClass( "ui-controlgroup-last" );
|
6187
6338
|
}
|
6188
6339
|
|
6189
6340
|
flipClasses( $el.find( ".ui-btn" + ( o.excludeInvisible ? ":visible" : "" ) ) );
|
@@ -6201,10 +6352,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
6201
6352
|
});
|
6202
6353
|
|
6203
6354
|
})(jQuery);/*
|
6204
|
-
*
|
6205
|
-
* Copyright (c) jQuery Project
|
6206
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6207
|
-
* http://jquery.org/license
|
6355
|
+
* "links" plugin - simple class additions for links
|
6208
6356
|
*/
|
6209
6357
|
|
6210
6358
|
(function( $, undefined ) {
|
@@ -6220,10 +6368,7 @@ $( document ).bind( "pagecreate create", function( e ){
|
|
6220
6368
|
});
|
6221
6369
|
|
6222
6370
|
})( jQuery );/*
|
6223
|
-
*
|
6224
|
-
* Copyright (c) jQuery Project
|
6225
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6226
|
-
* http://jquery.org/license
|
6371
|
+
* "fixHeaderFooter" plugin - on-demand positioning for headers,footers
|
6227
6372
|
*/
|
6228
6373
|
|
6229
6374
|
(function( $, undefined ) {
|
@@ -6602,10 +6747,7 @@ $( document ).bind( "pagecreate create", function( event ) {
|
|
6602
6747
|
|
6603
6748
|
})( jQuery );
|
6604
6749
|
/*
|
6605
|
-
*
|
6606
|
-
* Copyright (c) jQuery Project
|
6607
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6608
|
-
* http://jquery.org/license
|
6750
|
+
* "fixHeaderFooter" native plugin - Behavior for "fixed" headers,footers, and scrolling inner content
|
6609
6751
|
*/
|
6610
6752
|
|
6611
6753
|
(function( $, undefined ) {
|
@@ -6664,14 +6806,9 @@ $( document ).bind( "pagecreate", function( event ) {
|
|
6664
6806
|
});
|
6665
6807
|
|
6666
6808
|
})( jQuery );
|
6667
|
-
|
6668
|
-
|
6669
|
-
|
6670
|
-
*
|
6671
|
-
* Copyright 2010, jQuery Project
|
6672
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6673
|
-
* http://jquery.org/license
|
6674
|
-
*/
|
6809
|
+
/*
|
6810
|
+
* "init" - Initialize the framework
|
6811
|
+
*/
|
6675
6812
|
|
6676
6813
|
(function( $, window, undefined ) {
|
6677
6814
|
var $html = $( "html" ),
|