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
2baf5c02
Commit
2baf5c02
authored
Oct 14, 2013
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated to latest JQM 1.4beta
parent
a7b8491f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
358 additions
and
198 deletions
+358
-198
css/jquery-mobile/jquery-mobile.latest.css
css/jquery-mobile/jquery-mobile.latest.css
+44
-46
js/libs/jquery-mobile/jquery-mobile.js
js/libs/jquery-mobile/jquery-mobile.js
+314
-152
No files found.
css/jquery-mobile/jquery-mobile.latest.css
View file @
2baf5c02
/*!
* jQuery Mobile 1.4.0pre
* Git HEAD hash:
9fa98739303e2816ea53981f328946aae078f046 <> Date: Tue Oct 1 2013 11:20:32
UTC
* Git HEAD hash:
fdda8729a0a71626aa898053ff3d2a59b309e95b <> Date: Mon Oct 14 2013 09:26:33
UTC
* http://jquerymobile.com
*
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
...
...
@@ -60,7 +60,8 @@
background-image
:
url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20width%3D%2212px%22%20height%3D%228px%22%20viewBox%3D%220%200%2012%208%22%20style%3D%22enable-background%3Anew%200%200%2012%208%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20fill%3D%22%23FFF%22%20points%3D%226%2C0%200%2C6%202%2C8%206%2C4%2010%2C8%2012%2C6%20%22%2F%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E')
;
}
.ui-icon-check
:after
,
html
.ui-btn.ui-checkbox-on.ui-icon-checkbox-on
:after
{
/* Used ui-checkbox-on twice to increase specificity. If active state has background-image for gradient this rule overrides. */
html
.ui-btn.ui-checkbox-on.ui-checkbox-on
:after
{
background-image
:
url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20width%3D%2214px%22%20height%3D%2212px%22%20viewBox%3D%220%200%2014%2012%22%20style%3D%22enable-background%3Anew%200%200%2014%2012%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20fill%3D%22%23FFF%22%20points%3D%2214%2C3%2011%2C0%205.003%2C5.997%203%2C4%200%2C7%204.966%2C12%204.983%2C11.983%205%2C12%20%22%2F%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E')
;
}
.ui-icon-clock
:after
{
...
...
@@ -229,8 +230,8 @@ html .ui-btn.ui-checkbox-on.ui-icon-checkbox-on:after {
}
.ui-alt-icon.ui-icon-check
:after
,
.ui-alt-icon
.ui-icon-check
:after
,
.ui-alt-icon.ui-btn.ui-checkbox-on.ui-icon
-checkbox-on
:after
,
.ui-alt-icon
.ui-btn.ui-checkbox-on.ui-icon
-checkbox-on
:after
{
html
.ui-alt-icon.ui-btn.ui
-checkbox-on
:after
,
html
.ui-alt-icon
.ui-btn.ui
-checkbox-on
:after
{
background-image
:
url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20width%3D%2214px%22%20height%3D%2212px%22%20viewBox%3D%220%200%2014%2012%22%20style%3D%22enable-background%3Anew%200%200%2014%2012%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%2214%2C3%2011%2C0%205.003%2C5.997%203%2C4%200%2C7%204.966%2C12%204.983%2C11.983%205%2C12%20%22%2F%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E')
;
}
.ui-alt-icon.ui-icon-clock
:after
,
...
...
@@ -416,7 +417,7 @@ html .ui-btn.ui-checkbox-on.ui-icon-checkbox-on:after {
background-image
:
url(images/icons-png/carat-u-white.png)
;
}
.ui-nosvg
.ui-icon-check
:after
,
.ui-nosvg
.ui-btn.ui-checkbox-on.ui-icon
-checkbox-on
:after
{
html
.ui-nosvg
.ui-btn.ui
-checkbox-on
:after
{
background-image
:
url(images/icons-png/check-white.png)
;
}
.ui-nosvg
.ui-icon-clock
:after
{
...
...
@@ -585,8 +586,8 @@ html .ui-btn.ui-checkbox-on.ui-icon-checkbox-on:after {
}
.ui-nosvg
.ui-alt-icon.ui-icon-check
:after
,
.ui-nosvg
.ui-alt-icon
.ui-icon-check
:after
,
.ui-nosvg
.ui-alt-icon.ui-btn.ui-
icon-
checkbox-on
:after
,
.ui-nosvg
.ui-alt-icon
.ui-btn.ui-
icon-
checkbox-on
:after
{
.ui-nosvg
.ui-alt-icon.ui-btn.ui-checkbox-on
:after
,
.ui-nosvg
.ui-alt-icon
.ui-btn.ui-checkbox-on
:after
{
background-image
:
url(images/icons-png/check-black.png)
;
}
.ui-nosvg
.ui-alt-icon.ui-icon-clock
:after
,
...
...
@@ -856,9 +857,7 @@ label.ui-btn {
.ui-btn-icon-right
:after
,
.ui-btn-icon-top
:after
,
.ui-btn-icon-bottom
:after
,
.ui-btn-icon-notext
:after
,
html
.ui-btn.ui-icon-checkbox-off
:after
,
html
.ui-btn.ui-icon-radio-off
:after
{
.ui-btn-icon-notext
:after
{
background-color
:
#666
/*{global-icon-color}*/
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
)
/*{global-icon-disc}*/
;
background-position
:
center
center
;
...
...
@@ -869,10 +868,10 @@ html .ui-btn.ui-icon-radio-off:after {
/* Alt icons */
.ui-alt-icon.ui-btn
:after
,
.ui-alt-icon
.ui-btn
:after
,
html
.ui-alt-icon.ui-
icon-
checkbox-off
:after
,
html
.ui-alt-icon.ui-
icon-
radio-off
:after
,
html
.ui-alt-icon
.ui-
icon-
checkbox-off
:after
,
html
.ui-alt-icon
.ui-
icon-
radio-off
:after
{
html
.ui-alt-icon.ui-checkbox-off
:after
,
html
.ui-alt-icon.ui-radio-off
:after
,
html
.ui-alt-icon
.ui-checkbox-off
:after
,
html
.ui-alt-icon
.ui-radio-off
:after
{
background-color
:
#666
/*{global-icon-color}*/
;
background-color
:
rgba
(
0
,
0
,
0
,
.15
)
/*{global-icon-disc-alt}*/
;
}
...
...
@@ -889,27 +888,26 @@ html .ui-alt-icon .ui-icon-radio-off:after {
box-shadow
:
0
1px
0
rgba
(
255
,
255
,
255
,
.3
)
/*{global-icon-shadow}*/
;
}
/* Checkbox and radio */
html
.ui-btn.ui-icon
-checkbox-off
:after
,
html
.ui-btn.ui-icon
-checkbox-on
:after
,
html
.ui-btn.ui-icon
-radio-off
:after
,
html
.ui-btn.ui-icon
-radio-on
:after
{
.ui-btn.ui
-checkbox-off
:after
,
.ui-btn.ui
-checkbox-on
:after
,
.ui-btn.ui
-radio-off
:after
,
.ui-btn.ui
-radio-on
:after
{
display
:
block
;
width
:
18px
;
height
:
18px
;
margin
:
-9px
2px
0
2px
;
}
.ui-btn.ui-icon-checkbox-off
:after
,
.ui-btn.ui-icon-radio-off
:after
{
background-image
:
none
;
.ui-checkbox-off
:after
,
.ui-btn.ui-radio-off
:after
{
filter
:
Alpha
(
Opacity
=
30
);
opacity
:
.3
;
}
html
.ui-btn.ui-icon
-checkbox-off
:after
,
html
.ui-btn.ui-icon
-checkbox-on
:after
{
.ui-btn.ui
-checkbox-off
:after
,
.ui-btn.ui
-checkbox-on
:after
{
-webkit-border-radius
:
.1875em
;
border-radius
:
.1875em
;
}
.ui-radio
.ui-btn.ui-
icon-
radio-on
:after
{
.ui-radio
.ui-btn.ui-radio-on
:after
{
background-image
:
none
;
background-color
:
#fff
;
width
:
8px
;
...
...
@@ -917,8 +915,8 @@ html .ui-btn.ui-icon-checkbox-on:after {
border-width
:
5px
;
border-style
:
solid
;
}
.ui-alt-icon.ui-btn.ui-
icon-
radio-on
:after
,
.ui-alt-icon
.ui-btn.ui-
icon-
radio-on
:after
{
.ui-alt-icon.ui-btn.ui-radio-on
:after
,
.ui-alt-icon
.ui-btn.ui-radio-on
:after
{
background-color
:
#000
;
}
/* Loader */
...
...
@@ -1042,11 +1040,11 @@ 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-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
,
.ui-page-theme-a
.ui-checkbox-on
:after
,
html
.ui-bar-a
.ui-checkbox-on
:after
,
html
.ui-body-a
.ui-checkbox-on
:after
,
html
body
.ui-group-theme-a
.ui-checkbox-on
:after
,
.ui-btn.ui-checkbox-on.ui-btn-a
:after
,
/* Active flipswitch background */
.ui-page-theme-a
.ui-flipswitch-active
,
html
.ui-bar-a
.ui-flipswitch-active
,
...
...
@@ -1065,11 +1063,11 @@ 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-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
,
html
body
.ui-group-theme-a
.ui-
icon-
radio-on
:after
,
.ui-btn.ui-
icon-
radio-on.ui-btn-a
:after
{
.ui-page-theme-a
.ui-radio-on
:after
,
html
.ui-bar-a
.ui-radio-on
:after
,
html
.ui-body-a
.ui-radio-on
:after
,
html
body
.ui-group-theme-a
.ui-radio-on
:after
,
.ui-btn.ui-radio-on.ui-btn-a
:after
{
border-color
:
#0066ff
/*{a-active-background-color}*/
;
}
/* Focus */
...
...
@@ -1204,11 +1202,11 @@ 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-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
,
.ui-page-theme-b
.ui-checkbox-on
:after
,
html
.ui-bar-b
.ui-checkbox-on
:after
,
html
.ui-body-b
.ui-checkbox-on
:after
,
html
body
.ui-group-theme-b
.ui-checkbox-on
:after
,
.ui-btn.ui-checkbox-on.ui-btn-b
:after
,
/* Active flipswitch background */
.ui-page-theme-b
.ui-flipswitch-active
,
html
.ui-bar-b
.ui-flipswitch-active
,
...
...
@@ -1227,11 +1225,11 @@ 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-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
,
html
body
.ui-group-theme-b
.ui-
icon-
radio-on
:after
,
.ui-btn.ui-
icon-
radio-on.ui-btn-b
:after
{
.ui-page-theme-b
.ui-radio-on
:after
,
html
.ui-bar-b
.ui-radio-on
:after
,
html
.ui-body-b
.ui-radio-on
:after
,
html
body
.ui-group-theme-b
.ui-radio-on
:after
,
.ui-btn.ui-radio-on.ui-btn-b
:after
{
border-color
:
#33ccff
/*{b-active-background-color}*/
;
}
/* Focus */
...
...
js/libs/jquery-mobile/jquery-mobile.js
View file @
2baf5c02
/*!
* jQuery Mobile 1.4.0pre
* Git HEAD hash:
9fa98739303e2816ea53981f328946aae078f046 <> Date: Tue Oct 1 2013 11:20:32
UTC
* Git HEAD hash:
fdda8729a0a71626aa898053ff3d2a59b309e95b <> Date: Mon Oct 14 2013 09:26:33
UTC
* http://jquerymobile.com
*
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
...
...
@@ -705,7 +705,7 @@ $.ui.plugin = {
// Run buttonmarkup
if
(
$
.
fn
.
buttonMarkup
)
{
$
(
$
.
fn
.
buttonMarkup
.
initSelector
).
buttonMarkup
();
$
(
$
.
fn
.
buttonMarkup
.
initSelector
).
not
(
$
.
mobile
.
page
.
prototype
.
keepNativeSelector
()
).
buttonMarkup
();
}
// Add classes for fieldContain
...
...
@@ -3612,7 +3612,7 @@ if ( eventCaptureSupported ) {
//
// Because the target of the touch event that triggered the vclick
// can be different from the target of the click event synthesized
// by the browser. The target of a mouse/click event that is synt
eh
sized
// by the browser. The target of a mouse/click event that is synt
he
sized
// from a touch event seems to be implementation specific. For example,
// some browsers will fire mouse/click events for a link that is near
// a touch event, even though the target of the touchstart/touchend event
...
...
@@ -4233,7 +4233,10 @@ $.widget( "mobile.page", {
page
.
is
(
"
:jqmData(external-page='true')
"
)
)
{
// TODO use _on - that is, sort out why it doesn't work in this case
page
.
bind
(
"
pagehide.remove
"
,
callback
||
function
(
/* e */
)
{
page
.
bind
(
"
pagehide.remove
"
,
callback
||
function
(
e
,
data
)
{
//check if this is a same page transition and if so don't remove the page
if
(
!
data
.
samePage
){
var
$this
=
$
(
this
),
prEvent
=
new
$
.
Event
(
"
pageremove
"
);
...
...
@@ -4242,6 +4245,7 @@ $.widget( "mobile.page", {
if
(
!
prEvent
.
isDefaultPrevented
()
)
{
$this
.
removeWithDependents
();
}
}
});
}
},
...
...
@@ -4452,12 +4456,34 @@ $.widget( "mobile.page", {
return
$
.
mobile
.
path
.
documentBase
;
},
_
back
:
function
()
{
$
.
mobile
.
back
(
);
back
:
function
()
{
this
.
go
(
-
1
);
},
_forward
:
function
()
{
window
.
history
.
forward
();
forward
:
function
()
{
this
.
go
(
1
);
},
go
:
function
(
steps
)
{
//if hashlistening is enabled use native history method
if
(
$
.
mobile
.
hashListeningEnabled
)
{
window
.
history
.
go
(
steps
);
}
else
{
//we are not listening to the hash so handle history internally
var
activeIndex
=
$
.
mobile
.
navigate
.
history
.
activeIndex
,
index
=
activeIndex
+
parseInt
(
steps
,
10
),
url
=
$
.
mobile
.
navigate
.
history
.
stack
[
index
].
url
,
direction
=
(
steps
>=
1
)?
"
forward
"
:
"
back
"
;
//update the history object
$
.
mobile
.
navigate
.
history
.
activeIndex
=
index
;
$
.
mobile
.
navigate
.
history
.
previousIndex
=
activeIndex
;
//change to the new page
this
.
change
(
url
,
{
direction
:
direction
,
changeHash
:
false
,
fromHashChange
:
true
}
);
}
},
// TODO rename _handleDestination
...
...
@@ -4507,9 +4533,9 @@ $.widget( "mobile.page", {
// determine if we're heading forward or backward and continue
// accordingly past the current dialog
if
(
data
.
direction
===
"
back
"
)
{
this
.
_
back
();
this
.
back
();
}
else
{
this
.
_
forward
();
this
.
forward
();
}
// prevent changePage call
...
...
@@ -4646,14 +4672,20 @@ $.widget( "mobile.page", {
_showLoading
:
function
(
delay
,
theme
,
msg
,
textonly
)
{
// This configurable timeout allows cached pages a brief
// delay to load without showing a message
if
(
this
.
_loadMsg
)
{
return
;
}
this
.
_loadMsg
=
setTimeout
(
$
.
proxy
(
function
()
{
this
.
_getLoader
().
loader
(
"
show
"
,
theme
,
msg
,
textonly
);
this
.
_loadMsg
=
0
;
},
this
),
delay
);
},
_hideLoading
:
function
()
{
// Stop message show timer
clearTimeout
(
this
.
_loadMsg
);
this
.
_loadMsg
=
0
;
// Hide loading message
this
.
_getLoader
().
loader
(
"
hide
"
);
...
...
@@ -4771,6 +4803,23 @@ $.widget( "mobile.page", {
this
.
_setLoadedTitle
(
content
,
html
);
// Add the content reference and xhr to our triggerData.
triggerData
.
xhr
=
xhr
;
triggerData
.
textStatus
=
textStatus
;
// DEPRECATED
triggerData
.
page
=
content
;
triggerData
.
content
=
content
;
// If the default behavior is prevented, stop here!
// Note that it is the responsibility of the listener/handler
// that called preventDefault(), to resolve/reject the
// deferred object within the triggerData.
if
(
!
this
.
_trigger
(
"
load
"
,
undefined
,
triggerData
)
)
{
return
;
}
// rewrite src and href attrs to use a base url if the base tag won't work
if
(
this
.
_isRewritableBaseTag
()
&&
content
)
{
this
.
_getBase
().
rewrite
(
fileUrl
,
content
);
...
...
@@ -4790,17 +4839,10 @@ $.widget( "mobile.page", {
this
.
_hideLoading
();
}
// Add the content reference and xhr to our triggerData.
triggerData
.
xhr
=
xhr
;
triggerData
.
textStatus
=
textStatus
;
// DEPRECATED
triggerData
.
page
=
content
;
triggerData
.
content
=
content
;
// BEGIN DEPRECATED ---------------------------------------------------
// Let listeners know the content loaded successfully.
this
.
_triggerWithDeprecated
(
"
load
"
,
triggerData
);
this
.
element
.
trigger
(
"
pageload
"
);
// END DEPRECATED -----------------------------------------------------
deferred
.
resolve
(
absUrl
,
settings
,
content
);
},
this
);
...
...
@@ -4986,13 +5028,21 @@ $.widget( "mobile.page", {
// TODO move into transition handlers?
_triggerCssTransitionEvents
:
function
(
to
,
from
,
prefix
)
{
var
samePage
=
false
;
prefix
=
prefix
||
""
;
// TODO decide if these events should in fact be triggered on the container
if
(
from
)
{
//Check if this is a same page transition and tell the handler in page
if
(
to
[
0
]
===
from
[
0
]
){
samePage
=
true
;
}
//trigger before show/hide events
// TODO deprecate nextPage in favor of next
this
.
_triggerWithDeprecated
(
prefix
+
"
hide
"
,
{
nextPage
:
to
},
from
);
this
.
_triggerWithDeprecated
(
prefix
+
"
hide
"
,
{
nextPage
:
to
,
samePage
:
samePage
},
from
);
}
// TODO deprecate prevPage in favor of previous
...
...
@@ -5476,7 +5526,7 @@ $.widget( "mobile.page", {
nav
.
app
.
backHistory
)
{
nav
.
app
.
backHistory
();
}
else
{
window
.
history
.
back
(
);
$
.
mobile
.
pageContainer
.
pagecontainer
(
"
back
"
);
}
};
...
...
@@ -5709,11 +5759,21 @@ $.widget( "mobile.page", {
var
link
=
findClosestLink
(
event
.
target
),
$link
=
$
(
link
),
httpCleanup
,
//remove active link class if external (then it won't be there if you come back)
httpCleanup
=
function
()
{
window
.
setTimeout
(
function
()
{
$
.
mobile
.
removeActiveLinkClass
(
true
);
},
200
);
},
baseUrl
,
href
,
useDefaultUrlHandling
,
isExternal
,
transition
,
reverse
,
role
;
// If a button was clicked, clean up the active class added by vclick above
if
(
$
.
mobile
.
activeClickedLink
&&
$
.
mobile
.
activeClickedLink
[
0
]
===
event
.
target
.
parentNode
)
{
httpCleanup
();
}
// If there is no link associated with the click or its not a left
// click we want to ignore the click
// TODO teach $.mobile.hijackable to operate on raw dom elements so the link wrapping
...
...
@@ -5722,11 +5782,6 @@ $.widget( "mobile.page", {
return
;
}
//remove active link class if external (then it won't be there if you come back)
httpCleanup
=
function
()
{
window
.
setTimeout
(
function
()
{
$
.
mobile
.
removeActiveLinkClass
(
true
);
},
200
);
};
//if there's a data-rel=back attr, go back in history
if
(
$link
.
is
(
"
:jqmData(rel='back')
"
)
)
{
$
.
mobile
.
back
();
...
...
@@ -6469,7 +6524,7 @@ $.widget( "mobile.dialog", {
// Close method goes back in history
close
:
function
()
{
var
idx
,
dst
,
hist
=
$
.
mobile
.
navigate
.
history
;
var
hist
=
$
.
mobile
.
navigate
.
history
;
if
(
this
.
_isCloseable
)
{
this
.
_isCloseable
=
false
;
...
...
@@ -6479,15 +6534,7 @@ $.widget( "mobile.dialog", {
if
(
$
.
mobile
.
hashListeningEnabled
&&
hist
.
activeIndex
>
0
)
{
$
.
mobile
.
back
();
}
else
{
idx
=
Math
.
max
(
0
,
hist
.
activeIndex
-
1
);
dst
=
hist
.
stack
[
idx
].
pageUrl
||
hist
.
stack
[
idx
].
url
;
hist
.
previousIndex
=
hist
.
activeIndex
;
hist
.
activeIndex
=
idx
;
if
(
!
$
.
mobile
.
path
.
isPath
(
dst
)
)
{
dst
=
$
.
mobile
.
path
.
makeUrlAbsolute
(
"
#
"
+
dst
);
}
$
.
mobile
.
changePage
(
dst
,
{
direction
:
"
back
"
,
changeHash
:
false
,
fromHashChange
:
true
}
);
$
.
mobile
.
pageContainer
.
pagecontainer
(
"
back
"
);
}
}
}
...
...
@@ -7796,10 +7843,8 @@ $.widget( "mobile.checkboxradio", $.extend( {
.
filter
(
"
[for='
"
+
$
.
mobile
.
path
.
hashToSelector
(
input
[
0
].
id
)
+
"
']
"
)
.
first
(),
inputtype
=
input
[
0
].
type
,
checkedState
=
inputtype
+
"
-on
"
,
uncheckedState
=
inputtype
+
"
-off
"
,
checkedClass
=
"
ui-
"
+
checkedState
,
uncheckedClass
=
"
ui-
"
+
uncheckedState
;
checkedClass
=
"
ui-
"
+
inputtype
+
"
-on
"
,
uncheckedClass
=
"
ui-
"
+
inputtype
+
"
-off
"
;
if
(
inputtype
!==
"
checkbox
"
&&
inputtype
!==
"
radio
"
)
{
return
;
...
...
@@ -7821,9 +7866,7 @@ $.widget( "mobile.checkboxradio", $.extend( {
parentLabel
:
parentLabel
,
inputtype
:
inputtype
,
checkedClass
:
checkedClass
,
uncheckedClass
:
uncheckedClass
,
checkedicon
:
checkedState
,
uncheckedicon
:
uncheckedState
uncheckedClass
:
uncheckedClass
});
if
(
!
this
.
options
.
enhanced
)
{
...
...
@@ -7964,21 +8007,62 @@ $.widget( "mobile.checkboxradio", $.extend( {
this
.
refresh
();
},
// Is the widget supposed to display an icon?
_hasIcon
:
function
()
{
var
controlgroup
,
controlgroupWidget
,
controlgroupConstructor
=
$
.
mobile
.
controlgroup
;
// If the controlgroup widget is defined ...
if
(
controlgroupConstructor
)
{
controlgroup
=
this
.
element
.
closest
(
"
:mobile-controlgroup,
"
+
controlgroupConstructor
.
prototype
.
initSelector
);
// ... and the checkbox is in a controlgroup ...
if
(
controlgroup
.
length
>
0
)
{
// ... look for a controlgroup widget instance, and ...
controlgroupWidget
=
$
.
data
(
controlgroup
[
0
],
"
mobile-controlgroup
"
);
// ... if found, decide based on the option value, ...
return
(
(
controlgroupWidget
?
controlgroupWidget
.
options
.
type
:
// ... otherwise decide based on the "type" data attribute.
controlgroup
.
attr
(
"
data-
"
+
$
.
mobile
.
ns
+
"
type
"
)
)
!==
"
horizontal
"
);
}
}
// Normally, the widget displays an icon.
return
true
;
},
refresh
:
function
()
{
var
input
=
this
.
element
[
0
],
active
=
"
"
+
$
.
mobile
.
activeBtnClass
,
hasIcon
=
(
this
.
element
.
parents
(
"
.ui-controlgroup-horizontal
"
).
length
===
0
),
checkedClass
=
this
.
checkedClass
+
(
hasIcon
?
""
:
active
),
label
=
this
.
label
;
var
hasIcon
=
this
.
_hasIcon
(),
isChecked
=
this
.
element
[
0
].
checked
,
active
=
$
.
mobile
.
activeBtnClass
,
iconposClass
=
"
ui-btn-icon-
"
+
this
.
options
.
iconpos
,
addClasses
=
[],
removeClasses
=
[];
if
(
hasIcon
)
{
removeClasses
.
push
(
active
);
addClasses
.
push
(
iconposClass
);
}
else
{
removeClasses
.
push
(
iconposClass
);
(
isChecked
?
addClasses
:
removeClasses
).
push
(
active
);
}
label
.
toggleClass
(
"
ui-icon-
"
+
this
.
checkedicon
,
input
.
checked
)
.
toggleClass
(
"
ui-icon-
"
+
this
.
uncheckedicon
,
!
input
.
checked
);
if
(
input
.
checked
)
{
label
.
removeClass
(
this
.
uncheckedClass
+
active
).
addClass
(
checkedClass
);
if
(
isChecked
)
{
addClasses
.
push
(
this
.
checkedClass
);
removeClasses
.
push
(
this
.
uncheckedClass
);
}
else
{
label
.
removeClass
(
checkedClass
).
addClass
(
this
.
uncheckedClass
);
addClasses
.
push
(
this
.
uncheckedClass
);
removeClasses
.
push
(
this
.
checkedClass
);
}
this
.
label
.
addClass
(
addClasses
.
join
(
"
"
)
)
.
removeClass
(
removeClasses
.
join
(
"
"
)
);
},
widget
:
function
()
{
...
...
@@ -7987,14 +8071,16 @@ $.widget( "mobile.checkboxradio", $.extend( {
_setOptions
:
function
(
options
)
{
var
label
=
this
.
label
,
currentOptions
=
this
.
options
;
currentOptions
=
this
.
options
,
outer
=
this
.
widget
(),
hasIcon
=
this
.
_hasIcon
();
if
(
options
.
disabled
!==
undefined
)
{
this
.
input
.
prop
(
"
disabled
"
,
!!
options
.
disabled
);
this
.
widget
()
.
toggleClass
(
"
ui-state-disabled
"
,
!!
options
.
disabled
);
outer
.
toggleClass
(
"
ui-state-disabled
"
,
!!
options
.
disabled
);
}
if
(
options
.
mini
!==
undefined
)
{
label
.
parent
()
.
toggleClass
(
"
ui-mini
"
,
!!
options
.
mini
);
outer
.
toggleClass
(
"
ui-mini
"
,
!!
options
.
mini
);
}
if
(
options
.
theme
!==
undefined
)
{
label
...
...
@@ -8002,14 +8088,13 @@ $.widget( "mobile.checkboxradio", $.extend( {
.
addClass
(
"
ui-btn-
"
+
options
.
theme
);
}
if
(
options
.
wrapperClass
!==
undefined
)
{
this
.
widget
()
outer
.
removeClass
(
currentOptions
.
wrapperClass
)
.
addClass
(
options
.
wrapperClass
);
}
if
(
options
.
iconpos
!==
undefined
&&
(
this
.
element
.
parents
(
"
[data-
"
+
$
.
mobile
.
ns
+
"
type='horizontal']
"
).
length
===
0
)
)
{
if
(
options
.
iconpos
!==
undefined
&&
hasIcon
)
{
label
.
removeClass
(
"
ui-btn-icon-
"
+
currentOptions
.
iconpos
).
addClass
(
"
ui-btn-icon-
"
+
options
.
iconpos
);
}
else
if
(
this
.
element
.
parents
(
"
[data-
"
+
$
.
mobile
.
ns
+
"
type='horizontal']
"
).
length
!==
0
)
{
}
else
if
(
!
hasIcon
)
{
label
.
removeClass
(
"
ui-btn-icon-
"
+
currentOptions
.
iconpos
);
}
this
.
_super
(
options
);
...
...
@@ -9062,6 +9147,7 @@ $.widget( "mobile.flipswitch", $.extend({
theme
:
null
,
enhanced
:
false
,
wrapperClass
:
null
,
corners
:
true
,
mini
:
false
},
...
...
@@ -9077,6 +9163,8 @@ $.widget( "mobile.flipswitch", $.extend({
});
}
this
.
_handleFormReset
();
if
(
this
.
element
.
is
(
"
:disabled
"
)
)
{
this
.
_setOptions
({
"
disabled
"
:
true
...
...
@@ -9092,6 +9180,10 @@ $.widget( "mobile.flipswitch", $.extend({
this
.
_on
(
this
.
on
,
{
"
keydown
"
:
"
_keydown
"
});
this
.
_on
(
{
"
change
"
:
"
refresh
"
});
},
widget
:
function
()
{
...
...
@@ -9103,9 +9195,9 @@ $.widget( "mobile.flipswitch", $.extend({
if
(
this
.
type
===
"
SELECT
"
)
{
this
.
element
.
get
(
0
).
selectedIndex
=
0
;
}
else
{
this
.
element
.
prop
(
"
checked
"
,
tru
e
);
this
.
element
.
prop
(
"
checked
"
,
fals
e
);
}
this
.
_
trigger
(
"
change
"
);
this
.
element
.
trigger
(
"
change
"
);
},
_right
:
function
()
{
...
...
@@ -9113,27 +9205,49 @@ $.widget( "mobile.flipswitch", $.extend({
if
(
this
.
type
===
"
SELECT
"
)
{
this
.
element
.
get
(
0
).
selectedIndex
=
1
;
}
else
{
this
.
element
.
prop
(
"
checked
"
,
fals
e
);
this
.
element
.
prop
(
"
checked
"
,
tru
e
);
}
this
.
_
trigger
(
"
change
"
);
this
.
element
.
trigger
(
"
change
"
);
},
_enhance
:
function
()
{
var
flipswitch
=
$
(
"
<div>
"
),
theme
=
this
.
options
.
theme
?
this
.
options
.
theme
:
"
inherit
"
,
on
=
$
(
"
<span tabindex='1'></span>
"
),
options
=
this
.
options
,
element
=
this
.
element
,
theme
=
options
.
theme
?
options
.
theme
:
"
inherit
"
,
on
=
$
(
"
<span></span>
"
,
{
tabindex
:
1
}
),
off
=
$
(
"
<span></span>
"
),
type
=
this
.
element
.
get
(
0
).
tagName
,
onText
=
(
type
===
"
INPUT
"
)
?
this
.
options
.
onText
:
this
.
element
.
find
(
"
option
"
).
eq
(
1
).
text
(),
offText
=
(
type
===
"
INPUT
"
)
?
this
.
options
.
offText
:
this
.
element
.
find
(
"
option
"
).
eq
(
0
).
text
();
on
.
addClass
(
"
ui-flipswitch-on ui-btn ui-shadow ui-btn-inherit
"
).
text
(
onText
);
off
.
addClass
(
"
ui-flipswitch-off
"
).
text
(
offText
);
flipswitch
.
addClass
(
"
ui-flipswitch ui-shadow-inset ui-corner-all ui-bar-
"
+
theme
+
"
"
+
(
this
.
options
.
wrapperClass
?
this
.
options
.
wrapperClass
:
""
)
+
"
"
+
(
(
this
.
element
.
is
(
"
:checked
"
)
||
this
.
element
.
find
(
"
option
"
).
eq
(
1
).
is
(
"
:selected
"
)
)
?
"
ui-flipswitch-active
"
:
""
)
+
(
this
.
element
.
is
(
"
:disabled
"
)
?
"
ui-state-disabled
"
:
""
)
+
(
this
.
options
.
mini
?
"
ui-mini
"
:
""
)
).
append
(
on
,
off
);
this
.
element
.
addClass
(
"
ui-flipswitch-input
"
);
this
.
element
.
after
(
flipswitch
).
appendTo
(
flipswitch
);
type
=
element
.
get
(
0
).
tagName
,
onText
=
(
type
===
"
INPUT
"
)
?
options
.
onText
:
element
.
find
(
"
option
"
).
eq
(
1
).
text
(),
offText
=
(
type
===
"
INPUT
"
)
?
options
.
offText
:
element
.
find
(
"
option
"
).
eq
(
0
).
text
();
on
.
addClass
(
"
ui-flipswitch-on ui-btn ui-shadow ui-btn-inherit
"
)
.
text
(
onText
);
off
.
addClass
(
"
ui-flipswitch-off
"
)
.
text
(
offText
);
flipswitch
.
addClass
(
"
ui-flipswitch ui-shadow-inset
"
+
"
ui-bar-
"
+
theme
+
"
"
+
(
options
.
wrapperClass
?
options
.
wrapperClass
:
""
)
+
"
"
+
(
(
element
.
is
(
"
:checked
"
)
||
element
.
find
(
"
option
"
)
.
eq
(
1
)
.
is
(
"
:selected
"
)
)
?
"
ui-flipswitch-active
"
:
""
)
+
(
element
.
is
(
"
:disabled
"
)
?
"
ui-state-disabled
"
:
""
)
+
(
options
.
corners
?
"
ui-corner-all
"
:
""
)
+
(
options
.
mini
?
"
ui-mini
"
:
""
)
)
.
append
(
on
,
off
);
element
.
addClass
(
"
ui-flipswitch-input
"
)
.
after
(
flipswitch
)
.
appendTo
(
flipswitch
);
$
.
extend
(
this
,
{
flipswitch
:
flipswitch
,
...
...
@@ -9143,21 +9257,29 @@ $.widget( "mobile.flipswitch", $.extend({
});
},
_change
:
function
()
{
var
direction
;
_reset
:
function
()
{
this
.
refresh
();
},
refresh
:
function
()
{
var
direction
,
existingDirection
=
this
.
flipswitch
.
hasClass
(
"
ui-flipswitch-active
"
)
?
"
_right
"
:
"
_left
"
;
if
(
this
.
type
===
"
SELECT
"
)
{
direction
=
(
this
.
element
.
get
(
0
).
selectedIndex
>
0
)?
"
_right
"
:
"
_left
"
;
direction
=
(
this
.
element
.
get
(
0
).
selectedIndex
>
0
)
?
"
_right
"
:
"
_left
"
;
}
else
{
direction
=
this
.
element
.
is
(
"
:checked
"
)
?
"
_right
"
:
"
_left
"
;
direction
=
this
.
element
.
prop
(
"
checked
"
)
?
"
_right
"
:
"
_left
"
;
}
if
(
direction
!==
existingDirection
)
{
this
[
direction
]();
}
},
_toggle
:
function
()
{
var
direction
=
this
.
flipswitch
.
hasClass
(
"
ui-flipswitch-active
"
)
?
"
_left
"
:
"
_right
"
;
this
[
direction
]();
this
[
direction
]();
},
_keydown
:
function
(
e
)
{
...
...
@@ -9192,6 +9314,9 @@ $.widget( "mobile.flipswitch", $.extend({
if
(
options
.
mini
!==
undefined
)
{
this
.
widget
().
toggleClass
(
"
ui-mini
"
,
options
.
mini
);
}
if
(
options
.
corners
!==
undefined
)
{
this
.
widget
().
toggleClass
(
"
ui-corner-all
"
,
options
.
corners
);
}
this
.
_super
(
options
);
},
...
...
@@ -9475,7 +9600,7 @@ $.widget( "mobile.flipswitch", $.extend({
clearButton
:
function
()
{
return
$
(
"
<a href='#' class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all
"
+
return
$
(
"
<a href='#'
tabindex='-1'
class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all
"
+
"
' title='
"
+
this
.
options
.
clearBtnText
+
"
'>
"
+
this
.
options
.
clearBtnText
+
"
</a>
"
);
},
...
...
@@ -10023,22 +10148,13 @@ $.mobile.links = function( target ) {
.
filter
(
"
:jqmData(rel='popup')[href][href!='']
"
)
.
each
(
function
()
{
// Accessibility info for popups
var
e
=
this
,
href
=
$
(
this
).
attr
(
"
href
"
),
sel
=
$
.
mobile
.
path
.
hashToSelector
(
href
),
idref
=
href
.
substring
(
1
);
var
element
=
this
,
idref
=
element
.
getAttribute
(
"
href
"
).
substring
(
1
);
if
(
idref
)
{
e
.
setAttribute
(
"
aria-haspopup
"
,
true
);
e
.
setAttribute
(
"
aria-owns
"
,
idref
);
e
.
setAttribute
(
"
aria-expanded
"
,
false
);
$
(
document
)
.
on
(
"
popupafteropen
"
,
sel
,
function
()
{
e
.
setAttribute
(
"
aria-expanded
"
,
true
);
})
.
on
(
"
popupafterclose
"
,
sel
,
function
()
{
e
.
setAttribute
(
"
aria-expanded
"
,
false
);
});
element
.
setAttribute
(
"
aria-haspopup
"
,
true
);
element
.
setAttribute
(
"
aria-owns
"
,
idref
);
element
.
setAttribute
(
"
aria-expanded
"
,
false
);
}
})
.
end
()
...
...
@@ -10647,11 +10763,16 @@ $.widget( "mobile.popup", {
},
_openPrerequisitesComplete
:
function
()
{
var
id
=
this
.
element
.
attr
(
"
id
"
);
this
.
_ui
.
container
.
addClass
(
"
ui-popup-active
"
);
this
.
_isOpen
=
true
;
this
.
_resizeScreen
();
this
.
_ui
.
container
.
attr
(
"
tabindex
"
,
"
0
"
).
focus
();
this
.
_ignoreResizeEvents
();
if
(
id
)
{
this
.
document
.
find
(
"
[aria-haspopup='true'][aria-owns='
"
+
id
+
"
']
"
).
attr
(
"
aria-expanded
"
,
true
);
}
this
.
_trigger
(
"
afteropen
"
);
},
...
...
@@ -10729,7 +10850,8 @@ $.widget( "mobile.popup", {
},
_closePrerequisitesDone
:
function
()
{
var
container
=
this
.
_ui
.
container
;
var
container
=
this
.
_ui
.
container
,
id
=
this
.
element
.
attr
(
"
id
"
);
container
.
removeAttr
(
"
tabindex
"
);
...
...
@@ -10739,6 +10861,10 @@ $.widget( "mobile.popup", {
// Blur elements inside the container, including the container
$
(
"
:focus
"
,
container
[
0
]
).
add
(
container
[
0
]
).
blur
();
if
(
id
)
{
this
.
document
.
find
(
"
[aria-haspopup='true'][aria-owns='
"
+
id
+
"
']
"
).
attr
(
"
aria-expanded
"
,
false
);
}
// alert users that the popup is closed
this
.
_trigger
(
"
afterclose
"
);
},
...
...
@@ -11199,8 +11325,8 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
// toggle checkbox class for multiple selects
if
(
self
.
isMultiple
)
{
$
(
this
).
find
(
"
a
"
)
.
toggleClass
(
"
ui-
icon-
checkbox-on
"
,
option
.
selected
)
.
toggleClass
(
"
ui-
icon-
checkbox-off
"
,
!
option
.
selected
);
.
toggleClass
(
"
ui-checkbox-on
"
,
option
.
selected
)
.
toggleClass
(
"
ui-checkbox-off
"
,
!
option
.
selected
);
}
// trigger change if value changed
...
...
@@ -11280,7 +11406,7 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
// Multiple selects: add the "on" checkbox state to the icon
if
(
self
.
isMultiple
)
{
item
.
find
(
"
a
"
).
removeClass
(
"
ui-
icon-checkbox-off
"
).
addClass
(
"
ui-icon
-checkbox-on
"
);
item
.
find
(
"
a
"
).
removeClass
(
"
ui-
checkbox-off
"
).
addClass
(
"
ui
-checkbox-on
"
);
}
else
{
if
(
item
.
hasClass
(
"
ui-screen-hidden
"
)
)
{
item
.
next
().
find
(
"
a
"
).
addClass
(
$
.
mobile
.
activeBtnClass
);
...
...
@@ -11370,7 +11496,7 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
o
=
this
.
options
,
placeholder
=
this
.
placeholder
,
needPlaceholder
=
true
,
dataIcon
=
this
.
isMultiple
?
"
checkbox-off
"
:
"
false
"
,
dataIcon
=
"
false
"
,
$options
,
numOptions
,
select
,
dataPrefix
=
"
data-
"
+
$
.
mobile
.
ns
,
dataIndexAttr
=
dataPrefix
+
"
option-index
"
,
...
...
@@ -11441,7 +11567,7 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
item
=
document
.
createElement
(
"
li
"
);
if
(
option
.
disabled
)
{
classes
.
push
(
"
ui-disabled
"
);
classes
.
push
(
"
ui-
state-
disabled
"
);
item
.
setAttribute
(
"
aria-disabled
"
,
true
);
}
item
.
setAttribute
(
dataIndexAttr
,
i
);
...
...
@@ -11452,6 +11578,10 @@ $.widget( "mobile.selectmenu", $.mobile.selectmenu, {
item
.
className
=
classes
.
join
(
"
"
);
item
.
setAttribute
(
"
role
"
,
"
option
"
);
anchor
.
setAttribute
(
"
tabindex
"
,
"
-1
"
);
if
(
this
.
isMultiple
)
{
$
(
anchor
).
addClass
(
"
ui-btn ui-checkbox-off ui-btn-icon-right
"
);
}
item
.
appendChild
(
anchor
);
fragment
.
appendChild
(
item
);
}
...
...
@@ -11800,7 +11930,7 @@ $.widget( "mobile.controlgroup", $.extend( {
// Enhance child widgets
$
.
each
(
this
.
_childWidgets
,
$
.
proxy
(
function
(
number
,
widgetName
)
{
if
(
$
.
mobile
[
widgetName
]
)
{
this
.
element
.
find
(
$
.
mobile
[
widgetName
].
initSelector
)[
widgetName
]();
this
.
element
.
find
(
$
.
mobile
[
widgetName
].
initSelector
)
.
not
(
$
.
mobile
.
page
.
prototype
.
keepNativeSelector
()
)
[
widgetName
]();
}
},
this
));
...
...
@@ -11858,7 +11988,7 @@ $.widget( "mobile.controlgroup", $.extend( {
},
_setOptions
:
function
(
options
)
{
var
callRefresh
,
var
callRefresh
,
returnValue
,
elem
=
this
.
element
;
// Must have one of horizontal or vertical
...
...
@@ -11892,11 +12022,13 @@ $.widget( "mobile.controlgroup", $.extend( {
callRefresh
=
true
;
}
returnValue
=
this
.
_super
(
options
);
if
(
callRefresh
)
{
this
.
refresh
();
}
return
this
.
_super
(
options
)
;
return
returnValue
;
},
container
:
function
()
{
...
...
@@ -11957,7 +12089,7 @@ $.widget( "mobile.controlgroup", $.extend( {
},
_create
:
function
()
{
var
leftbtn
,
rightbtn
,
backBtn
,
var
leftbtn
,
rightbtn
,
role
=
this
.
element
.
is
(
"
:jqmData(role='header')
"
)
?
"
header
"
:
"
footer
"
,
page
=
this
.
element
.
closest
(
"
.ui-page
"
);
if
(
page
.
length
===
0
)
{
...
...
@@ -11971,7 +12103,7 @@ $.widget( "mobile.controlgroup", $.extend( {
page
:
page
,
leftbtn
:
leftbtn
,
rightbtn
:
rightbtn
,
backBtn
:
backBtn
backBtn
:
null
});
this
.
element
.
attr
(
"
role
"
,
role
===
"
header
"
?
"
banner
"
:
"
contentinfo
"
).
addClass
(
"
ui-
"
+
role
);
this
.
refresh
();
...
...
@@ -11989,7 +12121,7 @@ $.widget( "mobile.controlgroup", $.extend( {
this
.
element
.
find
(
"
.ui-toolbar-back-btn
"
).
remove
();
}
}
if
(
o
.
backBtnTheme
!=
=
undefined
)
{
if
(
o
.
backBtnTheme
!=
null
)
{
this
.
element
.
find
(
"
.ui-toolbar-back-btn
"
)
.
addClass
(
"
ui-btn ui-btn-
"
+
o
.
backBtnTheme
);
...
...
@@ -12011,7 +12143,7 @@ $.widget( "mobile.controlgroup", $.extend( {
this
.
_addHeaderButtonClasses
();
}
if
(
!
this
.
page
)
{
$
(
"
[data-
"
+
$
.
mobile
.
ns
+
"
role='page']
"
).
css
({
"
position
"
:
"
relative
"
}
);
this
.
_setRelative
(
);
if
(
this
.
role
===
"
footer
"
)
{
this
.
element
.
appendTo
(
"
body
"
);
}
...
...
@@ -12019,11 +12151,18 @@ $.widget( "mobile.controlgroup", $.extend( {
this
.
_addHeadingClasses
();
this
.
_btnMarkup
();
},
// Deprecated in 1.4. As from 1.5 data-role="button" has to be present in the markup.
//we only want this to run on non fixed toolbars so make it easy to override
_setRelative
:
function
()
{
$
(
"
[data-
"
+
$
.
mobile
.
ns
+
"
role='page']
"
).
css
({
"
position
"
:
"
relative
"
});
},
// Deprecated in 1.4. As from 1.5 button classes have to be present in the markup.
_btnMarkup
:
function
()
{
this
.
element
.
children
(
"
a
"
).
attr
(
"
data-
"
+
$
.
mobile
.
ns
+
"
role
"
,
"
button
"
);
this
.
element
.
trigger
(
"
create
"
);
},
// Deprecated in 1.4. As from 1.5 ui-btn-left/right classes have to be present in the markup.
_addHeaderButtonClasses
:
function
()
{
var
$headeranchors
=
this
.
element
.
children
(
"
a, button
"
);
this
.
leftbtn
=
$headeranchors
.
hasClass
(
"
ui-btn-left
"
);
...
...
@@ -12035,10 +12174,18 @@ $.widget( "mobile.controlgroup", $.extend( {
},
_addBackButton
:
function
()
{
this
.
backBtn
=
$
(
"
<a role='button' href='javascript:void(0);' class='ui-btn-left ui-toolbar-back-btn' data-
"
+
$
.
mobile
.
ns
+
"
rel='back' data-
"
+
$
.
mobile
.
ns
+
"
icon='carat-l'>
"
+
this
.
options
.
backBtnText
+
"
</a>
"
)
// If theme is provided, override default inheritance
.
attr
(
"
data-
"
+
$
.
mobile
.
ns
+
"
theme
"
,
this
.
options
.
backBtnTheme
||
this
.
options
.
theme
)
var
theme
,
options
=
this
.
options
;
if
(
!
this
.
backBtn
)
{
theme
=
options
.
backBtnTheme
||
options
.
theme
;
this
.
backBtn
=
$
(
"
<a role='button' href='javascript:void(0);'
"
+
"
class='ui-btn ui-corner-all ui-shadow ui-btn-left
"
+
(
theme
?
"
ui-btn-
"
+
theme
+
"
"
:
""
)
+
"
ui-toolbar-back-btn ui-icon-carat-l ui-btn-icon-left'
"
+
"
data-
"
+
$
.
mobile
.
ns
+
"
rel='back'>
"
+
options
.
backBtnText
+
"
</a>
"
)
.
prependTo
(
this
.
element
);
}
},
_addHeadingClasses
:
function
()
{
this
.
element
.
children
(
"
h1, h2, h3, h4, h5, h6
"
)
...
...
@@ -12319,6 +12466,12 @@ $.widget( "mobile.controlgroup", $.extend( {
});
},
_setRelative
:
function
()
{
if
(
this
.
options
.
position
!==
"
fixed
"
){
$
(
"
[data-
"
+
$
.
mobile
.
ns
+
"
role='page']
"
).
css
({
"
position
"
:
"
relative
"
});
}
},
_destroy
:
function
()
{
var
$el
=
this
.
element
,
header
=
$el
.
hasClass
(
"
ui-header
"
);
...
...
@@ -12334,10 +12487,6 @@ $.widget( "mobile.controlgroup", $.extend( {
(
function
(
$
,
undefined
)
{
$
.
widget
(
"
mobile.toolbar
"
,
$
.
mobile
.
toolbar
,
{
_create
:
function
()
{
this
.
_super
();
},
_makeFixed
:
function
()
{
this
.
_super
();
this
.
_workarounds
();
...
...
@@ -12774,7 +12923,7 @@ $.widget( "mobile.panel", {
var
wrapper
=
this
.
_page
().
find
(
"
.
"
+
this
.
options
.
classes
.
pageWrapper
);
if
(
wrapper
.
length
===
0
)
{
wrapper
=
this
.
_page
().
children
(
"
.ui-header:not(
:jqmData(position='fixed')), .ui-content:not(:jqmData(role='popup')), .ui-footer:not(:jqmData(position='fixed')
)
"
)
wrapper
=
this
.
_page
().
children
(
"
.ui-header:not(
.ui-header-fixed), .ui-content:not(.ui-popup), .ui-footer:not(.ui-footer-fixed
)
"
)
.
wrapAll
(
"
<div class='
"
+
this
.
options
.
classes
.
pageWrapper
+
"
'></div>
"
)
.
parent
();
}
...
...
@@ -12783,8 +12932,8 @@ $.widget( "mobile.panel", {
},
_getFixedToolbars
:
function
()
{
var
extFixedToolbars
=
$
(
"
body
"
).
children
(
"
.ui-header
:jqmData(position='fixed'), .ui-footer:jqmData(position='fixed')
"
),
intFixedToolbars
=
this
.
_page
().
find
(
"
.ui-header
:jqmData(position='fixed'), .ui-footer:jqmData(position='fixed')
"
),
var
extFixedToolbars
=
$
(
"
body
"
).
children
(
"
.ui-header
-fixed, .ui-footer-fixed
"
),
intFixedToolbars
=
this
.
_page
().
find
(
"
.ui-header
-fixed, .ui-footer-fixed
"
),
fixedToolbars
=
extFixedToolbars
.
add
(
intFixedToolbars
).
addClass
(
this
.
options
.
classes
.
pageFixedToolbar
);
return
fixedToolbars
;
...
...
@@ -13088,12 +13237,17 @@ $.widget( "mobile.panel", {
_transitionEndEvents
:
"
webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd
"
,
_destroy
:
function
()
{
var
o
=
this
.
options
,
var
otherPanels
,
o
=
this
.
options
,
multiplePanels
=
(
$
(
"
body > :mobile-panel
"
).
length
+
$
.
mobile
.
activePage
.
find
(
"
:mobile-panel
"
).
length
)
>
1
;
if
(
o
.
display
!==
"
overlay
"
)
{
// Destroy the wrapper even if there are still other panels, because we don't know if they use a wrapper
// remove the wrapper if not in use by another panel
otherPanels
=
$
(
"
body > :mobile-panel
"
).
add
(
$
.
mobile
.
activePage
.
find
(
"
:mobile-panel
"
)
);
if
(
otherPanels
.
not
(
"
.ui-panel-display-overlay
"
).
not
(
this
.
element
).
length
===
0
)
{
this
.
_wrapper
().
children
().
unwrap
();
}
if
(
this
.
_open
)
{
...
...
@@ -13256,7 +13410,9 @@ $.widget( "mobile.table", $.mobile.table, {
});
if
(
this
.
options
.
enhanced
)
{
this
.
_menu
=
this
.
document
.
find
(
this
.
_id
()
+
"
-popup
"
).
children
().
first
();
this
.
_menu
=
$
(
this
.
document
[
0
].
getElementById
(
this
.
_id
()
+
"
-popup
"
)
).
children
().
first
();
this
.
_addToggles
(
this
.
_menu
,
true
);
this
.
_bindToggles
(
this
.
_menu
);
}
else
{
this
.
_menu
=
this
.
_enhanceColToggle
();
this
.
element
.
addClass
(
this
.
options
.
classes
.
columnToggleTable
);
...
...
@@ -13290,11 +13446,16 @@ $.widget( "mobile.table", $.mobile.table, {
},
_addToggles
:
function
(
menu
,
keep
)
{
var
opts
=
this
.
options
;
var
inputs
,
checkboxIndex
=
0
,
opts
=
this
.
options
,
container
=
menu
.
controlgroup
(
"
container
"
);
// allow update of menu on refresh (fixes #5880)
if
(
!
keep
)
{
menu
.
empty
();
if
(
keep
)
{
inputs
=
menu
.
find
(
"
input
"
);
}
else
{
container
.
empty
();
}
// create the hide/show toggles
...
...
@@ -13306,23 +13467,23 @@ $.widget( "mobile.table", $.mobile.table, {
if
(
priority
)
{
cells
.
addClass
(
opts
.
classes
.
priorityPrefix
+
priority
);
if
(
!
keep
)
{
(
keep
?
inputs
.
eq
(
checkboxIndex
++
)
:
$
(
"
<label><input type='checkbox' checked />
"
+
(
header
.
children
(
"
abbr
"
).
first
().
attr
(
"
title
"
)
||
header
.
text
()
)
+
"
</label>
"
)
.
appendTo
(
menu
)
.
appendTo
(
container
)
.
children
(
0
)
.
jqmData
(
"
cells
"
,
cells
)
.
checkboxradio
(
{
theme
:
opts
.
columnPopupTheme
})
;
}
})
)
.
jqmData
(
"
cells
"
,
cells
);
}
});
// set bindings here
if
(
!
keep
)
{
menu
.
controlgroup
(
"
refresh
"
);
this
.
_bindToggles
(
menu
);
}
},
...
...
@@ -13357,12 +13518,13 @@ $.widget( "mobile.table", $.mobile.table, {
fragment
=
this
.
document
[
0
].
createDocumentFragment
();
id
=
this
.
_id
()
+
"
-popup
"
;
menuButton
=
$
(
"
<a role='button' href='#
"
+
id
+
"
'
"
+
"
class='
"
+
opts
.
classes
.
columnBtn
+
"
ui-btn ui-btn-
"
+
(
opts
.
columnBtnTheme
||
"
a
"
)
+
"
ui-corner-all ui-shadow ui-mini'
"
+
"
data-
"
+
ns
+
"
rel='popup'
"
+
"
data-
"
+
ns
+
"
mini='true'>
"
+
opts
.
columnBtnText
+
"
</a>
"
);
popup
=
$
(
"
<div data-
"
+
ns
+
"
role='popup' data-
"
+
ns
+
"
role='fieldcontain' class='
"
+
opts
.
classes
.
popup
+
"
' id='
"
+
id
+
"
'></div>
"
);
menu
=
$
(
"
<fieldset data-
"
+
ns
+
"
role='controlgroup'></fieldset>
"
);
menuButton
=
$
(
"
<a href='#
"
+
id
+
"
'
"
+
"
class='
"
+
opts
.
classes
.
columnBtn
+
"
ui-btn
"
+
"
ui-btn-
"
+
(
opts
.
columnBtnTheme
||
"
a
"
)
+
"
ui-corner-all ui-shadow ui-mini'
"
+
"
data-
"
+
ns
+
"
rel='popup'>
"
+
opts
.
columnBtnText
+
"
</a>
"
);
popup
=
$
(
"
<div class='
"
+
opts
.
classes
.
popup
+
"
' id='
"
+
id
+
"
'></div>
"
);
menu
=
$
(
"
<fieldset></fieldset>
"
).
controlgroup
();
// set extension here, send "false" to trigger build/rebuild
this
.
_addToggles
(
menu
,
false
);
...
...
@@ -13373,7 +13535,7 @@ $.widget( "mobile.table", $.mobile.table, {
fragment
.
appendChild
(
menuButton
[
0
]
);
table
.
before
(
fragment
);
popup
.
popup
()
.
enhanceWithin
()
;
popup
.
popup
();
return
menu
;
},
...
...
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