Created
December 30, 2013 18:25
-
-
Save marioaquino/8185773 to your computer and use it in GitHub Desktop.
jquery-mobile-custom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jQuery Mobile v1.3.2 | |
* http://jquerymobile.com | |
* | |
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* | |
*/ | |
.ui-btn { display: block; text-align: center; cursor:pointer; position: relative; margin: .5em 0; padding: 0; } | |
.ui-mini { margin-top: .25em; margin-bottom: .25em; } | |
.ui-btn-left, .ui-btn-right, .ui-input-clear, .ui-btn-inline, | |
.ui-grid-a .ui-btn, .ui-grid-b .ui-btn, .ui-grid-c .ui-btn, .ui-grid-d .ui-btn, .ui-grid-e .ui-btn, .ui-grid-solo .ui-btn { margin-right: 5px; margin-left: 5px; } | |
.ui-btn-inner { font-size: 16px; padding: .6em 20px; min-width: .75em; display: block; position: relative; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; zoom: 1; } | |
.ui-btn input, .ui-btn button { z-index: 2; } | |
.ui-btn-left, .ui-btn-right, .ui-btn-inline { display: inline-block; vertical-align: middle; } | |
.ui-mobile .ui-btn-left, .ui-mobile .ui-btn-right, .ui-btn-left > .ui-btn, .ui-btn-right > .ui-btn { margin: 0; } /* .ui-mobile to increase specificity level */ | |
.ui-btn-block { display: block; } | |
.ui-header > .ui-btn, | |
.ui-footer > .ui-btn { display: inline-block; margin: 0; } | |
.ui-header .ui-btn-block, | |
.ui-footer .ui-btn-block { display: block; } | |
.ui-header .ui-btn-inner, | |
.ui-footer .ui-btn-inner, | |
.ui-mini .ui-btn-inner { font-size: 12.5px; padding: .55em 11px .5em; } | |
.ui-fullsize .ui-btn-inner, | |
.ui-fullsize .ui-btn-inner { font-size: 16px; padding: .6em 20px; } | |
.ui-btn-icon-notext { width: 24px; height: 24px; } | |
.ui-btn-icon-notext .ui-btn-inner { padding: 0; height: 100%; } | |
.ui-btn-icon-notext .ui-btn-inner .ui-icon { margin: 2px 1px 2px 3px; float: left; } | |
.ui-btn-text { position: relative; z-index: 1; width: 100%; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } | |
div.ui-btn-text { width: auto; } | |
.ui-btn-icon-notext .ui-btn-text { position: absolute; left: -9999px; } | |
.ui-btn-icon-left .ui-btn-inner { padding-left: 40px; } | |
.ui-btn-icon-right .ui-btn-inner { padding-right: 40px; } | |
.ui-btn-icon-top .ui-btn-inner { padding-top: 40px; } | |
.ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 40px; } | |
.ui-header .ui-btn-icon-left .ui-btn-inner, | |
.ui-footer .ui-btn-icon-left .ui-btn-inner, | |
.ui-mini.ui-btn-icon-left .ui-btn-inner, | |
.ui-mini .ui-btn-icon-left .ui-btn-inner { padding-left: 30px; } | |
.ui-header .ui-btn-icon-right .ui-btn-inner, | |
.ui-footer .ui-btn-icon-right .ui-btn-inner, | |
.ui-mini.ui-btn-icon-right .ui-btn-inner, | |
.ui-mini .ui-btn-icon-right .ui-btn-inner { padding-right: 30px; } | |
.ui-header .ui-btn-icon-top .ui-btn-inner, | |
.ui-footer .ui-btn-icon-top .ui-btn-inner { padding: 30px 3px .5em 3px; } | |
.ui-mini.ui-btn-icon-top .ui-btn-inner, | |
.ui-mini .ui-btn-icon-top .ui-btn-inner { padding-top: 30px; } | |
.ui-header .ui-btn-icon-bottom .ui-btn-inner, | |
.ui-footer .ui-btn-icon-bottom .ui-btn-inner { padding: .55em 3px 30px 3px; } | |
.ui-mini.ui-btn-icon-bottom .ui-btn-inner, | |
.ui-mini .ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 30px; } | |
/* Corner styling inheritance */ | |
.ui-btn-inner { | |
-webkit-border-radius: inherit; | |
border-radius: inherit; | |
} | |
/*btn icon positioning*/ | |
.ui-btn-icon-notext .ui-icon { display: block; z-index: 0;} | |
.ui-btn-icon-left > .ui-btn-inner > .ui-icon, .ui-btn-icon-right > .ui-btn-inner > .ui-icon { position: absolute; top: 50%; margin-top: -9px; } | |
.ui-btn-icon-top .ui-btn-inner .ui-icon, .ui-btn-icon-bottom .ui-btn-inner .ui-icon { position: absolute; left: 50%; margin-left: -9px; } | |
.ui-btn-icon-left .ui-icon { left: 10px; } | |
.ui-btn-icon-right .ui-icon { right: 10px; } | |
.ui-btn-icon-top .ui-icon { top: 10px; } | |
.ui-btn-icon-bottom .ui-icon { top: auto; bottom: 10px; } | |
.ui-header .ui-btn-icon-left .ui-icon, | |
.ui-footer .ui-btn-icon-left .ui-icon, | |
.ui-mini.ui-btn-icon-left .ui-icon, | |
.ui-mini .ui-btn-icon-left .ui-icon { left: 5px; } | |
.ui-header .ui-btn-icon-right .ui-icon, | |
.ui-footer .ui-btn-icon-right .ui-icon, | |
.ui-mini.ui-btn-icon-right .ui-icon, | |
.ui-mini .ui-btn-icon-right .ui-icon { right: 5px; } | |
.ui-header .ui-btn-icon-top .ui-icon, | |
.ui-footer .ui-btn-icon-top .ui-icon, | |
.ui-mini.ui-btn-icon-top .ui-icon, | |
.ui-mini .ui-btn-icon-top .ui-icon { top: 5px; } | |
.ui-header .ui-btn-icon-bottom .ui-icon, | |
.ui-footer .ui-btn-icon-bottom .ui-icon, | |
.ui-mini.ui-btn-icon-bottom .ui-icon, | |
.ui-mini .ui-btn-icon-bottom .ui-icon { bottom: 5px; } | |
/*hiding native button,inputs */ | |
.ui-btn-hidden { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -webkit-appearance: none; cursor: pointer; background: #fff; background: rgba(255,255,255,0); filter: Alpha(Opacity=0); opacity: .1; font-size: 1px; border: none; text-indent: -9999px; } | |
/* Fixes IE/WP filter alpha opacity bugs */ | |
.ui-disabled .ui-btn-hidden { display: none; } | |
.ui-disabled { z-index: 1; } | |
.ui-field-contain .ui-btn.ui-submit { margin: 0; } | |
label.ui-submit { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; display: block; } | |
@media all and (min-width: 28em){ | |
.ui-field-contain label.ui-submit { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; } | |
.ui-field-contain .ui-btn.ui-submit { width: 78%; display: inline-block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } | |
.ui-hide-label .ui-btn.ui-submit { width: auto; display: block; } | |
} | |
/* some unsets - more probably needed */ | |
.ui-mobile, .ui-mobile body { height: 99.9%; } | |
.ui-mobile fieldset, .ui-page { padding: 0; margin: 0; } | |
.ui-mobile a img, .ui-mobile fieldset { border-width: 0; } | |
.ui-mobile fieldset { min-width: 0; } | |
/* responsive page widths */ | |
.ui-mobile-viewport { margin: 0; overflow-x: visible; -webkit-text-size-adjust: 100%; -ms-text-size-adjust:none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } | |
/* Issue #2066 */ | |
body.ui-mobile-viewport, | |
div.ui-mobile-viewport { overflow-x: hidden; } | |
/* "page" containers - full-screen views, one should always be in view post-pageload */ | |
.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; display: none; border: 0; } | |
.ui-mobile .ui-page-active { display: block; overflow: visible; } | |
/* on ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */ | |
.ui-page { outline: none; } | |
/*orientations from js are available */ | |
@media screen and (orientation: portrait){ | |
.ui-mobile .ui-page { min-height: 420px; } | |
} | |
@media screen and (orientation: landscape){ | |
.ui-mobile .ui-page { min-height: 300px; } | |
} | |
/* loading screen */ | |
.ui-loading .ui-loader { display: block; } | |
.ui-loader { display: none; z-index: 9999999; position: fixed; top: 50%; left: 50%; border:0; } | |
.ui-loader-default { background: none; filter: Alpha(Opacity=18); opacity: .18; width: 46px; height: 46px; margin-left: -23px; margin-top: -23px; } | |
.ui-loader-verbose { width: 200px; filter: Alpha(Opacity=88); opacity: .88; box-shadow: 0 1px 1px -1px #fff; height: auto; margin-left: -110px; margin-top: -43px; padding: 10px; } | |
.ui-loader-default h1 { font-size: 0; width: 0; height: 0; overflow: hidden; } | |
.ui-loader-verbose h1 { font-size: 16px; margin: 0; text-align: center; } | |
.ui-loader .ui-icon { background-color: #000; display: block; margin: 0; width: 44px; height: 44px; padding: 1px; -webkit-border-radius: 36px; border-radius: 36px; } | |
.ui-loader-verbose .ui-icon { margin: 0 auto 10px; filter: Alpha(Opacity=75); opacity: .75; } | |
.ui-loader-textonly { padding: 15px; margin-left: -115px; } | |
.ui-loader-textonly .ui-icon { display: none; } | |
.ui-loader-fakefix { position: absolute; } | |
/*fouc*/ | |
.ui-mobile-rendering > * { visibility: hidden; } | |
/*headers, content panels*/ | |
.ui-bar, .ui-body { position: relative; padding: .4em 15px; overflow: hidden; display: block; clear:both; } | |
.ui-bar { font-size: 16px; margin: 0; } | |
.ui-bar h1, .ui-bar h2, .ui-bar h3, .ui-bar h4, .ui-bar h5, .ui-bar h6 { margin: 0; padding: 0; font-size: 16px; display: inline-block; } | |
.ui-header, .ui-footer { position: relative; zoom: 1; } | |
.ui-mobile .ui-header, .ui-mobile .ui-footer { border-left-width: 0; border-right-width: 0; } | |
.ui-header .ui-btn-left, | |
.ui-header .ui-btn-right, | |
.ui-footer .ui-btn-left, | |
.ui-footer .ui-btn-right, | |
.ui-header-fixed.ui-fixed-hidden .ui-btn-left, | |
.ui-header-fixed.ui-fixed-hidden .ui-btn-right { position: absolute; top: 3px; } | |
.ui-header-fixed .ui-btn-left, | |
.ui-header-fixed .ui-btn-right { top: 4px;} | |
.ui-header .ui-btn-left, | |
.ui-footer .ui-btn-left { left: 5px; } | |
.ui-header .ui-btn-right, | |
.ui-footer .ui-btn-right { right: 5px; } | |
.ui-footer > .ui-btn-icon-notext, | |
.ui-header > .ui-btn-icon-notext, | |
.ui-header-fixed.ui-fixed-hidden > .ui-btn-icon-notext { top: 6px; } | |
.ui-header-fixed > .ui-btn-icon-notext { top: 7px;} | |
.ui-header .ui-title, .ui-footer .ui-title { min-height: 1.1em; text-align: center; font-size: 16px; display: block; margin: .6em 30% .8em; padding: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; } | |
.ui-footer .ui-title { margin: .6em 15px .8em; } | |
/* content area*/ | |
.ui-content { border-width: 0; overflow: visible; overflow-x: hidden; padding: 15px; } | |
/* corner styling for dialogs and popups */ | |
.ui-corner-all > .ui-header:first-child, | |
.ui-corner-all > .ui-content:first-child, | |
.ui-corner-all > .ui-footer:first-child { | |
-webkit-border-top-left-radius: inherit; | |
border-top-left-radius: inherit; | |
-webkit-border-top-right-radius: inherit; | |
border-top-right-radius: inherit; | |
} | |
.ui-corner-all > .ui-header:last-child, | |
.ui-corner-all > .ui-content:last-child, | |
.ui-corner-all > .ui-footer:last-child { | |
-webkit-border-bottom-left-radius: inherit; | |
border-bottom-left-radius: inherit; | |
-webkit-border-bottom-right-radius: inherit; | |
border-bottom-right-radius: inherit; | |
} | |
/* icons sizing */ | |
.ui-icon { width: 18px; height: 18px; } | |
/* non-js content hiding */ | |
.ui-nojs { position: absolute; left: -9999px; } | |
/* accessible content hiding */ | |
.ui-hide-label label.ui-input-text, .ui-hide-label label.ui-select, .ui-hide-label label.ui-slider, .ui-hide-label label.ui-submit, .ui-hide-label .ui-controlgroup-label, | |
.ui-hidden-accessible { position: absolute !important; left: -9999px; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } | |
label.ui-slider { | |
font-size: 16px; | |
line-height: 1.4; | |
font-weight: normal; | |
margin: 0; | |
display: block; | |
} | |
.ui-field-contain label.ui-slider { | |
margin-bottom: .4em; | |
} | |
div.ui-slider { | |
height: 30px; | |
margin: .5em 0; | |
zoom: 1; | |
} | |
div.ui-slider.ui-mini { | |
margin: .25em 0; | |
} | |
.ui-field-contain div.ui-slider, | |
.ui-field-contain div.ui-slider.ui-mini { | |
margin: 0; | |
} | |
div.ui-slider:before, div.ui-slider:after { | |
content: ""; | |
display: table; | |
} | |
div.ui-slider:after { | |
clear: both; | |
} | |
/* High level of specificity to override Textinput CSS. */ | |
input.ui-input-text.ui-slider-input { | |
display: block; | |
float: left; | |
margin: 0; | |
padding: 4px; | |
width: 40px; | |
height: 22px; | |
line-height: 22px; | |
font-size: 14px; | |
border-width: 0; | |
background-image: none; | |
font-weight: bold; | |
text-align: center; | |
vertical-align: text-bottom; | |
outline: 0; | |
-webkit-box-sizing: content-box; | |
-moz-box-sizing: content-box; | |
-ms-box-sizing: content-box; | |
box-sizing: content-box; | |
} | |
.ui-slider-input::-webkit-outer-spin-button, | |
.ui-slider-input::-webkit-inner-spin-button { | |
-webkit-appearance: none; | |
margin: 0; | |
} | |
.ui-slider-track, | |
.ui-slider-switch { | |
position: relative; | |
overflow: visible; | |
height: 15px; | |
margin: 0 15px 0 68px; | |
top: 6px; | |
} | |
.ui-slider-track.ui-mini { | |
height: 12px; | |
top: 8px; | |
} | |
.ui-slider-bg { | |
border: none; | |
height: 100%; | |
} | |
/* High level of specificity to override button margins in grids */ | |
.ui-slider-track .ui-btn.ui-slider-handle, | |
.ui-slider-switch .ui-btn.ui-slider-handle { | |
position: absolute; | |
z-index: 1; | |
top: 50%; | |
width: 28px; | |
height: 28px; | |
margin: -15px 0 0 -15px; | |
outline: 0; | |
} | |
.ui-slider-track.ui-mini .ui-slider-handle { | |
height: 14px; | |
width: 14px; | |
margin: -8px 0 0 -7px; | |
} | |
.ui-slider-handle .ui-btn-inner { | |
padding: 0; | |
height: 100%; | |
} | |
.ui-slider-track.ui-mini .ui-slider-handle .ui-btn-inner { | |
height: 30px; | |
width: 30px; | |
padding: 0; | |
margin: -9px 0 0 -9px; | |
border-top: none; | |
} | |
select.ui-slider-switch { | |
display: none; | |
} | |
div.ui-slider-switch { | |
display: inline-block; | |
height: 32px; | |
width: 5.8em; | |
margin: .5em 0; | |
top: 0; | |
} | |
/* reset the clearfix */ | |
div.ui-slider-switch:before, div.ui-slider-switch:after { | |
display: none; | |
clear: none; | |
} | |
div.ui-slider-switch.ui-mini { | |
width: 5em; | |
height: 29px; | |
margin: .25em 0; | |
top: 0; | |
} | |
.ui-field-contain .ui-slider-switch, | |
.ui-field-contain .ui-slider-switch.ui-mini { | |
margin: 0; | |
} | |
.ui-slider-inneroffset { | |
margin: 0 16px; | |
position: relative; | |
z-index: 1; | |
} | |
.ui-slider-switch.ui-mini .ui-slider-inneroffset { | |
margin: 0 15px 0 14px; | |
} | |
.ui-slider-switch .ui-btn.ui-slider-handle { | |
margin: 1px 0 0 -15px; | |
} | |
.ui-slider-switch.ui-mini .ui-slider-handle { | |
width: 25px; | |
height: 25px; | |
margin: 1px 0 0 -13px; | |
padding: 0; | |
} | |
.ui-slider-handle-snapping { | |
-webkit-transition: left 70ms linear; | |
-moz-transition: left 70ms linear; | |
} | |
.ui-slider-switch.ui-mini .ui-slider-handle .ui-btn-inner { | |
height: 30px; | |
width: 30px; | |
padding: 0; | |
margin: 0; | |
border-top: none; | |
} | |
.ui-slider-switch .ui-slider-label { | |
position: absolute; | |
text-align: center; | |
width: 100%; | |
overflow: hidden; | |
font-size: 16px; | |
top: 0; | |
line-height: 2; | |
min-height: 100%; | |
border-width: 0; | |
white-space: nowrap; | |
cursor: pointer; | |
} | |
.ui-slider-switch.ui-mini .ui-slider-label { | |
font-size: 14px; | |
} | |
.ui-slider-switch .ui-slider-label-a { | |
z-index: 1; | |
left: 0; | |
text-indent: -1.5em; | |
} | |
.ui-slider-switch .ui-slider-label-b { | |
z-index: 0; | |
right: 0; | |
text-indent: 1.5em; | |
} | |
@media all and (min-width: 28em){ | |
.ui-field-contain label.ui-slider { | |
vertical-align: top; | |
display: inline-block; | |
width: 20%; | |
margin: 0 2% 0 0; | |
} | |
.ui-field-contain div.ui-slider { | |
display: inline-block; | |
width: 78%; | |
} | |
.ui-field-contain.ui-hide-label div.ui-slider { | |
display: block; | |
width: auto; | |
} | |
.ui-field-contain div.ui-slider-switch, | |
.ui-field-contain.ui-hide-label div.ui-slider-switch { | |
display: inline-block; | |
width: 5.8em; | |
} | |
.ui-field-contain div.ui-slider-switch.ui-mini { | |
width: 5em; | |
} | |
} | |
label.ui-input-text { font-size: 16px; line-height: 1.4; display: block; font-weight: normal; margin: 0 0 .3em; } | |
input.ui-input-text, textarea.ui-input-text { background-image: none; padding: .4em; margin: .5em 0; min-height: 1.4em; line-height: 1.4em; font-size: 16px; display: block; width: 100%; outline: 0; } | |
input.ui-mini, .ui-mini input, textarea.ui-mini { font-size: 14px; } | |
div.ui-input-text input.ui-input-text, div.ui-input-text textarea.ui-input-text, | |
.ui-input-search input.ui-input-text { border: none; width: 100%; padding: .4em 0; margin: 0; display: block; background: transparent none; outline: 0 !important; } | |
.ui-input-search, div.ui-input-text { margin: .5em 0; background-image: none; position: relative; } | |
.ui-input-search { padding: 0 30px; } | |
div.ui-input-text { padding: 0 .4em; } | |
div.ui-input-has-clear { padding: 0 30px 0 .4em; } | |
input.ui-input-text.ui-mini, textarea.ui-input-text.ui-mini, | |
.ui-input-search.ui-mini, div.ui-input-text.ui-mini { margin: .25em 0; } | |
.ui-field-contain input.ui-input-text, .ui-field-contain textarea.ui-input-text, | |
.ui-field-contain .ui-input-search, .ui-field-contain div.ui-input-text { margin: 0; } | |
textarea.ui-input-text { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } | |
input.ui-input-text { -webkit-appearance: none; } | |
textarea.ui-input-text { height: 50px; -webkit-transition: height 200ms linear; -moz-transition: height 200ms linear; -o-transition: height 200ms linear; transition: height 200ms linear; } | |
textarea.ui-mini { height: 45px; } | |
.ui-icon-searchfield:after { position: absolute; left: 7px; top: 50%; margin-top: -9px; content: ""; width: 18px; height: 18px; opacity: .5; } | |
.ui-input-search .ui-input-clear, .ui-input-text .ui-input-clear { position: absolute; right: 0; top: 50%; margin-top: -13px; } | |
.ui-mini .ui-input-clear { right: -3px; } | |
.ui-input-search .ui-input-clear-hidden, .ui-input-text .ui-input-clear-hidden { display: none; } | |
/* Resolves issue #5166: Added to support issue introduced in Firefox 15. We can likely remove this in the future. */ | |
input::-moz-placeholder, textarea::-moz-placeholder { color: #aaa; } | |
/* For IE10 */ | |
:-ms-input-placeholder { color: #aaa; } | |
/* Resolves issue #5131: Width of textinput depends on its type, for Android 4.1 */ | |
input[type=number]::-webkit-outer-spin-button { margin: 0; } | |
@media all and (min-width: 28em){ | |
.ui-field-contain label.ui-input-text { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0 } | |
.ui-field-contain input.ui-input-text, | |
.ui-field-contain textarea.ui-input-text, | |
.ui-field-contain .ui-input-search, | |
.ui-field-contain div.ui-input-text { width: 78%; display: inline-block; } | |
.ui-field-contain .ui-input-search, | |
.ui-field-contain div.ui-input-text { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } | |
.ui-hide-label input.ui-input-text, | |
.ui-hide-label textarea.ui-input-text, | |
.ui-hide-label .ui-input-search, | |
.ui-hide-label div.ui-input-text, | |
.ui-input-search input.ui-input-text, | |
div.ui-input-text input.ui-input-text { width: 100%; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jQuery Mobile v1.3.2 | |
* http://jquerymobile.com | |
* | |
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* | |
*/ | |
/* Swatches */ | |
/* A | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-a { | |
border: 1px solid #333 /*{a-bar-border}*/; | |
background: #111 /*{a-bar-background-color}*/; | |
color: #fff /*{a-bar-color}*/; | |
font-weight: bold; | |
text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 0 /*{a-bar-shadow-radius}*/ #000 /*{a-bar-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #3c3c3c /*{a-bar-background-start}*/), to( #111 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); | |
} | |
.ui-bar-a, | |
.ui-bar-a input, | |
.ui-bar-a select, | |
.ui-bar-a textarea, | |
.ui-bar-a button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-bar-a .ui-link-inherit { | |
color: #fff /*{a-bar-color}*/; | |
} | |
.ui-bar-a a.ui-link { | |
color: #7cc4e7 /*{a-bar-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-bar-a a.ui-link:visited { | |
color: #2489ce /*{a-bar-link-visited}*/; | |
} | |
.ui-bar-a a.ui-link:hover { | |
color: #2489ce /*{a-bar-link-hover}*/; | |
} | |
.ui-bar-a a.ui-link:active { | |
color: #2489ce /*{a-bar-link-active}*/; | |
} | |
.ui-body-a, | |
.ui-overlay-a { | |
border: 1px solid #444 /*{a-body-border}*/; | |
background: #222 /*{a-body-background-color}*/; | |
color: #fff /*{a-body-color}*/; | |
text-shadow: 0 /*{a-body-shadow-x}*/ 1px /*{a-body-shadow-y}*/ 0 /*{a-body-shadow-radius}*/ #111 /*{a-body-shadow-color}*/; | |
font-weight: normal; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #444 /*{a-body-background-start}*/), to( #222 /*{a-body-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); | |
} | |
.ui-overlay-a { | |
background-image: none; | |
border-width: 0; | |
} | |
.ui-body-a, | |
.ui-body-a input, | |
.ui-body-a select, | |
.ui-body-a textarea, | |
.ui-body-a button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-body-a .ui-link-inherit { | |
color: #fff /*{a-body-color}*/; | |
} | |
.ui-body-a .ui-link { | |
color: #2489ce /*{a-body-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-body-a .ui-link:visited { | |
color: #2489ce /*{a-body-link-visited}*/; | |
} | |
.ui-body-a .ui-link:hover { | |
color: #2489ce /*{a-body-link-hover}*/; | |
} | |
.ui-body-a .ui-link:active { | |
color: #2489ce /*{a-body-link-active}*/; | |
} | |
.ui-btn-up-a { | |
border: 1px solid #111 /*{a-bup-border}*/; | |
background: #333 /*{a-bup-background-color}*/; | |
font-weight: bold; | |
color: #fff /*{a-bup-color}*/; | |
text-shadow: 0 /*{a-bup-shadow-x}*/ 1px /*{a-bup-shadow-y}*/ 0 /*{a-bup-shadow-radius}*/ #111 /*{a-bup-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #444 /*{a-bup-background-start}*/), to( #2d2d2d /*{a-bup-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); | |
} | |
.ui-btn-up-a:visited, | |
.ui-btn-up-a a.ui-link-inherit { | |
color: #fff /*{a-bup-color}*/; | |
} | |
.ui-btn-hover-a { | |
border: 1px solid #000 /*{a-bhover-border}*/; | |
background: #444 /*{a-bhover-background-color}*/; | |
font-weight: bold; | |
color: #fff /*{a-bhover-color}*/; | |
text-shadow: 0 /*{a-bhover-shadow-x}*/ 1px /*{a-bhover-shadow-y}*/ 0 /*{a-bhover-shadow-radius}*/ #111 /*{a-bhover-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #555 /*{a-bhover-background-start}*/), to( #383838 /*{a-bhover-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); | |
} | |
.ui-btn-hover-a:visited, | |
.ui-btn-hover-a:hover, | |
.ui-btn-hover-a a.ui-link-inherit { | |
color: #fff /*{a-bhover-color}*/; | |
} | |
.ui-btn-down-a { | |
border: 1px solid #000 /*{a-bdown-border}*/; | |
background: #222 /*{a-bdown-background-color}*/; | |
font-weight: bold; | |
color: #fff /*{a-bdown-color}*/; | |
text-shadow: 0 /*{a-bdown-shadow-x}*/ 1px /*{a-bdown-shadow-y}*/ 0 /*{a-bdown-shadow-radius}*/ #111 /*{a-bdown-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #202020 /*{a-bdown-background-start}*/), to( #2c2c2c /*{a-bdown-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); | |
} | |
.ui-btn-down-a:visited, | |
.ui-btn-down-a:hover, | |
.ui-btn-down-a a.ui-link-inherit { | |
color: #fff /*{a-bdown-color}*/; | |
} | |
.ui-btn-up-a, | |
.ui-btn-hover-a, | |
.ui-btn-down-a { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
text-decoration: none; | |
} | |
/* B | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-b { | |
border: 1px solid #456f9a /*{b-bar-border}*/; | |
background: #5e87b0 /*{b-bar-background-color}*/; | |
color: #fff /*{b-bar-color}*/; | |
font-weight: bold; | |
text-shadow: 0 /*{b-bar-shadow-x}*/ 1px /*{b-bar-shadow-y}*/ 0 /*{b-bar-shadow-radius}*/ #3e6790 /*{b-bar-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #6facd5 /*{b-bar-background-start}*/), to( #497bae /*{b-bar-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); | |
} | |
.ui-bar-b, | |
.ui-bar-b input, | |
.ui-bar-b select, | |
.ui-bar-b textarea, | |
.ui-bar-b button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-bar-b .ui-link-inherit { | |
color: #fff /*{b-bar-color}*/; | |
} | |
.ui-bar-b a.ui-link { | |
color: #ddf0f8 /*{b-bar-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-bar-b a.ui-link:visited { | |
color: #ddf0f8 /*{b-bar-link-visited}*/; | |
} | |
.ui-bar-b a.ui-link:hover { | |
color: #ddf0f8 /*{b-bar-link-hover}*/; | |
} | |
.ui-bar-b a.ui-link:active { | |
color: #ddf0f8 /*{b-bar-link-active}*/; | |
} | |
.ui-body-b, | |
.ui-overlay-b { | |
border: 1px solid #999 /*{b-body-border}*/; | |
background: #f3f3f3 /*{b-body-background-color}*/; | |
color: #222 /*{b-body-color}*/; | |
text-shadow: 0 /*{b-body-shadow-x}*/ 1px /*{b-body-shadow-y}*/ 0 /*{b-body-shadow-radius}*/ #fff /*{b-body-shadow-color}*/; | |
font-weight: normal; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #ddd /*{b-body-background-start}*/), to( #ccc /*{b-body-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); | |
} | |
.ui-overlay-b { | |
background-image: none; | |
border-width: 0; | |
} | |
.ui-body-b, | |
.ui-body-b input, | |
.ui-body-b select, | |
.ui-body-b textarea, | |
.ui-body-b button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-body-b .ui-link-inherit { | |
color: #333 /*{b-body-color}*/; | |
} | |
.ui-body-b .ui-link { | |
color: #2489ce /*{b-body-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-body-b .ui-link:visited { | |
color: #2489ce /*{b-body-link-visited}*/; | |
} | |
.ui-body-b .ui-link:hover { | |
color: #2489ce /*{b-body-link-hover}*/; | |
} | |
.ui-body-b .ui-link:active { | |
color: #2489ce /*{b-body-link-active}*/; | |
} | |
.ui-btn-up-b { | |
border: 1px solid #044062 /*{b-bup-border}*/; | |
background: #396b9e /*{b-bup-background-color}*/; | |
font-weight: bold; | |
color: #fff /*{b-bup-color}*/; | |
text-shadow: 0 /*{b-bup-shadow-x}*/ 1px /*{b-bup-shadow-y}*/ 0 /*{b-bup-shadow-radius}*/ #194b7e /*{b-bup-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #5f9cc5 /*{b-bup-background-start}*/), to( #396b9e /*{b-bup-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); | |
} | |
.ui-btn-up-b:visited, | |
.ui-btn-up-b a.ui-link-inherit { | |
color: #fff /*{b-bup-color}*/; | |
} | |
.ui-btn-hover-b { | |
border: 1px solid #00415e /*{b-bhover-border}*/; | |
background: #4b88b6 /*{b-bhover-background-color}*/; | |
font-weight: bold; | |
color: #fff /*{b-bhover-color}*/; | |
text-shadow: 0 /*{b-bhover-shadow-x}*/ 1px /*{b-bhover-shadow-y}*/ 0 /*{b-bhover-shadow-radius}*/ #194b7e /*{b-bhover-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #6facd5 /*{b-bhover-background-start}*/), to( #4272a4 /*{b-bhover-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); | |
} | |
.ui-btn-hover-b:visited, | |
.ui-btn-hover-b:hover, | |
.ui-btn-hover-b a.ui-link-inherit { | |
color: #fff /*{b-bhover-color}*/; | |
} | |
.ui-btn-down-b { | |
border: 1px solid #225377 /*{b-bdown-border}*/; | |
background: #4e89c5 /*{b-bdown-background-color}*/; | |
font-weight: bold; | |
color: #fff /*{b-bdown-color}*/; | |
text-shadow: 0 /*{b-bdown-shadow-x}*/ 1px /*{b-bdown-shadow-y}*/ 0 /*{b-bdown-shadow-radius}*/ #194b7e /*{b-bdown-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #295b8e /*{b-bdown-background-start}*/), to( #3e79b5 /*{b-bdown-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); | |
} | |
.ui-btn-down-b:visited, | |
.ui-btn-down-b:hover, | |
.ui-btn-down-b a.ui-link-inherit { | |
color: #fff /*{b-bdown-color}*/; | |
} | |
.ui-btn-up-b, | |
.ui-btn-hover-b, | |
.ui-btn-down-b { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
text-decoration: none; | |
} | |
/* C | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-c { | |
border: 1px solid #b3b3b3 /*{c-bar-border}*/; | |
background: #eee /*{c-bar-background-color}*/; | |
color: #3e3e3e /*{c-bar-color}*/; | |
font-weight: bold; | |
text-shadow: 0 /*{c-bar-shadow-x}*/ 1px /*{c-bar-shadow-y}*/ 0 /*{c-bar-shadow-radius}*/ #fff /*{c-bar-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #f0f0f0 /*{c-bar-background-start}*/), to( #ddd /*{c-bar-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); | |
} | |
.ui-bar-c .ui-link-inherit { | |
color: #3e3e3e /*{c-bar-color}*/; | |
} | |
.ui-bar-c a.ui-link { | |
color: #7cc4e7 /*{c-bar-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-bar-c a.ui-link:visited { | |
color: #2489ce /*{c-bar-link-visited}*/; | |
} | |
.ui-bar-c a.ui-link:hover { | |
color: #2489ce /*{c-bar-link-hover}*/; | |
} | |
.ui-bar-c a.ui-link:active { | |
color: #2489ce /*{c-bar-link-active}*/; | |
} | |
.ui-bar-c, | |
.ui-bar-c input, | |
.ui-bar-c select, | |
.ui-bar-c textarea, | |
.ui-bar-c button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-body-c, | |
.ui-overlay-c { | |
border: 1px solid #aaa /*{c-body-border}*/; | |
color: #333 /*{c-body-color}*/; | |
text-shadow: 0 /*{c-body-shadow-x}*/ 1px /*{c-body-shadow-y}*/ 0 /*{c-body-shadow-radius}*/ #fff /*{c-body-shadow-color}*/; | |
background: #f9f9f9 /*{c-body-background-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #f9f9f9 /*{c-body-background-start}*/), to( #eee /*{c-body-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); | |
} | |
.ui-overlay-c { | |
background-image: none; | |
border-width: 0; | |
} | |
.ui-body-c, | |
.ui-body-c input, | |
.ui-body-c select, | |
.ui-body-c textarea, | |
.ui-body-c button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-body-c .ui-link-inherit { | |
color: #333 /*{c-body-color}*/; | |
} | |
.ui-body-c .ui-link { | |
color: #2489ce /*{c-body-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-body-c .ui-link:visited { | |
color: #2489ce /*{c-body-link-visited}*/; | |
} | |
.ui-body-c .ui-link:hover { | |
color: #2489ce /*{c-body-link-hover}*/; | |
} | |
.ui-body-c .ui-link:active { | |
color: #2489ce /*{c-body-link-active}*/; | |
} | |
.ui-btn-up-c { | |
border: 1px solid #ccc /*{c-bup-border}*/; | |
background: #eee /*{c-bup-background-color}*/; | |
font-weight: bold; | |
color: #222 /*{c-bup-color}*/; | |
text-shadow: 0 /*{c-bup-shadow-x}*/ 1px /*{c-bup-shadow-y}*/ 0 /*{c-bup-shadow-radius}*/ #fff /*{c-bup-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #fff /*{c-bup-background-start}*/), to( #f1f1f1 /*{c-bup-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); | |
} | |
.ui-btn-up-c:visited, | |
.ui-btn-up-c a.ui-link-inherit { | |
color: #2f3e46 /*{c-bup-color}*/; | |
} | |
.ui-btn-hover-c { | |
border: 1px solid #bbb /*{c-bhover-border}*/; | |
background: #dfdfdf /*{c-bhover-background-color}*/; | |
font-weight: bold; | |
color: #222 /*{c-bhover-color}*/; | |
text-shadow: 0 /*{c-bhover-shadow-x}*/ 1px /*{c-bhover-shadow-y}*/ 0 /*{c-bhover-shadow-radius}*/ #fff /*{c-bhover-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #f6f6f6 /*{c-bhover-background-start}*/), to( #e0e0e0 /*{c-bhover-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); | |
} | |
.ui-btn-hover-c:visited, | |
.ui-btn-hover-c:hover, | |
.ui-btn-hover-c a.ui-link-inherit { | |
color: #2f3e46 /*{c-bhover-color}*/; | |
} | |
.ui-btn-down-c { | |
border: 1px solid #bbb /*{c-bdown-border}*/; | |
background: #d6d6d6 /*{c-bdown-background-color}*/; | |
font-weight: bold; | |
color: #222 /*{c-bdown-color}*/; | |
text-shadow: 0 /*{c-bdown-shadow-x}*/ 1px /*{c-bdown-shadow-y}*/ 0 /*{c-bdown-shadow-radius}*/ #fff /*{c-bdown-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #d0d0d0 /*{c-bdown-background-start}*/), to( #dfdfdf /*{c-bdown-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); | |
} | |
.ui-btn-down-c:visited, | |
.ui-btn-down-c:hover, | |
.ui-btn-down-c a.ui-link-inherit { | |
color: #2f3e46 /*{c-bdown-color}*/; | |
} | |
.ui-btn-up-c, | |
.ui-btn-hover-c, | |
.ui-btn-down-c { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
text-decoration: none; | |
} | |
/* D | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-d { | |
border: 1px solid #bbb /*{d-bar-border}*/; | |
background: #bbb /*{d-bar-background-color}*/; | |
color: #333 /*{d-bar-color}*/; | |
font-weight: bold; | |
text-shadow: 0 /*{d-bar-shadow-x}*/ 1px /*{d-bar-shadow-y}*/ 0 /*{d-bar-shadow-radius}*/ #eee /*{d-bar-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #ddd /*{d-bar-background-start}*/), to( #bbb /*{d-bar-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); | |
} | |
.ui-bar-d, | |
.ui-bar-d input, | |
.ui-bar-d select, | |
.ui-bar-d textarea, | |
.ui-bar-d button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-bar-d .ui-link-inherit { | |
color: #333 /*{d-bar-color}*/; | |
} | |
.ui-bar-d a.ui-link { | |
color: #2489ce /*{d-bar-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-bar-d a.ui-link:visited { | |
color: #2489ce /*{d-bar-link-visited}*/; | |
} | |
.ui-bar-d a.ui-link:hover { | |
color: #2489ce /*{d-bar-link-hover}*/; | |
} | |
.ui-bar-d a.ui-link:active { | |
color: #2489ce /*{d-bar-link-active}*/; | |
} | |
.ui-body-d, | |
.ui-overlay-d { | |
border: 1px solid #bbb /*{d-body-border}*/; | |
color: #333 /*{d-body-color}*/; | |
text-shadow: 0 /*{d-body-shadow-x}*/ 1px /*{d-body-shadow-y}*/ 0 /*{d-body-shadow-radius}*/ #fff /*{d-body-shadow-color}*/; | |
background: #fff /*{d-body-background-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #fff /*{d-body-background-start}*/), to( #fff /*{d-body-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); | |
} | |
.ui-overlay-d { | |
background-image: none; | |
border-width: 0; | |
} | |
.ui-body-d, | |
.ui-body-d input, | |
.ui-body-d select, | |
.ui-body-d textarea, | |
.ui-body-d button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-body-d .ui-link-inherit { | |
color: #333 /*{d-body-color}*/; | |
} | |
.ui-body-d .ui-link { | |
color: #2489ce /*{d-body-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-body-d .ui-link:visited { | |
color: #2489ce /*{d-body-link-visited}*/; | |
} | |
.ui-body-d .ui-link:hover { | |
color: #2489ce /*{d-body-link-hover}*/; | |
} | |
.ui-body-d .ui-link:active { | |
color: #2489ce /*{d-body-link-active}*/; | |
} | |
.ui-btn-up-d { | |
border: 1px solid #bbb /*{d-bup-border}*/; | |
background: #fff /*{d-bup-background-color}*/; | |
font-weight: bold; | |
color: #333 /*{d-bup-color}*/; | |
text-shadow: 0 /*{d-bup-shadow-x}*/ 1px /*{d-bup-shadow-y}*/ 0 /*{d-bup-shadow-radius}*/ #fff /*{d-bup-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #fafafa /*{d-bup-background-start}*/), to( #f6f6f6 /*{d-bup-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); | |
} | |
.ui-btn-up-d:visited, | |
.ui-btn-up-d a.ui-link-inherit { | |
color: #333 /*{d-bup-color}*/; | |
} | |
.ui-btn-hover-d { | |
border: 1px solid #aaa /*{d-bhover-border}*/; | |
background: #eee /*{d-bhover-background-color}*/; | |
font-weight: bold; | |
color: #333 /*{d-bhover-color}*/; | |
cursor: pointer; | |
text-shadow: 0 /*{d-bhover-shadow-x}*/ 1px /*{d-bhover-shadow-y}*/ 0 /*{d-bhover-shadow-radius}*/ #fff /*{d-bhover-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #eee /*{d-bhover-background-start}*/), to( #fff /*{d-bhover-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); | |
} | |
.ui-btn-hover-d:visited, | |
.ui-btn-hover-d:hover, | |
.ui-btn-hover-d a.ui-link-inherit { | |
color: #333 /*{d-bhover-color}*/; | |
} | |
.ui-btn-down-d { | |
border: 1px solid #aaa /*{d-bdown-border}*/; | |
background: #eee /*{d-bdown-background-color}*/; | |
font-weight: bold; | |
color: #333 /*{d-bdown-color}*/; | |
text-shadow: 0 /*{d-bdown-shadow-x}*/ 1px /*{d-bdown-shadow-y}*/ 0 /*{d-bdown-shadow-radius}*/ #fff /*{d-bdown-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #e5e5e5 /*{d-bdown-background-start}*/), to( #f2f2f2 /*{d-bdown-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); | |
} | |
.ui-btn-down-d:visited, | |
.ui-btn-down-d:hover, | |
.ui-btn-down-d a.ui-link-inherit { | |
color: #333 /*{d-bdown-color}*/; | |
} | |
.ui-btn-up-d, | |
.ui-btn-hover-d, | |
.ui-btn-down-d { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
text-decoration: none; | |
} | |
/* E | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-bar-e { | |
border: 1px solid #f7c942 /*{e-bar-border}*/; | |
background: #fadb4e /*{e-bar-background-color}*/; | |
color: #333 /*{e-bar-color}*/; | |
font-weight: bold; | |
text-shadow: 0 /*{e-bar-shadow-x}*/ 1px /*{e-bar-shadow-y}*/ 0 /*{e-bar-shadow-radius}*/ #fff /*{e-bar-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #fceda7 /*{e-bar-background-start}*/), to( #fbef7e /*{e-bar-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); | |
} | |
.ui-bar-e, | |
.ui-bar-e input, | |
.ui-bar-e select, | |
.ui-bar-e textarea, | |
.ui-bar-e button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-bar-e .ui-link-inherit { | |
color: #333 /*{e-bar-color}*/; | |
} | |
.ui-bar-e a.ui-link { | |
color: #2489ce /*{e-bar-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-bar-e a.ui-link:visited { | |
color: #2489ce /*{e-bar-link-visited}*/; | |
} | |
.ui-bar-e a.ui-link:hover { | |
color: #2489ce /*{e-bar-link-hover}*/; | |
} | |
.ui-bar-e a.ui-link:active { | |
color: #2489ce /*{e-bar-link-active}*/; | |
} | |
.ui-body-e, | |
.ui-overlay-e { | |
border: 1px solid #f7c942 /*{e-body-border}*/; | |
color: #222 /*{e-body-color}*/; | |
text-shadow: 0 /*{e-body-shadow-x}*/ 1px /*{e-body-shadow-y}*/ 0 /*{e-body-shadow-radius}*/ #fff /*{e-body-shadow-color}*/; | |
background: #fff9df /*{e-body-background-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #fffadf /*{e-body-background-start}*/), to( #fff3a5 /*{e-body-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); | |
} | |
.ui-overlay-e { | |
background-image: none; | |
border-width: 0; | |
} | |
.ui-body-e, | |
.ui-body-e input, | |
.ui-body-e select, | |
.ui-body-e textarea, | |
.ui-body-e button { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-body-e .ui-link-inherit { | |
color: #222 /*{e-body-color}*/; | |
} | |
.ui-body-e .ui-link { | |
color: #2489ce /*{e-body-link-color}*/; | |
font-weight: bold; | |
} | |
.ui-body-e .ui-link:visited { | |
color: #2489ce /*{e-body-link-visited}*/; | |
} | |
.ui-body-e .ui-link:hover { | |
color: #2489ce /*{e-body-link-hover}*/; | |
} | |
.ui-body-e .ui-link:active { | |
color: #2489ce /*{e-body-link-active}*/; | |
} | |
.ui-btn-up-e { | |
border: 1px solid #f4c63f /*{e-bup-border}*/; | |
background: #fadb4e /*{e-bup-background-color}*/; | |
font-weight: bold; | |
color: #222 /*{e-bup-color}*/; | |
text-shadow: 0 /*{e-bup-shadow-x}*/ 1px /*{e-bup-shadow-y}*/ 0 /*{e-bup-shadow-radius}*/ #fff /*{e-bup-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #ffefaa /*{e-bup-background-start}*/), to( #ffe155 /*{e-bup-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); | |
} | |
.ui-btn-up-e:visited, | |
.ui-btn-up-e a.ui-link-inherit { | |
color: #222 /*{e-bup-color}*/; | |
} | |
.ui-btn-hover-e { | |
border: 1px solid #f2c43d /*{e-bhover-border}*/; | |
background: #fbe26f /*{e-bhover-background-color}*/; | |
font-weight: bold; | |
color: #111 /*{e-bhover-color}*/; | |
text-shadow: 0 /*{e-bhover-shadow-x}*/ 1px /*{e-bhover-shadow-y}*/ 0 /*{e-bhover-shadow-radius}*/ #fff /*{e-bhover-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #fff5ba /*{e-bhover-background-start}*/), to( #fbdd52 /*{e-bhover-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); | |
} | |
.ui-btn-hover-e:visited, | |
.ui-btn-hover-e:hover, | |
.ui-btn-hover-e a.ui-link-inherit { | |
color: #333 /*{e-bhover-color}*/; | |
} | |
.ui-btn-down-e { | |
border: 1px solid #f2c43d /*{e-bdown-border}*/; | |
background: #fceda7 /*{e-bdown-background-color}*/; | |
font-weight: bold; | |
color: #111 /*{e-bdown-color}*/; | |
text-shadow: 0 /*{e-bdown-shadow-x}*/ 1px /*{e-bdown-shadow-y}*/ 0 /*{e-bdown-shadow-radius}*/ #fff /*{e-bdown-shadow-color}*/; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #f8d94c /*{e-bdown-background-start}*/), to( #fadb4e /*{e-bdown-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); | |
} | |
.ui-btn-down-e:visited, | |
.ui-btn-down-e:hover, | |
.ui-btn-down-e a.ui-link-inherit { | |
color: #333 /*{e-bdown-color}*/; | |
} | |
.ui-btn-up-e, | |
.ui-btn-hover-e, | |
.ui-btn-down-e { | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
text-decoration: none; | |
} | |
/* Structure */ | |
/* links within "buttons" | |
-----------------------------------------------------------------------------------------------------------*/ | |
a.ui-link-inherit { | |
text-decoration: none !important; | |
} | |
/* Active class used as the "on" state across all themes | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-active { | |
border: 1px solid #2373a5 /*{global-active-border}*/; | |
background: #5393c5 /*{global-active-background-color}*/; | |
font-weight: bold; | |
color: #fff /*{global-active-color}*/; | |
cursor: pointer; | |
text-shadow: 0 /*{global-active-shadow-x}*/ 1px /*{global-active-shadow-y}*/ 0 /*{global-active-shadow-radius}*/ #3373a5 /*{global-active-shadow-color}*/; | |
text-decoration: none; | |
background-image: -webkit-gradient(linear, left top, left bottom, from( #5393c5 /*{global-active-background-start}*/), to( #6facd5 /*{global-active-background-end}*/)); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* Chrome 10+, Saf5.1+ */ | |
background-image: -moz-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* FF3.6 */ | |
background-image: -ms-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* IE10 */ | |
background-image: -o-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* Opera 11.10+ */ | |
background-image: linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); | |
font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; | |
} | |
.ui-btn-active:visited, | |
.ui-btn-active:hover, | |
.ui-btn-active a.ui-link-inherit { | |
color: #fff /*{global-active-color}*/; | |
} | |
/* button inner top highlight | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-inner { | |
border-top: 1px solid #fff; | |
border-color: rgba(255,255,255,.3); | |
} | |
/* corner rounding classes | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-corner-all { | |
-webkit-border-radius: .6em /*{global-radii-blocks}*/; | |
border-radius: .6em /*{global-radii-blocks}*/; | |
} | |
/* Form field separator | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-br { | |
border-color: rgb(130,130,130); | |
border-color: rgba(130,130,130,.3); | |
border-style: solid; | |
} | |
/* Interaction cues | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-disabled { | |
filter: Alpha(Opacity=30); | |
opacity: .3; | |
zoom: 1; | |
} | |
.ui-disabled, | |
.ui-disabled a { | |
cursor: default !important; | |
pointer-events: none; | |
} | |
/* Icons | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-icon, | |
.ui-icon-searchfield:after { | |
background: #666 /*{global-icon-color}*/; | |
background: rgba(0,0,0,.4) /*{global-icon-disc}*/; | |
background-image: url(images/icons-18-white.png) /*{global-icon-set}*/; | |
background-repeat: no-repeat; | |
-webkit-border-radius: 9px; | |
border-radius: 9px; | |
} | |
/* Alt icon color | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-icon-alt .ui-icon, | |
.ui-icon-alt .ui-icon-searchfield:after { | |
background-color: #fff; | |
background-color: rgba(255,255,255,.3); | |
background-image: url(images/icons-18-black.png); | |
background-repeat: no-repeat; | |
} | |
/* No disc | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-icon-nodisc .ui-icon, | |
.ui-icon-nodisc .ui-icon-searchfield:after, | |
.ui-icon-nodisc .ui-icon-alt .ui-icon, | |
.ui-icon-nodisc .ui-icon-alt .ui-icon-searchfield:after { | |
background-color: transparent; | |
} | |
/* Icon sprite | |
-----------------------------------------------------------------------------------------------------------*/ | |
/* plus minus */ | |
.ui-icon-plus { | |
background-position: -1px -1px; | |
} | |
.ui-icon-minus { | |
background-position: -37px -1px; | |
} | |
/* delete/close */ | |
.ui-icon-delete { | |
background-position: -73px -1px; | |
} | |
/* arrows */ | |
.ui-icon-arrow-r { | |
background-position: -108px -1px; | |
} | |
.ui-icon-arrow-l { | |
background-position: -144px -1px; | |
} | |
.ui-icon-arrow-u { | |
background-position: -180px -1px; | |
} | |
.ui-icon-arrow-d { | |
background-position: -216px -1px; | |
} | |
/* misc */ | |
.ui-icon-check { | |
background-position: -252px -1px; | |
} | |
.ui-icon-gear { | |
background-position: -288px -1px; | |
} | |
.ui-icon-refresh { | |
background-position: -323px -1px; | |
} | |
.ui-icon-forward { | |
background-position: -360px -1px; | |
} | |
.ui-icon-back { | |
background-position: -396px -1px; | |
} | |
.ui-icon-grid { | |
background-position: -432px -1px; | |
} | |
.ui-icon-star { | |
background-position: -467px -1px; | |
} | |
.ui-icon-alert { | |
background-position: -503px -1px; | |
} | |
.ui-icon-info { | |
background-position: -539px -1px; | |
} | |
.ui-icon-home { | |
background-position: -575px -1px; | |
} | |
/* search */ | |
.ui-icon-search, | |
.ui-icon-searchfield:after { | |
background-position: -611px -1px; | |
} | |
/* checkbox radio */ | |
.ui-icon-checkbox-on { | |
background-position: -647px -1px; | |
} | |
.ui-icon-checkbox-off { | |
background-position: -683px -1px; | |
} | |
.ui-icon-radio-on { | |
background-position: -718px -1px; | |
} | |
.ui-icon-radio-off { | |
background-position: -754px -1px; | |
} | |
/* menu edit */ | |
.ui-icon-bars { | |
background-position: -788px -1px; | |
} | |
.ui-icon-edit { | |
background-position: -824px -1px; | |
} | |
/* HD/"retina" sprite | |
-----------------------------------------------------------------------------------------------------------*/ | |
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), | |
only screen and (min--moz-device-pixel-ratio: 1.3), | |
only screen and (min-resolution: 200dpi) { | |
.ui-icon-plus, .ui-icon-minus, .ui-icon-delete, .ui-icon-arrow-r, | |
.ui-icon-arrow-l, .ui-icon-arrow-u, .ui-icon-arrow-d, .ui-icon-check, | |
.ui-icon-gear, .ui-icon-refresh, .ui-icon-forward, .ui-icon-back, | |
.ui-icon-grid, .ui-icon-star, .ui-icon-alert, .ui-icon-info, .ui-icon-home, .ui-icon-bars, .ui-icon-edit, | |
.ui-icon-search, .ui-icon-searchfield:after, | |
.ui-icon-checkbox-off, .ui-icon-checkbox-on, .ui-icon-radio-off, .ui-icon-radio-on { | |
background-image: url(images/icons-36-white.png); | |
-moz-background-size: 864px 18px; | |
-o-background-size: 864px 18px; | |
-webkit-background-size: 864px 18px; | |
background-size: 864px 18px; | |
} | |
.ui-icon-alt .ui-icon { | |
background-image: url(images/icons-36-black.png); | |
} | |
.ui-icon-plus { | |
background-position: 0 50%; | |
} | |
.ui-icon-minus { | |
background-position: -36px 50%; | |
} | |
.ui-icon-delete { | |
background-position: -72px 50%; | |
} | |
.ui-icon-arrow-r { | |
background-position: -108px 50%; | |
} | |
.ui-icon-arrow-l { | |
background-position: -144px 50%; | |
} | |
.ui-icon-arrow-u { | |
background-position: -179px 50%; | |
} | |
.ui-icon-arrow-d { | |
background-position: -215px 50%; | |
} | |
.ui-icon-check { | |
background-position: -252px 50%; | |
} | |
.ui-icon-gear { | |
background-position: -287px 50%; | |
} | |
.ui-icon-refresh { | |
background-position: -323px 50%; | |
} | |
.ui-icon-forward { | |
background-position: -360px 50%; | |
} | |
.ui-icon-back { | |
background-position: -395px 50%; | |
} | |
.ui-icon-grid { | |
background-position: -431px 50%; | |
} | |
.ui-icon-star { | |
background-position: -467px 50%; | |
} | |
.ui-icon-alert { | |
background-position: -503px 50%; | |
} | |
.ui-icon-info { | |
background-position: -538px 50%; | |
} | |
.ui-icon-home { | |
background-position: -575px 50%; | |
} | |
.ui-icon-search, | |
.ui-icon-searchfield:after { | |
background-position: -611px 50%; | |
} | |
.ui-icon-checkbox-on { | |
background-position: -647px 50%; | |
} | |
.ui-icon-checkbox-off { | |
background-position: -683px 50%; | |
} | |
.ui-icon-radio-on { | |
background-position: -718px 50%; | |
} | |
.ui-icon-radio-off { | |
background-position: -754px 50%; | |
} | |
.ui-icon-bars { | |
background-position: -788px 50%; | |
}.ui-icon-edit { | |
background-position: -824px 50%; | |
} | |
} | |
/* checks,radios */ | |
.ui-checkbox .ui-icon, | |
.ui-selectmenu-list .ui-icon { | |
-webkit-border-radius: 3px; | |
border-radius: 3px; | |
} | |
.ui-icon-checkbox-off, | |
.ui-icon-radio-off { | |
background-color: transparent; | |
} | |
.ui-checkbox-on .ui-icon, | |
.ui-radio-on .ui-icon { | |
background-color: #4596ce /*{global-active-background-color}*/; /* NOTE: this hex should match the active state color. It's repeated here for cascade */ | |
} | |
/* loading icon */ | |
.ui-icon-loading { | |
background: url(images/ajax-loader.gif); | |
background-size: 46px 46px; | |
} | |
/* Button corner class | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn-corner-all { | |
-webkit-border-radius: 1em /*{global-radii-buttons}*/; | |
border-radius: 1em /*{global-radii-buttons}*/; | |
} | |
/* radius clip workaround for cleaning up corner trapping */ | |
.ui-corner-all, | |
.ui-btn-corner-all { | |
-webkit-background-clip: padding; | |
background-clip: padding-box; | |
} | |
/* Overlay / modal | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-overlay { | |
background: #666; | |
filter: Alpha(Opacity=50); | |
opacity: .5; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
} | |
.ui-overlay-shadow { | |
-moz-box-shadow: 0 0 12px rgba(0,0,0,.6); | |
-webkit-box-shadow: 0 0 12px rgba(0,0,0,.6); | |
box-shadow: 0 0 12px rgba(0,0,0,.6); | |
} | |
.ui-shadow { | |
-moz-box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; | |
-webkit-box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; | |
box-shadow: 0 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/ | |
} | |
.ui-bar-a .ui-shadow, | |
.ui-bar-b .ui-shadow , | |
.ui-bar-c .ui-shadow { | |
-moz-box-shadow: 0 1px 0 rgba(255,255,255,.3); | |
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,.3); | |
box-shadow: 0 1px 0 rgba(255,255,255,.3); | |
} | |
.ui-shadow-inset { | |
-moz-box-shadow: inset 0 1px 4px rgba(0,0,0,.2); | |
-webkit-box-shadow: inset 0 1px 4px rgba(0,0,0,.2); | |
box-shadow: inset 0 1px 4px rgba(0,0,0,.2); | |
} | |
.ui-icon-shadow { | |
-moz-box-shadow: 0 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; | |
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; | |
box-shadow: 0 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; | |
} | |
/* Focus state - set here for specificity (note: these classes are added by JavaScript) | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-btn:focus, .ui-link-inherit:focus { | |
outline: 0; | |
} | |
.ui-btn.ui-focus { | |
z-index: 1; | |
} | |
.ui-focus, | |
.ui-btn:focus { | |
-moz-box-shadow: inset 0 0 3px #387bbe /*{global-active-background-color}*/, 0 0 9px #387bbe /*{global-active-background-color}*/; | |
-webkit-box-shadow: inset 0 0 3px #387bbe /*{global-active-background-color}*/, 0 0 9px #387bbe /*{global-active-background-color}*/; | |
box-shadow: inset 0 0 3px #387bbe /*{global-active-background-color}*/, 0 0 9px #387bbe /*{global-active-background-color}*/; | |
} | |
.ui-input-text.ui-focus, | |
.ui-input-search.ui-focus { | |
-moz-box-shadow: 0 0 12px #387bbe /*{global-active-background-color}*/; | |
-webkit-box-shadow: 0 0 12px #387bbe /*{global-active-background-color}*/; | |
box-shadow: 0 0 12px #387bbe /*{global-active-background-color}*/; | |
} | |
/* unset box shadow in browsers that don't do it right | |
-----------------------------------------------------------------------------------------------------------*/ | |
.ui-mobile-nosupport-boxshadow * { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
} | |
/* ...and bring back focus */ | |
.ui-mobile-nosupport-boxshadow .ui-focus, | |
.ui-mobile-nosupport-boxshadow .ui-btn:focus, | |
.ui-mobile-nosupport-boxshadow .ui-link-inherit:focus { | |
outline-width: 1px; | |
outline-style: auto; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jQuery Mobile v1.3.2 | |
* http://jquerymobile.com | |
* | |
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* | |
*/ | |
(function ( root, doc, factory ) { | |
if ( typeof define === "function" && define.amd ) { | |
// AMD. Register as an anonymous module. | |
define( [ "jquery" ], function ( $ ) { | |
factory( $, root, doc ); | |
return $.mobile; | |
}); | |
} else { | |
// Browser globals | |
factory( root.jQuery, root, doc ); | |
} | |
}( this, document, function ( jQuery, window, document, undefined ) { | |
(function( $ ) { | |
$.mobile = {}; | |
}( jQuery )); | |
(function( $, window, undefined ) { | |
var nsNormalizeDict = {}; | |
// jQuery.mobile configurable options | |
$.mobile = $.extend($.mobile, { | |
// Version of the jQuery Mobile Framework | |
version: "1.3.2", | |
// Namespace used framework-wide for data-attrs. Default is no namespace | |
ns: "", | |
// Define the url parameter used for referencing widget-generated sub-pages. | |
// Translates to to example.html&ui-page=subpageIdentifier | |
// hash segment before &ui-page= is used to make Ajax request | |
subPageUrlKey: "ui-page", | |
// Class assigned to page currently in view, and during transitions | |
activePageClass: "ui-page-active", | |
// Class used for "active" button state, from CSS framework | |
activeBtnClass: "ui-btn-active", | |
// Class used for "focus" form element state, from CSS framework | |
focusClass: "ui-focus", | |
// Automatically handle clicks and form submissions through Ajax, when same-domain | |
ajaxEnabled: true, | |
// Automatically load and show pages based on location.hash | |
hashListeningEnabled: true, | |
// disable to prevent jquery from bothering with links | |
linkBindingEnabled: true, | |
// Set default page transition - 'none' for no transitions | |
defaultPageTransition: "fade", | |
// Set maximum window width for transitions to apply - 'false' for no limit | |
maxTransitionWidth: false, | |
// Minimum scroll distance that will be remembered when returning to a page | |
minScrollBack: 250, | |
// DEPRECATED: the following property is no longer in use, but defined until 2.0 to prevent conflicts | |
touchOverflowEnabled: false, | |
// Set default dialog transition - 'none' for no transitions | |
defaultDialogTransition: "pop", | |
// Error response message - appears when an Ajax page request fails | |
pageLoadErrorMessage: "Error Loading Page", | |
// For error messages, which theme does the box uses? | |
pageLoadErrorMessageTheme: "e", | |
// replace calls to window.history.back with phonegaps navigation helper | |
// where it is provided on the window object | |
phonegapNavigationEnabled: false, | |
//automatically initialize the DOM when it's ready | |
autoInitializePage: true, | |
pushStateEnabled: true, | |
// allows users to opt in to ignoring content by marking a parent element as | |
// data-ignored | |
ignoreContentEnabled: false, | |
// turn of binding to the native orientationchange due to android orientation behavior | |
orientationChangeEnabled: true, | |
buttonMarkup: { | |
hoverDelay: 200 | |
}, | |
// define the window and the document objects | |
window: $( window ), | |
document: $( document ), | |
// TODO might be useful upstream in jquery itself ? | |
keyCode: { | |
ALT: 18, | |
BACKSPACE: 8, | |
CAPS_LOCK: 20, | |
COMMA: 188, | |
COMMAND: 91, | |
COMMAND_LEFT: 91, // COMMAND | |
COMMAND_RIGHT: 93, | |
CONTROL: 17, | |
DELETE: 46, | |
DOWN: 40, | |
END: 35, | |
ENTER: 13, | |
ESCAPE: 27, | |
HOME: 36, | |
INSERT: 45, | |
LEFT: 37, | |
MENU: 93, // COMMAND_RIGHT | |
NUMPAD_ADD: 107, | |
NUMPAD_DECIMAL: 110, | |
NUMPAD_DIVIDE: 111, | |
NUMPAD_ENTER: 108, | |
NUMPAD_MULTIPLY: 106, | |
NUMPAD_SUBTRACT: 109, | |
PAGE_DOWN: 34, | |
PAGE_UP: 33, | |
PERIOD: 190, | |
RIGHT: 39, | |
SHIFT: 16, | |
SPACE: 32, | |
TAB: 9, | |
UP: 38, | |
WINDOWS: 91 // COMMAND | |
}, | |
// Place to store various widget extensions | |
behaviors: {}, | |
// Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value | |
silentScroll: function( ypos ) { | |
if ( $.type( ypos ) !== "number" ) { | |
ypos = $.mobile.defaultHomeScroll; | |
} | |
// prevent scrollstart and scrollstop events | |
$.event.special.scrollstart.enabled = false; | |
setTimeout( function() { | |
window.scrollTo( 0, ypos ); | |
$.mobile.document.trigger( "silentscroll", { x: 0, y: ypos }); | |
}, 20 ); | |
setTimeout( function() { | |
$.event.special.scrollstart.enabled = true; | |
}, 150 ); | |
}, | |
// Expose our cache for testing purposes. | |
nsNormalizeDict: nsNormalizeDict, | |
// Take a data attribute property, prepend the namespace | |
// and then camel case the attribute string. Add the result | |
// to our nsNormalizeDict so we don't have to do this again. | |
nsNormalize: function( prop ) { | |
if ( !prop ) { | |
return; | |
} | |
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) ); | |
}, | |
// Find the closest parent with a theme class on it. Note that | |
// we are not using $.fn.closest() on purpose here because this | |
// method gets called quite a bit and we need it to be as fast | |
// as possible. | |
getInheritedTheme: function( el, defaultTheme ) { | |
var e = el[ 0 ], | |
ltr = "", | |
re = /ui-(bar|body|overlay)-([a-z])\b/, | |
c, m; | |
while ( e ) { | |
c = e.className || ""; | |
if ( c && ( m = re.exec( c ) ) && ( ltr = m[ 2 ] ) ) { | |
// We found a parent with a theme class | |
// on it so bail from this loop. | |
break; | |
} | |
e = e.parentNode; | |
} | |
// Return the theme letter we found, if none, return the | |
// specified default. | |
return ltr || defaultTheme || "a"; | |
}, | |
// TODO the following $ and $.fn extensions can/probably should be moved into jquery.mobile.core.helpers | |
// | |
// Find the closest javascript page element to gather settings data jsperf test | |
// http://jsperf.com/single-complex-selector-vs-many-complex-selectors/edit | |
// possibly naive, but it shows that the parsing overhead for *just* the page selector vs | |
// the page and dialog selector is negligable. This could probably be speed up by | |
// doing a similar parent node traversal to the one found in the inherited theme code above | |
closestPageData: function( $target ) { | |
return $target | |
.closest( ':jqmData(role="page"), :jqmData(role="dialog")' ) | |
.data( "mobile-page" ); | |
}, | |
enhanceable: function( $set ) { | |
return this.haveParents( $set, "enhance" ); | |
}, | |
hijackable: function( $set ) { | |
return this.haveParents( $set, "ajax" ); | |
}, | |
haveParents: function( $set, attr ) { | |
if ( !$.mobile.ignoreContentEnabled ) { | |
return $set; | |
} | |
var count = $set.length, | |
$newSet = $(), | |
e, $element, excluded; | |
for ( var i = 0; i < count; i++ ) { | |
$element = $set.eq( i ); | |
excluded = false; | |
e = $set[ i ]; | |
while ( e ) { | |
var c = e.getAttribute ? e.getAttribute( "data-" + $.mobile.ns + attr ) : ""; | |
if ( c === "false" ) { | |
excluded = true; | |
break; | |
} | |
e = e.parentNode; | |
} | |
if ( !excluded ) { | |
$newSet = $newSet.add( $element ); | |
} | |
} | |
return $newSet; | |
}, | |
getScreenHeight: function() { | |
// Native innerHeight returns more accurate value for this across platforms, | |
// jQuery version is here as a normalized fallback for platforms like Symbian | |
return window.innerHeight || $.mobile.window.height(); | |
} | |
}, $.mobile ); | |
// Mobile version of data and removeData and hasData methods | |
// ensures all data is set and retrieved using jQuery Mobile's data namespace | |
$.fn.jqmData = function( prop, value ) { | |
var result; | |
if ( typeof prop !== "undefined" ) { | |
if ( prop ) { | |
prop = $.mobile.nsNormalize( prop ); | |
} | |
// undefined is permitted as an explicit input for the second param | |
// in this case it returns the value and does not set it to undefined | |
if( arguments.length < 2 || value === undefined ){ | |
result = this.data( prop ); | |
} else { | |
result = this.data( prop, value ); | |
} | |
} | |
return result; | |
}; | |
$.jqmData = function( elem, prop, value ) { | |
var result; | |
if ( typeof prop !== "undefined" ) { | |
result = $.data( elem, prop ? $.mobile.nsNormalize( prop ) : prop, value ); | |
} | |
return result; | |
}; | |
$.fn.jqmRemoveData = function( prop ) { | |
return this.removeData( $.mobile.nsNormalize( prop ) ); | |
}; | |
$.jqmRemoveData = function( elem, prop ) { | |
return $.removeData( elem, $.mobile.nsNormalize( prop ) ); | |
}; | |
$.fn.removeWithDependents = function() { | |
$.removeWithDependents( this ); | |
}; | |
$.removeWithDependents = function( elem ) { | |
var $elem = $( elem ); | |
( $elem.jqmData( 'dependents' ) || $() ).remove(); | |
$elem.remove(); | |
}; | |
$.fn.addDependents = function( newDependents ) { | |
$.addDependents( $( this ), newDependents ); | |
}; | |
$.addDependents = function( elem, newDependents ) { | |
var dependents = $( elem ).jqmData( 'dependents' ) || $(); | |
$( elem ).jqmData( 'dependents', $.merge( dependents, newDependents ) ); | |
}; | |
// note that this helper doesn't attempt to handle the callback | |
// or setting of an html element's text, its only purpose is | |
// to return the html encoded version of the text in all cases. (thus the name) | |
$.fn.getEncodedText = function() { | |
return $( "<div/>" ).text( $( this ).text() ).html(); | |
}; | |
// fluent helper function for the mobile namespaced equivalent | |
$.fn.jqmEnhanceable = function() { | |
return $.mobile.enhanceable( this ); | |
}; | |
$.fn.jqmHijackable = function() { | |
return $.mobile.hijackable( this ); | |
}; | |
// Monkey-patching Sizzle to filter the :jqmData selector | |
var oldFind = $.find, | |
jqmDataRE = /:jqmData\(([^)]*)\)/g; | |
$.find = function( selector, context, ret, extra ) { | |
selector = selector.replace( jqmDataRE, "[data-" + ( $.mobile.ns || "" ) + "$1]" ); | |
return oldFind.call( this, selector, context, ret, extra ); | |
}; | |
$.extend( $.find, oldFind ); | |
$.find.matches = function( expr, set ) { | |
return $.find( expr, null, null, set ); | |
}; | |
$.find.matchesSelector = function( node, expr ) { | |
return $.find( expr, null, null, [ node ] ).length > 0; | |
}; | |
})( jQuery, this ); | |
// This plugin is an experiment for abstracting away the touch and mouse | |
// events so that developers don't have to worry about which method of input | |
// the device their document is loaded on supports. | |
// | |
// The idea here is to allow the developer to register listeners for the | |
// basic mouse events, such as mousedown, mousemove, mouseup, and click, | |
// and the plugin will take care of registering the correct listeners | |
// behind the scenes to invoke the listener at the fastest possible time | |
// for that device, while still retaining the order of event firing in | |
// the traditional mouse environment, should multiple handlers be registered | |
// on the same element for different events. | |
// | |
// The current version exposes the following virtual events to jQuery bind methods: | |
// "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel" | |
(function( $, window, document, undefined ) { | |
var dataPropertyName = "virtualMouseBindings", | |
touchTargetPropertyName = "virtualTouchID", | |
virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ), | |
touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ), | |
mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [], | |
mouseEventProps = $.event.props.concat( mouseHookProps ), | |
activeDocHandlers = {}, | |
resetTimerID = 0, | |
startX = 0, | |
startY = 0, | |
didScroll = false, | |
clickBlockList = [], | |
blockMouseTriggers = false, | |
blockTouchTriggers = false, | |
eventCaptureSupported = "addEventListener" in document, | |
$document = $( document ), | |
nextTouchID = 1, | |
lastTouchID = 0, threshold; | |
$.vmouse = { | |
moveDistanceThreshold: 10, | |
clickDistanceThreshold: 10, | |
resetTimerDuration: 1500 | |
}; | |
function getNativeEvent( event ) { | |
while ( event && typeof event.originalEvent !== "undefined" ) { | |
event = event.originalEvent; | |
} | |
return event; | |
} | |
function createVirtualEvent( event, eventType ) { | |
var t = event.type, | |
oe, props, ne, prop, ct, touch, i, j, len; | |
event = $.Event( event ); | |
event.type = eventType; | |
oe = event.originalEvent; | |
props = $.event.props; | |
// addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280 | |
// https://github.com/jquery/jquery-mobile/issues/3280 | |
if ( t.search( /^(mouse|click)/ ) > -1 ) { | |
props = mouseEventProps; | |
} | |
// copy original event properties over to the new event | |
// this would happen if we could call $.event.fix instead of $.Event | |
// but we don't have a way to force an event to be fixed multiple times | |
if ( oe ) { | |
for ( i = props.length, prop; i; ) { | |
prop = props[ --i ]; | |
event[ prop ] = oe[ prop ]; | |
} | |
} | |
// make sure that if the mouse and click virtual events are generated | |
// without a .which one is defined | |
if ( t.search(/mouse(down|up)|click/) > -1 && !event.which ) { | |
event.which = 1; | |
} | |
if ( t.search(/^touch/) !== -1 ) { | |
ne = getNativeEvent( oe ); | |
t = ne.touches; | |
ct = ne.changedTouches; | |
touch = ( t && t.length ) ? t[0] : ( ( ct && ct.length ) ? ct[ 0 ] : undefined ); | |
if ( touch ) { | |
for ( j = 0, len = touchEventProps.length; j < len; j++) { | |
prop = touchEventProps[ j ]; | |
event[ prop ] = touch[ prop ]; | |
} | |
} | |
} | |
return event; | |
} | |
function getVirtualBindingFlags( element ) { | |
var flags = {}, | |
b, k; | |
while ( element ) { | |
b = $.data( element, dataPropertyName ); | |
for ( k in b ) { | |
if ( b[ k ] ) { | |
flags[ k ] = flags.hasVirtualBinding = true; | |
} | |
} | |
element = element.parentNode; | |
} | |
return flags; | |
} | |
function getClosestElementWithVirtualBinding( element, eventType ) { | |
var b; | |
while ( element ) { | |
b = $.data( element, dataPropertyName ); | |
if ( b && ( !eventType || b[ eventType ] ) ) { | |
return element; | |
} | |
element = element.parentNode; | |
} | |
return null; | |
} | |
function enableTouchBindings() { | |
blockTouchTriggers = false; | |
} | |
function disableTouchBindings() { | |
blockTouchTriggers = true; | |
} | |
function enableMouseBindings() { | |
lastTouchID = 0; | |
clickBlockList.length = 0; | |
blockMouseTriggers = false; | |
// When mouse bindings are enabled, our | |
// touch bindings are disabled. | |
disableTouchBindings(); | |
} | |
function disableMouseBindings() { | |
// When mouse bindings are disabled, our | |
// touch bindings are enabled. | |
enableTouchBindings(); | |
} | |
function startResetTimer() { | |
clearResetTimer(); | |
resetTimerID = setTimeout( function() { | |
resetTimerID = 0; | |
enableMouseBindings(); | |
}, $.vmouse.resetTimerDuration ); | |
} | |
function clearResetTimer() { | |
if ( resetTimerID ) { | |
clearTimeout( resetTimerID ); | |
resetTimerID = 0; | |
} | |
} | |
function triggerVirtualEvent( eventType, event, flags ) { | |
var ve; | |
if ( ( flags && flags[ eventType ] ) || | |
( !flags && getClosestElementWithVirtualBinding( event.target, eventType ) ) ) { | |
ve = createVirtualEvent( event, eventType ); | |
$( event.target).trigger( ve ); | |
} | |
return ve; | |
} | |
function mouseEventCallback( event ) { | |
var touchID = $.data( event.target, touchTargetPropertyName ); | |
if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ) { | |
var ve = triggerVirtualEvent( "v" + event.type, event ); | |
if ( ve ) { | |
if ( ve.isDefaultPrevented() ) { | |
event.preventDefault(); | |
} | |
if ( ve.isPropagationStopped() ) { | |
event.stopPropagation(); | |
} | |
if ( ve.isImmediatePropagationStopped() ) { | |
event.stopImmediatePropagation(); | |
} | |
} | |
} | |
} | |
function handleTouchStart( event ) { | |
var touches = getNativeEvent( event ).touches, | |
target, flags; | |
if ( touches && touches.length === 1 ) { | |
target = event.target; | |
flags = getVirtualBindingFlags( target ); | |
if ( flags.hasVirtualBinding ) { | |
lastTouchID = nextTouchID++; | |
$.data( target, touchTargetPropertyName, lastTouchID ); | |
clearResetTimer(); | |
disableMouseBindings(); | |
didScroll = false; | |
var t = getNativeEvent( event ).touches[ 0 ]; | |
startX = t.pageX; | |
startY = t.pageY; | |
triggerVirtualEvent( "vmouseover", event, flags ); | |
triggerVirtualEvent( "vmousedown", event, flags ); | |
} | |
} | |
} | |
function handleScroll( event ) { | |
if ( blockTouchTriggers ) { | |
return; | |
} | |
if ( !didScroll ) { | |
triggerVirtualEvent( "vmousecancel", event, getVirtualBindingFlags( event.target ) ); | |
} | |
didScroll = true; | |
startResetTimer(); | |
} | |
function handleTouchMove( event ) { | |
if ( blockTouchTriggers ) { | |
return; | |
} | |
var t = getNativeEvent( event ).touches[ 0 ], | |
didCancel = didScroll, | |
moveThreshold = $.vmouse.moveDistanceThreshold, | |
flags = getVirtualBindingFlags( event.target ); | |
didScroll = didScroll || | |
( Math.abs( t.pageX - startX ) > moveThreshold || | |
Math.abs( t.pageY - startY ) > moveThreshold ); | |
if ( didScroll && !didCancel ) { | |
triggerVirtualEvent( "vmousecancel", event, flags ); | |
} | |
triggerVirtualEvent( "vmousemove", event, flags ); | |
startResetTimer(); | |
} | |
function handleTouchEnd( event ) { | |
if ( blockTouchTriggers ) { | |
return; | |
} | |
disableTouchBindings(); | |
var flags = getVirtualBindingFlags( event.target ), | |
t; | |
triggerVirtualEvent( "vmouseup", event, flags ); | |
if ( !didScroll ) { | |
var ve = triggerVirtualEvent( "vclick", event, flags ); | |
if ( ve && ve.isDefaultPrevented() ) { | |
// The target of the mouse events that follow the touchend | |
// event don't necessarily match the target used during the | |
// touch. This means we need to rely on coordinates for blocking | |
// any click that is generated. | |
t = getNativeEvent( event ).changedTouches[ 0 ]; | |
clickBlockList.push({ | |
touchID: lastTouchID, | |
x: t.clientX, | |
y: t.clientY | |
}); | |
// Prevent any mouse events that follow from triggering | |
// virtual event notifications. | |
blockMouseTriggers = true; | |
} | |
} | |
triggerVirtualEvent( "vmouseout", event, flags); | |
didScroll = false; | |
startResetTimer(); | |
} | |
function hasVirtualBindings( ele ) { | |
var bindings = $.data( ele, dataPropertyName ), | |
k; | |
if ( bindings ) { | |
for ( k in bindings ) { | |
if ( bindings[ k ] ) { | |
return true; | |
} | |
} | |
} | |
return false; | |
} | |
function dummyMouseHandler() {} | |
function getSpecialEventObject( eventType ) { | |
var realType = eventType.substr( 1 ); | |
return { | |
setup: function( data, namespace ) { | |
// If this is the first virtual mouse binding for this element, | |
// add a bindings object to its data. | |
if ( !hasVirtualBindings( this ) ) { | |
$.data( this, dataPropertyName, {} ); | |
} | |
// If setup is called, we know it is the first binding for this | |
// eventType, so initialize the count for the eventType to zero. | |
var bindings = $.data( this, dataPropertyName ); | |
bindings[ eventType ] = true; | |
// If this is the first virtual mouse event for this type, | |
// register a global handler on the document. | |
activeDocHandlers[ eventType ] = ( activeDocHandlers[ eventType ] || 0 ) + 1; | |
if ( activeDocHandlers[ eventType ] === 1 ) { | |
$document.bind( realType, mouseEventCallback ); | |
} | |
// Some browsers, like Opera Mini, won't dispatch mouse/click events | |
// for elements unless they actually have handlers registered on them. | |
// To get around this, we register dummy handlers on the elements. | |
$( this ).bind( realType, dummyMouseHandler ); | |
// For now, if event capture is not supported, we rely on mouse handlers. | |
if ( eventCaptureSupported ) { | |
// If this is the first virtual mouse binding for the document, | |
// register our touchstart handler on the document. | |
activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1; | |
if ( activeDocHandlers[ "touchstart" ] === 1 ) { | |
$document.bind( "touchstart", handleTouchStart ) | |
.bind( "touchend", handleTouchEnd ) | |
// On touch platforms, touching the screen and then dragging your finger | |
// causes the window content to scroll after some distance threshold is | |
// exceeded. On these platforms, a scroll prevents a click event from being | |
// dispatched, and on some platforms, even the touchend is suppressed. To | |
// mimic the suppression of the click event, we need to watch for a scroll | |
// event. Unfortunately, some platforms like iOS don't dispatch scroll | |
// events until *AFTER* the user lifts their finger (touchend). This means | |
// we need to watch both scroll and touchmove events to figure out whether | |
// or not a scroll happenens before the touchend event is fired. | |
.bind( "touchmove", handleTouchMove ) | |
.bind( "scroll", handleScroll ); | |
} | |
} | |
}, | |
teardown: function( data, namespace ) { | |
// If this is the last virtual binding for this eventType, | |
// remove its global handler from the document. | |
--activeDocHandlers[ eventType ]; | |
if ( !activeDocHandlers[ eventType ] ) { | |
$document.unbind( realType, mouseEventCallback ); | |
} | |
if ( eventCaptureSupported ) { | |
// If this is the last virtual mouse binding in existence, | |
// remove our document touchstart listener. | |
--activeDocHandlers[ "touchstart" ]; | |
if ( !activeDocHandlers[ "touchstart" ] ) { | |
$document.unbind( "touchstart", handleTouchStart ) | |
.unbind( "touchmove", handleTouchMove ) | |
.unbind( "touchend", handleTouchEnd ) | |
.unbind( "scroll", handleScroll ); | |
} | |
} | |
var $this = $( this ), | |
bindings = $.data( this, dataPropertyName ); | |
// teardown may be called when an element was | |
// removed from the DOM. If this is the case, | |
// jQuery core may have already stripped the element | |
// of any data bindings so we need to check it before | |
// using it. | |
if ( bindings ) { | |
bindings[ eventType ] = false; | |
} | |
// Unregister the dummy event handler. | |
$this.unbind( realType, dummyMouseHandler ); | |
// If this is the last virtual mouse binding on the | |
// element, remove the binding data from the element. | |
if ( !hasVirtualBindings( this ) ) { | |
$this.removeData( dataPropertyName ); | |
} | |
} | |
}; | |
} | |
// Expose our custom events to the jQuery bind/unbind mechanism. | |
for ( var i = 0; i < virtualEventNames.length; i++ ) { | |
$.event.special[ virtualEventNames[ i ] ] = getSpecialEventObject( virtualEventNames[ i ] ); | |
} | |
// Add a capture click handler to block clicks. | |
// Note that we require event capture support for this so if the device | |
// doesn't support it, we punt for now and rely solely on mouse events. | |
if ( eventCaptureSupported ) { | |
document.addEventListener( "click", function( e ) { | |
var cnt = clickBlockList.length, | |
target = e.target, | |
x, y, ele, i, o, touchID; | |
if ( cnt ) { | |
x = e.clientX; | |
y = e.clientY; | |
threshold = $.vmouse.clickDistanceThreshold; | |
// The idea here is to run through the clickBlockList to see if | |
// the current click event is in the proximity of one of our | |
// vclick events that had preventDefault() called on it. If we find | |
// one, then we block the click. | |
// | |
// Why do we have to rely on proximity? | |
// | |
// 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 syntehsized | |
// 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 | |
// says the user touched outside the link. Also, it seems that with most | |
// browsers, the target of the mouse/click event is not calculated until the | |
// time it is dispatched, so if you replace an element that you touched | |
// with another element, the target of the mouse/click will be the new | |
// element underneath that point. | |
// | |
// Aside from proximity, we also check to see if the target and any | |
// of its ancestors were the ones that blocked a click. This is necessary | |
// because of the strange mouse/click target calculation done in the | |
// Android 2.1 browser, where if you click on an element, and there is a | |
// mouse/click handler on one of its ancestors, the target will be the | |
// innermost child of the touched element, even if that child is no where | |
// near the point of touch. | |
ele = target; | |
while ( ele ) { | |
for ( i = 0; i < cnt; i++ ) { | |
o = clickBlockList[ i ]; | |
touchID = 0; | |
if ( ( ele === target && Math.abs( o.x - x ) < threshold && Math.abs( o.y - y ) < threshold ) || | |
$.data( ele, touchTargetPropertyName ) === o.touchID ) { | |
// XXX: We may want to consider removing matches from the block list | |
// instead of waiting for the reset timer to fire. | |
e.preventDefault(); | |
e.stopPropagation(); | |
return; | |
} | |
} | |
ele = ele.parentNode; | |
} | |
} | |
}, true); | |
} | |
})( jQuery, window, document ); | |
(function( $, undefined ) { | |
// This function calls getAttribute, which should be safe for data-* attributes | |
var getAttrFixed = function( e, key ) { | |
var value = e.getAttribute( key ); | |
return value === "true" ? true : | |
value === "false" ? false : | |
value === null ? undefined : value; | |
}; | |
$.fn.buttonMarkup = function( options ) { | |
var $workingSet = this, | |
nsKey = "data-" + $.mobile.ns, | |
key; | |
// Enforce options to be of type string | |
options = ( options && ( $.type( options ) === "object" ) )? options : {}; | |
for ( var i = 0; i < $workingSet.length; i++ ) { | |
var el = $workingSet.eq( i ), | |
e = el[ 0 ], | |
o = $.extend( {}, $.fn.buttonMarkup.defaults, { | |
icon: options.icon !== undefined ? options.icon : getAttrFixed( e, nsKey + "icon" ), | |
iconpos: options.iconpos !== undefined ? options.iconpos : getAttrFixed( e, nsKey + "iconpos" ), | |
theme: options.theme !== undefined ? options.theme : getAttrFixed( e, nsKey + "theme" ) || $.mobile.getInheritedTheme( el, "c" ), | |
inline: options.inline !== undefined ? options.inline : getAttrFixed( e, nsKey + "inline" ), | |
shadow: options.shadow !== undefined ? options.shadow : getAttrFixed( e, nsKey + "shadow" ), | |
corners: options.corners !== undefined ? options.corners : getAttrFixed( e, nsKey + "corners" ), | |
iconshadow: options.iconshadow !== undefined ? options.iconshadow : getAttrFixed( e, nsKey + "iconshadow" ), | |
mini: options.mini !== undefined ? options.mini : getAttrFixed( e, nsKey + "mini" ) | |
}, options ), | |
// Classes Defined | |
innerClass = "ui-btn-inner", | |
textClass = "ui-btn-text", | |
buttonClass, iconClass, | |
hover = false, | |
state = "up", | |
// Button inner markup | |
buttonInner, | |
buttonText, | |
buttonIcon, | |
buttonElements; | |
for ( key in o ) { | |
if ( o[ key ] === undefined || o[ key ] === null ) { | |
el.removeAttr( nsKey + key ); | |
} else { | |
e.setAttribute( nsKey + key, o[ key ] ); | |
} | |
} | |
// Check if this element is already enhanced | |
buttonElements = $.data( ( ( e.tagName === "INPUT" || e.tagName === "BUTTON" ) ? e.parentNode : e ), "buttonElements" ); | |
if ( buttonElements ) { | |
e = buttonElements.outer; | |
el = $( e ); | |
buttonInner = buttonElements.inner; | |
buttonText = buttonElements.text; | |
// We will recreate this icon below | |
$( buttonElements.icon ).remove(); | |
buttonElements.icon = null; | |
hover = buttonElements.hover; | |
state = buttonElements.state; | |
} | |
else { | |
buttonInner = document.createElement( o.wrapperEls ); | |
buttonText = document.createElement( o.wrapperEls ); | |
} | |
buttonIcon = o.icon ? document.createElement( "span" ) : null; | |
if ( attachEvents && !buttonElements ) { | |
attachEvents(); | |
} | |
// if not, try to find closest theme container | |
if ( !o.theme ) { | |
o.theme = $.mobile.getInheritedTheme( el, "c" ); | |
} | |
buttonClass = "ui-btn "; | |
buttonClass += ( hover ? "ui-btn-hover-" + o.theme : "" ); | |
buttonClass += ( state ? " ui-btn-" + state + "-" + o.theme : "" ); | |
buttonClass += o.shadow ? " ui-shadow" : ""; | |
buttonClass += o.corners ? " ui-btn-corner-all" : ""; | |
if ( o.mini !== undefined ) { | |
// Used to control styling in headers/footers, where buttons default to `mini` style. | |
buttonClass += o.mini === true ? " ui-mini" : " ui-fullsize"; | |
} | |
if ( o.inline !== undefined ) { | |
// Used to control styling in headers/footers, where buttons default to `inline` style. | |
buttonClass += o.inline === true ? " ui-btn-inline" : " ui-btn-block"; | |
} | |
if ( o.icon ) { | |
o.icon = "ui-icon-" + o.icon; | |
o.iconpos = o.iconpos || "left"; | |
iconClass = "ui-icon " + o.icon; | |
if ( o.iconshadow ) { | |
iconClass += " ui-icon-shadow"; | |
} | |
} | |
if ( o.iconpos ) { | |
buttonClass += " ui-btn-icon-" + o.iconpos; | |
if ( o.iconpos === "notext" && !el.attr( "title" ) ) { | |
el.attr( "title", el.getEncodedText() ); | |
} | |
} | |
if ( buttonElements ) { | |
el.removeClass( buttonElements.bcls || "" ); | |
} | |
el.removeClass( "ui-link" ).addClass( buttonClass ); | |
buttonInner.className = innerClass; | |
buttonText.className = textClass; | |
if ( !buttonElements ) { | |
buttonInner.appendChild( buttonText ); | |
} | |
if ( buttonIcon ) { | |
buttonIcon.className = iconClass; | |
if ( !( buttonElements && buttonElements.icon ) ) { | |
buttonIcon.innerHTML = " "; | |
buttonInner.appendChild( buttonIcon ); | |
} | |
} | |
while ( e.firstChild && !buttonElements ) { | |
buttonText.appendChild( e.firstChild ); | |
} | |
if ( !buttonElements ) { | |
e.appendChild( buttonInner ); | |
} | |
// Assign a structure containing the elements of this button to the elements of this button. This | |
// will allow us to recognize this as an already-enhanced button in future calls to buttonMarkup(). | |
buttonElements = { | |
hover : hover, | |
state : state, | |
bcls : buttonClass, | |
outer : e, | |
inner : buttonInner, | |
text : buttonText, | |
icon : buttonIcon | |
}; | |
$.data( e, 'buttonElements', buttonElements ); | |
$.data( buttonInner, 'buttonElements', buttonElements ); | |
$.data( buttonText, 'buttonElements', buttonElements ); | |
if ( buttonIcon ) { | |
$.data( buttonIcon, 'buttonElements', buttonElements ); | |
} | |
} | |
return this; | |
}; | |
$.fn.buttonMarkup.defaults = { | |
corners: true, | |
shadow: true, | |
iconshadow: true, | |
wrapperEls: "span" | |
}; | |
function closestEnabledButton( element ) { | |
var cname; | |
while ( element ) { | |
// Note that we check for typeof className below because the element we | |
// handed could be in an SVG DOM where className on SVG elements is defined to | |
// be of a different type (SVGAnimatedString). We only operate on HTML DOM | |
// elements, so we look for plain "string". | |
cname = ( typeof element.className === 'string' ) && ( element.className + ' ' ); | |
if ( cname && cname.indexOf( "ui-btn " ) > -1 && cname.indexOf( "ui-disabled " ) < 0 ) { | |
break; | |
} | |
element = element.parentNode; | |
} | |
return element; | |
} | |
function updateButtonClass( $btn, classToRemove, classToAdd, hover, state ) { | |
var buttonElements = $.data( $btn[ 0 ], "buttonElements" ); | |
$btn.removeClass( classToRemove ).addClass( classToAdd ); | |
if ( buttonElements ) { | |
buttonElements.bcls = $( document.createElement( "div" ) ) | |
.addClass( buttonElements.bcls + " " + classToAdd ) | |
.removeClass( classToRemove ) | |
.attr( "class" ); | |
if ( hover !== undefined ) { | |
buttonElements.hover = hover; | |
} | |
buttonElements.state = state; | |
} | |
} | |
var attachEvents = function() { | |
var hoverDelay = $.mobile.buttonMarkup.hoverDelay, hov, foc; | |
$.mobile.document.bind( { | |
"vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart": function( event ) { | |
var theme, | |
$btn = $( closestEnabledButton( event.target ) ), | |
isTouchEvent = event.originalEvent && /^touch/.test( event.originalEvent.type ), | |
evt = event.type; | |
if ( $btn.length ) { | |
theme = $btn.attr( "data-" + $.mobile.ns + "theme" ); | |
if ( evt === "vmousedown" ) { | |
if ( isTouchEvent ) { | |
// Use a short delay to determine if the user is scrolling before highlighting | |
hov = setTimeout( function() { | |
updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-down-" + theme, undefined, "down" ); | |
}, hoverDelay ); | |
} else { | |
updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-down-" + theme, undefined, "down" ); | |
} | |
} else if ( evt === "vmousecancel" || evt === "vmouseup" ) { | |
updateButtonClass( $btn, "ui-btn-down-" + theme, "ui-btn-up-" + theme, undefined, "up" ); | |
} else if ( evt === "vmouseover" || evt === "focus" ) { | |
if ( isTouchEvent ) { | |
// Use a short delay to determine if the user is scrolling before highlighting | |
foc = setTimeout( function() { | |
updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-hover-" + theme, true, "" ); | |
}, hoverDelay ); | |
} else { | |
updateButtonClass( $btn, "ui-btn-up-" + theme, "ui-btn-hover-" + theme, true, "" ); | |
} | |
} else if ( evt === "vmouseout" || evt === "blur" || evt === "scrollstart" ) { | |
updateButtonClass( $btn, "ui-btn-hover-" + theme + " ui-btn-down-" + theme, "ui-btn-up-" + theme, false, "up" ); | |
if ( hov ) { | |
clearTimeout( hov ); | |
} | |
if ( foc ) { | |
clearTimeout( foc ); | |
} | |
} | |
} | |
}, | |
"focusin focus": function( event ) { | |
$( closestEnabledButton( event.target ) ).addClass( $.mobile.focusClass ); | |
}, | |
"focusout blur": function( event ) { | |
$( closestEnabledButton( event.target ) ).removeClass( $.mobile.focusClass ); | |
} | |
}); | |
attachEvents = null; | |
}; | |
//links in bars, or those with data-role become buttons | |
//auto self-init widgets | |
$.mobile.document.bind( "pagecreate create", function( e ) { | |
$( ":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a", e.target ) | |
.jqmEnhanceable() | |
.not( "button, input, .ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" ) | |
.buttonMarkup(); | |
}); | |
})( jQuery ); | |
/*! | |
* jQuery UI Widget v1.10.0pre - 2012-11-13 (ff055a0c353c3c8ce6e5bfa07ad7cb03e8885bc5) | |
* http://jqueryui.com | |
* | |
* Copyright 2010, 2013 jQuery Foundation and other contributors | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* | |
* http://api.jqueryui.com/jQuery.widget/ | |
*/ | |
(function( $, undefined ) { | |
var uuid = 0, | |
slice = Array.prototype.slice, | |
_cleanData = $.cleanData; | |
$.cleanData = function( elems ) { | |
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { | |
try { | |
$( elem ).triggerHandler( "remove" ); | |
// http://bugs.jquery.com/ticket/8235 | |
} catch( e ) {} | |
} | |
_cleanData( elems ); | |
}; | |
$.widget = function( name, base, prototype ) { | |
var fullName, existingConstructor, constructor, basePrototype, | |
namespace = name.split( "." )[ 0 ]; | |
name = name.split( "." )[ 1 ]; | |
fullName = namespace + "-" + name; | |
if ( !prototype ) { | |
prototype = base; | |
base = $.Widget; | |
} | |
// create selector for plugin | |
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { | |
return !!$.data( elem, fullName ); | |
}; | |
$[ namespace ] = $[ namespace ] || {}; | |
existingConstructor = $[ namespace ][ name ]; | |
constructor = $[ namespace ][ name ] = function( options, element ) { | |
// allow instantiation without "new" keyword | |
if ( !this._createWidget ) { | |
return new constructor( options, element ); | |
} | |
// allow instantiation without initializing for simple inheritance | |
// must use "new" keyword (the code above always passes args) | |
if ( arguments.length ) { | |
this._createWidget( options, element ); | |
} | |
}; | |
// extend with the existing constructor to carry over any static properties | |
$.extend( constructor, existingConstructor, { | |
version: prototype.version, | |
// copy the object used to create the prototype in case we need to | |
// redefine the widget later | |
_proto: $.extend( {}, prototype ), | |
// track widgets that inherit from this widget in case this widget is | |
// redefined after a widget inherits from it | |
_childConstructors: [] | |
}); | |
basePrototype = new base(); | |
// we need to make the options hash a property directly on the new instance | |
// otherwise we'll modify the options hash on the prototype that we're | |
// inheriting from | |
basePrototype.options = $.widget.extend( {}, basePrototype.options ); | |
$.each( prototype, function( prop, value ) { | |
if ( $.isFunction( value ) ) { | |
prototype[ prop ] = (function() { | |
var _super = function() { | |
return base.prototype[ prop ].apply( this, arguments ); | |
}, | |
_superApply = function( args ) { | |
return base.prototype[ prop ].apply( this, args ); | |
}; | |
return function() { | |
var __super = this._super, | |
__superApply = this._superApply, | |
returnValue; | |
this._super = _super; | |
this._superApply = _superApply; | |
returnValue = value.apply( this, arguments ); | |
this._super = __super; | |
this._superApply = __superApply; | |
return returnValue; | |
}; | |
})(); | |
} | |
}); | |
constructor.prototype = $.widget.extend( basePrototype, { | |
// TODO: remove support for widgetEventPrefix | |
// always use the name + a colon as the prefix, e.g., draggable:start | |
// don't prefix for widgets that aren't DOM-based | |
widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name | |
}, prototype, { | |
constructor: constructor, | |
namespace: namespace, | |
widgetName: name, | |
widgetFullName: fullName | |
}); | |
// If this widget is being redefined then we need to find all widgets that | |
// are inheriting from it and redefine all of them so that they inherit from | |
// the new version of this widget. We're essentially trying to replace one | |
// level in the prototype chain. | |
if ( existingConstructor ) { | |
$.each( existingConstructor._childConstructors, function( i, child ) { | |
var childPrototype = child.prototype; | |
// redefine the child widget using the same prototype that was | |
// originally used, but inherit from the new version of the base | |
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); | |
}); | |
// remove the list of existing child constructors from the old constructor | |
// so the old child constructors can be garbage collected | |
delete existingConstructor._childConstructors; | |
} else { | |
base._childConstructors.push( constructor ); | |
} | |
$.widget.bridge( name, constructor ); | |
}; | |
$.widget.extend = function( target ) { | |
var input = slice.call( arguments, 1 ), | |
inputIndex = 0, | |
inputLength = input.length, | |
key, | |
value; | |
for ( ; inputIndex < inputLength; inputIndex++ ) { | |
for ( key in input[ inputIndex ] ) { | |
value = input[ inputIndex ][ key ]; | |
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { | |
// Clone objects | |
if ( $.isPlainObject( value ) ) { | |
target[ key ] = $.isPlainObject( target[ key ] ) ? | |
$.widget.extend( {}, target[ key ], value ) : | |
// Don't extend strings, arrays, etc. with objects | |
$.widget.extend( {}, value ); | |
// Copy everything else by reference | |
} else { | |
target[ key ] = value; | |
} | |
} | |
} | |
} | |
return target; | |
}; | |
$.widget.bridge = function( name, object ) { | |
var fullName = object.prototype.widgetFullName || name; | |
$.fn[ name ] = function( options ) { | |
var isMethodCall = typeof options === "string", | |
args = slice.call( arguments, 1 ), | |
returnValue = this; | |
// allow multiple hashes to be passed on init | |
options = !isMethodCall && args.length ? | |
$.widget.extend.apply( null, [ options ].concat(args) ) : | |
options; | |
if ( isMethodCall ) { | |
this.each(function() { | |
var methodValue, | |
instance = $.data( this, fullName ); | |
if ( !instance ) { | |
return $.error( "cannot call methods on " + name + " prior to initialization; " + | |
"attempted to call method '" + options + "'" ); | |
} | |
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { | |
return $.error( "no such method '" + options + "' for " + name + " widget instance" ); | |
} | |
methodValue = instance[ options ].apply( instance, args ); | |
if ( methodValue !== instance && methodValue !== undefined ) { | |
returnValue = methodValue && methodValue.jquery ? | |
returnValue.pushStack( methodValue.get() ) : | |
methodValue; | |
return false; | |
} | |
}); | |
} else { | |
this.each(function() { | |
var instance = $.data( this, fullName ); | |
if ( instance ) { | |
instance.option( options || {} )._init(); | |
} else { | |
$.data( this, fullName, new object( options, this ) ); | |
} | |
}); | |
} | |
return returnValue; | |
}; | |
}; | |
$.Widget = function( /* options, element */ ) {}; | |
$.Widget._childConstructors = []; | |
$.Widget.prototype = { | |
widgetName: "widget", | |
widgetEventPrefix: "", | |
defaultElement: "<div>", | |
options: { | |
disabled: false, | |
// callbacks | |
create: null | |
}, | |
_createWidget: function( options, element ) { | |
element = $( element || this.defaultElement || this )[ 0 ]; | |
this.element = $( element ); | |
this.uuid = uuid++; | |
this.eventNamespace = "." + this.widgetName + this.uuid; | |
this.options = $.widget.extend( {}, | |
this.options, | |
this._getCreateOptions(), | |
options ); | |
this.bindings = $(); | |
this.hoverable = $(); | |
this.focusable = $(); | |
if ( element !== this ) { | |
$.data( element, this.widgetFullName, this ); | |
this._on( true, this.element, { | |
remove: function( event ) { | |
if ( event.target === element ) { | |
this.destroy(); | |
} | |
} | |
}); | |
this.document = $( element.style ? | |
// element within the document | |
element.ownerDocument : | |
// element is window or document | |
element.document || element ); | |
this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); | |
} | |
this._create(); | |
this._trigger( "create", null, this._getCreateEventData() ); | |
this._init(); | |
}, | |
_getCreateOptions: $.noop, | |
_getCreateEventData: $.noop, | |
_create: $.noop, | |
_init: $.noop, | |
destroy: function() { | |
this._destroy(); | |
// we can probably remove the unbind calls in 2.0 | |
// all event bindings should go through this._on() | |
this.element | |
.unbind( this.eventNamespace ) | |
// 1.9 BC for #7810 | |
// TODO remove dual storage | |
.removeData( this.widgetName ) | |
.removeData( this.widgetFullName ) | |
// support: jquery <1.6.3 | |
// http://bugs.jquery.com/ticket/9413 | |
.removeData( $.camelCase( this.widgetFullName ) ); | |
this.widget() | |
.unbind( this.eventNamespace ) | |
.removeAttr( "aria-disabled" ) | |
.removeClass( | |
this.widgetFullName + "-disabled " + | |
"ui-state-disabled" ); | |
// clean up events and states | |
this.bindings.unbind( this.eventNamespace ); | |
this.hoverable.removeClass( "ui-state-hover" ); | |
this.focusable.removeClass( "ui-state-focus" ); | |
}, | |
_destroy: $.noop, | |
widget: function() { | |
return this.element; | |
}, | |
option: function( key, value ) { | |
var options = key, | |
parts, | |
curOption, | |
i; | |
if ( arguments.length === 0 ) { | |
// don't return a reference to the internal hash | |
return $.widget.extend( {}, this.options ); | |
} | |
if ( typeof key === "string" ) { | |
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } | |
options = {}; | |
parts = key.split( "." ); | |
key = parts.shift(); | |
if ( parts.length ) { | |
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); | |
for ( i = 0; i < parts.length - 1; i++ ) { | |
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; | |
curOption = curOption[ parts[ i ] ]; | |
} | |
key = parts.pop(); | |
if ( value === undefined ) { | |
return curOption[ key ] === undefined ? null : curOption[ key ]; | |
} | |
curOption[ key ] = value; | |
} else { | |
if ( value === undefined ) { | |
return this.options[ key ] === undefined ? null : this.options[ key ]; | |
} | |
options[ key ] = value; | |
} | |
} | |
this._setOptions( options ); | |
return this; | |
}, | |
_setOptions: function( options ) { | |
var key; | |
for ( key in options ) { | |
this._setOption( key, options[ key ] ); | |
} | |
return this; | |
}, | |
_setOption: function( key, value ) { | |
this.options[ key ] = value; | |
if ( key === "disabled" ) { | |
this.widget() | |
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) | |
.attr( "aria-disabled", value ); | |
this.hoverable.removeClass( "ui-state-hover" ); | |
this.focusable.removeClass( "ui-state-focus" ); | |
} | |
return this; | |
}, | |
enable: function() { | |
return this._setOption( "disabled", false ); | |
}, | |
disable: function() { | |
return this._setOption( "disabled", true ); | |
}, | |
_on: function( suppressDisabledCheck, element, handlers ) { | |
var delegateElement, | |
instance = this; | |
// no suppressDisabledCheck flag, shuffle arguments | |
if ( typeof suppressDisabledCheck !== "boolean" ) { | |
handlers = element; | |
element = suppressDisabledCheck; | |
suppressDisabledCheck = false; | |
} | |
// no element argument, shuffle and use this.element | |
if ( !handlers ) { | |
handlers = element; | |
element = this.element; | |
delegateElement = this.widget(); | |
} else { | |
// accept selectors, DOM elements | |
element = delegateElement = $( element ); | |
this.bindings = this.bindings.add( element ); | |
} | |
$.each( handlers, function( event, handler ) { | |
function handlerProxy() { | |
// allow widgets to customize the disabled handling | |
// - disabled as an array instead of boolean | |
// - disabled class as method for disabling individual parts | |
if ( !suppressDisabledCheck && | |
( instance.options.disabled === true || | |
$( this ).hasClass( "ui-state-disabled" ) ) ) { | |
return; | |
} | |
return ( typeof handler === "string" ? instance[ handler ] : handler ) | |
.apply( instance, arguments ); | |
} | |
// copy the guid so direct unbinding works | |
if ( typeof handler !== "string" ) { | |
handlerProxy.guid = handler.guid = | |
handler.guid || handlerProxy.guid || $.guid++; | |
} | |
var match = event.match( /^(\w+)\s*(.*)$/ ), | |
eventName = match[1] + instance.eventNamespace, | |
selector = match[2]; | |
if ( selector ) { | |
delegateElement.delegate( selector, eventName, handlerProxy ); | |
} else { | |
element.bind( eventName, handlerProxy ); | |
} | |
}); | |
}, | |
_off: function( element, eventName ) { | |
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; | |
element.unbind( eventName ).undelegate( eventName ); | |
}, | |
_delay: function( handler, delay ) { | |
function handlerProxy() { | |
return ( typeof handler === "string" ? instance[ handler ] : handler ) | |
.apply( instance, arguments ); | |
} | |
var instance = this; | |
return setTimeout( handlerProxy, delay || 0 ); | |
}, | |
_hoverable: function( element ) { | |
this.hoverable = this.hoverable.add( element ); | |
this._on( element, { | |
mouseenter: function( event ) { | |
$( event.currentTarget ).addClass( "ui-state-hover" ); | |
}, | |
mouseleave: function( event ) { | |
$( event.currentTarget ).removeClass( "ui-state-hover" ); | |
} | |
}); | |
}, | |
_focusable: function( element ) { | |
this.focusable = this.focusable.add( element ); | |
this._on( element, { | |
focusin: function( event ) { | |
$( event.currentTarget ).addClass( "ui-state-focus" ); | |
}, | |
focusout: function( event ) { | |
$( event.currentTarget ).removeClass( "ui-state-focus" ); | |
} | |
}); | |
}, | |
_trigger: function( type, event, data ) { | |
var prop, orig, | |
callback = this.options[ type ]; | |
data = data || {}; | |
event = $.Event( event ); | |
event.type = ( type === this.widgetEventPrefix ? | |
type : | |
this.widgetEventPrefix + type ).toLowerCase(); | |
// the original event may come from any element | |
// so we need to reset the target on the new event | |
event.target = this.element[ 0 ]; | |
// copy original event properties over to the new event | |
orig = event.originalEvent; | |
if ( orig ) { | |
for ( prop in orig ) { | |
if ( !( prop in event ) ) { | |
event[ prop ] = orig[ prop ]; | |
} | |
} | |
} | |
this.element.trigger( event, data ); | |
return !( $.isFunction( callback ) && | |
callback.apply( this.element[0], [ event ].concat( data ) ) === false || | |
event.isDefaultPrevented() ); | |
} | |
}; | |
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { | |
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) { | |
if ( typeof options === "string" ) { | |
options = { effect: options }; | |
} | |
var hasOptions, | |
effectName = !options ? | |
method : | |
options === true || typeof options === "number" ? | |
defaultEffect : | |
options.effect || defaultEffect; | |
options = options || {}; | |
if ( typeof options === "number" ) { | |
options = { duration: options }; | |
} | |
hasOptions = !$.isEmptyObject( options ); | |
options.complete = callback; | |
if ( options.delay ) { | |
element.delay( options.delay ); | |
} | |
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { | |
element[ method ]( options ); | |
} else if ( effectName !== method && element[ effectName ] ) { | |
element[ effectName ]( options.duration, options.easing, callback ); | |
} else { | |
element.queue(function( next ) { | |
$( this )[ method ](); | |
if ( callback ) { | |
callback.call( element[ 0 ] ); | |
} | |
next(); | |
}); | |
} | |
}; | |
}); | |
})( jQuery ); | |
(function( $, undefined ) { | |
$.widget( "mobile.widget", { | |
// decorate the parent _createWidget to trigger `widgetinit` for users | |
// who wish to do post post `widgetcreate` alterations/additions | |
// | |
// TODO create a pull request for jquery ui to trigger this event | |
// in the original _createWidget | |
_createWidget: function() { | |
$.Widget.prototype._createWidget.apply( this, arguments ); | |
this._trigger( 'init' ); | |
}, | |
_getCreateOptions: function() { | |
var elem = this.element, | |
options = {}; | |
$.each( this.options, function( option ) { | |
var value = elem.jqmData( option.replace( /[A-Z]/g, function( c ) { | |
return "-" + c.toLowerCase(); | |
}) | |
); | |
if ( value !== undefined ) { | |
options[ option ] = value; | |
} | |
}); | |
return options; | |
}, | |
enhanceWithin: function( target, useKeepNative ) { | |
this.enhance( $( this.options.initSelector, $( target )), useKeepNative ); | |
}, | |
enhance: function( targets, useKeepNative ) { | |
var page, keepNative, $widgetElements = $( targets ), self = this; | |
// if ignoreContentEnabled is set to true the framework should | |
// only enhance the selected elements when they do NOT have a | |
// parent with the data-namespace-ignore attribute | |
$widgetElements = $.mobile.enhanceable( $widgetElements ); | |
if ( useKeepNative && $widgetElements.length ) { | |
// TODO remove dependency on the page widget for the keepNative. | |
// Currently the keepNative value is defined on the page prototype so | |
// the method is as well | |
page = $.mobile.closestPageData( $widgetElements ); | |
keepNative = ( page && page.keepNativeSelector()) || ""; | |
$widgetElements = $widgetElements.not( keepNative ); | |
} | |
$widgetElements[ this.widgetName ](); | |
}, | |
raise: function( msg ) { | |
throw "Widget [" + this.widgetName + "]: " + msg; | |
} | |
}); | |
})( jQuery ); | |
(function( $, undefined ) { | |
$.widget( "mobile.page", $.mobile.widget, { | |
options: { | |
theme: "c", | |
domCache: false, | |
keepNativeDefault: ":jqmData(role='none'), :jqmData(role='nojs')" | |
}, | |
_create: function() { | |
// if false is returned by the callbacks do not create the page | |
if ( this._trigger( "beforecreate" ) === false ) { | |
return false; | |
} | |
this.element | |
.attr( "tabindex", "0" ) | |
.addClass( "ui-page ui-body-" + this.options.theme ); | |
this._on( this.element, { | |
pagebeforehide: "removeContainerBackground", | |
pagebeforeshow: "_handlePageBeforeShow" | |
}); | |
}, | |
_handlePageBeforeShow: function( e ) { | |
this.setContainerBackground(); | |
}, | |
removeContainerBackground: function() { | |
$.mobile.pageContainer.removeClass( "ui-overlay-" + $.mobile.getInheritedTheme( this.element.parent() ) ); | |
}, | |
// set the page container background to the page theme | |
setContainerBackground: function( theme ) { | |
if ( this.options.theme ) { | |
$.mobile.pageContainer.addClass( "ui-overlay-" + ( theme || this.options.theme ) ); | |
} | |
}, | |
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; | |
} | |
}); | |
})( jQuery ); | |
(function( $, undefined ) { | |
$.mobile.page.prototype.options.degradeInputs = { | |
color: false, | |
date: false, | |
datetime: false, | |
"datetime-local": false, | |
email: false, | |
month: false, | |
number: false, | |
range: "number", | |
search: "text", | |
tel: false, | |
time: false, | |
url: false, | |
week: false | |
}; | |
//auto self-init widgets | |
$.mobile.document.bind( "pagecreate create", function( e ) { | |
var page = $.mobile.closestPageData( $( e.target ) ), options; | |
if ( !page ) { | |
return; | |
} | |
options = page.options; | |
// degrade inputs to avoid poorly implemented native functionality | |
$( e.target ).find( "input" ).not( page.keepNativeSelector() ).each(function() { | |
var $this = $( this ), | |
type = this.getAttribute( "type" ), | |
optType = options.degradeInputs[ type ] || "text"; | |
if ( options.degradeInputs[ type ] ) { | |
var html = $( "<div>" ).html( $this.clone() ).html(), | |
// In IE browsers, the type sometimes doesn't exist in the cloned markup, so we replace the closing tag instead | |
hasType = html.indexOf( " type=" ) > -1, | |
findstr = hasType ? /\s+type=["']?\w+['"]?/ : /\/?>/, | |
repstr = " type=\"" + optType + "\" data-" + $.mobile.ns + "type=\"" + type + "\"" + ( hasType ? "" : ">" ); | |
$this.replaceWith( html.replace( findstr, repstr ) ); | |
} | |
}); | |
}); | |
})( jQuery ); | |
(function( $ ) { | |
var meta = $( "meta[name=viewport]" ), | |
initialContent = meta.attr( "content" ), | |
disabledZoom = initialContent + ",maximum-scale=1, user-scalable=no", | |
enabledZoom = initialContent + ",maximum-scale=10, user-scalable=yes", | |
disabledInitially = /(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test( initialContent ); | |
$.mobile.zoom = $.extend( {}, { | |
enabled: !disabledInitially, | |
locked: false, | |
disable: function( lock ) { | |
if ( !disabledInitially && !$.mobile.zoom.locked ) { | |
meta.attr( "content", disabledZoom ); | |
$.mobile.zoom.enabled = false; | |
$.mobile.zoom.locked = lock || false; | |
} | |
}, | |
enable: function( unlock ) { | |
if ( !disabledInitially && ( !$.mobile.zoom.locked || unlock === true ) ) { | |
meta.attr( "content", enabledZoom ); | |
$.mobile.zoom.enabled = true; | |
$.mobile.zoom.locked = false; | |
} | |
}, | |
restore: function() { | |
if ( !disabledInitially ) { | |
meta.attr( "content", initialContent ); | |
$.mobile.zoom.enabled = true; | |
} | |
} | |
}); | |
}( jQuery )); | |
(function( $, undefined ) { | |
$.mobile.behaviors.formReset = { | |
_handleFormReset: function() { | |
this._on( this.element.closest( "form" ), { | |
reset: function() { | |
this._delay( "_reset" ); | |
} | |
}); | |
} | |
}; | |
})( jQuery ); | |
(function( $, undefined ) { | |
$.widget( "mobile.textinput", $.mobile.widget, { | |
options: { | |
theme: null, | |
mini: false, | |
// This option defaults to true on iOS devices. | |
preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1, | |
initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type]), input[type='file']", | |
clearBtn: false, | |
clearSearchButtonText: null, //deprecating for 1.3... | |
clearBtnText: "clear text", | |
disabled: false | |
}, | |
_create: function() { | |
var self = this, | |
input = this.element, | |
o = this.options, | |
theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ), | |
themeclass = " ui-body-" + theme, | |
miniclass = o.mini ? " ui-mini" : "", | |
isSearch = input.is( "[type='search'], :jqmData(type='search')" ), | |
focusedEl, | |
clearbtn, | |
clearBtnText = o.clearSearchButtonText || o.clearBtnText, | |
clearBtnBlacklist = input.is( "textarea, :jqmData(type='range')" ), | |
inputNeedsClearBtn = !!o.clearBtn && !clearBtnBlacklist, | |
inputNeedsWrap = input.is( "input" ) && !input.is( ":jqmData(type='range')" ); | |
function toggleClear() { | |
setTimeout( function() { | |
clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() ); | |
}, 0 ); | |
} | |
$( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" ); | |
focusedEl = input.addClass( "ui-input-text ui-body-"+ theme ); | |
// XXX: Temporary workaround for issue 785 (Apple bug 8910589). | |
// Turn off autocorrect and autocomplete on non-iOS 5 devices | |
// since the popup they use can't be dismissed by the user. Note | |
// that we test for the presence of the feature by looking for | |
// the autocorrect property on the input element. We currently | |
// have no test for iOS 5 or newer so we're temporarily using | |
// the touchOverflow support flag for jQM 1.0. Yes, I feel dirty. - jblas | |
if ( typeof input[0].autocorrect !== "undefined" && !$.support.touchOverflow ) { | |
// Set the attribute instead of the property just in case there | |
// is code that attempts to make modifications via HTML. | |
input[0].setAttribute( "autocorrect", "off" ); | |
input[0].setAttribute( "autocomplete", "off" ); | |
} | |
//"search" and "text" input widgets | |
if ( isSearch ) { | |
focusedEl = input.wrap( "<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield" + themeclass + miniclass + "'></div>" ).parent(); | |
} else if ( inputNeedsWrap ) { | |
focusedEl = input.wrap( "<div class='ui-input-text ui-shadow-inset ui-corner-all ui-btn-shadow" + themeclass + miniclass + "'></div>" ).parent(); | |
} | |
if( inputNeedsClearBtn || isSearch ) { | |
clearbtn = $( "<a href='#' class='ui-input-clear' title='" + clearBtnText + "'>" + clearBtnText + "</a>" ) | |
.bind( "click", function( event ) { | |
input | |
.val( "" ) | |
.focus() | |
.trigger( "change" ); | |
clearbtn.addClass( "ui-input-clear-hidden" ); | |
event.preventDefault(); | |
}) | |
.appendTo( focusedEl ) | |
.buttonMarkup({ | |
icon: "delete", | |
iconpos: "notext", | |
corners: true, | |
shadow: true, | |
mini: o.mini | |
}); | |
if ( !isSearch ) { | |
focusedEl.addClass( "ui-input-has-clear" ); | |
} | |
toggleClear(); | |
input.bind( "paste cut keyup input focus change blur", toggleClear ); | |
} | |
else if ( !inputNeedsWrap && !isSearch ) { | |
input.addClass( "ui-corner-all ui-shadow-inset" + themeclass + miniclass ); | |
} | |
input.focus(function() { | |
// In many situations, iOS will zoom into the input upon tap, this prevents that from happening | |
if ( o.preventFocusZoom ) { | |
$.mobile.zoom.disable( true ); | |
} | |
focusedEl.addClass( $.mobile.focusClass ); | |
}) | |
.blur(function() { | |
focusedEl.removeClass( $.mobile.focusClass ); | |
if ( o.preventFocusZoom ) { | |
$.mobile.zoom.enable( true ); | |
} | |
}); | |
// Autogrow | |
if ( input.is( "textarea" ) ) { | |
var extraLineHeight = 15, | |
keyupTimeoutBuffer = 100, | |
keyupTimeout; | |
this._keyup = function() { | |
var scrollHeight = input[ 0 ].scrollHeight, | |
clientHeight = input[ 0 ].clientHeight; | |
if ( clientHeight < scrollHeight ) { | |
var paddingTop = parseFloat( input.css( "padding-top" ) ), | |
paddingBottom = parseFloat( input.css( "padding-bottom" ) ), | |
paddingHeight = paddingTop + paddingBottom; | |
input.height( scrollHeight - paddingHeight + extraLineHeight ); | |
} | |
}; | |
input.on( "keyup change input paste", function() { | |
clearTimeout( keyupTimeout ); | |
keyupTimeout = setTimeout( self._keyup, keyupTimeoutBuffer ); | |
}); | |
// binding to pagechange here ensures that for pages loaded via | |
// ajax the height is recalculated without user input | |
this._on( true, $.mobile.document, { "pagechange": "_keyup" }); | |
// Issue 509: the browser is not providing scrollHeight properly until the styles load | |
if ( $.trim( input.val() ) ) { | |
// bind to the window load to make sure the height is calculated based on BOTH | |
// the DOM and CSS | |
this._on( true, $.mobile.window, {"load": "_keyup"}); | |
} | |
} | |
if ( input.attr( "disabled" ) ) { | |
this.disable(); | |
} | |
}, | |
disable: function() { | |
var $el, | |
isSearch = this.element.is( "[type='search'], :jqmData(type='search')" ), | |
inputNeedsWrap = this.element.is( "input" ) && !this.element.is( ":jqmData(type='range')" ), | |
parentNeedsDisabled = this.element.attr( "disabled", true ) && ( inputNeedsWrap || isSearch ); | |
if ( parentNeedsDisabled ) { | |
$el = this.element.parent(); | |
} else { | |
$el = this.element; | |
} | |
$el.addClass( "ui-disabled" ); | |
return this._setOption( "disabled", true ); | |
}, | |
enable: function() { | |
var $el, | |
isSearch = this.element.is( "[type='search'], :jqmData(type='search')" ), | |
inputNeedsWrap = this.element.is( "input" ) && !this.element.is( ":jqmData(type='range')" ), | |
parentNeedsEnabled = this.element.attr( "disabled", false ) && ( inputNeedsWrap || isSearch ); | |
if ( parentNeedsEnabled ) { | |
$el = this.element.parent(); | |
} else { | |
$el = this.element; | |
} | |
$el.removeClass( "ui-disabled" ); | |
return this._setOption( "disabled", false ); | |
} | |
}); | |
//auto self-init widgets | |
$.mobile.document.bind( "pagecreate create", function( e ) { | |
$.mobile.textinput.prototype.enhanceWithin( e.target, true ); | |
}); | |
})( jQuery ); | |
(function( $, undefined ) { | |
$.widget( "mobile.slider", $.mobile.widget, $.extend( { | |
widgetEventPrefix: "slide", | |
options: { | |
theme: null, | |
trackTheme: null, | |
disabled: false, | |
initSelector: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')", | |
mini: false, | |
highlight: false | |
}, | |
_create: function() { | |
// TODO: Each of these should have comments explain what they're for | |
var self = this, | |
control = this.element, | |
parentTheme = $.mobile.getInheritedTheme( control, "c" ), | |
theme = this.options.theme || parentTheme, | |
trackTheme = this.options.trackTheme || parentTheme, | |
cType = control[ 0 ].nodeName.toLowerCase(), | |
isSelect = this.isToggleSwitch = cType === "select", | |
isRangeslider = control.parent().is( ":jqmData(role='rangeslider')" ), | |
selectClass = ( this.isToggleSwitch ) ? "ui-slider-switch" : "", | |
controlID = control.attr( "id" ), | |
$label = $( "[for='" + controlID + "']" ), | |
labelID = $label.attr( "id" ) || controlID + "-label", | |
label = $label.attr( "id", labelID ), | |
min = !this.isToggleSwitch ? parseFloat( control.attr( "min" ) ) : 0, | |
max = !this.isToggleSwitch ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length-1, | |
step = window.parseFloat( control.attr( "step" ) || 1 ), | |
miniClass = ( this.options.mini || control.jqmData( "mini" ) ) ? " ui-mini" : "", | |
domHandle = document.createElement( "a" ), | |
handle = $( domHandle ), | |
domSlider = document.createElement( "div" ), | |
slider = $( domSlider ), | |
valuebg = this.options.highlight && !this.isToggleSwitch ? (function() { | |
var bg = document.createElement( "div" ); | |
bg.className = "ui-slider-bg " + $.mobile.activeBtnClass + " ui-btn-corner-all"; | |
return $( bg ).prependTo( slider ); | |
})() : false, | |
options, | |
wrapper; | |
domHandle.setAttribute( "href", "#" ); | |
domSlider.setAttribute( "role", "application" ); | |
domSlider.className = [this.isToggleSwitch ? "ui-slider " : "ui-slider-track ",selectClass," ui-btn-down-",trackTheme," ui-btn-corner-all", miniClass].join( "" ); | |
domHandle.className = "ui-slider-handle"; | |
domSlider.appendChild( domHandle ); | |
handle.buttonMarkup({ corners: true, theme: theme, shadow: true }) | |
.attr({ | |
"role": "slider", | |
"aria-valuemin": min, | |
"aria-valuemax": max, | |
"aria-valuenow": this._value(), | |
"aria-valuetext": this._value(), | |
"title": this._value(), | |
"aria-labelledby": labelID | |
}); | |
$.extend( this, { | |
slider: slider, | |
handle: handle, | |
type: cType, | |
step: step, | |
max: max, | |
min: min, | |
valuebg: valuebg, | |
isRangeslider: isRangeslider, | |
dragging: false, | |
beforeStart: null, | |
userModified: false, | |
mouseMoved: false | |
}); | |
if ( this.isToggleSwitch ) { | |
wrapper = document.createElement( "div" ); | |
wrapper.className = "ui-slider-inneroffset"; | |
for ( var j = 0, length = domSlider.childNodes.length; j < length; j++ ) { | |
wrapper.appendChild( domSlider.childNodes[j] ); | |
} | |
domSlider.appendChild( wrapper ); | |
// slider.wrapInner( "<div class='ui-slider-inneroffset'></div>" ); | |
// make the handle move with a smooth transition | |
handle.addClass( "ui-slider-handle-snapping" ); | |
options = control.find( "option" ); | |
for ( var i = 0, optionsCount = options.length; i < optionsCount; i++ ) { | |
var side = !i ? "b" : "a", | |
sliderTheme = !i ? " ui-btn-down-" + trackTheme : ( " " + $.mobile.activeBtnClass ), | |
sliderLabel = document.createElement( "div" ), | |
sliderImg = document.createElement( "span" ); | |
sliderImg.className = ["ui-slider-label ui-slider-label-", side, sliderTheme, " ui-btn-corner-all"].join( "" ); | |
sliderImg.setAttribute( "role", "img" ); | |
sliderImg.appendChild( document.createTextNode( options[i].innerHTML ) ); | |
$( sliderImg ).prependTo( slider ); | |
} | |
self._labels = $( ".ui-slider-label", slider ); | |
} | |
label.addClass( "ui-slider" ); | |
// monitor the input for updated values | |
control.addClass( this.isToggleSwitch ? "ui-slider-switch" : "ui-slider-input" ); | |
this._on( control, { | |
"change": "_controlChange", | |
"keyup": "_controlKeyup", | |
"blur": "_controlBlur", | |
"vmouseup": "_controlVMouseUp" | |
}); | |
slider.bind( "vmousedown", $.proxy( this._sliderVMouseDown, this ) ) | |
.bind( "vclick", false ); | |
// We have to instantiate a new function object for the unbind to work properly | |
// since the method itself is defined in the prototype (causing it to unbind everything) | |
this._on( document, { "vmousemove": "_preventDocumentDrag" }); | |
this._on( slider.add( document ), { "vmouseup": "_sliderVMouseUp" }); | |
slider.insertAfter( control ); | |
// wrap in a div for styling purposes | |
if ( !this.isToggleSwitch && !isRangeslider ) { | |
wrapper = this.options.mini ? "<div class='ui-slider ui-mini'>" : "<div class='ui-slider'>"; | |
control.add( slider ).wrapAll( wrapper ); | |
} | |
// Only add focus class to toggle switch, sliders get it automatically from ui-btn | |
if ( this.isToggleSwitch ) { | |
this.handle.bind({ | |
focus: function() { | |
slider.addClass( $.mobile.focusClass ); | |
}, | |
blur: function() { | |
slider.removeClass( $.mobile.focusClass ); | |
} | |
}); | |
} | |
// bind the handle event callbacks and set the context to the widget instance | |
this._on( this.handle, { | |
"vmousedown": "_handleVMouseDown", | |
"keydown": "_handleKeydown", | |
"keyup": "_handleKeyup" | |
}); | |
this.handle.bind( "vclick", false ); | |
this._handleFormReset(); | |
this.refresh( undefined, undefined, true ); | |
}, | |
_controlChange: function( event ) { | |
// if the user dragged the handle, the "change" event was triggered from inside refresh(); don't call refresh() again | |
if ( this._trigger( "controlchange", event ) === false ) { | |
return false; | |
} | |
if ( !this.mouseMoved ) { | |
this.refresh( this._value(), true ); | |
} | |
}, | |
_controlKeyup: function( event ) { // necessary? | |
this.refresh( this._value(), true, true ); | |
}, | |
_controlBlur: function( event ) { | |
this.refresh( this._value(), true ); | |
}, | |
// it appears the clicking the up and down buttons in chrome on | |
// range/number inputs doesn't trigger a change until the field is | |
// blurred. Here we check thif the value has changed and refresh | |
_controlVMouseUp: function( event ) { | |
this._checkedRefresh(); | |
}, | |
// NOTE force focus on handle | |
_handleVMouseDown: function( event ) { | |
this.handle.focus(); | |
}, | |
_handleKeydown: function( event ) { | |
var index = this._value(); | |
if ( this.options.disabled ) { | |
return; | |
} | |
// In all cases prevent the default and mark the handle as active | |
switch ( event.keyCode ) { | |
case $.mobile.keyCode.HOME: | |
case $.mobile.keyCode.END: | |
case $.mobile.keyCode.PAGE_UP: | |
case $.mobile.keyCode.PAGE_DOWN: | |
case $.mobile.keyCode.UP: | |
case $.mobile.keyCode.RIGHT: | |
case $.mobile.keyCode.DOWN: | |
case $.mobile.keyCode.LEFT: | |
event.preventDefault(); | |
if ( !this._keySliding ) { | |
this._keySliding = true; | |
this.handle.addClass( "ui-state-active" ); | |
} | |
break; | |
} | |
// move the slider according to the keypress | |
switch ( event.keyCode ) { | |
case $.mobile.keyCode.HOME: | |
this.refresh( this.min ); | |
break; | |
case $.mobile.keyCode.END: | |
this.refresh( this.max ); | |
break; | |
case $.mobile.keyCode.PAGE_UP: | |
case $.mobile.keyCode.UP: | |
case $.mobile.keyCode.RIGHT: | |
this.refresh( index + this.step ); | |
break; | |
case $.mobile.keyCode.PAGE_DOWN: | |
case $.mobile.keyCode.DOWN: | |
case $.mobile.keyCode.LEFT: | |
this.refresh( index - this.step ); | |
break; | |
} | |
}, // remove active mark | |
_handleKeyup: function( event ) { | |
if ( this._keySliding ) { | |
this._keySliding = false; | |
this.handle.removeClass( "ui-state-active" ); | |
} | |
}, | |
_sliderVMouseDown: function( event ) { | |
// NOTE: we don't do this in refresh because we still want to | |
// support programmatic alteration of disabled inputs | |
if ( this.options.disabled || !( event.which === 1 || event.which === 0 || event.which === undefined ) ) { | |
return false; | |
} | |
if ( this._trigger( "beforestart", event ) === false ) { | |
return false; | |
} | |
this.dragging = true; | |
this.userModified = false; | |
this.mouseMoved = false; | |
if ( this.isToggleSwitch ) { | |
this.beforeStart = this.element[0].selectedIndex; | |
} | |
this.refresh( event ); | |
this._trigger( "start" ); | |
return false; | |
}, | |
_sliderVMouseUp: function() { | |
if ( this.dragging ) { | |
this.dragging = false; | |
if ( this.isToggleSwitch ) { | |
// make the handle move with a smooth transition | |
this.handle.addClass( "ui-slider-handle-snapping" ); | |
if ( this.mouseMoved ) { | |
// this is a drag, change the value only if user dragged enough | |
if ( this.userModified ) { | |
this.refresh( this.beforeStart === 0 ? 1 : 0 ); | |
} else { | |
this.refresh( this.beforeStart ); | |
} | |
} else { | |
// this is just a click, change the value | |
this.refresh( this.beforeStart === 0 ? 1 : 0 ); | |
} | |
} | |
this.mouseMoved = false; | |
this._trigger( "stop" ); | |
return false; | |
} | |
}, | |
_preventDocumentDrag: function( event ) { | |
// NOTE: we don't do this in refresh because we still want to | |
// support programmatic alteration of disabled inputs | |
if ( this._trigger( "drag", event ) === false) { | |
return false; | |
} | |
if ( this.dragging && !this.options.disabled ) { | |
// this.mouseMoved must be updated before refresh() because it will be used in the control "change" event | |
this.mouseMoved = true; | |
if ( this.isToggleSwitch ) { | |
// make the handle move in sync with the mouse | |
this.handle.removeClass( "ui-slider-handle-snapping" ); | |
} | |
this.refresh( event ); | |
// only after refresh() you can calculate this.userModified | |
this.userModified = this.beforeStart !== this.element[0].selectedIndex; | |
return false; | |
} | |
}, | |
_checkedRefresh: function() { | |
if ( this.value !== this._value() ) { | |
this.refresh( this._value() ); | |
} | |
}, | |
_value: function() { | |
return this.isToggleSwitch ? this.element[0].selectedIndex : parseFloat( this.element.val() ) ; | |
}, | |
_reset: function() { | |
this.refresh( undefined, false, true ); | |
}, | |
refresh: function( val, isfromControl, preventInputUpdate ) { | |
// NOTE: we don't return here because we want to support programmatic | |
// alteration of the input value, which should still update the slider | |
var self = this, | |
parentTheme = $.mobile.getInheritedTheme( this.element, "c" ), | |
theme = this.options.theme || parentTheme, | |
trackTheme = this.options.trackTheme || parentTheme, | |
left, width, data, tol; | |
self.slider[0].className = [ this.isToggleSwitch ? "ui-slider ui-slider-switch" : "ui-slider-track"," ui-btn-down-" + trackTheme,' ui-btn-corner-all', ( this.options.mini ) ? " ui-mini":""].join( "" ); | |
if ( this.options.disabled || this.element.attr( "disabled" ) ) { | |
this.disable(); | |
} | |
// set the stored value for comparison later | |
this.value = this._value(); | |
if ( this.options.highlight && !this.isToggleSwitch && this.slider.find( ".ui-slider-bg" ).length === 0 ) { | |
this.valuebg = (function() { | |
var bg = document.createElement( "div" ); | |
bg.className = "ui-slider-bg " + $.mobile.activeBtnClass + " ui-btn-corner-all"; | |
return $( bg ).prependTo( self.slider ); | |
})(); | |
} | |
this.handle.buttonMarkup({ corners: true, theme: theme, shadow: true }); | |
var pxStep, percent, | |
control = this.element, | |
isInput = !this.isToggleSwitch, | |
optionElements = isInput ? [] : control.find( "option" ), | |
min = isInput ? parseFloat( control.attr( "min" ) ) : 0, | |
max = isInput ? parseFloat( control.attr( "max" ) ) : optionElements.length - 1, | |
step = ( isInput && parseFloat( control.attr( "step" ) ) > 0 ) ? parseFloat( control.attr( "step" ) ) : 1; | |
if ( typeof val === "object" ) { | |
data = val; | |
// a slight tolerance helped get to the ends of the slider | |
tol = 8; | |
left = this.slider.offset().left; | |
width = this.slider.width(); | |
pxStep = width/((max-min)/step); | |
if ( !this.dragging || | |
data.pageX < left - tol || | |
data.pageX > left + width + tol ) { | |
return; | |
} | |
if ( pxStep > 1 ) { | |
percent = ( ( data.pageX - left ) / width ) * 100; | |
} else { | |
percent = Math.round( ( ( data.pageX - left ) / width ) * 100 ); | |
} | |
} else { | |
if ( val == null ) { | |
val = isInput ? parseFloat( control.val() || 0 ) : control[0].selectedIndex; | |
} | |
percent = ( parseFloat( val ) - min ) / ( max - min ) * 100; | |
} | |
if ( isNaN( percent ) ) { | |
return; | |
} | |
var newval = ( percent / 100 ) * ( max - min ) + min; | |
//from jQuery UI slider, the following source will round to the nearest step | |
var valModStep = ( newval - min ) % step; | |
var alignValue = newval - valModStep; | |
if ( Math.abs( valModStep ) * 2 >= step ) { | |
alignValue += ( valModStep > 0 ) ? step : ( -step ); | |
} | |
var percentPerStep = 100/((max-min)/step); | |
// Since JavaScript has problems with large floats, round | |
// the final value to 5 digits after the decimal point (see jQueryUI: #4124) | |
newval = parseFloat( alignValue.toFixed(5) ); | |
if ( typeof pxStep === "undefined" ) { | |
pxStep = width / ( (max-min) / step ); | |
} | |
if ( pxStep > 1 && isInput ) { | |
percent = ( newval - min ) * percentPerStep * ( 1 / step ); | |
} | |
if ( percent < 0 ) { | |
percent = 0; | |
} | |
if ( percent > 100 ) { | |
percent = 100; | |
} | |
if ( newval < min ) { | |
newval = min; | |
} | |
if ( newval > max ) { | |
newval = max; | |
} | |
this.handle.css( "left", percent + "%" ); | |
this.handle[0].setAttribute( "aria-valuenow", isInput ? newval : optionElements.eq( newval ).attr( "value" ) ); | |
this.handle[0].setAttribute( "aria-valuetext", isInput ? newval : optionElements.eq( newval ).getEncodedText() ); | |
this.handle[0].setAttribute( "title", isInput ? newval : optionElements.eq( newval ).getEncodedText() ); | |
if ( this.valuebg ) { | |
this.valuebg.css( "width", percent + "%" ); | |
} | |
// drag the label widths | |
if ( this._labels ) { | |
var handlePercent = this.handle.width() / this.slider.width() * 100, | |
aPercent = percent && handlePercent + ( 100 - handlePercent ) * percent / 100, | |
bPercent = percent === 100 ? 0 : Math.min( handlePercent + 100 - aPercent, 100 ); | |
this._labels.each(function() { | |
var ab = $( this ).is( ".ui-slider-label-a" ); | |
$( this ).width( ( ab ? aPercent : bPercent ) + "%" ); | |
}); | |
} | |
if ( !preventInputUpdate ) { | |
var valueChanged = false; | |
// update control"s value | |
if ( isInput ) { | |
valueChanged = control.val() !== newval; | |
control.val( newval ); | |
} else { | |
valueChanged = control[ 0 ].selectedIndex !== newval; | |
control[ 0 ].selectedIndex = newval; | |
} | |
if ( this._trigger( "beforechange", val ) === false) { | |
return false; | |
} | |
if ( !isfromControl && valueChanged ) { | |
control.trigger( "change" ); | |
} | |
} | |
}, | |
enable: function() { | |
this.element.attr( "disabled", false ); | |
this.slider.removeClass( "ui-disabled" ).attr( "aria-disabled", false ); | |
return this._setOption( "disabled", false ); | |
}, | |
disable: function() { | |
this.element.attr( "disabled", true ); | |
this.slider.addClass( "ui-disabled" ).attr( "aria-disabled", true ); | |
return this._setOption( "disabled", true ); | |
} | |
}, $.mobile.behaviors.formReset ) ); | |
//auto self-init widgets | |
$.mobile.document.bind( "pagecreate create", function( e ) { | |
$.mobile.slider.prototype.enhanceWithin( e.target, true ); | |
}); | |
})( jQuery ); | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment