mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Renaming files.
This commit is contained in:
parent
dacb03383f
commit
ae6bfba68f
41 changed files with 0 additions and 10130 deletions
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.ui-btn { display: block; text-align: center; cursor:pointer; position: relative; margin: .5em 5px; padding: 0; }
|
||||
.ui-header .ui-btn, .ui-bar .ui-btn { display: inline-block; font-size: 13px; margin: 0; }
|
||||
.ui-btn-inner { padding: .6em 25px; display: block; height: 100%; }
|
||||
.ui-btn-text { }
|
||||
.ui-header .ui-btn-inner { padding: .4em 8px .5em; }
|
||||
.ui-btn-icon-notext { display: block; width: 20px; height: 20px; padding: 1px 0px 1px 2px; text-indent: -9999px; }
|
||||
.ui-btn-icon-notext .ui-btn-inner { padding: 0; }
|
||||
.ui-btn-icon-notext .ui-btn-text { position: absolute; left: -999px; }
|
||||
.ui-btn-icon-left .ui-btn-inner { padding-left: 30px; }
|
||||
.ui-header .ui-btn-icon-left .ui-btn-inner { padding-left: 27px; }
|
||||
.ui-btn-icon-right .ui-btn-inner { padding-right: 30px; }
|
||||
.ui-header .ui-btn-icon-right .ui-btn-inner { padding-right: 27px; }
|
||||
.ui-btn-icon-top .ui-btn-inner { padding-top: 30px; }
|
||||
.ui-header .ui-btn-icon-top .ui-btn-inner { padding-top: 27px; }
|
||||
.ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 30px; }
|
||||
.ui-header .ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 27px; }
|
||||
|
||||
/*btn icon positioning*/
|
||||
.ui-btn-icon-notext .ui-icon { display: block; }
|
||||
.ui-btn-icon-left .ui-icon, .ui-btn-icon-right .ui-icon { position: absolute; top: 50%; margin-top: -9px; }
|
||||
.ui-btn-icon-top .ui-icon, .ui-btn-icon-bottom .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-header .ui-btn-icon-left .ui-icon { left: 4px; }
|
||||
.ui-header .ui-btn-icon-right .ui-icon { right: 4px; }
|
||||
.ui-btn-icon-top .ui-icon { top: 5px; }
|
||||
.ui-btn-icon-bottom .ui-icon { bottom: 5px; }
|
||||
/*hiding native button,inputs */
|
||||
.ui-btn-hidden { position: absolute; left: -9999px; }
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.ui-collapsible-contain { margin: 0 0 -1px; border-left-width: 0; border-right-width: 0; overflow: hidden; }
|
||||
.ui-collapsible-heading { font-size: 16px; display: block; margin: 0; padding: 0; border-width: 0 0 1px 0; position: relative; }
|
||||
.ui-collapsible-heading a { padding: .7em 15px; text-align: left; margin: 0; text-decoration: none; outline: 0; border: 0; display: block; }
|
||||
.ui-collapsible-heading .ui-icon { position: absolute; right: 5px; top: 50%; margin-top: -9px; }
|
||||
.ui-collapsible-heading-status { position:absolute; left:-99999px; }
|
||||
.ui-collapsible-content { padding: 15px; overflow:hidden; display: block; }
|
||||
.ui-collapsible-content-collapsed { display: none; }
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.ui-controlgroup, fieldset.ui-controlgroup { padding: 0; margin: .5em 0 1em; }
|
||||
.ui-bar .ui-controlgroup { margin: 0 .3em; }
|
||||
.ui-controlgroup-label { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; }
|
||||
.ui-controlgroup-controls { display: block; width: 95%;}
|
||||
.ui-controlgroup li { list-style: none; }
|
||||
.ui-controlgroup-vertical .ui-btn,
|
||||
.ui-controlgroup-vertical div.ui-checkbox, .ui-controlgroup-vertical div.ui-radio { margin: 0; border-bottom-width: 0; }
|
||||
.ui-controlgroup-vertical .ui-controlgroup-last { border-bottom-width: 1px; }
|
||||
.ui-controlgroup-horizontal { padding: 0; }
|
||||
.ui-controlgroup-horizontal .ui-btn,
|
||||
.ui-controlgroup-horizontal div.ui-checkbox, .ui-controlgroup-horizontal div.ui-radio { margin: 0 -5px 0 0; display: inline-block; }
|
||||
.ui-controlgroup-horizontal div.ui-checkbox .ui-btn, .ui-controlgroup-horizontal div.ui-radio .ui-btn,
|
||||
.ui-controlgroup-horizontal div.ui-checkbox:last-child, .ui-controlgroup-horizontal div.ui-radio:last-child { margin-right: 0; }
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-last { margin-right: 0; }
|
||||
.ui-controlgroup .ui-checkbox label, .ui-controlgroup .ui-radio label { font-size: 16px; }
|
||||
|
||||
@media screen and (min-width: 480px){
|
||||
.ui-controlgroup-label { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
|
||||
.ui-controlgroup-controls { width: 60%; display: inline-block; }
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
|
||||
/* some unsets - more probably needed */
|
||||
.ui-mobile fieldset, .ui-page { padding: 0; margin: 0; }
|
||||
.ui-mobile a img, .ui-mobile fieldset { border: 0; }
|
||||
|
||||
/* responsive page widths */
|
||||
.ui-mobile body { margin: 0; overflow-x: hidden; -webkit-user-select: none; -webkit-text-size-adjust: none; min-height: 100%; }
|
||||
/*tablets - more work needed here*/
|
||||
@media screen and (min-width: 480px){
|
||||
.ui-mobile body { width: auto; }
|
||||
}
|
||||
/*tablets - mobile landscape-ish */
|
||||
@media screen and (max-width: 480px){
|
||||
.ui-mobile body { width: 480px; }
|
||||
}
|
||||
/*tablets - mobile portrait-ish */
|
||||
@media screen and (max-width: 320px){
|
||||
.ui-mobile body { width: 320px; }
|
||||
}
|
||||
/*orientations from js are available - necessary? media q's work well enough? */
|
||||
.portrait body { }
|
||||
.landscape body { }
|
||||
|
||||
/* "page" containers - full-screen views, one should always be in view post-pageload */
|
||||
.ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; z-index: 10; visibility: hidden; height: 0; overflow: hidden; border: 0; }
|
||||
.ui-page-active { visibility: visible; overflow: visible; }
|
||||
|
||||
/* loading screen */
|
||||
.ui-loading, .ui-loading body { overflow: hidden !important; }
|
||||
.ui-loading .ui-loader { display: block; }
|
||||
.ui-loader { display: none; position: absolute; opacity: .7; z-index: 10; top: 75px; left: 50%; width: 200px; margin-left: -130px; padding: 20px 30px; }
|
||||
.ui-loader h1 { font-size: 15px; text-align: center; }
|
||||
.ui-loader .ui-icon { position: static; display: block; opacity: .9; margin: 0 auto; width: 35px; height: 35px; background-color: transparent; }
|
||||
|
||||
/*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; }
|
||||
|
||||
/*content area*/
|
||||
.ui-content { border-width: 0; }
|
||||
|
||||
/* icons sizing */
|
||||
.ui-icon { width: 18px; height: 18px; }
|
||||
|
||||
/* fullscreen class on ui-content div */
|
||||
.ui-fullscreen { }
|
||||
.ui-fullscreen img { max-width: 100%; }
|
||||
|
||||
/* non-js content hiding */
|
||||
.ui-nojs { position: absolute; left: -9999px; }
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.ui-dialog .ui-header, .ui-dialog .ui-content, .ui-dialog .ui-footer { margin: 15px; position: relative; }
|
||||
.ui-dialog .ui-header, .ui-dialog .ui-footer { z-index: 10; width: auto; }
|
||||
.ui-dialog .ui-fixed-overlay { margin-top: 0; }
|
||||
.ui-dialog .ui-content, .ui-dialog .ui-footer { margin-top: -15px; }
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
div.ui-checkbox, div.ui-radio { position:relative; margin: .2em 0 .5em; }
|
||||
.ui-checkbox .ui-btn, .ui-radio .ui-btn { margin: 0; text-align: left; }
|
||||
.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner { padding-left: 45px; }
|
||||
.ui-checkbox .ui-btn-icon-right .ui-btn-inner, .ui-radio .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; }
|
||||
.ui-checkbox .ui-btn-icon-left .ui-icon, .ui-radio .ui-btn-icon-left .ui-icon {left: 15px; }
|
||||
.ui-checkbox .ui-btn-icon-right .ui-icon, .ui-radio .ui-btn-icon-right .ui-icon {right: 15px; }
|
||||
/* input, label positioning */
|
||||
.ui-checkbox input,.ui-radio input { position:absolute; left:20px; top:50%; width: 10px; height: 10px; margin:-5px 0 0 0; outline: 0 !important; }
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.ui-field-contain { background: none; padding: 1.5em 0; margin: 0; border-left-width: 0; border-right-width: 0; border-bottom-width: 0; }
|
||||
.ui-field-contain:first-child { border-top-width: 0; }
|
||||
@media screen and (max-width: 480px){
|
||||
.ui-field-contain { border-width: 0; padding: 0; margin: 1em 0; }
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.ui-select { display: block; }
|
||||
.ui-select select { position: absolute; left: -99999px; }
|
||||
.ui-select .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; }
|
||||
.ui-select .ui-btn-icon-right .ui-icon { right: 15px; }
|
||||
/* labels */
|
||||
label.ui-select { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; display: block; }
|
||||
|
||||
/*listbox*/
|
||||
.ui-listbox { position: relative; margin: 8px; padding: 0; z-index: 100; }
|
||||
.ui-page-content-hidden, .ui-listbox-hidden { display: none; }
|
||||
.ui-listbox-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
.ui-listbox-overlay { position: absolute; z-index: 999; width: 300px; margin-left: -150px; }
|
||||
.ui-listbox-header { background: none; border: 0; }
|
||||
.ui-listbox-overlay .ui-listbox-header { display: none; }
|
||||
.ui-listbox-list { list-style: none; margin: 5px; padding: 0; }
|
||||
.ui-listbox .ui-listbox-option { margin: 0; text-align: left; }
|
||||
|
||||
/*used in listbox - to be removed/replaced with page-style hiding*/
|
||||
.ui-helper-hidden,.ui-mobile .ui-content-hidden { display: none; }
|
||||
|
||||
@media screen and (min-width: 480px){
|
||||
label.ui-select { display: inline-block; width: 20%; margin: 0 2% 0 0; }
|
||||
.ui-select { width: 60%; display: inline-block; }
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
label.ui-slider { display: block; }
|
||||
input.ui-slider-input { display: inline-block; width: 40px; }
|
||||
select.ui-slider-switch { display: none; }
|
||||
div.ui-slider { position: relative; display: inline-block; overflow: visible; height: 15px; padding: 0; margin: 0 2% 0 15px; top: 4px; width: 66%; }
|
||||
a.ui-slider-handle { position: absolute; z-index: 10; top: 50%; width: 28px; height: 28px; margin-top: -15px; margin-left: -15px; }
|
||||
|
||||
@media screen and (min-width: 480px){
|
||||
label.ui-slider { display: inline-block; width: 20%; margin: 0 2% 0 0; }
|
||||
div.ui-slider { width: 45%; }
|
||||
}
|
||||
|
||||
div.ui-slider-switch { height: 32px; overflow: hidden; margin-left: 0; }
|
||||
div.ui-slider-inneroffset { margin-left: 50%; position: absolute; top: 1px; height: 100%; width: 50%; }
|
||||
div.ui-slider-handle-snapping { -webkit-transition: left 100ms linear; }
|
||||
div.ui-slider-labelbg { position: absolute; top:0; margin: 0; border-width: 0; }
|
||||
div.ui-slider-switch div.ui-slider-labelbg-a { width: 60%; height: 100%; left: 0; }
|
||||
div.ui-slider-switch div.ui-slider-labelbg-b { width: 60%; height: 100%; right: 0; }
|
||||
.ui-slider-switch-a div.ui-slider-labelbg-a, .ui-slider-switch-b div.ui-slider-labelbg-b { z-index: 1; }
|
||||
.ui-slider-switch-a div.ui-slider-labelbg-b, .ui-slider-switch-b div.ui-slider-labelbg-a { z-index: 10; }
|
||||
|
||||
div.ui-slider-switch a.ui-slider-handle { z-index: 20; width: 101%; height: 32px; margin-top: -18px; margin-left: -101%; }
|
||||
span.ui-slider-label { width: 100%; position: absolute;height: 32px; font-size: 16px; text-align: center; line-height: 2; background: none; border-color: transparent; }
|
||||
span.ui-slider-label-a { left: -100%; margin-right: -1px }
|
||||
span.ui-slider-label-b { right: -100%; margin-left: -1px }
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
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 { padding: .4em; line-height: 1.4; font-size: 16px; display: block; width: 95%; }
|
||||
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; }
|
||||
.ui-input-search { margin: 5px; padding: 0 30px; background-position: 8px 50%; background-repeat: no-repeat; position: relative; }
|
||||
.ui-input-search input.ui-input-text { border: none; width: 98%; padding: .4em 0; margin: 0; display: block; background: transparent none; outline: 0 !important; }
|
||||
.ui-input-search .ui-input-clear { position: absolute; right: 2px; top: 50%; margin-top: -12px; }
|
||||
.ui-input-search .ui-input-clear-hidden { display: none; }
|
||||
|
||||
/* orientation adjustments - incomplete!*/
|
||||
@media screen and (min-width: 480px){
|
||||
label.ui-input-text { vertical-align: top; }
|
||||
label.ui-input-text, label.ui-select { display: inline-block; width: 20%; margin: 0 2% 0 0; }
|
||||
input.ui-input-text, textarea.ui-input-text { width: 60%; display: inline-block; }
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
/* content configurations. */
|
||||
.ui-grid-a, .ui-grid-b, .ui-grid-c { overflow: hidden; }
|
||||
.ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d { margin: 0; padding: 0; border: 0; float: left; }
|
||||
/* grid a: 50/50 */
|
||||
.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 50%; }
|
||||
.ui-grid-a .ui-block-a { clear: left; }
|
||||
/* grid b: 33/33/33 */
|
||||
.ui-grid-b .ui-block-a, .ui-grid-b .ui-block-b, .ui-grid-b .ui-block-c { width: 33.333%; }
|
||||
.ui-grid-b .ui-block-a { clear: left; }
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
/* page header & footer configuration */
|
||||
.ui-page .ui-header, .ui-page .ui-footer { position: relative; }
|
||||
.ui-header, .ui-footer, .ui-page-fullscreen .ui-header, .ui-page-fullscreen .ui-footer { position: absolute; z-index: 1000; overflow: hidden; width: 100%; border-left-width: 0; border-right-width: 0; }
|
||||
.ui-footer-duplicate, .ui-page-fullscreen .ui-fixed-inline { display: none; }
|
||||
.ui-header .ui-back { position: absolute; left: 10px; top: .4em; }
|
||||
.ui-header h1, .ui-footer h1 { text-align: center; font-size: 16px; display: block; margin: .6em 90px .8em; padding: 0; white-space: nowrap; overflow: hidden; }
|
||||
.ui-header .ui-aux { position: absolute; right: 10px; top: .4em; }
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.ui-listview { margin: 0; counter-reset: listnumbering; }
|
||||
.ui-listview-inset { margin: 1em 15px; }
|
||||
.ui-listview, .ui-li { list-style:none; padding:0; zoom: 1; }
|
||||
.ui-li { display: block; margin:0; position: relative; overflow: hidden; text-align: left; border-width: 0; border-top-width: 1px; }
|
||||
.ui-li-grouping { padding: .5em 15px; font-size: 13px; font-weight: bold; counter-reset: listnumbering; }
|
||||
ol.ui-listview .ui-link-inherit:before, .ui-li-dec { font-size: .8em; display: inline-block; padding-right: .3em; font-weight: normal;counter-increment: listnumbering; content: counter(listnumbering) ". "; }
|
||||
ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid chance of duplication */
|
||||
.ui-listview-inset .ui-li { border-right-width: 1px; border-left-width: 1px; }
|
||||
.ui-li:last-child { border-bottom-width: 1px; }
|
||||
.ui-li .ui-btn-inner { display: block; position: relative; padding: .5em 65px .5em 15px; }
|
||||
.ui-li-has-thumb { min-height: 70px; }
|
||||
.ui-li-has-thumb .ui-btn-inner { padding-left: 100px; }
|
||||
.ui-li-heading { font-size: 16px; font-weight: bold; display: block; margin: .6em 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
|
||||
.ui-li-desc { font-size: 12px; font-weight: normal; display: block; margin: -.5em 0 .6em; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
|
||||
.ui-li-thumb { position: absolute; left: 1px; top: 0; max-height: 80px; max-width: 80px; }
|
||||
.ui-li-thumb, .ui-li-content { float: left; margin-right: 10px; }
|
||||
.ui-li-aside { float: right; width: 25%; text-align: right; margin: .3em 0; }
|
||||
.ui-li-count { position: absolute; font-size: 11px; font-weight: bold; padding: .2em .5em; top: 50%; margin-top: -.9em; right: 38px; }
|
||||
.ui-li-link-alt { position: absolute; width: 30px; height: 100%; border-width: 0; border-left-width: 1px; top: 0; right: 0; }
|
||||
.ui-li-link-alt .ui-btn { overflow: hidden; position: absolute; right: 5px; top: 50%; margin-top: -11px; border-bottom-width: 1px; }
|
||||
.ui-li-link-alt .ui-btn-inner { padding: 0; position: static; }
|
||||
.ui-li-link-alt .ui-btn .ui-icon { right: 50%; margin-right: -9px; }
|
||||
|
||||
.ui-listview-filter { border-width: 0; overflow: hidden; }
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.ui-navlist { overflow: hidden; }
|
||||
.ui-navlist ul, .ui-navlist-expanded ul { list-style:none; padding: 0; margin: 0; position: relative; display: block; border: 0;}
|
||||
.ui-navlist-collapsed ul { float: left; width: 75%; margin-right: -2px; }
|
||||
.ui-navlist-collapsed .ui-navlist-toggle { float: left; width: 25%; }
|
||||
.ui-navlist li.ui-navlist-truncate { position: absolute; left: -99999px; top: -99999px; }
|
||||
.ui-navlist li .ui-btn, .ui-navlist .ui-navlist-toggle .ui-btn { display: block; font-size: 12px; text-align: center; margin: 0; outline: none; border-right-width: 0; }
|
||||
.ui-navlist li .ui-btn { margin-right: -1px; }
|
||||
.ui-navlist li .ui-btn:last-child { margin-right: 0; }
|
||||
.ui-header .ui-navlist li .ui-btn, .ui-header .ui-navlist .ui-navlist-toggle .ui-btn,
|
||||
.ui-footer .ui-navlist li .ui-btn, .ui-footer .ui-navlist .ui-navlist-toggle .ui-btn { border-top-width: 0; border-bottom-width: 0; }
|
||||
.ui-navlist .ui-btn-inner { padding-left: 2px; padding-right: 2px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
|
||||
.ui-navlist-noicons li .ui-btn .ui-btn-inner, .ui-navlist-noicons .ui-navlist-toggle .ui-btn-inner { padding-top: .8em; padding-bottom: .9em; }
|
||||
/*expanded page styles*/
|
||||
.ui-navlist-expanded .ui-btn { margin: 0; font-size: 14px; }
|
||||
.ui-navlist-expanded .ui-btn-inner { padding-left: 5px; padding-right: 5px; }
|
||||
.ui-navlist-expanded .ui-btn-icon-top .ui-btn-inner { padding: 45px 5px 15px; text-align: center; }
|
||||
.ui-navlist-expanded .ui-btn-icon-top .ui-icon { top: 15px; }
|
||||
.ui-navlist-expanded .ui-btn-icon-bottom .ui-btn-inner { padding: 15px 5px 45px; text-align: center; }
|
||||
.ui-navlist-expanded .ui-btn-icon-bottom .ui-icon { bottom: 15px; }
|
||||
.ui-navlist-expanded li .ui-btn .ui-btn-inner { min-height: 2.5em; }
|
||||
.ui-navlist-expanded .ui-navlist-noicons .ui-btn .ui-btn-inner { padding-top: 1.8em; padding-bottom: 1.9em; }
|
||||
|
|
@ -1,176 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* themed containers
|
||||
----------------------------------*/
|
||||
.ui-bar-a { border: 1px solid #2A2A2A; background: #111111; color: #fff; font-weight: bold; text-shadow: 0 -1px 1px #000; background-image: -moz-linear-gradient(top, #3c3c3c, #111111); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #3c3c3c),color-stop(1, #111111)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#3c3c3c', EndColorStr='#111111')"; }
|
||||
.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; }
|
||||
.ui-bar-a .ui-link-inherit { color: #fff; }
|
||||
.ui-bar-a .ui-link { color: #7cc4e7; font-weight: bold; }
|
||||
|
||||
.ui-body-a { border: 1px solid #2A2A2A; background: #333; color: #fff; text-shadow: 0 1px 0 #000; font-weight: normal; background-image: -moz-linear-gradient(top, #666666, #333333); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #333333),color-stop(1, #(top, #666666, #333333))); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#666666', EndColorStr='#333333)')"; }
|
||||
.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; }
|
||||
.ui-body-a .ui-link-inherit { color: #fff; }
|
||||
.ui-body-a .ui-link { color: #2489CE; font-weight: bold; }
|
||||
|
||||
|
||||
.ui-bar-b { border: 1px solid #052331; background: #1a4068; color: #fff; font-weight: bold; text-shadow: 0 -1px 1px #000; background-image: -moz-linear-gradient(top, #274b71, #21466c); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #274b71),color-stop(1, #21466c)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#274b71', EndColorStr='#21466c')"; }
|
||||
.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; }
|
||||
.ui-bar-b .ui-link-inherit { color: #fff; }
|
||||
.ui-bar-b .ui-link { color: #7cc4e7; font-weight: bold; }
|
||||
|
||||
.ui-body-b { border: 1px solid #C6C6C6; background: #e6e7e8; color: #333333; text-shadow: 0 1px 0 #fff; font-weight: normal; background-image: -moz-linear-gradient(top, #d4d5d5, #c6c7c8); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #d4d5d5),color-stop(1, #c6c7c8)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#d4d5d5', EndColorStr='#c6c7c8')"; }
|
||||
.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; }
|
||||
.ui-body-b .ui-link-inherit { color: #333333; }
|
||||
.ui-body-b .ui-link { color: #2489CE; font-weight: bold; }
|
||||
|
||||
|
||||
.ui-bar-c { border: 1px solid #B3B3B3; background: #dfe0e1; color: #3E3E3E; font-weight: bold; text-shadow: 0 1px 1px #fff; background-image: -moz-linear-gradient(top, #f2f2f2, #e9eaeb); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f2f2f2),color-stop(1, #e9eaeb)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#f2f2f2', EndColorStr='#e9eaeb')"; }
|
||||
.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; }
|
||||
|
||||
.ui-body-c { border: 1px solid #B3B3B3; background: #fff; color: #333333; text-shadow: 0 1px 0 #fff; }
|
||||
.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; }
|
||||
.ui-body-c .ui-link-inherit { color: #333333; }
|
||||
.ui-body-c .ui-link { color: #2489CE; font-weight: bold; }
|
||||
|
||||
|
||||
.ui-bar-d { border: 1px solid #F7C942; background: #fadb4e; color: #333; text-shadow: 0 1px 0 #fff; background-image: -moz-linear-gradient(top, #fceda7, #fadb4e); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #fceda7),color-stop(1, #fadb4e)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fceda7', EndColorStr='#fadb4e')"; }
|
||||
.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; }
|
||||
.ui-bar-d .ui-link-inherit { color: #333; }
|
||||
.ui-bar-d .ui-link { color: #2489CE; font-weight: bold; }
|
||||
|
||||
|
||||
/* interaction states */
|
||||
|
||||
.ui-btn-up-a { border: 1px solid #000; background: #333333; font-weight: bold; color: #fff; cursor: pointer; text-shadow: 0 1px 1px #000; text-decoration: none; background-image: -moz-linear-gradient(top, #555555, #333333); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #555555),color-stop(1, #333333)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#555555', EndColorStr='#333333')"; }
|
||||
.ui-btn-hover-a { border: 1px solid #000; background: #646464; font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #000; text-decoration: none; background-image: -moz-linear-gradient(top, #848484, #646464); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #848484),color-stop(1, #646464)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#848484', EndColorStr='#646464')"; }
|
||||
.ui-btn-down-a { border: 1px solid #000; background: #3d3d3d; font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #000; background-image: -moz-linear-gradient(top, #333333, #5a5a5a); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #333333),color-stop(1, #5a5a5a)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#333333', EndColorStr='#5a5a5a')"; }
|
||||
|
||||
.ui-btn-up-b { border: 1px solid #145072; background: #387bbe; font-weight: bold; color: #fff; cursor: pointer; text-shadow: 0 -1px 1px #145072; text-decoration: none; background-image: -moz-linear-gradient(top, #4e89c5, #2567ab); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #4e89c5),color-stop(1, #2567ab)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#4e89c5', EndColorStr='#2567ab')"; }
|
||||
.ui-btn-hover-b { border: 1px solid #014D68; background: #5397d5; font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #014D68; background-image: -moz-linear-gradient(top, #81b2e0, #397cbe); text-decoration: none; background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #81b2e0),color-stop(1, #397cbe)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#81b2e0', EndColorStr='#397cbe')"; }
|
||||
.ui-btn-down-b { border: 1px solid #225377; background: #3577bb; font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #225377; background-image: -moz-linear-gradient(top, #3577db, #6b9bcd); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #3577db),color-stop(1, #6b9bcd)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#3577db', EndColorStr='#6b9bcd')"; }
|
||||
|
||||
.ui-btn-up-c { border: 1px solid #B3B3B3; background: #d0d4d2; font-weight: bold; color: #2F3E46; cursor: pointer; text-shadow: 0 -1px 1px #fff; text-decoration: none; background-image: -moz-linear-gradient(top, #e9ebea, #d0d4d2); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #e9ebea),color-stop(1, #d0d4d2)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#e9ebea', EndColorStr='#d0d4d2')"; }
|
||||
.ui-btn-hover-c { border: 1px solid #808080; background: #fff; font-weight: bold; color: #2F3E46; text-decoration: none; text-shadow: 0 -1px 1px #fff; background-image: -moz-linear-gradient(top, #fdfdfd, #f0f0f0); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #fdfdfd),color-stop(1, #f0f0f0)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd', EndColorStr='#f0f0f0')"; }
|
||||
.ui-btn-down-c { border: 1px solid #808080; background: #ced0d2; font-weight: bold; color: #2F3E46; text-shadow: none; background-image: -moz-linear-gradient(top, #ced0d2, #e5e6e7); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #ced0d2),color-stop(1, #e5e6e7)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ced0d2', EndColorStr='#e5e6e7')"; }
|
||||
|
||||
.ui-btn-up-d { border: 1px solid #F7C942; background: #fadb4e; font-weight: bold; color: #333; cursor: pointer; text-shadow: 0 -1px 1px #fff; text-decoration: none; text-shadow: 0 1px 0 #fff; background-image: -moz-linear-gradient(top, #fceda7, #fadb4e); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #fceda7),color-stop(1, #fadb4e)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fceda7', EndColorStr='#fadb4e')"; }
|
||||
.ui-btn-hover-d { border: 1px solid #F7C942; background: #fadb4e; font-weight: bold; color: #333; text-decoration: none; text-shadow: 0 -1px 1px #fff; background-image: -moz-linear-gradient(top, #fcfdb7, #fafb5e); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #fcfdb7),color-stop(1, #fafb5e)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fcfdb7', EndColorStr='#fafb5e')"; }
|
||||
.ui-btn-down-d { border: 1px solid #F7C942; background: #fadb4e; font-weight: bold; color: #333; text-shadow: none; background-image: -moz-linear-gradient(top, #fadb4e, #fceda7); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #fadb4e),color-stop(1, #fceda7)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fadb4e', EndColorStr='#fceda7')"; }
|
||||
|
||||
|
||||
/*lists*/
|
||||
.ui-btn-up-e { border: 1px solid #000; background: #333333; font-weight: bold; color: #fff; cursor: pointer; text-shadow: 0 1px 1px #000; text-decoration: none; background-image: -moz-linear-gradient(top, #555555, #333333); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #555555),color-stop(1, #333333)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#555555', EndColorStr='#333333')"; }
|
||||
.ui-btn-up-e a.ui-link-inherit { color: #fff; }
|
||||
.ui-btn-hover-e { border: 1px solid #000; background: #646464; font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #000; text-decoration: none; background-image: -moz-linear-gradient(top, #848484, #646464); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #848484),color-stop(1, #646464)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#848484', EndColorStr='#646464')"; }
|
||||
.ui-btn-hover-e a.ui-link-inherit { color: #fff; }
|
||||
.ui-btn-down-e { border: 1px solid #000; background: #3d3d3d; font-weight: bold; color: #fff; text-shadow: 0 -1px 1px #000; background-image: -moz-linear-gradient(top, #333333, #5a5a5a); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #333333),color-stop(1, #5a5a5a)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#333333', EndColorStr='#5a5a5a')"; }
|
||||
.ui-btn-down-e a.ui-link-inherit { color: #fff; }
|
||||
.ui-btn-up-e, .ui-btn-hover-e, .ui-btn-down-e { font-family: Helvetica, Arial, sans-serif; }
|
||||
|
||||
.ui-btn-up-f { border: 1px solid #ccc; background: #fff; font-weight: bold; color: #2F3E46; text-decoration: none; text-shadow: 0 -1px 1px #fff; background-image: -moz-linear-gradient(top, #fdfdfd, #f0f0f0); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #fdfdfd),color-stop(1, #f0f0f0)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#fdfdfd', EndColorStr='#f0f0f0')"; }
|
||||
.ui-btn-up-f a.ui-link-inherit { color: #2F3E46; }
|
||||
.ui-btn-hover-f { border: 1px solid #B3B3B3; background: #d0d4d2; font-weight: bold; color: #2F3E46; cursor: pointer; text-shadow: 0 -1px 1px #fff; text-decoration: none; background-image: -moz-linear-gradient(top, #e9ebea, #d0d4d2); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #e9ebea),color-stop(1, #d0d4d2)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#e9ebea', EndColorStr='#d0d4d2')"; }
|
||||
.ui-btn-hover-f a.ui-link-inherit { color: #2F3E46; }
|
||||
.ui-btn-down-f { border: 1px solid #808080; background: #ced0d2; font-weight: bold; color: #2F3E46; text-shadow: none; background-image: -moz-linear-gradient(top, #ced0d2, #e5e6e7); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #ced0d2),color-stop(1, #e5e6e7)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ced0d2', EndColorStr='#e5e6e7')"; }
|
||||
.ui-btn-down-f a.ui-link-inherit { color: #2F3E46; }
|
||||
.ui-btn-up-f, .ui-btn-hover-f, .ui-btn-down-f { font-family: Helvetica, Arial, sans-serif; }
|
||||
|
||||
|
||||
a.ui-link-inherit { text-decoration: none !important; }
|
||||
|
||||
.ui-btn-active { border: 1px solid #145072; background: #387bbe; font-weight: bold; color: #fff; cursor: pointer; text-shadow: 0 -1px 1px #145072; text-decoration: none; background-image: -moz-linear-gradient(top, #4e89c5, #2567ab); background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #4e89c5),color-stop(1, #2567ab)); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#4e89c5', EndColorStr='#2567ab')"; /*-webkit-tap-highlight-color: #387bbe;*/ }
|
||||
.ui-btn-active a.ui-link-inherit { color: #fff; }
|
||||
|
||||
.ui-focus { outline: none; -moz-box-shadow: 0px 0px 12px #387bbe; -webkit-box-shadow: 0px 0px 12px #387bbe; box-shadow: 0px 0px 12px #387bbe; }
|
||||
|
||||
.ui-btn-inner { border-top: 1px solid #fff; border-color: rgba(255,255,255,.3); }
|
||||
|
||||
|
||||
|
||||
|
||||
/* Container Corner radius */
|
||||
.ui-corner-tl { -moz-border-radius-topleft: .6em; -webkit-border-top-left-radius: .6em; border-top-left-radius: .6em; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: .6em; -webkit-border-top-right-radius: .6em; border-top-right-radius: .6em; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: .6em; -webkit-border-bottom-left-radius: .6em; border-bottom-left-radius: .6em; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: .6em; -webkit-border-bottom-right-radius: .6em; border-bottom-right-radius: .6em; }
|
||||
.ui-corner-top { -moz-border-radius-topleft: .6em; -webkit-border-top-left-radius: .6em; border-top-left-radius: .6em; -moz-border-radius-topright: .6em; -webkit-border-top-right-radius: .6em; border-top-right-radius: .6em; }
|
||||
.ui-corner-bottom { -moz-border-radius-bottomleft: .6em; -webkit-border-bottom-left-radius: .6em; border-bottom-left-radius: .6em; -moz-border-radius-bottomright: .6em; -webkit-border-bottom-right-radius: .6em; border-bottom-right-radius: .6em; }
|
||||
.ui-corner-right { -moz-border-radius-topright: .6em; -webkit-border-top-right-radius: .6em; border-top-right-radius: .6em; -moz-border-radius-bottomright: .6em; -webkit-border-bottom-right-radius: .6em; border-bottom-right-radius: .6em; }
|
||||
.ui-corner-left { -moz-border-radius-topleft: .6em; -webkit-border-top-left-radius: .6em; border-top-left-radius: .6em; -moz-border-radius-bottomleft: .6em; -webkit-border-bottom-left-radius: .6em; border-bottom-left-radius: .6em; }
|
||||
.ui-corner-all { -moz-border-radius: .6em; -webkit-border-radius: .6em; border-radius: .6em; }
|
||||
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; opacity: .3; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
.ui-icon { background-position: 50% 50%; background-repeat: no-repeat; background-color: #fff; background-color: rgba(0,0,0,.4); -moz-border-radius: 9px; -webkit-border-radius: 9px; border-radius: 9px; }
|
||||
/*icons with no bg needed*/
|
||||
.ui-icon-checkbox-off,
|
||||
.ui-icon-checkbox-on,
|
||||
.ui-icon-radio-off,
|
||||
.ui-icon-radio-on { background-color: transparent; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
|
||||
|
||||
/*arrows*/
|
||||
.ui-icon-arrow-u { background-image: url(../images/icon-arrow-white-up.png); }
|
||||
.ui-icon-arrow-r { background-image: url(../images/icon-arrow-white-right.png); }
|
||||
.ui-icon-arrow-d { background-image: url(../images/icon-arrow-white-down.png); }
|
||||
.ui-icon-arrow-l { background-image: url(../images/icon-arrow-white-left.png); }
|
||||
|
||||
/*plus minus*/
|
||||
.ui-icon-plus { background-image: url(../images/icon-plus-white.png); }
|
||||
.ui-icon-minus { background-image: url(../images/icon-minus-white.png); }
|
||||
|
||||
/* delete/close */
|
||||
.ui-icon-delete { background-image: url(../images/icon-delete.png); }
|
||||
|
||||
/*checks,radios*/
|
||||
.ui-icon-checkbox-off { background-image: url(../images/form-check-off.png); }
|
||||
.ui-icon-checkbox-on { background-image: url(../images/form-check-on.png); }
|
||||
.ui-icon-radio-off { background-image: url(../images/form-radio-off.png); }
|
||||
.ui-icon-radio-on { background-image: url(../images/form-radio-on.png); }
|
||||
|
||||
.ui-icon-search { background-image: url(../images/icon-search-black.png); }
|
||||
|
||||
/* loading icon */
|
||||
.ui-icon-loading { background-image: url(../images/ajax-loader.png); width: 40px; height: 40px; -moz-border-radius: 20px; -webkit-border-radius: 20px; border-radius: 20px; }
|
||||
|
||||
/* btn Corner radius */
|
||||
.ui-btn-corner-tl { -moz-border-radius-topleft: 1em; -webkit-border-top-left-radius: 1em; border-top-left-radius: 1em; }
|
||||
.ui-btn-corner-tr { -moz-border-radius-topright: 1em; -webkit-border-top-right-radius: 1em; border-top-right-radius: 1em; }
|
||||
.ui-btn-corner-bl { -moz-border-radius-bottomleft: 1em; -webkit-border-bottom-left-radius: 1em; border-bottom-left-radius: 1em; }
|
||||
.ui-btn-corner-br { -moz-border-radius-bottomright: 1em; -webkit-border-bottom-right-radius: 1em; border-bottom-right-radius: 1em; }
|
||||
.ui-btn-corner-top { -moz-border-radius-topleft: 1em; -webkit-border-top-left-radius: 1em; border-top-left-radius: 1em; -moz-border-radius-topright: 1em; -webkit-border-top-right-radius: 1em; border-top-right-radius: 1em; }
|
||||
.ui-btn-corner-bottom { -moz-border-radius-bottomleft: 1em; -webkit-border-bottom-left-radius: 1em; border-bottom-left-radius: 1em; -moz-border-radius-bottomright: 1em; -webkit-border-bottom-right-radius: 1em; border-bottom-right-radius: 1em; }
|
||||
.ui-btn-corner-right { -moz-border-radius-topright: 1em; -webkit-border-top-right-radius: 1em; border-top-right-radius: 1em; -moz-border-radius-bottomright: 1em; -webkit-border-bottom-right-radius: 1em; border-bottom-right-radius: 1em; }
|
||||
.ui-btn-corner-left { -moz-border-radius-topleft: 1em; -webkit-border-top-left-radius: 1em; border-top-left-radius: 1em; -moz-border-radius-bottomleft: 1em; -webkit-border-bottom-left-radius: 1em; border-bottom-left-radius: 1em; }
|
||||
.ui-btn-corner-all { -moz-border-radius: 1em; -webkit-border-radius: 1em; border-radius: 1em;}
|
||||
|
||||
.ui-corner-tl, .ui-corner-tr, .ui-corner-bl,
|
||||
.ui-corner-br, .ui-corner-top, .ui-corner-bottom,
|
||||
.ui-corner-right, .ui-corner-left, .ui-corner-all,
|
||||
.ui-btn-corner-tl, .ui-btn-corner-tr, .ui-btn-corner-bl,
|
||||
.ui-btn-corner-br, .ui-btn-corner-top, .ui-btn-corner-bottom,
|
||||
.ui-btn-corner-right, .ui-btn-corner-left, .ui-btn-corner-all {
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
/* Overlays */
|
||||
.ui-overlay { background: #666; opacity: .5; filter:Alpha(Opacity=50); position: absolute; width: 100%; height: 100%; }
|
||||
.ui-overlay-shadow { -moz-box-shadow: 0px 0px 12px rgba(0,0,0,.6); -webkit-box-shadow: 0px 0px 12px rgba(0,0,0,.6); box-shadow: 0px 0px 12px rgba(0,0,0,.6); }
|
||||
|
||||
.ui-shadow { -moz-box-shadow: 0px 1px 4px rgba(0,0,0,.3); -webkit-box-shadow: 0px 1px 4px rgba(0,0,0,.3); box-shadow: 0px 1px 4px rgba(0,0,0,.3); }
|
||||
.ui-bar-a .ui-shadow, .ui-bar-b .ui-shadow , .ui-bar-c .ui-shadow { -moz-box-shadow: 0px 1px 0 rgba(255,255,255,.3); -webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.3); box-shadow: 0px 1px 0 rgba(255,255,255,.3); }
|
||||
.ui-icon-shadow { -moz-box-shadow: 0px 1px 0 rgba(255,255,255,.4); -webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.4); box-shadow: 0px 1px 0 rgba(255,255,255,.4); }
|
||||
|
|
@ -1,226 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
.spin {
|
||||
-webkit-animation-name: spin;
|
||||
-webkit-animation-duration: 1s;
|
||||
-webkit-animation-iteration-count: infinite;
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
from {-webkit-transform: rotate(0deg);}
|
||||
to {-webkit-transform: rotate(360deg);}
|
||||
}
|
||||
|
||||
/*
|
||||
-- transitions from jQtouch - to be modified, renamed, removed, where needed
|
||||
*/
|
||||
.in, .out {
|
||||
-webkit-animation-timing-function: ease-in-out;
|
||||
-webkit-animation-duration: 350ms;
|
||||
}
|
||||
|
||||
.slide.in {
|
||||
-webkit-animation-name: slideinfromright;
|
||||
}
|
||||
|
||||
.slide.out {
|
||||
-webkit-animation-name: slideouttoleft;
|
||||
}
|
||||
|
||||
.slide.in.reverse {
|
||||
-webkit-animation-name: slideinfromleft;
|
||||
}
|
||||
|
||||
.slide.out.reverse {
|
||||
-webkit-animation-name: slideouttoright;
|
||||
}
|
||||
|
||||
.slideup.in {
|
||||
-webkit-animation-name: slideinfrombottom;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.slideup.out {
|
||||
-webkit-animation-name: dontmove;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.slideup.out.reverse {
|
||||
z-index: 10;
|
||||
-webkit-animation-name: slideouttobottom;
|
||||
}
|
||||
|
||||
.slideup.in.reverse {
|
||||
z-index: 0;
|
||||
-webkit-animation-name: dontmove;
|
||||
}
|
||||
.slidedown.in {
|
||||
-webkit-animation-name: slideinfromtop;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.slidedown.out {
|
||||
-webkit-animation-name: dontmove;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.slidedown.out.reverse {
|
||||
z-index: 10;
|
||||
-webkit-animation-name: slideouttotop;
|
||||
}
|
||||
|
||||
.slidedown.in.reverse {
|
||||
z-index: 0;
|
||||
-webkit-animation-name: dontmove;
|
||||
}
|
||||
|
||||
@-webkit-keyframes slideinfromright {
|
||||
from { -webkit-transform: translateX(100%); }
|
||||
to { -webkit-transform: translateX(0); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes slideinfromleft {
|
||||
from { -webkit-transform: translateX(-100%); }
|
||||
to { -webkit-transform: translateX(0); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes slideouttoleft {
|
||||
from { -webkit-transform: translateX(0); }
|
||||
to { -webkit-transform: translateX(-100%); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes slideouttoright {
|
||||
from { -webkit-transform: translateX(0); }
|
||||
to { -webkit-transform: translateX(100%); }
|
||||
}
|
||||
|
||||
|
||||
@-webkit-keyframes slideinfromtop {
|
||||
from { -webkit-transform: translateY(-100%); }
|
||||
to { -webkit-transform: translateY(0); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes slideinfrombottom {
|
||||
from { -webkit-transform: translateY(100%); }
|
||||
to { -webkit-transform: translateY(0); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes slideouttobottom {
|
||||
from { -webkit-transform: translateY(0); }
|
||||
to { -webkit-transform: translateY(100%); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes slideouttotop {
|
||||
from { -webkit-transform: translateY(0); }
|
||||
to { -webkit-transform: translateY(-100%); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadein {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeout {
|
||||
from { opacity: 1; }
|
||||
to { opacity: 0; }
|
||||
}
|
||||
|
||||
.fade.in {
|
||||
z-index: 10;
|
||||
-webkit-animation-name: fadein;
|
||||
}
|
||||
.fade.out {
|
||||
z-index: 0;
|
||||
-webkit-animation-name: fadeout;
|
||||
}
|
||||
|
||||
.flip {
|
||||
-webkit-animation-duration: .65s;
|
||||
}
|
||||
|
||||
.flip.in {
|
||||
-webkit-animation-name: flipinfromleft;
|
||||
}
|
||||
|
||||
.flip.out {
|
||||
-webkit-animation-name: flipouttoleft;
|
||||
}
|
||||
|
||||
/* Shake it all about */
|
||||
|
||||
.flip.in.reverse {
|
||||
-webkit-animation-name: flipinfromright;
|
||||
}
|
||||
|
||||
.flip.out.reverse {
|
||||
-webkit-animation-name: flipouttoright;
|
||||
}
|
||||
|
||||
@-webkit-keyframes flipinfromright {
|
||||
from { -webkit-transform: rotateY(-180deg) scale(.8); }
|
||||
to { -webkit-transform: rotateY(0) scale(1); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes flipinfromleft {
|
||||
from { -webkit-transform: rotateY(180deg) scale(.8); }
|
||||
to { -webkit-transform: rotateY(0) scale(1); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes flipouttoleft {
|
||||
from { -webkit-transform: rotateY(0) scale(1); }
|
||||
to { -webkit-transform: rotateY(-180deg) scale(.8); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes flipouttoright {
|
||||
from { -webkit-transform: rotateY(0) scale(1); }
|
||||
to { -webkit-transform: rotateY(180deg) scale(.8); }
|
||||
}
|
||||
|
||||
/* dontmove is used for elements that stay still but still need a complete callback */
|
||||
@-webkit-keyframes dontmove {
|
||||
from { opacity: 1; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.pop {
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
}
|
||||
|
||||
.pop.in {
|
||||
-webkit-animation-name: popin;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.pop.out.reverse {
|
||||
-webkit-animation-name: popout;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.pop.in.reverse {
|
||||
z-index: 0;
|
||||
-webkit-animation-name: dontmove;
|
||||
}
|
||||
|
||||
@-webkit-keyframes popin {
|
||||
from {
|
||||
-webkit-transform: scale(.2);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
-webkit-transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes popout {
|
||||
from {
|
||||
-webkit-transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
-webkit-transform: scale(.2);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,408 +0,0 @@
|
|||
/*!
|
||||
* jQuery Mobile
|
||||
* http://jquerymobile.com/
|
||||
*
|
||||
* Copyright 2010, jQuery Project
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
(function( jQuery, window, undefined ) {
|
||||
// if we're missing support for any of these, then we're a C-grade browser
|
||||
if ( !jQuery.support.display || !jQuery.support.position || !jQuery.support.overflow || !jQuery.support.floatclear ) {
|
||||
return;
|
||||
}
|
||||
|
||||
//these properties should be made easy to override externally
|
||||
jQuery.mobile = {};
|
||||
|
||||
jQuery.extend(jQuery.mobile, {
|
||||
subPageUrlKey: 'ui-page', //define the key used in urls for sub-pages. Defaults to &ui-page=
|
||||
degradeHTML5inputs: true
|
||||
});
|
||||
|
||||
var $window = jQuery(window),
|
||||
$html = jQuery('html'),
|
||||
$head = jQuery('head'),
|
||||
$body,
|
||||
$loader = jQuery('<div class="ui-loader ui-body-a ui-corner-all"><span class="ui-icon ui-icon-loading spin"></span><h1>loading.</h1></div>'),
|
||||
startPage,
|
||||
startPageId = 'ui-page-start',
|
||||
activePageClass = 'ui-page-active',
|
||||
pageTransition,
|
||||
transitions = 'slide slideup slidedown pop flip fade dissolve swap',
|
||||
transitionDuration = 350,
|
||||
backBtnText = "Back",
|
||||
urlStack = [ {
|
||||
url: location.hash.replace( /^#/, "" ),
|
||||
transition: "slide"
|
||||
} ],
|
||||
nextPageRole = null,
|
||||
noCache = '.ui-dialog';
|
||||
|
||||
// hide address bar
|
||||
function hideBrowserChrome() {
|
||||
// prevent scrollstart and scrollstop events
|
||||
jQuery.event.special.scrollstart.enabled = false;
|
||||
setTimeout(function() {
|
||||
window.scrollTo( 0, 0 );
|
||||
},0);
|
||||
setTimeout(function() {
|
||||
jQuery.event.special.scrollstart.enabled = true;
|
||||
}, 150 );
|
||||
}
|
||||
|
||||
function getBaseURL(){
|
||||
var newBaseURL = location.hash.replace(/#/,'').split('/');
|
||||
if(newBaseURL.length && /[.|&]/.test(newBaseURL[newBaseURL.length-1]) ){
|
||||
newBaseURL.pop();
|
||||
}
|
||||
newBaseURL = newBaseURL.join('/');
|
||||
if(newBaseURL !== "" && newBaseURL.charAt(newBaseURL.length-1) !== '/'){ newBaseURL += '/'; }
|
||||
return newBaseURL;
|
||||
}
|
||||
|
||||
function setBaseURL(){
|
||||
//set base url for new page assets
|
||||
$('#ui-base').attr('href', getBaseURL());
|
||||
}
|
||||
|
||||
function resetBaseURL(){
|
||||
$('#ui-base').attr('href', location.pathname);
|
||||
}
|
||||
|
||||
|
||||
// send a link through hash tracking
|
||||
jQuery.fn.ajaxClick = function() {
|
||||
var href = jQuery( this ).attr( "href" );
|
||||
pageTransition = jQuery( this ).attr( "data-transition" ) || "slide";
|
||||
nextPageRole = jQuery( this ).attr( "data-rel" );
|
||||
|
||||
//find new base for url building
|
||||
var newBaseURL = getBaseURL();
|
||||
|
||||
//if href is absolute but local, or a local ID, no base needed
|
||||
if( /^\//.test(href) || (/https?:\/\//.test(href) && !!(href).match(location.hostname)) || /^#/.test(href) ){
|
||||
newBaseURL = '';
|
||||
}
|
||||
|
||||
// set href to relative path using baseURL and
|
||||
if( !/https?:\/\//.test(href) ){
|
||||
href = newBaseURL + href;
|
||||
}
|
||||
|
||||
//if it's a non-local-anchor and Ajax is not supported, or if it's an external link, go to page without ajax
|
||||
if ( ( /^[^#]/.test(href) && !jQuery.support.ajax ) || ( /https?:\/\//.test(href) && !!!href.match(location.hostname) ) ) {
|
||||
location = href
|
||||
}
|
||||
else{
|
||||
// let the hashchange event handler take care of requesting the page via ajax
|
||||
location.hash = href;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
// ajaxify all navigable links
|
||||
jQuery( "a:not([href=#]):not([target]):not([rel=external])" ).live( "click", function(event) {
|
||||
jQuery( this ).ajaxClick();
|
||||
return false;
|
||||
});
|
||||
|
||||
// turn on/off page loading message.
|
||||
function pageLoading( done ) {
|
||||
if ( done ) {
|
||||
$html.removeClass( "ui-loading" );
|
||||
} else {
|
||||
$loader.appendTo('body');
|
||||
$html.addClass( "ui-loading" );
|
||||
}
|
||||
};
|
||||
|
||||
// transition between pages - based on transitions from jQtouch
|
||||
function changePage( from, to, transition, back ) {
|
||||
jQuery( document.activeElement ).blur();
|
||||
|
||||
to.appendTo($body);
|
||||
|
||||
//trigger before show/hide events
|
||||
from.trigger("beforepagehide", {nextPage: to});
|
||||
to.trigger("beforepageshow", {prevPage: from});
|
||||
|
||||
function loadComplete(){
|
||||
//trigger show/hide events
|
||||
from.trigger("pagehide", {nextPage: to});
|
||||
to.trigger("pageshow", {prevPage: from});
|
||||
|
||||
pageLoading( true );
|
||||
}
|
||||
|
||||
if(transition){
|
||||
// animate in / out
|
||||
from.addClass( transition + " out " + ( back ? "reverse" : "" ) );
|
||||
to.addClass( activePageClass + " " + transition +
|
||||
" in " + ( back ? "reverse" : "" ) );
|
||||
|
||||
// callback - remove classes, etc
|
||||
to.animationComplete(function() {
|
||||
from.add( to ).removeClass(" out in reverse " + transitions );
|
||||
from.removeClass( activePageClass );
|
||||
loadComplete();
|
||||
});
|
||||
}
|
||||
else{
|
||||
from.removeClass( activePageClass );
|
||||
to.addClass( activePageClass );
|
||||
loadComplete();
|
||||
}
|
||||
};
|
||||
|
||||
jQuery(function() {
|
||||
$body = jQuery( "body" );
|
||||
pageLoading();
|
||||
|
||||
// needs to be bound at domready (for IE6)
|
||||
// find or load content, make it active
|
||||
$window.bind( "hashchange", function(e, extras) {
|
||||
var url = location.hash.replace( /^#/, "" ),
|
||||
stackLength = urlStack.length,
|
||||
// pageTransition only exists if the user clicked a link
|
||||
back = !pageTransition && stackLength > 1 &&
|
||||
urlStack[ stackLength - 2 ].url === url,
|
||||
transition = (extras && extras.manuallyTriggered) ? false : pageTransition || "slide",
|
||||
fileUrl = url,
|
||||
pageTransition = undefined;
|
||||
|
||||
//reset base to pathname for new request
|
||||
resetBaseURL();
|
||||
|
||||
// if the new href is the same as the previous one
|
||||
if ( back ) {
|
||||
transition = urlStack.pop().transition;
|
||||
} else {
|
||||
urlStack.push({ url: url, transition: transition });
|
||||
}
|
||||
|
||||
//remove any pages that shouldn't cache
|
||||
jQuery(noCache).remove();
|
||||
|
||||
//function for setting role of next page
|
||||
function setPageRole( newPage ) {
|
||||
if ( nextPageRole ) {
|
||||
newPage.attr( "data-role", nextPageRole );
|
||||
nextPageRole = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
if ( url ) {
|
||||
// see if content is present already
|
||||
var localDiv = jQuery( "[id='" + url + "']" );
|
||||
if ( localDiv.length ) {
|
||||
if ( localDiv.is( "[data-role]" ) ) {
|
||||
setPageRole( localDiv );
|
||||
}
|
||||
setBaseURL();
|
||||
mobilize( localDiv );
|
||||
changePage( jQuery( ".ui-page-active" ), localDiv, transition, back );
|
||||
|
||||
} else { //ajax it in
|
||||
pageLoading();
|
||||
if(url.match( '&' + jQuery.mobile.subPageUrlKey )){
|
||||
fileUrl = url.split( '&' + jQuery.mobile.subPageUrlKey )[0];
|
||||
}
|
||||
var newPage = jQuery( "<div>" )
|
||||
.appendTo( $body )
|
||||
.load( fileUrl + ' [data-role="page"]', function() {
|
||||
// TODO: test this (avoids querying the dom for new element):
|
||||
// var newPage = jQuery( this ).find( ".ui-page" ).eq( 0 )
|
||||
// .attr( "id", url );
|
||||
// jQuery( this ).replaceWith( newPage );
|
||||
// setPageRole( newPage );
|
||||
// mobilize( newPage );
|
||||
// changePage( jQuery( ".ui-page-active" ), newPage, transition, back );
|
||||
jQuery( this ).replaceWith(
|
||||
jQuery( this ).find( '[data-role="page"]' ).eq( 0 ).attr( "id", fileUrl ) );
|
||||
var newPage = jQuery( "[id='" + fileUrl + "']" );
|
||||
setPageRole( newPage );
|
||||
mobilize( newPage );
|
||||
newPage = jQuery( "[id='" + url + "']" );
|
||||
changePage( jQuery( ".ui-page-active" ), newPage, transition, back );
|
||||
});
|
||||
|
||||
setBaseURL();
|
||||
}
|
||||
} else {
|
||||
// either we've backed up to the root page url
|
||||
// or it's the first page load with no hash present
|
||||
var currentPage = jQuery( ".ui-page-active" );
|
||||
if ( currentPage.length && !startPage.is( ".ui-page-active" ) ) {
|
||||
changePage( currentPage, startPage, transition, back );
|
||||
} else {
|
||||
startPage.trigger("beforepageshow", {prevPage: $('')});
|
||||
startPage.addClass( activePageClass );
|
||||
//FIXME: when there's no prevPage, is passing an empty jQuery obj proper style?
|
||||
startPage.trigger("pageshow", {prevPage: $('')});
|
||||
pageLoading( true );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//add orientation class on flip/resize.
|
||||
$window.bind( "orientationchange", function( event, data ) {
|
||||
$html.removeClass( "portrait landscape" ).addClass( data.orientation );
|
||||
});
|
||||
|
||||
//add mobile, loading classes to doc
|
||||
$html.addClass('ui-mobile');
|
||||
|
||||
//insert mobile meta - these will need to be configurable somehow.
|
||||
$head.append('<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />'+
|
||||
'<link rel="apple-touch-icon" href="images/homeicon.png" />'+
|
||||
'<link rel="apple-touch-startup-image" href="images/startscreen.png" />'+
|
||||
'<meta name="apple-mobile-web-app-capable" content="yes" />' +
|
||||
'<meta name="apple-mobile-web-app-status-bar-style" content="default" />'+
|
||||
'<base href="" id="ui-base" />');
|
||||
|
||||
//set base href to pathname
|
||||
resetBaseURL();
|
||||
|
||||
//potential (probably incomplete) fallback to workaround lack of animation callbacks.
|
||||
//should this be extended into a full special event?
|
||||
// note: Expects CSS animations use transitionDuration (350ms)
|
||||
jQuery.fn.animationComplete = function(callback){
|
||||
if(jQuery.support.WebKitAnimationEvent){
|
||||
return jQuery(this).one('webkitAnimationEnd', callback); //check out transitionEnd (opera per Paul's request)
|
||||
}
|
||||
else{
|
||||
setTimeout(callback, transitionDuration);
|
||||
}
|
||||
};
|
||||
|
||||
//markup-driven enhancements, to be called on any ui-page upon loading
|
||||
function mobilize($el){
|
||||
//to-do: make sure this only runs one time on a page (or maybe per component)
|
||||
return $el.not('[data-mobilized]').each(function(){
|
||||
|
||||
var $el = $(this);
|
||||
|
||||
$el.trigger("beforeload");
|
||||
|
||||
//some of the form elements currently rely on the presence of ui-page and ui-content
|
||||
// classes so we'll handle page and content roles outside of the main role processing
|
||||
// loop below.
|
||||
$el.find('[data-role=page],[data-role=content]').andSelf().each(function() {
|
||||
var $this = $(this);
|
||||
$this.addClass('ui-' + $this.attr("data-role"));
|
||||
});
|
||||
|
||||
//hide no-js content
|
||||
$el.find('[data-role="nojs"]').addClass('ui-nojs');
|
||||
|
||||
//replace HTML5 input types that have crap browser implementations
|
||||
if($.mobile.degradeHTML5inputs){
|
||||
$el.find('input').not('[type=text],[type=submit],[type=reset],[type=image],[type=button],[type=checkbox],[type=radio]').each(function(){
|
||||
$(this).replaceWith( $( '<div>' ).html( $(this).clone() ).html().replace(/type="([a-zA-Z]+)"/, 'data-type="$1"') );
|
||||
});
|
||||
}
|
||||
|
||||
$el.find('input[type=radio],input[type=checkbox]').customCheckboxRadio();
|
||||
$el.find('button, input[type=submit], input[type=reset], input[type=image],[type=button]').not('.ui-nojs').customButton();
|
||||
$el.find('input, textarea').not('[type=submit],[type=reset],[type=image],[type=button],[type=checkbox],[type=radio]').customTextInput();
|
||||
$el.find("input, select").filter('[data-role="slider"]').slider();
|
||||
$el.find('select').not('[data-role="slider"]').customSelect();
|
||||
|
||||
|
||||
|
||||
//pre-find data els
|
||||
var $dataEls = $el.find('[data-role]').andSelf().each(function() {
|
||||
var $this = $(this),
|
||||
role = $this.attr("data-role");
|
||||
switch(role) {
|
||||
case 'header':
|
||||
case 'footer':
|
||||
$this.addClass('ui-bar-' + ($(this).data('theme') ? $(this).data('theme') : 'a'));
|
||||
case 'page':
|
||||
case 'content':
|
||||
$this.addClass('ui-' + role);
|
||||
break;
|
||||
case 'collapsible':
|
||||
case 'fieldcontain':
|
||||
case 'navlist':
|
||||
case 'listview':
|
||||
case 'dialog':
|
||||
case 'ajaxform':
|
||||
$this[role]();
|
||||
break;
|
||||
case 'controlgroup':
|
||||
// FIXME for some reason this has to come before the form control stuff (see above)
|
||||
$this.controlgroup({
|
||||
direction: $this.attr("data-type")
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
//fix toolbars
|
||||
$el.fixHeaderFooter();
|
||||
|
||||
//add back buttons to headers that don't have them
|
||||
// FIXME make that optional?
|
||||
// TODO don't do that on devices that have a native back button?
|
||||
var backBtn = $el.find('.ui-header:not(.ui-listbox-header) a.ui-back');
|
||||
if(!backBtn.length){
|
||||
backBtn = jQuery('<a href="#" class="ui-back" data-icon="arrow-l"></a>').appendTo($el.find('.ui-header:not(.ui-listbox-header)'));
|
||||
}
|
||||
|
||||
//buttons from links in headers,footers,bars, or with data-role
|
||||
$dataEls.filter('[data-role="button"]').add('.ui-header a, .ui-footer a, .ui-bar a').not('.ui-btn').buttonMarkup();
|
||||
//links within content areas
|
||||
$el.find('.ui-body a:not(.ui-btn):not(.ui-link-inherit)').addClass('ui-link');
|
||||
//make all back buttons mimic the back button (pre-js, these links are usually "home" links)
|
||||
backBtn
|
||||
.click(function(){
|
||||
// FIXME if you navigated from some page directly to subpage (ala .../#_form-controls.html), back button will actually go to the previous page, instead of the parent page
|
||||
history.go(-1);
|
||||
return false;
|
||||
})
|
||||
.find('.ui-btn-text').text(backBtnText);
|
||||
|
||||
$el.attr('data-mobilized', true);
|
||||
$el.trigger("load");
|
||||
});
|
||||
};
|
||||
|
||||
jQuery.extend({
|
||||
mobilize: mobilize,
|
||||
pageLoading: pageLoading,
|
||||
changePage: changePage,
|
||||
hideBrowserChrome: hideBrowserChrome
|
||||
});
|
||||
|
||||
//dom-ready
|
||||
jQuery(function(){
|
||||
|
||||
//set up active page - mobilize it!
|
||||
startPage = jQuery('[data-role="page"]:first');
|
||||
|
||||
//make sure it has an ID - for finding it later
|
||||
if(!startPage.attr('id')){
|
||||
startPage.attr('id', startPageId);
|
||||
}
|
||||
|
||||
//mobilize all pages present
|
||||
mobilize(jQuery('[data-role="page"]'));
|
||||
|
||||
//trigger a new hashchange, hash or not
|
||||
$window.trigger( "hashchange", { manuallyTriggered: true } );
|
||||
|
||||
//update orientation
|
||||
$html.addClass( jQuery.event.special.orientationchange.orientation( $window ) );
|
||||
|
||||
//some debug stuff for the events pages
|
||||
jQuery('body').bind('scrollstart scrollstop swipe swipeleft swiperight tap taphold turn',function(e){
|
||||
jQuery('#eventlogger').prepend('<div>Event fired: '+ e.type +'</div>');
|
||||
});
|
||||
});
|
||||
|
||||
$window.load(hideBrowserChrome);
|
||||
|
||||
})( jQuery, this );
|
||||
6588
js/jquery.js-
6588
js/jquery.js-
File diff suppressed because it is too large
Load diff
|
|
@ -1,160 +0,0 @@
|
|||
/*!
|
||||
* jQuery JavaScript Library v1.4.3pre
|
||||
* http://jquery.com/
|
||||
*
|
||||
* Copyright 2010, John Resig
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* http://sizzlejs.com/
|
||||
* Copyright 2010, The Dojo Foundation
|
||||
* Released under the MIT, BSD, and GPL Licenses.
|
||||
*
|
||||
* Date: Wed Sep 22 09:16:28 2010 -0400
|
||||
*/
|
||||
(function(F,B){function T(){return false}function $(){return true}function ha(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Da(a){var b,d,f=[],h=[],i,n,l,o,v,w,A,E;n=c.data(this,"events");if(!(a.liveFired===this||!n||!n.live||a.button&&a.type==="click")){if(a.namespace)E=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var x=n.live.slice(0);for(o=0;o<x.length;o++){n=x[o];n.origType.replace(W,"")===a.type?h.push(n.selector):x.splice(o--,1)}i=
|
||||
c(a.target).closest(h,a.currentTarget);v=0;for(w=i.length;v<w;v++){A=i[v];for(o=0;o<x.length;o++){n=x[o];if(A.selector===n.selector&&(!E||E.test(n.namespace))){l=A.elem;h=null;if(n.preType==="mouseenter"||n.preType==="mouseleave"){a.type=n.preType;h=c(a.relatedTarget).closest(n.selector)[0]}if(!h||h!==l)f.push({elem:l,handleObj:n,level:A.level})}}}v=0;for(w=f.length;v<w;v++){i=f[v];if(d&&i.level>d)break;a.currentTarget=i.elem;a.data=i.handleObj.data;a.handleObj=i.handleObj;ret=i.handleObj.origHandler.apply(i.elem,
|
||||
arguments);if(ret===false||a.isPropagationStopped()){d=i.level;if(ret===false)b=false}}return b}}function X(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ea,"`").replace(U,"&")}function ia(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ja(a,b,d){if(c.isFunction(b))return c.grep(a,function(h,i){return!!b.call(h,i,h)===d});else if(b.nodeType)return c.grep(a,function(h){return h===b===d});else if(typeof b==="string"){var f=c.grep(a,function(h){return h.nodeType===1});if(Fa.test(b))return c.filter(b,
|
||||
f,!d);else b=c.filter(b,f)}return c.grep(a,function(h){return c.inArray(h,b)>=0===d})}function Ga(a){return c.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),h=c.data(this,f);if(f=f&&f.events){delete h.handle;h.events={};for(var i in f)for(var n in f[i])c.event.add(this,i,f[i][n],f[i][n].data)}}})}function Ha(a,b){b.src?c.ajax({url:b.src,
|
||||
async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function la(a,b,d){var f=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return f;c.each(b==="width"?Ia:Ja,function(){d||(f-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")f+=parseFloat(c.css(a,"margin"+this))||0;else f-=parseFloat(c.css(a,"border"+this+"Width"))||0});return f}function aa(a,b,d,f){if(c.isArray(b))c.each(b,function(h,i){d||Ka.test(a)?f(a,
|
||||
i):aa(a+"["+(typeof i==="object"||c.isArray(i)?h:"")+"]",i,d,f)});else!d&&b!=null&&typeof b==="object"?c.each(b,function(h,i){aa(a+"["+h+"]",i,d,f)}):f(a,b)}function Q(a,b){var d={};c.each(ma.concat.apply([],ma.slice(0,b)),function(){d[this]=a});return d}function ba(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=F.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(k){setTimeout(a,1);return}b.ready()}}var b=
|
||||
function(k,q){return new b.fn.init(k,q)},d=F.jQuery,f=F.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w-]+)$)/,n=/\S/,l=/^\s+/,o=/\s+$/,v=/\W/,w=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,A=/^[\],:{}\s]*$/,E=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,x=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,R=/(opera)(?:.*version)?[ \/]([\w.]+)/,g=/(msie) ([\w.]+)/,j=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,r=[],s,u=Object.prototype.toString,
|
||||
z=Object.prototype.hasOwnProperty,D=Array.prototype.push,O=Array.prototype.slice,N=String.prototype.trim,P=Array.prototype.indexOf;b.fn=b.prototype={init:function(k,q){var y,C;if(!k)return this;if(k.nodeType){this.context=this[0]=k;this.length=1;return this}if(k==="body"&&!q){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof k==="string")if((y=i.exec(k))&&(y[1]||!q))if(y[1]){C=q?q.ownerDocument||q:t;if(k=w.exec(k))if(b.isPlainObject(q)){k=[t.createElement(k[1])];
|
||||
b.fn.attr.call(k,q,true)}else k=[C.createElement(k[1])];else{k=b.buildFragment([y[1]],[C]);k=(k.cacheable?k.fragment.cloneNode(true):k.fragment).childNodes}return b.merge(this,k)}else{if((q=t.getElementById(y[2]))&&q.parentNode){if(q.id!==y[2])return h.find(k);this.length=1;this[0]=q}this.context=t;this.selector=k;return this}else if(!q&&!v.test(k)){this.selector=k;this.context=t;k=t.getElementsByTagName(k);return b.merge(this,k)}else return!q||q.jquery?(q||h).find(k):b(q).find(k);else if(b.isFunction(k))return h.ready(k);
|
||||
if(k.selector!==B){this.selector=k.selector;this.context=k.context}return b.makeArray(k,this)},selector:"",jquery:"1.4.3pre",length:0,size:function(){return this.length},toArray:function(){return O.call(this,0)},get:function(k){return k==null?this.toArray():k<0?this.slice(k)[0]:this[k]},pushStack:function(k,q,y){var C=b();b.isArray(k)?D.apply(C,k):b.merge(C,k);C.prevObject=this;C.context=this.context;if(q==="find")C.selector=this.selector+(this.selector?" ":"")+y;else if(q)C.selector=this.selector+
|
||||
"."+q+"("+y+")";return C},each:function(k,q){return b.each(this,k,q)},ready:function(k){b.bindReady();if(b.isReady)k.call(t,b);else r&&r.push(k);return this},eq:function(k){return k===-1?this.slice(k):this.slice(k,+k+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(O.apply(this,arguments),"slice",O.call(arguments).join(","))},map:function(k){return this.pushStack(b.map(this,function(q,y){return k.call(q,y,q)}))},end:function(){return this.prevObject||
|
||||
b(null)},push:D,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var k=arguments[0]||{},q=1,y=arguments.length,C=false,G,H,K,J;if(typeof k==="boolean"){C=k;k=arguments[1]||{};q=2}if(typeof k!=="object"&&!b.isFunction(k))k={};if(y===q){k=this;--q}for(;q<y;q++)if((G=arguments[q])!=null)for(H in G){K=k[H];J=G[H];if(k!==J)if(C&&J&&(b.isPlainObject(J)||b.isArray(J))){K=K&&(b.isPlainObject(K)||b.isArray(K))?K:b.isArray(J)?[]:{};k[H]=b.extend(C,K,J)}else if(J!==B)k[H]=
|
||||
J}return k};b.extend({noConflict:function(k){F.$=f;if(k)F.jQuery=d;return b},isReady:false,readyWait:1,ready:function(k){k===true&&b.readyWait--;if(!b.readyWait||k!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,13);b.isReady=true;if(!(k!==true&&--b.readyWait>0)){if(r){for(var q=0;k=r[q++];)k.call(t,b);r=null}b.fn.triggerHandler&&b(t).triggerHandler("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return b.ready();if(t.addEventListener){t.addEventListener("DOMContentLoaded",
|
||||
s,false);F.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",s);F.attachEvent("onload",b.ready);var k=false;try{k=F.frameElement==null}catch(q){}t.documentElement.doScroll&&k&&a()}}},isFunction:function(k){return b.type(k)==="function"},isArray:Array.isArray||function(k){return b.type(k)==="array"},type:function(k){return k==null?String(k):u.call(k).slice(8,-1).toLowerCase()},isPlainObject:function(k){if(!k||b.type(k)!=="object"||k.nodeType||k.setInterval)return false;
|
||||
if(k.constructor&&!z.call(k,"constructor")&&!z.call(k.constructor.prototype,"isPrototypeOf"))return false;var q;for(q in k);return q===B||z.call(k,q)},isEmptyObject:function(k){for(var q in k)return false;return true},error:function(k){throw k;},parseJSON:function(k){if(typeof k!=="string"||!k)return null;k=b.trim(k);if(A.test(k.replace(E,"@").replace(x,"]").replace(I,"")))return F.JSON&&F.JSON.parse?F.JSON.parse(k):(new Function("return "+k))();else b.error("Invalid JSON: "+k)},noop:function(){},
|
||||
globalEval:function(k){if(k&&n.test(k)){var q=t.getElementsByTagName("head")[0]||t.documentElement,y=t.createElement("script");y.type="text/javascript";if(b.support.scriptEval)y.appendChild(t.createTextNode(k));else y.text=k;q.insertBefore(y,q.firstChild);q.removeChild(y)}},nodeName:function(k,q){return k.nodeName&&k.nodeName.toUpperCase()===q.toUpperCase()},each:function(k,q,y){var C,G=0,H=k.length,K=H===B||b.isFunction(k);if(y)if(K)for(C in k){if(q.apply(k[C],y)===false)break}else for(;G<H;){if(q.apply(k[G++],
|
||||
y)===false)break}else if(K)for(C in k){if(q.call(k[C],C,k[C])===false)break}else for(y=k[0];G<H&&q.call(y,G,y)!==false;y=k[++G]);return k},trim:N?function(k){return k==null?"":N.call(k)}:function(k){return k==null?"":k.toString().replace(l,"").replace(o,"")},makeArray:function(k,q){q=q||[];if(k!=null){var y=b.type(k);k.length==null||y==="string"||y==="function"||y==="regexp"||"setInterval"in k?D.call(q,k):b.merge(q,k)}return q},inArray:function(k,q){if(q.indexOf)return q.indexOf(k);for(var y=0,C=
|
||||
q.length;y<C;y++)if(q[y]===k)return y;return-1},merge:function(k,q){var y=k.length,C=0;if(typeof q.length==="number")for(var G=q.length;C<G;C++)k[y++]=q[C];else for(;q[C]!==B;)k[y++]=q[C++];k.length=y;return k},grep:function(k,q,y){var C=[],G;y=!!y;for(var H=0,K=k.length;H<K;H++){G=!!q(k[H],H);y!==G&&C.push(k[H])}return C},map:function(k,q,y){for(var C=[],G,H=0,K=k.length;H<K;H++){G=q(k[H],H,y);if(G!=null)C[C.length]=G}return C.concat.apply([],C)},guid:1,proxy:function(k,q,y){if(arguments.length===
|
||||
2)if(typeof q==="string"){y=k;k=y[q];q=B}else if(q&&!b.isFunction(q)){y=q;q=B}if(!q&&k)q=function(){return k.apply(y||this,arguments)};if(k)q.guid=k.guid=k.guid||q.guid||b.guid++;return q},access:function(k,q,y,C,G,H){var K=k.length;if(typeof q==="object"){for(var J in q)b.access(k,J,q[J],C,G,y);return k}if(y!==B){C=!H&&C&&b.isFunction(y);for(J=0;J<K;J++)G(k[J],q,C?y.call(k[J],J,G(k[J],q)):y,H);return k}return K?G(k[0],q):B},now:function(){return(new Date).getTime()},uaMatch:function(k){k=k.toLowerCase();
|
||||
k=L.exec(k)||R.exec(k)||g.exec(k)||k.indexOf("compatible")<0&&j.exec(k)||[];return{browser:k[1]||"",version:k[2]||"0"}},browser:{}});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(P)b.inArray=function(k,q){return P.call(q,k)};if(!/\s/.test("\u00a0")){l=/^[\s\xA0]+/;o=/[\s\xA0]+$/}h=b(t);if(t.addEventListener)s=function(){t.removeEventListener("DOMContentLoaded",s,false);b.ready()};else if(t.attachEvent)s=function(){if(t.readyState===
|
||||
"complete"){t.detachEvent("onreadystatechange",s);b.ready()}};return F.jQuery=F.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),f="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var h=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!h||!h.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,
|
||||
tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:t.createElement("select").appendChild(t.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+
|
||||
f+"=1;"))}catch(n){}a.insertBefore(b,a.firstChild);if(F[f]){c.support.scriptEval=true;delete F[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function l(){c.support.noCloneEvent=false;d.detachEvent("onclick",l)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;
|
||||
c(function(){var l=t.createElement("div");l.style.width=l.style.paddingLeft="1px";t.body.appendChild(l);c.boxModel=c.support.boxModel=l.offsetWidth===2;t.body.removeChild(l).style.display="none"});a=function(l){var o=t.createElement("div");l="on"+l;var v=l in o;if(!v){o.setAttribute(l,"return;");v=typeof o[l]==="function"}return v};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=h=i=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",
|
||||
cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var na={},La=/^(?:\{.*\}|\[.*\])$/,Ma=/\d/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==F?na:a;var f=a[c.expando],h=c.cache,i=a.nodeType,n;if(!(!f&&typeof b==="string"&&d===B)){if(i)f||(a[c.expando]=f=++c.uuid);else{h=a;f=c.expando}if(typeof b===
|
||||
"object")if(i)h[f]=c.extend(true,{},b);else{n=c.extend(true,{},b);h[f]=function(){return n}}else if(!h[f])if(i)h[f]={};else{n={};h[f]=function(){return n}}a=i?h[f]:h[f]();if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==F?na:a;var d=a.nodeType,f=a[c.expando],h=c.cache;if(f&&!d)f=f();var i=h[f];if(b){if(i){delete i[b];c.isEmptyObject(i)&&c.removeData(a)}}else{if(c.support.deleteExpando||!d)delete a[c.expando];else a.removeAttribute&&
|
||||
a.removeAttribute(c.expando);d&&delete h[f]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===B){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===B&&this.length){f=c.data(this[0],a);if(f===B&&this[0].nodeType===1){f=this[0].getAttribute("data-"+a);if(typeof f==="string")try{f=f==="true"?true:f==="false"?false:f==="null"?
|
||||
null:Ma.test(f)&&!isNaN(f)?parseFloat(f):La.test(f)?c.parseJSON(f):f}catch(h){}else f=B}}return f===B&&d[1]?this.data(d[0]):f}else return this.each(function(){var i=c(this),n=[d[0],b];i.triggerHandler("setData"+d[1]+"!",n);c.data(this,a,b);i.triggerHandler("changeData"+d[1]+"!",n)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));
|
||||
else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?
|
||||
c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var oa=/[\n\t]/g,U=/\s+/,Na=/\r/g,Oa=/^(?:href|src|style)$/,Pa=/^(?:button|input)$/i,Qa=/^(?:button|input|object|select|textarea)$/i,Ra=/^a(?:rea)?$/i,pa=/^(?:radio|checkbox)$/i;c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===
|
||||
1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(v){var w=c(this);w.addClass(a.call(this,v,w.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(U),d=0,f=this.length;d<f;d++){var h=this[d];if(h.nodeType===1)if(h.className){for(var i=" "+h.className+" ",n=h.className,l=0,o=b.length;l<o;l++)if(i.indexOf(" "+b[l]+" ")<0)n+=" "+b[l];h.className=c.trim(n)}else h.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var v=
|
||||
c(this);v.removeClass(a.call(this,o,v.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(U),d=0,f=this.length;d<f;d++){var h=this[d];if(h.nodeType===1&&h.className)if(a){for(var i=(" "+h.className+" ").replace(oa," "),n=0,l=b.length;n<l;n++)i=i.replace(" "+b[n]+" "," ");h.className=c.trim(i)}else h.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(h){var i=c(this);i.toggleClass(a.call(this,
|
||||
h,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var h,i=0,n=c(this),l=b,o=a.split(U);h=o[i++];){l=f?l:!n.hasClass(h);n[l?"addClass":"removeClass"](h)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(oa," ").indexOf(a)>-1)return true;return false},
|
||||
val:function(a){if(a===B){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var f=b.selectedIndex;d=[];var h=b.options;b=b.type==="select-one";if(f<0)return null;var i=b?f:0;for(f=b?f+1:h.length;i<f;i++){var n=h[i];if(n.selected){a=c(n).val();if(b)return a;d.push(a)}}return d}if(pa.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Na,"")}return B}var l=
|
||||
c.isFunction(a);return this.each(function(o){var v=c(this),w=a;if(this.nodeType===1){if(l)w=a.call(this,o,v.val());if(typeof w==="number")w+="";if(c.isArray(w)&&pa.test(this.type))this.checked=c.inArray(v.val(),w)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(w);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=w}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
|
||||
attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return B;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var h=d!==B;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Oa.test(b);if((b in a||a[b]!==B)&&f&&!i){if(h){b==="type"&&Pa.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:
|
||||
Qa.test(a.nodeName)||Ra.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&f&&b==="style"){if(h)a.style.cssText=""+d;return a.style.cssText}h&&a.setAttribute(b,""+d);if(!a.attributes[b]&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}}});var W=/\.(.*)$/,ca=/^(?:textarea|input|select)$/i,Ea=/\./g;U=/ /g;var Sa=/[^\w\s.|`]/g,Ta=function(a){return a.replace(Sa,"\\$&")};c.event={add:function(a,b,d,f){if(!(a.nodeType===
|
||||
3||a.nodeType===8)){if(a.setInterval&&a!==F&&!a.frameElement)a=F;if(d===false)d=T;var h,i;if(d.handler){h=d;d=h.handler}if(!d.guid)d.guid=c.guid++;if(i=c.data(a)){var n=i.events=i.events||{},l=i.handle;if(!l)i.handle=l=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(l.elem,arguments):B};l.elem=a;b=b.split(" ");for(var o,v=0,w;o=b[v++];){i=h?c.extend({},h):{handler:d,data:f};if(o.indexOf(".")>-1){w=o.split(".");o=w.shift();i.namespace=w.slice(0).sort().join(".")}else{w=
|
||||
[];i.namespace=""}i.type=o;if(!i.guid)i.guid=d.guid;var A=n[o],E=c.event.special[o]||{};if(!A){A=n[o]=[];if(!E.setup||E.setup.call(a,f,w,l)===false)if(a.addEventListener)a.addEventListener(o,l,false);else a.attachEvent&&a.attachEvent("on"+o,l)}if(E.add){E.add.call(a,i);if(!i.handler.guid)i.handler.guid=d.guid}A.push(i);c.event.global[o]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=T;var h,i,n=0,l,o,v,w,A,E,x=c.data(a),I=x&&x.events;if(x&&I){if(b&&
|
||||
b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(h in I)c.event.remove(a,h+b)}else{for(b=b.split(" ");h=b[n++];){w=h;l=h.indexOf(".")<0;o=[];if(!l){o=h.split(".");h=o.shift();v=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),Ta).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[h])if(d){w=c.event.special[h]||{};for(i=f||0;i<A.length;i++){E=A[i];if(d.guid===E.guid){if(l||v.test(E.namespace)){f==null&&A.splice(i--,1);w.remove&&w.remove.call(a,E)}if(f!=null)break}}if(A.length===
|
||||
0||f!=null&&A.length===1){if(!w.teardown||w.teardown.call(a,o)===false)c.removeEvent(a,h,x.handle);delete I[h]}}else for(i=0;i<A.length;i++){E=A[i];if(l||v.test(E.namespace)){c.event.remove(a,w,E.handler,i);A.splice(i--,1)}}}if(c.isEmptyObject(I)){if(b=x.handle)b.elem=null;delete x.events;delete x.handle;c.isEmptyObject(x)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var h=a.type||a;if(!f){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(h),a):c.Event(h);if(h.indexOf("!")>=0){a.type=h=h.slice(0,
|
||||
-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[h]&&c.each(c.cache,function(){this.events&&this.events[h]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+h]&&d["on"+h].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&
|
||||
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var n,l=h.replace(W,""),o=c.nodeName(f,"a")&&l==="click",v=c.event.special[l]||{};if((!v._default||v._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[l]){if(n=f["on"+l])f["on"+l]=null;c.event.triggered=true;f[l]()}}catch(w){}if(n)f["on"+l]=n;c.event.triggered=false}}},handle:function(a){var b,d,f;d=[];var h,i=c.makeArray(arguments);a=i[0]=c.event.fix(a||F.event);a.currentTarget=
|
||||
this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){f=a.type.split(".");a.type=f.shift();d=f.slice(0).sort();f=new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");h=c.data(this,"events");d=(h||{})[a.type];if(h&&d){d=d.slice(0);h=0;for(var n=d.length;h<n;h++){var l=d[h];if(b||f.test(l.namespace)){a.handler=l.handler;a.data=l.data;a.handleObj=l;l=l.handler.apply(this,i);if(l!==B){a.result=l;if(l===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},
|
||||
props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=
|
||||
a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||
|
||||
a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,X(a.origType,a.selector),c.extend({},a,{handler:Da,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,X(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===
|
||||
b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=$;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();
|
||||
else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=$;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=$;this.stopPropagation()},isDefaultPrevented:T,isPropagationStopped:T,isImmediatePropagationStopped:T};var qa=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},
|
||||
ra=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?ra:qa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?ra:qa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&
|
||||
c(b).closest("form").length)return ha("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return ha("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var da,sa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>
|
||||
-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},ea=function(a,b){var d=a.target,f,h;if(!(!ca.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");h=sa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",h);if(!(f===B||h===f))if(f!=null||h){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||
|
||||
d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",sa(a))}},setup:function(){if(this.type==="file")return false;for(var a in da)c.event.add(this,a+".specialChange",da[a]);return ca.test(this.nodeName)},teardown:function(){c.event.remove(this,
|
||||
".specialChange");return ca.test(this.nodeName)}};da=c.event.special.change.filters}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,h){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],h);return this}if(c.isFunction(f)||
|
||||
f===false){h=f;f=B}var n=b==="one"?c.proxy(h,function(o){c(this).unbind(o,n);return h.apply(this,arguments)}):h;if(d==="unload"&&b!=="one")this.one(d,f,h);else{i=0;for(var l=this.length;i<l;i++)c.event.add(this[i],d,n,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,
|
||||
b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var h=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,h+1);f.preventDefault();
|
||||
return b[h].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ta={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,h,i){var n=0,l,o,v=i||this.selector,w=i?this:c(this.context);if(c.isFunction(f)){h=f;f=B}for(d=(d||"").split(" ");(i=d[n++])!=null;){l=W.exec(i);o="";if(l){o=l[0];i=i.replace(W,"")}if(i==="hover")d.push("mouseenter"+o,"mouseleave"+o);else{l=i;if(i===
|
||||
"focus"||i==="blur"){d.push(ta[i]+o);i+=o}else i=(ta[i]||i)+o;if(b==="live"){o=0;for(var A=w.length;o<A;o++)c.event.add(w[o],"live."+X(i,v),{data:f,selector:v,handler:h,origType:i,origHandler:h,preType:l})}else w.unbind("live."+X(i,v),h)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,f){if(f==
|
||||
null){f=d;d=null}return arguments.length>0?this.bind(b,d,f):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});F.attachEvent&&!F.addEventListener&&F.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g,j,m,p,r,s){r=0;for(var u=p.length;r<u;r++){var z=p[r];if(z){z=z[g];for(var D=false;z;){if(z.sizcache===m){D=p[z.sizset];break}if(z.nodeType===1&&!s){z.sizcache=m;z.sizset=r}if(z.nodeName.toLowerCase()===
|
||||
j){D=z;break}z=z[g]}p[r]=D}}}function b(g,j,m,p,r,s){r=0;for(var u=p.length;r<u;r++){var z=p[r];if(z){z=z[g];for(var D=false;z;){if(z.sizcache===m){D=p[z.sizset];break}if(z.nodeType===1){if(!s){z.sizcache=m;z.sizset=r}if(typeof j!=="string"){if(z===j){D=true;break}}else if(l.filter(j,[z]).length>0){D=z;break}}z=z[g]}p[r]=D}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,f=0,h=Object.prototype.toString,i=
|
||||
false,n=true;[0,0].sort(function(){n=false;return 0});var l=function(g,j,m,p){m=m||[];var r=j=j||t;if(j.nodeType!==1&&j.nodeType!==9)return[];if(!g||typeof g!=="string")return m;var s=[],u,z,D,O,N=true,P=l.isXML(j),k=g,q;do{d.exec("");if(u=d.exec(k)){k=u[3];s.push(u[1]);if(u[2]){O=u[3];break}}}while(u);if(s.length>1&&v.exec(g))if(s.length===2&&o.relative[s[0]])z=R(s[0]+s[1],j);else for(z=o.relative[s[0]]?[j]:l(s.shift(),j);s.length;){g=s.shift();if(o.relative[g])g+=s.shift();z=R(g,z)}else{if(!p&&
|
||||
s.length>1&&j.nodeType===9&&!P&&o.match.ID.test(s[0])&&!o.match.ID.test(s[s.length-1])){u=l.find(s.shift(),j,P);j=u.expr?l.filter(u.expr,u.set)[0]:u.set[0]}if(j){u=p?{expr:s.pop(),set:E(p)}:l.find(s.pop(),s.length===1&&(s[0]==="~"||s[0]==="+")&&j.parentNode?j.parentNode:j,P);z=u.expr?l.filter(u.expr,u.set):u.set;if(s.length>0)D=E(z);else N=false;for(;s.length;){u=q=s.pop();if(o.relative[q])u=s.pop();else q="";if(u==null)u=j;o.relative[q](D,u,P)}}else D=[]}D||(D=z);D||l.error(q||g);if(h.call(D)===
|
||||
"[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;D[g]!=null;g++){if(D[g]&&(D[g]===true||D[g].nodeType===1&&l.contains(j,D[g])))m.push(z[g])}else for(g=0;D[g]!=null;g++)D[g]&&D[g].nodeType===1&&m.push(z[g]);else m.push.apply(m,D);else E(D,m);if(O){l(O,r,m,p);l.uniqueSort(m)}return m};l.uniqueSort=function(g){if(I){i=n;g.sort(I);if(i)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.find=function(g,j,m){var p;if(!g)return[];for(var r=
|
||||
0,s=o.order.length;r<s;r++){var u=o.order[r],z;if(z=o.leftMatch[u].exec(g)){var D=z[1];z.splice(1,1);if(D.substr(D.length-1)!=="\\"){z[1]=(z[1]||"").replace(/\\/g,"");p=o.find[u](z,j,m);if(p!=null){g=g.replace(o.match[u],"");break}}}}p||(p=j.getElementsByTagName("*"));return{set:p,expr:g}};l.filter=function(g,j,m,p){for(var r=g,s=[],u=j,z,D,O=j&&j[0]&&l.isXML(j[0]);g&&j.length;){for(var N in o.filter)if((z=o.leftMatch[N].exec(g))!=null&&z[2]){var P=o.filter[N],k,q;q=z[1];D=false;z.splice(1,1);if(q.substr(q.length-
|
||||
1)!=="\\"){if(u===s)s=[];if(o.preFilter[N])if(z=o.preFilter[N](z,u,m,s,p,O)){if(z===true)continue}else D=k=true;if(z)for(var y=0;(q=u[y])!=null;y++)if(q){k=P(q,z,y,u);var C=p^!!k;if(m&&k!=null)if(C)D=true;else u[y]=false;else if(C){s.push(q);D=true}}if(k!==B){m||(u=s);g=g.replace(o.match[N],"");if(!D)return[];break}}}if(g===r)if(D==null)l.error(g);else break;r=g}return u};l.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=l.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
|
||||
CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
|
||||
relative:{"+":function(g,j){var m=typeof j==="string",p=m&&!/\W/.test(j);m=m&&!p;if(p)j=j.toLowerCase();p=0;for(var r=g.length,s;p<r;p++)if(s=g[p]){for(;(s=s.previousSibling)&&s.nodeType!==1;);g[p]=m||s&&s.nodeName.toLowerCase()===j?s||false:s===j}m&&l.filter(j,g,true)},">":function(g,j){var m=typeof j==="string",p,r=0,s=g.length;if(m&&!/\W/.test(j))for(j=j.toLowerCase();r<s;r++){if(p=g[r]){m=p.parentNode;g[r]=m.nodeName.toLowerCase()===j?m:false}}else{for(;r<s;r++)if(p=g[r])g[r]=m?p.parentNode:p.parentNode===
|
||||
j;m&&l.filter(j,g,true)}},"":function(g,j,m){var p=f++,r=b,s;if(typeof j==="string"&&!/\W/.test(j)){s=j=j.toLowerCase();r=a}r("parentNode",j,p,g,s,m)},"~":function(g,j,m){var p=f++,r=b,s;if(typeof j==="string"&&!/\W/.test(j)){s=j=j.toLowerCase();r=a}r("previousSibling",j,p,g,s,m)}},find:{ID:function(g,j,m){if(typeof j.getElementById!=="undefined"&&!m)return(g=j.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,j){if(typeof j.getElementsByName!=="undefined"){var m=[];j=j.getElementsByName(g[1]);
|
||||
for(var p=0,r=j.length;p<r;p++)j[p].getAttribute("name")===g[1]&&m.push(j[p]);return m.length===0?null:m}},TAG:function(g,j){return j.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,j,m,p,r,s){g=" "+g[1].replace(/\\/g,"")+" ";if(s)return g;s=0;for(var u;(u=j[s])!=null;s++)if(u)if(r^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))m||p.push(u);else if(m)j[s]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
|
||||
CHILD:function(g){if(g[1]==="nth"){var j=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=j[1]+(j[2]||1)-0;g[3]=j[3]-0}g[0]=f++;return g},ATTR:function(g,j,m,p,r,s){j=g[1].replace(/\\/g,"");if(!s&&o.attrMap[j])g[1]=o.attrMap[j];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,j,m,p,r){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,j);else{g=l.filter(g[3],j,m,true^r);m||p.push.apply(p,
|
||||
g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,j,m){return!!l(m[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
|
||||
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
|
||||
setFilters:{first:function(g,j){return j===0},last:function(g,j,m,p){return j===p.length-1},even:function(g,j){return j%2===0},odd:function(g,j){return j%2===1},lt:function(g,j,m){return j<m[3]-0},gt:function(g,j,m){return j>m[3]-0},nth:function(g,j,m){return m[3]-0===j},eq:function(g,j,m){return m[3]-0===j}},filter:{PSEUDO:function(g,j,m,p){var r=j[1],s=o.filters[r];if(s)return s(g,m,j,p);else if(r==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(j[3])>=0;else if(r==="not"){j=
|
||||
j[3];m=0;for(p=j.length;m<p;m++)if(j[m]===g)return false;return true}else l.error("Syntax error, unrecognized expression: "+r)},CHILD:function(g,j){var m=j[1],p=g;switch(m){case "only":case "first":for(;p=p.previousSibling;)if(p.nodeType===1)return false;if(m==="first")return true;p=g;case "last":for(;p=p.nextSibling;)if(p.nodeType===1)return false;return true;case "nth":m=j[2];var r=j[3];if(m===1&&r===0)return true;j=j[0];var s=g.parentNode;if(s&&(s.sizcache!==j||!g.nodeIndex)){var u=0;for(p=s.firstChild;p;p=
|
||||
p.nextSibling)if(p.nodeType===1)p.nodeIndex=++u;s.sizcache=j}g=g.nodeIndex-r;return m===0?g===0:g%m===0&&g/m>=0}},ID:function(g,j){return g.nodeType===1&&g.getAttribute("id")===j},TAG:function(g,j){return j==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===j},CLASS:function(g,j){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(j)>-1},ATTR:function(g,j){var m=j[1];g=o.attrHandle[m]?o.attrHandle[m](g):g[m]!=null?g[m]:g.getAttribute(m);m=g+"";var p=j[2];j=j[4];return g==null?p==="!=":p===
|
||||
"="?m===j:p==="*="?m.indexOf(j)>=0:p==="~="?(" "+m+" ").indexOf(j)>=0:!j?m&&g!==false:p==="!="?m!==j:p==="^="?m.indexOf(j)===0:p==="$="?m.substr(m.length-j.length)===j:p==="|="?m===j||m.substr(0,j.length+1)===j+"-":false},POS:function(g,j,m,p){var r=o.setFilters[j[2]];if(r)return r(g,m,j,p)}}},v=o.match.POS,w=function(g,j){return"\\"+(j-0+1)};for(var A in o.match){o.match[A]=new RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,
|
||||
w))}var E=function(g,j){g=Array.prototype.slice.call(g,0);if(j){j.push.apply(j,g);return j}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(x){E=function(g,j){j=j||[];var m=0;if(h.call(g)==="[object Array]")Array.prototype.push.apply(j,g);else if(typeof g.length==="number")for(var p=g.length;m<p;m++)j.push(g[m]);else for(;g[m];m++)j.push(g[m]);return j}}var I,L;if(t.documentElement.compareDocumentPosition)I=function(g,j){if(g===j){i=true;return 0}if(!g.compareDocumentPosition||
|
||||
!j.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(j)&4?-1:1};else{I=function(g,j){var m=[],p=[],r=g.parentNode,s=j.parentNode,u=r;if(g===j){i=true;return 0}else if(r===s)return L(g,j);else if(r){if(!s)return 1}else return-1;for(;u;){m.unshift(u);u=u.parentNode}for(u=s;u;){p.unshift(u);u=u.parentNode}r=m.length;s=p.length;for(u=0;u<r&&u<s;u++)if(m[u]!==p[u])return L(m[u],p[u]);return u===r?L(g,p[u],-1):L(m[u],j,1)};L=function(g,j,m){if(g===j)return m;
|
||||
for(g=g.nextSibling;g;){if(g===j)return-1;g=g.nextSibling}return 1}}l.getText=function(g){for(var j="",m,p=0;g[p];p++){m=g[p];if(m.nodeType===3||m.nodeType===4)j+=m.nodeValue;else if(m.nodeType!==8)j+=l.getText(m.childNodes)}return j};(function(){var g=t.createElement("div"),j="script"+(new Date).getTime();g.innerHTML="<a name='"+j+"'/>";var m=t.documentElement;m.insertBefore(g,m.firstChild);if(t.getElementById(j)){o.find.ID=function(p,r,s){if(typeof r.getElementById!=="undefined"&&!s)return(r=r.getElementById(p[1]))?
|
||||
r.id===p[1]||typeof r.getAttributeNode!=="undefined"&&r.getAttributeNode("id").nodeValue===p[1]?[r]:B:[]};o.filter.ID=function(p,r){var s=typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id");return p.nodeType===1&&s&&s.nodeValue===r}}m.removeChild(g);m=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(j,m){m=m.getElementsByTagName(j[1]);if(j[1]==="*"){j=[];for(var p=0;m[p];p++)m[p].nodeType===
|
||||
1&&j.push(m[p]);m=j}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(j){return j.getAttribute("href",2)};g=null})();t.querySelectorAll&&function(){var g=l,j=t.createElement("div");j.innerHTML="<p class='TEST'></p>";if(!(j.querySelectorAll&&j.querySelectorAll(".TEST").length===0)){l=function(p,r,s,u){r=r||t;if(!u&&r.nodeType===9&&!l.isXML(r))try{return E(r.querySelectorAll(p),
|
||||
s)}catch(z){}return g(p,r,s,u)};for(var m in g)l[m]=g[m];j=null}}();(function(){var g=t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(j,m,p){if(typeof m.getElementsByClassName!=="undefined"&&!p)return m.getElementsByClassName(j[1])};g=null}}})();l.contains=t.compareDocumentPosition?
|
||||
function(g,j){return!!(g.compareDocumentPosition(j)&16)}:function(g,j){return g!==j&&(g.contains?g.contains(j):true)};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var R=function(g,j){var m=[],p="",r;for(j=j.nodeType?[j]:j;r=o.match.PSEUDO.exec(g);){p+=r[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;r=0;for(var s=j.length;r<s;r++)l(g,j[r],m);return l.filter(p,m)};c.find=l;c.expr=l.selectors;c.expr[":"]=c.expr.filters;c.unique=l.uniqueSort;
|
||||
c.text=l.getText;c.isXMLDoc=l.isXML;c.contains=l.contains})();var Ua=/Until$/,Va=/^(?:parents|prevUntil|prevAll)/,Wa=/,/,Fa=/^.[^:#\[\.,]*$/,Xa=Array.prototype.slice;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,h=this.length;f<h;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var n=0;n<d;n++)if(b[n]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,
|
||||
b[d]))return true})},not:function(a){return this.pushStack(ja(this,a,false),"not",a)},filter:function(a){return this.pushStack(ja(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],h,i={},n,l=1;if(f&&a.length){h=0;for(var o=a.length;h<o;h++){n=a[h];i[n]||(i[n]=c.expr.match.POS.test(n)?c(n,b||this.context):n)}for(;f&&f.ownerDocument&&f!==b;){for(n in i){h=i[n];if(h.jquery?h.index(f)>-1:c(f).is(h))d.push({selector:n,
|
||||
elem:f,level:l})}f=f.parentNode;l++}}return d}var v=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(w,A){for(;A&&A.ownerDocument&&A!==b;){if(v?v.index(A)>-1:c(A).is(a))return A;A=A.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(ia(a[0])||
|
||||
ia(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,
|
||||
"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var h=c.map(this,b,d);Ua.test(a)||(f=d);if(f&&typeof f==="string")h=c.filter(f,h);h=this.length>1?c.unique(h):h;if((this.length>1||Wa.test(f))&&
|
||||
Va.test(a))h=h.reverse();return this.pushStack(h,a,Xa.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var ua=
|
||||
/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,wa=/<([\w:]+)/,Ya=/<tbody/i,Za=/<|&#?\w+;/,xa=/<(?:script|object|embed|option|style)/i,ya=/checked\s*(?:[^=]|=\s*.checked.)/i,$a=/\=([^="'>\s]+\/)>/g,M={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>",
|
||||
"</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};M.optgroup=M.option;M.tbody=M.tfoot=M.colgroup=M.caption=M.thead;M.th=M.td;if(!c.support.htmlSerialize)M._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,
|
||||
d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},
|
||||
unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=
|
||||
c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));
|
||||
c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(ua,"").replace($a,'="$1">').replace(Y,
|
||||
"")],f)[0]}else return this.cloneNode(true)});if(a===true){ka(this,b);ka(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ua,""):null;else if(typeof a==="string"&&!xa.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!M[(wa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(va,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?
|
||||
this.each(function(h){var i=c(this),n=i.html();i.empty().append(function(){return a.call(this,h,n)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?
|
||||
a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var f,h,i=a[0],n=[],l;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ya.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(w){var A=c(this);a[0]=i.call(this,w,b?A.html():B);A.domManip(a,b,d)});if(this[0]){f=i&&i.parentNode;f=c.support.parentNode&&f&&f.nodeType===11&&f.childNodes.length===this.length?{fragment:f}:c.buildFragment(a,
|
||||
this,n);l=f.fragment;if(h=l.childNodes.length===1?(l=l.firstChild):l.firstChild){b=b&&c.nodeName(h,"tr");for(var o=0,v=this.length;o<v;o++)d.call(b?Ga(this[o],h):this[o],o>0||f.cacheable||this.length>1?l.cloneNode(true):l)}n.length&&c.each(n,Ha)}return this}});c.buildFragment=function(a,b,d){var f,h,i;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!xa.test(a[0])&&(c.support.checkClone||!ya.test(a[0]))){h=true;if(i=c.fragments[a[0]])if(i!==1)f=
|
||||
i}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(h)c.fragments[a[0]]=i?f:1;return{fragment:f,cacheable:h}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var h=this.length===1&&this[0].parentNode;if(h&&h.nodeType===11&&h.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{h=0;for(var i=d.length;h<i;h++){var n=(h>0?this.clone(true):this).get();
|
||||
c(d[h])[b](n);f=f.concat(n)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||t;for(var h=[],i=0,n;(n=a[i])!=null;i++){if(typeof n==="number")n+="";if(n){if(typeof n==="string"&&!Za.test(n))n=b.createTextNode(n);else if(typeof n==="string"){n=n.replace(va,"<$1></$2>");var l=(wa.exec(n)||["",""])[1].toLowerCase(),o=M[l]||M._default,v=o[0],w=b.createElement("div");for(w.innerHTML=o[1]+
|
||||
n+o[2];v--;)w=w.lastChild;if(!c.support.tbody){v=Ya.test(n);l=l==="table"&&!v?w.firstChild&&w.firstChild.childNodes:o[1]==="<table>"&&!v?w.childNodes:[];for(o=l.length-1;o>=0;--o)c.nodeName(l[o],"tbody")&&!l[o].childNodes.length&&l[o].parentNode.removeChild(l[o])}!c.support.leadingWhitespace&&Y.test(n)&&w.insertBefore(b.createTextNode(Y.exec(n)[0]),w.firstChild);n=w.childNodes}if(n.nodeType)h.push(n);else h=c.merge(h,n)}}if(d)for(i=0;h[i];i++)if(f&&c.nodeName(h[i],"script")&&(!h[i].type||h[i].type.toLowerCase()===
|
||||
"text/javascript"))f.push(h[i].parentNode?h[i].parentNode.removeChild(h[i]):h[i]);else{h[i].nodeType===1&&h.splice.apply(h,[i+1,0].concat(c.makeArray(h[i].getElementsByTagName("script"))));d.appendChild(h[i])}return h},cleanData:function(a){for(var b,d,f=c.cache,h=c.event.special,i=c.support.deleteExpando,n=0,l;(l=a[n])!=null;n++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=f[d])&&b.events)for(var o in b.events)h[o]?c.event.remove(l,o):c.removeEvent(l,o,b.handle);
|
||||
if(i)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete f[d]}}});var za=/alpha\([^)]*\)/,ab=/opacity=([^)]*)/,bb=/-([a-z])/ig,cb=/([A-Z])/g,Aa=/^-?\d+(?:px)?$/i,db=/^-?\d/,eb={position:"absolute",visibility:"hidden",display:"block"},Ia=["Left","Right"],Ja=["Top","Bottom"],V,fb=t.defaultView&&t.defaultView.getComputedStyle,gb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return c.access(this,a,b,true,function(d,f,h){return h!==B?c.style(d,f,h):c.css(d,f)})};
|
||||
c.extend({cssHooks:{opacity:{get:function(a){a=V(a,"opacity","opacity");return a===""?"1":a}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return B;var h,i=c.camelCase(b),n=a.style,l=c.cssHooks[i];b=c.cssProps[i]||i;if(d!==B){if(typeof d==="number"&&!c.cssNumber[i])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==B)n[b]=d}else{if(l&&
|
||||
"get"in l&&(h=l.get(a,false,f))!==B)return h;return n[b]}},css:function(a,b,d){var f,h=c.camelCase(b),i=c.cssHooks[h];b=c.cssProps[h]||h;if(i&&"get"in i&&(f=i.get(a,true,d))!==B)return f;else if(V)return V(a,b,h)},swap:function(a,b,d){var f={};for(var h in b){f[h]=a.style[h];a.style[h]=b[h]}d.call(a);for(h in b)a.style[h]=f[h]},camelCase:function(a){return a.replace(bb,gb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,f,h){var i;if(f){if(d.offsetWidth!==0)i=
|
||||
la(d,b,h);else c.swap(d,eb,function(){i=la(d,b,h)});return i+"px"}},set:function(d,f){if(Aa.test(f)){f=parseFloat(f);if(f>=0)return f+"px"}else return f}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return ab.test((b?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":"1"},set:function(a,b){var d=a.style;d.zoom=1;b=parseInt(b,10)+""==="NaN"?"":"alpha(opacity="+b*100+")";a=d.filter||a.currentStyle.filter||"";d.filter=za.test(a)?a.replace(za,b):b}};if(fb)V=function(a,
|
||||
b,d){var f;d=d.replace(cb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(a=b.getComputedStyle(a,null))f=a.getPropertyValue(d);return f};else if(t.documentElement.currentStyle)V=function(a,b){var d,f,h=a.currentStyle[b],i=a.style;if(!Aa.test(h)&&db.test(h)){d=i.left;f=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;i.left=b==="fontSize"?"1em":h||0;h=i.pixelLeft+"px";i.left=d;a.runtimeStyle.left=f}return h};if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
|
||||
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var hb=c.now(),ib=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,jb=/^(?:select|textarea)/i,kb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Ka=/\[\]$/,S=/\=\?(&|$)/,fa=/\?/,lb=/([?&])_=[^&]*(&?)/,mb=/^(\w+:)?\/\/([^\/?#]+)/,
|
||||
nb=/%20/g,Ba=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ba)return Ba.apply(this,arguments);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var h=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var i=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(n,l){if(l==="success"||l==="notmodified")i.html(h?c("<div>").append(n.responseText.replace(ib,
|
||||
"")).find(h):n.responseText);d&&i.each(d,[n.responseText,l,n])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||jb.test(this.nodeName)||kb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
|
||||
c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},
|
||||
ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:F.XMLHttpRequest&&(F.location.protocol!=="file:"||!F.ActiveXObject)?function(){return new F.XMLHttpRequest}:function(){try{return new F.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",
|
||||
text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,f,h,i=b.type.toUpperCase();b.context=a&&a.context||b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(i==="GET")S.test(b.url)||(b.url+=(fa.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||!S.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&S.test(b.data)||
|
||||
S.test(b.url))){d=b.jsonpCallback||"jsonp"+hb++;if(b.data)b.data=(b.data+"").replace(S,"="+d+"$1");b.url=b.url.replace(S,"="+d+"$1");b.dataType="script";var n=F[d];F[d]=function(m){h=m;c.ajax.handleSuccess(b,x,f,h);c.ajax.handleComplete(b,x,f,h);if(c.isFunction(n))n(m);else{F[d]=B;try{delete F[d]}catch(p){}}v&&v.removeChild(w)}}if(b.dataType==="script"&&b.cache===null)b.cache=false;if(b.cache===false&&i==="GET"){var l=c.now(),o=b.url.replace(lb,"$1_="+l+"$2");b.url=o+(o===b.url?(fa.test(b.url)?"&":
|
||||
"?")+"_="+l:"")}if(b.data&&i==="GET")b.url+=(fa.test(b.url)?"&":"?")+b.data;b.global&&c.ajax.active++===0&&c.event.trigger("ajaxStart");l=(l=mb.exec(b.url))&&(l[1]&&l[1]!==location.protocol||l[2]!==location.host);if(b.dataType==="script"&&i==="GET"&&l){var v=t.getElementsByTagName("head")[0]||t.documentElement,w=t.createElement("script");w.src=b.url;if(b.scriptCharset)w.charset=b.scriptCharset;if(!d){var A=false;w.onload=w.onreadystatechange=function(){if(!A&&(!this.readyState||this.readyState===
|
||||
"loaded"||this.readyState==="complete")){A=true;c.ajax.handleSuccess(b,x,f,h);c.ajax.handleComplete(b,x,f,h);w.onload=w.onreadystatechange=null;v&&w.parentNode&&v.removeChild(w)}}}v.insertBefore(w,v.firstChild);return B}var E=false,x=b.xhr();if(x){b.username?x.open(i,b.url,b.async,b.username,b.password):x.open(i,b.url,b.async);try{if(b.data||a&&a.contentType)x.setRequestHeader("Content-Type",b.contentType);if(b.ifModified){c.lastModified[b.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);
|
||||
c.ajax.etag[b.url]&&x.setRequestHeader("If-None-Match",c.ajax.etag[b.url])}l||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,x,b)===false){b.global&&c.ajax.active--===1&&c.event.trigger("ajaxStop");x.abort();return false}b.global&&c.ajax.triggerGlobal(b,"ajaxSend",[x,b]);var L=x.onreadystatechange=function(m){if(!x||x.readyState===
|
||||
0||m==="abort"){E||c.ajax.handleComplete(b,x,f,h);E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||m==="timeout")){E=true;x.onreadystatechange=c.noop;f=m==="timeout"?"timeout":!c.ajax.httpSuccess(x)?"error":b.ifModified&&c.ajax.httpNotModified(x,b.url)?"notmodified":"success";var p;if(f==="success")try{h=c.ajax.httpData(x,b.dataType,b)}catch(r){f="parsererror";p=r}if(f==="success"||f==="notmodified")d||c.ajax.handleSuccess(b,x,f,h);else c.ajax.handleError(b,x,f,p);d||c.ajax.handleComplete(b,
|
||||
x,f,h);m==="timeout"&&x.abort();if(b.async)x=null}};try{var R=x.abort;x.abort=function(){x&&R.call(x);L("abort")}}catch(g){}b.async&&b.timeout>0&&setTimeout(function(){x&&!E&&L("timeout")},b.timeout);try{x.send(i!=="GET"&&b.data||null)}catch(j){c.ajax.handleError(b,x,null,e);c.ajax.handleComplete(b,x,f,h)}b.async||L();return x}},param:function(a,b){var d=[],f=function(i,n){n=c.isFunction(n)?n():n;d[d.length]=encodeURIComponent(i)+"="+encodeURIComponent(n)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||
|
||||
a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var h in a)aa(h,a[h],b,f);return d.join("&").replace(nb,"+")}});c.extend(c.ajax,{active:0,lastModified:{},etag:{},handleError:function(a,b,d,f){a.error&&a.error.call(a.context,b,d,f);a.global&&c.ajax.triggerGlobal(a,"ajaxError",[b,a,f])},handleSuccess:function(a,b,d,f){a.success&&a.success.call(a.context,f,d,b);a.global&&c.ajax.triggerGlobal(a,"ajaxSuccess",[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,
|
||||
b,d);a.global&&c.ajax.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.ajax.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.ajax.lastModified[b]=
|
||||
d;if(f)c.ajax.etag[b]=f;return a.status===304},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",h=b==="xml"||!b&&f.indexOf("xml")>=0;a=h?a.responseXML:a.responseText;h&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a}});c.support.ajax=!!c.ajaxSettings.xhr();c.extend(c.ajax);
|
||||
var ga={},ob=/^(?:toggle|show|hide)$/,pb=/^([+\-]=)?([\d+.\-]+)(.*)$/,Z,ma=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(Q("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(ga[d])f=ga[d];else{var h=c("<"+d+
|
||||
">").appendTo("body");f=h.css("display");if(f==="none")f="block";h.remove();ga[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(Q("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,
|
||||
toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(Q("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var h=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(h.complete);return this[h.queue===false?"each":
|
||||
"queue"](function(){var i=c.extend({},h),n,l=this.nodeType===1&&c(this).is(":hidden"),o=this;for(n in a){var v=c.camelCase(n);if(n!==v){a[v]=a[n];delete a[n];n=v}if(a[n]==="hide"&&l||a[n]==="show"&&!l)return i.complete.call(this);if((n==="height"||n==="width")&&this.style){i.display=this.style.display;i.overflow=this.style.overflow}if(c.isArray(a[n])){(i.specialEasing=i.specialEasing||{})[n]=a[n][1];a[n]=a[n][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(w,
|
||||
A){var E=new c.fx(o,i,w);if(ob.test(A))E[A==="toggle"?l?"show":"hide":A](a);else{var x=pb.exec(A),I=E.cur(true)||0;if(x){A=parseFloat(x[2]);var L=x[3]||"px";if(L!=="px"){o.style[w]=(A||1)+L;I=(A||1)/E.cur(true)*I;o.style[w]=I+L}if(x[1])A=(x[1]==="-="?-1:1)*A+I;E.custom(I,A,L)}else E.custom(I,A,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});
|
||||
c.each({slideDown:Q("show",1),slideUp:Q("hide",1),slideToggle:Q("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&
|
||||
c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display=
|
||||
"block"},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-10000?a:0},custom:function(a,b,d){function f(i){return h.step(i)}this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var h=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=
|
||||
c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==
|
||||
true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)c.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return false}else{h=b-this.startTime;this.state=h/this.options.duration;
|
||||
a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,h,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(Z);Z=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,
|
||||
"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};var qb=/^t(?:able|d|h)$/i,Ca=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0];if(a)return this.each(function(i){c.offset.setOffset(this,
|
||||
a,i)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;var h=f.documentElement;f=ba(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(w){c.offset.setOffset(this,a,w)});
|
||||
if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,h=b.ownerDocument,i,n=h.documentElement,l=h.body;f=(h=h.defaultView)?h.getComputedStyle(b,null):b.currentStyle;for(var o=b.offsetTop,v=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==n;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=h?h.getComputedStyle(b,null):b.currentStyle;o-=b.scrollTop;v-=b.scrollLeft;if(b===d){o+=b.offsetTop;v+=b.offsetLeft;
|
||||
if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&qb.test(b.nodeName))){o+=parseFloat(i.borderTopWidth)||0;v+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){o+=parseFloat(i.borderTopWidth)||0;v+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){o+=l.offsetTop;v+=l.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){o+=Math.max(n.scrollTop,l.scrollTop);
|
||||
v+=Math.max(n.scrollLeft,l.scrollLeft)}return{top:o,left:v}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,f,h,i=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
|
||||
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;h=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=h.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);
|
||||
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var f=c.css(a,"position");if(f==="static")a.style.position="relative";var h=c(a),i=h.offset(),n=c.css(a,"top"),l=c.css(a,"left"),o=f==="absolute"&&c.inArray("auto",[n,l])>-1;f={};var v={};if(o)v=h.position();n=o?v.top:parseInt(n,
|
||||
10)||0;l=o?v.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,i);if(b.top!=null)f.top=b.top-i.top+n;if(b.left!=null)f.left=b.left-i.left+l;"using"in b?b.using.call(a,f):h.css(f)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=Ca.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;f.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;f.left+=parseFloat(c.css(b[0],
|
||||
"borderLeftWidth"))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ca.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var h=this[0],i;if(!h)return null;if(f!==B)return this.each(function(){if(i=ba(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=ba(h))?"pageXOffset"in
|
||||
i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:h[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(f){return this[0]?parseFloat(c.css(this[0],d,f?"margin":"border")):null};c.fn[d]=function(f){var h=this[0];if(!h)return f==null?null:this;if(c.isFunction(f))return this.each(function(i){var n=c(this);n[d](f.call(this,
|
||||
i,n[d]()))});return"scrollTo"in h&&h.document?h.document.compatMode==="CSS1Compat"&&h.document.documentElement["client"+b]||h.document.body["client"+b]:h.nodeType===9?Math.max(h.documentElement["client"+b],h.body["scroll"+b],h.documentElement["scroll"+b],h.body["offset"+b],h.documentElement["offset"+b]):f===B?parseFloat(c.css(h,d)):this.css(d,typeof f==="string"?f:f+"px")}})})(window);
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : sample plugin for making button-like links
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
|
||||
$.fn.buttonMarkup = function( options ){
|
||||
return this.each( function() {
|
||||
var el = $( this ),
|
||||
o = $.extend( {}, {
|
||||
theme: (function(){
|
||||
//if data-theme attr is present
|
||||
if(el.is('[data-theme]')){
|
||||
return el.attr('data-theme');
|
||||
}
|
||||
//if not, find closest theme container
|
||||
if(el.parents('body').length){
|
||||
var themedParent = el.closest('[class*=ui-bar-]'); //this still catches ui-bar-blah...
|
||||
return themedParent.length ? themedParent.attr('class').match(/ui-bar-([a-z])/)[1] : 'c';
|
||||
}
|
||||
else {
|
||||
return 'c';
|
||||
}
|
||||
})(),
|
||||
iconpos: el.attr('data-iconpos'),
|
||||
icon: el.attr('data-icon')
|
||||
}, $.fn.buttonMarkup.defaults, options),
|
||||
|
||||
// Classes Defined
|
||||
buttonClass = "ui-btn ui-btn-up-" + o.theme,
|
||||
innerClass = "ui-btn-inner",
|
||||
iconClass;
|
||||
|
||||
if (o.icon) {
|
||||
o.icon = 'ui-icon-' + o.icon;
|
||||
|
||||
iconClass = "ui-icon " + o.icon;
|
||||
|
||||
if (o.shadow) { iconClass += " ui-icon-shadow" }
|
||||
o.iconpos = o.iconpos || 'left';
|
||||
}
|
||||
|
||||
if (o.iconpos){
|
||||
buttonClass += " ui-btn-icon-" + o.iconpos;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (o.corners) {
|
||||
buttonClass += " ui-btn-corner-all";
|
||||
innerClass += " ui-btn-corner-all";
|
||||
}
|
||||
|
||||
if (o.shadow) {
|
||||
buttonClass += " ui-shadow";
|
||||
}
|
||||
|
||||
el
|
||||
.attr( 'data-theme', o.theme )
|
||||
.addClass( buttonClass )
|
||||
.wrapInner( $( '<' + o.wrapperEls + '>', { className: "ui-btn-text" } ) );
|
||||
|
||||
if (o.icon) {
|
||||
el.prepend( $( '<span>', { className: iconClass } ) );
|
||||
}
|
||||
|
||||
el.wrapInner( $('<' + o.wrapperEls + '>', { className: innerClass }) );
|
||||
|
||||
el.clickable();
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.buttonMarkup.defaults = {
|
||||
corners: true,
|
||||
shadow: true,
|
||||
iconshadow: true,
|
||||
wrapperEls: 'span'
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : sample scripting for manipulating themed interaction states
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.clickable = function(){
|
||||
return $(this).each(function(){
|
||||
var theme = $(this).attr('data-theme');
|
||||
$(this)
|
||||
.mousedown(function(){
|
||||
$(this).removeClass('ui-btn-up-'+theme).addClass('ui-btn-down-'+theme);
|
||||
})
|
||||
.mouseup(function(){
|
||||
$(this).removeClass('ui-btn-down-'+theme).addClass('ui-btn-up-'+theme);
|
||||
})
|
||||
.bind('mouseover',function(){
|
||||
$(this).removeClass('ui-btn-up-'+theme).addClass('ui-btn-hover-'+theme);
|
||||
})
|
||||
.bind('mouseout',function(){
|
||||
$(this).removeClass('ui-btn-hover-'+theme).addClass('ui-btn-up-'+theme);
|
||||
})
|
||||
.bind('focus',function(){
|
||||
$(this).addClass('ui-focus');
|
||||
})
|
||||
.bind('blur',function(){
|
||||
$(this).removeClass('ui-focus');
|
||||
});
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : "collapsible" plugin (based on code from Filament Group,Inc)
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.collapsible = function(options){
|
||||
return $(this).each(function(){
|
||||
var o = $.extend({
|
||||
containerTheme: 'ui-body-c',
|
||||
expandCueText: ' click to expand contents',
|
||||
collapseCueText: ' click to collapse contents',
|
||||
collapsed: $(this).is('[data-state="collapsed"]'),
|
||||
heading: '>h1,>h2,>h3,>h4,>h5,>h6,>legend'
|
||||
},options);
|
||||
|
||||
//define
|
||||
var collapsibleContain = $(this).addClass('ui-collapsible-contain '+o.containerTheme),
|
||||
collapsibleHeading = $(this).find(o.heading).eq(0),
|
||||
collapsibleContent = collapsibleContain.wrapInner('<div class="ui-collapsible-content ui-body"></div>').find('.ui-collapsible-content');
|
||||
|
||||
//replace collapsibleHeading if it's a legend
|
||||
if(collapsibleHeading.is('legend')){
|
||||
collapsibleHeading = $('<div role="heading">'+ collapsibleHeading.html() +'</div>').insertBefore(collapsibleHeading);
|
||||
collapsibleHeading.next().remove();
|
||||
}
|
||||
|
||||
//drop heading in before content
|
||||
collapsibleHeading.insertBefore(collapsibleContent);
|
||||
|
||||
//modify markup & attributes
|
||||
collapsibleHeading.addClass('ui-collapsible-heading ui-bar-c') //NOTE - THIS SHOULD USE A BODY CLASS
|
||||
.append('<span class="ui-collapsible-heading-status"></span>')
|
||||
.wrapInner('<a href="#" class="ui-collapsible-heading-toggle"></a>');
|
||||
|
||||
collapsibleHeading.find('a:eq(0)').prepend('<span class="ui-icon ui-icon-shadow"></span>').addClass('ui-link');
|
||||
|
||||
//events
|
||||
collapsibleContain
|
||||
.bind('collapse', function(){
|
||||
collapsibleHeading
|
||||
.addClass('ui-collapsible-heading-collapsed')
|
||||
.find('.ui-collapsible-heading-status').text(o.expandCueText);
|
||||
|
||||
collapsibleHeading.find('.ui-icon').removeClass('ui-icon-minus').addClass('ui-icon-plus');
|
||||
collapsibleContent.addClass('ui-collapsible-content-collapsed').attr('aria-hidden',true);
|
||||
|
||||
})
|
||||
.bind('expand', function(){
|
||||
collapsibleHeading
|
||||
.removeClass('ui-collapsible-heading-collapsed')
|
||||
.find('.ui-collapsible-heading-status').text(o.collapseCueText);
|
||||
|
||||
collapsibleHeading.find('.ui-icon').removeClass('ui-icon-plus').addClass('ui-icon-minus');
|
||||
collapsibleContent.removeClass('ui-collapsible-content-collapsed').attr('aria-hidden',false);
|
||||
|
||||
})
|
||||
.trigger(o.collapsed ? 'collapse' : 'expand');
|
||||
|
||||
collapsibleHeading.click(function(){
|
||||
if( collapsibleHeading.is('.ui-collapsible-heading-collapsed') ){
|
||||
collapsibleContain.trigger('expand');
|
||||
}
|
||||
else {
|
||||
collapsibleContain.trigger('collapse');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : prototype for "controlgroup" plugin - corner-rounding for groups of buttons, checks, radios, etc
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.controlgroup = function(options){
|
||||
var o = $.extend({
|
||||
direction: 'vertical',
|
||||
shadow: false
|
||||
},options);
|
||||
|
||||
return $(this).each(function(){
|
||||
var groupheading = $(this).find('>legend'),
|
||||
flCorners = o.direction == 'horizontal' ? ['ui-corner-left', 'ui-corner-right'] : ['ui-corner-top', 'ui-corner-bottom'],
|
||||
type = $(this).find('input:eq(0)').attr('type');
|
||||
|
||||
//replace legend with more stylable replacement div
|
||||
if( groupheading.length ){
|
||||
$(this).wrapInner('<div class="ui-controlgroup-controls"></div>');
|
||||
$('<div role="heading" class="ui-controlgroup-label">'+ groupheading.html() +'</div>').insertBefore( $(this).children(0) );
|
||||
groupheading.remove();
|
||||
}
|
||||
|
||||
$(this).addClass('ui-corner-all ui-controlgroup ui-controlgroup-'+o.direction);
|
||||
|
||||
function flipClasses(els){
|
||||
els
|
||||
.removeClass('ui-btn-corner-all ui-shadow')
|
||||
.eq(0).addClass(flCorners[0])
|
||||
.end()
|
||||
.filter(':last').addClass(flCorners[1]).addClass('ui-controlgroup-last');
|
||||
}
|
||||
flipClasses($(this).find('.ui-btn'));
|
||||
flipClasses($(this).find('.ui-btn-inner'));
|
||||
if(o.shadow){
|
||||
$(this).addClass('ui-shadow');
|
||||
}
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : prototype for "dialog" plugin.
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.dialog = function(options){
|
||||
return $(this).each(function(){
|
||||
$(this)
|
||||
.addClass('ui-dialog ui-body-a')
|
||||
.find('[data-role=header]')
|
||||
.addClass('ui-corner-top ui-overlay-shadow')
|
||||
.end()
|
||||
.find('.ui-content,[data-role=footer]')
|
||||
.last()
|
||||
.addClass('ui-corner-bottom ui-overlay-shadow');
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -1,197 +0,0 @@
|
|||
// add new event shortcuts
|
||||
$.each( "touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split( " " ), function( i, name ) {
|
||||
$.fn[ name ] = function( fn ) {
|
||||
return fn ? this.bind( name, fn ) : this.trigger( name );
|
||||
};
|
||||
$.attrFn[ name ] = true;
|
||||
});
|
||||
|
||||
var supportTouch = $.support.touch,
|
||||
scrollEvent = "touchmove scroll",
|
||||
touchStartEvent = supportTouch ? "touchstart" : "mousedown",
|
||||
touchStopEvent = supportTouch ? "touchend" : "mouseup",
|
||||
touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
|
||||
|
||||
// also handles scrollstop
|
||||
$.event.special.scrollstart = {
|
||||
enabled: true,
|
||||
|
||||
setup: function() {
|
||||
var thisObject = this,
|
||||
$this = $( thisObject ),
|
||||
scrolling,
|
||||
timer;
|
||||
|
||||
function trigger( event, state ) {
|
||||
scrolling = state;
|
||||
var originalType = event.type;
|
||||
event.type = scrolling ? "scrollstart" : "scrollstop";
|
||||
$.event.handle.call( thisObject, event );
|
||||
event.type = originalType;
|
||||
}
|
||||
|
||||
// iPhone triggers scroll after a small delay; use touchmove instead
|
||||
$this.bind( scrollEvent, function( event ) {
|
||||
if ( !$.event.special.scrollstart.enabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !scrolling ) {
|
||||
trigger( event, true );
|
||||
}
|
||||
|
||||
clearTimeout( timer );
|
||||
timer = setTimeout(function() {
|
||||
trigger( event, false );
|
||||
}, 50 );
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// also handles taphold
|
||||
$.event.special.tap = {
|
||||
setup: function() {
|
||||
var thisObject = this,
|
||||
$this = $( thisObject );
|
||||
|
||||
$this
|
||||
.bind( touchStartEvent, function( event ) {
|
||||
if ( event.which && event.which !== 1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var held = false,
|
||||
moved = false,
|
||||
touching = true,
|
||||
originalType,
|
||||
timer;
|
||||
|
||||
function moveHandler() {
|
||||
moved = true;
|
||||
}
|
||||
|
||||
timer = setTimeout(function() {
|
||||
if ( touching && !moved ) {
|
||||
held = true;
|
||||
originalType = event.type;
|
||||
event.type = "taphold";
|
||||
$.event.handle.call( thisObject, event );
|
||||
event.type = originalType;
|
||||
}
|
||||
}, 300 );
|
||||
|
||||
$this
|
||||
.one( touchMoveEvent, moveHandler)
|
||||
.one( touchStopEvent, function( event ) {
|
||||
$this.unbind( touchMoveEvent, moveHandler );
|
||||
clearTimeout( timer );
|
||||
touching = false;
|
||||
|
||||
if ( !held && !moved ) {
|
||||
originalType = event.type;
|
||||
event.type = "tap";
|
||||
$.event.handle.call( thisObject, event );
|
||||
event.type = originalType;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// also handles swipeleft, swiperight
|
||||
$.event.special.swipe = {
|
||||
setup: function() {
|
||||
var thisObject = this,
|
||||
$this = $( thisObject );
|
||||
|
||||
$this
|
||||
.bind( touchStartEvent, function( event ) {
|
||||
var data = event.originalEvent.touches ?
|
||||
event.originalEvent.touches[ 0 ] :
|
||||
event,
|
||||
start = {
|
||||
time: (new Date).getTime(),
|
||||
coords: [ data.pageX, data.pageY ],
|
||||
origin: $( event.target )
|
||||
},
|
||||
stop;
|
||||
|
||||
function moveHandler( event ) {
|
||||
if ( !start ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = event.originalEvent.touches ?
|
||||
event.originalEvent.touches[ 0 ] :
|
||||
event;
|
||||
stop = {
|
||||
time: (new Date).getTime(),
|
||||
coords: [ data.pageX, data.pageY ]
|
||||
};
|
||||
|
||||
// prevent scrolling
|
||||
if ( Math.abs( start.coords[0] - stop.coords[0] ) > 10 ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
$this
|
||||
.bind( touchMoveEvent, moveHandler )
|
||||
.one( touchStopEvent, function( event ) {
|
||||
$this.unbind( touchMoveEvent, moveHandler );
|
||||
if ( start && stop ) {
|
||||
if ( stop.time - start.time < 1000 &&
|
||||
Math.abs( start.coords[0] - stop.coords[0]) > 30 &&
|
||||
Math.abs( start.coords[1] - stop.coords[1]) < 20 ) {
|
||||
start.origin
|
||||
.trigger( "swipe" )
|
||||
.trigger( start.coords[0] > stop.coords[0] ? "swipeleft" : "swiperight" );
|
||||
}
|
||||
}
|
||||
start = stop = undefined;
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.event.special.orientationchange = {
|
||||
orientation: function( elem ) {
|
||||
return elem.width() / elem.height() < 1.1 ? "portrait" : "landscape";
|
||||
},
|
||||
|
||||
setup: function() {
|
||||
var thisObject = this,
|
||||
$this = $( thisObject ),
|
||||
orientation = $.event.special.orientationchange.orientation( $this );
|
||||
|
||||
function handler() {
|
||||
var newOrientation = $.event.special.orientationchange.orientation( $this );
|
||||
|
||||
if ( orientation !== newOrientation ) {
|
||||
$.event.handle.call( thisObject, "orientationchange", {
|
||||
orientation: newOrientation
|
||||
} );
|
||||
orientation = newOrientation;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $.support.orientation ) {
|
||||
thisObject.addEventListener( "orientationchange", handler, false );
|
||||
} else {
|
||||
$this.bind( "resize", handler );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.each({
|
||||
scrollstop: "scrollstart",
|
||||
taphold: "tap",
|
||||
swipeleft: "swipe",
|
||||
swiperight: "swipe"
|
||||
}, function( event, sourceEvent ) {
|
||||
$.event.special[ event ] = {
|
||||
setup: function() {
|
||||
$( this ).bind( sourceEvent, $.noop );
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : prototype for "fieldcontain" plugin - simple class additions to make form row separators
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.fieldcontain = function(options){
|
||||
var o = $.extend({
|
||||
theme: 'c'
|
||||
},options);
|
||||
return $(this).addClass('ui-field-contain ui-body ui-body-'+o.theme);
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : prototype for "fixHeaderFooter" plugin - on-demand positioning for headers,footers
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.fixHeaderFooter = function(options){
|
||||
return $(this).each(function(){
|
||||
if( $(this).data('fullscreen') ){ $(this).addClass('ui-page-fullscreen'); }
|
||||
$(this).find('.ui-header').addClass('ui-header-fixed ui-fixed-inline fade'); //should be slidedown
|
||||
$(this).find('.ui-footer').addClass('ui-footer-fixed ui-fixed-inline fade'); //should be slideup
|
||||
});
|
||||
};
|
||||
|
||||
//single controller for all showing,hiding,toggling
|
||||
$.fixedToolbars = (function(){
|
||||
var currentstate = 'inline',
|
||||
delayTimer,
|
||||
ignoreTargets = 'a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed',
|
||||
stickyFooter, //for storing quick references to duplicate footers
|
||||
supportTouch = $.support.touch,
|
||||
touchStartEvent = supportTouch ? "touchstart" : "mousedown",
|
||||
touchStopEvent = supportTouch ? "touchend" : "mouseup",
|
||||
stateBefore = null,
|
||||
scrollTriggered = false;
|
||||
|
||||
$(function() {
|
||||
$(document)
|
||||
.bind(touchStartEvent,function(event){
|
||||
if( $(event.target).closest(ignoreTargets).length ){ return; }
|
||||
stateBefore = currentstate;
|
||||
$.fixedToolbars.hide(true);
|
||||
})
|
||||
.bind('scrollstart',function(event){
|
||||
if( $(event.target).closest(ignoreTargets).length ){ return; } //because it could be a touchmove...
|
||||
scrollTriggered = true;
|
||||
if(stateBefore == null){ stateBefore = currentstate; }
|
||||
$.fixedToolbars.hide(true);
|
||||
})
|
||||
.bind(touchStopEvent,function(event){
|
||||
if( $(event.target).closest(ignoreTargets).length ){ return; }
|
||||
if( !scrollTriggered ){
|
||||
$.fixedToolbars.toggle(stateBefore);
|
||||
stateBefore = null;
|
||||
}
|
||||
})
|
||||
.bind('scrollstop',function(event){
|
||||
if( $(event.target).closest(ignoreTargets).length ){ return; }
|
||||
scrollTriggered = false;
|
||||
$.fixedToolbars.toggle( stateBefore == 'overlay' ? 'inline' : 'overlay' );
|
||||
stateBefore = null;
|
||||
});
|
||||
|
||||
//function to return another footer already in the dom with the same data-id
|
||||
function findStickyFooter(el){
|
||||
var thisFooter = el.find('[data-role="footer"]');
|
||||
return jQuery( '.ui-footer[data-id="'+ thisFooter.data('id') +'"]:not(.ui-footer-duplicate)' ).not(thisFooter);
|
||||
}
|
||||
|
||||
//before page is shown, check for duplicate footer
|
||||
$('.ui-page').live('beforepageshow', function(event, ui){
|
||||
stickyFooter = findStickyFooter( $(event.target) );
|
||||
if( stickyFooter.length ){
|
||||
//if the existing footer is the first of its kind, create a placeholder before stealing it
|
||||
if( stickyFooter.parents('.ui-page:eq(0)').find('.ui-footer[data-id="'+ stickyFooter.data('id') +'"]').length == 1 ){
|
||||
stickyFooter.before( stickyFooter.clone().addClass('ui-footer-duplicate') );
|
||||
}
|
||||
$(event.target).find('[data-role="footer"]').addClass('ui-footer-duplicate');
|
||||
stickyFooter.appendTo('body').css('top',0);
|
||||
setTop(stickyFooter);
|
||||
}
|
||||
});
|
||||
|
||||
//after page is shown, append footer to new page
|
||||
$('.ui-page').live('pageshow', function(event, ui){
|
||||
if( stickyFooter && stickyFooter.length ){
|
||||
stickyFooter.appendTo(event.target).css('top',0);
|
||||
}
|
||||
$.fixedToolbars.show(true);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function setTop(el){
|
||||
var fromTop = $(window).scrollTop(),
|
||||
thisTop = el.offset().top,
|
||||
thisCSStop = el.css('top') == 'auto' ? 0 : parseFloat(el.css('top')),
|
||||
screenHeight = window.innerHeight,
|
||||
thisHeight = el.outerHeight();
|
||||
if( el.is('.ui-header-fixed') ){
|
||||
return el.css('top', (el.parents('.ui-page').length) ? fromTop - thisTop + thisCSStop : fromTop);
|
||||
}
|
||||
else{
|
||||
return el.css('top', (el.parents('.ui-page').length) ? -1 * (thisTop - (fromTop + screenHeight) + thisCSStop + thisHeight) : fromTop + screenHeight - thisHeight );
|
||||
}
|
||||
}
|
||||
|
||||
//exposed methods
|
||||
return {
|
||||
show: function(immediately){
|
||||
currentstate = 'overlay';
|
||||
return $('.ui-header-fixed,.ui-footer-fixed:not(.ui-footer-duplicate)').each(function(){
|
||||
var el = $(this),
|
||||
fromTop = $(window).scrollTop(),
|
||||
thisTop = el.offset().top,
|
||||
screenHeight = window.innerHeight,
|
||||
thisHeight = el.outerHeight(),
|
||||
alreadyVisible = (el.is('.ui-header-fixed') && fromTop <= thisTop + thisHeight) || (el.is('.ui-footer-fixed') && thisTop <= fromTop + screenHeight);
|
||||
|
||||
//add state class
|
||||
el.addClass('ui-fixed-overlay').removeClass('ui-fixed-inline');
|
||||
|
||||
if( !alreadyVisible && !immediately ){
|
||||
el.addClass('in').animationComplete(function(){
|
||||
el.removeClass('in');
|
||||
});
|
||||
}
|
||||
setTop(el);
|
||||
});
|
||||
},
|
||||
hide: function(immediately){
|
||||
currentstate = 'inline';
|
||||
return $('.ui-header-fixed,.ui-footer-fixed:not(.ui-footer-duplicate)').each(function(){
|
||||
var el = $(this);
|
||||
|
||||
//add state class
|
||||
el.addClass('ui-fixed-inline').removeClass('ui-fixed-overlay');
|
||||
|
||||
if(immediately){
|
||||
el.css('top',0);
|
||||
}
|
||||
else{
|
||||
if( el.css('top') !== 'auto' && parseFloat(el.css('top')) !== 0 ){
|
||||
var classes = 'out reverse';
|
||||
el.addClass(classes).animationComplete(function(){
|
||||
el.removeClass(classes);
|
||||
el.css('top',0);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
hideAfterDelay: function(){
|
||||
delayTimer = setTimeout(function(){
|
||||
$.fixedToolbars.hide();
|
||||
}, 3000);
|
||||
},
|
||||
toggle: function(from){
|
||||
if(from){ currentstate = from; }
|
||||
return (currentstate == 'overlay') ? $.fixedToolbars.hide() : $.fixedToolbars.show();
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
})(jQuery);
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : "ajaxform" plugin
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
|
||||
//ajax response callbacks
|
||||
$.formhandlers = {
|
||||
'default' : function(data,type){
|
||||
return $(data).find('[data-role="content"]:eq(0)');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.ajaxform = function(options){
|
||||
return $(this).each(function(){
|
||||
$this = $(this);
|
||||
|
||||
//extendable options
|
||||
var o = $.extend({
|
||||
submitEvents: '',
|
||||
method: $this.attr('method'),
|
||||
action: $this.attr('action'),
|
||||
injectResponse: true,//should be data-attr driven
|
||||
dataFilter: $.formhandlers['default'], //should be data-attr driven
|
||||
theme: $this.data('theme') || 'b'
|
||||
}, options);
|
||||
|
||||
$this.addClass('ui-autoform ui-bar-'+o.theme);
|
||||
|
||||
$this.bind(o.submitEvents, function(){
|
||||
$(this).submit();
|
||||
});
|
||||
|
||||
$this.submit(function(){
|
||||
$.pageLoading();
|
||||
$.ajax({
|
||||
url: o.action,
|
||||
type: o.method,
|
||||
data: $(this).serialize(),
|
||||
dataFilter: o.dataFilter,
|
||||
success: function(data,textStatus){
|
||||
$('.ui-page-active .ui-content').replaceWith( data );
|
||||
$.mobilize( $('.ui-page-active [data-role="content"]') );
|
||||
$.pageLoading(true);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : sample plugin for making button links that proxy to native input/buttons
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.customButton = function(){
|
||||
return $(this).each(function(){
|
||||
var button = $(this).addClass('ui-btn-hidden').attr('tabindex','-1');
|
||||
|
||||
$('<a href="#" role="button">'+ (button.text() || button.val()) +'</a>')
|
||||
.buttonMarkup({theme: button.attr('data-theme'), icon: button.attr('data-icon')})
|
||||
.click(function(){
|
||||
button.click();
|
||||
return false;
|
||||
})
|
||||
.insertBefore(button);
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : "customCheckboxRadio" plugin (based on code from Filament Group,Inc)
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.customCheckboxRadio = function(options){
|
||||
return $(this).each(function(){
|
||||
if($(this).is('[type=checkbox],[type=radio]')){
|
||||
var input = $(this);
|
||||
|
||||
var o = $.extend({
|
||||
theme: 'b',
|
||||
icon: !input.parents('[data-type="horizontal"]').length,
|
||||
checkedicon: 'ui-icon-'+input.attr('type')+'-on',
|
||||
uncheckedicon: 'ui-icon-'+input.attr('type')+'-off'
|
||||
},options);
|
||||
|
||||
// get the associated label using the input's id
|
||||
var label = $('label[for='+input.attr('id')+']').buttonMarkup({iconpos: o.icon ? 'left' : '', icon: o.icon ? o.uncheckedicon : null, shadow: false});
|
||||
|
||||
var icon = label.find('.ui-icon');
|
||||
|
||||
// wrap the input + label in a div
|
||||
input
|
||||
.add(label)
|
||||
.wrapAll('<div class="ui-'+ input.attr('type') +'"></div>');
|
||||
|
||||
// necessary for browsers that don't support the :hover pseudo class on labels
|
||||
label
|
||||
.mousedown(function(){
|
||||
$(this).data('state', input.attr('checked'));
|
||||
})
|
||||
.click(function(){
|
||||
setTimeout(function(){
|
||||
if(input.attr('checked') == $(this).data('state')){
|
||||
input.trigger('click');
|
||||
}
|
||||
}, 1);
|
||||
})
|
||||
.clickable();
|
||||
|
||||
//bind custom event, trigger it, bind click,focus,blur events
|
||||
input.bind('updateState', function(){
|
||||
if(input.is(':checked')){
|
||||
label.addClass('ui-btn-active');
|
||||
icon.addClass(o.checkedicon);
|
||||
icon.removeClass(o.uncheckedicon);
|
||||
}
|
||||
else {
|
||||
label.removeClass('ui-btn-active');
|
||||
icon.removeClass(o.checkedicon);
|
||||
icon.addClass(o.uncheckedicon);
|
||||
}
|
||||
if(!input.is(':checked')){ label.removeClass('ui-focus'); }
|
||||
})
|
||||
.trigger('updateState')
|
||||
.click(function(){
|
||||
$('input[name='+ $(this).attr('name') +']').trigger('updateState');
|
||||
})
|
||||
.focus(function(){
|
||||
label.addClass('ui-focus');
|
||||
if(input.is(':checked')){ label.addClass('ui-focus'); }
|
||||
})
|
||||
.blur(function(){ label.removeClass('ui-focus'); });
|
||||
}
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -1,207 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : "customSelect" plugin (based on code from Filament Group,Inc)
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.customSelect = function(options){
|
||||
return $(this).each(function(){
|
||||
//extendable options
|
||||
var o = $.extend({
|
||||
backText: 'Back',
|
||||
chooseText: 'Choose one:',
|
||||
inline: false
|
||||
}, options);
|
||||
|
||||
var select = $(this),
|
||||
label = $('label[for='+ select.attr('id') +']').addClass('ui-select'),
|
||||
buttonId = select.attr('id')+'-button',
|
||||
menuId = select.attr('id')+'-menu',
|
||||
thisPage = $(this).closest('.ui-page');
|
||||
|
||||
//select properties,events
|
||||
select
|
||||
.change(function(){
|
||||
var ele = select.get(0);
|
||||
button.find('.ui-btn-text').text($(ele.options.item(ele.selectedIndex)).text());
|
||||
})
|
||||
.focus(function(){
|
||||
$(this).blur();
|
||||
button.focus();
|
||||
})
|
||||
.wrap('<div class="ui-select"></div>')
|
||||
.attr('tabindex','-1')
|
||||
.bind('showmenu',function(){
|
||||
$(document).data('currScroll', [$(window).scrollLeft(), $(window).scrollTop()]);
|
||||
if(menuHeight > window.innerHeight - 80){
|
||||
menuType = "page";
|
||||
thisPage.find('.ui-content').addClass('ui-content-hidden');
|
||||
listbox.removeClass('ui-listbox-overlay');
|
||||
}
|
||||
else {
|
||||
menuType = "overlay";
|
||||
listbox.addClass('ui-listbox-overlay').css({
|
||||
top: $(window).scrollTop() + (window.innerHeight/2),
|
||||
'margin-top': -menuHeight/2,
|
||||
left: window.innerWidth/2
|
||||
});
|
||||
}
|
||||
|
||||
screen.css({width: $(window).width(), height: $(document).height()}).removeClass('ui-helper-hidden out').addClass('in');
|
||||
listbox.removeClass('ui-listbox-hidden');
|
||||
var selectedLI = list.find('.ui-btn-active').focus();
|
||||
|
||||
if(menuType == "page"){
|
||||
$(window)[0].scrollTo(0, 0);
|
||||
listbox.addClass('slideup in');
|
||||
}
|
||||
else{
|
||||
listbox.addClass('pop in');
|
||||
}
|
||||
|
||||
})
|
||||
.bind('hidemenu',function(){
|
||||
screen.addClass('ui-helper-hidden out');
|
||||
listbox.removeAttr('style').removeClass('in').addClass('ui-listbox-hidden out');
|
||||
thisPage.find('.ui-content').removeClass('ui-content-hidden');
|
||||
setTimeout(function(){
|
||||
button.focus();
|
||||
if(menuType == "page"){
|
||||
$(window)[0].scrollTo($(document).data('currScroll')[0], $(document).data('currScroll')[1]);
|
||||
if(button.offset().top > window.innerHeight){
|
||||
$(window)[0].scrollTo(0, button.offset().top);
|
||||
}
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
|
||||
//create menu button
|
||||
var button = $('<a href="#">'+ $(this.options.item(this.selectedIndex)).text() +'</a>')
|
||||
.buttonMarkup({
|
||||
iconpos: 'right',
|
||||
icon: 'arrow-d'
|
||||
})
|
||||
.attr({
|
||||
'role': 'button',
|
||||
'title': 'select menu',
|
||||
'id': buttonId,
|
||||
'aria-haspopup': 'true',
|
||||
'aria-owns': menuId
|
||||
})
|
||||
// FIXME why mousedown? doesn't seem to work on desktop browsers
|
||||
.mousedown(function(){
|
||||
select.trigger('showmenu');
|
||||
return false;
|
||||
})
|
||||
.insertBefore(select);
|
||||
|
||||
//create menu
|
||||
var listbox = $('<div id="'+ menuId +'" class="ui-listbox ui-body-a ui-overlay-shadow ui-corner-all" role="listbox" aria-labelledby="'+ buttonId +'"></div>');
|
||||
|
||||
//menu header
|
||||
$('<div class="ui-listbox-header ui-header ui-bar ui-bar-a ui-corner-all"><div class="ui-title">'+ o.chooseText +'</div></div>')
|
||||
.prepend( $('<a href="#" class="ui-back">'+ o.backText +'</span></a>').buttonMarkup({icon: 'arrow-l'}) )
|
||||
.appendTo(listbox);
|
||||
|
||||
var list = $('<ul class="ui-listbox-list"></ul>').appendTo(listbox);
|
||||
|
||||
//populate menu
|
||||
select.find('option').each(function(i){
|
||||
var thisclass = select[0].selectedIndex == i ? 'ui-btn-active' : '';
|
||||
var thisselected = select[0].selectedIndex == i ? ' aria-selected="true"' : '';
|
||||
$('<li></li>')
|
||||
.append( $('<a href="#" class="ui-listbox-option"'+thisselected+' role="option">'+ $(this).text() +'</a>').buttonMarkup().addClass(thisclass) )
|
||||
.appendTo(list);
|
||||
});
|
||||
|
||||
//group items in a vertical listbox style (corners pilled)
|
||||
list.controlgroup();
|
||||
|
||||
//apply click events for items
|
||||
list.find('a')
|
||||
.click(function(){
|
||||
list.find('[aria-selected=true]').removeClass('ui-btn-active').attr('aria-selected',false);
|
||||
$(this).addClass('ui-btn-active').attr('aria-selected', true);
|
||||
var newIndex = list.find('a').index(this),
|
||||
prevIndex = select[0].selectedIndex;
|
||||
select[0].selectedIndex = list.find('a').index(this);
|
||||
if(newIndex != prevIndex){
|
||||
select.trigger('change');
|
||||
}
|
||||
select.trigger('hidemenu');
|
||||
return false;
|
||||
});
|
||||
|
||||
//back button
|
||||
listbox.find('.ui-listbox-header a').click(function(){
|
||||
select.trigger('hidemenu');
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
//keyboard events for menu items
|
||||
list.keydown(function(event){
|
||||
if( !$(this).is('.ui-btn') ){
|
||||
//switch logic based on which key was pressed
|
||||
switch(event.keyCode){
|
||||
//up or left arrow keys
|
||||
case 37:
|
||||
case 38:
|
||||
//if there's a previous option, focus it
|
||||
if( $(event.target).parent().prev().length ){
|
||||
$(event.target).blur().parent().prev().find('a').eq(0).focus();
|
||||
}
|
||||
//prevent native scroll
|
||||
return false;
|
||||
break;
|
||||
//down or right arrow keys
|
||||
case 39:
|
||||
case 40:
|
||||
//if there's a next option, focus it
|
||||
if( $(event.target).parent().next().length ){
|
||||
$(event.target).blur().parent().next().find('a').eq(0).focus();
|
||||
}
|
||||
//prevent native scroll
|
||||
return false;
|
||||
break;
|
||||
//if enter or space is pressed in menu, trigger click
|
||||
case 13:
|
||||
case 32:
|
||||
$(event.target).trigger('click'); //should trigger select
|
||||
return false;
|
||||
break;
|
||||
//tab returns focus to the menu button, and then automatically shifts focus to the next focusable element on the page
|
||||
case 9:
|
||||
select.trigger('hidemenu');
|
||||
break;
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//add list to page
|
||||
listbox.insertAfter(thisPage.find('.ui-content:eq(0)'));
|
||||
var screen = $('<div class="ui-listbox-screen ui-overlay ui-helper-hidden fadeto"></div>').insertBefore(listbox);
|
||||
|
||||
//get height for figuring out overlay vs. paged
|
||||
var menuHeight = list.outerHeight();
|
||||
|
||||
//menu type
|
||||
var menuType = "page";
|
||||
|
||||
//hide it
|
||||
listbox.addClass('ui-listbox-hidden');
|
||||
|
||||
//hide on outside click
|
||||
screen.click(function(){
|
||||
listbox.addClass('ui-listbox-hidden out');
|
||||
screen.addClass('ui-helper-hidden out');
|
||||
$('.ui-page').find('.ui-content').removeClass('ui-content-hidden');
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : "slider" plugin (based on code from Filament Group,Inc)
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.slider = function(options){
|
||||
return this.each(function(){
|
||||
var control = $(this),
|
||||
cType = control[0].nodeName.toLowerCase(),
|
||||
selectClass = (cType == 'select') ? 'ui-slider-switch' : '',
|
||||
controlID = control.attr('id'),
|
||||
labelID = controlID + '-label',
|
||||
label = $('[for='+ controlID +']').attr('id',labelID),
|
||||
val = (cType == 'input') ? control.val() : control[0].selectedIndex,
|
||||
min = (cType == 'input') ? parseFloat(control.attr('min')) : 0,
|
||||
max = (cType == 'input') ? parseFloat(control.attr('max')) : control.find('option').length-1,
|
||||
percent = val / (max - min) * 100,
|
||||
snappedPercent = percent,
|
||||
slider = $('<div class="ui-slider '+ selectClass +' ui-bar-c ui-btn-corner-all" role="application"></div>'),
|
||||
handle = $('<a href="#" class="ui-slider-handle"></a>')
|
||||
.appendTo(slider)
|
||||
.buttonMarkup({corners: true, theme: 'c', shadow: true})
|
||||
.attr({
|
||||
'role': 'slider',
|
||||
'aria-valuemin': min,
|
||||
'aria-valuemax': max,
|
||||
'aria-valuenow': val,
|
||||
'aria-valuetext': val,
|
||||
'title': val,
|
||||
'aria-labelledby': labelID
|
||||
}),
|
||||
dragging = false;
|
||||
|
||||
if(cType == 'select'){
|
||||
slider.wrapInner('<div class="ui-slider-inneroffset"></div>');
|
||||
var options = control.find('option');
|
||||
|
||||
control.find('option').each(function(i){
|
||||
var side = (i==0) ?'b':'a',
|
||||
corners = (i==0) ? 'right' :'left',
|
||||
theme = (i==0) ?'c':'b';
|
||||
$('<div class="ui-slider-labelbg ui-slider-labelbg-'+ side +' ui-btn-down-'+ theme +' ui-btn-corner-'+ corners+'"></div>').prependTo(slider);
|
||||
$('<span class="ui-slider-label ui-slider-label-'+ side +' ui-btn-down-'+ theme +' ui-btn-corner-'+ corners+'" role="image">'+$(this).text()+'</span>').prependTo(handle);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function updateControl(val){
|
||||
if(cType == 'input'){
|
||||
control.val(val);
|
||||
}
|
||||
else {
|
||||
control[0].selectedIndex = val;
|
||||
}
|
||||
}
|
||||
|
||||
function slideUpdate(event, val){
|
||||
if (val){
|
||||
percent = parseFloat(val) / (max - min) * 100;
|
||||
} else {
|
||||
var data = event.originalEvent.touches ? event.originalEvent.touches[ 0 ] : event,
|
||||
// a slight tolerance helped get to the ends of the slider
|
||||
tol = 4;
|
||||
if( !dragging
|
||||
|| data.pageX < slider.offset().left - tol
|
||||
|| data.pageX > slider.offset().left + slider.width() + tol ){
|
||||
return;
|
||||
}
|
||||
percent = Math.round(((data.pageX - slider.offset().left) / slider.width() ) * 100);
|
||||
}
|
||||
if( percent < 0 ) { percent = 0; }
|
||||
if( percent > 100 ) { percent = 100; }
|
||||
var newval = Math.round( (percent/100) * max );
|
||||
if( newval < min ) { newval = min; }
|
||||
if( newval > max ) { newval = max; }
|
||||
//flip the stack of the bg colors
|
||||
if(percent > 60 && cType == 'select'){
|
||||
|
||||
}
|
||||
snappedPercent = Math.round( newval / max * 100 );
|
||||
handle.css('left', percent + '%');
|
||||
handle.attr({
|
||||
'aria-valuenow': (cType == 'input') ? newval : control.find('option').eq(newval).attr('value'),
|
||||
'aria-valuetext': (cType == 'input') ? newval : control.find('option').eq(newval).text(),
|
||||
'title': newval
|
||||
});
|
||||
updateSwitchClass(newval);
|
||||
updateControl(newval);
|
||||
}
|
||||
|
||||
function updateSwitchClass(val){
|
||||
if(cType == 'input'){return;}
|
||||
if(val == 0){ slider.addClass('ui-slider-switch-a').removeClass('ui-slider-switch-b'); }
|
||||
else { slider.addClass('ui-slider-switch-b').removeClass('ui-slider-switch-a'); }
|
||||
}
|
||||
|
||||
updateSwitchClass(val);
|
||||
|
||||
function updateSnap(){
|
||||
if(cType == 'select'){
|
||||
handle
|
||||
.addClass('ui-slider-handle-snapping')
|
||||
.css('left', snappedPercent + '%')
|
||||
.animationComplete(function(){
|
||||
handle.removeClass('ui-slider-handle-snapping');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
label.addClass('ui-slider');
|
||||
|
||||
control
|
||||
.addClass((cType == 'input') ? 'ui-slider-input' : 'ui-slider-switch')
|
||||
.keyup(function(e){
|
||||
slideUpdate(e, $(this).val() );
|
||||
});
|
||||
|
||||
slider
|
||||
.bind($.support.touch ? "touchstart" : "mousedown", function(event){
|
||||
dragging = true;
|
||||
if((cType == 'select')){
|
||||
val = control[0].selectedIndex;
|
||||
}
|
||||
slideUpdate(event);
|
||||
return false;
|
||||
})
|
||||
.bind($.support.touch ? "touchmove" : "mousemove", function(event){
|
||||
slideUpdate(event);
|
||||
return false;
|
||||
})
|
||||
.bind($.support.touch ? "touchend" : "mouseup", function(event){
|
||||
dragging = false;
|
||||
if(cType == 'select'){
|
||||
if(val == control[0].selectedIndex){
|
||||
val = val == 0 ? 1 : 0;
|
||||
//tap occurred, but value didn't change. flip it!
|
||||
slideUpdate(event,val);
|
||||
}
|
||||
updateSnap();
|
||||
}
|
||||
return false;
|
||||
})
|
||||
.insertAfter(control);
|
||||
|
||||
handle
|
||||
.css('left', percent + '%')
|
||||
.bind('click', function(e){ return false; });
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : "customTextInput" plugin for text inputs, textareas (based on code from Filament Group,Inc)
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
jQuery.fn.customTextInput = function(options){
|
||||
return $(this).each(function(){
|
||||
var input = $(this);
|
||||
|
||||
var o = $.extend({
|
||||
search: input.is('[type="search"],[data-type="search"]')
|
||||
//defaultTheme: "a"
|
||||
}, options);
|
||||
|
||||
$('label[for='+input.attr('id')+']').addClass('ui-input-text');
|
||||
|
||||
input.addClass('ui-input-text');
|
||||
|
||||
var focusedEl = input;
|
||||
|
||||
//"search" input widget
|
||||
if(o.search){
|
||||
focusedEl = input.wrap('<div class="ui-input-search ui-btn-corner-all ui-body-c ui-btn-shadow ui-icon-search"></div>').parent();
|
||||
var clearbtn = $('<a href="#" class="ui-input-clear" title="clear text">clear text</a>')
|
||||
.buttonMarkup({icon: 'delete', iconpos: 'notext', corners:true, shadow:true})
|
||||
.click(function(){
|
||||
input.val('').focus();
|
||||
input.trigger('change');
|
||||
clearbtn.addClass('ui-input-clear-hidden');
|
||||
return false;
|
||||
})
|
||||
.appendTo(focusedEl);
|
||||
|
||||
function toggleClear(){
|
||||
if(input.val() == ''){
|
||||
clearbtn.addClass('ui-input-clear-hidden');
|
||||
}
|
||||
else{
|
||||
clearbtn.removeClass('ui-input-clear-hidden');
|
||||
}
|
||||
}
|
||||
|
||||
toggleClear();
|
||||
input.keyup(toggleClear);
|
||||
}
|
||||
else{
|
||||
input.addClass('ui-corner-all ui-body-c');
|
||||
}
|
||||
|
||||
input
|
||||
.focus(function(){
|
||||
focusedEl.addClass('ui-focus');
|
||||
})
|
||||
.blur(function(){
|
||||
focusedEl.removeClass('ui-focus');
|
||||
});
|
||||
|
||||
//autogrow
|
||||
if(input.is('textarea')){
|
||||
input.keydown(function(){
|
||||
if( input[0].offsetHeight < input[0].scrollHeight ){
|
||||
input.css({height: input[0].scrollHeight + 10 });
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : plugin for creating grids
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.grid = function(options){
|
||||
return $(this).each(function(){
|
||||
var o = $.extend({
|
||||
grid: 'a'
|
||||
},options);
|
||||
|
||||
$(this).addClass('ui-grid-' + o.grid);
|
||||
|
||||
var $kids = $(this).children();
|
||||
iterator = o.grid == 'a' ? 2 : 3;
|
||||
|
||||
$kids.filter(':nth-child(' + iterator + 'n+1)').addClass('ui-block-a');
|
||||
$kids.filter(':nth-child(' + iterator + 'n+2)').addClass('ui-block-b');
|
||||
|
||||
if(iterator == 3){
|
||||
$kids.filter(':nth-child(3n+3)').addClass('ui-block-c');
|
||||
}
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
|
|
@ -1,390 +0,0 @@
|
|||
/*!
|
||||
* jQuery hashchange event - v1.3 - 7/21/2010
|
||||
* http://benalman.com/projects/jquery-hashchange-plugin/
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
*/
|
||||
|
||||
// Script: jQuery hashchange event
|
||||
//
|
||||
// *Version: 1.3, Last updated: 7/21/2010*
|
||||
//
|
||||
// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
|
||||
// GitHub - http://github.com/cowboy/jquery-hashchange/
|
||||
// Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
|
||||
// (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped)
|
||||
//
|
||||
// About: License
|
||||
//
|
||||
// Copyright (c) 2010 "Cowboy" Ben Alman,
|
||||
// Dual licensed under the MIT and GPL licenses.
|
||||
// http://benalman.com/about/license/
|
||||
//
|
||||
// About: Examples
|
||||
//
|
||||
// These working examples, complete with fully commented code, illustrate a few
|
||||
// ways in which this plugin can be used.
|
||||
//
|
||||
// hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
|
||||
// document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
|
||||
//
|
||||
// About: Support and Testing
|
||||
//
|
||||
// Information about what version or versions of jQuery this plugin has been
|
||||
// tested with, what browsers it has been tested in, and where the unit tests
|
||||
// reside (so you can test it yourself).
|
||||
//
|
||||
// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
|
||||
// Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5,
|
||||
// Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5.
|
||||
// Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/
|
||||
//
|
||||
// About: Known issues
|
||||
//
|
||||
// While this jQuery hashchange event implementation is quite stable and
|
||||
// robust, there are a few unfortunate browser bugs surrounding expected
|
||||
// hashchange event-based behaviors, independent of any JavaScript
|
||||
// window.onhashchange abstraction. See the following examples for more
|
||||
// information:
|
||||
//
|
||||
// Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
|
||||
// Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
|
||||
// WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
|
||||
// Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
|
||||
//
|
||||
// Also note that should a browser natively support the window.onhashchange
|
||||
// event, but not report that it does, the fallback polling loop will be used.
|
||||
//
|
||||
// About: Release History
|
||||
//
|
||||
// 1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
|
||||
// "removable" for mobile-only development. Added IE6/7 document.title
|
||||
// support. Attempted to make Iframe as hidden as possible by using
|
||||
// techniques from http://www.paciellogroup.com/blog/?p=604. Added
|
||||
// support for the "shortcut" format $(window).hashchange( fn ) and
|
||||
// $(window).hashchange() like jQuery provides for built-in events.
|
||||
// Renamed jQuery.hashchangeDelay to <jQuery.fn.hashchange.delay> and
|
||||
// lowered its default value to 50. Added <jQuery.fn.hashchange.domain>
|
||||
// and <jQuery.fn.hashchange.src> properties plus document-domain.html
|
||||
// file to address access denied issues when setting document.domain in
|
||||
// IE6/7.
|
||||
// 1.2 - (2/11/2010) Fixed a bug where coming back to a page using this plugin
|
||||
// from a page on another domain would cause an error in Safari 4. Also,
|
||||
// IE6/7 Iframe is now inserted after the body (this actually works),
|
||||
// which prevents the page from scrolling when the event is first bound.
|
||||
// Event can also now be bound before DOM ready, but it won't be usable
|
||||
// before then in IE6/7.
|
||||
// 1.1 - (1/21/2010) Incorporated document.documentMode test to fix IE8 bug
|
||||
// where browser version is incorrectly reported as 8.0, despite
|
||||
// inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.
|
||||
// 1.0 - (1/9/2010) Initial Release. Broke out the jQuery BBQ event.special
|
||||
// window.onhashchange functionality into a separate plugin for users
|
||||
// who want just the basic event & back button support, without all the
|
||||
// extra awesomeness that BBQ provides. This plugin will be included as
|
||||
// part of jQuery BBQ, but also be available separately.
|
||||
|
||||
(function($,window,undefined){
|
||||
'$:nomunge'; // Used by YUI compressor.
|
||||
|
||||
// Reused string.
|
||||
var str_hashchange = 'hashchange',
|
||||
|
||||
// Method / object references.
|
||||
doc = document,
|
||||
fake_onhashchange,
|
||||
special = $.event.special,
|
||||
|
||||
// Does the browser support window.onhashchange? Note that IE8 running in
|
||||
// IE7 compatibility mode reports true for 'onhashchange' in window, even
|
||||
// though the event isn't supported, so also test document.documentMode.
|
||||
doc_mode = doc.documentMode,
|
||||
supports_onhashchange = 'on' + str_hashchange in window && ( doc_mode === undefined || doc_mode > 7 );
|
||||
|
||||
// Get location.hash (or what you'd expect location.hash to be) sans any
|
||||
// leading #. Thanks for making this necessary, Firefox!
|
||||
function get_fragment( url ) {
|
||||
url = url || location.href;
|
||||
return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );
|
||||
};
|
||||
|
||||
// Method: jQuery.fn.hashchange
|
||||
//
|
||||
// Bind a handler to the window.onhashchange event or trigger all bound
|
||||
// window.onhashchange event handlers. This behavior is consistent with
|
||||
// jQuery's built-in event handlers.
|
||||
//
|
||||
// Usage:
|
||||
//
|
||||
// > jQuery(window).hashchange( [ handler ] );
|
||||
//
|
||||
// Arguments:
|
||||
//
|
||||
// handler - (Function) Optional handler to be bound to the hashchange
|
||||
// event. This is a "shortcut" for the more verbose form:
|
||||
// jQuery(window).bind( 'hashchange', handler ). If handler is omitted,
|
||||
// all bound window.onhashchange event handlers will be triggered. This
|
||||
// is a shortcut for the more verbose
|
||||
// jQuery(window).trigger( 'hashchange' ). These forms are described in
|
||||
// the <hashchange event> section.
|
||||
//
|
||||
// Returns:
|
||||
//
|
||||
// (jQuery) The initial jQuery collection of elements.
|
||||
|
||||
// Allow the "shortcut" format $(elem).hashchange( fn ) for binding and
|
||||
// $(elem).hashchange() for triggering, like jQuery does for built-in events.
|
||||
$.fn[ str_hashchange ] = function( fn ) {
|
||||
return fn ? this.bind( str_hashchange, fn ) : this.trigger( str_hashchange );
|
||||
};
|
||||
|
||||
// Property: jQuery.fn.hashchange.delay
|
||||
//
|
||||
// The numeric interval (in milliseconds) at which the <hashchange event>
|
||||
// polling loop executes. Defaults to 50.
|
||||
|
||||
// Property: jQuery.fn.hashchange.domain
|
||||
//
|
||||
// If you're setting document.domain in your JavaScript, and you want hash
|
||||
// history to work in IE6/7, not only must this property be set, but you must
|
||||
// also set document.domain BEFORE jQuery is loaded into the page. This
|
||||
// property is only applicable if you are supporting IE6/7 (or IE8 operating
|
||||
// in "IE7 compatibility" mode).
|
||||
//
|
||||
// In addition, the <jQuery.fn.hashchange.src> property must be set to the
|
||||
// path of the included "document-domain.html" file, which can be renamed or
|
||||
// modified if necessary (note that the document.domain specified must be the
|
||||
// same in both your main JavaScript as well as in this file).
|
||||
//
|
||||
// Usage:
|
||||
//
|
||||
// jQuery.fn.hashchange.domain = document.domain;
|
||||
|
||||
// Property: jQuery.fn.hashchange.src
|
||||
//
|
||||
// If, for some reason, you need to specify an Iframe src file (for example,
|
||||
// when setting document.domain as in <jQuery.fn.hashchange.domain>), you can
|
||||
// do so using this property. Note that when using this property, history
|
||||
// won't be recorded in IE6/7 until the Iframe src file loads. This property
|
||||
// is only applicable if you are supporting IE6/7 (or IE8 operating in "IE7
|
||||
// compatibility" mode).
|
||||
//
|
||||
// Usage:
|
||||
//
|
||||
// jQuery.fn.hashchange.src = 'path/to/file.html';
|
||||
|
||||
$.fn[ str_hashchange ].delay = 50;
|
||||
/*
|
||||
$.fn[ str_hashchange ].domain = null;
|
||||
$.fn[ str_hashchange ].src = null;
|
||||
*/
|
||||
|
||||
// Event: hashchange event
|
||||
//
|
||||
// Fired when location.hash changes. In browsers that support it, the native
|
||||
// HTML5 window.onhashchange event is used, otherwise a polling loop is
|
||||
// initialized, running every <jQuery.fn.hashchange.delay> milliseconds to
|
||||
// see if the hash has changed. In IE6/7 (and IE8 operating in "IE7
|
||||
// compatibility" mode), a hidden Iframe is created to allow the back button
|
||||
// and hash-based history to work.
|
||||
//
|
||||
// Usage as described in <jQuery.fn.hashchange>:
|
||||
//
|
||||
// > // Bind an event handler.
|
||||
// > jQuery(window).hashchange( function(e) {
|
||||
// > var hash = location.hash;
|
||||
// > ...
|
||||
// > });
|
||||
// >
|
||||
// > // Manually trigger the event handler.
|
||||
// > jQuery(window).hashchange();
|
||||
//
|
||||
// A more verbose usage that allows for event namespacing:
|
||||
//
|
||||
// > // Bind an event handler.
|
||||
// > jQuery(window).bind( 'hashchange', function(e) {
|
||||
// > var hash = location.hash;
|
||||
// > ...
|
||||
// > });
|
||||
// >
|
||||
// > // Manually trigger the event handler.
|
||||
// > jQuery(window).trigger( 'hashchange' );
|
||||
//
|
||||
// Additional Notes:
|
||||
//
|
||||
// * The polling loop and Iframe are not created until at least one handler
|
||||
// is actually bound to the 'hashchange' event.
|
||||
// * If you need the bound handler(s) to execute immediately, in cases where
|
||||
// a location.hash exists on page load, via bookmark or page refresh for
|
||||
// example, use jQuery(window).hashchange() or the more verbose
|
||||
// jQuery(window).trigger( 'hashchange' ).
|
||||
// * The event can be bound before DOM ready, but since it won't be usable
|
||||
// before then in IE6/7 (due to the necessary Iframe), recommended usage is
|
||||
// to bind it inside a DOM ready handler.
|
||||
|
||||
// Override existing $.event.special.hashchange methods (allowing this plugin
|
||||
// to be defined after jQuery BBQ in BBQ's source code).
|
||||
special[ str_hashchange ] = $.extend( special[ str_hashchange ], {
|
||||
|
||||
// Called only when the first 'hashchange' event is bound to window.
|
||||
setup: function() {
|
||||
// If window.onhashchange is supported natively, there's nothing to do..
|
||||
if ( supports_onhashchange ) { return false; }
|
||||
|
||||
// Otherwise, we need to create our own. And we don't want to call this
|
||||
// until the user binds to the event, just in case they never do, since it
|
||||
// will create a polling loop and possibly even a hidden Iframe.
|
||||
$( fake_onhashchange.start );
|
||||
},
|
||||
|
||||
// Called only when the last 'hashchange' event is unbound from window.
|
||||
teardown: function() {
|
||||
// If window.onhashchange is supported natively, there's nothing to do..
|
||||
if ( supports_onhashchange ) { return false; }
|
||||
|
||||
// Otherwise, we need to stop ours (if possible).
|
||||
$( fake_onhashchange.stop );
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// fake_onhashchange does all the work of triggering the window.onhashchange
|
||||
// event for browsers that don't natively support it, including creating a
|
||||
// polling loop to watch for hash changes and in IE 6/7 creating a hidden
|
||||
// Iframe to enable back and forward.
|
||||
fake_onhashchange = (function(){
|
||||
var self = {},
|
||||
timeout_id,
|
||||
|
||||
// Remember the initial hash so it doesn't get triggered immediately.
|
||||
last_hash = get_fragment(),
|
||||
|
||||
fn_retval = function(val){ return val; },
|
||||
history_set = fn_retval,
|
||||
history_get = fn_retval;
|
||||
|
||||
// Start the polling loop.
|
||||
self.start = function() {
|
||||
timeout_id || poll();
|
||||
};
|
||||
|
||||
// Stop the polling loop.
|
||||
self.stop = function() {
|
||||
timeout_id && clearTimeout( timeout_id );
|
||||
timeout_id = undefined;
|
||||
};
|
||||
|
||||
// This polling loop checks every $.fn.hashchange.delay milliseconds to see
|
||||
// if location.hash has changed, and triggers the 'hashchange' event on
|
||||
// window when necessary.
|
||||
function poll() {
|
||||
var hash = get_fragment(),
|
||||
history_hash = history_get( last_hash );
|
||||
|
||||
if ( hash !== last_hash ) {
|
||||
history_set( last_hash = hash, history_hash );
|
||||
|
||||
$(window).trigger( str_hashchange );
|
||||
|
||||
} else if ( history_hash !== last_hash ) {
|
||||
location.href = location.href.replace( /#.*/, '' ) + history_hash;
|
||||
}
|
||||
|
||||
timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );
|
||||
};
|
||||
|
||||
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
// vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv
|
||||
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
$.browser.msie && !supports_onhashchange && (function(){
|
||||
// Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8
|
||||
// when running in "IE7 compatibility" mode.
|
||||
|
||||
var iframe,
|
||||
iframe_src;
|
||||
|
||||
// When the event is bound and polling starts in IE 6/7, create a hidden
|
||||
// Iframe for history handling.
|
||||
self.start = function(){
|
||||
if ( !iframe ) {
|
||||
iframe_src = $.fn[ str_hashchange ].src;
|
||||
iframe_src = iframe_src && iframe_src + get_fragment();
|
||||
|
||||
// Create hidden Iframe. Attempt to make Iframe as hidden as possible
|
||||
// by using techniques from http://www.paciellogroup.com/blog/?p=604.
|
||||
iframe = $('<iframe tabindex="-1" title="empty"/>').hide()
|
||||
|
||||
// When Iframe has completely loaded, initialize the history and
|
||||
// start polling.
|
||||
.one( 'load', function(){
|
||||
iframe_src || history_set( get_fragment() );
|
||||
poll();
|
||||
})
|
||||
|
||||
// Load Iframe src if specified, otherwise nothing.
|
||||
.attr( 'src', iframe_src || 'javascript:0' )
|
||||
|
||||
// Append Iframe after the end of the body to prevent unnecessary
|
||||
// initial page scrolling (yes, this works).
|
||||
.insertAfter( 'body' )[0].contentWindow;
|
||||
|
||||
// Whenever `document.title` changes, update the Iframe's title to
|
||||
// prettify the back/next history menu entries. Since IE sometimes
|
||||
// errors with "Unspecified error" the very first time this is set
|
||||
// (yes, very useful) wrap this with a try/catch block.
|
||||
doc.onpropertychange = function(){
|
||||
try {
|
||||
if ( event.propertyName === 'title' ) {
|
||||
iframe.document.title = doc.title;
|
||||
}
|
||||
} catch(e) {}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// Override the "stop" method since an IE6/7 Iframe was created. Even
|
||||
// if there are no longer any bound event handlers, the polling loop
|
||||
// is still necessary for back/next to work at all!
|
||||
self.stop = fn_retval;
|
||||
|
||||
// Get history by looking at the hidden Iframe's location.hash.
|
||||
history_get = function() {
|
||||
return get_fragment( iframe.location.href );
|
||||
};
|
||||
|
||||
// Set a new history item by opening and then closing the Iframe
|
||||
// document, *then* setting its location.hash. If document.domain has
|
||||
// been set, update that as well.
|
||||
history_set = function( hash, history_hash ) {
|
||||
var iframe_doc = iframe.document,
|
||||
domain = $.fn[ str_hashchange ].domain;
|
||||
|
||||
if ( hash !== history_hash ) {
|
||||
// Update Iframe with any initial `document.title` that might be set.
|
||||
iframe_doc.title = doc.title;
|
||||
|
||||
// Opening the Iframe's document after it has been closed is what
|
||||
// actually adds a history entry.
|
||||
iframe_doc.open();
|
||||
|
||||
// Set document.domain for the Iframe document as well, if necessary.
|
||||
domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
|
||||
|
||||
iframe_doc.close();
|
||||
|
||||
// Update the Iframe's hash, for great justice.
|
||||
iframe.location.hash = hash;
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
// ^^^^^^^^^^^^^^^^^^^ REMOVE IF NOT SUPPORTING IE6/7/8 ^^^^^^^^^^^^^^^^^^^
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
return self;
|
||||
})();
|
||||
|
||||
})(jQuery,this);
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
(function( $ ) {
|
||||
|
||||
$.mobile.listview.prototype.options.filter = false;
|
||||
|
||||
$( ":mobile-listview" ).live( "listviewcreate", function() {
|
||||
var list = $( this ),
|
||||
listview = list.data( "listview" );
|
||||
if ( !listview.options.filter ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var wrapper = $( "<form>", { "class": "ui-listview-filter ui-bar-c" } ),
|
||||
|
||||
search = $( "<input>", {
|
||||
placeholder: "Filter results...",
|
||||
"data-type": "search"
|
||||
})
|
||||
.bind( "keyup change", function() {
|
||||
var val = this.value.toLowerCase();;
|
||||
list.children().show();
|
||||
if ( val ) {
|
||||
list.children().filter(function() {
|
||||
return $( this ).text().toLowerCase().indexOf( val ) === -1;
|
||||
}).hide();
|
||||
}
|
||||
|
||||
listview._numberItems();
|
||||
})
|
||||
.appendTo( wrapper )
|
||||
.customTextInput();
|
||||
|
||||
wrapper.insertBefore( list );
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : listview plugin
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function( $ ) {
|
||||
|
||||
$.widget( "mobile.listview", $.mobile.widget, {
|
||||
options: {
|
||||
theme: "f",
|
||||
countTheme: "f",
|
||||
headerTheme: "b",
|
||||
groupingTheme: "b",
|
||||
splitTheme: "b",
|
||||
inset: false
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
var o = this.options;
|
||||
|
||||
this._createSubPages();
|
||||
|
||||
//create listview markup
|
||||
this.element
|
||||
.addClass( "ui-listview" )
|
||||
.find( "li" )
|
||||
.each(function() {
|
||||
var $li = $( this );
|
||||
if ( $li.is( ":has(img)" ) ) {
|
||||
$li.addClass( "ui-li-has-thumb" );
|
||||
}
|
||||
if ( $li.is( ":has(.ui-li-aside)" ) ) {
|
||||
var aside = $li.find('.ui-li-aside');
|
||||
aside.prependTo(aside.parent()); //shift aside to front for css float
|
||||
}
|
||||
$li.addClass( "ui-li" );
|
||||
|
||||
if( $li.find('a').length ){
|
||||
$li
|
||||
.buttonMarkup({
|
||||
wrapperEls: "div",
|
||||
shadow: false,
|
||||
corners: false,
|
||||
iconpos: "right",
|
||||
icon: "arrow-r",
|
||||
theme: o.theme
|
||||
})
|
||||
.find( "a" ).eq( 0 )
|
||||
.addClass( "ui-link-inherit" );
|
||||
}
|
||||
else{
|
||||
$li.addClass( "ui-li-grouping ui-btn ui-body-" + o.groupingTheme );
|
||||
}
|
||||
});
|
||||
|
||||
if ( o.inset ) {
|
||||
this.element
|
||||
.addClass( "ui-listview-inset" )
|
||||
.controlgroup({ shadow: true });
|
||||
}
|
||||
|
||||
this.element
|
||||
.find( "li" ).each(function() {
|
||||
//for split buttons
|
||||
$( this ).find( "a" ).eq( 1 ).each(function() {
|
||||
$( this )
|
||||
.attr( "title", $( this ).text() )
|
||||
.addClass( "ui-li-link-alt" )
|
||||
.empty()
|
||||
.buttonMarkup({
|
||||
shadow: false,
|
||||
corners: false,
|
||||
theme: o.theme
|
||||
})
|
||||
.find( ".ui-btn-inner" )
|
||||
.append( $( "<span>" ).buttonMarkup({
|
||||
shadow: true,
|
||||
corners: true,
|
||||
theme: o.splitTheme,
|
||||
iconpos: "notext",
|
||||
icon: "arrow-r"
|
||||
} ) );
|
||||
|
||||
//fix corners
|
||||
if ( o.inset ) {
|
||||
var closestLi = $( this ).closest( "li" );
|
||||
if ( closestLi.is( "li:first-child" ) ) {
|
||||
$( this ).addClass( "ui-corner-tr" );
|
||||
} else if ( closestLi.is( "li:last-child" ) ) {
|
||||
$( this ).addClass( "ui-corner-br" );
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.find( "img")
|
||||
.addClass( "ui-li-thumb" );
|
||||
|
||||
if ( o.inset ) {
|
||||
this.element
|
||||
.find( "img" )
|
||||
.filter( "li:first-child img" )
|
||||
.addClass( "ui-corner-tl" )
|
||||
.end()
|
||||
.filter( "li:last-child img" )
|
||||
.addClass( "ui-corner-bl" )
|
||||
.end();
|
||||
}
|
||||
|
||||
this.element
|
||||
.find( ".ui-li-count" )
|
||||
.addClass( "ui-btn-up-" + o.countTheme + " ui-btn-corner-all" )
|
||||
.end()
|
||||
.find( ":header" )
|
||||
.addClass( "ui-li-heading" )
|
||||
.end()
|
||||
.find( "p,ul,dl" )
|
||||
.addClass( "ui-li-desc" );
|
||||
|
||||
this._numberItems();
|
||||
|
||||
//tapping the whole LI triggers ajaxClick on the first link
|
||||
this.element.find( "li:has(a)" ).live( "tap", function(event) {
|
||||
if( !$(event.target).is('a') ){
|
||||
$( this ).find( "a:first" ).ajaxClick();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_createSubPages: function() {
|
||||
var parentId = this.element.closest( ".ui-page" ).attr( "id" ),
|
||||
o = this.options;
|
||||
$( this.element.find( "ul,ol" ).get().reverse() ).each(function( i ) {
|
||||
var list = $( this ),
|
||||
id = parentId + "&" + $.mobile.subPageUrlKey + "=listview-" + i,
|
||||
parent = list.parent(),
|
||||
title = parent.contents()[ 0 ].nodeValue,
|
||||
theme = list.data( "theme" ) || o.theme,
|
||||
countTheme = list.data( "count-theme" ) || o.countTheme;
|
||||
|
||||
list.wrap( "<div class='ui-page'><div class='ui-content'></div></div>" )
|
||||
.parent()
|
||||
.before( "<div class='ui-header ui-bar-" + o.headerTheme + "'><h1>" +
|
||||
title + "</h1><a href='#' class='ui-back' data-icon='arrow-l'>Back</a></div>" )
|
||||
.parent()
|
||||
.attr({
|
||||
id: id,
|
||||
"data-theme": theme,
|
||||
"data-count-theme": countTheme
|
||||
})
|
||||
.appendTo( "body" )
|
||||
.fixHeaderFooter()
|
||||
.find( ".ui-header a.ui-back" )
|
||||
.buttonMarkup()
|
||||
.click(function() {
|
||||
history.go(-1);
|
||||
return false;
|
||||
});
|
||||
|
||||
parent.html( "<a href='#" + id + "'>" + title + "</a>" );
|
||||
}).listview();
|
||||
},
|
||||
|
||||
// JS fallback for auto-numbering for OL elements
|
||||
_numberItems: function() {
|
||||
if ( $.support.cssPseudoElement || !this.element.is( "ol" ) ) {
|
||||
return;
|
||||
}
|
||||
var counter = 1;
|
||||
this.element.find( ".ui-li-dec" ).remove();
|
||||
this.element.find( "li:visible" ).each(function() {
|
||||
if( $( this ).is( ".ui-li-grouping" ) ) {
|
||||
//reset counter when a grouping heading is encountered
|
||||
counter = 1;
|
||||
} else {
|
||||
$( this )
|
||||
.find( ".ui-link-inherit:first" )
|
||||
.addClass( "ui-li-jsnumbering" )
|
||||
.prepend( "<span class='ui-li-dec'>" + (counter++) + ". </span>" );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* jQuery Mobile Framework : prototype for "navlist" plugin
|
||||
* Copyright (c) jQuery Project
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* Note: Code is in draft form and is subject to change
|
||||
*/
|
||||
(function($){
|
||||
$.fn.navlist = function(settings){
|
||||
return $(this).each(function(){
|
||||
|
||||
var o = $.extend({
|
||||
moreText: 'More',
|
||||
iconpos: $(this).data('iconpos') || 'top',
|
||||
transition: $(this).data('transition') || 'slideup'
|
||||
},settings);
|
||||
|
||||
//wrap it with footer classes
|
||||
var $navlist = $(this).addClass('ui-navlist'),
|
||||
numTabs = $navlist.find('li').length,
|
||||
moreIcon = $navlist.find('a[data-icon]').length ? 'arrow-r' : null;
|
||||
|
||||
if( moreIcon == null ){
|
||||
o.iconpos = null;
|
||||
$navlist.add( $navlist.children(0) ).addClass('ui-navlist-noicons');
|
||||
}
|
||||
|
||||
$navlist
|
||||
.find('ul')
|
||||
.grid({grid: numTabs > 2 ? 'b' : 'a'})
|
||||
|
||||
if(numTabs > 3 ){
|
||||
var moreId = o.thisId + "&" + jQuery.mobile.subPageUrlKey + "=navlist",
|
||||
$navToggle = $('<a href="#'+ moreId +'" data-transition="'+ o.transition +'">' + o.moreText + '</a>'),
|
||||
$truncatedLis = $navlist.find('li:gt(2)'),
|
||||
$newPage = $('<div id="'+ moreId +'" class="ui-page ui-navlist-expanded ui-body-a"><div data-role="header"><h1>' + o.moreText + '</h1></div><div data-role="content"></div></div>'),
|
||||
$newPageContent = $navlist.find('ul').clone();
|
||||
|
||||
$newPageContent
|
||||
.find('a')
|
||||
.buttonMarkup({shadow: false, corners: false, iconpos: o.iconpos});
|
||||
|
||||
$newPage.append( $newPageContent ).appendTo('body');
|
||||
|
||||
$navToggle
|
||||
.wrap('<div class="ui-navlist-toggle"></div>')
|
||||
.parent()
|
||||
.appendTo($navlist);
|
||||
|
||||
$navToggle.buttonMarkup({corners: false, shadow:false, iconpos: o.iconpos, icon: moreIcon});
|
||||
|
||||
$navlist.addClass('ui-navlist-collapsed');
|
||||
|
||||
$truncatedLis.addClass('ui-navlist-truncate');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$navlist
|
||||
.find('ul a')
|
||||
.buttonMarkup({corners: false, shadow:false, iconpos: o.iconpos})
|
||||
.bind('tap',function(){
|
||||
//NOTE: we'll need to find a way to highlight an active tab at load as well
|
||||
$navlist.find('.ui-btn-active').removeClass('ui-btn-active');
|
||||
$(this).addClass('ui-btn-active');
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
Possible additions:
|
||||
scollTop
|
||||
CSS Matrix
|
||||
*/
|
||||
|
||||
$.extend( $.support, {
|
||||
orientation: "orientation" in window,
|
||||
touch: "ontouchend" in document,
|
||||
WebKitAnimationEvent: typeof WebKitTransitionEvent === "object",
|
||||
pushState: !!history.pushState
|
||||
});
|
||||
|
||||
(function() {
|
||||
var fakeBody = $( "<body>" ).prependTo( "html" ),
|
||||
displayDiv = $( "<div style='height:5px;position:absolute;display:none;'/>" )
|
||||
.prependTo( fakeBody )[ 0 ],
|
||||
positionDiv = $( "<div style='position:absolute;left:10px;overflow:hidden;height:0;'>" +
|
||||
"<div style='height:10px;'/></div>").prependTo( fakeBody )[ 0 ],
|
||||
floatClearHtml = "<div style='width:5px;height:5px;float:left;'/>",
|
||||
floatClearWrap = $( "<div>" )
|
||||
.append( floatClearHtml + floatClearHtml )
|
||||
.prependTo( fakeBody ),
|
||||
floatClearDivs = floatClearWrap.children(),
|
||||
floatClearDiv1Top = floatClearDivs[ 0 ].offsetTop,
|
||||
floatClearDiv2 = floatClearDivs[ 1 ],
|
||||
supportFloatClear = false;
|
||||
|
||||
if ( floatClearDiv1Top === floatClearDiv2.offsetTop ) {
|
||||
floatClearDiv2.style.clear = "left";
|
||||
if ( floatClearDiv1Top !== floatClearDiv2.offsetTop ) {
|
||||
supportFloatClear = true;
|
||||
}
|
||||
}
|
||||
|
||||
$.extend( $.support, {
|
||||
display: displayDiv.offsetHeight === 0,
|
||||
position: positionDiv.offsetLeft === 10,
|
||||
overflow: positionDiv.offsetHeight === 0,
|
||||
floatclear: supportFloatClear,
|
||||
cssPseudoElement: fakeBody[0].style.content !== undefined
|
||||
});
|
||||
|
||||
fakeBody.remove();
|
||||
})();
|
||||
|
||||
// test whether a CSS media type or query applies
|
||||
$.media = (function() {
|
||||
// TODO: use window.matchMedia once at least one UA implements it
|
||||
var cache = {},
|
||||
$html = $( "html" ),
|
||||
testDiv = $( "<div id='jquery-mediatest'>" ),
|
||||
fakeBody = $( "<body>" ).append( testDiv );
|
||||
|
||||
return function( query ) {
|
||||
if ( !( query in cache ) ) {
|
||||
var styleBlock = $( "<style type='text/css'>" +
|
||||
"@media " + query + "{#jquery-mediatest{position:absolute;}}" +
|
||||
"</style>" );
|
||||
$html.prepend( fakeBody ).prepend( styleBlock );
|
||||
cache[ query ] = testDiv.css( "position" ) === "absolute";
|
||||
fakeBody.add( styleBlock ).remove();
|
||||
}
|
||||
return cache[ query ];
|
||||
};
|
||||
})();
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
(function( $ ) {
|
||||
|
||||
$.widget( "mobile.widget", {
|
||||
_getCreateOptions: function() {
|
||||
var elem = this.element,
|
||||
options = {};
|
||||
$.each( this.options, function( option ) {
|
||||
var value = elem.data( option.replace( /[A-Z]/g, function( char ) {
|
||||
return "-" + char.toLowerCase();
|
||||
} ) );
|
||||
if ( value !== undefined ) {
|
||||
options[ option ] = value;
|
||||
}
|
||||
});
|
||||
return options;
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
|
@ -1,262 +0,0 @@
|
|||
/*!
|
||||
* jQuery UI Widget @VERSION
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Widget
|
||||
*/
|
||||
(function( $, undefined ) {
|
||||
|
||||
// jQuery 1.4+
|
||||
if ( $.cleanData ) {
|
||||
var _cleanData = $.cleanData;
|
||||
$.cleanData = function( elems ) {
|
||||
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
||||
$( elem ).triggerHandler( "remove" );
|
||||
}
|
||||
_cleanData( elems );
|
||||
};
|
||||
} else {
|
||||
var _remove = $.fn.remove;
|
||||
$.fn.remove = function( selector, keepData ) {
|
||||
return this.each(function() {
|
||||
if ( !keepData ) {
|
||||
if ( !selector || $.filter( selector, [ this ] ).length ) {
|
||||
$( "*", this ).add( [ this ] ).each(function() {
|
||||
$( this ).triggerHandler( "remove" );
|
||||
});
|
||||
}
|
||||
}
|
||||
return _remove.call( $(this), selector, keepData );
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
$.widget = function( name, base, prototype ) {
|
||||
var namespace = name.split( "." )[ 0 ],
|
||||
fullName;
|
||||
name = name.split( "." )[ 1 ];
|
||||
fullName = namespace + "-" + name;
|
||||
|
||||
if ( !prototype ) {
|
||||
prototype = base;
|
||||
base = $.Widget;
|
||||
}
|
||||
|
||||
// create selector for plugin
|
||||
$.expr[ ":" ][ fullName ] = function( elem ) {
|
||||
return !!$.data( elem, name );
|
||||
};
|
||||
|
||||
$[ namespace ] = $[ namespace ] || {};
|
||||
$[ namespace ][ name ] = function( options, element ) {
|
||||
// allow instantiation without initializing for simple inheritance
|
||||
if ( arguments.length ) {
|
||||
this._createWidget( options, element );
|
||||
}
|
||||
};
|
||||
|
||||
var 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
|
||||
// $.each( basePrototype, function( key, val ) {
|
||||
// if ( $.isPlainObject(val) ) {
|
||||
// basePrototype[ key ] = $.extend( {}, val );
|
||||
// }
|
||||
// });
|
||||
basePrototype.options = $.extend( true, {}, basePrototype.options );
|
||||
$[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
|
||||
namespace: namespace,
|
||||
widgetName: name,
|
||||
widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
|
||||
widgetBaseClass: fullName
|
||||
}, prototype );
|
||||
|
||||
$.widget.bridge( name, $[ namespace ][ name ] );
|
||||
};
|
||||
|
||||
$.widget.bridge = function( name, object ) {
|
||||
$.fn[ name ] = function( options ) {
|
||||
var isMethodCall = typeof options === "string",
|
||||
args = Array.prototype.slice.call( arguments, 1 ),
|
||||
returnValue = this;
|
||||
|
||||
// allow multiple hashes to be passed on init
|
||||
options = !isMethodCall && args.length ?
|
||||
$.extend.apply( null, [ true, options ].concat(args) ) :
|
||||
options;
|
||||
|
||||
// prevent calls to internal methods
|
||||
if ( isMethodCall && options.charAt( 0 ) === "_" ) {
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
if ( isMethodCall ) {
|
||||
this.each(function() {
|
||||
var instance = $.data( this, name );
|
||||
if ( !instance ) {
|
||||
throw "cannot call methods on " + name + " prior to initialization; " +
|
||||
"attempted to call method '" + options + "'";
|
||||
}
|
||||
if ( !$.isFunction( instance[options] ) ) {
|
||||
throw "no such method '" + options + "' for " + name + " widget instance";
|
||||
}
|
||||
var methodValue = instance[ options ].apply( instance, args );
|
||||
if ( methodValue !== instance && methodValue !== undefined ) {
|
||||
returnValue = methodValue;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.each(function() {
|
||||
var instance = $.data( this, name );
|
||||
if ( instance ) {
|
||||
instance.option( options || {} )._init();
|
||||
} else {
|
||||
$.data( this, name, new object( options, this ) );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
};
|
||||
};
|
||||
|
||||
$.Widget = function( options, element ) {
|
||||
// allow instantiation without initializing for simple inheritance
|
||||
if ( arguments.length ) {
|
||||
this._createWidget( options, element );
|
||||
}
|
||||
};
|
||||
|
||||
$.Widget.prototype = {
|
||||
widgetName: "widget",
|
||||
widgetEventPrefix: "",
|
||||
options: {
|
||||
disabled: false
|
||||
},
|
||||
_createWidget: function( options, element ) {
|
||||
// $.widget.bridge stores the plugin instance, but we do it anyway
|
||||
// so that it's stored even before the _create function runs
|
||||
$.data( element, this.widgetName, this );
|
||||
this.element = $( element );
|
||||
this.options = $.extend( true, {},
|
||||
this.options,
|
||||
this._getCreateOptions(),
|
||||
options );
|
||||
|
||||
var self = this;
|
||||
this.element.bind( "remove." + this.widgetName, function() {
|
||||
self.destroy();
|
||||
});
|
||||
|
||||
this._create();
|
||||
this._trigger( "create" );
|
||||
this._init();
|
||||
},
|
||||
_getCreateOptions: function() {
|
||||
var options = {};
|
||||
if ( $.metadata ) {
|
||||
options = $.metadata.get( element )[ this.widgetName ];
|
||||
}
|
||||
return options;
|
||||
},
|
||||
_create: function() {},
|
||||
_init: function() {},
|
||||
|
||||
destroy: function() {
|
||||
this.element
|
||||
.unbind( "." + this.widgetName )
|
||||
.removeData( this.widgetName );
|
||||
this.widget()
|
||||
.unbind( "." + this.widgetName )
|
||||
.removeAttr( "aria-disabled" )
|
||||
.removeClass(
|
||||
this.widgetBaseClass + "-disabled " +
|
||||
"ui-state-disabled" );
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.element;
|
||||
},
|
||||
|
||||
option: function( key, value ) {
|
||||
var options = key;
|
||||
|
||||
if ( arguments.length === 0 ) {
|
||||
// don't return a reference to the internal hash
|
||||
return $.extend( {}, this.options );
|
||||
}
|
||||
|
||||
if (typeof key === "string" ) {
|
||||
if ( value === undefined ) {
|
||||
return this.options[ key ];
|
||||
}
|
||||
options = {};
|
||||
options[ key ] = value;
|
||||
}
|
||||
|
||||
this._setOptions( options );
|
||||
|
||||
return this;
|
||||
},
|
||||
_setOptions: function( options ) {
|
||||
var self = this;
|
||||
$.each( options, function( key, value ) {
|
||||
self._setOption( key, value );
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
_setOption: function( key, value ) {
|
||||
this.options[ key ] = value;
|
||||
|
||||
if ( key === "disabled" ) {
|
||||
this.widget()
|
||||
[ value ? "addClass" : "removeClass"](
|
||||
this.widgetBaseClass + "-disabled" + " " +
|
||||
"ui-state-disabled" )
|
||||
.attr( "aria-disabled", value );
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
enable: function() {
|
||||
return this._setOption( "disabled", false );
|
||||
},
|
||||
disable: function() {
|
||||
return this._setOption( "disabled", true );
|
||||
},
|
||||
|
||||
_trigger: function( type, event, data ) {
|
||||
var callback = this.options[ type ];
|
||||
|
||||
event = $.Event( event );
|
||||
event.type = ( type === this.widgetEventPrefix ?
|
||||
type :
|
||||
this.widgetEventPrefix + type ).toLowerCase();
|
||||
data = data || {};
|
||||
|
||||
// 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 ( event.originalEvent ) {
|
||||
for ( var i = $.event.props.length, prop; i; ) {
|
||||
prop = $.event.props[ --i ];
|
||||
event[ prop ] = event.originalEvent[ prop ];
|
||||
}
|
||||
}
|
||||
|
||||
this.element.trigger( event, data );
|
||||
|
||||
return !( $.isFunction(callback) &&
|
||||
callback.call( this.element[0], event, data ) === false ||
|
||||
event.isDefaultPrevented() );
|
||||
}
|
||||
};
|
||||
|
||||
})( jQuery );
|
||||
Loading…
Reference in a new issue