Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
e94de636
Commit
e94de636
authored
Sep 26, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to JQM 1.4beta
parent
3d3f513f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
450 additions
and
476 deletions
+450
-476
css/jquery-mobile/jquery-mobile.latest.css
css/jquery-mobile/jquery-mobile.latest.css
+42
-62
js/libs/jquery-mobile/jquery-mobile.js
js/libs/jquery-mobile/jquery-mobile.js
+408
-414
No files found.
css/jquery-mobile/jquery-mobile.latest.css
View file @
e94de636
/*!
* jQuery Mobile 1.4.0pre
* Git HEAD hash:
db7816b9b7d4a0985c8dd2b5de4d342000d094a4 <> Date: Thu Sep 19 2013 01:54:0
5 UTC
* Git HEAD hash:
a3802abdad43e66f19c63efb5394125dd58b154e <> Date: Thu Sep 26 2013 08:43:4
5 UTC
* http://jquerymobile.com
*
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
...
...
@@ -750,14 +750,37 @@ div.ui-controlgroup-label {
font-weight
:
normal
;
font-size
:
16px
;
}
/*
Field contain separator (< 28em)
/*
Separators
-----------------------------------------------------------------------------------------------------------*/
/* Field contain separator (< 28em) */
.ui-field-contain
{
border-bottom-color
:
#828282
;
border-bottom-color
:
rgba
(
0
,
0
,
0
,
.15
);
border-bottom-width
:
1px
;
border-bottom-style
:
solid
;
}
/* Table opt-in classes: strokes between each row, and alternating row stripes */
/* Classes table-stroke and table-stripe are deprecated in 1.4. */
.table-stroke
thead
th
,
.table-stripe
thead
th
,
.table-stripe
tbody
tr
:last-child
{
border-bottom
:
1px
solid
#d6d6d6
;
/* non-RGBA fallback */
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
.1
);
}
.table-stroke
tbody
th
,
.table-stroke
tbody
td
{
border-bottom
:
1px
solid
#e6e6e6
;
/* non-RGBA fallback */
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
.05
);
}
.table-stripe.table-stroke
tbody
tr
:last-child
th
,
.table-stripe.table-stroke
tbody
tr
:last-child
td
{
border-bottom
:
0
;
}
.table-stripe
tbody
tr
:nth-child
(
odd
)
td
,
.table-stripe
tbody
tr
:nth-child
(
odd
)
th
{
background-color
:
#eeeeee
;
/* non-RGBA fallback */
background-color
:
rgba
(
0
,
0
,
0
,
.04
);
}
/* Buttons
-----------------------------------------------------------------------------------------------------------*/
.ui-btn
,
...
...
@@ -908,7 +931,6 @@ html .ui-btn.ui-icon-checkbox-on:after {
-----------------------------------------------------------------------------------------------------------*/
/* Bar: Toolbars, dividers, slider track */
.ui-bar-a
,
.ui-overlay-a
.ui-bar-inherit
,
.ui-page-theme-a
.ui-bar-inherit
,
html
.ui-bar-a
.ui-bar-inherit
,
html
.ui-body-a
.ui-bar-inherit
,
...
...
@@ -934,7 +956,6 @@ html body .ui-group-theme-a .ui-bar-inherit {
}
/* Body: Read-only lists, text inputs, collapsible content */
.ui-body-a
,
.ui-overlay-a
.ui-body-inherit
,
.ui-page-theme-a
.ui-body-inherit
,
html
.ui-bar-a
.ui-body-inherit
,
html
.ui-body-a
.ui-body-inherit
,
...
...
@@ -950,7 +971,6 @@ html .ui-panel-page-container-a {
border-style
:
solid
;
}
/* Links */
.ui-overlay-a
a
,
.ui-page-theme-a
a
,
html
.ui-bar-a
a
,
html
.ui-body-a
a
,
...
...
@@ -958,21 +978,18 @@ html body .ui-group-theme-a a {
color
:
#0066ff
/*{a-link-color}*/
;
font-weight
:
bold
;
}
.ui-overlay-a
a
:visited
,
.ui-page-theme-a
a
:visited
,
html
.ui-bar-a
a
:visited
,
html
.ui-body-a
a
:visited
,
html
body
.ui-group-theme-a
a
:visited
{
color
:
#0066ff
/*{a-link-visited}*/
;
}
.ui-overlay-a
a
:hover
,
.ui-page-theme-a
a
:hover
,
html
.ui-bar-a
a
:hover
,
html
.ui-body-a
a
:hover
,
html
body
.ui-group-theme-a
a
:hover
{
color
:
#0033ff
/*{a-link-hover}*/
;
}
.ui-overlay-a
a
:active
,
.ui-page-theme-a
a
:active
,
html
.ui-bar-a
a
:active
,
html
.ui-body-a
a
:active
,
...
...
@@ -980,14 +997,12 @@ html body .ui-group-theme-a a:active {
color
:
#0033ff
/*{a-link-active}*/
;
}
/* Button up */
.ui-overlay-a
.ui-btn
,
.ui-page-theme-a
.ui-btn
,
html
.ui-bar-a
.ui-btn
,
html
.ui-body-a
.ui-btn
,
html
body
.ui-group-theme-a
.ui-btn
,
html
head
+
body
.ui-btn.ui-btn-a
,
/* Button visited */
.ui-overlay-a
.ui-btn
:visited
,
.ui-page-theme-a
.ui-btn
:visited
,
html
.ui-bar-a
.ui-btn
:visited
,
html
.ui-body-a
.ui-btn
:visited
,
...
...
@@ -999,7 +1014,6 @@ html head + body .ui-btn.ui-btn-a:visited {
text-shadow
:
0
/*{a-bup-shadow-x}*/
1px
/*{a-bup-shadow-y}*/
0
/*{a-bup-shadow-radius}*/
#eee
/*{a-bup-shadow-color}*/
;
}
/* Button hover */
.ui-overlay-a
.ui-btn
:hover
,
.ui-page-theme-a
.ui-btn
:hover
,
html
.ui-bar-a
.ui-btn
:hover
,
html
.ui-body-a
.ui-btn
:hover
,
...
...
@@ -1011,7 +1025,6 @@ html head + body .ui-btn.ui-btn-a:hover {
text-shadow
:
0
/*{a-bhover-shadow-x}*/
1px
/*{a-bhover-shadow-y}*/
0
/*{a-bhover-shadow-radius}*/
#eee
/*{a-bhover-shadow-color}*/
;
}
/* Button down */
.ui-overlay-a
.ui-btn
:active
,
.ui-page-theme-a
.ui-btn
:active
,
html
.ui-bar-a
.ui-btn
:active
,
html
.ui-body-a
.ui-btn
:active
,
...
...
@@ -1023,28 +1036,24 @@ html head + body .ui-btn.ui-btn-a:active {
text-shadow
:
0
/*{a-bdown-shadow-x}*/
1px
/*{a-bdown-shadow-y}*/
0
/*{a-bdown-shadow-radius}*/
#eee
/*{a-bdown-shadow-color}*/
;
}
/* Active button */
.ui-overlay-a
.ui-btn.ui-btn-active
,
.ui-page-theme-a
.ui-btn.ui-btn-active
,
html
.ui-bar-a
.ui-btn.ui-btn-active
,
html
.ui-body-a
.ui-btn.ui-btn-active
,
html
body
.ui-group-theme-a
.ui-btn.ui-btn-active
,
html
head
+
body
.ui-btn.ui-btn-a.ui-btn-active
,
/* Active checkbox icon */
.ui-overlay-a
.ui-icon-checkbox-on
:after
,
.ui-page-theme-a
.ui-icon-checkbox-on
:after
,
html
.ui-bar-a
.ui-icon-checkbox-on
:after
,
html
.ui-body-a
.ui-icon-checkbox-on
:after
,
html
body
.ui-group-theme-a
.ui-icon-checkbox-on
:after
,
.ui-btn.ui-icon-checkbox-on.ui-btn-a
:after
,
/* Active flipswitch background */
.ui-overlay-a
.ui-flipswitch-active
,
.ui-page-theme-a
.ui-flipswitch-active
,
html
.ui-bar-a
.ui-flipswitch-active
,
html
.ui-body-a
.ui-flipswitch-active
,
html
body
.ui-group-theme-a
.ui-flipswitch-active
,
html
body
.ui-flipswitch.ui-bar-a.ui-flipswitch-active
,
/* Active slider track */
.ui-overlay-a
.ui-slider-track
.ui-btn-active
,
.ui-page-theme-a
.ui-slider-track
.ui-btn-active
,
html
.ui-bar-a
.ui-slider-track
.ui-btn-active
,
html
.ui-body-a
.ui-slider-track
.ui-btn-active
,
...
...
@@ -1056,7 +1065,6 @@ html body div.ui-slider-track.ui-body-a .ui-btn-active {
text-shadow
:
0
/*{a-active-shadow-x}*/
1px
/*{a-active-shadow-y}*/
0
/*{a-active-shadow-radius}*/
#0033ff
/*{a-active-shadow-color}*/
;
}
/* Active radio button icon */
.ui-overlay-a
.ui-icon-radio-on
:after
,
.ui-page-theme-a
.ui-icon-radio-on
:after
,
html
.ui-bar-a
.ui-icon-radio-on
:after
,
html
.ui-body-a
.ui-icon-radio-on
:after
,
...
...
@@ -1065,14 +1073,12 @@ html body .ui-group-theme-a .ui-icon-radio-on:after,
border-color
:
#0066ff
/*{a-active-background-color}*/
;
}
/* Focus */
.ui-overlay-a
.ui-btn
:focus
,
.ui-page-theme-a
.ui-btn
:focus
,
html
.ui-bar-a
.ui-btn
:focus
,
html
.ui-body-a
.ui-btn
:focus
,
html
body
.ui-group-theme-a
.ui-btn
:focus
,
html
head
+
body
.ui-btn.ui-btn-a
:focus
,
/* Focus buttons and text inputs with div wrap */
.ui-overlay-a
.ui-focus
,
.ui-page-theme-a
.ui-focus
,
html
.ui-bar-a
.ui-focus
,
html
.ui-body-a
.ui-focus
,
...
...
@@ -1087,7 +1093,6 @@ html head + body .ui-body-a.ui-focus {
-----------------------------------------------------------------------------------------------------------*/
/* Bar: Toolbars, dividers, slider track */
.ui-bar-b
,
.ui-overlay-b
.ui-bar-inherit
,
.ui-page-theme-b
.ui-bar-inherit
,
html
.ui-bar-b
.ui-bar-inherit
,
html
.ui-body-b
.ui-bar-inherit
,
...
...
@@ -1113,7 +1118,6 @@ html body .ui-group-theme-b .ui-bar-inherit {
}
/* Body: Read-only lists, text inputs, collapsible content */
.ui-body-b
,
.ui-overlay-b
.ui-body-inherit
,
.ui-page-theme-b
.ui-body-inherit
,
html
.ui-bar-b
.ui-body-inherit
,
html
.ui-body-b
.ui-body-inherit
,
...
...
@@ -1129,7 +1133,6 @@ html .ui-panel-page-container-b {
border-style
:
solid
;
}
/* Links */
.ui-overlay-b
a
,
.ui-page-theme-b
a
,
html
.ui-bar-b
a
,
html
.ui-body-b
a
,
...
...
@@ -1137,21 +1140,18 @@ html body .ui-group-theme-b a {
color
:
#33ccff
/*{b-link-color}*/
;
font-weight
:
bold
;
}
.ui-overlay-b
a
:visited
,
.ui-page-theme-b
a
:visited
,
html
.ui-bar-b
a
:visited
,
html
.ui-body-b
a
:visited
,
html
body
.ui-group-theme-b
a
:visited
{
color
:
#33ccff
/*{b-link-visited}*/
;
}
.ui-overlay-b
a
:hover
,
.ui-page-theme-b
a
:hover
,
html
.ui-bar-b
a
:hover
,
html
.ui-body-b
a
:hover
,
html
body
.ui-group-theme-b
a
:hover
{
color
:
#3399ff
/*{b-link-hover}*/
;
}
.ui-overlay-b
a
:active
,
.ui-page-theme-b
a
:active
,
html
.ui-bar-b
a
:active
,
html
.ui-body-b
a
:active
,
...
...
@@ -1159,14 +1159,12 @@ html body .ui-group-theme-b a:active {
color
:
#3399ff
/*{b-link-active}*/
;
}
/* Button up */
.ui-overlay-b
.ui-btn
,
.ui-page-theme-b
.ui-btn
,
html
.ui-bar-b
.ui-btn
,
html
.ui-body-b
.ui-btn
,
html
body
.ui-group-theme-b
.ui-btn
,
html
head
+
body
.ui-btn.ui-btn-b
,
/* Button visited */
.ui-overlay-b
.ui-btn
:visited
,
.ui-page-theme-b
.ui-btn
:visited
,
html
.ui-bar-b
.ui-btn
:visited
,
html
.ui-body-b
.ui-btn
:visited
,
...
...
@@ -1178,7 +1176,6 @@ html head + body .ui-btn.ui-btn-b:visited {
text-shadow
:
0
/*{b-bup-shadow-x}*/
1px
/*{b-bup-shadow-y}*/
0
/*{b-bup-shadow-radius}*/
#111
/*{b-bup-shadow-color}*/
;
}
/* Button hover */
.ui-overlay-b
.ui-btn
:hover
,
.ui-page-theme-b
.ui-btn
:hover
,
html
.ui-bar-b
.ui-btn
:hover
,
html
.ui-body-b
.ui-btn
:hover
,
...
...
@@ -1190,7 +1187,6 @@ html head + body .ui-btn.ui-btn-b:hover {
text-shadow
:
0
/*{b-bhover-shadow-x}*/
1px
/*{b-bhover-shadow-y}*/
0
/*{b-bhover-shadow-radius}*/
#111
/*{b-bhover-shadow-color}*/
;
}
/* Button down */
.ui-overlay-b
.ui-btn
:active
,
.ui-page-theme-b
.ui-btn
:active
,
html
.ui-bar-b
.ui-btn
:active
,
html
.ui-body-b
.ui-btn
:active
,
...
...
@@ -1202,28 +1198,24 @@ html head + body .ui-btn.ui-btn-b:active {
text-shadow
:
0
/*{b-bdown-shadow-x}*/
1px
/*{b-bdown-shadow-y}*/
0
/*{b-bdown-shadow-radius}*/
#111
/*{b-bdown-shadow-color}*/
;
}
/* Active button */
.ui-overlay-b
.ui-btn.ui-btn-active
,
.ui-page-theme-b
.ui-btn.ui-btn-active
,
html
.ui-bar-b
.ui-btn.ui-btn-active
,
html
.ui-body-b
.ui-btn.ui-btn-active
,
html
body
.ui-group-theme-b
.ui-btn.ui-btn-active
,
html
head
+
body
.ui-btn.ui-btn-b.ui-btn-active
,
/* Active checkbox icon */
.ui-overlay-b
.ui-icon-checkbox-on
:after
,
.ui-page-theme-b
.ui-icon-checkbox-on
:after
,
html
.ui-bar-b
.ui-icon-checkbox-on
:after
,
html
.ui-body-b
.ui-icon-checkbox-on
:after
,
html
body
.ui-group-theme-b
.ui-icon-checkbox-on
:after
,
.ui-btn.ui-icon-checkbox-on.ui-btn-b
:after
,
/* Active flipswitch background */
.ui-overlay-b
.ui-flipswitch-active
,
.ui-page-theme-b
.ui-flipswitch-active
,
html
.ui-bar-b
.ui-flipswitch-active
,
html
.ui-body-b
.ui-flipswitch-active
,
html
body
.ui-group-theme-b
.ui-flipswitch-active
,
html
body
.ui-flipswitch.ui-bar-b.ui-flipswitch-active
,
/* Active slider track */
.ui-overlay-b
.ui-slider-track
.ui-btn-active
,
.ui-page-theme-b
.ui-slider-track
.ui-btn-active
,
html
.ui-bar-b
.ui-slider-track
.ui-btn-active
,
html
.ui-body-b
.ui-slider-track
.ui-btn-active
,
...
...
@@ -1235,7 +1227,6 @@ html body div.ui-slider-track.ui-body-b .ui-btn-active {
text-shadow
:
0
/*{b-active-shadow-x}*/
1px
/*{b-active-shadow-y}*/
0
/*{b-active-shadow-radius}*/
#3399ff
/*{b-active-shadow-color}*/
;
}
/* Active radio button icon */
.ui-overlay-b
.ui-icon-radio-on
:after
,
.ui-page-theme-b
.ui-icon-radio-on
:after
,
html
.ui-bar-b
.ui-icon-radio-on
:after
,
html
.ui-body-b
.ui-icon-radio-on
:after
,
...
...
@@ -1244,14 +1235,12 @@ html body .ui-group-theme-b .ui-icon-radio-on:after,
border-color
:
#33ccff
/*{b-active-background-color}*/
;
}
/* Focus */
.ui-overlay-b
.ui-btn
:focus
,
.ui-page-theme-b
.ui-btn
:focus
,
html
.ui-bar-b
.ui-btn
:focus
,
html
.ui-body-b
.ui-btn
:focus
,
html
body
.ui-group-theme-b
.ui-btn
:focus
,
html
head
+
body
.ui-btn.ui-btn-b
:focus
,
/* Focus buttons and text inputs with div wrap */
.ui-overlay-b
.ui-focus
,
.ui-page-theme-b
.ui-focus
,
html
.ui-bar-b
.ui-focus
,
html
.ui-body-b
.ui-focus
,
...
...
@@ -1564,11 +1553,8 @@ div.ui-mobile-viewport {
font-size
:
16px
;
padding
:
0
;
}
.ui-btn-inline
,
/* The high specificity ensures inline buttons in field containers stay inline */
html
body
.ui-btn.ui-btn-inline
{
.ui-btn-inline
{
display
:
inline-block
;
width
:
auto
;
vertical-align
:
middle
;
margin-right
:
.625em
;
}
...
...
@@ -1675,6 +1661,9 @@ button.ui-btn,
-moz-appearance
:
none
;
width
:
100%
;
}
button
.ui-btn-inline
{
width
:
auto
;
}
/* Firefox adds a 1px border in a button element. We negate this to make sure they have the same height as other buttons in controlgroups. */
button
.ui-btn
::-moz-focus-inner
{
border
:
0
;
...
...
@@ -1693,6 +1682,7 @@ button.ui-btn-icon-notext,
margin
:
0
0
.4em
;
}
/* Accessible content hiding */
/* ui-hide-label deprecated in 1.4. TODO: Remove in 1.5 */
.ui-hide-label
>
label
,
.ui-hide-label
.ui-controlgroup-label
,
.ui-hide-label
.ui-rangeslider
label
,
...
...
@@ -2515,6 +2505,7 @@ button.ui-btn-icon-notext,
-ms-box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
/* ui-hide-label deprecated in 1.4. TODO: Remove in 1.5 */
.ui-hide-label
>
label
+
[
class
*=
"ui-"
],
.ui-hide-label
.ui-controlgroup-controls
,
.ui-popup
.ui-field-contain
>
label
+
[
class
*=
"ui-"
],
...
...
@@ -2522,6 +2513,10 @@ button.ui-btn-icon-notext,
float
:
none
;
width
:
100%
;
}
.ui-field-contain
>
label
+
.ui-btn-inline
{
width
:
auto
;
margin-right
:
.625em
;
}
}
/* content configurations. */
.ui-grid-a
,
...
...
@@ -4031,6 +4026,7 @@ div.ui-slider-switch.ui-mini {
margin
:
0
;
}
@media
(
min-width
:
28em
)
{
/* ui-hide-label deprecated in 1.4. TODO: Remove in 1.5 */
.ui-field-contain
div
.ui-slider-switch
,
.ui-field-contain.ui-hide-label
div
.ui-slider-switch
{
display
:
inline-block
;
...
...
@@ -4238,6 +4234,12 @@ for Android 4.1 */
-moz-box-shadow
:
none
;
box-shadow
:
none
;
}
.ui-textinput-autogrow-resize
{
-webkit-transition
:
height
0.25s
;
-o-transition
:
height
0.25s
;
-moz-transition
:
height
0.25s
;
transition
:
height
0.25s
;
}
.ui-flipswitch
{
display
:
inline-block
;
vertical-align
:
middle
;
...
...
@@ -4343,28 +4345,6 @@ for Android 4.1 */
margin-bottom
:
1.4em
;
opacity
:
.5
;
}
/* Add strokes between each row */
.table-stroke
thead
th
{
border-bottom
:
1px
solid
#d6d6d6
;
/* non-RGBA fallback */
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
.1
);
}
.table-stroke
tbody
th
,
.table-stroke
tbody
td
{
border-bottom
:
1px
solid
#e6e6e6
;
/* non-RGBA fallback */
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
.05
);
}
/* Add alternating row stripes */
.table-stripe
tbody
tr
:nth-child
(
odd
)
td
,
.table-stripe
tbody
tr
:nth-child
(
odd
)
th
{
background-color
:
#eeeeee
;
/* non-RGBA fallback */
background-color
:
rgba
(
0
,
0
,
0
,
0.04
);
}
/* Add stroke to the header and last item */
.table-stripe
thead
th
,
.table-stripe
tbody
tr
:last-child
{
border-bottom
:
1px
solid
#d6d6d6
;
/* non-RGBA fallback */
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
.1
);
}
/*
Styles for the table columntoggle mode
*/
...
...
js/libs/jquery-mobile/jquery-mobile.js
View file @
e94de636
/*!
* jQuery Mobile 1.4.0pre
* Git HEAD hash:
e0f5b27764fb8a7cf843fa49e3dbd202879bbac9 <> Date: Fri Sep 13 2013 04:02:1
5 UTC
* Git HEAD hash:
a3802abdad43e66f19c63efb5394125dd58b154e <> Date: Thu Sep 26 2013 08:43:4
5 UTC
* http://jquerymobile.com
*
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
...
...
@@ -107,7 +107,12 @@
dynamicBaseEnabled
:
true
,
// default the property to remove dependency on assignment in init module
pageContainer
:
$
()
pageContainer
:
$
(),
//enable cross-domain page support
allowCrossDomainPages
:
false
,
dialogHashKey
:
"
&ui-state=dialog
"
});
})(
jQuery
,
this
);
...
...
@@ -546,6 +551,27 @@ $.ui.plugin = {
},
150
);
},
getClosestBaseUrl
:
function
(
ele
)
{
// Find the closest page and extract out its url.
var
url
=
$
(
ele
).
closest
(
"
.ui-page
"
).
jqmData
(
"
url
"
),
base
=
$
.
mobile
.
path
.
documentBase
.
hrefNoHash
;
if
(
!
$
.
mobile
.
dynamicBaseEnabled
||
!
url
||
!
$
.
mobile
.
path
.
isPath
(
url
)
)
{
url
=
base
;
}
return
$
.
mobile
.
path
.
makeUrlAbsolute
(
url
,
base
);
},
removeActiveLinkClass
:
function
(
forceRemoval
)
{
if
(
!!
$
.
mobile
.
activeClickedLink
&&
(
!
$
.
mobile
.
activeClickedLink
.
closest
(
"
.
"
+
$
.
mobile
.
activePageClass
).
length
||
forceRemoval
)
)
{
$
.
mobile
.
activeClickedLink
.
removeClass
(
$
.
mobile
.
activeBtnClass
);
}
$
.
mobile
.
activeClickedLink
=
null
;
},
// DEPRECATED in 1.4
// Find the closest parent with a theme class on it. Note that
// we are not using $.fn.closest() on purpose here because this
...
...
@@ -628,6 +654,19 @@ $.ui.plugin = {
height
=
(
typeof
height
===
"
number
"
)
?
height
:
$
.
mobile
.
getScreenHeight
();
page
.
css
(
"
min-height
"
,
height
-
(
pageOuterHeight
-
pageHeight
)
);
},
loading
:
function
()
{
// If this is the first call to this function, instantiate a loader widget
var
loader
=
this
.
loading
.
_widget
||
$
(
$
.
mobile
.
loader
.
prototype
.
defaultHtml
).
loader
(),
// Call the appropriate method on the loader
returnValue
=
loader
.
loader
.
apply
(
loader
,
arguments
);
// Make sure the loader is retained for future calls to this function.
this
.
loading
.
_widget
=
loader
;
return
returnValue
;
}
});
...
...
@@ -686,8 +725,8 @@ $.ui.plugin = {
// If any matching elements remain filter ones with keepNativeSelector
if
(
widgetElements
.
length
)
{
// $.mobile.page.prototype.keepNativeSelector is deprecated this is just for backcompt
// Switch to $.mobile.keepNative
Selector
in 1.5 which is just a value not a function
// $.mobile.page.prototype.keepNativeSelector is deprecated this is just for backcomp
a
t
// Switch to $.mobile.keepNative in 1.5 which is just a value not a function
widgetElements
=
widgetElements
.
not
(
$
.
mobile
.
page
.
prototype
.
keepNativeSelector
()
);
}
...
...
@@ -1281,10 +1320,13 @@ $.extend( $.Widget.prototype, {
elem
=
this
.
element
[
0
],
options
=
{};
for
(
option
in
this
.
options
)
{
value
=
$
.
mobile
.
getAttribute
(
elem
,
option
.
replace
(
rcapitals
,
replaceFunction
)
);
if
(
value
!=
null
)
{
options
[
option
]
=
value
;
//
if
(
!
$
.
mobile
.
getAttribute
(
elem
,
"
defaults
"
)
){
for
(
option
in
this
.
options
)
{
value
=
$
.
mobile
.
getAttribute
(
elem
,
option
.
replace
(
rcapitals
,
replaceFunction
)
);
if
(
value
!=
null
)
{
options
[
option
]
=
value
;
}
}
}
...
...
@@ -1299,38 +1341,8 @@ $.mobile.widget = $.Widget;
(
function
(
$
)
{
// DEPRECATED
// NOTE global mobile object settings
$
.
extend
(
$
.
mobile
,
{
// DEPRECATED Should the text be visble in the loading message?
loadingMessageTextVisible
:
undefined
,
// DEPRECATED When the text is visible, what theme does the loading box use?
loadingMessageTheme
:
undefined
,
// DEPRECATED default message setting
loadingMessage
:
undefined
,
// DEPRECATED
// Turn on/off page loading message. Theme doubles as an object argument
// with the following shape: { theme: '', text: '', html: '', textVisible: '' }
// NOTE that the $.mobile.loading* settings and params past the first are deprecated
showPageLoadingMsg
:
function
(
theme
,
msgText
,
textonly
)
{
$
.
mobile
.
loading
(
"
show
"
,
theme
,
msgText
,
textonly
);
},
// DEPRECATED
hidePageLoadingMsg
:
function
()
{
$
.
mobile
.
loading
(
"
hide
"
);
},
loading
:
function
()
{
this
.
loaderWidget
.
loader
.
apply
(
this
.
loaderWidget
,
arguments
);
}
});
// TODO move loader class down into the widget settings
var
loaderClass
=
"
ui-loader
"
,
$html
=
$
(
"
html
"
)
,
$window
=
$
.
mobile
.
window
;
var
loaderClass
=
"
ui-loader
"
,
$html
=
$
(
"
html
"
);
$
.
widget
(
"
mobile.loader
"
,
{
// NOTE if the global config settings are defined they will override these
...
...
@@ -1360,7 +1372,7 @@ $.mobile.widget = $.Widget;
this
.
element
.
css
({
top
:
$
.
support
.
scrollTop
&&
$window
.
scrollTop
()
+
$
window
.
height
()
/
2
||
top
:
$
.
support
.
scrollTop
&&
this
.
window
.
scrollTop
()
+
this
.
window
.
height
()
/
2
||
activeBtn
.
length
&&
activeBtn
.
offset
().
top
||
100
});
},
...
...
@@ -1369,13 +1381,13 @@ $.mobile.widget = $.Widget;
// if not, use abs positioning
checkLoaderPosition
:
function
()
{
var
offset
=
this
.
element
.
offset
(),
scrollTop
=
$
window
.
scrollTop
(),
scrollTop
=
this
.
window
.
scrollTop
(),
screenHeight
=
$
.
mobile
.
getScreenHeight
();
if
(
offset
.
top
<
scrollTop
||
(
offset
.
top
-
scrollTop
)
>
screenHeight
)
{
this
.
element
.
addClass
(
"
ui-loader-fakefix
"
);
this
.
fakeFixLoader
();
$
window
this
.
window
.
unbind
(
"
scroll
"
,
this
.
checkLoaderPosition
)
.
bind
(
"
scroll
"
,
$
.
proxy
(
this
.
fakeFixLoader
,
this
)
);
}
...
...
@@ -1396,69 +1408,60 @@ $.mobile.widget = $.Widget;
// use the prototype options so that people can set them globally at
// mobile init. Consistency, it's what's for dinner
if
(
$
.
type
(
theme
)
===
"
object
"
)
{
if
(
$
.
type
(
theme
)
===
"
object
"
)
{
loadSettings
=
$
.
extend
(
{},
this
.
options
,
theme
);
// prefer object property from the param then the old theme setting
theme
=
loadSettings
.
theme
||
$
.
mobile
.
loadingMessageTheme
;
theme
=
loadSettings
.
theme
;
}
else
{
loadSettings
=
this
.
options
;
// here we prefer the them value passed as a string argument, then
// here we prefer the them
e
value passed as a string argument, then
// we prefer the global option because we can't use undefined default
// prototype options, then the prototype option
theme
=
theme
||
$
.
mobile
.
loadingMessageTheme
||
loadSettings
.
theme
;
theme
=
theme
||
loadSettings
.
theme
;
}
// set the message text, prefer the param, then the settings object
// then loading message
message
=
msgText
||
$
.
mobile
.
loadingMessage
||
loadSettings
.
text
;
message
=
msgText
||
(
loadSettings
.
text
===
false
?
""
:
loadSettings
.
text
)
;
// prepare the dom
$html
.
addClass
(
"
ui-loading
"
);
if
(
$
.
mobile
.
loadingMessage
!==
false
||
loadSettings
.
html
)
{
// boolean values require a bit more work :P, supports object properties
// and old settings
if
(
$
.
mobile
.
loadingMessageTextVisible
!==
undefined
)
{
textVisible
=
$
.
mobile
.
loadingMessageTextVisible
;
}
else
{
textVisible
=
loadSettings
.
textVisible
;
}
// add the proper css given the options (theme, text, etc)
// Force text visibility if the second argument was supplied, or
// if the text was explicitly set in the object args
this
.
element
.
attr
(
"
class
"
,
loaderClass
+
"
ui-corner-all ui-body-
"
+
theme
+
"
ui-loader-
"
+
(
textVisible
||
msgText
||
theme
.
text
?
"
verbose
"
:
"
default
"
)
+
(
loadSettings
.
textonly
||
textonly
?
"
ui-loader-textonly
"
:
""
)
);
// TODO verify that jquery.fn.html is ok to use in both cases here
// this might be overly defensive in preventing unknowing xss
// if the html attribute is defined on the loading settings, use that
// otherwise use the fallbacks from above
if
(
loadSettings
.
html
)
{
this
.
element
.
html
(
loadSettings
.
html
);
}
else
{
this
.
element
.
find
(
"
h1
"
).
text
(
message
);
}
textVisible
=
loadSettings
.
textVisible
;
// add the proper css given the options (theme, text, etc)
// Force text visibility if the second argument was supplied, or
// if the text was explicitly set in the object args
this
.
element
.
attr
(
"
class
"
,
loaderClass
+
"
ui-corner-all ui-body-
"
+
theme
+
"
ui-loader-
"
+
(
textVisible
||
msgText
||
theme
.
text
?
"
verbose
"
:
"
default
"
)
+
(
loadSettings
.
textonly
||
textonly
?
"
ui-loader-textonly
"
:
""
)
);
// TODO verify that jquery.fn.html is ok to use in both cases here
// this might be overly defensive in preventing unknowing xss
// if the html attribute is defined on the loading settings, use that
// otherwise use the fallbacks from above
if
(
loadSettings
.
html
)
{
this
.
element
.
html
(
loadSettings
.
html
);
}
else
{
this
.
element
.
find
(
"
h1
"
).
text
(
message
);
}
// attach the loader to the DOM
this
.
element
.
appendTo
(
$
.
mobile
.
pageContainer
);
// attach the loader to the DOM
this
.
element
.
appendTo
(
$
.
mobile
.
pageContainer
);
// check that the loader is visible
this
.
checkLoaderPosition
();
// check that the loader is visible
this
.
checkLoaderPosition
();
// on scroll check the loader position
$window
.
bind
(
"
scroll
"
,
$
.
proxy
(
this
.
checkLoaderPosition
,
this
)
);
}
// on scroll check the loader position
this
.
window
.
bind
(
"
scroll
"
,
$
.
proxy
(
this
.
checkLoaderPosition
,
this
)
);
},
hide
:
function
()
{
$html
.
removeClass
(
"
ui-loading
"
);
if
(
$
.
mobile
.
loadingMessage
)
{
if
(
this
.
options
.
text
)
{
this
.
element
.
removeClass
(
"
ui-loader-fakefix
"
);
}
...
...
@@ -1467,9 +1470,6 @@ $.mobile.widget = $.Widget;
}
});
$window
.
bind
(
"
pagecontainercreate
"
,
function
()
{
$
.
mobile
.
loaderWidget
=
$
.
mobile
.
loaderWidget
||
$
(
$
.
mobile
.
loader
.
prototype
.
defaultHtml
).
loader
();
});
})(
jQuery
,
this
);
...
...
@@ -1834,7 +1834,7 @@ $.mobile.widget = $.Widget;
iframe_doc
.
open
();
// Set document.domain for the Iframe document as well, if necessary.
domain
&&
iframe_doc
.
write
(
'
<script>document.domain="
'
+
domain
+
'
"</script>
'
);
domain
&&
iframe_doc
.
write
(
'
<script>document.domain="
'
+
domain
+
'
"<
\
/script>
'
);
iframe_doc
.
close
();
...
...
@@ -2362,6 +2362,11 @@ if ( !$.support.boxShadow ) {
return
uri
.
protocol
+
"
//
"
+
uri
.
host
+
uri
.
pathname
+
uri
.
search
+
hash
;
},
//return the original document url
getDocumentUrl
:
function
(
asParsedObject
)
{
return
asParsedObject
?
$
.
extend
(
{},
path
.
documentUrl
)
:
path
.
documentUrl
.
href
;
},
parseLocation
:
function
()
{
return
this
.
parseUrl
(
this
.
getLocation
()
);
},
...
...
@@ -2643,6 +2648,52 @@ if ( !$.support.boxShadow ) {
hash
=
hash
.
substring
(
1
);
}
return
(
hasHash
?
"
#
"
:
""
)
+
hash
.
replace
(
/
([
!"#$%&'()*+,.
/
:;<=>?@[
\]
^`{|}~
])
/g
,
"
\\
$1
"
);
},
// return the substring of a filepath before the sub-page key, for making
// a server request
getFilePath
:
function
(
path
)
{
var
splitkey
=
"
&
"
+
$
.
mobile
.
subPageUrlKey
;
return
path
&&
path
.
split
(
splitkey
)[
0
].
split
(
dialogHashKey
)[
0
];
},
// check if the specified url refers to the first page in the main
// application document.
isFirstPageUrl
:
function
(
url
)
{
// We only deal with absolute paths.
var
u
=
path
.
parseUrl
(
path
.
makeUrlAbsolute
(
url
,
this
.
documentBase
)
),
// Does the url have the same path as the document?
samePath
=
u
.
hrefNoHash
===
this
.
documentUrl
.
hrefNoHash
||
(
this
.
documentBaseDiffers
&&
u
.
hrefNoHash
===
this
.
documentBase
.
hrefNoHash
),
// Get the first page element.
fp
=
$
.
mobile
.
firstPage
,
// Get the id of the first page element if it has one.
fpId
=
fp
&&
fp
[
0
]
?
fp
[
0
].
id
:
undefined
;
// The url refers to the first page if the path matches the document and
// it either has no hash value, or the hash is exactly equal to the id
// of the first page element.
return
samePath
&&
(
!
u
.
hash
||
u
.
hash
===
"
#
"
||
(
fpId
&&
u
.
hash
.
replace
(
/^#/
,
""
)
===
fpId
)
);
},
// Some embedded browsers, like the web view in Phone Gap, allow
// cross-domain XHR requests if the document doing the request was loaded
// via the file:// protocol. This is usually to allow the application to
// "phone home" and fetch app specific data. We normally let the browser
// handle external/cross-domain urls, but if the allowCrossDomainPages
// option is true, we will allow cross-domain http/https requests to go
// through our page loading logic.
isPermittedCrossDomainRequest
:
function
(
docUrl
,
reqUrl
)
{
return
$
.
mobile
.
allowCrossDomainPages
&&
(
docUrl
.
protocol
===
"
file:
"
||
docUrl
.
protocol
===
"
content:
"
)
&&
reqUrl
.
search
(
/^https
?
:/
)
!==
-
1
;
}
};
...
...
@@ -2656,15 +2707,20 @@ if ( !$.support.boxShadow ) {
path
.
documentBaseDiffers
=
(
path
.
documentUrl
.
hrefNoHash
!==
path
.
documentBase
.
hrefNoHash
);
//return the original document url
path
.
getDocumentUrl
=
function
(
asParsedObject
)
{
return
asParsedObject
?
$
.
extend
(
{},
path
.
documentUrl
)
:
path
.
documentUrl
.
href
;
};
//return the original document base url
path
.
getDocumentBase
=
function
(
asParsedObject
)
{
return
asParsedObject
?
$
.
extend
(
{},
path
.
documentBase
)
:
path
.
documentBase
.
href
;
};
// DEPRECATED as of 1.4.0 - remove in 1.5.0
$
.
extend
(
$
.
mobile
,
{
//return the original document url
getDocumentUrl
:
path
.
getDocumentUrl
,
//return the original document base url
getDocumentBase
:
path
.
getDocumentBase
});
})(
jQuery
);
...
...
@@ -3732,7 +3788,7 @@ if ( eventCaptureSupported ) {
durationThreshold
:
1000
,
// More time than this, and it isn't a swipe.
horizontalDistanceThreshold
:
1
0
,
// Swipe horizontal displacement must be more than this.
horizontalDistanceThreshold
:
3
0
,
// Swipe horizontal displacement must be more than this.
verticalDistanceThreshold
:
75
,
// Swipe vertical displacement must be less than this.
...
...
@@ -4008,10 +4064,77 @@ if ( eventCaptureSupported ) {
(
function
(
$
,
undefined
)
{
// existing base tag?
var
baseElement
=
$
(
"
head
"
).
children
(
"
base
"
),
// base element management, defined depending on dynamic base tag support
// TODO move to external widget
base
=
{
// define base element, for use in routing asset urls that are referenced
// in Ajax-requested markup
element
:
(
baseElement
.
length
?
baseElement
:
$
(
"
<base>
"
,
{
href
:
$
.
mobile
.
path
.
documentBase
.
hrefNoHash
}
).
prependTo
(
$
(
"
head
"
)
)
),
linkSelector
:
"
[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]
"
,
// set the generated BASE element's href to a new page's base path
set
:
function
(
href
)
{
// we should do nothing if the user wants to manage their url base
// manually
if
(
!
$
.
mobile
.
dynamicBaseEnabled
)
{
return
;
}
// we should use the base tag if we can manipulate it dynamically
if
(
$
.
support
.
dynamicBaseTag
)
{
base
.
element
.
attr
(
"
href
"
,
$
.
mobile
.
path
.
makeUrlAbsolute
(
href
,
$
.
mobile
.
path
.
documentBase
)
);
}
},
rewrite
:
function
(
href
,
page
)
{
var
newPath
=
$
.
mobile
.
path
.
get
(
href
);
page
.
find
(
base
.
linkSelector
).
each
(
function
(
i
,
link
)
{
var
thisAttr
=
$
(
link
).
is
(
"
[href]
"
)
?
"
href
"
:
$
(
link
).
is
(
"
[src]
"
)
?
"
src
"
:
"
action
"
,
thisUrl
=
$
(
link
).
attr
(
thisAttr
);
// XXX_jblas: We need to fix this so that it removes the document
// base URL, and then prepends with the new page URL.
// if full path exists and is same, chop it - helps IE out
thisUrl
=
thisUrl
.
replace
(
location
.
protocol
+
"
//
"
+
location
.
host
+
location
.
pathname
,
""
);
if
(
!
/^
(\w
+:|#|
\/)
/
.
test
(
thisUrl
)
)
{
$
(
link
).
attr
(
thisAttr
,
newPath
+
thisUrl
);
}
});
},
// set the generated BASE element's href to a new page's base path
reset
:
function
(
/* href */
)
{
base
.
element
.
attr
(
"
href
"
,
$
.
mobile
.
path
.
documentBase
.
hrefNoSearch
);
}
};
$
.
mobile
.
base
=
base
;
})(
jQuery
);
(
function
(
$
,
undefined
)
{
$
.
mobile
.
widgets
=
{};
var
originalWidget
=
$
.
widget
;
var
originalWidget
=
$
.
widget
,
// Record the original, non-mobileinit-modified version of $.mobile.keepNative
// so we can later determine whether someone has modified $.mobile.keepNative
keepNativeFactoryDefault
=
$
.
mobile
.
keepNative
;
$
.
widget
=
(
function
(
orig
)
{
return
function
()
{
...
...
@@ -4148,13 +4271,23 @@ $.widget( "mobile.page", {
// Deprecated in 1.4 remove in 1.5
keepNativeSelector
:
function
()
{
var
options
=
this
.
options
,
keepNativeDefined
=
options
.
keepNative
&&
$
.
trim
(
options
.
keepNative
);
if
(
keepNativeDefined
&&
options
.
keepNative
!==
options
.
keepNativeDefault
)
{
return
[
options
.
keepNative
,
options
.
keepNativeDefault
].
join
(
"
,
"
);
}
return
options
.
keepNativeDefault
;
keepNative
=
$
.
trim
(
options
.
keepNative
||
""
),
globalValue
=
$
.
trim
(
$
.
mobile
.
keepNative
),
optionValue
=
$
.
trim
(
options
.
keepNativeDefault
),
// Check if $.mobile.keepNative has changed from the factory default
newDefault
=
(
keepNativeFactoryDefault
===
globalValue
?
""
:
globalValue
),
// If $.mobile.keepNative has not changed, use options.keepNativeDefault
oldDefault
=
(
newDefault
===
""
?
optionValue
:
""
);
// Concatenate keepNative selectors from all sources where the value has
// changed or, if nothing has changed, return the default
return
(
(
keepNative
?
[
keepNative
]
:
[]
)
.
concat
(
newDefault
?
[
newDefault
]
:
[]
)
.
concat
(
oldDefault
?
[
oldDefault
]
:
[]
)
.
join
(
"
,
"
)
);
}
});
})(
jQuery
);
...
...
@@ -4169,16 +4302,14 @@ $.widget( "mobile.page", {
initSelector
:
false
,
_create
:
function
()
{
var
$window
=
$
(
window
);
this
.
setLastScrollEnabled
=
true
;
// TODO consider moving the navigation handler OUT of widget into
// some other object as glue between the navigate event and the
// content widget load and change methods
this
.
_on
(
$
window
,
{
navigate
:
"
_filterNavigateEvents
"
});
this
.
_on
(
this
.
window
,
{
navigate
:
"
_filterNavigateEvents
"
});
this
.
_on
(
$
window
,
{
this
.
_on
(
this
.
window
,
{
// disable an scroll setting when a hashchange has been fired,
// this only works because the recording of the scroll position
// is delayed for 100ms after the browser might have changed the
...
...
@@ -4194,7 +4325,7 @@ $.widget( "mobile.page", {
this
.
_on
({
pagechange
:
"
_afterContentChange
"
});
// handle initial hashchange from chrome :(
$
window
.
one
(
"
navigate
"
,
$
.
proxy
(
function
()
{
this
.
window
.
one
(
"
navigate
"
,
$
.
proxy
(
function
()
{
this
.
setLastScrollEnabled
=
true
;
},
this
));
},
...
...
@@ -4226,11 +4357,11 @@ $.widget( "mobile.page", {
// remove any binding that previously existed on the get scroll
// which may or may not be different than the scroll element
// determined for this page previously
this
.
_off
(
$
window
,
"
scrollstop
"
);
this
.
_off
(
this
.
window
,
"
scrollstop
"
);
// determine and bind to the current scoll element which may be the
// window or in the case of touch overflow the element touch overflow
this
.
_on
(
$
window
,
{
scrollstop
:
"
_delayedRecordScroll
"
});
this
.
_on
(
this
.
window
,
{
scrollstop
:
"
_delayedRecordScroll
"
});
},
_recordScroll
:
function
()
{
...
...
@@ -4259,7 +4390,7 @@ $.widget( "mobile.page", {
},
_getScroll
:
function
()
{
return
$
window
.
scrollTop
();
return
this
.
window
.
scrollTop
();
},
_getMinScroll
:
function
()
{
...
...
@@ -4295,8 +4426,8 @@ $.widget( "mobile.page", {
},
// TODO active page should be managed by the container (ie, it should be a property)
_getActiveContent
:
function
()
{
return
$
.
mobile
.
activePage
;
getActivePage
:
function
()
{
return
this
.
activePage
;
},
// TODO the first page should be a property set during _create using the logic
...
...
@@ -4307,17 +4438,17 @@ $.widget( "mobile.page", {
// TODO each content container should have a history object
_getHistory
:
function
()
{
return
urlH
istory
;
return
$
.
mobile
.
navigate
.
h
istory
;
},
// TODO use _getHistory
_getActiveHistory
:
function
()
{
return
$
.
mobile
.
urlH
istory
.
getActive
();
return
$
.
mobile
.
navigate
.
h
istory
.
getActive
();
},
// TODO the document base should be determined at creation
_getDocumentBase
:
function
()
{
return
documentBase
;
return
$
.
mobile
.
path
.
documentBase
;
},
_back
:
function
()
{
...
...
@@ -4330,16 +4461,15 @@ $.widget( "mobile.page", {
// TODO rename _handleDestination
_handleDestination
:
function
(
to
)
{
var
history
,
documentBase
;
var
history
;
// clean the hash for comparison if it's a url
if
(
$
.
type
(
to
)
===
"
string
"
)
{
to
=
path
.
stripHash
(
to
);
to
=
$
.
mobile
.
path
.
stripHash
(
to
);
}
if
(
to
)
{
history
=
this
.
_getHistory
(),
documentBase
=
this
.
_getDocumentBase
();
history
=
this
.
_getHistory
();
// At this point, 'to' can be one of 3 things, a cached page
// element from a history stack entry, an id, or site-relative /
...
...
@@ -4350,7 +4480,7 @@ $.widget( "mobile.page", {
// page/dialog.
//
// TODO move check to history object or path object?
to
=
!
path
.
isPath
(
to
)
?
(
path
.
makeUrlAbsolute
(
"
#
"
+
to
,
documentBase
)
)
:
to
;
to
=
!
$
.
mobile
.
path
.
isPath
(
to
)
?
(
$
.
mobile
.
path
.
makeUrlAbsolute
(
"
#
"
+
to
,
this
.
_getDocumentBase
()
)
)
:
to
;
// If we're about to go to an initial URL that contains a
// reference to a non-existent internal page, go to the first
...
...
@@ -4358,18 +4488,17 @@ $.widget( "mobile.page", {
// non-existent page, because the initial hash did not end
// up in the initial history entry
// TODO move check to history object?
if
(
to
===
path
.
makeUrlAbsolute
(
"
#
"
+
history
.
initialDst
,
documentBase
)
&&
if
(
to
===
$
.
mobile
.
path
.
makeUrlAbsolute
(
"
#
"
+
history
.
initialDst
,
this
.
_getDocumentBase
()
)
&&
history
.
stack
.
length
&&
history
.
stack
[
0
].
url
!==
history
.
initialDst
.
replace
(
dialogHashKey
,
""
)
)
{
history
.
stack
[
0
].
url
!==
history
.
initialDst
.
replace
(
$
.
mobile
.
dialogHashKey
,
""
)
)
{
to
=
this
.
_getInitialContent
();
}
}
return
to
||
this
.
_getInitialContent
();
},
_handleDialog
:
function
(
changePageOptions
,
data
)
{
var
to
,
active
,
activeContent
=
this
.
_getActiveContent
();
var
to
,
active
,
activeContent
=
this
.
getActivePage
();
// If current active page is not a dialog skip the dialog and continue
// in the same direction
...
...
@@ -4405,7 +4534,7 @@ $.widget( "mobile.page", {
_handleNavigate
:
function
(
url
,
data
)
{
//find first page via hash
// TODO stripping the hash twice with handleUrl
var
to
=
path
.
stripHash
(
url
),
history
=
this
.
_getHistory
(),
var
to
=
$
.
mobile
.
path
.
stripHash
(
url
),
history
=
this
.
_getHistory
(),
// transition is false if it's the first page, undefined
// otherwise (and may be overridden by default)
...
...
@@ -4429,7 +4558,7 @@ $.widget( "mobile.page", {
// key, and the initial destination isn't equal to the current target
// page, use the special dialog handling
if
(
history
.
activeIndex
>
0
&&
to
.
indexOf
(
dialogHashKey
)
>
-
1
&&
to
.
indexOf
(
$
.
mobile
.
dialogHashKey
)
>
-
1
&&
history
.
initialDst
!==
to
)
{
to
=
this
.
_handleDialog
(
changePageOptions
,
data
);
...
...
@@ -4447,11 +4576,7 @@ $.widget( "mobile.page", {
},
_getBase
:
function
()
{
return
base
;
},
_getBaseWithDefault
:
function
()
{
return
findBaseWithDefault
();
return
$
.
mobile
.
base
;
},
_getNs
:
function
()
{
...
...
@@ -4491,8 +4616,8 @@ $.widget( "mobile.page", {
// reference to an embedded page. If so, it may have been dynamically
// injected by a developer, in which case it would be lacking a
// data-url attribute and in need of enhancement.
if
(
page
.
length
===
0
&&
dataUrl
&&
!
path
.
isPath
(
dataUrl
)
)
{
page
=
this
.
element
.
children
(
path
.
hashToSelector
(
"
#
"
+
dataUrl
)
)
if
(
page
.
length
===
0
&&
dataUrl
&&
!
$
.
mobile
.
path
.
isPath
(
dataUrl
)
)
{
page
=
this
.
element
.
children
(
$
.
mobile
.
path
.
hashToSelector
(
"
#
"
+
dataUrl
)
)
.
attr
(
"
data-
"
+
this
.
_getNs
()
+
"
url
"
,
dataUrl
)
.
jqmData
(
"
url
"
,
dataUrl
);
}
...
...
@@ -4504,7 +4629,7 @@ $.widget( "mobile.page", {
// We check for this case here because we don't want a first-page with
// an id falling through to the non-existent embedded page error case.
if
(
page
.
length
===
0
&&
path
.
isFirstPageUrl
(
fileUrl
)
&&
$
.
mobile
.
path
.
isFirstPageUrl
(
fileUrl
)
&&
initialContent
&&
initialContent
.
parent
().
length
)
{
page
=
$
(
initialContent
);
...
...
@@ -4514,7 +4639,7 @@ $.widget( "mobile.page", {
},
_getLoader
:
function
()
{
return
$
.
mobile
.
load
erWidget
;
return
$
.
mobile
.
load
ing
()
;
},
_showLoading
:
function
(
delay
,
theme
,
msg
,
textonly
)
{
...
...
@@ -4564,7 +4689,7 @@ $.widget( "mobile.page", {
// TODO tagging a page with external to make sure that embedded pages aren't
// removed by the various page handling code is bad. Having page handling code
// in many places is bad. Solutions post 1.0
page
.
attr
(
"
data-
"
+
this
.
_getNs
()
+
"
url
"
,
path
.
convertUrlToDataUrl
(
fileUrl
)
)
page
.
attr
(
"
data-
"
+
this
.
_getNs
()
+
"
url
"
,
$
.
mobile
.
path
.
convertUrlToDataUrl
(
fileUrl
)
)
.
attr
(
"
data-
"
+
this
.
_getNs
()
+
"
external-page
"
,
true
);
return
page
;
...
...
@@ -4572,7 +4697,7 @@ $.widget( "mobile.page", {
_setLoadedTitle
:
function
(
page
,
html
)
{
//page title regexp
var
newPageTitle
=
html
.
match
(
rPageTitle
)
&&
RegExp
.
$1
;
var
newPageTitle
=
html
.
match
(
/<title
[^
>
]
*>
([^
<
]
*
)
/
)
&&
RegExp
.
$1
;
if
(
newPageTitle
&&
!
page
.
jqmData
(
"
title
"
)
)
{
newPageTitle
=
$
(
"
<div>
"
+
newPageTitle
+
"
</div>
"
).
text
();
...
...
@@ -4585,11 +4710,11 @@ $.widget( "mobile.page", {
},
_createDataUrl
:
function
(
absoluteUrl
)
{
return
path
.
convertUrlToDataUrl
(
absoluteUrl
);
return
$
.
mobile
.
path
.
convertUrlToDataUrl
(
absoluteUrl
);
},
_createFileUrl
:
function
(
absoluteUrl
)
{
return
path
.
getFilePath
(
absoluteUrl
);
return
$
.
mobile
.
path
.
getFilePath
(
absoluteUrl
);
},
_triggerWithDeprecated
:
function
(
name
,
data
,
page
)
{
...
...
@@ -4633,7 +4758,7 @@ $.widget( "mobile.page", {
RegExp
.
$1
&&
dataUrlRegex
.
test
(
RegExp
.
$1
)
&&
RegExp
.
$1
)
{
fileUrl
=
path
.
getFilePath
(
$
(
"
<div>
"
+
RegExp
.
$1
+
"
</div>
"
).
text
()
);
fileUrl
=
$
.
mobile
.
path
.
getFilePath
(
$
(
"
<div>
"
+
RegExp
.
$1
+
"
</div>
"
).
text
()
);
}
//dont update the base tag if we are prefetching
...
...
@@ -4712,7 +4837,7 @@ $.widget( "mobile.page", {
// The absolute version of the URL passed into the function. This
// version of the URL may contain dialog/subcontent params in it.
absUrl
=
path
.
makeUrlAbsolute
(
url
,
this
.
_get
BaseWithDefault
()
),
absUrl
=
$
.
mobile
.
path
.
makeUrlAbsolute
(
url
,
this
.
_find
BaseWithDefault
()
),
fileUrl
,
dataUrl
,
pblEvent
,
triggerData
;
// DEPRECATED reloadPage
...
...
@@ -4721,7 +4846,7 @@ $.widget( "mobile.page", {
// If the caller provided data, and we're using "get" request,
// append the data to the URL.
if
(
settings
.
data
&&
settings
.
type
===
"
get
"
)
{
absUrl
=
path
.
addSearchParams
(
absUrl
,
settings
.
data
);
absUrl
=
$
.
mobile
.
path
.
addSearchParams
(
absUrl
,
settings
.
data
);
settings
.
data
=
undefined
;
}
...
...
@@ -4746,8 +4871,8 @@ $.widget( "mobile.page", {
// If it isn't a reference to the first content and refers to missing
// embedded content reject the deferred and return
if
(
content
.
length
===
0
&&
path
.
isEmbeddedPage
(
fileUrl
)
&&
!
path
.
isFirstPageUrl
(
fileUrl
)
)
{
$
.
mobile
.
path
.
isEmbeddedPage
(
fileUrl
)
&&
!
$
.
mobile
.
path
.
isFirstPageUrl
(
fileUrl
)
)
{
deferred
.
reject
(
absUrl
,
settings
);
return
;
}
...
...
@@ -4801,7 +4926,7 @@ $.widget( "mobile.page", {
}
if
(
!
(
$
.
mobile
.
allowCrossDomainPages
||
path
.
isSameDomain
(
documentUrl
,
absUrl
)
)
)
{
$
.
mobile
.
path
.
isSameDomain
(
$
.
mobile
.
path
.
documentUrl
,
absUrl
)
)
)
{
deferred
.
reject
(
absUrl
,
settings
);
return
;
}
...
...
@@ -4821,7 +4946,7 @@ $.widget( "mobile.page", {
_loadError
:
function
(
absUrl
,
triggerData
,
settings
,
deferred
)
{
return
$
.
proxy
(
function
(
xhr
,
textStatus
,
errorThrown
)
{
//set base back to current path
this
.
_getBase
().
set
(
path
.
get
()
);
this
.
_getBase
().
set
(
$
.
mobile
.
path
.
get
()
);
// Add error info to our triggerData.
triggerData
.
xhr
=
xhr
;
...
...
@@ -4902,7 +5027,10 @@ $.widget( "mobile.page", {
_releaseTransitionLock
:
function
()
{
//release transition lock so navigation is free again
releasePageTransitionLock
();
isPageTransitioning
=
false
;
if
(
pageTransitionQueue
.
length
>
0
)
{
$
.
mobile
.
changePage
.
apply
(
null
,
pageTransitionQueue
.
pop
()
);
}
},
_removeActiveLinkClass
:
function
(
force
)
{
...
...
@@ -4950,7 +5078,7 @@ $.widget( "mobile.page", {
// See issue #5085
if
(
$
.
type
(
to
)
===
"
string
"
)
{
// if the toPage is a string simply convert it
triggerData
.
absUrl
=
path
.
makeUrlAbsolute
(
to
,
findBaseWithDefault
()
);
triggerData
.
absUrl
=
$
.
mobile
.
path
.
makeUrlAbsolute
(
to
,
this
.
_
findBaseWithDefault
()
);
}
else
{
// if the toPage is a jQuery object grab the absolute url stored
// in the loadPage callback where it exists
...
...
@@ -4981,7 +5109,7 @@ $.widget( "mobile.page", {
triggerData
=
{};
// Make sure we have a fromPage.
settings
.
fromPage
=
settings
.
fromPage
||
$
.
mobile
.
activePage
;
settings
.
fromPage
=
settings
.
fromPage
||
this
.
activePage
;
// if the page beforechange default is prevented return early
if
(
!
this
.
_triggerPageBeforeChange
(
to
,
triggerData
,
settings
)
)
{
...
...
@@ -5052,21 +5180,21 @@ $.widget( "mobile.page", {
// us to avoid generating a document url with an id hash in the case where the
// first-page of the document has an id attribute specified.
if
(
toPage
[
0
]
===
$
.
mobile
.
firstPage
[
0
]
&&
!
settings
.
dataUrl
)
{
settings
.
dataUrl
=
documentUrl
.
hrefNoHash
;
settings
.
dataUrl
=
$
.
mobile
.
path
.
documentUrl
.
hrefNoHash
;
}
// The caller passed us a real page DOM element. Update our
// internal state and then trigger a transition to the page.
fromPage
=
settings
.
fromPage
;
url
=
(
settings
.
dataUrl
&&
path
.
convertUrlToDataUrl
(
settings
.
dataUrl
)
)
||
url
=
(
settings
.
dataUrl
&&
$
.
mobile
.
path
.
convertUrlToDataUrl
(
settings
.
dataUrl
)
)
||
toPage
.
jqmData
(
"
url
"
);
// The pageUrl var is usually the same as url, except when url is obscured
// as a dialog url. pageUrl always contains the file path
pageUrl
=
url
;
fileUrl
=
path
.
getFilePath
(
url
);
active
=
urlH
istory
.
getActive
();
activeIsInitialPage
=
urlH
istory
.
activeIndex
===
0
;
fileUrl
=
$
.
mobile
.
path
.
getFilePath
(
url
);
active
=
$
.
mobile
.
navigate
.
h
istory
.
getActive
();
activeIsInitialPage
=
$
.
mobile
.
navigate
.
h
istory
.
activeIndex
===
0
;
historyDir
=
0
;
pageTitle
=
document
.
title
;
isDialog
=
(
settings
.
role
===
"
dialog
"
||
...
...
@@ -5094,7 +5222,7 @@ $.widget( "mobile.page", {
// Even if there is no page change to be done, we should keep the
// urlHistory in sync with the hash changes
if
(
settings
.
fromHashChange
)
{
urlH
istory
.
direct
({
url
:
url
});
$
.
mobile
.
navigate
.
h
istory
.
direct
({
url
:
url
});
}
return
;
...
...
@@ -5148,10 +5276,10 @@ $.widget( "mobile.page", {
// and history entry on top so that one may navigate back to the
// original dialog
if
(
active
.
url
&&
active
.
url
.
indexOf
(
dialogHashKey
)
>
-
1
&&
$
.
mobile
.
activePage
&&
!
$
.
mobile
.
activePage
.
hasClass
(
"
ui-dialog
"
)
&&
urlH
istory
.
activeIndex
>
0
)
{
active
.
url
.
indexOf
(
$
.
mobile
.
dialogHashKey
)
>
-
1
&&
this
.
activePage
&&
!
this
.
activePage
.
hasClass
(
"
ui-dialog
"
)
&&
$
.
mobile
.
navigate
.
h
istory
.
activeIndex
>
0
)
{
settings
.
changeHash
=
false
;
alreadyThere
=
true
;
...
...
@@ -5163,15 +5291,15 @@ $.widget( "mobile.page", {
// account for absolute urls instead of just relative urls use as hashes
if
(
!
alreadyThere
&&
url
.
indexOf
(
"
#
"
)
>
-
1
)
{
url
+=
dialogHashKey
;
url
+=
$
.
mobile
.
dialogHashKey
;
}
else
{
url
+=
"
#
"
+
dialogHashKey
;
url
+=
"
#
"
+
$
.
mobile
.
dialogHashKey
;
}
// tack on another dialogHashKey if this is the same as the initial hash
// this makes sure that a history entry is created for this dialog
if
(
urlHistory
.
activeIndex
===
0
&&
url
===
urlH
istory
.
initialDst
)
{
url
+=
dialogHashKey
;
if
(
$
.
mobile
.
navigate
.
history
.
activeIndex
===
0
&&
url
===
$
.
mobile
.
navigate
.
h
istory
.
initialDst
)
{
url
+=
$
.
mobile
.
dialogHashKey
;
}
}
...
...
@@ -5194,7 +5322,7 @@ $.widget( "mobile.page", {
//add page to history stack if it's not back or forward
if
(
!
historyDir
&&
alreadyThere
)
{
urlH
istory
.
getActive
().
pageUrl
=
pageUrl
;
$
.
mobile
.
navigate
.
h
istory
.
getActive
().
pageUrl
=
pageUrl
;
}
// Set the location hash.
...
...
@@ -5202,7 +5330,7 @@ $.widget( "mobile.page", {
// rebuilding the hash here since we loose it earlier on
// TODO preserve the originally passed in path
if
(
!
path
.
isPath
(
url
)
&&
url
.
indexOf
(
"
#
"
)
<
0
)
{
if
(
!
$
.
mobile
.
path
.
isPath
(
url
)
&&
url
.
indexOf
(
"
#
"
)
<
0
)
{
url
=
"
#
"
+
url
;
}
...
...
@@ -5224,9 +5352,12 @@ $.widget( "mobile.page", {
//set page title
document
.
title
=
pageTitle
;
//set "toPage" as activePage
//set "toPage" as activePage
deprecated in 1.4 remove in 1.5
$
.
mobile
.
activePage
=
toPage
;
//new way to handle activePage
this
.
activePage
=
toPage
;
// If we're navigating back in the URL history, set reverse accordingly.
settings
.
reverse
=
settings
.
reverse
||
historyDir
<
0
;
...
...
@@ -5252,43 +5383,17 @@ $.widget( "mobile.page", {
$
.
mobile
.
focusPage
(
toPage
);
}
releasePag
eTransitionLock
();
this
.
_releas
eTransitionLock
();
this
.
element
.
trigger
(
"
pagechange
"
,
triggerData
);
this
.
_triggerWithDeprecated
(
"
transition
"
,
triggerData
);
},
this
));
}
// TODO resetActivePageHeight
// TODO changePage
});
function
releasePageTransitionLock
()
{
isPageTransitioning
=
false
;
if
(
pageTransitionQueue
.
length
>
0
)
{
$
.
mobile
.
changePage
.
apply
(
null
,
pageTransitionQueue
.
pop
()
);
}
}
// The base URL for any given element depends on the page it resides in.
$
.
extend
(
$
.
mobile
,
{
getClosestBaseUrl
:
function
(
ele
)
{
// Find the closest page and extract out its url.
var
url
=
$
(
ele
).
closest
(
"
.ui-page
"
).
jqmData
(
"
url
"
),
base
=
documentBase
.
hrefNoHash
;
if
(
!
$
.
mobile
.
dynamicBaseEnabled
||
!
url
||
!
path
.
isPath
(
url
)
)
{
url
=
base
;
}
return
path
.
makeUrlAbsolute
(
url
,
base
);
},
removeActiveLinkClass
:
function
(
forceRemoval
)
{
if
(
!!
$
.
mobile
.
activeClickedLink
&&
(
!
$
.
mobile
.
activeClickedLink
.
closest
(
"
.
"
+
$
.
mobile
.
activePageClass
).
length
||
forceRemoval
)
)
{
$
.
mobile
.
activeClickedLink
.
removeClass
(
$
.
mobile
.
activeBtnClass
);
}
$
.
mobile
.
activeClickedLink
=
null
;
// determine the current base url
_findBaseWithDefault
:
function
()
{
var
closestBase
=
(
this
.
activePage
&&
$
.
mobile
.
getClosestBaseUrl
(
this
.
activePage
)
);
return
closestBase
||
$
.
mobile
.
path
.
documentBase
.
hrefNoHash
;
}
});
...
...
@@ -5296,164 +5401,13 @@ $.widget( "mobile.page", {
// the following deferred is resolved in the init file
$
.
mobile
.
navreadyDeferred
=
$
.
Deferred
();
// determine the current base url
function
findBaseWithDefault
()
{
var
closestBase
=
(
$
.
mobile
.
activePage
&&
$
.
mobile
.
getClosestBaseUrl
(
$
.
mobile
.
activePage
)
);
return
closestBase
||
documentBase
.
hrefNoHash
;
}
// NOTE: path extensions dependent on core attributes. Moved here to remove
// deps from $.mobile.path definition
var
$window
=
$
(
window
),
rPageTitle
=
/<title
[^
>
]
*>
([^
<
]
*
)
/
,
path
=
$
.
extend
(
$
.
mobile
.
path
,
{
// return the substring of a filepath before the sub-page key, for making
// a server request
getFilePath
:
function
(
path
)
{
var
splitkey
=
"
&
"
+
$
.
mobile
.
subPageUrlKey
;
return
path
&&
path
.
split
(
splitkey
)[
0
].
split
(
dialogHashKey
)[
0
];
},
// check if the specified url refers to the first page in the main
// application document.
isFirstPageUrl
:
function
(
url
)
{
// We only deal with absolute paths.
var
u
=
path
.
parseUrl
(
path
.
makeUrlAbsolute
(
url
,
this
.
documentBase
)
),
// Does the url have the same path as the document?
samePath
=
u
.
hrefNoHash
===
this
.
documentUrl
.
hrefNoHash
||
(
this
.
documentBaseDiffers
&&
u
.
hrefNoHash
===
this
.
documentBase
.
hrefNoHash
),
// Get the first page element.
fp
=
$
.
mobile
.
firstPage
,
// Get the id of the first page element if it has one.
fpId
=
fp
&&
fp
[
0
]
?
fp
[
0
].
id
:
undefined
;
// The url refers to the first page if the path matches the document and
// it either has no hash value, or the hash is exactly equal to the id
// of the first page element.
return
samePath
&&
(
!
u
.
hash
||
u
.
hash
===
"
#
"
||
(
fpId
&&
u
.
hash
.
replace
(
/^#/
,
""
)
===
fpId
)
);
},
// Some embedded browsers, like the web view in Phone Gap, allow
// cross-domain XHR requests if the document doing the request was loaded
// via the file:// protocol. This is usually to allow the application to
// "phone home" and fetch app specific data. We normally let the browser
// handle external/cross-domain urls, but if the allowCrossDomainPages
// option is true, we will allow cross-domain http/https requests to go
// through our page loading logic.
isPermittedCrossDomainRequest
:
function
(
docUrl
,
reqUrl
)
{
return
$
.
mobile
.
allowCrossDomainPages
&&
(
docUrl
.
protocol
===
"
file:
"
||
docUrl
.
protocol
===
"
content:
"
)
&&
reqUrl
.
search
(
/^https
?
:/
)
!==
-
1
;
}
}),
$head
=
$
(
"
head
"
),
// urlHistory is purely here to make guesses at whether the back or forward
// button was clicked and provide an appropriate transition
urlHistory
=
$
.
mobile
.
navigate
.
history
,
// queue to hold simultanious page transitions
pageTransitionQueue
=
[],
//these variables make all page containers use the same queue and only navigate one at a time
// queue to hold simultanious page transitions
var
pageTransitionQueue
=
[],
// indicates whether or not page is in process of transitioning
isPageTransitioning
=
false
,
// nonsense hash change key for dialogs, so they create a history entry
dialogHashKey
=
"
&ui-state=dialog
"
,
// existing base tag?
$base
=
$head
.
children
(
"
base
"
),
// tuck away the original document URL minus any fragment.
documentUrl
=
path
.
documentUrl
,
// if the document has an embedded base tag, documentBase is set to its
// initial value. If a base tag does not exist, then we default to the
// documentUrl.
documentBase
=
path
.
documentBase
,
// base element management, defined depending on dynamic base tag support
// TODO move to external widget
base
=
{
// define base element, for use in routing asset urls that are referenced
// in Ajax-requested markup
element
:
(
$base
.
length
?
$base
:
$
(
"
<base>
"
,
{
href
:
documentBase
.
hrefNoHash
}
).
prependTo
(
$head
)
),
linkSelector
:
"
[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]
"
,
// set the generated BASE element's href to a new page's base path
set
:
function
(
href
)
{
// we should do nothing if the user wants to manage their url base
// manually
if
(
!
$
.
mobile
.
dynamicBaseEnabled
)
{
return
;
}
// we should use the base tag if we can manipulate it dynamically
if
(
$
.
support
.
dynamicBaseTag
)
{
base
.
element
.
attr
(
"
href
"
,
path
.
makeUrlAbsolute
(
href
,
documentBase
)
);
}
},
rewrite
:
function
(
href
,
page
)
{
var
newPath
=
path
.
get
(
href
);
page
.
find
(
base
.
linkSelector
).
each
(
function
(
i
,
link
)
{
var
thisAttr
=
$
(
link
).
is
(
"
[href]
"
)
?
"
href
"
:
$
(
link
).
is
(
"
[src]
"
)
?
"
src
"
:
"
action
"
,
thisUrl
=
$
(
link
).
attr
(
thisAttr
);
// XXX_jblas: We need to fix this so that it removes the document
// base URL, and then prepends with the new page URL.
// if full path exists and is same, chop it - helps IE out
thisUrl
=
thisUrl
.
replace
(
location
.
protocol
+
"
//
"
+
location
.
host
+
location
.
pathname
,
""
);
if
(
!
/^
(\w
+:|#|
\/)
/
.
test
(
thisUrl
)
)
{
$
(
link
).
attr
(
thisAttr
,
newPath
+
thisUrl
);
}
});
},
// set the generated BASE element's href to a new page's base path
reset
:
function
(
/* href */
)
{
base
.
element
.
attr
(
"
href
"
,
documentBase
.
hrefNoSearch
);
}
};
//return the original document url
$
.
mobile
.
getDocumentUrl
=
path
.
getDocumentUrl
;
//return the original document base url
$
.
mobile
.
getDocumentBase
=
path
.
getDocumentBase
;
//expose path object on $.mobile
$
.
mobile
.
path
=
path
;
//expose base object on $.mobile
$
.
mobile
.
base
=
base
;
//history stack
$
.
mobile
.
urlHistory
=
urlHistory
;
$
.
mobile
.
dialogHashKey
=
dialogHashKey
;
isPageTransitioning
=
false
;
//enable cross-domain page support
$
.
mobile
.
allowCrossDomainPages
=
false
;
})(
jQuery
);
(
function
(
$
,
undefined
)
{
...
...
@@ -5923,7 +5877,9 @@ $.widget( "mobile.page", {
if
(
$
.
mobile
.
window
.
scrollTop
()
!==
this
.
toScroll
)
{
this
.
scrollPage
();
}
if
(
!
this
.
sequential
){
this
.
$to
.
addClass
(
$
.
mobile
.
activePageClass
);
}
this
.
deferred
.
resolve
(
this
.
name
,
this
.
reverse
,
this
.
$to
,
this
.
$from
,
true
);
},
...
...
@@ -6013,7 +5969,7 @@ $.widget( "mobile.page", {
maxTransitionOverride
=
$
.
mobile
.
maxTransitionWidth
!==
false
&&
$
.
mobile
.
window
.
width
()
>
$
.
mobile
.
maxTransitionWidth
,
none
=
!
$
.
support
.
cssTransitions
||
!
$
.
support
.
cssAnimations
||
maxTransitionOverride
||
!
this
.
name
||
this
.
name
===
"
none
"
||
Math
.
max
(
$
.
mobile
.
window
.
scrollTop
(),
this
.
toScroll
)
>
$
.
mobile
.
getMaxScrollForTransition
();
this
.
toScroll
=
$
.
mobile
.
urlH
istory
.
getActive
().
lastScroll
||
$
.
mobile
.
defaultHomeScroll
;
this
.
toScroll
=
$
.
mobile
.
navigate
.
h
istory
.
getActive
().
lastScroll
||
$
.
mobile
.
defaultHomeScroll
;
this
.
toggleViewportClass
();
if
(
this
.
$from
&&
!
none
)
{
...
...
@@ -6410,7 +6366,7 @@ $.widget( "mobile.dialog", {
if
(
$target
.
length
&&
!
$target
.
jqmData
(
"
transition
"
)
)
{
attrs
=
{};
attrs
[
"
data-
"
+
$
.
mobile
.
ns
+
"
transition
"
]
=
(
$
.
mobile
.
urlH
istory
.
getActive
()
||
{}
)[
"
transition
"
]
||
(
$
.
mobile
.
navigate
.
h
istory
.
getActive
()
||
{}
)[
"
transition
"
]
||
$
.
mobile
.
defaultDialogTransition
;
attrs
[
"
data-
"
+
$
.
mobile
.
ns
+
"
direction
"
]
=
"
reverse
"
;
$target
.
attr
(
attrs
);
...
...
@@ -9012,7 +8968,7 @@ $.widget( "mobile.slider", $.mobile.slider, {
this
.
_setOption
(
"
popupEnabled
"
,
this
.
options
.
popupEnabled
);
this
.
_on
(
this
.
handle
,
{
"
vmousedown
"
:
"
_showPopup
"
}
);
this
.
_on
(
this
.
slider
.
add
(
$
.
mobile
.
document
),
{
"
vmouseup
"
:
"
_hidePopup
"
}
);
this
.
_on
(
this
.
slider
.
add
(
this
.
document
),
{
"
vmouseup
"
:
"
_hidePopup
"
}
);
this
.
_refresh
();
},
...
...
@@ -9666,6 +9622,14 @@ $.widget( "mobile.flipswitch", $.extend({
if
(
$
.
contains
(
event
.
target
,
this
.
element
[
0
]
)
&&
this
.
element
.
is
(
"
:visible
"
)
)
{
if
(
event
.
type
!==
"
popupbeforeposition
"
)
{
this
.
element
.
addClass
(
"
ui-textinput-autogrow-resize
"
)
.
one
(
"
transitionend webkitTransitionEnd oTransitionEnd
"
,
$
.
proxy
(
function
()
{
this
.
element
.
removeClass
(
"
ui-textinput-autogrow-resize
"
);
},
this
)
);
}
this
.
_prepareHeightUpdate
();
}
},
...
...
@@ -9697,7 +9661,11 @@ $.widget( "mobile.flipswitch", $.extend({
this
.
keyupTimeout
=
0
;
this
.
element
.
css
(
"
height
"
,
"
0px
"
);
this
.
element
.
css
({
"
height
"
:
0
,
"
min-height
"
:
0
,
"
max-height
"
:
0
});
var
paddingTop
,
paddingBottom
,
paddingHeight
,
scrollHeight
=
this
.
element
[
0
].
scrollHeight
,
...
...
@@ -9721,7 +9689,11 @@ $.widget( "mobile.flipswitch", $.extend({
height
+=
paddingHeight
;
}
this
.
element
.
css
(
"
height
"
,
height
+
"
px
"
);
this
.
element
.
css
({
"
height
"
:
height
,
"
min-height
"
:
""
,
"
max-height
"
:
""
});
},
refresh
:
function
()
{
...
...
@@ -9889,6 +9861,10 @@ $.widget( "mobile.selectmenu", $.extend( {
this
.
_handleFormReset
();
this
.
_on
(
this
.
button
,
{
keydown
:
"
_handleKeydown
"
});
this
.
build
();
},
...
...
@@ -10000,15 +9976,23 @@ $.widget( "mobile.selectmenu", $.extend( {
}
},
_handleKeydown
:
function
(
/* event */
)
{
this
.
_delay
(
"
_refreshButton
"
);
},
_reset
:
function
()
{
this
.
refresh
();
},
refresh
:
function
()
{
_refreshButton
:
function
()
{
this
.
setButtonText
();
this
.
setButtonCount
();
},
refresh
:
function
()
{
this
.
_refreshButton
();
},
// open and close preserved in native selects
// to simplify users code when looping over selects
open
:
$
.
noop
,
...
...
@@ -10079,14 +10063,12 @@ function fitSegmentInsideSegment( windowSize, segmentSize, offset, desired ) {
return
returnValue
;
}
function
getWindowCoordinates
()
{
var
theWindow
=
$
.
mobile
.
window
;
function
getWindowCoordinates
(
theWindow
)
{
return
{
x
:
theWindow
.
scrollLeft
(),
y
:
theWindow
.
scrollTop
(),
cx
:
(
window
.
innerWidth
||
theWindow
.
width
()
),
cy
:
(
window
.
innerHeight
||
theWindow
.
height
()
)
cx
:
(
theWindow
[
0
]
.
innerWidth
||
theWindow
.
width
()
),
cy
:
(
theWindow
[
0
]
.
innerHeight
||
theWindow
.
height
()
)
};
}
...
...
@@ -10152,8 +10134,7 @@ $.widget( "mobile.popup", {
};
}
else
{
this
.
_ui
=
this
.
_enhance
(
theElement
,
myId
);
this
.
_applyTransition
(
currentOptions
.
transition
);
this
.
_applyTransition
(
currentOptions
.
transition
);
}
this
.
_setTolerance
(
currentOptions
.
tolerance
)
...
...
@@ -10161,12 +10142,12 @@ $.widget( "mobile.popup", {
// Event handlers
this
.
_on
(
this
.
_ui
.
screen
,
{
"
vclick
"
:
"
_eatEventAndClose
"
}
);
this
.
_on
(
$
.
mobile
.
window
,
{
this
.
_on
(
this
.
window
,
{
orientationchange
:
$
.
proxy
(
this
,
"
_handleWindowOrientationchange
"
),
resize
:
$
.
proxy
(
this
,
"
_handleWindowResize
"
),
keyup
:
$
.
proxy
(
this
,
"
_handleWindowKeyUp
"
)
});
this
.
_on
(
$
.
mobile
.
document
,
{
"
focusin
"
:
"
_handleDocumentFocusIn
"
}
);
this
.
_on
(
this
.
document
,
{
"
focusin
"
:
"
_handleDocumentFocusIn
"
}
);
},
_enhance
:
function
(
theElement
,
myId
)
{
...
...
@@ -10233,7 +10214,7 @@ $.widget( "mobile.popup", {
},
_expectResizeEvent
:
function
()
{
var
windowCoordinates
=
getWindowCoordinates
();
var
windowCoordinates
=
getWindowCoordinates
(
this
.
window
);
if
(
this
.
_resizeData
)
{
if
(
windowCoordinates
.
x
===
this
.
_resizeData
.
windowCoordinates
.
x
&&
...
...
@@ -10462,7 +10443,7 @@ $.widget( "mobile.popup", {
_clampPopupWidth
:
function
(
infoOnly
)
{
var
menuSize
,
windowCoordinates
=
getWindowCoordinates
(),
windowCoordinates
=
getWindowCoordinates
(
this
.
window
),
// rectangle within which the popup must fit
rectangle
=
{
x
:
this
.
_tolerance
.
l
,
...
...
@@ -10505,7 +10486,7 @@ $.widget( "mobile.popup", {
// align the bottom with the bottom of the document
returnValue
.
top
-=
Math
.
min
(
returnValue
.
top
,
Math
.
max
(
0
,
returnValue
.
top
+
menuSize
.
cy
-
$
.
mobile
.
document
.
height
()
)
);
Math
.
max
(
0
,
returnValue
.
top
+
menuSize
.
cy
-
this
.
document
.
height
()
)
);
return
returnValue
;
},
...
...
@@ -10594,7 +10575,7 @@ $.widget( "mobile.popup", {
_desiredCoords
:
function
(
openOptions
)
{
var
offset
,
dst
=
null
,
windowCoordinates
=
getWindowCoordinates
(),
windowCoordinates
=
getWindowCoordinates
(
this
.
window
),
x
=
openOptions
.
x
,
y
=
openOptions
.
y
,
pTo
=
openOptions
.
positionTo
;
...
...
@@ -10841,7 +10822,7 @@ $.widget( "mobile.popup", {
}
// remove nav bindings
$
.
mobile
.
window
.
off
(
currentOptions
.
closeEvents
);
this
.
window
.
off
(
currentOptions
.
closeEvents
);
// unbind click handlers added when history is disabled
this
.
element
.
undelegate
(
currentOptions
.
closeLinkSelector
,
currentOptions
.
closeLinkEvents
);
...
...
@@ -10852,7 +10833,7 @@ $.widget( "mobile.popup", {
// NOTE the pagebeforechange is bound to catch navigation events that don't
// alter the url (eg, dialogs from popups)
_bindContainerClose
:
function
()
{
$
.
mobile
.
window
this
.
window
.
on
(
this
.
options
.
closeEvents
,
$
.
proxy
(
this
,
"
_closePopup
"
)
);
},
...
...
@@ -10874,7 +10855,7 @@ $.widget( "mobile.popup", {
// set the global popup mutex
$
.
mobile
.
popup
.
active
=
this
;
this
.
_scrollTop
=
$
.
mobile
.
window
.
scrollTop
();
this
.
_scrollTop
=
this
.
window
.
scrollTop
();
// if history alteration is disabled close on navigate events
// and leave the url as is
...
...
@@ -10895,7 +10876,7 @@ $.widget( "mobile.popup", {
}
// cache some values for min/readability
urlHistory
=
$
.
mobile
.
urlH
istory
;
urlHistory
=
$
.
mobile
.
navigate
.
h
istory
;
hashkey
=
$
.
mobile
.
dialogHashKey
;
activePage
=
$
.
mobile
.
activePage
;
currentIsDialog
=
(
activePage
?
activePage
.
hasClass
(
"
ui-dialog
"
)
:
false
);
...
...
@@ -10922,7 +10903,7 @@ $.widget( "mobile.popup", {
}
// swallow the the initial navigation event, and bind for the next
$
.
mobile
.
window
.
one
(
"
beforenavigate
"
,
function
(
theEvent
)
{
this
.
window
.
one
(
"
beforenavigate
"
,
function
(
theEvent
)
{
theEvent
.
preventDefault
();
self
.
_open
(
options
);
self
.
_bindContainerClose
();
...
...
@@ -10940,7 +10921,7 @@ $.widget( "mobile.popup", {
return
this
;
}
this
.
_scrollTop
=
$
.
mobile
.
window
.
scrollTop
();
this
.
_scrollTop
=
this
.
window
.
scrollTop
();
if
(
this
.
options
.
history
&&
this
.
urlAltered
)
{
$
.
mobile
.
back
();
...
...
@@ -11028,6 +11009,11 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
this
.
button
.
focus
();
},
_handleKeydown
:
function
(
event
)
{
this
.
_super
(
event
);
this
.
_handleButtonVclickKeydown
(
event
);
},
_handleButtonVclickKeydown
:
function
(
event
)
{
if
(
this
.
options
.
disabled
||
this
.
isOpen
)
{
return
;
...
...
@@ -11178,8 +11164,7 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
// Button events
this
.
_on
(
this
.
button
,
{
vclick
:
"
_handleButtonVclickKeydown
"
,
keydown
:
"
_handleButtonVclickKeydown
"
vclick
:
"
_handleButtonVclickKeydown
"
});
// Events for list items
...
...
@@ -11329,7 +11314,7 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
_decideFormat
:
function
()
{
var
self
=
this
,
$window
=
$
.
mobile
.
window
,
$window
=
this
.
window
,
selfListParent
=
self
.
list
.
parent
(),
menuHeight
=
selfListParent
.
outerHeight
(),
scrollTop
=
$window
.
scrollTop
(),
...
...
@@ -11522,6 +11507,8 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
})(
jQuery
);
// buttonMarkup is deprecated as of 1.4.0 and will be removed in 1.5.0.
(
function
(
$
,
undefined
)
{
...
...
@@ -11750,7 +11737,9 @@ $.fn.buttonMarkup = function( options, overwriteClasses ) {
// ... and re-apply any unrecognized classes that were found
data
.
unknownClasses
).
join
(
"
"
);
el
.
setAttribute
(
"
role
"
,
"
button
"
);
if
(
el
.
tagName
.
toLowerCase
()
!==
"
button
"
)
{
el
.
setAttribute
(
"
role
"
,
"
button
"
);
}
}
return
this
;
...
...
@@ -11794,8 +11783,8 @@ $.widget( "mobile.controlgroup", $.extend( {
opts
=
this
.
options
;
// Run buttonmarkup
if
(
$
.
mobile
.
enhanceWithB
uttonMarkup
){
this
.
element
.
find
(
$
.
mobile
.
enhanceWithButtonMarkup
.
initSelector
).
each
(
$
.
mobile
.
enhanceWithButtonMarkup
);
if
(
$
.
fn
.
b
uttonMarkup
){
this
.
element
.
find
(
$
.
fn
.
buttonMarkup
.
initSelector
).
buttonMarkup
(
);
}
// Enhance child widgets
$
.
each
(
this
.
_childWidgets
,
$
.
proxy
(
function
(
number
,
widgetName
)
{
...
...
@@ -11962,7 +11951,7 @@ $.widget( "mobile.controlgroup", $.extend( {
page
=
this
.
element
.
closest
(
"
.ui-page
"
);
if
(
page
.
length
===
0
){
page
=
false
;
this
.
_on
(
$
.
mobile
.
document
,
{
this
.
_on
(
this
.
document
,
{
"
pageshow
"
:
"
refresh
"
});
}
...
...
@@ -12132,7 +12121,7 @@ $.widget( "mobile.controlgroup", $.extend( {
},
_bindPageEvents
:
function
()
{
var
page
=
(
!!
this
.
page
)?
this
.
element
.
closest
(
"
.ui-page
"
):
$
.
mobile
.
document
;
var
page
=
(
!!
this
.
page
)?
this
.
element
.
closest
(
"
.ui-page
"
):
this
.
document
;
//page event bindings
// Fixed toolbars require page zoom to be disabled, otherwise usability issues crop up
// This method is meant to disable zoom while a fixed-positioned toolbar page is visible
...
...
@@ -12165,7 +12154,7 @@ $.widget( "mobile.controlgroup", $.extend( {
_handlePageShow
:
function
()
{
this
.
updatePagePadding
(
(
!!
this
.
page
)?
this
.
page
:
"
.ui-page-active
"
);
if
(
this
.
options
.
updatePagePadding
)
{
this
.
_on
(
$
.
mobile
.
window
,
{
"
throttledresize
"
:
"
updatePagePadding
"
}
);
this
.
_on
(
this
.
window
,
{
"
throttledresize
"
:
"
updatePagePadding
"
}
);
}
},
...
...
@@ -12178,7 +12167,7 @@ $.widget( "mobile.controlgroup", $.extend( {
$
.
mobile
.
zoom
.
enable
(
true
);
}
if
(
o
.
updatePagePadding
)
{
this
.
_off
(
$
.
mobile
.
window
,
"
throttledresize
"
);
this
.
_off
(
this
.
window
,
"
throttledresize
"
);
}
if
(
o
.
trackPersistentToolbars
)
{
...
...
@@ -12216,7 +12205,7 @@ $.widget( "mobile.controlgroup", $.extend( {
},
_useTransition
:
function
(
notransition
)
{
var
$win
=
$
.
mobile
.
window
,
var
$win
=
this
.
window
,
$el
=
this
.
element
,
scroll
=
$win
.
scrollTop
(),
elHeight
=
$el
.
height
(),
...
...
@@ -12336,6 +12325,10 @@ $.widget( "mobile.controlgroup", $.extend( {
_create
:
function
()
{
this
.
_super
();
},
_makeFixed
:
function
()
{
this
.
_super
();
this
.
_workarounds
();
},
...
...
@@ -12373,9 +12366,9 @@ $.widget( "mobile.controlgroup", $.extend( {
_viewportOffset
:
function
()
{
var
$el
=
this
.
element
,
header
=
$el
.
hasClass
(
"
ui-header
"
),
offset
=
Math
.
abs
(
$el
.
offset
().
top
-
$
.
mobile
.
window
.
scrollTop
()
);
offset
=
Math
.
abs
(
$el
.
offset
().
top
-
this
.
window
.
scrollTop
()
);
if
(
!
header
)
{
offset
=
Math
.
round
(
offset
-
$
.
mobile
.
window
.
height
()
+
$el
.
outerHeight
()
)
-
60
;
offset
=
Math
.
round
(
offset
-
this
.
window
.
height
()
+
$el
.
outerHeight
()
)
-
60
;
}
return
offset
;
},
...
...
@@ -12384,7 +12377,7 @@ $.widget( "mobile.controlgroup", $.extend( {
_bindScrollWorkaround
:
function
()
{
var
self
=
this
;
//bind to scrollstop and check if the toolbars are correctly positioned
this
.
_on
(
$
.
mobile
.
window
,
{
scrollstop
:
function
()
{
this
.
_on
(
this
.
window
,
{
scrollstop
:
function
()
{
var
viewportOffset
=
self
.
_viewportOffset
();
//check if the header is visible and if its in the right place
if
(
viewportOffset
>
2
&&
self
.
_visible
)
{
...
...
@@ -12688,7 +12681,7 @@ $.widget( "mobile.panel", {
animate
:
"
ui-panel-animate
"
},
animate
:
true
,
theme
:
"
a
"
,
theme
:
null
,
position
:
"
left
"
,
dismissible
:
true
,
display
:
"
reveal
"
,
//accepts reveal, push, overlay
...
...
@@ -12794,14 +12787,13 @@ $.widget( "mobile.panel", {
_getPanelClasses
:
function
()
{
var
panelClasses
=
this
.
options
.
classes
.
panel
+
"
"
+
this
.
_getPosDisplayClasses
(
this
.
options
.
classes
.
panel
)
+
"
"
+
this
.
options
.
classes
.
panelClosed
;
"
"
+
this
.
options
.
classes
.
panelClosed
+
"
"
+
"
ui-body-
"
+
(
this
.
options
.
theme
?
this
.
options
.
theme
:
"
inherit
"
);
if
(
this
.
options
.
theme
)
{
panelClasses
+=
"
ui-body-
"
+
this
.
options
.
theme
;
}
if
(
!!
this
.
options
.
positionFixed
)
{
panelClasses
+=
"
"
+
this
.
options
.
classes
.
panelFixed
;
}
return
panelClasses
;
},
...
...
@@ -12869,8 +12861,8 @@ $.widget( "mobile.panel", {
},
_bindLinkListeners
:
function
()
{
this
.
_on
(
"
a
"
,
{
"
click
"
:
"
_handleClick
"
this
.
_on
(
"
body
"
,
{
"
click
a
"
:
"
_handleClick
"
});
},
...
...
@@ -12911,7 +12903,7 @@ $.widget( "mobile.panel", {
_bindPageEvents
:
function
()
{
var
self
=
this
;
$
.
mobile
.
document
this
.
document
// Close the panel if another panel on the page opens
.
on
(
"
panelbeforeopen
"
,
function
(
e
)
{
if
(
self
.
_open
&&
e
.
target
!==
self
.
element
[
0
]
)
{
...
...
@@ -12927,13 +12919,13 @@ $.widget( "mobile.panel", {
// Clean up open panels after page hide
if
(
self
.
_parentPage
)
{
$
.
mobile
.
document
.
on
(
"
pagehide
"
,
"
:jqmData(role='page')
"
,
function
()
{
this
.
document
.
on
(
"
pagehide
"
,
"
:jqmData(role='page')
"
,
function
()
{
if
(
self
.
_open
)
{
self
.
close
(
true
);
}
});
}
else
{
$
.
mobile
.
document
.
on
(
"
pagebeforehide
"
,
function
()
{
this
.
document
.
on
(
"
pagebeforehide
"
,
function
()
{
if
(
self
.
_open
)
{
self
.
close
(
true
);
}
...
...
@@ -12952,7 +12944,7 @@ $.widget( "mobile.panel", {
o
=
self
.
options
,
_openPanel
=
function
()
{
$
.
mobile
.
document
.
off
(
"
panelclose
"
);
self
.
document
.
off
(
"
panelclose
"
);
self
.
_page
().
jqmData
(
"
panel
"
,
"
open
"
);
if
(
$
.
support
.
cssTransform3d
&&
!!
o
.
animate
&&
o
.
display
!==
"
overlay
"
)
{
...
...
@@ -12961,7 +12953,7 @@ $.widget( "mobile.panel", {
}
if
(
!
immediate
&&
$
.
support
.
cssTransform3d
&&
!!
o
.
animate
)
{
$
.
mobile
.
document
.
on
(
self
.
_transitionEndEvents
,
complete
);
self
.
document
.
on
(
self
.
_transitionEndEvents
,
complete
);
}
else
{
setTimeout
(
complete
,
0
);
}
...
...
@@ -12987,11 +12979,13 @@ $.widget( "mobile.panel", {
self
.
_modalOpenClasses
=
self
.
_getPosDisplayClasses
(
o
.
classes
.
modal
)
+
"
"
+
o
.
classes
.
modalOpen
;
if
(
self
.
_modal
)
{
self
.
_modal
.
addClass
(
self
.
_modalOpenClasses
);
self
.
_modal
.
addClass
(
self
.
_modalOpenClasses
)
.
height
(
Math
.
max
(
self
.
_modal
.
height
(),
self
.
document
.
height
()
)
);
}
},
complete
=
function
()
{
$
.
mobile
.
document
.
off
(
self
.
_transitionEndEvents
,
complete
);
self
.
document
.
off
(
self
.
_transitionEndEvents
,
complete
);
if
(
o
.
display
!==
"
overlay
"
)
{
self
.
_wrapper
().
addClass
(
o
.
classes
.
pageContentPrefix
+
"
-open
"
);
...
...
@@ -13006,7 +13000,7 @@ $.widget( "mobile.panel", {
self
.
_trigger
(
"
beforeopen
"
);
if
(
self
.
_page
().
jqmData
(
"
panel
"
)
===
"
open
"
)
{
$
.
mobile
.
document
.
on
(
"
panelclose
"
,
function
()
{
self
.
document
.
on
(
"
panelclose
"
,
function
()
{
_openPanel
();
});
}
else
{
...
...
@@ -13024,7 +13018,7 @@ $.widget( "mobile.panel", {
_closePanel
=
function
()
{
if
(
!
immediate
&&
$
.
support
.
cssTransform3d
&&
!!
o
.
animate
)
{
$
.
mobile
.
document
.
on
(
self
.
_transitionEndEvents
,
complete
);
self
.
document
.
on
(
self
.
_transitionEndEvents
,
complete
);
}
else
{
setTimeout
(
complete
,
0
);
}
...
...
@@ -13041,7 +13035,7 @@ $.widget( "mobile.panel", {
}
},
complete
=
function
()
{
$
.
mobile
.
document
.
off
(
self
.
_transitionEndEvents
,
complete
);
self
.
document
.
off
(
self
.
_transitionEndEvents
,
complete
);
if
(
o
.
theme
&&
o
.
display
!==
"
overlay
"
)
{
self
.
_page
().
parent
().
removeClass
(
o
.
classes
.
pageContainer
+
"
-themed
"
+
o
.
classes
.
pageContainer
+
"
-
"
+
o
.
theme
);
...
...
@@ -13109,10 +13103,10 @@ $.widget( "mobile.panel", {
if
(
!
multiplePanels
)
{
$
.
mobile
.
document
.
off
(
"
panelopen panelclose
"
);
this
.
document
.
off
(
"
panelopen panelclose
"
);
if
(
this
.
_open
)
{
$
.
mobile
.
document
.
off
(
this
.
_transitionEndEvents
);
this
.
document
.
off
(
this
.
_transitionEndEvents
);
$
.
mobile
.
resetActivePageHeight
();
}
}
...
...
@@ -13272,7 +13266,7 @@ $.widget( "mobile.table", $.mobile.table, {
// so it can be called on refresh, too
// update column toggles on resize
this
.
_on
(
$
.
mobile
.
window
,
{
this
.
_on
(
this
.
window
,
{
throttledresize
:
"
_setToggleState
"
});
},
...
...
@@ -13350,7 +13344,7 @@ $.widget( "mobile.table", $.mobile.table, {
table
=
this
.
element
,
opts
=
this
.
options
,
ns
=
$
.
mobile
.
ns
,
fragment
=
$
.
mobile
.
document
[
0
].
createDocumentFragment
();
fragment
=
this
.
document
[
0
].
createDocumentFragment
();
id
=
this
.
_id
()
+
"
-popup
"
;
menuButton
=
$
(
"
<a role='button' href='#
"
+
id
+
"
'
"
+
...
...
@@ -14462,7 +14456,7 @@ $.widget( "ui.tabs", {
$window
.
trigger
(
"
pagecontainercreate
"
);
// cue page loading message
$
.
mobile
.
showPageLoadingMsg
(
);
$
.
mobile
.
loading
(
"
show
"
);
//remove initial build class (only present on first pageshow)
hideRenderingClass
();
...
...
@@ -14479,7 +14473,7 @@ $.widget( "ui.tabs", {
// Store the initial destination
if
(
$
.
mobile
.
path
.
isHashValid
(
location
.
hash
)
)
{
$
.
mobile
.
urlH
istory
.
initialDst
=
hash
.
replace
(
"
#
"
,
""
);
$
.
mobile
.
navigate
.
h
istory
.
initialDst
=
hash
.
replace
(
"
#
"
,
""
);
}
// make sure to set initial popstate state if it exists
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment