diff --git a/webclient/css/iscroll-pull-icon@2x.png b/webclient/css/iscroll-pull-icon@2x.png new file mode 100755 index 0000000..97c8bda Binary files /dev/null and b/webclient/css/iscroll-pull-icon@2x.png differ diff --git a/webclient/css/jquery.mobile-1.3.0-rc.1.bak.css b/webclient/css/jquery.mobile-1.3.0-rc.1.bak.css deleted file mode 100644 index 72c253a..0000000 --- a/webclient/css/jquery.mobile-1.3.0-rc.1.bak.css +++ /dev/null @@ -1,3357 +0,0 @@ -/* -* jQuery Mobile Git Build: SHA1: 56a6976b89feddf34e163c3fcc7196ae0a44c1a0 <> Date: Mon Feb 4 08:28:28 2013 -0800 -* http://jquerymobile.com -* -* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors -* Released under the MIT license. -* http://jquery.org/license -* -*/ - - -/* Swatches */ -/* A ------------------------------------------------------------------------------------------------------------*/ -.ui-bar-a { - border: 1px solid #333 /*{a-bar-border}*/; - background: #111 /*{a-bar-background-color}*/; - color: #fff /*{a-bar-color}*/; - font-weight: bold; - text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 0 /*{a-bar-shadow-radius}*/ #000 /*{a-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #3c3c3c /*{a-bar-background-start}*/), to( #111 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); -} -.ui-bar-a, -.ui-bar-a input, -.ui-bar-a select, -.ui-bar-a textarea, -.ui-bar-a button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-bar-a .ui-link-inherit { - color: #fff /*{a-bar-color}*/; -} -.ui-bar-a a.ui-link { - color: #7cc4e7 /*{a-bar-link-color}*/; - font-weight: bold; -} -.ui-bar-a a.ui-link:visited { - color: #2489ce /*{a-bar-link-visited}*/; -} -.ui-bar-a a.ui-link:hover { - color: #2489ce /*{a-bar-link-hover}*/; -} -.ui-bar-a a.ui-link:active { - color: #2489ce /*{a-bar-link-active}*/; -} -.ui-body-a, -.ui-overlay-a { - border: 1px solid #444 /*{a-body-border}*/; - background: #222 /*{a-body-background-color}*/; - color: #fff /*{a-body-color}*/; - text-shadow: 0 /*{a-body-shadow-x}*/ 1px /*{a-body-shadow-y}*/ 0 /*{a-body-shadow-radius}*/ #111 /*{a-body-shadow-color}*/; - font-weight: normal; - background-image: -webkit-gradient(linear, left top, left bottom, from( #444 /*{a-body-background-start}*/), to( #222 /*{a-body-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); -} -.ui-overlay-a { - background-image: none; - border-width: 0; -} -.ui-body-a, -.ui-body-a input, -.ui-body-a select, -.ui-body-a textarea, -.ui-body-a button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-body-a .ui-link-inherit { - color: #fff /*{a-body-color}*/; -} -.ui-body-a .ui-link { - color: #2489ce /*{a-body-link-color}*/; - font-weight: bold; -} -.ui-body-a .ui-link:visited { - color: #2489ce /*{a-body-link-visited}*/; -} -.ui-body-a .ui-link:hover { - color: #2489ce /*{a-body-link-hover}*/; -} -.ui-body-a .ui-link:active { - color: #2489ce /*{a-body-link-active}*/; -} -.ui-btn-up-a { - border: 1px solid #111 /*{a-bup-border}*/; - background: #333 /*{a-bup-background-color}*/; - font-weight: bold; - color: #fff /*{a-bup-color}*/; - text-shadow: 0 /*{a-bup-shadow-x}*/ 1px /*{a-bup-shadow-y}*/ 0 /*{a-bup-shadow-radius}*/ #111 /*{a-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #444 /*{a-bup-background-start}*/), to( #2d2d2d /*{a-bup-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); -} -.ui-btn-up-a:visited, -.ui-btn-up-a a.ui-link-inherit { - color: #fff /*{a-bup-color}*/; -} -.ui-btn-hover-a { - border: 1px solid #000 /*{a-bhover-border}*/; - background: #444 /*{a-bhover-background-color}*/; - font-weight: bold; - color: #fff /*{a-bhover-color}*/; - text-shadow: 0 /*{a-bhover-shadow-x}*/ 1px /*{a-bhover-shadow-y}*/ 0 /*{a-bhover-shadow-radius}*/ #111 /*{a-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #555 /*{a-bhover-background-start}*/), to( #383838 /*{a-bhover-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); -} -.ui-btn-hover-a:visited, -.ui-btn-hover-a:hover, -.ui-btn-hover-a a.ui-link-inherit { - color: #fff /*{a-bhover-color}*/; -} -.ui-btn-down-a { - border: 1px solid #000 /*{a-bdown-border}*/; - background: #222 /*{a-bdown-background-color}*/; - font-weight: bold; - color: #fff /*{a-bdown-color}*/; - text-shadow: 0 /*{a-bdown-shadow-x}*/ 1px /*{a-bdown-shadow-y}*/ 0 /*{a-bdown-shadow-radius}*/ #111 /*{a-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #202020 /*{a-bdown-background-start}*/), to( #2c2c2c /*{a-bdown-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); -} -.ui-btn-down-a:visited, -.ui-btn-down-a:hover, -.ui-btn-down-a a.ui-link-inherit { - color: #fff /*{a-bdown-color}*/; -} -.ui-btn-up-a, -.ui-btn-hover-a, -.ui-btn-down-a { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; - text-decoration: none; -} -/* B ------------------------------------------------------------------------------------------------------------*/ -.ui-bar-b { - border: 1px solid #456f9a /*{b-bar-border}*/; - background: #5e87b0 /*{b-bar-background-color}*/; - color: #fff /*{b-bar-color}*/; - font-weight: bold; - text-shadow: 0 /*{b-bar-shadow-x}*/ 1px /*{b-bar-shadow-y}*/ 0 /*{b-bar-shadow-radius}*/ #3e6790 /*{b-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #6facd5 /*{b-bar-background-start}*/), to( #497bae /*{b-bar-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); -} -.ui-bar-b, -.ui-bar-b input, -.ui-bar-b select, -.ui-bar-b textarea, -.ui-bar-b button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-bar-b .ui-link-inherit { - color: #fff /*{b-bar-color}*/; -} -.ui-bar-b a.ui-link { - color: #ddf0f8 /*{b-bar-link-color}*/; - font-weight: bold; -} -.ui-bar-b a.ui-link:visited { - color: #ddf0f8 /*{b-bar-link-visited}*/; -} -.ui-bar-b a.ui-link:hover { - color: #ddf0f8 /*{b-bar-link-hover}*/; -} -.ui-bar-b a.ui-link:active { - color: #ddf0f8 /*{b-bar-link-active}*/; -} -.ui-body-b, -.ui-overlay-b { - border: 1px solid #999 /*{b-body-border}*/; - background: #f3f3f3 /*{b-body-background-color}*/; - color: #222 /*{b-body-color}*/; - text-shadow: 0 /*{b-body-shadow-x}*/ 1px /*{b-body-shadow-y}*/ 0 /*{b-body-shadow-radius}*/ #fff /*{b-body-shadow-color}*/; - font-weight: normal; - background-image: -webkit-gradient(linear, left top, left bottom, from( #ddd /*{b-body-background-start}*/), to( #ccc /*{b-body-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); -} -.ui-overlay-b { - background-image: none; - border-width: 0; -} -.ui-body-b, -.ui-body-b input, -.ui-body-b select, -.ui-body-b textarea, -.ui-body-b button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-body-b .ui-link-inherit { - color: #333 /*{b-body-color}*/; -} -.ui-body-b .ui-link { - color: #2489ce /*{b-body-link-color}*/; - font-weight: bold; -} -.ui-body-b .ui-link:visited { - color: #2489ce /*{b-body-link-visited}*/; -} -.ui-body-b .ui-link:hover { - color: #2489ce /*{b-body-link-hover}*/; -} -.ui-body-b .ui-link:active { - color: #2489ce /*{b-body-link-active}*/; -} -.ui-btn-up-b { - border: 1px solid #044062 /*{b-bup-border}*/; - background: #396b9e /*{b-bup-background-color}*/; - font-weight: bold; - color: #fff /*{b-bup-color}*/; - text-shadow: 0 /*{b-bup-shadow-x}*/ 1px /*{b-bup-shadow-y}*/ 0 /*{b-bup-shadow-radius}*/ #194b7e /*{b-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #5f9cc5 /*{b-bup-background-start}*/), to( #396b9e /*{b-bup-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); -} -.ui-btn-up-b:visited, -.ui-btn-up-b a.ui-link-inherit { - color: #fff /*{b-bup-color}*/; -} -.ui-btn-hover-b { - border: 1px solid #00415e /*{b-bhover-border}*/; - background: #4b88b6 /*{b-bhover-background-color}*/; - font-weight: bold; - color: #fff /*{b-bhover-color}*/; - text-shadow: 0 /*{b-bhover-shadow-x}*/ 1px /*{b-bhover-shadow-y}*/ 0 /*{b-bhover-shadow-radius}*/ #194b7e /*{b-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #6facd5 /*{b-bhover-background-start}*/), to( #4272a4 /*{b-bhover-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); -} -.ui-btn-hover-b:visited, -.ui-btn-hover-b:hover, -.ui-btn-hover-b a.ui-link-inherit { - color: #fff /*{b-bhover-color}*/; -} -.ui-btn-down-b { - border: 1px solid #225377 /*{b-bdown-border}*/; - background: #4e89c5 /*{b-bdown-background-color}*/; - font-weight: bold; - color: #fff /*{b-bdown-color}*/; - text-shadow: 0 /*{b-bdown-shadow-x}*/ 1px /*{b-bdown-shadow-y}*/ 0 /*{b-bdown-shadow-radius}*/ #194b7e /*{b-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #295b8e /*{b-bdown-background-start}*/), to( #3e79b5 /*{b-bdown-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); -} -.ui-btn-down-b:visited, -.ui-btn-down-b:hover, -.ui-btn-down-b a.ui-link-inherit { - color: #fff /*{b-bdown-color}*/; -} -.ui-btn-up-b, -.ui-btn-hover-b, -.ui-btn-down-b { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; - text-decoration: none; -} -/* C ------------------------------------------------------------------------------------------------------------*/ -.ui-bar-c { - border: 1px solid #b3b3b3 /*{c-bar-border}*/; - background: #eee /*{c-bar-background-color}*/; - color: #3e3e3e /*{c-bar-color}*/; - font-weight: bold; - text-shadow: 0 /*{c-bar-shadow-x}*/ 1px /*{c-bar-shadow-y}*/ 0 /*{c-bar-shadow-radius}*/ #fff /*{c-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #f0f0f0 /*{c-bar-background-start}*/), to( #ddd /*{c-bar-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); -} -.ui-bar-c .ui-link-inherit { - color: #3e3e3e /*{c-bar-color}*/; -} -.ui-bar-c a.ui-link { - color: #7cc4e7 /*{c-bar-link-color}*/; - font-weight: bold; -} -.ui-bar-c a.ui-link:visited { - color: #2489ce /*{c-bar-link-visited}*/; -} -.ui-bar-c a.ui-link:hover { - color: #2489ce /*{c-bar-link-hover}*/; -} -.ui-bar-c a.ui-link:active { - color: #2489ce /*{c-bar-link-active}*/; -} -.ui-bar-c, -.ui-bar-c input, -.ui-bar-c select, -.ui-bar-c textarea, -.ui-bar-c button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-body-c, -.ui-overlay-c { - border: 1px solid #aaa /*{c-body-border}*/; - color: #333 /*{c-body-color}*/; - text-shadow: 0 /*{c-body-shadow-x}*/ 1px /*{c-body-shadow-y}*/ 0 /*{c-body-shadow-radius}*/ #fff /*{c-body-shadow-color}*/; - background: #f9f9f9 /*{c-body-background-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #f9f9f9 /*{c-body-background-start}*/), to( #eee /*{c-body-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eee /*{c-body-background-end}*/); -} -.ui-overlay-c { - background-image: none; - border-width: 0; -} -.ui-body-c, -.ui-body-c input, -.ui-body-c select, -.ui-body-c textarea, -.ui-body-c button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-body-c .ui-link-inherit { - color: #333 /*{c-body-color}*/; -} -.ui-body-c .ui-link { - color: #2489ce /*{c-body-link-color}*/; - font-weight: bold; -} -.ui-body-c .ui-link:visited { - color: #2489ce /*{c-body-link-visited}*/; -} -.ui-body-c .ui-link:hover { - color: #2489ce /*{c-body-link-hover}*/; -} -.ui-body-c .ui-link:active { - color: #2489ce /*{c-body-link-active}*/; -} -.ui-btn-up-c { - border: 1px solid #ccc /*{c-bup-border}*/; - background: #eee /*{c-bup-background-color}*/; - font-weight: bold; - color: #222 /*{c-bup-color}*/; - text-shadow: 0 /*{c-bup-shadow-x}*/ 1px /*{c-bup-shadow-y}*/ 0 /*{c-bup-shadow-radius}*/ #fff /*{c-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #fff /*{c-bup-background-start}*/), to( #f1f1f1 /*{c-bup-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #fff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); -} -.ui-btn-up-c:visited, -.ui-btn-up-c a.ui-link-inherit { - color: #2f3e46 /*{c-bup-color}*/; -} -.ui-btn-hover-c { - border: 1px solid #bbb /*{c-bhover-border}*/; - background: #dfdfdf /*{c-bhover-background-color}*/; - font-weight: bold; - color: #222 /*{c-bhover-color}*/; - text-shadow: 0 /*{c-bhover-shadow-x}*/ 1px /*{c-bhover-shadow-y}*/ 0 /*{c-bhover-shadow-radius}*/ #fff /*{c-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #f6f6f6 /*{c-bhover-background-start}*/), to( #e0e0e0 /*{c-bhover-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); -} -.ui-btn-hover-c:visited, -.ui-btn-hover-c:hover, -.ui-btn-hover-c a.ui-link-inherit { - color: #2f3e46 /*{c-bhover-color}*/; -} -.ui-btn-down-c { - border: 1px solid #bbb /*{c-bdown-border}*/; - background: #d6d6d6 /*{c-bdown-background-color}*/; - font-weight: bold; - color: #222 /*{c-bdown-color}*/; - text-shadow: 0 /*{c-bdown-shadow-x}*/ 1px /*{c-bdown-shadow-y}*/ 0 /*{c-bdown-shadow-radius}*/ #fff /*{c-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #d0d0d0 /*{c-bdown-background-start}*/), to( #dfdfdf /*{c-bdown-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); -} -.ui-btn-down-c:visited, -.ui-btn-down-c:hover, -.ui-btn-down-c a.ui-link-inherit { - color: #2f3e46 /*{c-bdown-color}*/; -} -.ui-btn-up-c, -.ui-btn-hover-c, -.ui-btn-down-c { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; - text-decoration: none; -} -/* D ------------------------------------------------------------------------------------------------------------*/ -.ui-bar-d { - border: 1px solid #bbb /*{d-bar-border}*/; - background: #bbb /*{d-bar-background-color}*/; - color: #333 /*{d-bar-color}*/; - font-weight: bold; - text-shadow: 0 /*{d-bar-shadow-x}*/ 1px /*{d-bar-shadow-y}*/ 0 /*{d-bar-shadow-radius}*/ #eee /*{d-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #ddd /*{d-bar-background-start}*/), to( #bbb /*{d-bar-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); -} -.ui-bar-d, -.ui-bar-d input, -.ui-bar-d select, -.ui-bar-d textarea, -.ui-bar-d button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-bar-d .ui-link-inherit { - color: #333 /*{d-bar-color}*/; -} -.ui-bar-d a.ui-link { - color: #2489ce /*{d-bar-link-color}*/; - font-weight: bold; -} -.ui-bar-d a.ui-link:visited { - color: #2489ce /*{d-bar-link-visited}*/; -} -.ui-bar-d a.ui-link:hover { - color: #2489ce /*{d-bar-link-hover}*/; -} -.ui-bar-d a.ui-link:active { - color: #2489ce /*{d-bar-link-active}*/; -} -.ui-body-d, -.ui-overlay-d { - border: 1px solid #bbb /*{d-body-border}*/; - color: #333 /*{d-body-color}*/; - text-shadow: 0 /*{d-body-shadow-x}*/ 1px /*{d-body-shadow-y}*/ 0 /*{d-body-shadow-radius}*/ #fff /*{d-body-shadow-color}*/; - background: #fff /*{d-body-background-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #fff /*{d-body-background-start}*/), to( #fff /*{d-body-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); -} -.ui-overlay-d { - background-image: none; - border-width: 0; -} -.ui-body-d, -.ui-body-d input, -.ui-body-d select, -.ui-body-d textarea, -.ui-body-d button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-body-d .ui-link-inherit { - color: #333 /*{d-body-color}*/; -} -.ui-body-d .ui-link { - color: #2489ce /*{d-body-link-color}*/; - font-weight: bold; -} -.ui-body-d .ui-link:visited { - color: #2489ce /*{d-body-link-visited}*/; -} -.ui-body-d .ui-link:hover { - color: #2489ce /*{d-body-link-hover}*/; -} -.ui-body-d .ui-link:active { - color: #2489ce /*{d-body-link-active}*/; -} -.ui-btn-up-d { - border: 1px solid #bbb /*{d-bup-border}*/; - background: #fff /*{d-bup-background-color}*/; - font-weight: bold; - color: #333 /*{d-bup-color}*/; - text-shadow: 0 /*{d-bup-shadow-x}*/ 1px /*{d-bup-shadow-y}*/ 0 /*{d-bup-shadow-radius}*/ #fff /*{d-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #fafafa /*{d-bup-background-start}*/), to( #f6f6f6 /*{d-bup-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); -} -.ui-btn-up-d:visited, -.ui-btn-up-d a.ui-link-inherit { - color: #333 /*{d-bup-color}*/; -} -.ui-btn-hover-d { - border: 1px solid #aaa /*{d-bhover-border}*/; - background: #eee /*{d-bhover-background-color}*/; - font-weight: bold; - color: #333 /*{d-bhover-color}*/; - cursor: pointer; - text-shadow: 0 /*{d-bhover-shadow-x}*/ 1px /*{d-bhover-shadow-y}*/ 0 /*{d-bhover-shadow-radius}*/ #fff /*{d-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #eee /*{d-bhover-background-start}*/), to( #fff /*{d-bhover-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); -} -.ui-btn-hover-d:visited, -.ui-btn-hover-d:hover, -.ui-btn-hover-d a.ui-link-inherit { - color: #333 /*{d-bhover-color}*/; -} -.ui-btn-down-d { - border: 1px solid #aaa /*{d-bdown-border}*/; - background: #eee /*{d-bdown-background-color}*/; - font-weight: bold; - color: #333 /*{d-bdown-color}*/; - text-shadow: 0 /*{d-bdown-shadow-x}*/ 1px /*{d-bdown-shadow-y}*/ 0 /*{d-bdown-shadow-radius}*/ #fff /*{d-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #e5e5e5 /*{d-bdown-background-start}*/), to( #f2f2f2 /*{d-bdown-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); -} -.ui-btn-down-d:visited, -.ui-btn-down-d:hover, -.ui-btn-down-d a.ui-link-inherit { - color: #333 /*{d-bdown-color}*/; -} -.ui-btn-up-d, -.ui-btn-hover-d, -.ui-btn-down-d { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; - text-decoration: none; -} -/* E ------------------------------------------------------------------------------------------------------------*/ -.ui-bar-e { - border: 1px solid #f7c942 /*{e-bar-border}*/; - background: #fadb4e /*{e-bar-background-color}*/; - color: #333 /*{e-bar-color}*/; - font-weight: bold; - text-shadow: 0 /*{e-bar-shadow-x}*/ 1px /*{e-bar-shadow-y}*/ 0 /*{e-bar-shadow-radius}*/ #fff /*{e-bar-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #fceda7 /*{e-bar-background-start}*/), to( #fbef7e /*{e-bar-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); -} -.ui-bar-e, -.ui-bar-e input, -.ui-bar-e select, -.ui-bar-e textarea, -.ui-bar-e button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-bar-e .ui-link-inherit { - color: #333 /*{e-bar-color}*/; -} -.ui-bar-e a.ui-link { - color: #2489ce /*{e-bar-link-color}*/; - font-weight: bold; -} -.ui-bar-e a.ui-link:visited { - color: #2489ce /*{e-bar-link-visited}*/; -} -.ui-bar-e a.ui-link:hover { - color: #2489ce /*{e-bar-link-hover}*/; -} -.ui-bar-e a.ui-link:active { - color: #2489ce /*{e-bar-link-active}*/; -} -.ui-body-e, -.ui-overlay-e { - border: 1px solid #f7c942 /*{e-body-border}*/; - color: #222 /*{e-body-color}*/; - text-shadow: 0 /*{e-body-shadow-x}*/ 1px /*{e-body-shadow-y}*/ 0 /*{e-body-shadow-radius}*/ #fff /*{e-body-shadow-color}*/; - background: #fff9df /*{e-body-background-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #fffadf /*{e-body-background-start}*/), to( #fff3a5 /*{e-body-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); -} -.ui-overlay-e { - background-image: none; - border-width: 0; -} -.ui-body-e, -.ui-body-e input, -.ui-body-e select, -.ui-body-e textarea, -.ui-body-e button { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-body-e .ui-link-inherit { - color: #222 /*{e-body-color}*/; -} -.ui-body-e .ui-link { - color: #2489ce /*{e-body-link-color}*/; - font-weight: bold; -} -.ui-body-e .ui-link:visited { - color: #2489ce /*{e-body-link-visited}*/; -} -.ui-body-e .ui-link:hover { - color: #2489ce /*{e-body-link-hover}*/; -} -.ui-body-e .ui-link:active { - color: #2489ce /*{e-body-link-active}*/; -} -.ui-btn-up-e { - border: 1px solid #f4c63f /*{e-bup-border}*/; - background: #fadb4e /*{e-bup-background-color}*/; - font-weight: bold; - color: #222 /*{e-bup-color}*/; - text-shadow: 0 /*{e-bup-shadow-x}*/ 1px /*{e-bup-shadow-y}*/ 0 /*{e-bup-shadow-radius}*/ #fff /*{e-bup-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #ffefaa /*{e-bup-background-start}*/), to( #ffe155 /*{e-bup-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); -} -.ui-btn-up-e:visited, -.ui-btn-up-e a.ui-link-inherit { - color: #222 /*{e-bup-color}*/; -} -.ui-btn-hover-e { - border: 1px solid #f2c43d /*{e-bhover-border}*/; - background: #fbe26f /*{e-bhover-background-color}*/; - font-weight: bold; - color: #111 /*{e-bhover-color}*/; - text-shadow: 0 /*{e-bhover-shadow-x}*/ 1px /*{e-bhover-shadow-y}*/ 0 /*{e-bhover-shadow-radius}*/ #fff /*{e-bhover-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #fff5ba /*{e-bhover-background-start}*/), to( #fbdd52 /*{e-bhover-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); -} -.ui-btn-hover-e:visited, -.ui-btn-hover-e:hover, -.ui-btn-hover-e a.ui-link-inherit { - color: #333 /*{e-bhover-color}*/; -} -.ui-btn-down-e { - border: 1px solid #f2c43d /*{e-bdown-border}*/; - background: #fceda7 /*{e-bdown-background-color}*/; - font-weight: bold; - color: #111 /*{e-bdown-color}*/; - text-shadow: 0 /*{e-bdown-shadow-x}*/ 1px /*{e-bdown-shadow-y}*/ 0 /*{e-bdown-shadow-radius}*/ #fff /*{e-bdown-shadow-color}*/; - background-image: -webkit-gradient(linear, left top, left bottom, from( #f8d94c /*{e-bdown-background-start}*/), to( #fadb4e /*{e-bdown-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); -} -.ui-btn-down-e:visited, -.ui-btn-down-e:hover, -.ui-btn-down-e a.ui-link-inherit { - color: #333 /*{e-bdown-color}*/; -} -.ui-btn-up-e, -.ui-btn-hover-e, -.ui-btn-down-e { - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; - text-decoration: none; -} -/* Structure */ -/* links within "buttons" ------------------------------------------------------------------------------------------------------------*/ -a.ui-link-inherit { - text-decoration: none !important; -} -/* Active class used as the "on" state across all themes ------------------------------------------------------------------------------------------------------------*/ -.ui-btn-active { - border: 1px solid #2373a5 /*{global-active-border}*/; - background: #5393c5 /*{global-active-background-color}*/; - font-weight: bold; - color: #fff /*{global-active-color}*/; - cursor: pointer; - text-shadow: 0 /*{global-active-shadow-x}*/ 1px /*{global-active-shadow-y}*/ 0 /*{global-active-shadow-radius}*/ #3373a5 /*{global-active-shadow-color}*/; - text-decoration: none; - background-image: -webkit-gradient(linear, left top, left bottom, from( #5393c5 /*{global-active-background-start}*/), to( #6facd5 /*{global-active-background-end}*/)); /* Saf4+, Chrome */ - background-image: -webkit-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* Chrome 10+, Saf5.1+ */ - background-image: -moz-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* FF3.6 */ - background-image: -ms-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* IE10 */ - background-image: -o-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* Opera 11.10+ */ - background-image: linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); - font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/; -} -.ui-btn-active:visited, -.ui-btn-active:hover, -.ui-btn-active a.ui-link-inherit { - color: #fff /*{global-active-color}*/; -} -/* button inner top highlight ------------------------------------------------------------------------------------------------------------*/ -.ui-btn-inner { - border-top: 1px solid #fff; - border-color: rgba(255,255,255,.3); -} -/* corner rounding classes ------------------------------------------------------------------------------------------------------------*/ -.ui-corner-all { - -webkit-border-radius: .6em /*{global-radii-blocks}*/; - border-radius: .6em /*{global-radii-blocks}*/; -} -/* Form field separator ------------------------------------------------------------------------------------------------------------*/ -.ui-br { - border-color: rgb(130,130,130); - border-color: rgba(130,130,130,.3); - border-style: solid; -} -/* Interaction cues ------------------------------------------------------------------------------------------------------------*/ -.ui-disabled { - filter: Alpha(Opacity=30); - opacity: .3; - zoom: 1; -} -.ui-disabled, -.ui-disabled a { - cursor: default !important; - pointer-events: none; -} -/* Icons ------------------------------------------------------------------------------------------------------------*/ -.ui-icon, -.ui-icon-searchfield:after { - background-color: #666 /*{global-icon-color}*/; - background-color: rgba(0,0,0,.4) /*{global-icon-disc}*/; - background-image: url(../images/icons-18-white.png) /*{global-icon-set}*/; - background-repeat: no-repeat; - -webkit-border-radius: 9px; - border-radius: 9px; -} -/* Alt icon color ------------------------------------------------------------------------------------------------------------*/ -.ui-icon-alt .ui-icon, -.ui-icon-alt .ui-icon-searchfield:after { - background-color: #fff; - background-color: rgba(255,255,255,.3); - background-image: url(../images/icons-18-black.png); - background-repeat: no-repeat; -} -/* No disc ------------------------------------------------------------------------------------------------------------*/ -.ui-icon-nodisc .ui-icon, -.ui-icon-nodisc .ui-icon-searchfield:after, -.ui-icon-nodisc .ui-icon-alt .ui-icon, -.ui-icon-nodisc .ui-icon-alt .ui-icon-searchfield:after { - background-color: transparent; -} -/* Icon sprite ------------------------------------------------------------------------------------------------------------*/ -/* plus minus */ -.ui-icon-plus { - background-position: -1px -1px; -} -.ui-icon-minus { - background-position: -37px -1px; -} -/* delete/close */ -.ui-icon-delete { - background-position: -73px -1px; -} -/* arrows */ -.ui-icon-arrow-r { - background-position: -108px -1px; -} -.ui-icon-arrow-l { - background-position: -144px -1px; -} -.ui-icon-arrow-u { - background-position: -180px -1px; -} -.ui-icon-arrow-d { - background-position: -216px -1px; -} -/* misc */ -.ui-icon-check { - background-position: -252px -1px; -} -.ui-icon-gear { - background-position: -288px -1px; -} -.ui-icon-refresh { - background-position: -323px -1px; -} -.ui-icon-forward { - background-position: -360px -1px; -} -.ui-icon-back { - background-position: -396px -1px; -} -.ui-icon-grid { - background-position: -432px -1px; -} -.ui-icon-star { - background-position: -467px -1px; -} -.ui-icon-alert { - background-position: -503px -1px; -} -.ui-icon-info { - background-position: -539px -1px; -} -.ui-icon-home { - background-position: -575px -1px; -} -/* search */ -.ui-icon-search, -.ui-icon-searchfield:after { - background-position: -611px -1px; -} -/* checkbox radio */ -.ui-icon-checkbox-on { - background-position: -647px -1px; -} -.ui-icon-checkbox-off { - background-position: -683px -1px; -} -.ui-icon-radio-on { - background-position: -718px -1px; -} -.ui-icon-radio-off { - background-position: -754px -1px; -} -/* menu edit */ -.ui-icon-bars { - background-position: -788px -1px; -} -.ui-icon-edit { - background-position: -824px -1px; -} -/* HD/"retina" sprite ------------------------------------------------------------------------------------------------------------*/ -@media only screen and (-webkit-min-device-pixel-ratio: 1.3), - only screen and (min--moz-device-pixel-ratio: 1.3), - only screen and (min-resolution: 200dpi) { - - .ui-icon-plus, .ui-icon-minus, .ui-icon-delete, .ui-icon-arrow-r, - .ui-icon-arrow-l, .ui-icon-arrow-u, .ui-icon-arrow-d, .ui-icon-check, - .ui-icon-gear, .ui-icon-refresh, .ui-icon-forward, .ui-icon-back, - .ui-icon-grid, .ui-icon-star, .ui-icon-alert, .ui-icon-info, .ui-icon-home, .ui-icon-bars, .ui-icon-edit, - .ui-icon-search, .ui-icon-searchfield:after, - .ui-icon-checkbox-off, .ui-icon-checkbox-on, .ui-icon-radio-off, .ui-icon-radio-on { - background-image: url(../images/icons-36-white.png); - -moz-background-size: 864px 18px; - -o-background-size: 864px 18px; - -webkit-background-size: 864px 18px; - background-size: 864px 18px; - } - .ui-icon-alt .ui-icon { - background-image: url(../images/icons-36-black.png); - } - .ui-icon-plus { - background-position: 0px 50%; - } - .ui-icon-minus { - background-position: -36px 50%; - } - .ui-icon-delete { - background-position: -72px 50%; - } - .ui-icon-arrow-r { - background-position: -108px 50%; - } - .ui-icon-arrow-l { - background-position: -144px 50%; - } - .ui-icon-arrow-u { - background-position: -179px 50%; - } - .ui-icon-arrow-d { - background-position: -215px 50%; - } - .ui-icon-check { - background-position: -252px 50%; - } - .ui-icon-gear { - background-position: -287px 50%; - } - .ui-icon-refresh { - background-position: -323px 50%; - } - .ui-icon-forward { - background-position: -360px 50%; - } - .ui-icon-back { - background-position: -395px 50%; - } - .ui-icon-grid { - background-position: -431px 50%; - } - .ui-icon-star { - background-position: -467px 50%; - } - .ui-icon-alert { - background-position: -503px 50%; - } - .ui-icon-info { - background-position: -538px 50%; - } - .ui-icon-home { - background-position: -575px 50%; - } - .ui-icon-search, - .ui-icon-searchfield:after { - background-position: -611px 50%; - } - .ui-icon-checkbox-on { - background-position: -647px 50%; - } - .ui-icon-checkbox-off { - background-position: -683px 50%; - } - .ui-icon-radio-on { - background-position: -718px 50%; - } - .ui-icon-radio-off { - background-position: -754px 50%; - } - .ui-icon-bars { - background-position: -788px 50%; - - }.ui-icon-edit { - background-position: -824px 50%; - } -} -/* checks,radios */ -.ui-checkbox .ui-icon, -.ui-selectmenu-list .ui-icon { - -webkit-border-radius: 3px; - border-radius: 3px; -} -.ui-icon-checkbox-off, -.ui-icon-radio-off { - background-color: transparent; -} -.ui-checkbox-on .ui-icon, -.ui-radio-on .ui-icon { - background-color: #4596ce /*{global-active-background-color}*/; /* NOTE: this hex should match the active state color. It's repeated here for cascade */ -} -/* loading icon */ -.ui-icon-loading { - background: url(../images/ajax-loader.gif); - background-size: 46px 46px; -} -/* Button corner class ------------------------------------------------------------------------------------------------------------*/ -.ui-btn-corner-all { - -webkit-border-radius: 1em /*{global-radii-buttons}*/; - border-radius: 1em /*{global-radii-buttons}*/; -} -/* radius clip workaround for cleaning up corner trapping */ -.ui-corner-all, -.ui-btn-corner-all { - -webkit-background-clip: padding; - background-clip: padding-box; -} -/* Overlay / modal ------------------------------------------------------------------------------------------------------------*/ -.ui-overlay { - background: #666; - filter: Alpha(Opacity=50); - opacity: .5; - position: absolute; - width: 100%; - height: 100%; -} -.ui-overlay-shadow { - -moz-box-shadow: 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 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; - -webkit-box-shadow: 0px 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; - box-shadow: 0px 1px 3px /*{global-box-shadow-size}*/ rgba(0,0,0,.2) /*{global-box-shadow-color}*/; -} -.ui-bar-a .ui-shadow, -.ui-bar-b .ui-shadow , -.ui-bar-c .ui-shadow { - -moz-box-shadow: 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-shadow-inset { - -moz-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); - -webkit-box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); - box-shadow: inset 0px 1px 4px rgba(0,0,0,.2); -} -.ui-icon-shadow { - -moz-box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; - -webkit-box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; - box-shadow: 0px 1px 0 rgba(255,255,255,.4) /*{global-icon-shadow}*/; -} -/* Focus state - set here for specificity (note: these classes are added by JavaScript) ------------------------------------------------------------------------------------------------------------*/ -.ui-btn:focus, .ui-link-inherit:focus { - outline: 0; -} -.ui-btn.ui-focus { - z-index: 1; -} -.ui-focus, -.ui-btn:focus { - -moz-box-shadow: inset 0px 0px 3px #387bbe /*{global-active-background-color}*/, 0px 0px 9px #387bbe /*{global-active-background-color}*/; - -webkit-box-shadow: inset 0px 0px 3px #387bbe /*{global-active-background-color}*/, 0px 0px 9px #387bbe /*{global-active-background-color}*/; - box-shadow: inset 0px 0px 3px #387bbe /*{global-active-background-color}*/, 0px 0px 9px #387bbe /*{global-active-background-color}*/; -} -.ui-input-text.ui-focus, -.ui-input-search.ui-focus { - -moz-box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; - -webkit-box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; - box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; -} -/* unset box shadow in browsers that don't do it right ------------------------------------------------------------------------------------------------------------*/ -.ui-mobile-nosupport-boxshadow * { - -moz-box-shadow: none !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; -} -/* ...and bring back focus */ -.ui-mobile-nosupport-boxshadow .ui-focus, -.ui-mobile-nosupport-boxshadow .ui-btn:focus, -.ui-mobile-nosupport-boxshadow .ui-link-inherit:focus { - outline-width: 1px; - outline-style: auto; -} -/* some unsets - more probably needed */ -.ui-mobile, .ui-mobile body { height: 99.9%; } -.ui-mobile fieldset, .ui-page { padding: 0; margin: 0; } -.ui-mobile a img, .ui-mobile fieldset { border-width: 0; } -/* responsive page widths */ -.ui-mobile-viewport { margin: 0; overflow-x: visible; -webkit-text-size-adjust: 100%; -ms-text-size-adjust:none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } -/* Issue #2066 */ -body.ui-mobile-viewport, -div.ui-mobile-viewport { overflow-x: hidden; } -/* "page" containers - full-screen views, one should always be in view post-pageload */ -.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; display: none; border: 0; } -.ui-mobile .ui-page-active { display: block; overflow: visible; } -/* on ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */ -.ui-page { outline: none; } -/*orientations from js are available */ -@media screen and (orientation: portrait){ -.ui-mobile, .ui-mobile .ui-page { min-height: 420px; } -} -@media screen and (orientation: landscape){ -.ui-mobile, .ui-mobile .ui-page { min-height: 300px; } -} -/* loading screen */ -.ui-loading .ui-loader { display: block; } -.ui-loader { display: none; z-index: 9999999; position: fixed; top: 50%; left: 50%; border:0; } -.ui-loader-default { background: none; filter: Alpha(Opacity=18); opacity: .18; width: 46px; height: 46px; margin-left: -23px; margin-top: -23px; } -.ui-loader-verbose { width: 200px; filter: Alpha(Opacity=88); opacity: .88; box-shadow: 0 1px 1px -1px #fff; height: auto; margin-left: -110px; margin-top: -43px; padding: 10px; } -.ui-loader-default h1 { font-size: 0; width: 0; height: 0; overflow: hidden; } -.ui-loader-verbose h1 { font-size: 16px; margin: 0; text-align: center; } -.ui-loader .ui-icon { background-color: #000; display: block; margin: 0; width: 44px; height: 44px; padding: 1px; -webkit-border-radius: 36px; border-radius: 36px; } -.ui-loader-verbose .ui-icon { margin: 0 auto 10px; filter: Alpha(Opacity=75); opacity: .75; } -.ui-loader-textonly { padding: 15px; margin-left: -115px; } -.ui-loader-textonly .ui-icon { display: none; } -.ui-loader-fakefix { position: absolute; } -/*fouc*/ -.ui-mobile-rendering > * { visibility: hidden; } -/*headers, content panels*/ -.ui-bar, .ui-body { position: relative; padding: .4em 15px; overflow: hidden; display: block; clear:both; } -.ui-bar { font-size: 16px; margin: 0; } -.ui-bar h1, .ui-bar h2, .ui-bar h3, .ui-bar h4, .ui-bar h5, .ui-bar h6 { margin: 0; padding: 0; font-size: 16px; display: inline-block; } -.ui-header, .ui-footer { position: relative; zoom: 1; } -.ui-mobile .ui-header, .ui-mobile .ui-footer { border-left-width: 0; border-right-width: 0; } -.ui-header .ui-btn-left, -.ui-header .ui-btn-right, -.ui-footer .ui-btn-left, -.ui-footer .ui-btn-right, -.ui-header-fixed.ui-fixed-hidden .ui-btn-left, -.ui-header-fixed.ui-fixed-hidden .ui-btn-right { position: absolute; top: 3px; } -.ui-header-fixed .ui-btn-left, -.ui-header-fixed .ui-btn-right { top: 4px;} -.ui-header .ui-btn-left, -.ui-footer .ui-btn-left { left: 5px; } -.ui-header .ui-btn-right, -.ui-footer .ui-btn-right { right: 5px; } -.ui-footer > .ui-btn-icon-notext, -.ui-header > .ui-btn-icon-notext, -.ui-header-fixed.ui-fixed-hidden > .ui-btn-icon-notext { top: 6px; } -.ui-header-fixed > .ui-btn-icon-notext { top: 7px;} -.ui-header .ui-title, .ui-footer .ui-title { min-height: 1.1em; text-align: center; font-size: 16px; display: block; margin: .6em 30% .8em; padding: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; } -.ui-footer .ui-title { margin: .6em 15px .8em; } -/* content area*/ -.ui-content { border-width: 0; overflow: visible; overflow-x: hidden; padding: 15px; } -/* corner styling for dialogs and popups */ -.ui-corner-all > .ui-header:first-child, -.ui-corner-all > .ui-content:first-child, -.ui-corner-all > .ui-footer:first-child { - -webkit-border-top-left-radius: inherit; - border-top-left-radius: inherit; - -webkit-border-top-right-radius: inherit; - border-top-right-radius: inherit; -} -.ui-corner-all > .ui-header:last-child, -.ui-corner-all > .ui-content:last-child, -.ui-corner-all > .ui-footer:last-child { - -webkit-border-bottom-left-radius: inherit; - border-bottom-left-radius: inherit; - -webkit-border-bottom-right-radius: inherit; - border-bottom-right-radius: inherit; -} -/* icons sizing */ -.ui-icon { width: 18px; height: 18px; } -/* non-js content hiding */ -.ui-nojs { position: absolute; left: -9999px; } -/* accessible content hiding */ -.ui-hide-label label.ui-input-text, .ui-hide-label label.ui-select, .ui-hide-label label.ui-slider, .ui-hide-label label.ui-submit, .ui-hide-label .ui-controlgroup-label, -.ui-hidden-accessible { position: absolute !important; left: -9999px; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -/* Transitions originally inspired by those from jQtouch, nice work, folks */ -.ui-mobile-viewport-transitioning, -.ui-mobile-viewport-transitioning .ui-page { - width: 100%; - height: 100%; - overflow: hidden; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.ui-page-pre-in { - opacity: 0; -} -.in { - -webkit-animation-fill-mode: both; - -webkit-animation-timing-function: ease-out; - -webkit-animation-duration: 350ms; - -moz-animation-fill-mode: both; - -moz-animation-timing-function: ease-out; - -moz-animation-duration: 350ms; - animation-fill-mode: both; - animation-timing-function: ease-out; - animation-duration: 350ms; -} -.out { - -webkit-animation-fill-mode: both; - -webkit-animation-timing-function: ease-in; - -webkit-animation-duration: 225ms; - -moz-animation-fill-mode: both; - -moz-animation-timing-function: ease-in; - -moz-animation-duration: 225ms; - animation-fill-mode: both; - animation-timing-function: ease-in; - animation-duration: 225ms; -} -@-webkit-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } -} -@-moz-keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } -} -@keyframes fadein { - from { opacity: 0; } - to { opacity: 1; } -} -@-webkit-keyframes fadeout { - from { opacity: 1; } - to { opacity: 0; } -} -@-moz-keyframes fadeout { - from { opacity: 1; } - to { opacity: 0; } -} -@keyframes fadeout { - from { opacity: 1; } - to { opacity: 0; } -} -.fade.out { - opacity: 0; - -webkit-animation-duration: 125ms; - -webkit-animation-name: fadeout; - -moz-animation-duration: 125ms; - -moz-animation-name: fadeout; - animation-duration: 125ms; - animation-name: fadeout; -} -.fade.in { - opacity: 1; - -webkit-animation-duration: 225ms; - -webkit-animation-name: fadein; - -moz-animation-duration: 225ms; - -moz-animation-name: fadein; - animation-duration: 225ms; - animation-name: fadein; -} -.pop { - -webkit-transform-origin: 50% 50%; - -moz-transform-origin: 50% 50%; - transform-origin: 50% 50%; -} -.pop.in { - -webkit-transform: scale(1); - -webkit-animation-name: popin; - -webkit-animation-duration: 350ms; - -moz-transform: scale(1); - -moz-animation-name: popin; - -moz-animation-duration: 350ms; - transform: scale(1); - animation-name: popin; - animation-duration: 350ms; - opacity: 1; -} -.pop.out { - -webkit-animation-name: fadeout; - -webkit-animation-duration: 100ms; - -moz-animation-name: fadeout; - -moz-animation-duration: 100ms; - animation-name: fadeout; - animation-duration: 100ms; - opacity: 0; -} -.pop.in.reverse { - -webkit-animation-name: fadein; - -moz-animation-name: fadein; - animation-name: fadein; -} -.pop.out.reverse { - -webkit-transform: scale(.8); - -webkit-animation-name: popout; - -moz-transform: scale(.8); - -moz-animation-name: popout; - transform: scale(.8); - animation-name: popout; -} -@-webkit-keyframes popin { - from { - -webkit-transform: scale(.8); - opacity: 0; - } - to { - -webkit-transform: scale(1); - opacity: 1; - } -} -@-moz-keyframes popin { - from { - -moz-transform: scale(.8); - opacity: 0; - } - to { - -moz-transform: scale(1); - opacity: 1; - } -} -@keyframes popin { - from { - transform: scale(.8); - opacity: 0; - } - to { - transform: scale(1); - opacity: 1; - } -} -@-webkit-keyframes popout { - from { - -webkit-transform: scale(1); - opacity: 1; - } - to { - -webkit-transform: scale(.8); - opacity: 0; - } -} -@-moz-keyframes popout { - from { - -moz-transform: scale(1); - opacity: 1; - } - to { - -moz-transform: scale(.8); - opacity: 0; - } -} -@keyframes popout { - from { - transform: scale(1); - opacity: 1; - } - to { - transform: scale(.8); - opacity: 0; - } -} -/* keyframes for slidein from sides */ -@-webkit-keyframes slideinfromright { - from { -webkit-transform: translateX(100%); } - to { -webkit-transform: translateX(0); } -} -@-moz-keyframes slideinfromright { - from { -moz-transform: translateX(100%); } - to { -moz-transform: translateX(0); } -} -@keyframes slideinfromright { - from { transform: translateX(100%); } - to { transform: translateX(0); } -} -@-webkit-keyframes slideinfromleft { - from { -webkit-transform: translateX(-100%); } - to { -webkit-transform: translateX(0); } -} -@-moz-keyframes slideinfromleft { - from { -moz-transform: translateX(-100%); } - to { -moz-transform: translateX(0); } -} -@keyframes slideinfromleft { - from { transform: translateX(-100%); } - to { transform: translateX(0); } -} -/* keyframes for slideout to sides */ -@-webkit-keyframes slideouttoleft { - from { -webkit-transform: translateX(0); } - to { -webkit-transform: translateX(-100%); } -} -@-moz-keyframes slideouttoleft { - from { -moz-transform: translateX(0); } - to { -moz-transform: translateX(-100%); } -} -@keyframes slideouttoleft { - from { transform: translateX(0); } - to { transform: translateX(-100%); } -} -@-webkit-keyframes slideouttoright { - from { -webkit-transform: translateX(0); } - to { -webkit-transform: translateX(100%); } -} -@-moz-keyframes slideouttoright { - from { -moz-transform: translateX(0); } - to { -moz-transform: translateX(100%); } -} -@keyframes slideouttoright { - from { transform: translateX(0); } - to { transform: translateX(100%); } -} -.slide.out, .slide.in { - -webkit-animation-timing-function: ease-out; - -webkit-animation-duration: 350ms; - -moz-animation-timing-function: ease-out; - -moz-animation-duration: 350ms; - animation-timing-function: ease-out; - animation-duration: 350ms; -} -.slide.out { - -webkit-transform: translateX(-100%); - -webkit-animation-name: slideouttoleft; - -moz-transform: translateX(-100%); - -moz-animation-name: slideouttoleft; - transform: translateX(-100%); - animation-name: slideouttoleft; -} -.slide.in { - -webkit-transform: translateX(0); - -webkit-animation-name: slideinfromright; - -moz-transform: translateX(0); - -moz-animation-name: slideinfromright; - transform: translateX(0); - animation-name: slideinfromright; -} -.slide.out.reverse { - -webkit-transform: translateX(100%); - -webkit-animation-name: slideouttoright; - -moz-transform: translateX(100%); - -moz-animation-name: slideouttoright; - transform: translateX(100%); - animation-name: slideouttoright; -} -.slide.in.reverse { - -webkit-transform: translateX(0); - -webkit-animation-name: slideinfromleft; - -moz-transform: translateX(0); - -moz-animation-name: slideinfromleft; - transform: translateX(0); - animation-name: slideinfromleft; -} -.slidefade.out { - -webkit-transform: translateX(-100%); - -webkit-animation-name: slideouttoleft; - -webkit-animation-duration: 225ms; - -moz-transform: translateX(-100%); - -moz-animation-name: slideouttoleft; - -moz-animation-duration: 225ms; - transform: translateX(-100%); - animation-name: slideouttoleft; - animation-duration: 225ms; -} -.slidefade.in { - -webkit-transform: translateX(0); - -webkit-animation-name: fadein; - -webkit-animation-duration: 200ms; - -moz-transform: translateX(0); - -moz-animation-name: fadein; - -moz-animation-duration: 200ms; - transform: translateX(0); - animation-name: fadein; - animation-duration: 200ms; -} -.slidefade.out.reverse { - -webkit-transform: translateX(100%); - -webkit-animation-name: slideouttoright; - -webkit-animation-duration: 200ms; - -moz-transform: translateX(100%); - -moz-animation-name: slideouttoright; - -moz-animation-duration: 200ms; - transform: translateX(100%); - animation-name: slideouttoright; - animation-duration: 200ms; -} -.slidefade.in.reverse { - -webkit-transform: translateX(0); - -webkit-animation-name: fadein; - -webkit-animation-duration: 200ms; - -moz-transform: translateX(0); - -moz-animation-name: fadein; - -moz-animation-duration: 200ms; - transform: translateX(0); - animation-name: fadein; - animation-duration: 200ms; -} -/* slide down */ -.slidedown.out { - -webkit-animation-name: fadeout; - -webkit-animation-duration: 100ms; - -moz-animation-name: fadeout; - -moz-animation-duration: 100ms; - animation-name: fadeout; - animation-duration: 100ms; -} -.slidedown.in { - -webkit-transform: translateY(0); - -webkit-animation-name: slideinfromtop; - -webkit-animation-duration: 250ms; - -moz-transform: translateY(0); - -moz-animation-name: slideinfromtop; - -moz-animation-duration: 250ms; - transform: translateY(0); - animation-name: slideinfromtop; - animation-duration: 250ms; -} -.slidedown.in.reverse { - -webkit-animation-name: fadein; - -webkit-animation-duration: 150ms; - -moz-animation-name: fadein; - -moz-animation-duration: 150ms; - animation-name: fadein; - animation-duration: 150ms; -} -.slidedown.out.reverse { - -webkit-transform: translateY(-100%); - -webkit-animation-name: slideouttotop; - -webkit-animation-duration: 200ms; - -moz-transform: translateY(-100%); - -moz-animation-name: slideouttotop; - -moz-animation-duration: 200ms; - transform: translateY(-100%); - animation-name: slideouttotop; - animation-duration: 200ms; -} -@-webkit-keyframes slideinfromtop { - from { -webkit-transform: translateY(-100%); } - to { -webkit-transform: translateY(0); } -} -@-moz-keyframes slideinfromtop { - from { -moz-transform: translateY(-100%); } - to { -moz-transform: translateY(0); } -} -@keyframes slideinfromtop { - from { transform: translateY(-100%); } - to { transform: translateY(0); } -} -@-webkit-keyframes slideouttotop { - from { -webkit-transform: translateY(0); } - to { -webkit-transform: translateY(-100%); } -} -@-moz-keyframes slideouttotop { - from { -moz-transform: translateY(0); } - to { -moz-transform: translateY(-100%); } -} -@keyframes slideouttotop { - from { transform: translateY(0); } - to { transform: translateY(-100%); } -} -/* slide up */ -.slideup.out { - -webkit-animation-name: fadeout; - -webkit-animation-duration: 100ms; - -moz-animation-name: fadeout; - -moz-animation-duration: 100ms; - animation-name: fadeout; - animation-duration: 100ms; -} -.slideup.in { - -webkit-transform: translateY(0); - -webkit-animation-name: slideinfrombottom; - -webkit-animation-duration: 250ms; - -moz-transform: translateY(0); - -moz-animation-name: slideinfrombottom; - -moz-animation-duration: 250ms; - transform: translateY(0); - animation-name: slideinfrombottom; - animation-duration: 250ms; -} -.slideup.in.reverse { - -webkit-animation-name: fadein; - -webkit-animation-duration: 150ms; - -moz-animation-name: fadein; - -moz-animation-duration: 150ms; - animation-name: fadein; - animation-duration: 150ms; -} -.slideup.out.reverse { - -webkit-transform: translateY(100%); - -webkit-animation-name: slideouttobottom; - -webkit-animation-duration: 200ms; - -moz-transform: translateY(100%); - -moz-animation-name: slideouttobottom; - -moz-animation-duration: 200ms; - transform: translateY(100%); - animation-name: slideouttobottom; - animation-duration: 200ms; -} -@-webkit-keyframes slideinfrombottom { - from { -webkit-transform: translateY(100%); } - to { -webkit-transform: translateY(0); } -} -@-moz-keyframes slideinfrombottom { - from { -moz-transform: translateY(100%); } - to { -moz-transform: translateY(0); } -} -@keyframes slideinfrombottom { - from { transform: translateY(100%); } - to { transform: translateY(0); } -} -@-webkit-keyframes slideouttobottom { - from { -webkit-transform: translateY(0); } - to { -webkit-transform: translateY(100%); } -} -@-moz-keyframes slideouttobottom { - from { -moz-transform: translateY(0); } - to { -moz-transform: translateY(100%); } -} -@keyframes slideouttobottom { - from { transform: translateY(0); } - to { transform: translateY(100%); } -} -/* The properties in this rule are only necessary for the 'flip' transition. - * We need specify the perspective to create a projection matrix. This will add - * some depth as the element flips. The depth number represents the distance of - * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate - * value. - */ -.viewport-flip { - -webkit-perspective: 1000; - -moz-perspective: 1000; - perspective: 1000; - position: absolute; -} -.flip { - -webkit-backface-visibility: hidden; - -webkit-transform: translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ - -moz-backface-visibility: hidden; - -moz-transform: translateX(0); - backface-visibility: hidden; - transform: translateX(0); -} -.flip.out { - -webkit-transform: rotateY(-90deg) scale(.9); - -webkit-animation-name: flipouttoleft; - -webkit-animation-duration: 175ms; - -moz-transform: rotateY(-90deg) scale(.9); - -moz-animation-name: flipouttoleft; - -moz-animation-duration: 175ms; - transform: rotateY(-90deg) scale(.9); - animation-name: flipouttoleft; - animation-duration: 175ms; -} -.flip.in { - -webkit-animation-name: flipintoright; - -webkit-animation-duration: 225ms; - -moz-animation-name: flipintoright; - -moz-animation-duration: 225ms; - animation-name: flipintoright; - animation-duration: 225ms; -} -.flip.out.reverse { - -webkit-transform: rotateY(90deg) scale(.9); - -webkit-animation-name: flipouttoright; - -moz-transform: rotateY(90deg) scale(.9); - -moz-animation-name: flipouttoright; - transform: rotateY(90deg) scale(.9); - animation-name: flipouttoright; -} -.flip.in.reverse { - -webkit-animation-name: flipintoleft; - -moz-animation-name: flipintoleft; - animation-name: flipintoleft; -} -@-webkit-keyframes flipouttoleft { - from { -webkit-transform: rotateY(0); } - to { -webkit-transform: rotateY(-90deg) scale(.9); } -} -@-moz-keyframes flipouttoleft { - from { -moz-transform: rotateY(0); } - to { -moz-transform: rotateY(-90deg) scale(.9); } -} -@keyframes flipouttoleft { - from { transform: rotateY(0); } - to { transform: rotateY(-90deg) scale(.9); } -} -@-webkit-keyframes flipouttoright { - from { -webkit-transform: rotateY(0) ; } - to { -webkit-transform: rotateY(90deg) scale(.9); } -} -@-moz-keyframes flipouttoright { - from { -moz-transform: rotateY(0); } - to { -moz-transform: rotateY(90deg) scale(.9); } -} -@keyframes flipouttoright { - from { transform: rotateY(0); } - to { transform: rotateY(90deg) scale(.9); } -} -@-webkit-keyframes flipintoleft { - from { -webkit-transform: rotateY(-90deg) scale(.9); } - to { -webkit-transform: rotateY(0); } -} -@-moz-keyframes flipintoleft { - from { -moz-transform: rotateY(-90deg) scale(.9); } - to { -moz-transform: rotateY(0); } -} -@keyframes flipintoleft { - from { transform: rotateY(-90deg) scale(.9); } - to { transform: rotateY(0); } -} -@-webkit-keyframes flipintoright { - from { -webkit-transform: rotateY(90deg) scale(.9); } - to { -webkit-transform: rotateY(0); } -} -@-moz-keyframes flipintoright { - from { -moz-transform: rotateY(90deg) scale(.9); } - to { -moz-transform: rotateY(0); } -} -@keyframes flipintoright { - from { transform: rotateY(90deg) scale(.9); } - to { transform: rotateY(0); } -} -/* The properties in this rule are only necessary for the 'flip' transition. - * We need specify the perspective to create a projection matrix. This will add - * some depth as the element flips. The depth number represents the distance of - * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate - * value. - */ -.viewport-turn { - -webkit-perspective: 200px; - -moz-perspective: 200px; - -ms-perspective: 200px; - perspective: 200px; - position: absolute; -} -.turn { - -webkit-backface-visibility: hidden; - -webkit-transform: translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */ - -webkit-transform-origin: 0; - - -moz-backface-visibility: hidden; - -moz-transform: translateX(0); - -moz-transform-origin: 0; - - backface-visibility :hidden; - transform: translateX(0); - transform-origin: 0; -} -.turn.out { - -webkit-transform: rotateY(-90deg) scale(.9); - -webkit-animation-name: flipouttoleft; - -webkit-animation-duration: 125ms; - -moz-transform: rotateY(-90deg) scale(.9); - -moz-animation-name: flipouttoleft; - -moz-animation-duration: 125ms; - transform: rotateY(-90deg) scale(.9); - animation-name: flipouttoleft; - animation-duration: 125ms; -} -.turn.in { - -webkit-animation-name: flipintoright; - -webkit-animation-duration: 250ms; - -moz-animation-name: flipintoright; - -moz-animation-duration: 250ms; - animation-name: flipintoright; - animation-duration: 250ms; - -} -.turn.out.reverse { - -webkit-transform: rotateY(90deg) scale(.9); - -webkit-animation-name: flipouttoright; - -moz-transform: rotateY(90deg) scale(.9); - -moz-animation-name: flipouttoright; - transform: rotateY(90deg) scale(.9); - animation-name: flipouttoright; -} -.turn.in.reverse { - -webkit-animation-name: flipintoleft; - -moz-animation-name: flipintoleft; - animation-name: flipintoleft; -} -@-webkit-keyframes flipouttoleft { - from { -webkit-transform: rotateY(0); } - to { -webkit-transform: rotateY(-90deg) scale(.9); } -} -@-moz-keyframes flipouttoleft { - from { -moz-transform: rotateY(0); } - to { -moz-transform: rotateY(-90deg) scale(.9); } -} -@keyframes flipouttoleft { - from { transform: rotateY(0); } - to { transform: rotateY(-90deg) scale(.9); } -} -@-webkit-keyframes flipouttoright { - from { -webkit-transform: rotateY(0) ; } - to { -webkit-transform: rotateY(90deg) scale(.9); } -} -@-moz-keyframes flipouttoright { - from { -moz-transform: rotateY(0); } - to { -moz-transform: rotateY(90deg) scale(.9); } -} -@keyframes flipouttoright { - from { transform: rotateY(0); } - to { transform: rotateY(90deg) scale(.9); } -} -@-webkit-keyframes flipintoleft { - from { -webkit-transform: rotateY(-90deg) scale(.9); } - to { -webkit-transform: rotateY(0); } -} -@-moz-keyframes flipintoleft { - from { -moz-transform: rotateY(-90deg) scale(.9); } - to { -moz-transform: rotateY(0); } -} -@keyframes flipintoleft { - from { transform: rotateY(-90deg) scale(.9); } - to { transform: rotateY(0); } -} -@-webkit-keyframes flipintoright { - from { -webkit-transform: rotateY(90deg) scale(.9); } - to { -webkit-transform: rotateY(0); } -} -@-moz-keyframes flipintoright { - from { -moz-transform: rotateY(90deg) scale(.9); } - to { -moz-transform: rotateY(0); } -} -@keyframes flipintoright { - from { transform: rotateY(90deg) scale(.9); } - to { transform: rotateY(0); } -} -/* flow transition */ -.flow { - -webkit-transform-origin: 50% 30%; - -webkit-box-shadow: 0 0 20px rgba(0,0,0,.4); - -moz-transform-origin: 50% 30%; - -moz-box-shadow: 0 0 20px rgba(0,0,0,.4); - transform-origin: 50% 30%; - box-shadow: 0 0 20px rgba(0,0,0,.4); -} -.ui-dialog.flow { - -webkit-transform-origin: none; - -webkit-box-shadow: none; - -moz-transform-origin: none; - -moz-box-shadow: none; - transform-origin: none; - box-shadow: none; -} -.flow.out { - -webkit-transform: translateX(-100%) scale(.7); - -webkit-animation-name: flowouttoleft; - -webkit-animation-timing-function: ease; - -webkit-animation-duration: 350ms; - -moz-transform: translateX(-100%) scale(.7); - -moz-animation-name: flowouttoleft; - -moz-animation-timing-function: ease; - -moz-animation-duration: 350ms; - transform: translateX(-100%) scale(.7); - animation-name: flowouttoleft; - animation-timing-function: ease; - animation-duration: 350ms; -} -.flow.in { - -webkit-transform: translateX(0) scale(1); - -webkit-animation-name: flowinfromright; - -webkit-animation-timing-function: ease; - -webkit-animation-duration: 350ms; - -moz-transform: translateX(0) scale(1); - -moz-animation-name: flowinfromright; - -moz-animation-timing-function: ease; - -moz-animation-duration: 350ms; - transform: translateX(0) scale(1); - animation-name: flowinfromright; - animation-timing-function: ease; - animation-duration: 350ms; -} -.flow.out.reverse { - -webkit-transform: translateX(100%); - -webkit-animation-name: flowouttoright; - -moz-transform: translateX(100%); - -moz-animation-name: flowouttoright; - transform: translateX(100%); - animation-name: flowouttoright; -} -.flow.in.reverse { - -webkit-animation-name: flowinfromleft; - -moz-animation-name: flowinfromleft; - animation-name: flowinfromleft; -} -@-webkit-keyframes flowouttoleft { - 0% { -webkit-transform: translateX(0) scale(1); } - 60%, 70% { -webkit-transform: translateX(0) scale(.7); } - 100% { -webkit-transform: translateX(-100%) scale(.7); } -} -@-moz-keyframes flowouttoleft { - 0% { -moz-transform: translateX(0) scale(1); } - 60%, 70% { -moz-transform: translateX(0) scale(.7); } - 100% { -moz-transform: translateX(-100%) scale(.7); } -} -@keyframes flowouttoleft { - 0% { transform: translateX(0) scale(1); } - 60%, 70% { transform: translateX(0) scale(.7); } - 100% { transform: translateX(-100%) scale(.7); } -} -@-webkit-keyframes flowouttoright { - 0% { -webkit-transform: translateX(0) scale(1); } - 60%, 70% { -webkit-transform: translateX(0) scale(.7); } - 100% { -webkit-transform: translateX(100%) scale(.7); } -} -@-moz-keyframes flowouttoright { - 0% { -moz-transform: translateX(0) scale(1); } - 60%, 70% { -moz-transform: translateX(0) scale(.7); } - 100% { -moz-transform: translateX(100%) scale(.7); } -} -@keyframes flowouttoright { - 0% { transform: translateX(0) scale(1); } - 60%, 70% { transform: translateX(0) scale(.7); } - 100% { transform: translateX(100%) scale(.7); } -} -@-webkit-keyframes flowinfromleft { - 0% { -webkit-transform: translateX(-100%) scale(.7); } - 30%, 40% { -webkit-transform: translateX(0) scale(.7); } - 100% { -webkit-transform: translateX(0) scale(1); } -} -@-moz-keyframes flowinfromleft { - 0% { -moz-transform: translateX(-100%) scale(.7); } - 30%, 40% { -moz-transform: translateX(0) scale(.7); } - 100% { -moz-transform: translateX(0) scale(1); } -} -@keyframes flowinfromleft { - 0% { transform: translateX(-100%) scale(.7); } - 30%, 40% { transform: translateX(0) scale(.7); } - 100% { transform: translateX(0) scale(1); } -} -@-webkit-keyframes flowinfromright { - 0% { -webkit-transform: translateX(100%) scale(.7); } - 30%, 40% { -webkit-transform: translateX(0) scale(.7); } - 100% { -webkit-transform: translateX(0) scale(1); } -} -@-moz-keyframes flowinfromright { - 0% { -moz-transform: translateX(100%) scale(.7); } - 30%, 40% { -moz-transform: translateX(0) scale(.7); } - 100% { -moz-transform: translateX(0) scale(1); } -} -@keyframes flowinfromright { - 0% { transform: translateX(100%) scale(.7); } - 30%, 40% { transform: translateX(0) scale(.7); } - 100% { transform: translateX(0) scale(1); } -} -/* content configurations. */ -.ui-grid-a, .ui-grid-b, .ui-grid-c, .ui-grid-d { overflow: hidden; } -.ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d, .ui-block-e { margin: 0; padding: 0; border: 0; float: left; min-height: 1px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } -/* grid solo: 100 - single item fallback */ -.ui-grid-solo .ui-block-a { display: block; float: none; } -/* Lower percentages for older browsers (i.e. IE7) to prevent wrapping. -.5px to fix BB5 wrap issue. */ -/* grid a: 50/50 */ -.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 49.95%; } -.ui-grid-a > :nth-child(n) { width: 50%; margin-right: -.5px; } -.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.25%; } -.ui-grid-b > :nth-child(n) { width: 33.333%; margin-right: -.5px; } -.ui-grid-b .ui-block-a { clear: left; } -/* grid c: 25/25/25/25 */ -.ui-grid-c .ui-block-a, .ui-grid-c .ui-block-b, .ui-grid-c .ui-block-c, .ui-grid-c .ui-block-d { width: 24.925%; } -.ui-grid-c > :nth-child(n) { width: 25%; margin-right: -.5px; } -.ui-grid-c .ui-block-a { clear: left; } -/* grid d: 20/20/20/20/20 */ -.ui-grid-d .ui-block-a, .ui-grid-d .ui-block-b, .ui-grid-d .ui-block-c, .ui-grid-d .ui-block-d, .ui-grid-d .ui-block-e { width: 19.925%; } -.ui-grid-d > :nth-child(n) { width: 20%; } -.ui-grid-d .ui-block-a { clear: left; } -/* preset breakpoint to switch to stacked grid styles below 35em (560px) */ -@media all and (max-width: 35em) { - .ui-responsive .ui-block-a, - .ui-responsive .ui-block-b, - .ui-responsive .ui-block-c, - .ui-responsive .ui-block-d, - .ui-responsive .ui-block-e { - width: 100%; - float:none; - } -} -/* fixed page header & footer configuration */ -.ui-header-fixed, -.ui-footer-fixed { - left: 0; - right: 0; - width: 100%; - position: fixed; - z-index: 1000; -} -.ui-header-fixed { - top: -1px; - padding-top: 1px; -} -.ui-header-fixed.ui-fixed-hidden { - top: 0; - padding-top: 0; -} -.ui-footer-fixed { - bottom: -1px; - padding-bottom: 1px; -} -.ui-footer-fixed.ui-fixed-hidden { - bottom: 0; - padding-bottom: 0; -} -.ui-header-fullscreen, -.ui-footer-fullscreen { - filter: Alpha(Opacity=90); - opacity: .9; -} -.ui-page-header-fixed { - padding-top: 2.6875em; -} -.ui-page-footer-fixed { - padding-bottom: 2.6875em; -} -.ui-page-header-fullscreen > .ui-content, -.ui-page-footer-fullscreen > .ui-content { - padding: 0; -} -.ui-fixed-hidden { - position: absolute; -} -.ui-page-header-fullscreen .ui-fixed-hidden, -.ui-page-footer-fullscreen .ui-fixed-hidden { - left: -9999px; -} -.ui-header-fixed .ui-btn, -.ui-footer-fixed .ui-btn { - z-index: 10; -} -/* workarounds for other widgets */ -.ui-android-2x-fixed .ui-li-has-thumb { - -webkit-transform: translate3d(0,0,0); -} -.ui-navbar { max-width: 100%; } -.ui-navbar.ui-mini { margin: 0; } -.ui-navbar ul:before, .ui-navbar ul:after { content: " "; display: table; } -.ui-navbar ul:after { clear: both; } -.ui-navbar ul { list-style:none; margin: 0; padding: 0; position: relative; display: block; border: 0; max-width: 100%; overflow: visible; zoom: 1; } -.ui-navbar li .ui-btn { display: block; text-align: center; margin: 0 -1px 0 0; border-right-width: 0; } -.ui-navbar li .ui-btn-icon-right .ui-icon { right: 6px; } -/* add border if not in header/footer (full width) */ -.ui-navbar li:last-child .ui-btn, -.ui-navbar .ui-grid-duo .ui-block-b .ui-btn { margin-right: 0; border-right-width: 1px; } -.ui-header .ui-navbar li:last-child .ui-btn, -.ui-footer .ui-navbar li:last-child .ui-btn, -.ui-header .ui-navbar .ui-grid-duo .ui-block-b .ui-btn, -.ui-footer .ui-navbar .ui-grid-duo .ui-block-b .ui-btn { margin-right: -1px; border-right-width: 0; } -.ui-navbar .ui-grid-duo li.ui-block-a:last-child .ui-btn { margin-right: -1px; border-right-width: 1px; } -.ui-header .ui-navbar li .ui-btn, -.ui-footer .ui-navbar li .ui-btn { border-top-width: 0; border-bottom-width: 0; } -/* fixing gaps caused by subpixel problem */ -.ui-header .ui-navbar .ui-grid-b li.ui-block-c .ui-btn, -.ui-footer .ui-navbar .ui-grid-b li.ui-block-c .ui-btn { margin-right: -5px; } -.ui-header .ui-navbar .ui-grid-c li.ui-block-d .ui-btn, -.ui-footer .ui-navbar .ui-grid-c li.ui-block-d .ui-btn, -.ui-header .ui-navbar .ui-grid-d li.ui-block-e .ui-btn, -.ui-footer .ui-navbar .ui-grid-d li.ui-block-e .ui-btn { margin-right: -4px; } -.ui-header .ui-navbar .ui-grid-b li.ui-block-c .ui-btn-icon-right .ui-icon, -.ui-footer .ui-navbar .ui-grid-b li.ui-block-c .ui-btn-icon-right .ui-icon, -.ui-header .ui-navbar .ui-grid-c li.ui-block-d .ui-btn-icon-right .ui-icon, -.ui-footer .ui-navbar .ui-grid-c li.ui-block-d .ui-btn-icon-right .ui-icon, -.ui-header .ui-navbar .ui-grid-d li.ui-block-e .ui-btn-icon-right .ui-icon, -.ui-footer .ui-navbar .ui-grid-d li.ui-block-e .ui-btn-icon-right .ui-icon { right: 8px; } -.ui-navbar li .ui-btn .ui-btn-inner { padding-top: .7em; padding-bottom: .8em } -.ui-navbar li .ui-btn-icon-top .ui-btn-inner { padding-top: 30px; } -.ui-navbar li .ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 30px; } -.ui-btn { display: block; text-align: center; cursor:pointer; position: relative; margin: .5em 0; padding: 0; } -.ui-mini { margin-top: .25em; margin-bottom: .25em; } -.ui-btn-left, .ui-btn-right, .ui-input-clear, .ui-btn-inline, -.ui-grid-a .ui-btn, .ui-grid-b .ui-btn, .ui-grid-c .ui-btn, .ui-grid-d .ui-btn, .ui-grid-e .ui-btn, .ui-grid-solo .ui-btn { margin-right: 5px; margin-left: 5px; } -.ui-btn-inner { font-size: 16px; padding: .6em 20px; min-width: .75em; display: block; position: relative; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; zoom: 1; } -.ui-btn input, .ui-btn button { z-index: 2; } -.ui-btn-left, .ui-btn-right, .ui-btn-inline { display: inline-block; vertical-align: middle; } -.ui-mobile .ui-btn-left, .ui-mobile .ui-btn-right, .ui-btn-left > .ui-btn, .ui-btn-right > .ui-btn { margin: 0; } /* .ui-mobile to increase specificity level */ -.ui-btn-block { display: block; } -.ui-header > .ui-btn, -.ui-footer > .ui-btn { display: inline-block; margin: 0; } -.ui-header .ui-btn-block, -.ui-footer .ui-btn-block { display: block; } -.ui-header .ui-btn-inner, -.ui-footer .ui-btn-inner, -.ui-mini .ui-btn-inner { font-size: 12.5px; padding: .55em 11px .5em; } -.ui-fullsize .ui-btn-inner, -.ui-fullsize .ui-btn-inner { font-size: 16px; padding: .6em 20px; } -.ui-btn-icon-notext { width: 24px; height: 24px; } -.ui-btn-icon-notext .ui-btn-inner { padding: 0; height: 100%; } -.ui-btn-icon-notext .ui-btn-inner .ui-icon { margin: 2px 1px 2px 3px; float: left; } -.ui-btn-text { position: relative; z-index: 1; width: 100%; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } -div.ui-btn-text { width: auto; } -.ui-btn-icon-notext .ui-btn-text { position: absolute; left: -9999px; } -.ui-btn-icon-left .ui-btn-inner { padding-left: 40px; } -.ui-btn-icon-right .ui-btn-inner { padding-right: 40px; } -.ui-btn-icon-top .ui-btn-inner { padding-top: 40px; } -.ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 40px; } -.ui-header .ui-btn-icon-left .ui-btn-inner, -.ui-footer .ui-btn-icon-left .ui-btn-inner, -.ui-mini.ui-btn-icon-left .ui-btn-inner, -.ui-mini .ui-btn-icon-left .ui-btn-inner { padding-left: 30px; } -.ui-header .ui-btn-icon-right .ui-btn-inner, -.ui-footer .ui-btn-icon-right .ui-btn-inner, -.ui-mini.ui-btn-icon-right .ui-btn-inner, -.ui-mini .ui-btn-icon-right .ui-btn-inner { padding-right: 30px; } -.ui-header .ui-btn-icon-top .ui-btn-inner, -.ui-footer .ui-btn-icon-top .ui-btn-inner { padding: 30px 3px .5em 3px; } -.ui-mini.ui-btn-icon-top .ui-btn-inner, -.ui-mini .ui-btn-icon-top .ui-btn-inner { padding-top: 30px; } -.ui-header .ui-btn-icon-bottom .ui-btn-inner, -.ui-footer .ui-btn-icon-bottom .ui-btn-inner { padding: .55em 3px 30px 3px; } -.ui-mini.ui-btn-icon-bottom .ui-btn-inner, -.ui-mini .ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 30px; } -/* Corner styling inheritance */ -.ui-btn-inner, -.ui-btn-text { - -webkit-border-radius: inherit; - border-radius: inherit; -} -/*btn icon positioning*/ -.ui-btn-icon-notext .ui-icon { display: block; z-index: 0;} -.ui-btn-icon-left > .ui-btn-inner > .ui-icon, .ui-btn-icon-right > .ui-btn-inner > .ui-icon { position: absolute; top: 50%; margin-top: -9px; } -.ui-btn-icon-top .ui-btn-inner .ui-icon, .ui-btn-icon-bottom .ui-btn-inner .ui-icon { position: absolute; left: 50%; margin-left: -9px; } -.ui-btn-icon-left .ui-icon { left: 10px; } -.ui-btn-icon-right .ui-icon { right: 10px; } -.ui-btn-icon-top .ui-icon { top: 10px; } -.ui-btn-icon-bottom .ui-icon { top: auto; bottom: 10px; } -.ui-header .ui-btn-icon-left .ui-icon, -.ui-footer .ui-btn-icon-left .ui-icon, -.ui-mini.ui-btn-icon-left .ui-icon, -.ui-mini .ui-btn-icon-left .ui-icon { left: 5px; } -.ui-header .ui-btn-icon-right .ui-icon, -.ui-footer .ui-btn-icon-right .ui-icon, -.ui-mini.ui-btn-icon-right .ui-icon, -.ui-mini .ui-btn-icon-right .ui-icon { right: 5px; } -.ui-header .ui-btn-icon-top .ui-icon, -.ui-footer .ui-btn-icon-top .ui-icon, -.ui-mini.ui-btn-icon-top .ui-icon, -.ui-mini .ui-btn-icon-top .ui-icon { top: 5px; } -.ui-header .ui-btn-icon-bottom .ui-icon, -.ui-footer .ui-btn-icon-bottom .ui-icon, -.ui-mini.ui-btn-icon-bottom .ui-icon, -.ui-mini .ui-btn-icon-bottom .ui-icon { bottom: 5px; } -/*hiding native button,inputs */ -.ui-btn-hidden { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -webkit-appearance: none; cursor: pointer; background: #fff; background: rgba(255,255,255,0); filter: Alpha(Opacity=0); opacity: .1; font-size: 1px; border: none; text-indent: -9999px; } -/* Fixes IE/WP filter alpha opacity bugs */ -.ui-disabled .ui-btn-hidden { display: none; } -.ui-disabled { z-index: 1; } -.ui-field-contain .ui-btn.ui-submit { margin: 0; } -label.ui-submit { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; display: block; } -@media all and (min-width: 28em){ - .ui-field-contain label.ui-submit { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; } - .ui-field-contain .ui-btn.ui-submit { width: 78%; display: inline-block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } - .ui-hide-label .ui-btn.ui-submit { width: auto; display: block; } -} -.ui-collapsible-inset { margin: .5em 0; } -.ui-collapsible-heading { font-size: 16px; display: block; margin: 0 -15px; padding: 0; position: relative; } -.ui-collapsible-inset .ui-collapsible-heading { margin: 0; } -.ui-collapsible-heading .ui-btn { text-align: left; margin: 0; border-left-width: 0; border-right-width: 0; } -.ui-collapsible-inset .ui-collapsible-heading .ui-btn { border-right-width: 1px; border-left-width: 1px; } -.ui-collapsible-collapsed + .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn { border-top-width: 0; } -.ui-collapsible-set .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn { border-top-width: 1px; } -.ui-collapsible-heading .ui-btn-inner { padding-left: 12px; padding-right: 12px; } -.ui-collapsible-heading .ui-btn-icon-left .ui-btn-inner { padding-left: 40px; } -.ui-collapsible-heading .ui-btn-icon-right .ui-btn-inner { padding-right: 40px; } -.ui-collapsible-heading .ui-btn-icon-top .ui-btn-inner, -.ui-collapsible-heading .ui-btn-icon-bottom .ui-btn-inner { text-align: center; } -.ui-collapsible-heading .ui-btn-icon-left.ui-mini .ui-btn-inner { padding-left: 30px; } -.ui-collapsible-heading .ui-btn-icon-right.ui-mini .ui-btn-inner { padding-right: 30px; } -.ui-collapsible-heading .ui-btn span.ui-btn { position: absolute; left: 6px; top: 50%; margin: -12px 0 0 0; width: 20px; height: 20px; padding: 1px 0px 1px 2px; text-indent: -9999px; } -.ui-collapsible-heading .ui-btn span.ui-btn .ui-btn-inner { padding: 10px 0; } -.ui-collapsible-heading .ui-btn span.ui-btn .ui-icon { left: 0; margin-top: -10px; } -.ui-collapsible-heading-status { position: absolute; top: -9999px; left:0px; } -.ui-collapsible-content { - display: block; - margin: 0 -15px; - padding: 10px 15px; - border-left-width: 0; - border-right-width: 0; - border-top: none; /* Overrides ui-body-* */ - background-image: none; /* Overrides ui-body-* */ -} -.ui-collapsible-inset .ui-collapsible-content { margin: 0; border-right-width: 1px; border-left-width: 1px; } -.ui-collapsible-content-collapsed { display: none; } -.ui-collapsible-set > .ui-collapsible.ui-corner-all { - -webkit-border-radius: 0; - border-radius: 0; -} -.ui-collapsible-heading, -.ui-collapsible-heading > .ui-btn { - -webkit-border-radius: inherit; - border-radius: inherit; -} -.ui-collapsible-set .ui-collapsible.ui-first-child { - -webkit-border-top-right-radius: inherit; - border-top-right-radius: inherit; - -webkit-border-top-left-radius: inherit; - border-top-left-radius: inherit; -} -.ui-collapsible-content, -.ui-collapsible-set .ui-collapsible.ui-last-child { - -webkit-border-bottom-right-radius: inherit; - border-bottom-right-radius: inherit; - -webkit-border-bottom-left-radius: inherit; - border-bottom-left-radius: inherit; -} -.ui-collapsible-themed-content:not(.ui-collapsible-collapsed) > .ui-collapsible-heading { - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - border-bottom-left-radius: 0; -} -.ui-collapsible-set { margin: .5em 0; } -.ui-collapsible-set .ui-collapsible { margin: -1px 0 0; } -.ui-collapsible-set .ui-collapsible.ui-first-child { margin-top: 0; } -.ui-controlgroup, fieldset.ui-controlgroup { padding: 0; margin: .5em 0; zoom: 1; } -.ui-controlgroup.ui-mini, fieldset.ui-controlgroup.ui-mini { margin: .25em 0; } -.ui-field-contain .ui-controlgroup, .ui-field-contain fieldset.ui-controlgroup { margin: 0; } -.ui-bar .ui-controlgroup { margin: 0 5px; } -.ui-controlgroup-label { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .4em; } -.ui-controlgroup-controls label.ui-select, -.ui-controlgroup-controls label.ui-submit { position: absolute; left: -9999px; } -.ui-controlgroup li { list-style: none; } -.ui-controlgroup .ui-btn { margin: 0; } -.ui-controlgroup .ui-btn-icon-notext { width: auto; height: auto; top: auto; } -.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner { height: 20px; padding: .6em 20px .6em 20px } -.ui-controlgroup-horizontal .ui-btn-icon-notext .ui-btn-inner { width: 18px; } -.ui-controlgroup.ui-mini .ui-btn-icon-notext .ui-btn-inner, -.ui-header .ui-controlgroup .ui-btn-icon-notext .ui-btn-inner, -.ui-footer .ui-controlgroup .ui-btn-icon-notext .ui-btn-inner { height: 16px; padding: .55em 11px .5em 11px; } -.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner .ui-icon { position: absolute; top: 50%; right: 50%; margin: -9px -9px 0 0; } -.ui-controlgroup-horizontal .ui-btn-inner { text-align: center; } -.ui-controlgroup-horizontal.ui-mini .ui-btn-inner { height: 16px; line-height: 16px; } -.ui-controlgroup .ui-checkbox label, .ui-controlgroup .ui-radio label { font-size: 16px; } -.ui-controlgroup-horizontal .ui-controlgroup-controls:before, -.ui-controlgroup-horizontal .ui-controlgroup-controls:after { content: ""; display: table; } -.ui-controlgroup-horizontal .ui-controlgroup-controls:after { clear: both; } -.ui-controlgroup-horizontal .ui-controlgroup-controls { display: inline-block; vertical-align: middle; zoom: 1; } -.ui-controlgroup-horizontal .ui-controlgroup-controls > .ui-btn, .ui-controlgroup-horizontal .ui-controlgroup-controls li > .ui-btn, -.ui-controlgroup-horizontal .ui-checkbox, .ui-controlgroup-horizontal .ui-radio, -.ui-controlgroup-horizontal .ui-select { float: left; clear: none; margin: 0; } -/* On IE7 the floating selects will be displayed as block if .ui-btn-text has width 100% */ -.ui-controlgroup-horizontal .ui-select .ui-btn-text { width: auto; } -.ui-controlgroup-vertical .ui-btn { border-bottom-width: 0; } -.ui-controlgroup-vertical .ui-btn.ui-last-child { border-bottom-width: 1px; } -.ui-controlgroup-horizontal .ui-btn { border-right-width: 0; } -.ui-controlgroup-horizontal .ui-btn.ui-last-child { border-right-width: 1px; } -.ui-controlgroup .ui-btn-corner-all { - -webkit-border-radius: 0; - border-radius: 0; -} -.ui-controlgroup .ui-controlgroup-controls, -.ui-controlgroup .ui-radio, -.ui-controlgroup .ui-checkbox, -.ui-controlgroup .ui-select, -.ui-controlgroup li { - -webkit-border-radius: inherit; - border-radius: inherit; -} -.ui-controlgroup-vertical .ui-btn.ui-first-child { - -webkit-border-top-left-radius: inherit; - border-top-left-radius: inherit; - -webkit-border-top-right-radius: inherit; - border-top-right-radius: inherit; -} -.ui-controlgroup-vertical .ui-btn.ui-last-child { - -webkit-border-bottom-left-radius: inherit; - border-bottom-left-radius: inherit; - -webkit-border-bottom-right-radius: inherit; - border-bottom-right-radius: inherit; -} -.ui-controlgroup-horizontal .ui-btn.ui-first-child { - -webkit-border-top-left-radius: inherit; - border-top-left-radius: inherit; - -webkit-border-bottom-left-radius: inherit; - border-bottom-left-radius: inherit; -} -.ui-controlgroup-horizontal .ui-btn.ui-last-child { - -webkit-border-top-right-radius: inherit; - border-top-right-radius: inherit; - -webkit-border-bottom-right-radius: inherit; - border-bottom-right-radius: inherit; -} -.ui-controlgroup .ui-shadow:not(.ui-focus) { - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} -@media all and (min-width: 28em){ - .ui-field-contain .ui-controlgroup-label { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; } - .ui-field-contain .ui-controlgroup-controls { width: 78%; display: inline-block; } - .ui-field-contain .ui-controlgroup .ui-select { width: 100%; display: block; } - .ui-field-contain .ui-controlgroup-horizontal .ui-select { width: auto; } - .ui-hide-label .ui-controlgroup-controls { width: 100%; } -} -.ui-dialog { - background: none !important; /* this is to ensure that dialog theming does not apply (by default at least) on the page div */ -} -.ui-dialog-contain { - width: 92.5%; - max-width: 500px; - margin: 10% auto 15px auto; - padding: 0; - position: relative; - top: -15px; -} -.ui-dialog-contain > .ui-header, -.ui-dialog-contain > .ui-content, -.ui-dialog-contain > .ui-footer { - display: block; - position: relative; - width: auto; - margin: 0; -} -.ui-dialog-contain > .ui-header { - border: none; - overflow: hidden; - z-index: 10; - padding: 0; -} -.ui-dialog-contain > .ui-content { - padding: 15px; -} -.ui-dialog-contain > .ui-footer { - z-index: 10; - padding: 0 15px; -} -.ui-popup-open .ui-header-fixed, -.ui-popup-open .ui-footer-fixed { - position: absolute !important; /* See line #553 of popup.js */ -} -.ui-popup-screen { - background-image: url(data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==); /* Necessary to set some form of background to ensure element is clickable in IE6/7. While legacy IE won't understand the data-URI'd image, it ensures no additional requests occur in all other browsers with little overhead. */ - top: 0px; - left: 0px; - right: 0px; - bottom: 1px; - position: absolute; - filter: Alpha(Opacity=0); - opacity: 0; - z-index: 1099; -} -.ui-popup-screen.in { - opacity: 0.5; - filter: Alpha(Opacity=50); -} -.ui-popup-screen.out { - opacity: 0; - filter: Alpha(Opacity=0); -} -.ui-popup-container { - z-index: 1100; - display: inline-block; - position: absolute; - padding: 0; - outline: 0; -} -.ui-popup { - position: relative; -} -.ui-popup.ui-content, -.ui-popup .ui-content { - overflow: visible; -} -.ui-popup > p, -.ui-popup > h1, -.ui-popup > h2, -.ui-popup > h3, -.ui-popup > h4, -.ui-popup > h5, -.ui-popup > h6 { - margin: .5em 7px; -} -.ui-popup > span { - display: block; - margin: .5em 7px; -} -.ui-popup .ui-title { - font-size: 16px; - font-weight: bold; - margin-top: .5em; - margin-bottom: .5em; -} -.ui-popup-container .ui-content > p, -.ui-popup-container .ui-content > h1, -.ui-popup-container .ui-content > h2, -.ui-popup-container .ui-content > h3, -.ui-popup-container .ui-content > h4, -.ui-popup-container .ui-content > h5, -.ui-popup-container .ui-content > h6 { - margin: .5em 0; -} -.ui-popup-container .ui-content > span { - margin: 0; -} -.ui-popup-container .ui-content > p:first-child, -.ui-popup-container .ui-content > h1:first-child, -.ui-popup-container .ui-content > h2:first-child, -.ui-popup-container .ui-content > h3:first-child, -.ui-popup-container .ui-content > h4:first-child, -.ui-popup-container .ui-content > h5:first-child, -.ui-popup-container .ui-content > h6:first-child { - margin-top: 0; -} -.ui-popup-container .ui-content > p:last-child, -.ui-popup-container .ui-content > h1:last-child, -.ui-popup-container .ui-content > h2:last-child, -.ui-popup-container .ui-content > h3:last-child, -.ui-popup-container .ui-content > h4:last-child, -.ui-popup-container .ui-content > h5:last-child, -.ui-popup-container .ui-content > h6:last-child { - margin-bottom: 0; -} -.ui-popup > img { - width: auto; - height: auto; - max-width: 100%; - max-height: 100%; - vertical-align: middle; -} -.ui-popup:not(.ui-content) > img:only-child, -.ui-popup:not(.ui-content) > .ui-btn-left:first-child + img:last-child, -.ui-popup:not(.ui-content) > .ui-btn-right:first-child + img:last-child { - -webkit-border-radius: inherit; - border-radius: inherit; -} -.ui-popup iframe { - vertical-align: middle; -} -@media all and (min-width: 28em){ - .ui-popup .ui-field-contain label.ui-submit, - .ui-popup .ui-field-contain .ui-controlgroup-label, - .ui-popup .ui-field-contain label.ui-select, - .ui-popup .ui-field-contain label.ui-input-text { - font-size: 16px; line-height: 1.4; display: block; font-weight: normal; margin: 0 0 .3em; - } - .ui-popup .ui-field-contain .ui-btn.ui-submit, - .ui-popup .ui-field-contain .ui-controlgroup-controls, - .ui-popup .ui-field-contain .ui-select, - .ui-popup .ui-field-contain input.ui-input-text, - .ui-popup .ui-field-contain textarea.ui-input-text, - .ui-popup .ui-field-contain .ui-input-search { - width: 100%; display: block; - } -} -.ui-popup > .ui-btn-left, -.ui-popup > .ui-btn-right { - position: absolute; - top: -9px; - margin: 0; - z-index: 1101; -} -.ui-popup > .ui-btn-left { left: -9px; } -.ui-popup > .ui-btn-right { right: -9px; } -.ui-popup-hidden { top: -99999px; left: -9999px; } -.ui-checkbox, .ui-radio { position: relative; clear: both; margin: 0; z-index: 1; } -.ui-checkbox .ui-btn, .ui-radio .ui-btn { text-align: left; z-index: 2; } -.ui-controlgroup .ui-checkbox .ui-btn, .ui-controlgroup .ui-radio .ui-btn { margin: 0; } -.ui-checkbox .ui-btn-inner, .ui-radio .ui-btn-inner { white-space: normal; } -.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner { padding-left: 45px; } -.ui-checkbox .ui-mini.ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-mini.ui-btn-icon-left .ui-btn-inner { padding-left: 36px; } -.ui-checkbox .ui-btn-icon-right .ui-btn-inner, .ui-radio .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; } -.ui-checkbox .ui-mini.ui-btn-icon-right .ui-btn-inner, .ui-radio .ui-mini.ui-btn-icon-right .ui-btn-inner { padding-right: 36px; } -.ui-checkbox .ui-btn-icon-top .ui-btn-inner, .ui-radio .ui-btn-icon-top .ui-btn-inner { padding-right: 0; padding-left: 0; text-align: center; } -.ui-checkbox .ui-btn-icon-bottom .ui-btn-inner, .ui-radio .ui-btn-icon-bottom .ui-btn-inner { padding-right: 0; padding-left: 0; text-align: center; } -.ui-checkbox .ui-icon, .ui-radio .ui-icon { top: 1.1em; } -.ui-checkbox .ui-btn-icon-left .ui-icon, .ui-radio .ui-btn-icon-left .ui-icon { left: 15px; } -.ui-checkbox .ui-mini.ui-btn-icon-left .ui-icon, .ui-radio .ui-mini.ui-btn-icon-left .ui-icon { left: 9px; } -.ui-checkbox .ui-btn-icon-right .ui-icon, .ui-radio .ui-btn-icon-right .ui-icon { right: 15px; } -.ui-checkbox .ui-mini.ui-btn-icon-right .ui-icon, .ui-radio .ui-mini.ui-btn-icon-right .ui-icon { right: 9px; } -.ui-checkbox .ui-btn-icon-top .ui-icon, .ui-radio .ui-btn-icon-top .ui-icon { top: 10px; } -.ui-checkbox .ui-btn-icon-bottom .ui-icon, .ui-radio .ui-btn-icon-bottom .ui-icon { top: auto; bottom: 10px; } -.ui-checkbox .ui-btn-icon-right .ui-icon, .ui-radio .ui-btn-icon-right .ui-icon { right: 15px; } -.ui-checkbox .ui-mini.ui-btn-icon-right .ui-icon, .ui-radio .ui-mini.ui-btn-icon-right .ui-icon { right: 9px; } -.ui-controlgroup-horizontal .ui-checkbox .ui-icon, -.ui-controlgroup-horizontal .ui-radio .ui-icon { display: none; } -.ui-controlgroup-horizontal .ui-checkbox .ui-btn-inner, -.ui-controlgroup-horizontal .ui-radio .ui-btn-inner { padding: .6em 20px; } -.ui-controlgroup-horizontal .ui-checkbox .ui-mini .ui-btn-inner, -.ui-controlgroup-horizontal .ui-radio .ui-mini .ui-btn-inner { padding: .55em 11px .5em; } -/* 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; z-index: 1; } -.ui-field-contain, fieldset.ui-field-contain { padding: .8em 0; margin: 0; border-width: 0 0 1px 0; overflow: visible; } -.ui-field-contain:last-child { border-bottom-width: 0; } -.ui-field-contain { max-width: 100%; } /* This prevents horizontal scrollbar in IE7 */ -@media all and (min-width: 28em){ - .ui-field-contain, .ui-mobile fieldset.ui-field-contain { border-width: 0; padding: 0; margin: 1em 0; } -} -.ui-select { display: block; position: relative; } -.ui-select select { position: absolute; left: -9999px; top: -9999px; } -.ui-select .ui-btn { opacity: 1; } -.ui-field-contain .ui-select .ui-btn { margin: 0; } -/* Fixes #2588: When Windows Phone 7.5 (Mango) tries to calculate a numeric opacity for a select (including "inherit") without explicitly specifying an opacity on the parent to give it context, a bug appears where clicking elsewhere on the page after opening the select will open the select again. */ -.ui-select .ui-btn select { cursor: pointer; -webkit-appearance: none; left: 0; top:0; width: 100%; min-height: 1.5em; min-height: 100%; height: 3em; max-height: 100%; filter: Alpha(Opacity=0); opacity: 0; z-index: 2; } -.ui-select .ui-disabled { opacity: .3; } -/* Display none because of issues with IE/WP's filter alpha opacity */ -.ui-select .ui-disabled select { display: none; } -@-moz-document url-prefix() { .ui-select .ui-btn select { opacity: 0.0001; }} -.ui-select .ui-btn.ui-select-nativeonly { border-radius: 0; border: 0; } -.ui-select .ui-btn.ui-select-nativeonly select { opacity: 1; text-indent: 0; display: block; } -.ui-select .ui-disabled.ui-select-nativeonly .ui-btn-inner { opacity: 0; } -.ui-select .ui-btn-icon-right .ui-btn-inner, .ui-select .ui-li-has-count .ui-btn-inner { padding-right: 45px; } -.ui-select .ui-mini.ui-btn-icon-right .ui-btn-inner { padding-right: 32px; } -.ui-select .ui-btn-icon-right.ui-li-has-count .ui-btn-inner { padding-right: 80px; } -.ui-select .ui-mini.ui-btn-icon-right.ui-li-has-count .ui-btn-inner { padding-right: 67px; } -.ui-select .ui-btn-icon-right .ui-icon { right: 15px; } -.ui-select .ui-mini.ui-btn-icon-right .ui-icon { right: 7px; } -.ui-select .ui-btn-icon-right.ui-li-has-count .ui-li-count { right: 45px; } -.ui-select .ui-mini.ui-btn-icon-right.ui-li-has-count .ui-li-count { right: 32px; } -/* labels */ -label.ui-select { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .3em; display: block; } -/*listbox*/ -.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: block; min-height: 1em; overflow: hidden !important; -/* This !important is required for iPad Safari specifically. See https://github.com/jquery/jquery-mobile/issues/2647 */ } -.ui-select .ui-btn-text { text-overflow: ellipsis; } -.ui-selectmenu { padding: 6px; min-width: 160px; } -.ui-selectmenu .ui-listview { margin: 0; } -.ui-selectmenu .ui-btn.ui-li-divider { cursor: default; } -.ui-screen-hidden, .ui-selectmenu-list .ui-li .ui-icon { display: none; } -.ui-selectmenu-list .ui-li .ui-icon { display: block; } -.ui-li.ui-selectmenu-placeholder { display: none; } -.ui-selectmenu .ui-header { margin: 0; padding: 0; } -.ui-selectmenu.ui-popup .ui-header { -webkit-border-top-left-radius: 0; border-top-left-radius: 0; -webkit-border-top-right-radius: 0; border-top-right-radius: 0; } -.ui-selectmenu .ui-header .ui-title { margin: 0.6em 46px 0.8em; } -@media all and (min-width: 28em){ - .ui-field-contain label.ui-select { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; } - .ui-field-contain .ui-select { width: 78%; display: inline-block; } - .ui-hide-label .ui-select { width: 100%; } -} -/* when no placeholder is defined in a multiple select, the header height doesn't even extend past the close button. this shim's content in there */ -.ui-selectmenu .ui-header h1:after { content: '.'; visibility: hidden; } -label.ui-input-text { font-size: 16px; line-height: 1.4; display: block; font-weight: normal; margin: 0 0 .3em; } -input.ui-input-text, textarea.ui-input-text { background-image: none; padding: .4em; margin: .5em 0; min-height: 1.4em; line-height: 1.4em; font-size: 16px; display: block; width: 100%; outline: 0; } -input.ui-mini, .ui-mini input, textarea.ui-mini { font-size: 14px; } -div.ui-input-text input.ui-input-text, div.ui-input-text textarea.ui-input-text, -.ui-input-search input.ui-input-text { border: none; width: 100%; padding: .4em 0; margin: 0; display: block; background: transparent none; outline: 0 !important; } -.ui-input-search, div.ui-input-text { margin: .5em 0; background-image: none; position: relative; } -.ui-input-search { padding: 0 30px; } -div.ui-input-text { padding: 0 .4em; } -div.ui-input-has-clear { padding: 0 30px 0 .4em; } -input.ui-input-text.ui-mini, textarea.ui-input-text.ui-mini, -.ui-input-search.ui-mini, div.ui-input-text.ui-mini { margin: .25em 0; } -.ui-field-contain input.ui-input-text, .ui-field-contain textarea.ui-input-text, -.ui-field-contain .ui-input-search, .ui-field-contain div.ui-input-text { margin: 0; } -textarea.ui-input-text { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } -input.ui-input-text { -webkit-appearance: none; } -textarea.ui-input-text { height: 50px; -webkit-transition: height 200ms linear; -moz-transition: height 200ms linear; -o-transition: height 200ms linear; transition: height 200ms linear; } -textarea.ui-mini { height: 45px; } -.ui-icon-searchfield:after { position: absolute; left: 7px; top: 50%; margin-top: -9px; content: ""; width: 18px; height: 18px; opacity: .5; } -.ui-input-search .ui-input-clear, .ui-input-text .ui-input-clear { position: absolute; right: 0; top: 50%; margin-top: -13px; } -.ui-mini .ui-input-clear { margin-top: -14px; right: -3px; } -.ui-input-search .ui-input-clear-hidden, .ui-input-text .ui-input-clear-hidden { display: none; } -/* Resolves issue #5166: Added to support issue introduced in Firefox 15. We can likely remove this in the future. */ -input::-moz-placeholder, textarea::-moz-placeholder { color: #aaa; } -/* Resolves issue #5131: Width of textinput depends on its type, for Android 4.1 */ -input[type=number]::-webkit-outer-spin-button { margin: 0; } -@media all and (min-width: 28em){ - .ui-field-contain label.ui-input-text { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0 } - .ui-field-contain input.ui-input-text, - .ui-field-contain textarea.ui-input-text, - .ui-field-contain .ui-input-search, - .ui-field-contain div.ui-input-text { width: 78%; display: inline-block; } - .ui-field-contain .ui-input-search, - .ui-field-contain div.ui-input-text { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } - .ui-hide-label input.ui-input-text, - .ui-hide-label textarea.ui-input-text, - .ui-hide-label .ui-input-search, - .ui-hide-label div.ui-input-text, - .ui-input-search input.ui-input-text, - div.ui-input-text input.ui-input-text { width: 100%; } -} -.ui-rangeslider { - zoom: 1; - margin: 0; -} -.ui-rangeslider:before, -.ui-rangeslider:after { - content: ""; - display: table; -} -.ui-rangeslider:after { - clear: both; -} -/* Margin-top/bottom: .5em * 16px/14px to make it equal to ui-rangeslider-sliders margin (input font-size is 14px) */ -.ui-rangeslider input.ui-input-text.ui-slider-input { - margin: .57143em 0; -} -.ui-rangeslider.ui-mini input.ui-slider-input { - margin: .28571em 0; -} -.ui-rangeslider input.ui-slider-input.ui-rangeslider-last { - float: right; -} -.ui-rangeslider .ui-rangeslider-sliders { - position: relative; - overflow: visible; - height: 30px; - margin: .5em 68px; -} -.ui-rangeslider.ui-mini .ui-rangeslider-sliders { - margin: .25em 68px; -} -.ui-field-contain .ui-rangeslider input.ui-slider-input, -.ui-field-contain .ui-rangeslider.ui-mini input.ui-slider-input, -.ui-field-contain .ui-rangeslider .ui-rangeslider-sliders, -.ui-field-contain .ui-rangeslider.ui-mini .ui-rangeslider-sliders { - margin-top: 0; - margin-bottom: 0; -} -.ui-rangeslider .ui-rangeslider-sliders .ui-slider-track { - position: absolute; - top: 6px; - right: 0; - left: 0; - margin: 0; -} -.ui-rangeslider.ui-mini .ui-rangeslider-sliders .ui-slider-track { - top: 8px; -} -.ui-rangeslider .ui-slider-track:first-child .ui-slider-bg { - display: none; -} -.ui-rangeslider .ui-rangeslider-sliders .ui-slider-track:first-child { - background-color: transparent; - background: none; - border-width: 0; - height: 0; -} -/* this makes ie6 and ie7 set height to 0 to fix z-index problem */ -html >/**/body .ui-rangeslider .ui-rangeslider-sliders .ui-slider-track:first-child { - height: 15px; - border-width: 1px; -} -html >/**/body .ui-rangeslider.ui-mini .ui-rangeslider-sliders .ui-slider-track:first-child { - height: 12px; -} -@media all and (min-width: 28em){ - .ui-field-contain .ui-rangeslider label.ui-slider { - float: left; - } - .ui-field-contain .ui-rangeslider input.ui-slider-input { - position: relative; - z-index: 1; - } - .ui-field-contain .ui-rangeslider input.ui-slider-input.ui-rangeslider-first, - .ui-field-contain .ui-rangeslider.ui-mini input.ui-slider-input.ui-rangeslider-first { - margin-right: 17px; - } - .ui-field-contain .ui-rangeslider .ui-rangeslider-sliders, - .ui-field-contain .ui-rangeslider.ui-mini .ui-rangeslider-sliders { - float: left; - width: 78%; - margin: 0 -68px; - } - .ui-field-contain .ui-rangeslider .ui-slider-track, - .ui-field-contain .ui-rangeslider.ui-mini .ui-slider-track { - right: 68px; - left: 68px; - } - .ui-field-contain.ui-hide-label .ui-rangeslider input.ui-slider-input.ui-rangeslider-first { - margin: 0; - } - .ui-field-contain.ui-hide-label .ui-rangeslider .ui-rangeslider-sliders, - .ui-field-contain.ui-hide-label .ui-rangeslider.ui-mini .ui-rangeslider-sliders { - width: auto; - float: none; - margin: 0 68px; - } - .ui-field-contain.ui-hide-label .ui-rangeslider .ui-slider-track, - .ui-field-contain.ui-hide-label .ui-rangeslider.ui-mini .ui-slider-track { - right: 0; - left: 0; - } -} -.ui-listview { margin: 0; } -ol.ui-listview, ol.ui-listview .ui-li-divider { counter-reset: listnumbering; } -.ui-content .ui-listview, .ui-panel-inner > .ui-listview { margin: -15px; } -.ui-collapsible-content > .ui-listview { margin: -10px -15px; } -.ui-content .ui-listview-inset, .ui-panel-inner .ui-listview-inset { margin: 1em 0; } -.ui-collapsible-content .ui-listview-inset { margin: .5em 0; } -.ui-listview, .ui-li { list-style: none; padding: 0; } -.ui-li, .ui-li.ui-field-contain { display: block; margin: 0; position: relative; overflow: visible; text-align: left; border-width: 0; border-top-width: 1px; } -.ui-li.ui-btn, .ui-li.ui-field-contain, .ui-li-divider, .ui-li-static { margin: 0; } -.ui-listview-inset .ui-li { border-right-width: 1px; border-left-width: 1px; } -.ui-li.ui-last-child, .ui-li.ui-field-contain.ui-last-child { border-bottom-width: 1px; } -.ui-collapsible-content > .ui-listview:not(.ui-listview-inset) > .ui-li.ui-first-child { border-top-width: 0; } -.ui-collapsible-themed-content .ui-listview:not(.ui-listview-inset) > .ui-li.ui-last-child { border-bottom-width: 0; } -.ui-li .ui-btn-text a.ui-link-inherit { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } -.ui-li-static { background-image: none; } -.ui-li-divider { padding: .5em 15px; font-size: 14px; font-weight: bold; } -ol.ui-listview .ui-link-inherit:before, ol.ui-listview .ui-li-static: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 > .ui-li.ui-first-child, -.ui-listview .ui-btn.ui-first-child > .ui-li > .ui-btn-text > .ui-link-inherit { - -webkit-border-top-right-radius: inherit; - border-top-right-radius: inherit; - -webkit-border-top-left-radius: inherit; - border-top-left-radius: inherit; -} -.ui-listview > .ui-li.ui-last-child, -.ui-listview .ui-btn.ui-last-child > .ui-li > .ui-btn-text > .ui-link-inherit, -.ui-collapsible-content > .ui-listview:not(.ui-listview-inset), -.ui-collapsible-content > .ui-listview:not(.ui-listview-inset) .ui-li.ui-last-child { - -webkit-border-bottom-right-radius: inherit; - border-bottom-right-radius: inherit; - -webkit-border-bottom-left-radius: inherit; - border-bottom-left-radius: inherit; -} -.ui-listview > .ui-li.ui-first-child .ui-li-link-alt { - -webkit-border-top-right-radius: inherit; - border-top-right-radius: inherit; -} -.ui-listview > .ui-li.ui-last-child .ui-li-link-alt { - -webkit-border-bottom-right-radius: inherit; - border-bottom-right-radius: inherit; -} -.ui-listview > .ui-li.ui-first-child .ui-li-thumb:not(.ui-li-icon) { - -webkit-border-top-left-radius: inherit; - border-top-left-radius: inherit; -} -.ui-listview > .ui-li.ui-last-child .ui-li-thumb:not(.ui-li-icon) { - -webkit-border-bottom-left-radius: inherit; - border-bottom-left-radius: inherit; -} -.ui-li>.ui-btn-inner { display: block; position: relative; padding: 0; } -.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: .7em 15px; display: block; } -.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-thumb { min-height: 59px; padding-left: 100px; } -.ui-li-has-icon .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-icon { min-height: 20px; padding-left: 40px; } -.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-count, .ui-li-divider.ui-li-has-count { padding-right: 45px; } -.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-arrow { padding-right: 40px; } -.ui-li-has-arrow.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-arrow.ui-li-has-count { padding-right: 75px; } -.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, .ui-listview .ui-li-icon { position: absolute; left: 1px; top: 0; max-height: 80px; max-width: 80px; } -.ui-listview .ui-li-icon { max-height: 16px; max-width: 16px; left: 10px; top: .9em; } -.ui-li-thumb, .ui-listview .ui-li-icon, .ui-li-content { float: left; margin-right: 10px; } -.ui-li-aside { float: right; width: 50%; text-align: right; margin: .3em 0; } -@media all and (min-width: 480px){ - .ui-li-aside { width: 45%; } -} -.ui-li-divider { cursor: default; } -.ui-li-has-alt .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-alt { padding-right: 53px; } -.ui-li-has-alt.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-alt.ui-li-has-count { padding-right: 88px; } -.ui-li-has-count .ui-li-count { position: absolute; font-size: 11px; font-weight: bold; padding: .2em .5em; top: 50%; margin-top: -.9em; right: 10px; } -.ui-li-has-count.ui-li-divider .ui-li-count, .ui-li-has-count .ui-link-inherit .ui-li-count { margin-top: -.95em; } -.ui-li-has-arrow.ui-li-has-count .ui-li-count { right: 40px; } -.ui-li-has-alt.ui-li-has-count .ui-li-count { right: 53px; } -.ui-li-link-alt { position: absolute; width: 40px; height: 100%; border-width: 0; border-left-width: 1px; top: 0; right: 0; margin: 0; padding: 0; z-index: 2; } -.ui-li-link-alt .ui-btn { overflow: hidden; position: absolute; right: 8px; top: 50%; margin: -13px 0 0 0; border-bottom-width: 1px; z-index: -1;} -.ui-li-link-alt .ui-btn-inner { padding: 0; height: 100%; position: absolute; width: 100%; top: 0; left: 0;} -.ui-li-link-alt .ui-btn .ui-icon { right: 50%; margin-right: -9px; } -.ui-li-link-alt .ui-btn-icon-notext .ui-btn-inner .ui-icon { position: absolute; top: 50%; margin-top: -9px; } -.ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner { border-top: 0px; } -.ui-listview-filter { border-width: 0; overflow: hidden; margin: -15px -15px 15px -15px; } -.ui-collapsible-content .ui-listview-filter { margin: -10px -15px 10px -15px; border-bottom: inherit; } -.ui-listview-filter-inset { margin: -15px -5px; background: transparent; } -.ui-collapsible-content .ui-listview-filter-inset { margin: -5px; border-bottom-width: 0; } -.ui-listview-filter .ui-input-search { margin: 5px; width: auto; display: block; } -.ui-li.ui-screen-hidden{ display:none; } -/* Odd iPad positioning issue. */ -@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { - .ui-li .ui-btn-text { overflow: visible; } -} -label.ui-slider { - font-size: 16px; - line-height: 1.4; - font-weight: normal; - margin: 0; - display: block; -} -.ui-field-contain label.ui-slider { - margin-bottom: .4em; -} -div.ui-slider { - height: 30px; - margin: .5em 0; - zoom: 1; -} -div.ui-slider.ui-mini { - margin: .25em 0; -} -.ui-field-contain div.ui-slider, -.ui-field-contain div.ui-slider.ui-mini { - margin: 0; -} -div.ui-slider:before, div.ui-slider:after { - content: ""; - display: table; -} -div.ui-slider:after { - clear: both; -} -/* High level of specificity to override Textinput CSS. */ -input.ui-input-text.ui-slider-input { - display: block; - float: left; - margin: 0; - padding: 4px; - width: 40px; - height: 22px; - line-height: 22px; - font-size: 14px; - border: none; - background-image: none; - font-weight: bold; - text-align: center; - vertical-align: text-bottom; - outline: 0; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - -ms-box-sizing: content-box; - box-sizing: content-box; -} -.ui-slider-input::-webkit-outer-spin-button, -.ui-slider-input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; -} -.ui-slider-track, -.ui-slider-switch { - position: relative; - overflow: visible; - height: 15px; - margin: 0 15px 0 68px; - top: 6px; -} -.ui-slider-track.ui-mini { - height: 12px; - top: 8px; -} -.ui-slider-bg { - border: none; - height: 100%; -} -/* High level of specificity to override button margins in grids */ -.ui-slider-track .ui-btn.ui-slider-handle, -.ui-slider-switch .ui-btn.ui-slider-handle { - position: absolute; - z-index: 1; - top: 50%; - width: 28px; - height: 28px; - margin: -15px 0 0 -15px; - outline: 0; -} -.ui-slider-track.ui-mini .ui-slider-handle { - height: 14px; - width: 14px; - margin: -8px 0 0 -7px; -} -.ui-slider-handle .ui-btn-inner { - padding: 0; - height: 100%; -} -.ui-slider-track.ui-mini .ui-slider-handle .ui-btn-inner { - height: 30px; - width: 30px; - padding: 0; - margin: -9px 0 0 -9px; - border-top: none; -} -select.ui-slider-switch { - display: none; -} -div.ui-slider-switch { - display: inline-block; - height: 32px; - width: 5.8em; - margin: .5em 0; - top: 0; -} -div.ui-slider-switch.ui-mini { - width: 5em; - height: 29px; - margin: .25em 0; - top: 0; -} -.ui-field-contain .ui-slider-switch, -.ui-field-contain .ui-slider-switch.ui-mini { - margin: 0; -} -.ui-slider-inneroffset { - margin: 0 16px; - position: relative; - z-index: 1; -} -.ui-slider-switch.ui-mini .ui-slider-inneroffset { - margin: 0 15px 0 14px; -} -.ui-slider-switch .ui-btn.ui-slider-handle { - margin: 1px 0 0 -15px; -} -.ui-slider-switch.ui-mini .ui-slider-handle { - width: 25px; - height: 25px; - margin: 1px 0 0 -13px; - padding: 0; -} -.ui-slider-handle-snapping { - -webkit-transition: left 70ms linear; - -moz-transition: left 70ms linear; -} -.ui-slider-switch.ui-mini .ui-slider-handle .ui-btn-inner { - height: 30px; - width: 30px; - padding: 0; - margin: 0; - border-top: none; -} -.ui-slider-switch .ui-slider-label { - position: absolute; - text-align: center; - width: 100%; - overflow: hidden; - font-size: 16px; - top: 0; - line-height: 2; - min-height: 100%; - border-width: 0; - white-space: nowrap; - cursor: pointer; -} -.ui-slider-switch.ui-mini .ui-slider-label { - font-size: 14px; -} -.ui-slider-switch .ui-slider-label-a { - z-index: 1; - left: 0; - text-indent: -1.5em; -} -.ui-slider-switch .ui-slider-label-b { - z-index: 0; - right: 0; - text-indent: 1.5em; -} -@media all and (min-width: 28em){ - .ui-field-contain label.ui-slider { - vertical-align: top; - display: inline-block; - width: 20%; - margin: 0 2% 0 0; - } - .ui-field-contain div.ui-slider { - display: inline-block; - width: 78%; - } - .ui-field-contain.ui-hide-label div.ui-slider { - display: block; - width: auto; - } - .ui-field-contain div.ui-slider-switch, - .ui-field-contain.ui-hide-label div.ui-slider-switch { - display: inline-block; - width: 5.8em; - } - .ui-field-contain div.ui-slider-switch.ui-mini { - width: 5em; - } -} -.ui-table { - border: 0; - border-collapse: collapse; - padding: 0; - width: 100%; -} -.ui-table th, -.ui-table td { - line-height: 1.5em; - text-align: left; - padding: .4em .5em; - vertical-align:top; -} -.ui-table th .ui-btn, -.ui-table td .ui-btn { - line-height: normal; -} -.ui-table th { - font-weight: bold; -} -.ui-table caption { - text-align:left; - margin-bottom:1.4em; - opacity: .5; -} -/* Add strokes between each row */ -.table-stroke thead th { - border-bottom: 1px solid #d6d6d6; /* non-RGBA fallback */ - border-bottom: 1px solid rgba(0, 0, 0, .1); -} -.table-stroke tbody th, -.table-stroke tbody td { - border-bottom: 1px solid #e6e6e6; /* non-RGBA fallback */ - border-bottom: 1px solid rgba(0, 0, 0, .05); -} -/* Add alternating row stripes */ -.table-stripe tbody tr:nth-child(odd) td, -.table-stripe tbody tr:nth-child(odd) th { - background-color: #eeeeee; /* non-RGBA fallback */ - background-color: rgba(0,0,0,0.04); -} -/* Add stroke to the header and last item */ -.table-stripe thead th, -.table-stripe tbody tr:last-child { - border-bottom: 1px solid #d6d6d6; /* non-RGBA fallback */ - border-bottom: 1px solid rgba(0, 0, 0, .1); -} -/* - Styles for the table columntoggle mode -*/ -.ui-table-columntoggle-btn { - float: right; - margin-bottom:.8em; -} -/* Remove top/bottom margins around the fieldcontain on check list */ -.ui-table-columntoggle-popup fieldset { - margin:0; -} -/* Hide all prioritized columns by default */ -@media only all { - th.ui-table-priority-6, - td.ui-table-priority-6, - th.ui-table-priority-5, - td.ui-table-priority-5, - th.ui-table-priority-4, - td.ui-table-priority-4, - th.ui-table-priority-3, - td.ui-table-priority-3, - th.ui-table-priority-2, - td.ui-table-priority-2, - th.ui-table-priority-1, - td.ui-table-priority-1 { - display: none; - } -} -/* Preset breakpoints if ".ui-responsive" class added to table */ -/* Show priority 1 at 320px (20em x 16px) */ -@media screen and (min-width: 20em) { - .ui-table-columntoggle.ui-responsive th.ui-table-priority-1, - .ui-table-columntoggle.ui-responsive td.ui-table-priority-1 { - display: table-cell; - } -} -/* Show priority 2 at 480px (30em x 16px) */ -@media screen and (min-width: 30em) { - .ui-table-columntoggle.ui-responsive th.ui-table-priority-2, - .ui-table-columntoggle.ui-responsive td.ui-table-priority-2 { - display: table-cell; - } -} -/* Show priority 3 at 640px (40em x 16px) */ -@media screen and (min-width: 40em) { - .ui-table-columntoggle.ui-responsive th.ui-table-priority-3, - .ui-table-columntoggle.ui-responsive td.ui-table-priority-3 { - display: table-cell; - } -} -/* Show priority 4 at 800px (50em x 16px) */ -@media screen and (min-width: 50em) { - .ui-table-columntoggle.ui-responsive th.ui-table-priority-4, - .ui-table-columntoggle.ui-responsive td.ui-table-priority-4 { - display: table-cell; - } -} -/* Show priority 5 at 960px (60em x 16px) */ -@media screen and (min-width: 60em) { - .ui-table-columntoggle.ui-responsive th.ui-table-priority-5, - .ui-table-columntoggle.ui-responsive td.ui-table-priority-5 { - display: table-cell; - } -} -/* Show priority 6 at 1,120px (70em x 16px) */ -@media screen and (min-width: 70em) { - .ui-table-columntoggle.ui-responsive th.ui-table-priority-6, - .ui-table-columntoggle.ui-responsive td.ui-table-priority-6 { - display: table-cell; - } -} -/* Unchecked manually: Always hide */ -.ui-table-columntoggle th.ui-table-cell-hidden, -.ui-table-columntoggle td.ui-table-cell-hidden, -.ui-table-columntoggle.ui-responsive th.ui-table-cell-hidden, -.ui-table-columntoggle.ui-responsive td.ui-table-cell-hidden { - display: none; -} -/* Checked manually: Always show */ -.ui-table-columntoggle th.ui-table-cell-visible, -.ui-table-columntoggle td.ui-table-cell-visible, -.ui-table-columntoggle.ui-responsive th.ui-table-cell-visible, -.ui-table-columntoggle.ui-responsive td.ui-table-cell-visible { - display: table-cell; -} -/* - Styles for the table columntoggle mode -*/ -.ui-table-reflow td .ui-table-cell-label, -.ui-table-reflow th .ui-table-cell-label { - display: none; -} -/* Mobile first styles: Begin with the stacked presentation at narrow widths */ -@media only all { - /* Hide the table headers */ - .ui-table-reflow thead td, - .ui-table-reflow thead th { - display: none; - } - /* Show the table cells as a block level element */ - .ui-table-reflow td, - .ui-table-reflow th { - text-align: left; - display: block; - } - /* Add a fair amount of top margin to visually separate each row when stacked */ - .ui-table-reflow tbody th { - margin-top: 3em; - } - /* Make the label elements a percentage width */ - .ui-table-reflow td .ui-table-cell-label, - .ui-table-reflow th .ui-table-cell-label { - display: block; - padding: .4em; - min-width: 30%; - display: inline-block; - margin: -.4em 1em -.4em -.4em; - } - /* For grouped headers, have a different style to visually separate the levels by classing the first label in each col group */ - .ui-table-reflow th .ui-table-cell-label-top, - .ui-table-reflow td .ui-table-cell-label-top { - display: block; - padding: .4em 0; - margin: .4em 0; - text-transform: uppercase; - font-size: .9em; - font-weight: normal; - } -} -/* Breakpoint to show as a standard table at 560px (35em x 16px) or wider */ -@media ( min-width: 35em ) { - /* Fixes table rendering when switching between breakpoints in Safari <= 5. See https://github.com/jquery/jquery-mobile/issues/5380 */ - .ui-table-reflow.ui-responsive { - display: table-row-group; - } - /* Show the table header rows */ - .ui-table-reflow.ui-responsive td, - .ui-table-reflow.ui-responsive th, - .ui-table-reflow.ui-responsive tbody th, - .ui-table-reflow.ui-responsive tbody td, - .ui-table-reflow.ui-responsive thead td, - .ui-table-reflow.ui-responsive thead th { - display: table-cell; - margin: 0; - } - /* Hide the labels in each cell */ - .ui-table-reflow.ui-responsive td .ui-table-cell-label, - .ui-table-reflow.ui-responsive th .ui-table-cell-label { - display: none; - } -} -/* Hack to make IE9 and WP7.5 treat cells like block level elements, scoped to ui-responsive class */ -/* Applied in a max-width media query up to the table layout breakpoint so we don't need to negate this*/ -@media ( max-width: 35em ) { - .ui-table-reflow.ui-responsive td, - .ui-table-reflow.ui-responsive th { - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - float: left; - clear: left; - } -} -/* panel */ -.ui-panel { - width: 17em; - min-height: 100%; - border-width: 0; - position: absolute; - top: 0; - display: block; -} -.ui-panel-closed { - width: 0; - overflow: hidden; -} -.ui-panel-fixed { - position: fixed; - bottom: -1px; /* fixes gap on Chrome for Android */ - padding-bottom: 1px; -} -.ui-panel-display-overlay { - z-index: 1001; /* fixed toolbars have z-index 1000 */ -} -.ui-panel-display-reveal { - z-index: 0; -} -.ui-panel-display-push { - z-index: 999; -} -.ui-panel-inner { - padding: 15px; -} -/* content-wrap */ -.ui-panel-content-wrap { - position: relative; - left: 0; - min-height: inherit; - border: none; - z-index: 999; -} -.ui-panel-content-wrap-display-overlay, -.ui-panel-animate.ui-panel-content-wrap > .ui-header, /* ios4 fix */ -.ui-panel-content-wrap-closed { - position: static; -} -/* dismiss */ -.ui-panel-dismiss { - position: absolute; - top: 0; - left:0; - height: 100%; - width: 100%; - z-index: 1002; - display: none; -} -.ui-panel-dismiss-open { - display: block; -} -/* animate class is added to panel, wrapper and fixed toolbars */ -.ui-panel-animate { - -webkit-transition: -webkit-transform 350ms ease; - -moz-transition: -moz-transform 350ms ease; - transition: transform 350ms ease; -} -/* hardware acceleration for smoother transitions */ -.ui-panel-animate.ui-panel:not(.ui-panel-display-reveal), -.ui-panel-animate.ui-panel:not(.ui-panel-display-reveal) > div, -.ui-panel-animate.ui-panel-content-wrap, -.ui-panel-animate.ui-panel-content-fixed-toolbar { - -webkit-backface-visibility: hidden; - -webkit-transform: translate3d(0,0,0); -} -/* positioning: panel */ -/* panel left */ -.ui-panel-position-left { - left: -17em; -} -/* animated: panel left (for overlay and push) */ -.ui-panel-animate.ui-panel-position-left.ui-panel-display-overlay, -.ui-panel-animate.ui-panel-position-left.ui-panel-display-push { - left: 0; - -webkit-transform: translate3d(-17em,0,0); - -moz-transform: translate3d(-17em,0,0); - transform: translate3d(-17em,0,0); -} -/* panel left open */ -.ui-panel-position-left.ui-panel-display-reveal, /* negate "panel left" for reveal */ -.ui-panel-position-left.ui-panel-open { - left: 0; -} -/* animated: panel left open (for overlay and push) */ -.ui-panel-animate.ui-panel-position-left.ui-panel-open.ui-panel-display-overlay, -.ui-panel-animate.ui-panel-position-left.ui-panel-open.ui-panel-display-push { - -webkit-transform: translate3d(0,0,0); - -moz-transform: translate3d(0,0,0); - transform: translate3d(0,0,0); -} -/* panel right */ -.ui-panel-position-right { - right: -17em; -} -/* animated: panel right (for overlay and push) */ -.ui-panel-animate.ui-panel-position-right.ui-panel-display-overlay, -.ui-panel-animate.ui-panel-position-right.ui-panel-display-push { - right: 0; - -webkit-transform: translate3d(17em,0,0); - -moz-transform: translate3d(17em,0,0); - transform: translate3d(17em,0,0); -} -/* panel right open */ -.ui-panel-position-right.ui-panel-display-reveal, /* negate "panel right" for reveal */ -.ui-panel-position-right.ui-panel-open { - right: 0; -} -/* animated: panel right open (for overlay and push) */ -.ui-panel-animate.ui-panel-position-right.ui-panel-open.ui-panel-display-overlay, -.ui-panel-animate.ui-panel-position-right.ui-panel-open.ui-panel-display-push { - -webkit-transform: translate3d(0,0,0); - -moz-transform: translate3d(0,0,0); - transform: translate3d(0,0,0); -} -/* positioning: content wrap, fixed toolbars and dismiss */ -/* panel left open */ -.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open, -.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open, -.ui-panel-dismiss-position-left.ui-panel-dismiss-open { - left: 17em; - right: -17em; -} -/* animated: panel left open (for reveal and push) */ -.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-reveal, -.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push, -.ui-panel-animate.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal, -.ui-panel-animate.ui-panel-content-wrap-position-left.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push { - left: 0; - right: 0; - -webkit-transform: translate3d(17em,0,0); - -moz-transform: translate3d(17em,0,0); - transform: translate3d(17em,0,0); -} -/* panel right open */ -.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open, -.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open, -.ui-panel-dismiss-position-right.ui-panel-dismiss-open { - left: -17em; - right: 17em; -} -/* animated: panel right open (for reveal and push) */ -.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-reveal, -.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push, -.ui-panel-animate.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal, -.ui-panel-animate.ui-panel-content-wrap-position-right.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push { - left: 0; - right: 0; - -webkit-transform: translate3d(-17em,0,0); - -moz-transform: translate3d(-17em,0,0); - transform: translate3d(-17em,0,0); -} -/* negate "panel left/right open" for overlay */ -.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-overlay, -.ui-panel-content-wrap-open.ui-panel-content-wrap-display-overlay { - left: 0; -} -/* always disable overflow-x to prevent zoom issue on Android */ -.ui-page-active.ui-page-panel { - overflow-x: hidden; -} -/* shadows and borders */ -.ui-panel-display-reveal { - -webkit-box-shadow: inset -5px 0 5px rgba(0,0,0,.15); - -moz-box-shadow: inset -5px 0 5px rgba(0,0,0,.15); - box-shadow: inset -5px 0 5px rgba(0,0,0,.15); -} -.ui-panel-position-right.ui-panel-display-reveal { - -webkit-box-shadow: inset 5px 0 5px rgba(0,0,0,.15); - -moz-box-shadow: inset 5px 0 5px rgba(0,0,0,.15); - box-shadow: inset 5px 0 5px rgba(0,0,0,.15); -} -.ui-panel-position-right.ui-panel-display-overlay { - -webkit-box-shadow: -5px 0px 5px rgba(0,0,0,.15); - -moz-box-shadow: -5px 0px 5px rgba(0,0,0,.15); - box-shadow: -5px 0px 5px rgba(0,0,0,.15); -} -.ui-panel-position-left.ui-panel-display-overlay { - -webkit-box-shadow: 5px 0px 5px rgba(0,0,0,.15); - -moz-box-shadow: 5px 0px 5px rgba(0,0,0,.15); - box-shadow: 5px 0px 5px rgba(0,0,0,.15); -} -.ui-panel-display-push.ui-panel-open.ui-panel-position-left { - border-right-width: 1px; - margin-right: -1px; -} -.ui-panel-animate.ui-panel-content-fixed-toolbar-position-left.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push { - margin-left: 1px; -} -.ui-panel-display-push.ui-panel-open.ui-panel-position-right { - border-left-width: 1px; - margin-left: -1px; -} -.ui-panel-animate.ui-panel-content-fixed-toolbar-position-right.ui-panel-content-fixed-toolbar-open.ui-panel-content-fixed-toolbar-display-push { - margin-right: 1px; -} -/* wrap on wide viewports once open */ -@media (min-width:55em){ - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push.ui-panel-content-fixed-toolbar-position-left, - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal.ui-panel-content-fixed-toolbar-position-left, - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-push.ui-panel-content-wrap-position-left, - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-reveal.ui-panel-content-wrap-position-left { - margin-right: 17em; - } - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push.ui-panel-content-fixed-toolbar-position-right, - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal.ui-panel-content-fixed-toolbar-position-right, - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-push.ui-panel-content-wrap-position-right, - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-wrap-display-reveal.ui-panel-content-wrap-position-right { - margin-left: 17em; - } - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-push, - .ui-responsive-panel.ui-page-panel-open .ui-panel-content-fixed-toolbar-display-reveal { - width: auto; - } - .ui-responsive-panel .ui-panel-dismiss-display-push { - display: none; - } -} diff --git a/webclient/css/jquery.mobile.iscrollview-pull.css b/webclient/css/jquery.mobile.iscrollview-pull.css new file mode 100755 index 0000000..7db5f95 --- /dev/null +++ b/webclient/css/jquery.mobile.iscrollview-pull.css @@ -0,0 +1,112 @@ +/******************************************* + Default Pull-up and Pull-down styling + Replace/modify/override to your preferences +*******************************************/ +.iscroll-pullup { + /* The wrapper is position:relative or position:absolute, so the pullUp is positioned here + relative to the scroller, not the page. If we don't do this, the pullUp will initially + appear briefly at the bottom of content if content is shorter than the wrapper. + */ + position: absolute; /* relative to the scroller */ + bottom: 0; /* at the bottom of the scroller */ + width: 100%; +} + +.iscroll-pulldown, +.iscroll-pullup { + background: #fff; + height: 40px; + line-height: 40px; /* Center text vertically */ + font-weight: bold; + font-size: 14px; + color: #888; +} + + +/* MSIE not supported by iScroll, so not MSIE transitions or animation */ +.iscroll-pulldown .iscroll-pull-icon, +.iscroll-pullup .iscroll-pull-icon { + margin-left: 0.5em; + display: block; + float: left; + width: 40px; + height: 40px; + background: url(iscroll-pull-icon@2x.png) 0 0 no-repeat; + -webkit-background-size: 40px 80px; + -moz-background-size: 40px 80px; + -o-background-size: 40px 80px; + background-size: 40px 80px; + -webkit-transition: -webkit-transform 250ms linear; + -moz-transition: -moz-transform 250ms linear; + -o-transition: -o-transform 250ms linear; + transition: transform 250ms linear; +} + +/* Note that translateZ(0) triggers hardware acceleration on WebKit browsers + Acceleration is automatic on Mozilla */ + +.iscroll-pulldown .iscroll-pull-icon { + -webkit-transform: rotate(0deg) translateZ(0); + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + transform: rotate(0deg) translateZ(0); +} + +.iscroll-pullup .iscroll-pull-icon { + -webkit-transform: rotate(-180deg) translateZ(0); + -moz-transform: rotate(-180deg); + -o-transform: rotate(-180deg); + transform: rotate(-180deg) translateZ(0); +} + +.iscroll-pulldown.iscroll-pull-pulled .iscroll-pull-icon { + -webkit-transform: rotate(-180deg) translateZ(0); + -moz-transform: rotate(-180deg); + -o-transform: rotate(-180deg); + transform: rotate(-180deg) translateZ(0); +} + +.iscroll-pullup.iscroll-pull-pulled .iscroll-pull-icon { + -webkit-transform: rotate(0deg) translateZ(0); + -moz-transform: rotate(0deg); + -o-transform: rotate(0deg); + transform: rotate(0deg) translateZ(0); +} + +.iscroll-pulldown.iscroll-pull-loading .iscroll-pull-icon, +.iscroll-pullup.iscroll-pull-loading .iscroll-pull-icon { + background-position: 0 100%; + -webkit-transform: rotate(0deg) translateZ(0); + -webkit-transition-duration: 0ms; + -webkit-animation: iscroll-pull-loading 2s infinite linear; + -moz-transform: rotate(0deg); + -moz-transition-duration: 0ms; + -moz-animation: iscroll-pull-loading 2s infinite linear; + -o-transform: rotate(0deg); + -o-transition-duration: 0ms; + -o-animation: iscroll-pull-loading 2s infinite linear; /* Opera 12+ only */ + transform: rotate(0deg) translateZ(0); + transition: transform 0ms linear; + animation: iscroll-pull-loading 2s infinite linear; + } + +@-webkit-keyframes iscroll-pull-loading { + from { -webkit-transform: rotate(0deg); } + to { -webkit-transform: rotate(360deg); } +} + +@-moz-keyframes iscroll-pull-loading { + from { -moz-transform: rotate(0deg); } + to { -moz-transform: rotate(360deg); } +} + +@-o-keyframes iscroll-pull-loading { + from { -o-transform: rotate(0deg); } + to { -o-transform: rotate(360deg); } +} + +@-keyframes iscroll-pull-loading { + from { transform: rotate(0deg); } + to { transform: rotate(360deg); } +} + diff --git a/webclient/css/jquery.mobile.iscrollview.css b/webclient/css/jquery.mobile.iscrollview.css new file mode 100755 index 0000000..025a9fa --- /dev/null +++ b/webclient/css/jquery.mobile.iscrollview.css @@ -0,0 +1,72 @@ +/* The widget adds some styling that needs to be computed at run-time (min-height of scroller + * content so that pull-up will be hidden, and scroller margin transferred from wrapper padding.) + * All styles that are added staticly are added through this stylesheet, for maximum flexibility + * + * The widget adds these styles to page elements when it is constructed, and removes them when + * it is destroyed. The styling itself is added by this style sheet. So, any styles added here + * will be removed when the widget is destroyed. (For example, if you call "destroy" on the widget.) + */ + +/* The iscroll-page style is added to the page when the first iscrollview widget is created + * on the page, and removed when the last iscrollview widget on the page is destroyed. + */ +.iscroll-page { + /* Add any styles that you want on pages that use iScroll */ +} + +/* The wrapper is the element that contains the scroller. In the most typical usage, this + * is .ui-content, but could be any element. */ +.iscroll-wrapper { + min-height: 0; /* Override any min-height, for example, in case a background image is + used on ui-content div used as wrapper. */ + + /* The wrapper needs to be positioned relative or absolute for proper positioning of the + scrollbar with iscroll4 default styling of the scrollbar. Either relative or absolute on the + wrapper will cause the absolute positioning of the scrollbar in iScroll to be relative to + the wrapper. */ + position: relative; + + /* iScroll examples all show the z-index of the wrapper raised to 1 (default is 0). There may + be an issue related to touch/click that this solves on specific platforms or depending on + the ordering of elements in the HTML source if elements are fixed positioned. + This would make sure that the wrapper sees click before underlying content. ' + + Howver, raising the wrapper Z-index creates a serious problem on page transitions on + iPhone, so I don't use it here. */ + +} + +/* The scroller is the element that contains the elements that are scrolled. The height of this + * element is typically longer than the wrapper. (It's the stuff that we scroll.) The widget + * creates this element for you. It wraps all of the children of the wrapper. + */ +.iscroll-scroller { + /* Add any styles that you want to add to scrollers */ +} + +/* The "fixed" elements are the elements that are outside of the wrapper. The widget will + * set headers and footers to this style, as well as any element that has a data-iscroll-fixed + * attribute. The widget adds-up the height of these elements when it sizes the wrapper. + */ +.iscroll-fixed { + /* One often sees headers/footers/etc. raised to a z-index of 1000 in iScroll examples. This + is probably because the scroll bar has been mis-placed, and raising the z-index of the + header/footer masks the problem. I don't do it here. */ + + /* Add any styles that you want to add to fixed elements */ +} + +/* iscroll-content is the content that is scrolled - NOT including any pull-down and pull-up + * element, and also not including a special placeholder element used when there is a pull-up. + */ +.iscroll-content { + /* Add any styles that you want to add to iscroll content */ +} + + +/* Note on scrollbar styles: iscroll4 adds inline CSS to the scrollbar when it creates it. + It sets the z-index to 100 and positions it relative to the wrapper, at the right edge of + the wrapper. If you want to override this behaviour, set the scrollBarClass option, and then + style that class as you please */ + +/* See jquery.mobile.iscroll-pulldown.css for styling of pull-down and pull-up elements */ \ No newline at end of file diff --git a/webclient/css/ws.css b/webclient/css/ws.css index 39eb47a..1f2740f 100755 --- a/webclient/css/ws.css +++ b/webclient/css/ws.css @@ -55,7 +55,6 @@ overflow-y: scroll; overflow-x: hidden; } - } /* tablet etc */ @@ -110,9 +109,11 @@ #btcontrols { display: block; } - .scroll { + #playlistspane, .scroll { overflow-y: auto; overflow-x: auto; + width: 100%; + heigth: 100%; } } @@ -121,6 +122,12 @@ .header-breakpoint.ui-grid-b .ui-block-c { display: none; } + #playlistspane, .scroll { + overflow-y: auto; + overflow-x: auto; + width: 100%; + heigth: 100%; + } } /*********** @@ -256,7 +263,7 @@ } #playlistspane { - padding: 2px; + padding: 4px; } #artistviewimage, #albumviewcover { @@ -268,6 +275,12 @@ * listviews ********************/ +#playlistslist, #playlisttracks { + margin: 0 !important; + padding: 0 !important; +/* border: 1px solid blue; */ +} + .ui-li-divider { padding: 2px; padding-top: 10px; diff --git a/webclient/index.html b/webclient/index.html index fadb480..fd53982 100755 --- a/webclient/index.html +++ b/webclient/index.html @@ -1,7 +1,7 @@ - + @@ -30,7 +30,7 @@ - + @@ -119,7 +119,7 @@
-
+
    @@ -198,6 +198,9 @@
    + + + diff --git a/webclient/js/functionsvars.js b/webclient/js/functionsvars.js index 09c2a73..5513cd8 100755 --- a/webclient/js/functionsvars.js +++ b/webclient/js/functionsvars.js @@ -35,12 +35,18 @@ var songname = ''; var songdata = ''; var newposition = 0; +var playlisttracksScroll; +var playlistslistScroll; + //array of cached playlists (not only user-playlists, also search, artist, album-playlists) var playlists = {}; var currentplaylist; var customPlaylists = []; var customTracklists = []; +var ua = navigator.userAgent, + isMobileWebkit = /WebKit/.test(ua) && /Mobile/.test(ua); + //constants PROGRAM_NAME = 'MusicBox'; //PROGRAM_NAME = 'Mopidy'; diff --git a/webclient/js/gui.js b/webclient/js/gui.js index 9c17357..1f00111 100755 --- a/webclient/js/gui.js +++ b/webclient/js/gui.js @@ -23,7 +23,7 @@ function resetSong() { function expandSonginfo() { } -function resizeSonginfo() { +function resizeMb() { $("#infoname").html(songdata.name); $("#infoartist").html(artiststext); //bug in truncate? @@ -41,6 +41,43 @@ function resizeSonginfo() { multiline : false }); $("#infoartist").html('' + $("#infoartist").html() + ''); + + //initialize iScroll if MobileWebkit and large window + if (isMobileWebkit) { + if ($(window).width() > 480) { + if (!playlistslistScroll) { + playlistslistScroll = new iScroll('playlistslistdiv'); + playlisttracksScroll = new iScroll('playlisttracksdiv'); + } + } else { + if (playlistslistScroll) { + playlistslistScroll.destroy(); + playlistslistScroll = null; + playlisttracksScroll.destroy(); + playlisttracksScroll = null; + } + } + } + + + + //set height of playlist scrollers + + if ($(window).width() > 480) { + $('.scroll').height($(window).height() - 104); + //jqm added something which it shouldnt (at least in this case) I guess +// $('#playlistspane').removeClass('height').height($(window).height() - 110); + $('.scroll').removeClass('height').removeClass('width'); + $('#playlistspane').removeClass('height').removeClass('width'); + } else { + $('.scroll').addClass('height', '100%').addClass('width', '100%'); + $('#playlistspane').addClass('height', '100%').addClass('width', '100%'); + } + + if (isMobileWebkit && ($(window).width() > 480) ) { + playlistslistScroll.refresh(); + playlisttracksScroll.refresh(); + } } function setSongInfo(data) { @@ -82,8 +119,8 @@ function setSongInfo(data) { $("#trackslider").attr("max", data.length); $("#songlength").html(timeFromSeconds(data.length / 1000)); - resizeSonginfo(); -//update styles of listviews + resizeMb(); + //update styles of listviews $('#currenttable li').each(function() { $(this).removeClass("currenttrack"); if (this.id == 'currenttable-' + data.uri) { @@ -276,12 +313,10 @@ function initSocketevents() { * initialize software **********************/ $(document).ready(function() { - //$(document).bind("pageinit", function() { //check for websockets if (!window.WebSocket) { switchContent("playlists"); - $('#playlistspane').html('

    Old Browser

    Sorry. Your browser isn\'t modern enough for this webapp. Modern versions of Chrome, Firefox, Safari all will do. Maybe Opera and Internet Explorer 10 also work, but it\'s not tested.

    '); - exit; + $('#playlistspane').html('

    Old Browser

    Sorry. Your browser isn\'t modern enough for this webapp. Modern versions of Chrome, Firefox, Safari all will do. Maybe Opera and Internet Explorer 10 also work, but it\'s not tested.

    '); exit; } $(window).hashchange(); @@ -297,7 +332,6 @@ $(document).ready(function() { switchContent("playlists"); } - // $("#songinfo").resize(resizeSonginfo()); initgui = false; window.onhashchange = locationHashChanged; // Log all events @@ -314,12 +348,14 @@ $(document).ready(function() { $("#btback").hide(); } - $('.scroll').height($(window).height() - 100); - $(window).resize(function() { - resizeSonginfo(); - $('.scroll').height($(window).height() - 100); + resizeMb(); }); + +}); + +$(document).bind("pageinit", function() { + resizeMb(); }); /************************ diff --git a/webclient/js/iscroll-lite.js b/webclient/js/iscroll-lite.js new file mode 100755 index 0000000..3a6cab7 --- /dev/null +++ b/webclient/js/iscroll-lite.js @@ -0,0 +1,594 @@ +/*! + * iScroll Lite base on iScroll v4.1.6 ~ Copyright (c) 2011 Matteo Spinelli, http://cubiq.org + * Released under MIT license, http://cubiq.org/license + */ + +(function(){ +var m = Math, + mround = function (r) { return r >> 0; }, + vendor = (/webkit/i).test(navigator.appVersion) ? 'webkit' : + (/firefox/i).test(navigator.userAgent) ? 'Moz' : + 'opera' in window ? 'O' : '', + + // Browser capabilities + isAndroid = (/android/gi).test(navigator.appVersion), + isIDevice = (/iphone|ipad/gi).test(navigator.appVersion), + isPlaybook = (/playbook/gi).test(navigator.appVersion), + isTouchPad = (/hp-tablet/gi).test(navigator.appVersion), + + has3d = 'WebKitCSSMatrix' in window && 'm11' in new WebKitCSSMatrix(), + hasTouch = 'ontouchstart' in window && !isTouchPad, + hasTransform = vendor + 'Transform' in document.documentElement.style, + hasTransitionEnd = isIDevice || isPlaybook, + + nextFrame = (function() { + return window.requestAnimationFrame + || window.webkitRequestAnimationFrame + || window.mozRequestAnimationFrame + || window.oRequestAnimationFrame + || window.msRequestAnimationFrame + || function(callback) { return setTimeout(callback, 17); } + })(), + cancelFrame = (function () { + return window.cancelRequestAnimationFrame + || window.webkitCancelAnimationFrame + || window.webkitCancelRequestAnimationFrame + || window.mozCancelRequestAnimationFrame + || window.oCancelRequestAnimationFrame + || window.msCancelRequestAnimationFrame + || clearTimeout + })(), + + // Events + RESIZE_EV = 'onorientationchange' in window ? 'orientationchange' : 'resize', + START_EV = hasTouch ? 'touchstart' : 'mousedown', + MOVE_EV = hasTouch ? 'touchmove' : 'mousemove', + END_EV = hasTouch ? 'touchend' : 'mouseup', + CANCEL_EV = hasTouch ? 'touchcancel' : 'mouseup', + + // Helpers + trnOpen = 'translate' + (has3d ? '3d(' : '('), + trnClose = has3d ? ',0)' : ')', + + // Constructor + iScroll = function (el, options) { + var that = this, + doc = document, + i; + + that.wrapper = typeof el == 'object' ? el : doc.getElementById(el); + that.wrapper.style.overflow = 'hidden'; + that.scroller = that.wrapper.children[0]; + + // Default options + that.options = { + hScroll: true, + vScroll: true, + x: 0, + y: 0, + bounce: true, + bounceLock: false, + momentum: true, + lockDirection: true, + useTransform: true, + useTransition: false, + + // Events + onRefresh: null, + onBeforeScrollStart: function (e) { e.preventDefault(); }, + onScrollStart: null, + onBeforeScrollMove: null, + onScrollMove: null, + onBeforeScrollEnd: null, + onScrollEnd: null, + onTouchEnd: null, + onDestroy: null + }; + + // User defined options + for (i in options) that.options[i] = options[i]; + + // Set starting position + that.x = that.options.x; + that.y = that.options.y; + + // Normalize options + that.options.useTransform = hasTransform ? that.options.useTransform : false; + that.options.hScrollbar = that.options.hScroll && that.options.hScrollbar; + that.options.vScrollbar = that.options.vScroll && that.options.vScrollbar; + that.options.useTransition = hasTransitionEnd && that.options.useTransition; + + // Set some default styles + that.scroller.style[vendor + 'TransitionProperty'] = that.options.useTransform ? '-' + vendor.toLowerCase() + '-transform' : 'top left'; + that.scroller.style[vendor + 'TransitionDuration'] = '0'; + that.scroller.style[vendor + 'TransformOrigin'] = '0 0'; + if (that.options.useTransition) that.scroller.style[vendor + 'TransitionTimingFunction'] = 'cubic-bezier(0.33,0.66,0.66,1)'; + + if (that.options.useTransform) that.scroller.style[vendor + 'Transform'] = trnOpen + that.x + 'px,' + that.y + 'px' + trnClose; + else that.scroller.style.cssText += ';position:absolute;top:' + that.y + 'px;left:' + that.x + 'px'; + + that.refresh(); + + that._bind(RESIZE_EV, window); + that._bind(START_EV); + if (!hasTouch) that._bind('mouseout', that.wrapper); + }; + +// Prototype +iScroll.prototype = { + enabled: true, + x: 0, + y: 0, + steps: [], + scale: 1, + + handleEvent: function (e) { + var that = this; + switch(e.type) { + case START_EV: + if (!hasTouch && e.button !== 0) return; + that._start(e); + break; + case MOVE_EV: that._move(e); break; + case END_EV: + case CANCEL_EV: that._end(e); break; + case RESIZE_EV: that._resize(); break; + case 'mouseout': that._mouseout(e); break; + case 'webkitTransitionEnd': that._transitionEnd(e); break; + } + }, + + _resize: function () { + this.refresh(); + }, + + _pos: function (x, y) { + x = this.hScroll ? x : 0; + y = this.vScroll ? y : 0; + + if (this.options.useTransform) { + this.scroller.style[vendor + 'Transform'] = trnOpen + x + 'px,' + y + 'px' + trnClose + ' scale(' + this.scale + ')'; + } else { + x = mround(x); + y = mround(y); + this.scroller.style.left = x + 'px'; + this.scroller.style.top = y + 'px'; + } + + this.x = x; + this.y = y; + }, + + _start: function (e) { + var that = this, + point = hasTouch ? e.touches[0] : e, + matrix, x, y; + + if (!that.enabled) return; + + if (that.options.onBeforeScrollStart) that.options.onBeforeScrollStart.call(that, e); + + if (that.options.useTransition) that._transitionTime(0); + + that.moved = false; + that.animating = false; + that.zoomed = false; + that.distX = 0; + that.distY = 0; + that.absDistX = 0; + that.absDistY = 0; + that.dirX = 0; + that.dirY = 0; + + if (that.options.momentum) { + if (that.options.useTransform) { + // Very lame general purpose alternative to CSSMatrix + matrix = getComputedStyle(that.scroller, null)[vendor + 'Transform'].replace(/[^0-9-.,]/g, '').split(','); + x = matrix[4] * 1; + y = matrix[5] * 1; + } else { + x = getComputedStyle(that.scroller, null).left.replace(/[^0-9-]/g, '') * 1; + y = getComputedStyle(that.scroller, null).top.replace(/[^0-9-]/g, '') * 1; + } + + if (x != that.x || y != that.y) { + if (that.options.useTransition) that._unbind('webkitTransitionEnd'); + else cancelFrame(that.aniTime); + that.steps = []; + that._pos(x, y); + } + } + + that.startX = that.x; + that.startY = that.y; + that.pointX = point.pageX; + that.pointY = point.pageY; + + that.startTime = e.timeStamp || Date.now(); + + if (that.options.onScrollStart) that.options.onScrollStart.call(that, e); + + that._bind(MOVE_EV); + that._bind(END_EV); + that._bind(CANCEL_EV); + }, + + _move: function (e) { + var that = this, + point = hasTouch ? e.touches[0] : e, + deltaX = point.pageX - that.pointX, + deltaY = point.pageY - that.pointY, + newX = that.x + deltaX, + newY = that.y + deltaY, + timestamp = e.timeStamp || Date.now(); + + if (that.options.onBeforeScrollMove) that.options.onBeforeScrollMove.call(that, e); + + that.pointX = point.pageX; + that.pointY = point.pageY; + + // Slow down if outside of the boundaries + if (newX > 0 || newX < that.maxScrollX) { + newX = that.options.bounce ? that.x + (deltaX / 2) : newX >= 0 || that.maxScrollX >= 0 ? 0 : that.maxScrollX; + } + if (newY > 0 || newY < that.maxScrollY) { + newY = that.options.bounce ? that.y + (deltaY / 2) : newY >= 0 || that.maxScrollY >= 0 ? 0 : that.maxScrollY; + } + + that.distX += deltaX; + that.distY += deltaY; + that.absDistX = m.abs(that.distX); + that.absDistY = m.abs(that.distY); + + if (that.absDistX < 6 && that.absDistY < 6) { + return; + } + + // Lock direction + if (that.options.lockDirection) { + if (that.absDistX > that.absDistY + 5) { + newY = that.y; + deltaY = 0; + } else if (that.absDistY > that.absDistX + 5) { + newX = that.x; + deltaX = 0; + } + } + + that.moved = true; + that._pos(newX, newY); + that.dirX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0; + that.dirY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0; + + if (timestamp - that.startTime > 300) { + that.startTime = timestamp; + that.startX = that.x; + that.startY = that.y; + } + + if (that.options.onScrollMove) that.options.onScrollMove.call(that, e); + }, + + _end: function (e) { + if (hasTouch && e.touches.length != 0) return; + + var that = this, + point = hasTouch ? e.changedTouches[0] : e, + target, ev, + momentumX = { dist:0, time:0 }, + momentumY = { dist:0, time:0 }, + duration = (e.timeStamp || Date.now()) - that.startTime, + newPosX = that.x, + newPosY = that.y, + newDuration; + + that._unbind(MOVE_EV); + that._unbind(END_EV); + that._unbind(CANCEL_EV); + + if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e); + + if (!that.moved) { + if (hasTouch) { + // Find the last touched element + target = point.target; + while (target.nodeType != 1) target = target.parentNode; + + if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA') { + ev = document.createEvent('MouseEvents'); + ev.initMouseEvent('click', true, true, e.view, 1, + point.screenX, point.screenY, point.clientX, point.clientY, + e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, + 0, null); + ev._fake = true; + target.dispatchEvent(ev); + } + } + + that._resetPos(200); + + if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e); + return; + } + + if (duration < 300 && that.options.momentum) { + momentumX = newPosX ? that._momentum(newPosX - that.startX, duration, -that.x, that.scrollerW - that.wrapperW + that.x, that.options.bounce ? that.wrapperW : 0) : momentumX; + momentumY = newPosY ? that._momentum(newPosY - that.startY, duration, -that.y, (that.maxScrollY < 0 ? that.scrollerH - that.wrapperH + that.y : 0), that.options.bounce ? that.wrapperH : 0) : momentumY; + + newPosX = that.x + momentumX.dist; + newPosY = that.y + momentumY.dist; + + if ((that.x > 0 && newPosX > 0) || (that.x < that.maxScrollX && newPosX < that.maxScrollX)) momentumX = { dist:0, time:0 }; + if ((that.y > 0 && newPosY > 0) || (that.y < that.maxScrollY && newPosY < that.maxScrollY)) momentumY = { dist:0, time:0 }; + } + + if (momentumX.dist || momentumY.dist) { + newDuration = m.max(m.max(momentumX.time, momentumY.time), 10); + + that.scrollTo(mround(newPosX), mround(newPosY), newDuration); + + if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e); + return; + } + + that._resetPos(200); + if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e); + }, + + _resetPos: function (time) { + var that = this, + resetX = that.x >= 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x, + resetY = that.y >= 0 || that.maxScrollY > 0 ? 0 : that.y < that.maxScrollY ? that.maxScrollY : that.y; + + if (resetX == that.x && resetY == that.y) { + if (that.moved) { + if (that.options.onScrollEnd) that.options.onScrollEnd.call(that); // Execute custom code on scroll end + that.moved = false; + } + + return; + } + + that.scrollTo(resetX, resetY, time || 0); + }, + + _mouseout: function (e) { + var t = e.relatedTarget; + + if (!t) { + this._end(e); + return; + } + + while (t = t.parentNode) if (t == this.wrapper) return; + + this._end(e); + }, + + _transitionEnd: function (e) { + var that = this; + + if (e.target != that.scroller) return; + + that._unbind('webkitTransitionEnd'); + + that._startAni(); + }, + + /** + * + * Utilities + * + */ + _startAni: function () { + var that = this, + startX = that.x, startY = that.y, + startTime = Date.now(), + step, easeOut, + animate; + + if (that.animating) return; + + if (!that.steps.length) { + that._resetPos(400); + return; + } + + step = that.steps.shift(); + + if (step.x == startX && step.y == startY) step.time = 0; + + that.animating = true; + that.moved = true; + + if (that.options.useTransition) { + that._transitionTime(step.time); + that._pos(step.x, step.y); + that.animating = false; + if (step.time) that._bind('webkitTransitionEnd'); + else that._resetPos(0); + return; + } + + animate = function () { + var now = Date.now(), + newX, newY; + + if (now >= startTime + step.time) { + that._pos(step.x, step.y); + that.animating = false; + if (that.options.onAnimationEnd) that.options.onAnimationEnd.call(that); // Execute custom code on animation end + that._startAni(); + return; + } + + now = (now - startTime) / step.time - 1; + easeOut = m.sqrt(1 - now * now); + newX = (step.x - startX) * easeOut + startX; + newY = (step.y - startY) * easeOut + startY; + that._pos(newX, newY); + if (that.animating) that.aniTime = nextFrame(animate); + }; + + animate(); + }, + + _transitionTime: function (time) { + this.scroller.style[vendor + 'TransitionDuration'] = time + 'ms'; + }, + + _momentum: function (dist, time, maxDistUpper, maxDistLower, size) { + var deceleration = 0.0006, + speed = m.abs(dist) / time, + newDist = (speed * speed) / (2 * deceleration), + newTime = 0, outsideDist = 0; + + // Proportinally reduce speed if we are outside of the boundaries + if (dist > 0 && newDist > maxDistUpper) { + outsideDist = size / (6 / (newDist / speed * deceleration)); + maxDistUpper = maxDistUpper + outsideDist; + speed = speed * maxDistUpper / newDist; + newDist = maxDistUpper; + } else if (dist < 0 && newDist > maxDistLower) { + outsideDist = size / (6 / (newDist / speed * deceleration)); + maxDistLower = maxDistLower + outsideDist; + speed = speed * maxDistLower / newDist; + newDist = maxDistLower; + } + + newDist = newDist * (dist < 0 ? -1 : 1); + newTime = speed / deceleration; + + return { dist: newDist, time: mround(newTime) }; + }, + + _offset: function (el) { + var left = -el.offsetLeft, + top = -el.offsetTop; + + while (el = el.offsetParent) { + left -= el.offsetLeft; + top -= el.offsetTop; + } + + return { left: left, top: top }; + }, + + _bind: function (type, el, bubble) { + (el || this.scroller).addEventListener(type, this, !!bubble); + }, + + _unbind: function (type, el, bubble) { + (el || this.scroller).removeEventListener(type, this, !!bubble); + }, + + + /** + * + * Public methods + * + */ + destroy: function () { + var that = this; + + that.scroller.style[vendor + 'Transform'] = ''; + + // Remove the event listeners + that._unbind(RESIZE_EV, window); + that._unbind(START_EV); + that._unbind(MOVE_EV); + that._unbind(END_EV); + that._unbind(CANCEL_EV); + that._unbind('mouseout', that.wrapper); + if (that.options.useTransition) that._unbind('webkitTransitionEnd'); + + if (that.options.onDestroy) that.options.onDestroy.call(that); + }, + + refresh: function () { + var that = this, + offset; + + that.wrapperW = that.wrapper.clientWidth; + that.wrapperH = that.wrapper.clientHeight; + + that.scrollerW = that.scroller.offsetWidth; + that.scrollerH = that.scroller.offsetHeight; + that.maxScrollX = that.wrapperW - that.scrollerW; + that.maxScrollY = that.wrapperH - that.scrollerH; + that.dirX = 0; + that.dirY = 0; + + that.hScroll = that.options.hScroll && that.maxScrollX < 0; + that.vScroll = that.options.vScroll && (!that.options.bounceLock && !that.hScroll || that.scrollerH > that.wrapperH); + + offset = that._offset(that.wrapper); + that.wrapperOffsetLeft = -offset.left; + that.wrapperOffsetTop = -offset.top; + + + that.scroller.style[vendor + 'TransitionDuration'] = '0'; + + that._resetPos(200); + }, + + scrollTo: function (x, y, time, relative) { + var that = this, + step = x, + i, l; + + that.stop(); + + if (!step.length) step = [{ x: x, y: y, time: time, relative: relative }]; + + for (i=0, l=step.length; i 0 ? 0 : pos.left < that.maxScrollX ? that.maxScrollX : pos.left; + pos.top = pos.top > 0 ? 0 : pos.top < that.maxScrollY ? that.maxScrollY : pos.top; + time = time === undefined ? m.max(m.abs(pos.left)*2, m.abs(pos.top)*2) : time; + + that.scrollTo(pos.left, pos.top, time); + }, + + disable: function () { + this.stop(); + this._resetPos(0); + this.enabled = false; + + // If disabled after touchstart we make sure that there are no left over events + this._unbind(MOVE_EV); + this._unbind(END_EV); + this._unbind(CANCEL_EV); + }, + + enable: function () { + this.enabled = true; + }, + + stop: function () { + cancelFrame(this.aniTime); + this.steps = []; + this.moved = false; + this.animating = false; + } +}; + +if (typeof exports !== 'undefined') exports.iScroll = iScroll; +else window.iScroll = iScroll; + +})(); diff --git a/webclient/js/iscroll.js b/webclient/js/iscroll.js new file mode 100755 index 0000000..f8576f0 --- /dev/null +++ b/webclient/js/iscroll.js @@ -0,0 +1,1104 @@ +/*! + * iScroll v4.2.5 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org + * Released under MIT license, http://cubiq.org/license + */ +(function(window, doc){ +var m = Math, + dummyStyle = doc.createElement('div').style, + vendor = (function () { + var vendors = 't,webkitT,MozT,msT,OT'.split(','), + t, + i = 0, + l = vendors.length; + + for ( ; i < l; i++ ) { + t = vendors[i] + 'ransform'; + if ( t in dummyStyle ) { + return vendors[i].substr(0, vendors[i].length - 1); + } + } + + return false; + })(), + cssVendor = vendor ? '-' + vendor.toLowerCase() + '-' : '', + + // Style properties + transform = prefixStyle('transform'), + transitionProperty = prefixStyle('transitionProperty'), + transitionDuration = prefixStyle('transitionDuration'), + transformOrigin = prefixStyle('transformOrigin'), + transitionTimingFunction = prefixStyle('transitionTimingFunction'), + transitionDelay = prefixStyle('transitionDelay'), + + // Browser capabilities + isAndroid = (/android/gi).test(navigator.appVersion), + isIDevice = (/iphone|ipad/gi).test(navigator.appVersion), + isTouchPad = (/hp-tablet/gi).test(navigator.appVersion), + + has3d = prefixStyle('perspective') in dummyStyle, + hasTouch = 'ontouchstart' in window && !isTouchPad, + hasTransform = vendor !== false, + hasTransitionEnd = prefixStyle('transition') in dummyStyle, + + RESIZE_EV = 'onorientationchange' in window ? 'orientationchange' : 'resize', + START_EV = hasTouch ? 'touchstart' : 'mousedown', + MOVE_EV = hasTouch ? 'touchmove' : 'mousemove', + END_EV = hasTouch ? 'touchend' : 'mouseup', + CANCEL_EV = hasTouch ? 'touchcancel' : 'mouseup', + TRNEND_EV = (function () { + if ( vendor === false ) return false; + + var transitionEnd = { + '' : 'transitionend', + 'webkit' : 'webkitTransitionEnd', + 'Moz' : 'transitionend', + 'O' : 'otransitionend', + 'ms' : 'MSTransitionEnd' + }; + + return transitionEnd[vendor]; + })(), + + nextFrame = (function() { + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function(callback) { return setTimeout(callback, 1); }; + })(), + cancelFrame = (function () { + return window.cancelRequestAnimationFrame || + window.webkitCancelAnimationFrame || + window.webkitCancelRequestAnimationFrame || + window.mozCancelRequestAnimationFrame || + window.oCancelRequestAnimationFrame || + window.msCancelRequestAnimationFrame || + clearTimeout; + })(), + + // Helpers + translateZ = has3d ? ' translateZ(0)' : '', + + // Constructor + iScroll = function (el, options) { + var that = this, + i; + + that.wrapper = typeof el == 'object' ? el : doc.getElementById(el); + that.wrapper.style.overflow = 'hidden'; + that.scroller = that.wrapper.children[0]; + + // Default options + that.options = { + hScroll: true, + vScroll: true, + x: 0, + y: 0, + bounce: true, + bounceLock: false, + momentum: true, + lockDirection: true, + useTransform: true, + useTransition: false, + topOffset: 0, + checkDOMChanges: false, // Experimental + handleClick: true, + + // Scrollbar + hScrollbar: true, + vScrollbar: true, + fixedScrollbar: isAndroid, + hideScrollbar: isIDevice, + fadeScrollbar: isIDevice && has3d, + scrollbarClass: '', + + // Zoom + zoom: false, + zoomMin: 1, + zoomMax: 4, + doubleTapZoom: 2, + wheelAction: 'scroll', + + // Snap + snap: false, + snapThreshold: 1, + + // Events + onRefresh: null, + onBeforeScrollStart: function (e) { e.preventDefault(); }, + onScrollStart: null, + onBeforeScrollMove: null, + onScrollMove: null, + onBeforeScrollEnd: null, + onScrollEnd: null, + onTouchEnd: null, + onDestroy: null, + onZoomStart: null, + onZoom: null, + onZoomEnd: null + }; + + // User defined options + for (i in options) that.options[i] = options[i]; + + // Set starting position + that.x = that.options.x; + that.y = that.options.y; + + // Normalize options + that.options.useTransform = hasTransform && that.options.useTransform; + that.options.hScrollbar = that.options.hScroll && that.options.hScrollbar; + that.options.vScrollbar = that.options.vScroll && that.options.vScrollbar; + that.options.zoom = that.options.useTransform && that.options.zoom; + that.options.useTransition = hasTransitionEnd && that.options.useTransition; + + // Helpers FIX ANDROID BUG! + // translate3d and scale doesn't work together! + // Ignoring 3d ONLY WHEN YOU SET that.options.zoom + if ( that.options.zoom && isAndroid ){ + translateZ = ''; + } + + // Set some default styles + that.scroller.style[transitionProperty] = that.options.useTransform ? cssVendor + 'transform' : 'top left'; + that.scroller.style[transitionDuration] = '0'; + that.scroller.style[transformOrigin] = '0 0'; + if (that.options.useTransition) that.scroller.style[transitionTimingFunction] = 'cubic-bezier(0.33,0.66,0.66,1)'; + + if (that.options.useTransform) that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px)' + translateZ; + else that.scroller.style.cssText += ';position:absolute;top:' + that.y + 'px;left:' + that.x + 'px'; + + if (that.options.useTransition) that.options.fixedScrollbar = true; + + that.refresh(); + + that._bind(RESIZE_EV, window); + that._bind(START_EV); + if (!hasTouch) { + if (that.options.wheelAction != 'none') { + that._bind('DOMMouseScroll'); + that._bind('mousewheel'); + } + } + + if (that.options.checkDOMChanges) that.checkDOMTime = setInterval(function () { + that._checkDOMChanges(); + }, 500); + }; + +// Prototype +iScroll.prototype = { + enabled: true, + x: 0, + y: 0, + steps: [], + scale: 1, + currPageX: 0, currPageY: 0, + pagesX: [], pagesY: [], + aniTime: null, + wheelZoomCount: 0, + + handleEvent: function (e) { + var that = this; + switch(e.type) { + case START_EV: + if (!hasTouch && e.button !== 0) return; + that._start(e); + break; + case MOVE_EV: that._move(e); break; + case END_EV: + case CANCEL_EV: that._end(e); break; + case RESIZE_EV: that._resize(); break; + case 'DOMMouseScroll': case 'mousewheel': that._wheel(e); break; + case TRNEND_EV: that._transitionEnd(e); break; + } + }, + + _checkDOMChanges: function () { + if (this.moved || this.zoomed || this.animating || + (this.scrollerW == this.scroller.offsetWidth * this.scale && this.scrollerH == this.scroller.offsetHeight * this.scale)) return; + + this.refresh(); + }, + + _scrollbar: function (dir) { + var that = this, + bar; + + if (!that[dir + 'Scrollbar']) { + if (that[dir + 'ScrollbarWrapper']) { + if (hasTransform) that[dir + 'ScrollbarIndicator'].style[transform] = ''; + that[dir + 'ScrollbarWrapper'].parentNode.removeChild(that[dir + 'ScrollbarWrapper']); + that[dir + 'ScrollbarWrapper'] = null; + that[dir + 'ScrollbarIndicator'] = null; + } + + return; + } + + if (!that[dir + 'ScrollbarWrapper']) { + // Create the scrollbar wrapper + bar = doc.createElement('div'); + + if (that.options.scrollbarClass) bar.className = that.options.scrollbarClass + dir.toUpperCase(); + else bar.style.cssText = 'position:absolute;z-index:100;' + (dir == 'h' ? 'height:7px;bottom:1px;left:2px;right:' + (that.vScrollbar ? '7' : '2') + 'px' : 'width:7px;bottom:' + (that.hScrollbar ? '7' : '2') + 'px;top:2px;right:1px'); + + bar.style.cssText += ';pointer-events:none;' + cssVendor + 'transition-property:opacity;' + cssVendor + 'transition-duration:' + (that.options.fadeScrollbar ? '350ms' : '0') + ';overflow:hidden;opacity:' + (that.options.hideScrollbar ? '0' : '1'); + + that.wrapper.appendChild(bar); + that[dir + 'ScrollbarWrapper'] = bar; + + // Create the scrollbar indicator + bar = doc.createElement('div'); + if (!that.options.scrollbarClass) { + bar.style.cssText = 'position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);' + cssVendor + 'background-clip:padding-box;' + cssVendor + 'box-sizing:border-box;' + (dir == 'h' ? 'height:100%' : 'width:100%') + ';' + cssVendor + 'border-radius:3px;border-radius:3px'; + } + bar.style.cssText += ';pointer-events:none;' + cssVendor + 'transition-property:' + cssVendor + 'transform;' + cssVendor + 'transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform: translate(0,0)' + translateZ; + if (that.options.useTransition) bar.style.cssText += ';' + cssVendor + 'transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)'; + + that[dir + 'ScrollbarWrapper'].appendChild(bar); + that[dir + 'ScrollbarIndicator'] = bar; + } + + if (dir == 'h') { + that.hScrollbarSize = that.hScrollbarWrapper.clientWidth; + that.hScrollbarIndicatorSize = m.max(m.round(that.hScrollbarSize * that.hScrollbarSize / that.scrollerW), 8); + that.hScrollbarIndicator.style.width = that.hScrollbarIndicatorSize + 'px'; + that.hScrollbarMaxScroll = that.hScrollbarSize - that.hScrollbarIndicatorSize; + that.hScrollbarProp = that.hScrollbarMaxScroll / that.maxScrollX; + } else { + that.vScrollbarSize = that.vScrollbarWrapper.clientHeight; + that.vScrollbarIndicatorSize = m.max(m.round(that.vScrollbarSize * that.vScrollbarSize / that.scrollerH), 8); + that.vScrollbarIndicator.style.height = that.vScrollbarIndicatorSize + 'px'; + that.vScrollbarMaxScroll = that.vScrollbarSize - that.vScrollbarIndicatorSize; + that.vScrollbarProp = that.vScrollbarMaxScroll / that.maxScrollY; + } + + // Reset position + that._scrollbarPos(dir, true); + }, + + _resize: function () { + var that = this; + setTimeout(function () { that.refresh(); }, isAndroid ? 200 : 0); + }, + + _pos: function (x, y) { + if (this.zoomed) return; + + x = this.hScroll ? x : 0; + y = this.vScroll ? y : 0; + + if (this.options.useTransform) { + this.scroller.style[transform] = 'translate(' + x + 'px,' + y + 'px) scale(' + this.scale + ')' + translateZ; + } else { + x = m.round(x); + y = m.round(y); + this.scroller.style.left = x + 'px'; + this.scroller.style.top = y + 'px'; + } + + this.x = x; + this.y = y; + + this._scrollbarPos('h'); + this._scrollbarPos('v'); + }, + + _scrollbarPos: function (dir, hidden) { + var that = this, + pos = dir == 'h' ? that.x : that.y, + size; + + if (!that[dir + 'Scrollbar']) return; + + pos = that[dir + 'ScrollbarProp'] * pos; + + if (pos < 0) { + if (!that.options.fixedScrollbar) { + size = that[dir + 'ScrollbarIndicatorSize'] + m.round(pos * 3); + if (size < 8) size = 8; + that[dir + 'ScrollbarIndicator'].style[dir == 'h' ? 'width' : 'height'] = size + 'px'; + } + pos = 0; + } else if (pos > that[dir + 'ScrollbarMaxScroll']) { + if (!that.options.fixedScrollbar) { + size = that[dir + 'ScrollbarIndicatorSize'] - m.round((pos - that[dir + 'ScrollbarMaxScroll']) * 3); + if (size < 8) size = 8; + that[dir + 'ScrollbarIndicator'].style[dir == 'h' ? 'width' : 'height'] = size + 'px'; + pos = that[dir + 'ScrollbarMaxScroll'] + (that[dir + 'ScrollbarIndicatorSize'] - size); + } else { + pos = that[dir + 'ScrollbarMaxScroll']; + } + } + + that[dir + 'ScrollbarWrapper'].style[transitionDelay] = '0'; + that[dir + 'ScrollbarWrapper'].style.opacity = hidden && that.options.hideScrollbar ? '0' : '1'; + that[dir + 'ScrollbarIndicator'].style[transform] = 'translate(' + (dir == 'h' ? pos + 'px,0)' : '0,' + pos + 'px)') + translateZ; + }, + + _start: function (e) { + var that = this, + point = hasTouch ? e.touches[0] : e, + matrix, x, y, + c1, c2; + + if (!that.enabled) return; + + if (that.options.onBeforeScrollStart) that.options.onBeforeScrollStart.call(that, e); + + if (that.options.useTransition || that.options.zoom) that._transitionTime(0); + + that.moved = false; + that.animating = false; + that.zoomed = false; + that.distX = 0; + that.distY = 0; + that.absDistX = 0; + that.absDistY = 0; + that.dirX = 0; + that.dirY = 0; + + // Gesture start + if (that.options.zoom && hasTouch && e.touches.length > 1) { + c1 = m.abs(e.touches[0].pageX-e.touches[1].pageX); + c2 = m.abs(e.touches[0].pageY-e.touches[1].pageY); + that.touchesDistStart = m.sqrt(c1 * c1 + c2 * c2); + + that.originX = m.abs(e.touches[0].pageX + e.touches[1].pageX - that.wrapperOffsetLeft * 2) / 2 - that.x; + that.originY = m.abs(e.touches[0].pageY + e.touches[1].pageY - that.wrapperOffsetTop * 2) / 2 - that.y; + + if (that.options.onZoomStart) that.options.onZoomStart.call(that, e); + } + + if (that.options.momentum) { + if (that.options.useTransform) { + // Very lame general purpose alternative to CSSMatrix + matrix = getComputedStyle(that.scroller, null)[transform].replace(/[^0-9\-.,]/g, '').split(','); + x = +(matrix[12] || matrix[4]); + y = +(matrix[13] || matrix[5]); + } else { + x = +getComputedStyle(that.scroller, null).left.replace(/[^0-9-]/g, ''); + y = +getComputedStyle(that.scroller, null).top.replace(/[^0-9-]/g, ''); + } + + if (x != that.x || y != that.y) { + if (that.options.useTransition) that._unbind(TRNEND_EV); + else cancelFrame(that.aniTime); + that.steps = []; + that._pos(x, y); + if (that.options.onScrollEnd) that.options.onScrollEnd.call(that); + } + } + + that.absStartX = that.x; // Needed by snap threshold + that.absStartY = that.y; + + that.startX = that.x; + that.startY = that.y; + that.pointX = point.pageX; + that.pointY = point.pageY; + + that.startTime = e.timeStamp || Date.now(); + + if (that.options.onScrollStart) that.options.onScrollStart.call(that, e); + + that._bind(MOVE_EV, window); + that._bind(END_EV, window); + that._bind(CANCEL_EV, window); + }, + + _move: function (e) { + var that = this, + point = hasTouch ? e.touches[0] : e, + deltaX = point.pageX - that.pointX, + deltaY = point.pageY - that.pointY, + newX = that.x + deltaX, + newY = that.y + deltaY, + c1, c2, scale, + timestamp = e.timeStamp || Date.now(); + + if (that.options.onBeforeScrollMove) that.options.onBeforeScrollMove.call(that, e); + + // Zoom + if (that.options.zoom && hasTouch && e.touches.length > 1) { + c1 = m.abs(e.touches[0].pageX - e.touches[1].pageX); + c2 = m.abs(e.touches[0].pageY - e.touches[1].pageY); + that.touchesDist = m.sqrt(c1*c1+c2*c2); + + that.zoomed = true; + + scale = 1 / that.touchesDistStart * that.touchesDist * this.scale; + + if (scale < that.options.zoomMin) scale = 0.5 * that.options.zoomMin * Math.pow(2.0, scale / that.options.zoomMin); + else if (scale > that.options.zoomMax) scale = 2.0 * that.options.zoomMax * Math.pow(0.5, that.options.zoomMax / scale); + + that.lastScale = scale / this.scale; + + newX = this.originX - this.originX * that.lastScale + this.x, + newY = this.originY - this.originY * that.lastScale + this.y; + + this.scroller.style[transform] = 'translate(' + newX + 'px,' + newY + 'px) scale(' + scale + ')' + translateZ; + + if (that.options.onZoom) that.options.onZoom.call(that, e); + return; + } + + that.pointX = point.pageX; + that.pointY = point.pageY; + + // Slow down if outside of the boundaries + if (newX > 0 || newX < that.maxScrollX) { + newX = that.options.bounce ? that.x + (deltaX / 2) : newX >= 0 || that.maxScrollX >= 0 ? 0 : that.maxScrollX; + } + if (newY > that.minScrollY || newY < that.maxScrollY) { + newY = that.options.bounce ? that.y + (deltaY / 2) : newY >= that.minScrollY || that.maxScrollY >= 0 ? that.minScrollY : that.maxScrollY; + } + + that.distX += deltaX; + that.distY += deltaY; + that.absDistX = m.abs(that.distX); + that.absDistY = m.abs(that.distY); + + if (that.absDistX < 6 && that.absDistY < 6) { + return; + } + + // Lock direction + if (that.options.lockDirection) { + if (that.absDistX > that.absDistY + 5) { + newY = that.y; + deltaY = 0; + } else if (that.absDistY > that.absDistX + 5) { + newX = that.x; + deltaX = 0; + } + } + + that.moved = true; + that._pos(newX, newY); + that.dirX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0; + that.dirY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0; + + if (timestamp - that.startTime > 300) { + that.startTime = timestamp; + that.startX = that.x; + that.startY = that.y; + } + + if (that.options.onScrollMove) that.options.onScrollMove.call(that, e); + }, + + _end: function (e) { + if (hasTouch && e.touches.length !== 0) return; + + var that = this, + point = hasTouch ? e.changedTouches[0] : e, + target, ev, + momentumX = { dist:0, time:0 }, + momentumY = { dist:0, time:0 }, + duration = (e.timeStamp || Date.now()) - that.startTime, + newPosX = that.x, + newPosY = that.y, + distX, distY, + newDuration, + snap, + scale; + + that._unbind(MOVE_EV, window); + that._unbind(END_EV, window); + that._unbind(CANCEL_EV, window); + + if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e); + + if (that.zoomed) { + scale = that.scale * that.lastScale; + scale = Math.max(that.options.zoomMin, scale); + scale = Math.min(that.options.zoomMax, scale); + that.lastScale = scale / that.scale; + that.scale = scale; + + that.x = that.originX - that.originX * that.lastScale + that.x; + that.y = that.originY - that.originY * that.lastScale + that.y; + + that.scroller.style[transitionDuration] = '200ms'; + that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px) scale(' + that.scale + ')' + translateZ; + + that.zoomed = false; + that.refresh(); + + if (that.options.onZoomEnd) that.options.onZoomEnd.call(that, e); + return; + } + + if (!that.moved) { + if (hasTouch) { + if (that.doubleTapTimer && that.options.zoom) { + // Double tapped + clearTimeout(that.doubleTapTimer); + that.doubleTapTimer = null; + if (that.options.onZoomStart) that.options.onZoomStart.call(that, e); + that.zoom(that.pointX, that.pointY, that.scale == 1 ? that.options.doubleTapZoom : 1); + if (that.options.onZoomEnd) { + setTimeout(function() { + that.options.onZoomEnd.call(that, e); + }, 200); // 200 is default zoom duration + } + } else if (this.options.handleClick) { + that.doubleTapTimer = setTimeout(function () { + that.doubleTapTimer = null; + + // Find the last touched element + target = point.target; + while (target.nodeType != 1) target = target.parentNode; + + if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA') { + ev = doc.createEvent('MouseEvents'); + ev.initMouseEvent('click', true, true, e.view, 1, + point.screenX, point.screenY, point.clientX, point.clientY, + e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, + 0, null); + ev._fake = true; + target.dispatchEvent(ev); + } + }, that.options.zoom ? 250 : 0); + } + } + + that._resetPos(400); + + if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e); + return; + } + + if (duration < 300 && that.options.momentum) { + momentumX = newPosX ? that._momentum(newPosX - that.startX, duration, -that.x, that.scrollerW - that.wrapperW + that.x, that.options.bounce ? that.wrapperW : 0) : momentumX; + momentumY = newPosY ? that._momentum(newPosY - that.startY, duration, -that.y, (that.maxScrollY < 0 ? that.scrollerH - that.wrapperH + that.y - that.minScrollY : 0), that.options.bounce ? that.wrapperH : 0) : momentumY; + + newPosX = that.x + momentumX.dist; + newPosY = that.y + momentumY.dist; + + if ((that.x > 0 && newPosX > 0) || (that.x < that.maxScrollX && newPosX < that.maxScrollX)) momentumX = { dist:0, time:0 }; + if ((that.y > that.minScrollY && newPosY > that.minScrollY) || (that.y < that.maxScrollY && newPosY < that.maxScrollY)) momentumY = { dist:0, time:0 }; + } + + if (momentumX.dist || momentumY.dist) { + newDuration = m.max(m.max(momentumX.time, momentumY.time), 10); + + // Do we need to snap? + if (that.options.snap) { + distX = newPosX - that.absStartX; + distY = newPosY - that.absStartY; + if (m.abs(distX) < that.options.snapThreshold && m.abs(distY) < that.options.snapThreshold) { that.scrollTo(that.absStartX, that.absStartY, 200); } + else { + snap = that._snap(newPosX, newPosY); + newPosX = snap.x; + newPosY = snap.y; + newDuration = m.max(snap.time, newDuration); + } + } + + that.scrollTo(m.round(newPosX), m.round(newPosY), newDuration); + + if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e); + return; + } + + // Do we need to snap? + if (that.options.snap) { + distX = newPosX - that.absStartX; + distY = newPosY - that.absStartY; + if (m.abs(distX) < that.options.snapThreshold && m.abs(distY) < that.options.snapThreshold) that.scrollTo(that.absStartX, that.absStartY, 200); + else { + snap = that._snap(that.x, that.y); + if (snap.x != that.x || snap.y != that.y) that.scrollTo(snap.x, snap.y, snap.time); + } + + if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e); + return; + } + + that._resetPos(200); + if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e); + }, + + _resetPos: function (time) { + var that = this, + resetX = that.x >= 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x, + resetY = that.y >= that.minScrollY || that.maxScrollY > 0 ? that.minScrollY : that.y < that.maxScrollY ? that.maxScrollY : that.y; + + if (resetX == that.x && resetY == that.y) { + if (that.moved) { + that.moved = false; + if (that.options.onScrollEnd) that.options.onScrollEnd.call(that); // Execute custom code on scroll end + } + + if (that.hScrollbar && that.options.hideScrollbar) { + if (vendor == 'webkit') that.hScrollbarWrapper.style[transitionDelay] = '300ms'; + that.hScrollbarWrapper.style.opacity = '0'; + } + if (that.vScrollbar && that.options.hideScrollbar) { + if (vendor == 'webkit') that.vScrollbarWrapper.style[transitionDelay] = '300ms'; + that.vScrollbarWrapper.style.opacity = '0'; + } + + return; + } + + that.scrollTo(resetX, resetY, time || 0); + }, + + _wheel: function (e) { + var that = this, + wheelDeltaX, wheelDeltaY, + deltaX, deltaY, + deltaScale; + + if ('wheelDeltaX' in e) { + wheelDeltaX = e.wheelDeltaX / 12; + wheelDeltaY = e.wheelDeltaY / 12; + } else if('wheelDelta' in e) { + wheelDeltaX = wheelDeltaY = e.wheelDelta / 12; + } else if ('detail' in e) { + wheelDeltaX = wheelDeltaY = -e.detail * 3; + } else { + return; + } + + if (that.options.wheelAction == 'zoom') { + deltaScale = that.scale * Math.pow(2, 1/3 * (wheelDeltaY ? wheelDeltaY / Math.abs(wheelDeltaY) : 0)); + if (deltaScale < that.options.zoomMin) deltaScale = that.options.zoomMin; + if (deltaScale > that.options.zoomMax) deltaScale = that.options.zoomMax; + + if (deltaScale != that.scale) { + if (!that.wheelZoomCount && that.options.onZoomStart) that.options.onZoomStart.call(that, e); + that.wheelZoomCount++; + + that.zoom(e.pageX, e.pageY, deltaScale, 400); + + setTimeout(function() { + that.wheelZoomCount--; + if (!that.wheelZoomCount && that.options.onZoomEnd) that.options.onZoomEnd.call(that, e); + }, 400); + } + + return; + } + + deltaX = that.x + wheelDeltaX; + deltaY = that.y + wheelDeltaY; + + if (deltaX > 0) deltaX = 0; + else if (deltaX < that.maxScrollX) deltaX = that.maxScrollX; + + if (deltaY > that.minScrollY) deltaY = that.minScrollY; + else if (deltaY < that.maxScrollY) deltaY = that.maxScrollY; + + if (that.maxScrollY < 0) { + that.scrollTo(deltaX, deltaY, 0); + } + }, + + _transitionEnd: function (e) { + var that = this; + + if (e.target != that.scroller) return; + + that._unbind(TRNEND_EV); + + that._startAni(); + }, + + + /** + * + * Utilities + * + */ + _startAni: function () { + var that = this, + startX = that.x, startY = that.y, + startTime = Date.now(), + step, easeOut, + animate; + + if (that.animating) return; + + if (!that.steps.length) { + that._resetPos(400); + return; + } + + step = that.steps.shift(); + + if (step.x == startX && step.y == startY) step.time = 0; + + that.animating = true; + that.moved = true; + + if (that.options.useTransition) { + that._transitionTime(step.time); + that._pos(step.x, step.y); + that.animating = false; + if (step.time) that._bind(TRNEND_EV); + else that._resetPos(0); + return; + } + + animate = function () { + var now = Date.now(), + newX, newY; + + if (now >= startTime + step.time) { + that._pos(step.x, step.y); + that.animating = false; + if (that.options.onAnimationEnd) that.options.onAnimationEnd.call(that); // Execute custom code on animation end + that._startAni(); + return; + } + + now = (now - startTime) / step.time - 1; + easeOut = m.sqrt(1 - now * now); + newX = (step.x - startX) * easeOut + startX; + newY = (step.y - startY) * easeOut + startY; + that._pos(newX, newY); + if (that.animating) that.aniTime = nextFrame(animate); + }; + + animate(); + }, + + _transitionTime: function (time) { + time += 'ms'; + this.scroller.style[transitionDuration] = time; + if (this.hScrollbar) this.hScrollbarIndicator.style[transitionDuration] = time; + if (this.vScrollbar) this.vScrollbarIndicator.style[transitionDuration] = time; + }, + + _momentum: function (dist, time, maxDistUpper, maxDistLower, size) { + var deceleration = 0.0006, + speed = m.abs(dist) / time, + newDist = (speed * speed) / (2 * deceleration), + newTime = 0, outsideDist = 0; + + // Proportinally reduce speed if we are outside of the boundaries + if (dist > 0 && newDist > maxDistUpper) { + outsideDist = size / (6 / (newDist / speed * deceleration)); + maxDistUpper = maxDistUpper + outsideDist; + speed = speed * maxDistUpper / newDist; + newDist = maxDistUpper; + } else if (dist < 0 && newDist > maxDistLower) { + outsideDist = size / (6 / (newDist / speed * deceleration)); + maxDistLower = maxDistLower + outsideDist; + speed = speed * maxDistLower / newDist; + newDist = maxDistLower; + } + + newDist = newDist * (dist < 0 ? -1 : 1); + newTime = speed / deceleration; + + return { dist: newDist, time: m.round(newTime) }; + }, + + _offset: function (el) { + var left = -el.offsetLeft, + top = -el.offsetTop; + + while (el = el.offsetParent) { + left -= el.offsetLeft; + top -= el.offsetTop; + } + + if (el != this.wrapper) { + left *= this.scale; + top *= this.scale; + } + + return { left: left, top: top }; + }, + + _snap: function (x, y) { + var that = this, + i, l, + page, time, + sizeX, sizeY; + + // Check page X + page = that.pagesX.length - 1; + for (i=0, l=that.pagesX.length; i= that.pagesX[i]) { + page = i; + break; + } + } + if (page == that.currPageX && page > 0 && that.dirX < 0) page--; + x = that.pagesX[page]; + sizeX = m.abs(x - that.pagesX[that.currPageX]); + sizeX = sizeX ? m.abs(that.x - x) / sizeX * 500 : 0; + that.currPageX = page; + + // Check page Y + page = that.pagesY.length-1; + for (i=0; i= that.pagesY[i]) { + page = i; + break; + } + } + if (page == that.currPageY && page > 0 && that.dirY < 0) page--; + y = that.pagesY[page]; + sizeY = m.abs(y - that.pagesY[that.currPageY]); + sizeY = sizeY ? m.abs(that.y - y) / sizeY * 500 : 0; + that.currPageY = page; + + // Snap with constant speed (proportional duration) + time = m.round(m.max(sizeX, sizeY)) || 200; + + return { x: x, y: y, time: time }; + }, + + _bind: function (type, el, bubble) { + (el || this.scroller).addEventListener(type, this, !!bubble); + }, + + _unbind: function (type, el, bubble) { + (el || this.scroller).removeEventListener(type, this, !!bubble); + }, + + + /** + * + * Public methods + * + */ + destroy: function () { + var that = this; + + that.scroller.style[transform] = ''; + + // Remove the scrollbars + that.hScrollbar = false; + that.vScrollbar = false; + that._scrollbar('h'); + that._scrollbar('v'); + + // Remove the event listeners + that._unbind(RESIZE_EV, window); + that._unbind(START_EV); + that._unbind(MOVE_EV, window); + that._unbind(END_EV, window); + that._unbind(CANCEL_EV, window); + + if (!that.options.hasTouch) { + that._unbind('DOMMouseScroll'); + that._unbind('mousewheel'); + } + + if (that.options.useTransition) that._unbind(TRNEND_EV); + + if (that.options.checkDOMChanges) clearInterval(that.checkDOMTime); + + if (that.options.onDestroy) that.options.onDestroy.call(that); + }, + + refresh: function () { + var that = this, + offset, + i, l, + els, + pos = 0, + page = 0; + + if (that.scale < that.options.zoomMin) that.scale = that.options.zoomMin; + that.wrapperW = that.wrapper.clientWidth || 1; + that.wrapperH = that.wrapper.clientHeight || 1; + + that.minScrollY = -that.options.topOffset || 0; + that.scrollerW = m.round(that.scroller.offsetWidth * that.scale); + that.scrollerH = m.round((that.scroller.offsetHeight + that.minScrollY) * that.scale); + that.maxScrollX = that.wrapperW - that.scrollerW; + that.maxScrollY = that.wrapperH - that.scrollerH + that.minScrollY; + that.dirX = 0; + that.dirY = 0; + + if (that.options.onRefresh) that.options.onRefresh.call(that); + + that.hScroll = that.options.hScroll && that.maxScrollX < 0; + that.vScroll = that.options.vScroll && (!that.options.bounceLock && !that.hScroll || that.scrollerH > that.wrapperH); + + that.hScrollbar = that.hScroll && that.options.hScrollbar; + that.vScrollbar = that.vScroll && that.options.vScrollbar && that.scrollerH > that.wrapperH; + + offset = that._offset(that.wrapper); + that.wrapperOffsetLeft = -offset.left; + that.wrapperOffsetTop = -offset.top; + + // Prepare snap + if (typeof that.options.snap == 'string') { + that.pagesX = []; + that.pagesY = []; + els = that.scroller.querySelectorAll(that.options.snap); + for (i=0, l=els.length; i= that.maxScrollX) { + that.pagesX[page] = pos; + pos = pos - that.wrapperW; + page++; + } + if (that.maxScrollX%that.wrapperW) that.pagesX[that.pagesX.length] = that.maxScrollX - that.pagesX[that.pagesX.length-1] + that.pagesX[that.pagesX.length-1]; + + pos = 0; + page = 0; + that.pagesY = []; + while (pos >= that.maxScrollY) { + that.pagesY[page] = pos; + pos = pos - that.wrapperH; + page++; + } + if (that.maxScrollY%that.wrapperH) that.pagesY[that.pagesY.length] = that.maxScrollY - that.pagesY[that.pagesY.length-1] + that.pagesY[that.pagesY.length-1]; + } + + // Prepare the scrollbars + that._scrollbar('h'); + that._scrollbar('v'); + + if (!that.zoomed) { + that.scroller.style[transitionDuration] = '0'; + that._resetPos(400); + } + }, + + scrollTo: function (x, y, time, relative) { + var that = this, + step = x, + i, l; + + that.stop(); + + if (!step.length) step = [{ x: x, y: y, time: time, relative: relative }]; + + for (i=0, l=step.length; i 0 ? 0 : pos.left < that.maxScrollX ? that.maxScrollX : pos.left; + pos.top = pos.top > that.minScrollY ? that.minScrollY : pos.top < that.maxScrollY ? that.maxScrollY : pos.top; + time = time === undefined ? m.max(m.abs(pos.left)*2, m.abs(pos.top)*2) : time; + + that.scrollTo(pos.left, pos.top, time); + }, + + scrollToPage: function (pageX, pageY, time) { + var that = this, x, y; + + time = time === undefined ? 400 : time; + + if (that.options.onScrollStart) that.options.onScrollStart.call(that); + + if (that.options.snap) { + pageX = pageX == 'next' ? that.currPageX+1 : pageX == 'prev' ? that.currPageX-1 : pageX; + pageY = pageY == 'next' ? that.currPageY+1 : pageY == 'prev' ? that.currPageY-1 : pageY; + + pageX = pageX < 0 ? 0 : pageX > that.pagesX.length-1 ? that.pagesX.length-1 : pageX; + pageY = pageY < 0 ? 0 : pageY > that.pagesY.length-1 ? that.pagesY.length-1 : pageY; + + that.currPageX = pageX; + that.currPageY = pageY; + x = that.pagesX[pageX]; + y = that.pagesY[pageY]; + } else { + x = -that.wrapperW * pageX; + y = -that.wrapperH * pageY; + if (x < that.maxScrollX) x = that.maxScrollX; + if (y < that.maxScrollY) y = that.maxScrollY; + } + + that.scrollTo(x, y, time); + }, + + disable: function () { + this.stop(); + this._resetPos(0); + this.enabled = false; + + // If disabled after touchstart we make sure that there are no left over events + this._unbind(MOVE_EV, window); + this._unbind(END_EV, window); + this._unbind(CANCEL_EV, window); + }, + + enable: function () { + this.enabled = true; + }, + + stop: function () { + if (this.options.useTransition) this._unbind(TRNEND_EV); + else cancelFrame(this.aniTime); + this.steps = []; + this.moved = false; + this.animating = false; + }, + + zoom: function (x, y, scale, time) { + var that = this, + relScale = scale / that.scale; + + if (!that.options.useTransform) return; + + that.zoomed = true; + time = time === undefined ? 200 : time; + x = x - that.wrapperOffsetLeft - that.x; + y = y - that.wrapperOffsetTop - that.y; + that.x = x - x * relScale + that.x; + that.y = y - y * relScale + that.y; + + that.scale = scale; + that.refresh(); + + that.x = that.x > 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x; + that.y = that.y > that.minScrollY ? that.minScrollY : that.y < that.maxScrollY ? that.maxScrollY : that.y; + + that.scroller.style[transitionDuration] = time + 'ms'; + that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px) scale(' + scale + ')' + translateZ; + that.zoomed = false; + }, + + isReady: function () { + return !this.moved && !this.zoomed && !this.animating; + } +}; + +function prefixStyle (style) { + if ( vendor === '' ) return style; + + style = style.charAt(0).toUpperCase() + style.substr(1); + return vendor + style; +} + +dummyStyle = null; // for the sake of it + +if (typeof exports !== 'undefined') exports.iScroll = iScroll; +else window.iScroll = iScroll; + +})(window, document); diff --git a/webclient/js/jquery.mobile.iscrollview-closure-min.js b/webclient/js/jquery.mobile.iscrollview-closure-min.js new file mode 100755 index 0000000..4aaff49 --- /dev/null +++ b/webclient/js/jquery.mobile.iscrollview-closure-min.js @@ -0,0 +1,51 @@ +(function(d,n,m,e){function o(a){a.preventDefault()}function j(a,b,c){this.iscrollview=a;this._emulateBottomOffset=function(){this.iscrollview.options.emulateBottomOffset&&(this.maxScrollY=this.wrapperH-this.scrollerH+this.minScrollY+this.iscrollview.options.bottomOffset)};this._fixInput=function(a){if(this.iscrollview.options.fixInput){var b;for(b=a.target;1!==b.nodeType;)b=b.parentNode;b=b.tagName.toLowerCase();if("select"===b||"input"===b||"textarea"===b)return}this.iscrollview.options.preventTouchHover? +a.stopImmediatePropagation():a.preventDefault()};this._doCallback=function(a,b,c){var d=this.iscrollview,e=d._logCallback(a,b);c&&c.call(this,b);d._trigger(a.toLowerCase(),b,{iscrollview:d});d._logCallback(a,b,e)};this._bind=function(a,b,c){var e=this.iscrollview.options.bindIscrollUsingJqueryEvents,i=e&&"mouseout"===a?"mouseleave":a;"orientationchange"===a||"resize"===a?this.iscrollview._logIscrollEvent("iScroll bind (ignored)",a):(this.iscrollview._logIscrollEvent("iScroll bind",a),e?(b?d(b):this.iscrollview.$scroller).bind(i, +d.proxy(this.handleEvent,this)):(b||this.scroller).addEventListener(i,this,!!c))};this._unbind=function(a,b,c){var e=this.iscrollview.options.bindIscrollUsingJqueryEvents,i=e&&"mouseout"===a?"mouseleave":a;"orientationchange"===a||"resize"===a?this.iscrollview._logIscrollEvent("iScroll unbind (ignored)"):(this.iscrollview._logIscrollEvent("iScroll unbind",a),e?d(b||this.iscrollview.$scroller).unbind(i,this.handleEvent):(b||this.scroller).removeEventListener(i,this,!!c))};this._origHandleEvent=iScroll.prototype.handleEvent; +this.handleEvent=function(a){var b=this.iscrollview.options.bindIscrollUsingJqueryEvents,c;c=this.iscrollview._logIscrollEvent("iScroll.handleEvent",a);b&&"mouseleave"===a.type?(a.type="mouseout",this._origHandleEvent(a),a.type="mouseleave"):this._origHandleEvent(a);this.iscrollview._logIscrollEvent("iScroll.handleEvent",a,c)};this._resize=function(){};iScroll.call(this,b,c)}var k=m.ontouchend!==e,p=/webkit/i.test(navigator.appVersion),q=/android/gi.test(navigator.appVersion),r=/firefox/i.test(navigator.userAgent); +/hp-tablet/gi.test(navigator.appVersion);/(iPhone|iPad|iPod).*AppleWebKit/.test(navigator.appVersion);var s=/iPad.*AppleWebKit/.test(navigator.appVersion),t=/(iPhone|iPad|iPod).*AppleWebKit.*Safari/.test(navigator.appVersion);/(iPhone|iPad|iPod).*AppleWebKit.(?!.*Safari)/.test(navigator.appVersion);var u=d.mobile.ignoreContentEnabled===e,l=1,h=function(){};h.prototype=iScroll.prototype;h=new h;h.constructor=j;j.prototype=h;d.widget("mobile.iscrollview",d.mobile.widget,{widgetEventPrefix:"iscroll_", +iscroll:null,$window:d(n),$wrapper:[],$scroller:[],$scrollerContent:[],$pullDown:[],$pullUp:[],$pullUpSpacer:[],$page:[],_wrapperHeightAdjustForBoxModel:0,_firstScrollerExpand:!0,createdAt:null,pageID:null,instanceID:null,_dirty:!1,_dirtyCallbackBefore:null,_dirtyCallbackAfter:null,_sizeDirty:!1,options:{hScroll:!1,hScrollbar:!1,debug:!1,traceResizeWrapper:!1,traceRefresh:!1,traceCreateDestroy:!1,traceIscrollEvents:!1,tracedIscrollEvents:[],traceWidgetEvents:!1,tracedWidgetEvents:[],traceIscrollCallbacks:!1, +tracedIscrollCallbacks:[],traceWidgetCallbacks:!1,tracedWidgetCallbacks:[],bottomOffset:0,emulateBottomOffset:!0,pageClass:"iscroll-page",wrapperClass:"iscroll-wrapper",scrollerClass:"iscroll-scroller",pullDownClass:"iscroll-pulldown",pullUpClass:"iscroll-pullup",pullLabelClass:"iscroll-pull-label",pullUpSpacerClass:"iscroll-pullup-spacer",scrollerContentClass:"iscroll-content",fixedHeightClass:"iscroll-fixed",fixedHeightSelector:":jqmData(role='header'), :jqmData(role='footer'), :jqmData(iscroll-fixed)", +resizeWrapper:!0,resizeEvents:"resize"+(d.support.orientation?" orientationchange":""),refreshOnPageBeforeShow:!1,fixInput:!0,wrapperAdd:0,refreshDelay:q?200:0,scrollShortContent:!0,removeWrapperPadding:!0,addScrollerPadding:!0,scrollTopOnResize:!0,scrollTopOnOrientatationChange:!0,createScroller:!0,deferNonActiveRefresh:!0,deferNonActiveResize:!0,preventTouchHover:u&&k,bindIscrollUsingJqueryEvents:!1,fastDestroy:!1,preventPageScroll:!0,pullDownResetText:"Pull down to refresh...",pullDownPulledText:"Release to refresh...", +pullDownLoadingText:"Loading...",pullUpResetText:"Pull up to refresh...",pullUpPulledText:"Release to refresh...",pullUpLoadingText:"Loading...",pullPulledClass:"iscroll-pull-pulled",pullLoadingClass:"iscroll-pull-loading",onrefresh:null,onbeforescrollstart:null,onscrollstart:null,onbeforescrollmove:null,onscrollmove:null,onbeforescrollend:null,onscrollend:null,ontouchend:null,ondestroy:null,onzoomstart:null,onzoom:null,onzoomend:null,onpulldownreset:null,onpulldownpulled:null,onpulldown:null,onpullupreset:null, +onpulluppulled:null,onpullup:null,onbeforerefresh:null,onafterrefresh:null},_widgetOnlyOptions:"debug traceIscrollEvents tracedIscrollEvents traceIscrollCallbacks tracedIscrollCallbacks traceWidgetEvents tracedWidgetEvents traceWidgetCallbacks tracedWidgetCallbacks traceResizeWrapper traceRefresh traceCreateDestroy bottomOffset emulateBottomOffset pageClass wrapperClass scrollerClass pullDownClass pullUpClass scrollerContentClass pullLabelClass pullUpSpacerClass fixedHeightSelector resizeWrapper resizeEvents refreshOnPageBeforeShow fixInput wrapperAdd refreshDelay scrollShortContent removeWrapperPadding addScrollerPadding createScroller deferNonActiveRefresh preventTouchHover deferNonActiveResize bindIscrollUsingJqueryEvents scrollTopOnResize scrollTopOnOrientationChange pullDownResetText pullDownPulledText pullDownLoadingText pullUpResetText pullUpPulledText pullUpLoadingText pullPulledClass pullLoadingClass onpulldownreset onpulldownpulled onpulldown onpullupreset onpulluppulled onpullup onbeforerefresh onafterrefresh fastDestroy".split(" "), +_event_map:{onrefresh:"onRefresh",onbeforescrollstart:"onBeforeScrollStart",onscrollstart:"onScrollStart",onbeforescrollmove:"onBeforeScrollMove",onscrollmove:"onScrollMove",onbeforescrollend:"onBeforeScrollEnd",onscrollend:"onScrollEnd",ontouchend:"onTouchEnd",ondestroy:"onDetroy",onzoomstart:"onZoomStart",onzoom:"onZoom",onzoomend:"onZoomEnd"},_proxy_event_funcs:{onRefresh:function(a){this._doCallback("onRefresh",a,function(a){this._emulateBottomOffset();this.iscrollview._pullOnRefresh.call(this.iscrollview, +a)})},onBeforeScrollStart:function(a){this._doCallback("onBeforeScrollStart",a,function(a){this._fixInput(a)})},onScrollStart:function(a){this._doCallback("onScrollStart",a)},onBeforeScrollMove:function(a){this._doCallback("onBeforeScrollMove",a);a.preventDefault()},onScrollMove:function(a){this._doCallback("onScrollMove",a,function(a){this.iscrollview._pullOnScrollMove.call(this.iscrollview,a)})},onBeforeScrollEnd:function(a){this._doCallback("onBeforeScrollEnd",a)},onScrollEnd:function(a){this._doCallback("onScrollEnd", +a,function(a){this.iscrollview._pullOnScrollEnd.call(this.iscrollview,a)})},onTouchEnd:function(a){this._doCallback("onTouchEnd",a)},onDestroy:function(a){this._doCallback("onDestroy",a)},onZoomStart:function(a){this._doCallback("onZoomStart",a)},onZoom:function(a){this._doCallback("onZoom",a)},onZoomEnd:function(a){this._doCallback("onZoomEnd",a)}},_merge_from_iscroll_options:function(){var a=d.extend(!0,{},this.iscroll.options);d.each(this._proxy_event_funcs,function(b){delete a[b]});this.options.emulateBottomOffset&& +delete a.bottomOffset;d.extend(this.options,a)},_create_iscroll_options:function(){var a=d.extend(!0,{},this.options);d.each(this._widgetOnlyOptions,function(b,c){delete a[c]});d.each(this._event_map,function(b){delete a[b]});this.options.emulateBottomOffset&&delete a.bottomOffset;return d.extend(a,this._proxy_event_funcs)},_pad:function(a,b,c){a=a.toString();for(c=c||"0";a.length");a.parent().addClass(this.options.scrollerContentClass).css({"padding-left":this._origWrapperPaddingLeft, +"padding-right":this._origWrapperPaddingRight,"padding-top":this._origWrapperPaddingTop,"padding-bottom":this._origWrapperPaddingBottom})}},_undoAddScrollerPadding:function(){this.options.removeWrapperPadding&&this.options.addScrollerPadding&&d("."+this.options.scrollerContentClass,this.$scroller).children().unwrap()},_addWrapperClasses:function(){this.$wrapper.addClass(this.options.wrapperClass);this.$scroller.addClass(this.options.scrollerClass)},_undoAddWrapperClasses:function(){this.$scroller.removeClass(this.options.scrollerClass); +this.$wrapper.removeClass(this.options.wrapperClass)},_expandScrollerToFillWrapper:function(){if(this.options.scrollShortContent||this.$pullDown.length||this.pullUp.length)this._firstScrollerExpand&&(this._origScrollerStyle=this.$scroller.attr("style")||null,this._firstScrollerExpand=!1),this.$scroller.css("min-height",this.$wrapper.height()+(this.$pullDown.length?this.$pullDown.outerHeight(!0):0)+(this.$pullUp.length?this.$pullUp.outerHeight(!0):0))},_undoExpandScrollerToFillWrapper:function(){this._restoreStyle(this.$scroller, +this._origScrollerStyle)},_resizeWrapper:function(){var a=null,b,c;this.options.resizeWrapper&&(this.options.traceResizeWrapper&&(a=this._log("resizeWrapper() start")),this.$wrapper.trigger("updatelayout"),b=m.documentElement.clientHeight,c=this._calculateBarsHeight(),b=b-c-this._wrapperHeightAdjustForBoxModel+(t&&!s?60:0)+this.options.wrapperAdd,this.$wrapper.css("height",b),this._expandScrollerToFillWrapper(),this.options.traceResizeWrapper&&this._logInterval("resizeWrapper() end"+(this._sizeDirty? +" (dirty)":""),a))},resizeWrapper:function(){var a=this._setPageVisible();this._resizeWrapper();this._restorePageVisibility(a)},_undoResizeWrapper:function(){},_modifyWrapper:function(){this._addWrapperClasses();this._modifyWrapperCSS();this._wrapperHeightAdjustForBoxModel=this._getHeightAdjustForBoxModel(this.$wrapper)},_undoModifyWrapper:function(){this._undoResizeWrapper();this._undoModifyWrapperCSS();this._undoAddWrapperClasses()},_modifyPullDown:function(){var a,b;if(0!==this.$pullDown.length&& +(a=d("."+this.options.pullLabelClass,this.$pullDown),a.length)){(this._origPullDownLabelText=a.text())?this.options.pullDownResetText=this._origPullDownLabelText:a.text(this.options.pullDownResetText);if(b=a.jqmData("iscroll-pulled-text"))this.options.pullDownPulledText=b;if(a=a.jqmData("iscroll-loading-text"))this.options.pullDownLoadingText=a}},_undoModifyPullDown:function(){if(0!==this.$pullDown.length){var a=d("."+this.options.pullLabelClass,this.$pullDown);0!==a.length&&a.text(this._origPullDownLabelText)}}, +_modifyPullUp:function(){var a,b;if(0!==this.$pullUp.length&&(d("
    ").insertBefore(this.$pullUp).css("height",this.$pullUp.outerHeight(!0)),this.$pullUpSpacer=this.$pullUp.prev(),this.$pullUpSpacer.addClass(this.options.pullUpSpacerClass),a=d("."+this.options.pullLabelClass,this.$pullUp),a.length)){(this._origPullUpLabelText=a.text())?this.options.pullUpResetText=this._origPullUpLabelText:a.text(this.options.pullUpResetText);if(b=a.jqmData("iscroll-pulled-text"))this.options.pullUpPulledText= +b;if(a=a.jqmData("iscroll-loading-text"))this.options.pullUpLoadingText=a}},_undoModifyPullUp:function(){0!==this.$pullUp.length&&(this.$pullUp.prev().remove(),this._origPullUpLabelText&&d("."+this.options.pullLabelClass,this.$pullUp).text(this._origPullUpLabelText))},_correctPushedDownPage:function(){this.options.resizeWrapper&&this.options.scrollTopOnResize&&d.mobile.silentScroll(0)},refresh:function(a,b,c,g){var f,h;if(!g&&this.options.deferNonActiveRefresh&&!this.$page.is(d.mobile.activePage))this._dirty= +!0,this._dirtyCallbackBefore=b,this._dirtyCallbackAfter=c,this.options.traceRefresh&&this._log("refresh() (deferred)");else{f=this;h=this._startTiming();if(a===e||null===a)a=this.options.refreshDelay;setTimeout(function(){var a=null,d;f.options.traceRefresh&&(a=f._logInterval("refresh() start",h));d=f._setPageVisible();b&&b();f._triggerWidget("onbeforerefresh");f.iscroll.refresh();f._triggerWidget("onafterrefresh");c&&c();f._restorePageVisibility(d);d||f._correctPushedDownPage();f.options.traceRefresh&& +f._logInterval2("refresh() end"+(g?" (dirty)":""),h,a)},a);this.options.traceRefresh&&this._log("refresh() will occur after >= "+a+"mS")}},_create_iscroll_object:function(){this.iscroll=new j(this,this.$wrapper.get(0),this._create_iscroll_options())},_createScroller:function(){this.options.createScroller&&(this.$wrapper.children().length?this.$wrapper.children().wrapAll("
    "):this.$wrapper.append("
    "))},_undoCreateScroller:function(){this.options.createScroller&&this.$scroller.children().unwrap()}, +_setPageVisible:function(){var a=this.$page.is(":hidden");a&&this.$page.css("display","block");return a},_restorePageVisibility:function(a){a&&this.$page.css("display","")},_create:function(){var a=new Date,b;this.$wrapper=this.element;this.$page=this.$wrapper.parents(":jqmData(role='page')");this.options.debug&&this.options.traceCreateDestroy&&this._log("_create() start",a);this.createdAt=a;this._instanceCount(this._instanceCount()+1);this.instanceID=this._nextInstanceID();this._nextInstanceID(this._instanceID+ +1);1===this.instanceID&&(this._pageID(l),l+=1);this.pageID=this._pageID();b=this._setPageVisible();this._adaptPage();this._createScroller();this.$scroller=this.$wrapper.children(":first");0!==this.$scroller.length&&(this.$pullDown=d("."+this.options.pullDownClass,this.$scroller),this._modifyPullDown(),this.$pullUp=d("."+this.options.pullUpClass,this.$scroller),this._modifyPullUp(),d.extend(!0,this.options,this.$wrapper.jqmData("iscroll")),this._modifyWrapper(),this._bindPage("pagebeforeshow",this._pageBeforeShowFunc), +this._setTopOffsetForPullDown(),this._setBottomOffsetForPullUp(),this._resizeWrapper(),this._addScrollerPadding(),this._create_iscroll_object(),this._merge_from_iscroll_options(),this._restorePageVisibility(b),this.options.resizeWrapper&&(this._isvBind(this.$window,this.options.resizeEvents,this._windowResizeFunc,"$window"),this.options.scrollTopOnOrientationChange&&this._isvBind(this.$window,"orientationchange",this._orientationChangeFunc,"$window")),this.$scrollerContent=this.$scroller.find("."+ +this.options.scrollerContentClass),this._isvBind(this.$scrollerContent,"updatelayout",this._updateLayoutFunc,"$scrollerContent"),this.options.debug&&this.options.traceCreateDestroy&&this._logInterval("_create() end",a))},destroy:function(){var a=null;this.options.debug&&this.options.traceCreateDestroy&&(a=this._log("destroy() start"));this._isvUnbind(this.$scrollerContent,"updatelayout","$scrollerContent");this._isvUnbind(this.$window,this.options.resizeEvents,"$window");this._isvUnbind(this.$window, +"orientationchange","$window");1===this._instanceCount()&&(this._unbindPage("pagebeforeshow"),k&&this._unbindPage("touchmove"));this.options.fastDestroy||(this.iscroll.destroy(),this.iscroll=null,this._undoExpandScrollerToFillWrapper(),this._undoModifyPullDown(),this._undoModifyPullUp(),this._undoAddScrollerPadding(),this._undoModifyWrapper(),this.$wrapper.removeClass(this.options.wrapperClass),this.$scroller.removeClass(this.options.scrollerClass),this._undoCreateScroller());this._instanceCount(this._instanceCount()- +1);0===this._instanceCount()&&this._undoAdaptPage();d.Widget.prototype.destroy.call(this);this.options.debug&&this.options.traceCreateDestroy&&this._logInterval("destroy() end",a)},enable:function(){this.iscroll.enable();d.Widget.prototype.enable.call(this)},disable:function(){this.iscroll.disable();d.Widget.prototype.disable.call(this)},_setOption:function(a,b){var c;this.options[a]=b;this.iscroll.destroy();c=this._setPageVisible();this._create_iscroll_object();this._restorePageVisibility(c);d.Widget.prototype._setOption.apply(this, +arguments)},scrollTo:function(a,b,c,d){this.iscroll.scrollTo(a,b,c,d)},scrollToElement:function(a,b){this.iscroll.scrollToElement(a,b)},scrollToPage:function(a,b,c){this.iscroll.scrollToPage(a,b,c)},stop:function(){this.iscroll.stop()},zoom:function(a,b,c,d){this.iscroll.zoom(a,b,c,d)},isReady:function(){return this.iscroll.isReady()},x:function(){return this.iscroll.x},y:function(){return this.iscroll.y},wrapperW:function(){return this.iscroll.wrapperW},wrapperH:function(){return this.iscroll.wrapperH}, +scrollerW:function(){return this.iscroll.scrollerW},scrollerH:function(){return this.iscroll.scrollerH},minScrollX:function(a){a!==e&&(this.iscroll.minScrollX=a);return this.iscroll.minScrollX},minScrollY:function(a){a!==e&&(this.iscroll.minScrollY=a);return this.iscroll.minScrollY},maxScrollX:function(a){a!==e&&(this.iscroll.maxScrollX=a);return this.iscroll.maxScrollX},maxScrollY:function(a){a!==e&&(this.iscroll.maxScrollY=a);return this.iscroll.maxScrollY},_pullDownIsPulled:function(){return this.$pullDown.length&& +this.$pullDown.hasClass(this.options.pullPulledClass)},_pullUpIsPulled:function(){return this.$pullUp.length&&this.$pullUp.hasClass(this.options.pullPulledClass)},_replacePullText:function(a,b){var c;b&&(c=d("."+this.options.pullLabelClass,a))&&c.text(b)},_pullSetStateReset:function(a,b){a.is("."+this.options.pullLoadingClass+", ."+this.options.pullPulledClass)&&(a.removeClass(this.options.pullPulledClass+" "+this.options.pullLoadingClass),this._replacePullText(a,b))},_pullDownSetStateReset:function(a){this._pullSetStateReset(this.$pullDown, +this.options.pullDownResetText);this._triggerWidget("onpulldownreset",a)},_pullUpSetStateReset:function(a){this._pullSetStateReset(this.$pullUp,this.options.pullUpResetText);this._triggerWidget("onpullupreset",a)},_pullSetStatePulled:function(a,b){a.removeClass(this.options.pullLoadingClass).addClass(this.options.pullPulledClass);this._replacePullText(a,b)},_pullDownSetStatePulled:function(a){this._pullSetStatePulled(this.$pullDown,this.options.pullDownPulledText);this._triggerWidget("onpulldownpulled", +a)},_pullUpSetStatePulled:function(a){this._pullSetStatePulled(this.$pullUp,this.options.pullUpPulledText);this._triggerWidget("onpulluppulled",a)},_pullSetStateLoading:function(a,b){a.removeClass(this.options.pullPulledClass).addClass(this.options.pullLoadingClass);this._replacePullText(a,b)},_pullDownSetStateLoading:function(a){this._pullSetStateLoading(this.$pullDown,this.options.pullDownLoadingText);this._triggerWidget("onpulldownloading",a)},_pullUpSetStateLoading:function(a){this._pullSetStateLoading(this.$pullUp, +this.options.pullUpLoadingText);this._triggerWidget("onpulluploading",a)},_pullOnRefresh:function(a){this.$pullDown.length&&this._pullDownSetStateReset(a);this.$pullUp.length&&this._pullUpSetStateReset(a)},_pullOnScrollMove:function(a){var b,c,d=this.y();this.$pullDown.length&&(b=this._pullDownIsPulled(),c=this.options.topOffset,!b&&d>c/2?(this._pullDownSetStatePulled(a),this.minScrollY(0)):b&&0>=d&&(this._pullDownSetStateReset(a),this.minScrollY(-c)));this.$pullUp.length&&(b=this._pullUpIsPulled(), +c=this.options.bottomOffset,!b&&d=this.maxScrollY()&&(this._pullUpSetStateReset(a),this.maxScrollY(this.wrapperH()-this.scrollerH()+this.minScrollY()+c)))},_pullOnScrollEnd:function(a){this._pullDownIsPulled(a)?(this._pullDownSetStateLoading(a),this._triggerWidget("onpulldown",a)):this._pullUpIsPulled(a)&&(this._pullUpSetStateLoading(a),this._triggerWidget("onpullup",a))}})})(jQuery, +window,document);jQuery(document).bind("pagecreate",function(d){jQuery(d.target).find(":jqmData(iscroll)").iscrollview()}); \ No newline at end of file diff --git a/webclient/js/jquery.mobile.iscrollview-yui-min.js b/webclient/js/jquery.mobile.iscrollview-yui-min.js new file mode 100755 index 0000000..d3b4f84 --- /dev/null +++ b/webclient/js/jquery.mobile.iscrollview-yui-min.js @@ -0,0 +1 @@ +(function(g,j,o,i){var r=o.ontouchend!==i,m=(/webkit/i).test(navigator.appVersion),a=(/android/gi).test(navigator.appVersion),k=(/firefox/i).test(navigator.userAgent),e=(/hp-tablet/gi).test(navigator.appVersion),l=(/(iPhone|iPad|iPod).*AppleWebKit/).test(navigator.appVersion),q=(/iPad.*AppleWebKit/).test(navigator.appVersion),b=(/(iPhone|iPad|iPod).*AppleWebKit.*Safari/).test(navigator.appVersion),f=(/(iPhone|iPad|iPod).*AppleWebKit.(?!.*Safari)/).test(navigator.appVersion),s=l&&(j.navigator.Standalone!==i),d=g.mobile.ignoreContentEnabled===i,p=1;function n(t){t.preventDefault()}function c(u,w){function t(){}t.prototype=w.prototype;var v=new t();v.constructor=u;u.prototype=v}function h(u,t,v){this.iscrollview=u;this._emulateBottomOffset=function(w){if(this.iscrollview.options.emulateBottomOffset){this.maxScrollY=this.wrapperH-this.scrollerH+this.minScrollY+this.iscrollview.options.bottomOffset}};this._fixInput=function(y){if(this.iscrollview.options.fixInput){var w,x=y.target;while(x.nodeType!==1){x=x.parentNode}w=x.tagName.toLowerCase();if(w==="select"||w==="input"||w==="textarea"){return}}if(this.iscrollview.options.preventTouchHover){y.stopImmediatePropagation()}else{y.preventDefault()}};this._doCallback=function(z,y,x){var w=this.iscrollview,A=w._logCallback(z,y);if(x){x.call(this,y)}w._trigger(z.toLowerCase(),y,{iscrollview:w});w._logCallback(z,y,A)};this._bind=function(z,y,w){var A=this.iscrollview.options.bindIscrollUsingJqueryEvents,x=A&&z==="mouseout"?"mouseleave":z;if(z==="orientationchange"||z==="resize"){this.iscrollview._logIscrollEvent("iScroll bind (ignored)",z);return}this.iscrollview._logIscrollEvent("iScroll bind",z);if(A){(y?g(y):this.iscrollview.$scroller).bind(x,g.proxy(this.handleEvent,this))}else{(y||this.scroller).addEventListener(x,this,!!w)}};this._unbind=function(z,y,w){var A=this.iscrollview.options.bindIscrollUsingJqueryEvents,x=A&&z==="mouseout"?"mouseleave":z;if(z==="orientationchange"||z==="resize"){this.iscrollview._logIscrollEvent("iScroll unbind (ignored)");return}this.iscrollview._logIscrollEvent("iScroll unbind",z);if(A){g(y||this.iscrollview.$scroller).unbind(x,this.handleEvent)}else{(y||this.scroller).removeEventListener(x,this,!!w)}};this._origHandleEvent=iScroll.prototype.handleEvent;this.handleEvent=function(x){var w=this.iscrollview.options.bindIscrollUsingJqueryEvents,y;y=this.iscrollview._logIscrollEvent("iScroll.handleEvent",x);if(w&&x.type==="mouseleave"){x.type="mouseout";this._origHandleEvent(x);x.type="mouseleave"}else{this._origHandleEvent(x)}this.iscrollview._logIscrollEvent("iScroll.handleEvent",x,y)};this._resize=function(){};iScroll.call(this,t,v)}c(h,iScroll);g.widget("mobile.iscrollview",g.mobile.widget,{widgetEventPrefix:"iscroll_",iscroll:null,$window:g(j),$wrapper:[],$scroller:[],$scrollerContent:[],$pullDown:[],$pullUp:[],$pullUpSpacer:[],$page:[],_wrapperHeightAdjustForBoxModel:0,_firstScrollerExpand:true,createdAt:null,pageID:null,instanceID:null,_dirty:false,_dirtyCallbackBefore:null,_dirtyCallbackAfter:null,_sizeDirty:false,options:{hScroll:false,hScrollbar:false,debug:false,traceResizeWrapper:false,traceRefresh:false,traceCreateDestroy:false,traceIscrollEvents:false,tracedIscrollEvents:[],traceWidgetEvents:false,tracedWidgetEvents:[],traceIscrollCallbacks:false,tracedIscrollCallbacks:[],traceWidgetCallbacks:false,tracedWidgetCallbacks:[],bottomOffset:0,emulateBottomOffset:true,pageClass:"iscroll-page",wrapperClass:"iscroll-wrapper",scrollerClass:"iscroll-scroller",pullDownClass:"iscroll-pulldown",pullUpClass:"iscroll-pullup",pullLabelClass:"iscroll-pull-label",pullUpSpacerClass:"iscroll-pullup-spacer",scrollerContentClass:"iscroll-content",fixedHeightClass:"iscroll-fixed",fixedHeightSelector:":jqmData(role='header'), :jqmData(role='footer'), :jqmData(iscroll-fixed)",resizeWrapper:true,resizeEvents:"resize"+(g.support.orientation?" orientationchange":""),refreshOnPageBeforeShow:false,fixInput:true,wrapperAdd:0,refreshDelay:a?200:0,scrollShortContent:true,removeWrapperPadding:true,addScrollerPadding:true,scrollTopOnResize:true,scrollTopOnOrientatationChange:true,createScroller:true,deferNonActiveRefresh:true,deferNonActiveResize:true,preventTouchHover:d&&r,bindIscrollUsingJqueryEvents:false,fastDestroy:false,preventPageScroll:true,pullDownResetText:"Pull down to refresh...",pullDownPulledText:"Release to refresh...",pullDownLoadingText:"Loading...",pullUpResetText:"Pull up to refresh...",pullUpPulledText:"Release to refresh...",pullUpLoadingText:"Loading...",pullPulledClass:"iscroll-pull-pulled",pullLoadingClass:"iscroll-pull-loading",onrefresh:null,onbeforescrollstart:null,onscrollstart:null,onbeforescrollmove:null,onscrollmove:null,onbeforescrollend:null,onscrollend:null,ontouchend:null,ondestroy:null,onzoomstart:null,onzoom:null,onzoomend:null,onpulldownreset:null,onpulldownpulled:null,onpulldown:null,onpullupreset:null,onpulluppulled:null,onpullup:null,onbeforerefresh:null,onafterrefresh:null},_widgetOnlyOptions:["debug","traceIscrollEvents","tracedIscrollEvents","traceIscrollCallbacks","tracedIscrollCallbacks","traceWidgetEvents","tracedWidgetEvents","traceWidgetCallbacks","tracedWidgetCallbacks","traceResizeWrapper","traceRefresh","traceCreateDestroy","bottomOffset","emulateBottomOffset","pageClass","wrapperClass","scrollerClass","pullDownClass","pullUpClass","scrollerContentClass","pullLabelClass","pullUpSpacerClass","fixedHeightSelector","resizeWrapper","resizeEvents","refreshOnPageBeforeShow","fixInput","wrapperAdd","refreshDelay","scrollShortContent","removeWrapperPadding","addScrollerPadding","createScroller","deferNonActiveRefresh","preventTouchHover","deferNonActiveResize","bindIscrollUsingJqueryEvents","scrollTopOnResize","scrollTopOnOrientationChange","pullDownResetText","pullDownPulledText","pullDownLoadingText","pullUpResetText","pullUpPulledText","pullUpLoadingText","pullPulledClass","pullLoadingClass","onpulldownreset","onpulldownpulled","onpulldown","onpullupreset","onpulluppulled","onpullup","onbeforerefresh","onafterrefresh","fastDestroy"],_event_map:{onrefresh:"onRefresh",onbeforescrollstart:"onBeforeScrollStart",onscrollstart:"onScrollStart",onbeforescrollmove:"onBeforeScrollMove",onscrollmove:"onScrollMove",onbeforescrollend:"onBeforeScrollEnd",onscrollend:"onScrollEnd",ontouchend:"onTouchEnd",ondestroy:"onDetroy",onzoomstart:"onZoomStart",onzoom:"onZoom",onzoomend:"onZoomEnd"},_proxy_event_funcs:{onRefresh:function(t){this._doCallback("onRefresh",t,function(u){this._emulateBottomOffset();this.iscrollview._pullOnRefresh.call(this.iscrollview,u)})},onBeforeScrollStart:function(t){this._doCallback("onBeforeScrollStart",t,function(u){this._fixInput(u)})},onScrollStart:function(t){this._doCallback("onScrollStart",t)},onBeforeScrollMove:function(t){this._doCallback("onBeforeScrollMove",t);t.preventDefault()},onScrollMove:function(t){this._doCallback("onScrollMove",t,function(u){this.iscrollview._pullOnScrollMove.call(this.iscrollview,u)})},onBeforeScrollEnd:function(t){this._doCallback("onBeforeScrollEnd",t)},onScrollEnd:function(t){this._doCallback("onScrollEnd",t,function(u){this.iscrollview._pullOnScrollEnd.call(this.iscrollview,u)})},onTouchEnd:function(t){this._doCallback("onTouchEnd",t)},onDestroy:function(t){this._doCallback("onDestroy",t)},onZoomStart:function(t){this._doCallback("onZoomStart",t)},onZoom:function(t){this._doCallback("onZoom",t)},onZoomEnd:function(t){this._doCallback("onZoomEnd",t)}},_merge_from_iscroll_options:function(){var t=g.extend(true,{},this.iscroll.options);g.each(this._proxy_event_funcs,function(w,u){delete t[w]});if(this.options.emulateBottomOffset){delete t.bottomOffset}g.extend(this.options,t)},_create_iscroll_options:function(){var t=g.extend(true,{},this.options);g.each(this._widgetOnlyOptions,function(w,u){delete t[u]});g.each(this._event_map,function(w,u){delete t[w]});if(this.options.emulateBottomOffset){delete t.bottomOffset}return g.extend(t,this._proxy_event_funcs)},_pad:function(t,v,w){var x=t.toString(),u=w||"0";while(x.length");t=u.parent().addClass(this.options.scrollerContentClass);t.css({"padding-left":this._origWrapperPaddingLeft,"padding-right":this._origWrapperPaddingRight,"padding-top":this._origWrapperPaddingTop,"padding-bottom":this._origWrapperPaddingBottom})}},_undoAddScrollerPadding:function(){if(this.options.removeWrapperPadding&&this.options.addScrollerPadding){g("."+this.options.scrollerContentClass,this.$scroller).children().unwrap()}},_addWrapperClasses:function(){this.$wrapper.addClass(this.options.wrapperClass);this.$scroller.addClass(this.options.scrollerClass)},_undoAddWrapperClasses:function(){this.$scroller.removeClass(this.options.scrollerClass);this.$wrapper.removeClass(this.options.wrapperClass)},_expandScrollerToFillWrapper:function(){if(this.options.scrollShortContent||this.$pullDown.length||this.pullUp.length){if(this._firstScrollerExpand){this._origScrollerStyle=this.$scroller.attr("style")||null;this._firstScrollerExpand=false}this.$scroller.css("min-height",this.$wrapper.height()+(this.$pullDown.length?this.$pullDown.outerHeight(true):0)+(this.$pullUp.length?this.$pullUp.outerHeight(true):0))}},_undoExpandScrollerToFillWrapper:function(){this._restoreStyle(this.$scroller,this._origScrollerStyle)},_resizeWrapper:function(){var w=null,t,v,u;if(!this.options.resizeWrapper){return}if(this.options.traceResizeWrapper){w=this._log("resizeWrapper() start")}this.$wrapper.trigger("updatelayout");t=o.documentElement.clientHeight;v=this._calculateBarsHeight();u=t-v-this._wrapperHeightAdjustForBoxModel+(b&&!q?60:0)+this.options.wrapperAdd;this.$wrapper.css("height",u);this._expandScrollerToFillWrapper();if(this.options.traceResizeWrapper){this._logInterval("resizeWrapper() end"+(this._sizeDirty?" (dirty)":""),w)}},resizeWrapper:function(){var t=this._setPageVisible();this._resizeWrapper();this._restorePageVisibility(t)},_undoResizeWrapper:function(){},_modifyWrapper:function(){this._addWrapperClasses();this._modifyWrapperCSS();this._wrapperHeightAdjustForBoxModel=this._getHeightAdjustForBoxModel(this.$wrapper)},_undoModifyWrapper:function(){this._undoResizeWrapper();this._undoModifyWrapperCSS();this._undoAddWrapperClasses()},_modifyPullDown:function(){var t,u,v;if(this.$pullDown.length===0){return}t=g("."+this.options.pullLabelClass,this.$pullDown);if(t.length){this._origPullDownLabelText=t.text();if(this._origPullDownLabelText){this.options.pullDownResetText=this._origPullDownLabelText}else{t.text(this.options.pullDownResetText)}u=t.jqmData("iscroll-pulled-text");if(u){this.options.pullDownPulledText=u}v=t.jqmData("iscroll-loading-text");if(v){this.options.pullDownLoadingText=v}}},_undoModifyPullDown:function(){if(this.$pullDown.length===0){return}var t=g("."+this.options.pullLabelClass,this.$pullDown);if(t.length===0){return}t.text(this._origPullDownLabelText)},_modifyPullUp:function(){var v,t,u;if(this.$pullUp.length===0){return}g("
    ").insertBefore(this.$pullUp).css("height",this.$pullUp.outerHeight(true));this.$pullUpSpacer=this.$pullUp.prev();this.$pullUpSpacer.addClass(this.options.pullUpSpacerClass);v=g("."+this.options.pullLabelClass,this.$pullUp);if(v.length){this._origPullUpLabelText=v.text();if(this._origPullUpLabelText){this.options.pullUpResetText=this._origPullUpLabelText}else{v.text(this.options.pullUpResetText)}t=v.jqmData("iscroll-pulled-text");if(t){this.options.pullUpPulledText=t}u=v.jqmData("iscroll-loading-text");if(u){this.options.pullUpLoadingText=u}}},_undoModifyPullUp:function(){if(this.$pullUp.length===0){return}this.$pullUp.prev().remove();if(this._origPullUpLabelText){g("."+this.options.pullLabelClass,this.$pullUp).text(this._origPullUpLabelText)}},_correctPushedDownPage:function(){if(this.options.resizeWrapper&&this.options.scrollTopOnResize){g.mobile.silentScroll(0)}},refresh:function(y,t,v,x){var z,B,u,C,A,w;if(!x&&this.options.deferNonActiveRefresh&&!(this.$page.is(g.mobile.activePage))){this._dirty=true;this._dirtyCallbackBefore=t;this._dirtyCallbackAfter=v;if(this.options.traceRefresh){this._log("refresh() (deferred)")}return}z=this;B=y;u=t;C=v;A=x;w=this._startTiming();if((B===i)||(B===null)){B=this.options.refreshDelay}setTimeout(function(){var D=null,E;if(z.options.traceRefresh){D=z._logInterval("refresh() start",w)}E=z._setPageVisible();if(u){u()}z._triggerWidget("onbeforerefresh");z.iscroll.refresh();z._triggerWidget("onafterrefresh");if(C){C()}z._restorePageVisibility(E);if(!E){z._correctPushedDownPage()}if(z.options.traceRefresh){z._logInterval2("refresh() end"+(A?" (dirty)":""),w,D)}},B);if(this.options.traceRefresh){this._log("refresh() will occur after >= "+B+"mS")}},_create_iscroll_object:function(){this.iscroll=new h(this,this.$wrapper.get(0),this._create_iscroll_options())},_createScroller:function(){if(this.options.createScroller){if(this.$wrapper.children().length){this.$wrapper.children().wrapAll("
    ")}else{this.$wrapper.append("
    ")}}},_undoCreateScroller:function(){if(this.options.createScroller){this.$scroller.children().unwrap()}},_setPageVisible:function(){var t=this.$page.is(":hidden");if(t){this.$page.css("display","block")}return t},_restorePageVisibility:function(t){if(t){this.$page.css("display","")}},_create:function(){var u=new Date(),t;this.$wrapper=this.element;this.$page=this.$wrapper.parents(":jqmData(role='page')");if(this.options.debug&&this.options.traceCreateDestroy){this._log("_create() start",u)}this.createdAt=u;this._instanceCount(this._instanceCount()+1);this.instanceID=this._nextInstanceID();this._nextInstanceID(this._instanceID+1);if(this.instanceID===1){this._pageID(p);p+=1}this.pageID=this._pageID();t=this._setPageVisible();this._adaptPage();this._createScroller();this.$scroller=this.$wrapper.children(":first");if(this.$scroller.length===0){return}this.$pullDown=g("."+this.options.pullDownClass,this.$scroller);this._modifyPullDown();this.$pullUp=g("."+this.options.pullUpClass,this.$scroller);this._modifyPullUp();g.extend(true,this.options,this.$wrapper.jqmData("iscroll"));this._modifyWrapper();this._bindPage("pagebeforeshow",this._pageBeforeShowFunc);this._setTopOffsetForPullDown();this._setBottomOffsetForPullUp();this._resizeWrapper();this._addScrollerPadding();this._create_iscroll_object();this._merge_from_iscroll_options();this._restorePageVisibility(t);if(this.options.resizeWrapper){this._isvBind(this.$window,this.options.resizeEvents,this._windowResizeFunc,"$window");if(this.options.scrollTopOnOrientationChange){this._isvBind(this.$window,"orientationchange",this._orientationChangeFunc,"$window")}}this.$scrollerContent=this.$scroller.find("."+this.options.scrollerContentClass);this._isvBind(this.$scrollerContent,"updatelayout",this._updateLayoutFunc,"$scrollerContent");if(this.options.debug&&this.options.traceCreateDestroy){this._logInterval("_create() end",u)}},destroy:function(){var t=null;if(this.options.debug&&this.options.traceCreateDestroy){t=this._log("destroy() start")}this._isvUnbind(this.$scrollerContent,"updatelayout","$scrollerContent");this._isvUnbind(this.$window,this.options.resizeEvents,"$window");this._isvUnbind(this.$window,"orientationchange","$window");if(this._instanceCount()===1){this._unbindPage("pagebeforeshow");if(r){this._unbindPage("touchmove")}}if(!this.options.fastDestroy){this.iscroll.destroy();this.iscroll=null;this._undoExpandScrollerToFillWrapper();this._undoModifyPullDown();this._undoModifyPullUp();this._undoAddScrollerPadding();this._undoModifyWrapper();this.$wrapper.removeClass(this.options.wrapperClass);this.$scroller.removeClass(this.options.scrollerClass);this._undoCreateScroller()}this._instanceCount(this._instanceCount()-1);if(this._instanceCount()===0){this._undoAdaptPage()}g.Widget.prototype.destroy.call(this);if(this.options.debug&&this.options.traceCreateDestroy){this._logInterval("destroy() end",t)}},enable:function(){this.iscroll.enable();g.Widget.prototype.enable.call(this)},disable:function(){this.iscroll.disable();g.Widget.prototype.disable.call(this)},_setOption:function(t,v){var u;this.options[t]=v;this.iscroll.destroy();u=this._setPageVisible();this._create_iscroll_object();this._restorePageVisibility(u);g.Widget.prototype._setOption.apply(this,arguments)},scrollTo:function(t,w,v,u){this.iscroll.scrollTo(t,w,v,u)},scrollToElement:function(t,u){this.iscroll.scrollToElement(t,u)},scrollToPage:function(u,t,v){this.iscroll.scrollToPage(u,t,v)},stop:function(){this.iscroll.stop()},zoom:function(t,w,v,u){this.iscroll.zoom(t,w,v,u)},isReady:function(){return this.iscroll.isReady()},x:function(){return this.iscroll.x},y:function(){return this.iscroll.y},wrapperW:function(){return this.iscroll.wrapperW},wrapperH:function(){return this.iscroll.wrapperH},scrollerW:function(){return this.iscroll.scrollerW},scrollerH:function(){return this.iscroll.scrollerH},minScrollX:function(t){if(t!==i){this.iscroll.minScrollX=t}return this.iscroll.minScrollX},minScrollY:function(t){if(t!==i){this.iscroll.minScrollY=t}return this.iscroll.minScrollY},maxScrollX:function(t){if(t!==i){this.iscroll.maxScrollX=t}return this.iscroll.maxScrollX},maxScrollY:function(t){if(t!==i){this.iscroll.maxScrollY=t}return this.iscroll.maxScrollY},_pullDownIsPulled:function(){return this.$pullDown.length&&this.$pullDown.hasClass(this.options.pullPulledClass)},_pullUpIsPulled:function(){return this.$pullUp.length&&this.$pullUp.hasClass(this.options.pullPulledClass)},_replacePullText:function(u,v){var t;if(v){t=g("."+this.options.pullLabelClass,u);if(t){t.text(v)}}},_pullSetStateReset:function(t,u){if(t.is("."+this.options.pullLoadingClass+", ."+this.options.pullPulledClass)){t.removeClass(this.options.pullPulledClass+" "+this.options.pullLoadingClass);this._replacePullText(t,u)}},_pullDownSetStateReset:function(t){this._pullSetStateReset(this.$pullDown,this.options.pullDownResetText);this._triggerWidget("onpulldownreset",t)},_pullUpSetStateReset:function(t){this._pullSetStateReset(this.$pullUp,this.options.pullUpResetText);this._triggerWidget("onpullupreset",t)},_pullSetStatePulled:function(t,u){t.removeClass(this.options.pullLoadingClass).addClass(this.options.pullPulledClass);this._replacePullText(t,u)},_pullDownSetStatePulled:function(t){this._pullSetStatePulled(this.$pullDown,this.options.pullDownPulledText);this._triggerWidget("onpulldownpulled",t)},_pullUpSetStatePulled:function(t){this._pullSetStatePulled(this.$pullUp,this.options.pullUpPulledText);this._triggerWidget("onpulluppulled",t)},_pullSetStateLoading:function(t,u){t.removeClass(this.options.pullPulledClass).addClass(this.options.pullLoadingClass);this._replacePullText(t,u)},_pullDownSetStateLoading:function(t){this._pullSetStateLoading(this.$pullDown,this.options.pullDownLoadingText);this._triggerWidget("onpulldownloading",t)},_pullUpSetStateLoading:function(t){this._pullSetStateLoading(this.$pullUp,this.options.pullUpLoadingText);this._triggerWidget("onpulluploading",t)},_pullOnRefresh:function(t){if(this.$pullDown.length){this._pullDownSetStateReset(t)}if(this.$pullUp.length){this._pullUpSetStateReset(t)}},_pullOnScrollMove:function(A){var u,x,t,w,v,z,B=this.y();if(this.$pullDown.length){u=this._pullDownIsPulled();t=this.options.topOffset;w=t/2;if(!u&&B>w){this._pullDownSetStatePulled(A);this.minScrollY(0)}else{if(u&&B<=0){this._pullDownSetStateReset(A);this.minScrollY(-t)}}}if(this.$pullUp.length){x=this._pullUpIsPulled();v=this.options.bottomOffset;z=v/2;if(!x&&B=this.maxScrollY()){this._pullUpSetStateReset(A);this.maxScrollY(this.wrapperH()-this.scrollerH()+this.minScrollY()+v)}}}},_pullOnScrollEnd:function(t){if(this._pullDownIsPulled(t)){this._pullDownSetStateLoading(t);this._triggerWidget("onpulldown",t)}else{if(this._pullUpIsPulled(t)){this._pullUpSetStateLoading(t);this._triggerWidget("onpullup",t)}}}})}(jQuery,window,document));jQuery(document).bind("pagecreate",function(b){var a=jQuery(b.target).find(":jqmData(iscroll)");a.iscrollview()}); \ No newline at end of file diff --git a/webclient/js/jquery.mobile.iscrollview.js b/webclient/js/jquery.mobile.iscrollview.js new file mode 100755 index 0000000..b2961d7 --- /dev/null +++ b/webclient/js/jquery.mobile.iscrollview.js @@ -0,0 +1,1860 @@ +/****************************************************************************** + jslint directives. In case you hate yourself, and need that reinforced... + + You will still get a few warnings that can't be turned off, or that I'm just + too stubborn to "fix" + + sloppy, white: let me indent any way I damn please! I like to line things + up nice and purty. + + nomen: tolerate leading _ for variable names. Leading _ is a requirement for + JQuery Widget Factory private members +*******************************************************************************/ + +/*jslint browser: true, sloppy: true, white: true, nomen: true, regexp: true, todo: true, +maxerr: 50, indent: 2 */ +/*global jQuery:false, iScroll:false, console:false, Event:false*/ + +/******************************************************************************* + But instead, be kind to yourself, and use jshint. + + Note jshint nomen and white options are opposite of jslint + + You can't specify an indent of you use white: false, otherwise it will + still complain +*******************************************************************************/ + +/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, +curly:true, browser:true, jquery:true, indent:2, maxerr:50, sloppy:true, white:false, nomen:false, +regexp:false, todo:true */ + + +/* +jquery.mobile.iscrollview.js +Version: 1.2.6 +jQuery Mobile iScroll4 view widget +Copyright (c), 2012, 2013 Watusiware Corporation +Distributed under the MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to the following +conditions: NO ADDITIONAl CONDITIONS. + +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Derived in part from jquery.mobile.iscroll.js: +Portions Copyright (c) Kazuhiro Osawa +Dual licensed under the MIT or GPL Version 2 licenses. + +Derived in part from (jQuery mobile) jQuery UI Widget-factory +plugin boilerplate (for 1.8/9+) +Author: @scottjehl +Further changes: @addyosmani +Licensed under the MIT license + +dependency: iScroll 4.1.9 https://github.com/cubiq/iscroll or later (4.2 provided in demo) + jQuery 1.6.4 (JQM 1.0.1) or 1.7.1 (JQM 1.1) or 1.7.2 (JQM 1.2) + JQuery Mobile = 1.0.1 or 1.1 or 1.2-alpha1 +*/ + +; // Ignore jslint/jshint warning - for safety - terminate previous file if unterminated + +(function ($, window, document, undefined) { /* Ignore islint warning on "undefined" */ + "use strict"; + + //---------------------------------- + // "class constants" + //---------------------------------- + var HasTouch = document.ontouchend !== undefined, + IsWebkit = (/webkit/i).test(navigator.appVersion), + IsAndroid = (/android/gi).test(navigator.appVersion), + IsFirefox = (/firefox/i).test(navigator.userAgent), + IsTouchPad = (/hp-tablet/gi).test(navigator.appVersion), + IsIDevice = (/(iPhone|iPad|iPod).*AppleWebKit/).test(navigator.appVersion), + IsIPad = (/iPad.*AppleWebKit/).test(navigator.appVersion), + // IDevice running Mobile Safari - not embedded UIWebKit or Standalone (= saved to desktop) + IsMobileSafari = (/(iPhone|iPad|iPod).*AppleWebKit.*Safari/).test(navigator.appVersion), + // IDevice native app using embedded UIWebView + IsUIWebView = (/(iPhone|iPad|iPod).*AppleWebKit.(?!.*Safari)/).test(navigator.appVersion), + // Standalone is when running a website saved to the desktop (SpringBoard) + IsIDeviceStandalone = IsIDevice && (window.navigator.Standalone !== undefined), + + // Kludgey way to seeing if we have JQM v1.0.x, since there apparently is no + // way to access the version number! + JQMIsV1_0 = $.mobile.ignoreContentEnabled === undefined, + + nextPageID = 1; // Used to generate event namespaces + + + /* Placed here instead of anonymous functions to facilitate debugging. + No logging, because these events are too frequent */ + + function _pageTouchmoveFunc(e) { + e.preventDefault(); + } + + //=============================================================================== + // This essentially subclasses iScroll. Originally, this was just so that we could + // inject an iscrollview variable at the time of construction (so that it is + // available from the refresh callback which is first called during construction). + // But now we override several iScroll methods, as well. + //=============================================================================== + // See: www.golimojo.com/etc/js-subclass.html + function _subclass(constructor, superConstructor) { + function SurrogateConstructor() {} + SurrogateConstructor.prototype = superConstructor.prototype; + var prototypeObject = new SurrogateConstructor(); + prototypeObject.constructor = constructor; + constructor.prototype = prototypeObject; + } + + function IScroll(iscrollview, scroller, options) { + + // We need to add an iscrollview member to iScroll, so that we can efficiently + // pass the iscrollview when triggering jQuery events. Otherwise, we'd have to + // make a call to $(wrapper).jqmData() on each event trigger, which could have an impact + // on performance for high-frequency events. + this.iscrollview = iscrollview; + + // The following functions are called from the proxy event functions. These are things + // we want to do in certain iScroll4 events. + + // Emulate bottomOffset functionality in case iScroll doesn't have patch for bottomOffset + this._emulateBottomOffset = function(e) { + if (this.iscrollview.options.emulateBottomOffset) { + this.maxScrollY = this.wrapperH - this.scrollerH + + this.minScrollY + this.iscrollview.options.bottomOffset; + } + }; + + // Allow mouse clicks through to input elements + // Note that this is not an issue for touch devices, just mouse + this._fixInput = function(e) { + if (this.iscrollview.options.fixInput ) { + var tagName, + target = e.target; + while (target.nodeType !== 1) { target = target.parentNode; } + tagName = target.tagName.toLowerCase(); + if (tagName === "select" || tagName === "input" || tagName === "textarea") { + return; + } + } + + // If preventTouchHover, stop hover from occuring inside scroller for jQuery Mobile 1.0 + // (Not used for 1.1) + if (this.iscrollview.options.preventTouchHover) { e.stopImmediatePropagation(); } + else { e.preventDefault(); } + }; + + // Perform an iScroll callback. + this._doCallback = function(callbackName, e, f) { + var v = this.iscrollview, + then = v._logCallback(callbackName, e); + if (f) { f.call(this, e); } // Perform passed function if present + v._trigger(callbackName.toLowerCase(), e, {"iscrollview": v}); // Then trigger widget event + v._logCallback(callbackName, e, then); + }; + + // Override _bind and _unbind functions in iScroll, so that we can monitor performance, + // gain control over events reaching/not reaching iScroll, and potentially use jQuery events + // instead of addEventListener(). + // + // As of v1.2, using jQuery events is an experimental feature, and does not work in all + // scenarios. For example, jQuery 1.7.1 breaks mousewheel support. This feature is left in + // only to permit further experimentation. + // + // If using jQuery events, we ignore bubble (really, useCapture) parameter. Fortunately, + // iScroll never uses it. + // + // If using jQuery events, we substitute jQuery's mouseleave for mouseout, to prevent iScroll + // from getting a cascade of events when the mouse enters some inner element within the + // scroller. iScroll is only interested in the mouse leaving the scroller to the OUTSIDE. + // While iScroll doesn't spend much time in the callback if moving to an inner element, + // the cascade of events is annoying when monitoring performance with the debug option. + + this._bind = function (type, el, bubble) { + var jqEvents = this.iscrollview.options.bindIscrollUsingJqueryEvents, + _type = jqEvents && type === "mouseout" ? "mouseleave" : type; + // Ignore attempt to bind to orientationchange or resize, since the widget handles that + if (type === "orientationchange" || type === "resize") { + this.iscrollview._logIscrollEvent("iScroll bind (ignored)", type); + return; + } + this.iscrollview._logIscrollEvent("iScroll bind", type); + if (jqEvents) { (el ? $(el) : this.iscrollview.$scroller).bind(_type, $.proxy(this.handleEvent, this)); } + else { (el || this.scroller).addEventListener(_type, this, !!bubble); } + }; + + this._unbind = function(type, el, bubble) { + var jqEvents = this.iscrollview.options.bindIscrollUsingJqueryEvents, + _type = jqEvents && type === "mouseout" ? "mouseleave" : type; + if (type === "orientationchange" || type === "resize") { + this.iscrollview._logIscrollEvent("iScroll unbind (ignored)"); + return; + } + this.iscrollview._logIscrollEvent("iScroll unbind", type); + if (jqEvents) { $(el || this.iscrollview.$scroller).unbind(_type, this.handleEvent); } + else { (el || this.scroller).removeEventListener(_type, this, !!bubble); } + }; + + // Save a reference to the original handleEvent in iScroll. We'll need to call it from our + // override. + this._origHandleEvent = iScroll.prototype.handleEvent; + + // Shim around iScroll.handleEvent, allows us to trace + this.handleEvent = function(e) { + var jqEvents = this.iscrollview.options.bindIscrollUsingJqueryEvents, + then; + then = this.iscrollview._logIscrollEvent("iScroll.handleEvent", e); + // If jQuery mouseleave, make iScroll think we are handling a mouseout event + if (jqEvents && e.type === "mouseleave") { + e.type = "mouseout"; + this._origHandleEvent(e); + e.type = "mouseleave"; + } + else { this._origHandleEvent(e); } + this.iscrollview._logIscrollEvent("iScroll.handleEvent", e, then); + }; + + // Override _resize function in iScroll, which calls refresh() and is only called on resize + // and orientationchange events. We call refresh() when necessary, so these are redundant. + // As well, some refreshes are deferred, and the user will need to refresh any jQuery Mobile + // widgets using a callbackBefore. So, it makes no sense to have iScroll do event-based + // refresh. + this._resize = function() { }; + + iScroll.call(this, scroller, options); + } + + _subclass(IScroll, iScroll); + $.widget("mobile.iscrollview", $.mobile.widget, { + + widgetEventPrefix: "iscroll_", + + //========================================================= + // All instance variables are declared here. This is not + // strictly necessary, but is helpful to document the use + // of instance variables. + //========================================================= + + iscroll: null, // The underlying iScroll object + $window: $(window), + $wrapper: [], // The wrapper element + $scroller: [], // The scroller element (first child of wrapper) + $scrollerContent: [], // Content of scroller, sandwitched between any pull-down/pull-up + $pullDown: [], // The pull-down element (if any) + $pullUp: [], // The pull-up element (if any) + $pullUpSpacer: [], + $page: [], // The page element that contains the wrapper + _wrapperHeightAdjustForBoxModel: 0, // This is set in _create + + _firstScrollerExpand: true, // True on first scroller expand, so we can capture original CSS + + createdAt: null, // Time when created - used as unique ID + pageID: null, // Each page that has 1 or more iscrollviews gets a unique page ID # + instanceID: null, // Each isntance of iscrollview created on a page gets a unique instance ID # + + // True if this scroller content is "dirty" - i.e. needs refresh because refresh + // was deferred when the page was not the active page. This does NOT imply that the wrapper + // needs to be refreshed - see _sizeDirty, below. + _dirty: false, + _dirtyCallbackBefore: null, + _dirtyCallbackAfter: null, + _sizeDirty: false, // True if wrapper resize is needed because page size or fixed content + // size changed + + //---------------------------------------------------- + // Options to be used as defaults + //---------------------------------------------------- + options: { + // iScroll4 options + // We only define those options here which have values that differ from + // iscroll4 defaults. + hScroll: false, // iScroll4 default is true + hScrollbar: false, // iScroll4 default is true + + // Additional iScroll4 options will be back-filled from iscroll4 + + // iscrollview widget options + + debug: false, // Enable some messages to console + // Debug true needed for any trace options + traceResizeWrapper: false, // Enable to trace resize wrapper + traceRefresh: false, // Enable to trace refresh + traceCreateDestroy: false, // Enable to trace create/destroy + traceIscrollEvents: false, // Enable to trace events handled by iScroll + tracedIscrollEvents: [], // List of specific iScroll events to trace, empty list for all + // Items are strings, like "touchstart" + traceWidgetEvents: false, // Enable to trace events registered by widget + // Note: in some cases we might bind to multiple events. You will have to include the multiple + // events in one string to filter on such a bind. For example, "resize orientationchange" + tracedWidgetEvents: [], // List of specific widget events to trace + traceIscrollCallbacks: false, // Enable to trace iScroll callbacks to the widget + tracedIscrollCallbacks: [], // List of specific iScroll callbacks to trace, empty list for all + // Items are strings, like "onRefresh" + traceWidgetCallbacks: false, + tracedWidgetCallbacks: [], + + + // bottomOffset is currently only in Watusi-patched iScroll. We emulate it in case it isn't + // there. + bottomOffset: 0, + emulateBottomOffset: true, + + pageClass: "iscroll-page", // Class to be applied to pages containing this widget + wrapperClass: "iscroll-wrapper", // Class to be applied to wrapper containing this widget + scrollerClass: "iscroll-scroller", // Class to be applied to scroller within wrapper + pullDownClass: "iscroll-pulldown", // Class for pulldown element (if any) + pullUpClass: "iscroll-pullup", // Class for pullup element (if any) + pullLabelClass: "iscroll-pull-label", // Class for pull element label span + pullUpSpacerClass: "iscroll-pullup-spacer", // Class added to generated pullup spacer + scrollerContentClass: "iscroll-content", // Real content of scroller, not including pull-up, pull-down + fixedHeightClass: "iscroll-fixed", // Class applied to elements that match fixedHeightSelector + + // The widget adds the fixedHeightClass to all elements that match fixedHeightSelector. + // Don't add the fixedHeightClass to elements manually. Use data-iscroll-fixed instead. + fixedHeightSelector: ":jqmData(role='header'), :jqmData(role='footer'), :jqmData(iscroll-fixed)", + + // true to resize the wrapper to take all viewport space after fixed-height elements + // (typically header/footer) + // false to not change the size of the wrapper + // For example, if using multiple iscrollview widgets on the same page, a maximum + // of one of them could resize to remaining space. You would need to explicitly + // set the height of additional iscrollviews and give them the fixed height class. + resizeWrapper: true, + + // Space-separated list of events on which to resize/refresh iscroll4 + // On some mobile devices you may wish to add/substitute orientationchange event + // iOS 4.x will trigger resize twice then orientationchange + // iOS 5.x will trigger resize once then orientationchange + // Android devices can trigger multiple events, but generally orientationchange before resize + // Devices are inconsistent as to when they first report the new width/height + // Android tends to first trigger orientationchange with the width/height unchanged, the + // orientationchange with the new width/height. + // Experimentation with other devices would be useful + resizeEvents: "resize" + ($.support.orientation ? " orientationchange" : ""), + + // Refresh iscrollview on page show event. This should be true if content inside a + // scrollview might change while the page is cached but not shown, and application hasn't + // called refresh(), or deferRefresh is false. + refreshOnPageBeforeShow: false, + + // true to fix iscroll4 input element focus problem in the widget. + // false if you are using a patched iscroll4 with different fix or to + // disable for some other reason + fixInput: true, + + wrapperAdd: 0, // Shouldn't be necessary, but in case user needs to fudge + // Can be + or - + + // Timeout to allow page to render prior to refresh() + refreshDelay: IsAndroid ? 200 : 0, // Wild-ass guesses + + // true to set the minimum height of scroller content (not including + // any pull-down or pull-up) to the height of the wrapper. Note that + // if there is a pull-down or pull-up, then this is done regardless of + // this option, because you have to be able to scroll the empty content + // to access the pull-down or pull-up. Set this option false if you do + // not want to show a scrollbar on short content. However, this will have + // the side-effect of making the "empty" part of the scroller non-draggable. + // Leaving this true provides a more consistent UI behaviour. + scrollShortContent: true, + + // Normally, we need the wrapper to have no padding. Otherwise, the result will look awkward, + // you won't be able to grab the padded area to scroll, etc. + removeWrapperPadding: true, + + // But we want to add that padding back inside the scroller. We add a div around the content + // inside any pull-down/pull-up to replace the padding removed from the wrapper. + addScrollerPadding: true, + + // On some platforms (iOS, for example) we need to scroll to top after orientation change, + // because the address bar pushed the window down. jQuery Mobile handles this for page links, + // but doesn't for orientationchange. + // If you have multiple scrollers, only enable this for one of them + scrollTopOnResize: true, + + scrollTopOnOrientatationChange: true, + + // iScroll scrolls the first child of the wrapper. I don't see a use case for having more + // than one child. What kind of mess is going to be shown in that case? So, by default, we + // just wrap ALL of the children of the wrapper with a new
    that will be the scroller. + // This way you don't need to worry about wrapping all the elements to be scrolled if there + // is more than one. If there is only one child, we create this
    unnecessarily, but - + // big deal. If, for some reason, you want to create the markup for the scroller yourself, + // set this to false. + createScroller: true, + + // True to defer refresh() on non-active pages until pagebeforeshow. This avoids + // unnecessary refresh in case of resize/orientation change when pages are cached, + // as well as unnecessary refresh when pages are updated when they are not the active + // page. + deferNonActiveRefresh: true, + + // Same deal, for re-sizing the wrapper + deferNonActiveResize: true, + + // True to prevent hover in scroller touch devices. If this is false, you will get + // "piano keyboard" effect in JQM <1.1 when scrolling due to hover, which is both + // time-consuming and distracting. A negative is that with the current implementation, you will + // never get a "hover" visual effect within a scroller on touch devices, even when not scrolling. + // But you still will on desktop browser with mouse, and you will still get "down" effect + // when a link is selected. This really is a jQuery Mobile problem with listview, and is + // fixed in JQM 1.1. + preventTouchHover: JQMIsV1_0 && HasTouch, // Enable if touch device and JQM version is < 1.1 + + // This is an experimental feature under development and DOES NOT WORK completely! + // For one, it breaks mousewheel with jQuery Mobile 1.1 (because jQuery Mobile 1.1 breaks + // mousewheel...) + bindIscrollUsingJqueryEvents: false, + + // If fastDestroy is true, don't tear down the widget on destroy. The assumption is destroy + // will only be called when the page is removed, so there is no need. Is anyone really + // going to un-enhance a scroller? If so, set this to false, but then you will have to + // fix the unbind issue... + fastDestroy: false, + + // Prevent scrolling the page by grabbing areas outside of the scroller. + // Normally, this should be true. Set this false if you are NOT using a fixed-height page, + // but instead are using iScroll to scroll an area within a scollable page. If you have + // multiple scrollers on a scrollable page, then set this false for all of them. + // Note that we ALWAYS prevent scrolling the page by dragging inside the scroller. + preventPageScroll: true, + + pullDownResetText : "Pull down to refresh...", + pullDownPulledText : "Release to refresh...", + pullDownLoadingText : "Loading...", + pullUpResetText : "Pull up to refresh...", + pullUpPulledText : "Release to refresh...", + pullUpLoadingText : "Loading...", + + pullPulledClass : "iscroll-pull-pulled", + pullLoadingClass : "iscroll-pull-loading", + + //------------------------------------------------------------- + // For better or worse, widgets have two mechanisms for dealing + // with events. The needs to be a set of options that correspond + // to each event. If present, the option is a function. As + // well, the widget prepends the widget event prefix ("iscroll_") + // to each event name and triggers a jQuery event by that name. + // BOTH mechanisms can be used simultaneously, though not sure + // why you'd want to. If you need to handle an event during + // iScroll4 instantiation, (only one I know about that might be + // called is refresh) then you have to use a function option. + //------------------------------------------------------------- + onrefresh: null, + onbeforescrollstart: null, + onscrollstart: null, + onbeforescrollmove: null, + onscrollmove: null, + onbeforescrollend: null, + onscrollend: null, + ontouchend: null, + ondestroy: null, + onzoomstart: null, + onzoom: null, + onzoomend: null, + + onpulldownreset: null, + onpulldownpulled: null, + onpulldown: null, + onpullupreset: null, + onpulluppulled: null, + onpullup: null, + + onbeforerefresh: null, + onafterrefresh: null + }, + + //--------------------------------------------------------------------------------------- + // Array of keys of options that are widget-only options (not options in iscroll4 object) + //--------------------------------------------------------------------------------------- + _widgetOnlyOptions: [ + "debug", + "traceIscrollEvents", + "tracedIscrollEvents", + "traceIscrollCallbacks", + "tracedIscrollCallbacks", + "traceWidgetEvents", + "tracedWidgetEvents", + "traceWidgetCallbacks", + "tracedWidgetCallbacks", + "traceResizeWrapper", + "traceRefresh", + "traceCreateDestroy", + "bottomOffset", + "emulateBottomOffset", + "pageClass", + "wrapperClass", + "scrollerClass", + "pullDownClass", + "pullUpClass", + "scrollerContentClass", + "pullLabelClass", + "pullUpSpacerClass", + "fixedHeightSelector", + "resizeWrapper", + "resizeEvents", + "refreshOnPageBeforeShow", + "fixInput", + "wrapperAdd", + "refreshDelay", + "scrollShortContent", + "removeWrapperPadding", + "addScrollerPadding", + "createScroller", + "deferNonActiveRefresh", + "preventTouchHover", + "deferNonActiveResize", + "bindIscrollUsingJqueryEvents", + "scrollTopOnResize", + "scrollTopOnOrientationChange", + "pullDownResetText", + "pullDownPulledText", + "pullDownLoadingText", + "pullUpResetText", + "pullUpPulledText", + "pullUpLoadingText", + "pullPulledClass", + "pullLoadingClass", + "onpulldownreset", + "onpulldownpulled", + "onpulldown", + "onpullupreset", + "onpulluppulled", + "onpullup", + "onbeforerefresh", + "onafterrefresh", + "fastDestroy" + ], + + //----------------------------------------------------------------------- + // Map of widget event names to corresponding iscroll4 object event names + //----------------------------------------------------------------------- + _event_map: { + onrefresh: "onRefresh", + onbeforescrollstart: "onBeforeScrollStart", + onscrollstart: "onScrollStart", + onbeforescrollmove: "onBeforeScrollMove", + onscrollmove: 'onScrollMove', + onbeforescrollend: 'onBeforeScrollEnd', + onscrollend: "onScrollEnd", + ontouchend: "onTouchEnd", + ondestroy: "onDetroy", + onzoomstart: "onZoomStart", + onzoom: "onZoom", + onzoomend: "onZoomEnd" + }, + + //------------------------------------------------------------------------------ + // Functions that adapt iscroll callbacks to Widget Factory conventions. + // These are copied to the iscroll object's options object on instantiation. + // They call the private _trigger method provided by the widget factory + // base object. Normally, iscroll4 callbacks can be null or omitted. But since + // we can't know in advance whether the corresponding widget events might be bound + // or delegated in the future, we have set a callback for each that calls _trigger. + // This will call the corresponding widget callback as well as trigger the + // corresponding widget event if bound. + // + // Event callbacks are passed two values: + // + // e The underlying DOM event (if any) associated with this event + // d Data map + // iscrollview : The iscrollview object + //------------------------------------------------------------------------------ + + _proxy_event_funcs: { + + onRefresh: function(e) { + this._doCallback("onRefresh", e, function(e) { + this._emulateBottomOffset(); + this.iscrollview._pullOnRefresh.call(this.iscrollview,e); + }); + }, + + onBeforeScrollStart: function(e) { + this._doCallback("onBeforeScrollStart", e, function(e) { + this._fixInput(e); + }); + }, + + onScrollStart: function(e) { this._doCallback("onScrollStart", e); }, + + onBeforeScrollMove: function(e) { + this._doCallback("onBeforeScrollMove", e); + e.preventDefault(); // Don't scroll the page for touchmove inside scroller + }, + + onScrollMove: function(e) { + this._doCallback("onScrollMove", e, function(e) { + this.iscrollview._pullOnScrollMove.call(this.iscrollview, e); + }); + }, + + onBeforeScrollEnd: function(e) { this._doCallback("onBeforeScrollEnd", e); }, + + onScrollEnd: function(e) { + this._doCallback("onScrollEnd", e, function(e){ + this.iscrollview._pullOnScrollEnd.call(this.iscrollview, e); + }); + }, + + onTouchEnd: function(e) { this._doCallback("onTouchEnd", e); }, + onDestroy: function(e) { this._doCallback("onDestroy", e); }, + onZoomStart: function(e) { this._doCallback("onZoomStart", e); }, + onZoom: function(e) { this._doCallback("onZoom", e); }, + onZoomEnd: function(e) { this._doCallback("onZoomEnd", e); } + }, + + // Merge options from the iscroll object into the widget options + // So, this will backfill iscroll4 defaults that we don't set in + // the widget, giving a full set of iscroll options, and leaving + // widget-only options untouched. + _merge_from_iscroll_options: function() { + var options = $.extend(true, {}, this.iscroll.options); + // Delete event options from the temp options + $.each(this._proxy_event_funcs, function(k,v) {delete options[k];}); + if (this.options.emulateBottomOffset) { delete options.bottomOffset; } + $.extend(this.options, options); // Merge result into widget options + }, + + // Create a set of iscroll4 object options from the widget options. + // We have to omit any widget-specific options that are + // not also iscroll4 options. Also, copy the proxy event functions to the + // iscroll4 options. + _create_iscroll_options: function() { + var options = $.extend(true, {}, this.options); // temporary copy of widget options + // Remove options that are widget-only options + $.each(this._widgetOnlyOptions, function(i,v) {delete options[v];}); + // Remove widget event options + $.each(this._event_map, function(k,v) {delete options[k];}); + if (this.options.emulateBottomOffset) { delete options.bottomOffset; } + // Add proxy event functions + return $.extend(options, this._proxy_event_funcs); + }, + + // Formats number with fixed digits + _pad: function(num, digits, padChar) { + var str = num.toString(), + _padChar = padChar || "0"; + while (str.length < digits) { str = _padChar + str; } + return str; + }, + + // Format time for logging + _toTime: function(date) { + return this._pad(date.getHours(), 2) + ":" + + this._pad(date.getMinutes(), 2) + ":" + + this._pad(date.getSeconds(), 2) + "." + + this._pad(date.getMilliseconds(), 3); + }, + + // Log a message to console + // text - message to log + // now - optional timestamp, if missing generates new timestamp + // Returns timestamp + _log: function(text, now) { + var _now, id, idStr; + if (!this.options.debug) { return null; } + _now = now || new Date(); + id = this.$wrapper.attr("id"); + idStr = id ? "#" + id : ""; + console.log(this._toTime(_now) + " " + + $.mobile.path.parseUrl(this.$page.jqmData("url")).filename + idStr + " " + + text ); + return _now; + }, + + // Log elapsed time from then to now + _logInterval: function(text, then) { + var now; + if (!this.options.debug) { return null; } + now = new Date(); + return this._log(text + " " + (now - then) + "mS from " + this._toTime(then), now ); + }, + + // Log an event + // Like _logInterval, but additional optional parameter e + // If e is present, additionally show interval from original event to now + _logEvent: function(text, e, then) { + var now, + eventTime, + haveEvent = e && e instanceof Object, + type = haveEvent ? e.type : e, + _text = type + " " + text; + + if (!this.options.debug) { return null; } + + now = new Date(); + + if (then) { + _text += " end " + (+(now-then)) + "mS from " + this._toTime(then); + } + else if (haveEvent) { + _text += " begin"; + } + if (haveEvent) { + eventTime = new Date(e.timeStamp); + _text += " (" + (now - eventTime) + "mS from " +e.type + " @ " + this._toTime(eventTime) + ")"; + } + + return this._log(_text, now); + }, + + // Log a callback issued by iScroll + _logCallback: function(callbackName, e, then) { + if (!this.options.debug || + !this.options.traceIscrollCallbacks || + (this.options.tracedIscrollCallbacks.length !== 0 && + $.inArray(callbackName, this.options.tracedIscrollCallbacks) === -1) ) { + return null; + } + if (e) { return this._logEvent(callbackName, e, then); } + if (then) { return this._logInterval(callbackName + " end", then); } + return this._log(callbackName + " begin"); + }, + + // Log an event handled by Iscroll + // e can be Event or event name + _logIscrollEvent: function(text, e, then) { + var haveEvent = e instanceof Event, + type = haveEvent ? e.type : e; + if (!this.options.debug || + !this.options.traceIscrollEvents || + (this.options.tracedIscrollEvents.length !== 0 && + $.inArray(type, this.options.tracedIscrollEvents) === -1)) { + return null; + } + return this._logEvent(text, e, then); + }, + + // Log an event handled by the widget + _logWidgetEvent: function(text, e, then) { + var haveEvent = e instanceof Object, + type = haveEvent ? e.type : e; + if (!this.options.debug || + !this.options.traceWidgetEvents || + (this.options.tracedWidgetEvents.length !== 0 && + $.inArray(type, this.options.tracedWidgetEvents) === -1)) { + return null; + } + return this._logEvent(text, e, then); + }, + + // Log a callback issued by the widtet + _logWidgetCallback: function(callbackName, e, then) { + if (!this.options.debug || + !this.options.traceWidgetCallbacks || + (this.options.tracedWidgetCallbacks.length !== 0 && + $.inArray(callbackName, this.options.tracedWidgetCallbacks) === -1) ) { + return null; + } + if (e) { return this._logEvent(callbackName, e, then); } + if (then) { return this._logInterval(callbackName + " end", then); } + return this._log(callbackName + " begin"); + }, + + // Log elapsed time from then to now and later to now + _logInterval2: function(text, then, later) { + var now; + if (!this.options.debug) { return; } + now = new Date(); + this._log(text + " " + + (now - later) + "mS from " + this._toTime(later) + + " (" + (now - then) + "mS from " + this._toTime(then) + ")" ); + }, + + _startTiming: function() { + if (!this.options.debug) { return null; } + return new Date(); + }, + + // Returns the event namespace for the page containing this widget + _pageEventNamespace: function() { + return ".iscroll_" + this.pageID; + }, + + // Returns the event namespace for this widget + _instanceEventNamespace: function() { + return this._pageEventNamespace() + "_" + this.instanceID; + }, + + // Takes a space-separated list of event types, and appends the given namespace to each + _addEventsNamespace: function(types_in, namespace) { + var types = types_in.split(" "); + $.each(types, function(k,v) {types[k] += namespace;}); + return types.join(" "); + }, + + // All bind/unbind done by the widget goes through here, to permit logging + // Note: this used to be called _bind, but starting with JQM 1.2, this is a naming conflict with + // the Widget Factory code in JQM + _isvBind: function(obj, types_in, func, objName) { + var types = this._addEventsNamespace(types_in, this._instanceEventNamespace()); + this._logWidgetEvent("bind " + objName, types); + obj.bind(types, $.proxy(func, this)); + }, + + _bindPage: function(types_in, func) { + var types = this._addEventsNamespace(types_in, this._pageEventNamespace()); + this._logWidgetEvent("bind $page", types); + this.$page.bind(types, $.proxy(func, this)); + }, + + _isvUnbind: function(obj, types_in, objName) { + var types = this._addEventsNamespace(types_in, this._instanceEventNamespace()); + this._logWidgetEvent("unbind " + objName, types); + obj.unbind(types); + }, + + _unbindPage: function(types_in) { + var types = this._addEventsNamespace(types_in, this._instanceEventNamespace()); + this._logWidgetEvent("unbind $page", types); + this.$page.unbind(types); + }, + + // Currently unused - just in case we need it + _delegate: function(obj, selector, type, func, objName) { + this._logWidgetEvent("delegate " + objName + " " + selector, type); + obj.delegate(selector, type, $.proxy(func, this)); + }, + + _triggerWidget: function(type, e) { + var then = this._logWidgetCallback(type); + this._trigger(type, e, {"iscrollview":this}); + this._logWidgetCallback(type, e, then); + }, + + //------------------------------------------------------------------- + // Returns status of dirty flag, indicating that refresh() was called + // while the page was not active, and refresh will be deferred until + // pagebeforeshow. + //------------------------------------------------------------------- + isDirty: function() { + return this._dirty; + }, + + //----------------------------------------------------------------------------- + // Restore an element's styles to original + + // If the style was never modified by the widget, the value passed in + // originalStyle will be undefined. + // + //If there originally was no style attribute, but styles were added by the + // widget, the value passed in originalStyle will be null. + // + // If there originally was a style attribute, but the widget modified it + // (actually, set some CSS, which changes the style, the value is a string in + // originalStyle. + //----------------------------------------------------------------------------- + _restoreStyle: function($ele, originalStyle) { + if (originalStyle === undefined) { return; } + if (originalStyle === null) { $ele.removeAttr("style"); } + else { $ele.attr("style", originalStyle); } + }, + + //------------------------------------------------------------------------------ + // Functions that we bind to. They are declared as named members rather than as + // inline closures so we can properly unbind them. + //------------------------------------------------------------------------------ + _pageBeforeShowFunc: function(e) { + var then = this._logWidgetEvent("_pageBeforeShowFunc", e); + if (this._dirty) { + this.resizeWrapper(true); + this.refresh(null, this._dirtyCallbackBefore, this._dirtyCallbackAfter, true); + this._dirty = false; + this._dirtyCallbackBefore = null; + this._dirtyCallbackAfter = null; + } + else if (this.options.refreshOnPageBeforeShow || this._sizeDirty) { + this.refresh(null,$.proxy(this._resizeWrapper, this),null,true); + } + this._sizeDirty = false; + this._logWidgetEvent("_pageBeforeShowFunc", e, then); + }, + + // Called on resize events + // TODO: Detect if size is unchanged, and if so just ignore? + _windowResizeFunc: function(e) { + var then = this._logWidgetEvent("_windowResizeFunc", e); + // Defer if not active page + if (this.options.deferNonActiveResize && !(this.$page.is($.mobile.activePage))) { + this._sizeDirty = true; + if (this.options.traceResizeWrapper) { this._log("resizeWrapper() (deferred)"); } + } + else { + this.resizeWrapper(true); + this.refresh(null,null,null,true); + } + this._logWidgetEvent("_windowResizeFunc", e, then); + }, + + // On some platforms (iOS, for example) you need to scroll back to top after orientation change, + // because the address bar pushed the window down. jQuery Mobile handles this for page links, + // but doesn't for orientationchange + _orientationChangeFunc: function(e) { + var then = this._logWidgetEvent("_orientationChangeFunc", e); + if (this.options.scrollTopOnOrientationChange) { + $.mobile.silentScroll(0); + } + this._logWidgetEvent("_orientationChangeFunc", e, then); + }, + + // Called when jQuery Mobile updates content such that a reflow is needed. This happens + // on collapsible content, etc. + _updateLayoutFunc: function(e) { + this.refresh(); + }, + + // Get or set the count of instances on the page containing the widget + // This increases or decreases depending on the number of iscrollview widgets currently + // instantiated on the page. + _instanceCount: function(count_in) { + var key = "iscroll-private", + count = 0, + data = this.$page.jqmData(key) || {}; + if (count_in !== undefined) { + count = count_in; + data.instanceCount = count; + this.$page.jqmData(key, data); + } + else { + if (data.instanceCount !== undefined) { + count = data.instanceCount; + } + } + return count; + }, + + _nextInstanceID: function(id_in) { + var key = "iscroll-private", + id = 1, + data = this.$page.jqmData(key) || {}; + if (id_in !== undefined) { + id = id_in; + data.nextInstanceID = id; + this.$page.jqmData(key, data); + } + else { + if (data.nextInstanceID !== undefined) { + id = data.nextInstanceID; + } + } + return id; + }, + + _pageID: function(id_in) { + var key = "iscroll-private", + id = 1, + data = this.$page.jqmData(key) || {}; + if (id_in !== undefined) { + id = id_in; + data.pageID = id; + this.$page.jqmData(key, data); + } + else { + if (data.pageID !== undefined) { + id = data.pageID; + } + } + return id; + }, + + //-------------------------------------------------------------------------- + // Adapt the page for this widget + //-------------------------------------------------------------------------- + _adaptPage: function() { + var _this = this; + + // Only adapt the page if this is the only iscrollview widget instantiated on the page + // If the count >1, then the page has already been adapted. When the count goes back + // to 0, the changes will be un-done + if (this._instanceCount() === 1) { + this.$page.addClass(this.options.pageClass); + this.$page.find(this.options.fixedHeightSelector).each(function() { // Iterate over headers/footers/etc. + $(this).addClass(_this.options.fixedHeightClass); + }); + if (HasTouch && this.options.preventPageScroll) { + this._bindPage("touchmove", _pageTouchmoveFunc); + } + } + }, + + _undoAdaptPage: function() { + var _this = this; + if (this._instanceCount() === 1) { + this.$page.find(this.options.fixedHeightSelector).each(function() { // Iterate over headers/footers/etc. + $(this).removeClass(_this.options.fixedHeightClass); + }); + this.$page.removeClass(this.options.pageClass); + } + }, + + //-------------------------------------------------------- + // Calculate total bar heights. + //-------------------------------------------------------- + _calculateBarsHeight: function() { + var barsHeight = 0, + fixedHeightSelector = "." + this.options.fixedHeightClass, + // Persistent footers are sometimes inside the page, sometimes outside of all pages! (as + // direct descendant of ). And sometimes both. During transitions, the page that + // is transitioning in will have had it's persistent footer moved outside of the page, + // while all other pages will have their persistent footer internal to the page. + // + // To deal with this, we find iscroll-fixed elements in the page, as well as outside + // of the page (as direct descendants of ). We avoid double-counting persistent + // footers that have the same data-id. (Experimentally, then, we also permit the user + // to place fixed-height elements outside of the page, but unsure if this is of any + // practical use.) + $barsInPage = this.$page.find(fixedHeightSelector), + $barsOutsidePage = $("body").children(fixedHeightSelector); + + $barsInPage.each(function() { // Iterate over headers/footers/etc. + barsHeight += $(this).outerHeight(true); + }); + + $barsOutsidePage.each(function() { + var id = $(this).jqmData("id"); // Find data-id if present + // Count bars outside of the page if they don't have data-id (so not a persistent + // footer, but something the developer put there and tagged with data-iscroll-fixed class), + // or if a matching data-id is NOT found among the bars that are inside the page. + if (id === "" || !$barsInPage.is( ":jqmData(id='" + id + "')" )) { + barsHeight += $(this).outerHeight(true); + } + }); + return barsHeight; + }, + + //----------------------------------------------------------------------- + // Determine the box-sizing model of an element + // While jQuery normalizes box-sizing models when retriving geometry, + // it doesn't consider it when SETTING geometry. So, this is useful when + // setting geometry. (e.g. the height of the wrapper) + //----------------------------------------------------------------------- + _getBoxSizing: function($elem) { + var boxSizing, + prefix = ""; + + if (IsFirefox) { prefix = "-moz-"; } + else if (IsWebkit) { prefix = "-webkit-"; } // note: can drop prefix for Chrome >=10, Safari >= 5.1 (534.12) + boxSizing = $elem.css(prefix + "box-sizing"); + if (!boxSizing && prefix) { boxSizing = $elem.css("box-sizing"); } // Not found, try again with standard CSS + if (!boxSizing) { // Still not found - no CSS property available to guide us. + // See what JQuery thinks the global box model is + if ($.boxModel) { boxSizing = "content-box"; } + else { boxSizing = "border-box"; } + } + return boxSizing; + }, + + //----------------------------------------------------------------- + // Get the height adjustment for setting the height of an element, + // based on the content-box model + //----------------------------------------------------------------- + _getHeightAdjustForBoxModel: function($elem) { + // Take into account the box model. This defaults to either W3C or traditional + // model for a given browser, but can be overridden with CSS + var adjust; + switch (this._getBoxSizing($elem)) { + case "border-box": // AKA traditional, or IE5 (old browsers and IE quirks mode) + // only subtract margin + adjust = $elem.outerHeight(true) - $elem.outerHeight(); + break; + + case "padding-box": // Firefox-only + // subtract margin and border + adjust = $elem.outerHeight() - $elem.height(); + break; + + case "content-box": // AKA W3C Ignore jshint warning + default: // Ignore jslint warning + // We will subtract padding, border, margin + adjust = $elem.outerHeight(true) - $elem.height(); + break; + } + return adjust; + }, + + //-------------------------------------------------------- + // If there's a pull-down element, we need to set the + // topOffset to the height of that element. If user + // specified a topOffset option, use that instead, though. + //-------------------------------------------------------- + _setTopOffsetForPullDown: function() { + if (this.$pullDown.length && !this.options.topOffset) { + this.options.topOffset = this.$pullDown.outerHeight(true); + } + }, + + //-------------------------------------------------------- + // If there's a pull-up element, we need to set the + // bottomOffset to the height of that element. If user + // specified a bottomOffset option, use that instead, though. + //-------------------------------------------------------- + _setBottomOffsetForPullUp: function() { + if (this.$pullUp.length && !this.options.bottomOffset) { + this.options.bottomOffset = this.$pullUp.outerHeight(true); + } + }, + + _removeWrapperPadding: function() { + var $wrapper = this.$wrapper; + if (this.options.removeWrapperPadding) { + // Save padding so we can re-apply it to the iscroll-content div that we create + this._origWrapperPaddingLeft = $wrapper.css("padding-left"); + this._origWrapperPaddingRight = $wrapper.css("padding-right"); + this._origWrapperPaddingTop = $wrapper.css("padding-top"); + this._origWrapperPaddingBottom = $wrapper.css("padding-bottom"); + this.$wrapper.css("padding", 0); + } + }, + + //--------------------------------------------------------- + // Modify some wrapper CSS + //--------------------------------------------------------- + _modifyWrapperCSS: function() { + this._origWrapperStyle = this.$wrapper.attr("style") || null; + this._removeWrapperPadding(); + }, + + _undoModifyWrapperCSS: function() { + this._restoreStyle(this.$wrapper, this._origWrapperStyle); + }, + + //--------------------------------------------------------- + // Adds padding around scrolled content (not including + // any pull-down or pull-up) using a div with padding + // removed from wrapper. + //--------------------------------------------------------- + _addScrollerPadding: function () { + if (this.options.removeWrapperPadding && this.options.addScrollerPadding) { + // We do not store $scrollerContent in the object, because elements might be added/deleted + // after instantiation. When we undo, we need the CURRENT children in order to unwrap + var $scrollerContentWrapper, + $scrollerChildren = this.$scroller.children(), + $scrollerContent = $scrollerChildren.not(this.$pullDown).not(this.$pullUp).not(this.$pullUpSpacer); + $scrollerContent.wrapAll("
    "); + + $scrollerContentWrapper = $scrollerContent.parent().addClass(this.options.scrollerContentClass); + $scrollerContentWrapper.css({ + "padding-left" : this._origWrapperPaddingLeft, + "padding-right" : this._origWrapperPaddingRight, + "padding-top" : this._origWrapperPaddingTop, + "padding-bottom" : this._origWrapperPaddingBottom + }); + } + }, + + _undoAddScrollerPadding: function () { + if (this.options.removeWrapperPadding && this.options.addScrollerPadding) { + $("." + this.options.scrollerContentClass, this.$scroller).children().unwrap(); + } + }, + + //--------------------------------------------------------- + // Add some convenient classes in case user wants to style + // wrappers/scrollers that use iscroll. + //--------------------------------------------------------- + _addWrapperClasses: function() { + this.$wrapper.addClass(this.options.wrapperClass); + this.$scroller.addClass(this.options.scrollerClass); + }, + + _undoAddWrapperClasses: function() { + this.$scroller.removeClass(this.options.scrollerClass); + this.$wrapper.removeClass(this.options.wrapperClass); + }, + + //-------------------------------------------------------- + // Expands the scroller to fill the wrapper. This permits + // dragging an empty scroller, or one that is shorter than + // the wrapper. Otherwise, you could never do pull to + // refresh if some content wasn't initially present. As + // well, this pushes any pull-up element down so that it + // will not be visible until the user pulls up. + //-------------------------------------------------------- + _expandScrollerToFillWrapper: function() { + if (this.options.scrollShortContent || this.$pullDown.length || this.pullUp.length) { + if (this._firstScrollerExpand) { + this._origScrollerStyle = this.$scroller.attr("style") || null; + this._firstScrollerExpand = false; + } + + this.$scroller.css("min-height", + this.$wrapper.height() + + (this.$pullDown.length ? this.$pullDown.outerHeight(true) : 0) + + (this.$pullUp.length ? this.$pullUp.outerHeight(true) : 0) + ); + } + }, + + _undoExpandScrollerToFillWrapper: function() { + this._restoreStyle(this.$scroller, this._origScrollerStyle); + }, + + //-------------------------------------------------------- + //Resize the wrapper for the scrolled region to fill the + // viewport remaining after all fixed-height elements + // force makes it ignore resizeWrapper option + //-------------------------------------------------------- + _resizeWrapper: function(force) { + var then = null, + viewportHeight, + barsHeight, + newWrapperHeight; + + if ( !force && !this.options.resizeWrapper ) { + return; + } + if (this.options.traceResizeWrapper) { + then = this._log("resizeWrapper() start"); + } + this.$wrapper.trigger("updatelayout"); // Let jQuery mobile update fixed header/footer, collapsables, etc. + // Get technically-correct viewport height. jQuery documentation is in error on this. + // The viewport height is NOT in all cases the same as the window height, because the height + // of window might have been manually set. And, guess what? jQuery Mobile sets it to 99.99%. + // The viewport is considered the parent of window, and can be retrieved as shown below. + // At 99.99% and common browser sizes, this is probably not an issue. But let's do it right. + //viewportHeight = this.$window.height(); // Wrong + viewportHeight = document.documentElement.clientHeight; + barsHeight = this._calculateBarsHeight(); + + newWrapperHeight = + viewportHeight - + barsHeight - // Height of fixed bars or "other stuff" outside of the wrapper + this._wrapperHeightAdjustForBoxModel + // Make adjustment based on content-box model + // Note: the following will fail for Safari desktop with Develop/User Agent/iPhone + // Fake fullscreen or webview by using custom user agent and removing "Safari" from string + (IsMobileSafari && !IsIPad ? 60 : 0) + // Add 60px for space recovered from Mobile Safari address bar + this.options.wrapperAdd; // User-supplied fudge-factor if needed + + this.$wrapper.css("height", newWrapperHeight); + this._expandScrollerToFillWrapper(); + + if (this.options.traceResizeWrapper) { + this._logInterval("resizeWrapper() end" + (this._sizeDirty ? " (dirty)" : ""), then); + } + }, + + // Internal flag is meant for internal use from jquery.mobile.iscrollview only + // If this flag is omitted, then the force flag is set when calling _resizeWrapper + // This causes it to ignore the resizeWrapper option setting. i.e. if user code + // calls resizeWrapper, always resize the wrapper, regardless of setting. + resizeWrapper: function (internal) { + var hidden = this._setPageVisible(); + this._resizeWrapper(internal !== undefined); + this._restorePageVisibility(hidden); + }, + + _undoResizeWrapper: function() { + }, + + //--------------------------------------------------------- + // Make various modifications to the wrapper + //--------------------------------------------------------- + _modifyWrapper: function() { + this._addWrapperClasses(); + this._modifyWrapperCSS(); + + this._wrapperHeightAdjustForBoxModel = this._getHeightAdjustForBoxModel(this.$wrapper); + }, + + _undoModifyWrapper: function() { + this._undoResizeWrapper(); + this._undoModifyWrapperCSS(); + this._undoAddWrapperClasses(); + }, + + //-------------------------------------------------------- + // Modify the pull-down (if any) with reset text + // Also, read data-iscroll-release and data-iscroll-loading + // values (if present ) into the corresponding options. + //-------------------------------------------------------- + _modifyPullDown: function () { + var $pullDownLabel, pulledText, loadingText; + if (this.$pullDown.length === 0) { return; } + $pullDownLabel = $("." + this.options.pullLabelClass, this.$pullDown); + if ($pullDownLabel.length) { + this._origPullDownLabelText = $pullDownLabel.text(); + if (this._origPullDownLabelText) { this.options.pullDownResetText = this._origPullDownLabelText; } + else { $pullDownLabel.text(this.options.pullDownResetText); } + pulledText = $pullDownLabel.jqmData("iscroll-pulled-text"); + if (pulledText) { this.options.pullDownPulledText = pulledText; } + loadingText = $pullDownLabel.jqmData("iscroll-loading-text"); + if (loadingText) { this.options.pullDownLoadingText = loadingText; } + } + }, + + _undoModifyPullDown: function () { + if (this.$pullDown.length === 0) { return; } + var $pullDownLabel = $("." + this.options.pullLabelClass, this.$pullDown); + if ($pullDownLabel.length === 0) { return; } + $pullDownLabel.text(this._origPullDownLabelText); + }, + + //-------------------------------------------------------- + // Modify the pullup element (if any) to prevent visual + // glitching. Position at the bottom of the scroller. + // + // Modify the pull-up (if any) with reset text + // Also, read data-iscroll-release and data-iscroll-loading + // values (if present ) into the corresponding options. + //-------------------------------------------------------- + _modifyPullUp: function () { + var $pullUpLabel, pulledText, loadingText; + + if (this.$pullUp.length === 0) { return; } + + // Since we are positioning the pullUp element absolutely, it is pulled out of the + // document flow. We need to add a dummy
    with the same height as the pullUp. + $("
    ").insertBefore(this.$pullUp).css( + "height", this.$pullUp.outerHeight(true) ); + this.$pullUpSpacer = this.$pullUp.prev(); + this.$pullUpSpacer.addClass(this.options.pullUpSpacerClass); + + $pullUpLabel = $("." + this.options.pullLabelClass, this.$pullUp); + if ($pullUpLabel.length) { + this._origPullUpLabelText = $pullUpLabel.text(); + if (this._origPullUpLabelText) { this.options.pullUpResetText = this._origPullUpLabelText; } + else { $pullUpLabel.text(this.options.pullUpResetText); } + pulledText = $pullUpLabel.jqmData("iscroll-pulled-text"); + if (pulledText) { this.options.pullUpPulledText = pulledText; } + loadingText = $pullUpLabel.jqmData("iscroll-loading-text"); + if (loadingText) { this.options.pullUpLoadingText = loadingText; } + } + + }, + + _undoModifyPullUp: function () { + if (this.$pullUp.length === 0) { return; } + this.$pullUp.prev().remove(); // Remove the dummy div + if (this._origPullUpLabelText) { + $("." + this.options.pullLabelClass, this.$pullUp).text(this._origPullUpLabelText); + } + }, + + _correctPushedDownPage: function() { + // Scroll to top in case address bar pushed the page down + if (this.options.resizeWrapper && this.options.scrollTopOnResize) { + $.mobile.silentScroll(0); + } + }, + + //---------------------------------------------------------------------- + // Refresh the iscroll object. Insure that refresh is called with proper + // timing. Call optional before and after refresh callbacks and trigger + // before and after refresh events. + //----------------------------------------------------------------------- + refresh: function(delay, callbackBefore, callbackAfter, noDefer) { + + var _this, _delay, _callbackBefore, _callbackAfter, _noDefer, then; + + // If non-active-page refresh is deferred, make a note of it. + // Note that each call to refresh() overwrites the callback and context variables. + // Our expectation is that callback and context will be identical for all such refresh + // calls. In any case, only the last callback and context will be used. This allows + // refresh of jQuery Mobile widgets within the scroller to be deferred, as well. + if (!noDefer && this.options.deferNonActiveRefresh && !(this.$page.is($.mobile.activePage))) { + this._dirty = true; + this._dirtyCallbackBefore = callbackBefore; + this._dirtyCallbackAfter = callbackAfter; + if (this.options.traceRefresh) { + this._log("refresh() (deferred)"); + } + return; + } + + // Let the browser complete rendering, then refresh the scroller + // + // Optional delay parameter for timeout before actually calling iscroll.refresh(). + // If missing (undefined) or null, use options.refreshDelay. + // + // Optional callback parameters are called if present before and after iScroll internal + // refresh() is called. While the caller might bind to the before or after refresh events, + // this can be more convenient and avoids any ambiguity over WHICH call to refresh is involved. + _this = this; + _delay = delay; + _callbackBefore = callbackBefore; + _callbackAfter = callbackAfter; + _noDefer = noDefer; + then = this._startTiming(); + if ((_delay === undefined) || (_delay === null) ) { _delay = this.options.refreshDelay; } + + setTimeout(function() { + var later = null, + hidden; + + if (_this.options.traceRefresh) { + later = _this._logInterval("refresh() start", then); + } + + hidden = _this._setPageVisible(); + if (_callbackBefore) { _callbackBefore(); } + _this._triggerWidget("onbeforerefresh"); + _this.iscroll.refresh(); + _this._triggerWidget("onafterrefresh"); + if (_callbackAfter) { _callbackAfter(); } + _this._restorePageVisibility(hidden); + + // Scroll to top in case address bar pushed the page down + if (!hidden) { _this._correctPushedDownPage(); } + + if (_this.options.traceRefresh) { + _this._logInterval2("refresh() end" + (_noDefer ? " (dirty)" : ""), then, later); + } + }, _delay); + + if (this.options.traceRefresh) { + this._log("refresh() will occur after >= " + _delay + "mS"); + } + + }, + + + //--------------------------- + // Create the iScroll object + //--------------------------- + _create_iscroll_object: function() { + /*jslint newcap:true */ + this.iscroll = new IScroll(this, this.$wrapper.get(0), this._create_iscroll_options()); + /* jslint newcap:false */ + }, + + //----------------------------------------- + // Create scroller + //----------------------------------------- + _createScroller: function() { + if (this.options.createScroller) { + if (this.$wrapper.children().length) { + // Wrap the content with a div + this.$wrapper.children().wrapAll("
    "); + } + else { + // Create an empty div for content and wrap with a div + this.$wrapper.append("
    "); + } + } + }, + + _undoCreateScroller: function() { + if (this.options.createScroller) { + this.$scroller.children().unwrap(); + } + }, + + // Temporarily change page CSS to make it "visible" so that dimensions can be read. + // This can be used in any event callback, and so can be used in _create(), since it's called + // from pageinit event. Because event processing is synchronous, the browser won't render the + // change, as long as the page style is set back before the callback returns. So, a hidden + // page will remain hidden as long as _restorePageVisibility() is called before return. + // This way, we can just use normal dimension functions and avoid using jquery.actual, which + // slows things down significantly. + // + // jquery.actual goes up the tree from the element being measured and sets every element to + // visible, which is unnecessary. (We only have to be concerned about the page element, which + // jQuery Mobile sets to display:none for all but the currently-visible page.) It also does this + // for every dimension read. This essentially does the same thing, but then allows us to "batch" + // reading dimensions + _setPageVisible: function() { + var hidden = this.$page.is(":hidden"); + if (hidden) { this.$page.css("display", "block"); } + return hidden; + }, + + _restorePageVisibility: function(hidden) { + if (hidden) { this.$page.css("display", ""); } + }, + + //----------------------------------------- + // Automatically called on page creation + //----------------------------------------- + _create: function() { + var then = new Date(), + hidden; + + this.$wrapper = this.element; // JQuery object containing the element we are creating this widget for + this.$page = this.$wrapper.parents(":jqmData(role='page')"); // The page containing the wrapper + + if (this.options.debug && this.options.traceCreateDestroy) { + this._log("_create() start", then); + } + + this.createdAt = then; + this._instanceCount(this._instanceCount() + 1); // The count of extant instances of this widget on the page + this.instanceID = this._nextInstanceID(); // The serial ID of this instance of this widget on the page + this._nextInstanceID(this._instanceID + 1); + if (this.instanceID === 1) { + this._pageID(nextPageID); + nextPageID += 1; + } + this.pageID = this._pageID(); + + hidden = this._setPageVisible(); // Fake page visibility, so dimension functions work + this._adaptPage(); + this._createScroller(); + this.$scroller = this.$wrapper.children(":first"); // Get the first child of the wrapper, which is the + // element that we will scroll + if (this.$scroller.length === 0) { return; } + + // Find pull elements, if present + this.$pullDown = $("." + this.options.pullDownClass, this.$scroller); + this._modifyPullDown(); + + this.$pullUp = $("." + this.options.pullUpClass, this.$scroller); + this._modifyPullUp(); + + // Merge options from data-iscroll, if present + $.extend(true, this.options, this.$wrapper.jqmData("iscroll")); + + this._modifyWrapper(); // Various changes to the wrapper + + // Need this for deferred refresh processing + this._bindPage("pagebeforeshow", this._pageBeforeShowFunc); + + this._setTopOffsetForPullDown(); // If there's a pull-down, set the top offset + this._setBottomOffsetForPullUp(); // If there's a pull-up, set the bottom offset + this._resizeWrapper(); // Resize the wrapper to fill available space + this._addScrollerPadding(); // Put back padding removed from wrapper + this._create_iscroll_object(); + this._merge_from_iscroll_options(); // Merge iscroll options into widget options + this._restorePageVisibility(hidden); + + // Setup bindings for window resize and orientationchange + + if (this.options.resizeWrapper) { + this._isvBind(this.$window, this.options.resizeEvents, this._windowResizeFunc, "$window"); + if (this.options.scrollTopOnOrientationChange) { + this._isvBind(this.$window, "orientationchange", this._orientationChangeFunc, "$window"); + } + } + + // Refresh on trigger of updatelayout of content + this.$scrollerContent = this.$scroller.find("." + this.options.scrollerContentClass); + this._isvBind(this.$scrollerContent, "updatelayout", this._updateLayoutFunc, "$scrollerContent"); + + if (this.options.debug && this.options.traceCreateDestroy) { + this._logInterval("_create() end", then); + } + }, + + //---------------------------------------------------------- + // Destroy an instantiated plugin and clean up modifications + // the widget has made to the DOM + //---------------------------------------------------------- + destroy: function () { + var then = null; + if (this.options.debug && this.options.traceCreateDestroy) { + then = this._log("destroy() start"); + } + + // Unbind events + this._isvUnbind(this.$scrollerContent, "updatelayout", "$scrollerContent"); + this._isvUnbind(this.$window, this.options.resizeEvents, "$window"); + this._isvUnbind(this.$window, "orientationchange", "$window"); + if (this._instanceCount() === 1) { + this._unbindPage("pagebeforeshow"); + if (HasTouch) { + this._unbindPage("touchmove"); + } + } + + // fastDestroy option skips tearing down the modifications to the page, because we assume + // that the page itself is being removed, and nobody is going to be silly enough to + // un-ehance a scroller and keep the page. + if (!this.options.fastDestroy) { + this.iscroll.destroy(); + this.iscroll = null; + this._undoExpandScrollerToFillWrapper(); + this._undoModifyPullDown(); + this._undoModifyPullUp(); + this._undoAddScrollerPadding(); + this._undoModifyWrapper(); + this.$wrapper.removeClass(this.options.wrapperClass); + this.$scroller.removeClass(this.options.scrollerClass); + this._undoCreateScroller(); + } + + this._instanceCount(this._instanceCount() - 1); // The count of extant instances of this widget on the page + if (this._instanceCount() === 0) { + this._undoAdaptPage(); + } + + // For UI 1.8, destroy must be invoked from the + // base widget + $.Widget.prototype.destroy.call(this); + if (this.options.debug && this.options.traceCreateDestroy) { + this._logInterval("destroy() end", then); + } + // For UI 1.9, define _destroy instead and don't + // worry about calling the base widget + }, + + // Enable the widget + enable: function() { + this.iscroll.enable(); + $.Widget.prototype.enable.call(this); + }, + + // Disable the widget + disable: function() { + this.iscroll.disable(); + $.Widget.prototype.disable.call(this); + }, + + //---------------------------------------------------------- + //Respond to any changes the user makes to the option method + //---------------------------------------------------------- + _setOption: function( key, value ) { + var hidden; + + // iScroll4 doesn't officially support changing options after an iscroll object has been + // instantiated. However, some changes will work if you do a refresh() after changing the + // option. This is undocumented other than from user comments on the iscroll4 Google + // Groups support group. If an option change doesn't work with refresh(), then it + // is necessary to destroy and re-create the iscroll object. This is a functionality + // that the author of iscroll4 intends to support in the future. + // + // TODO: Research which options can be successfully changed without destroying and + // re-creating the iscroll object. For now, I'm taking a safe approach and + // always destroying and re-creating the iscroll object. + //switch (key) { + //case "hScroll": + //case "vScroll": + //case "hScrollbar": + //case "vScrollbar": + //this.options[ key ] = value; // Change our options object + //this.iscroll.options[ key ] = value; // ... and iscroll's options object + //this.iscroll.refresh(); // Don't think we need the timing hack here + //break; + + //default: + this.options[ key ] = value; + this.iscroll.destroy(); + hidden = this._setPageVisible(); + this._create_iscroll_object(); + this._restorePageVisibility(hidden); + //break; + //} + // For UI 1.8, _setOption must be manually invoked from + // the base widget + $.Widget.prototype._setOption.apply(this, arguments); + // For UI 1.9 the _super method can be used instead + // this._super( "_setOption", key, value ); + }, + + //---------------------------------------------------- + // Convenience wrappers around iscroll4 public methods + // So, you can use: + // + // $(".some-class").iscrollview("scrollTo", x, y, time, relative); + // + // instead of: + // + // $(".some-class").jqmData("iscrollview").iscroll.scrollTo(x, y, time, relative); + // + //---------------------------------------------------- + scrollTo: function(x,y,time,relative) { this.iscroll.scrollTo(x,y,time,relative); }, + scrollToElement: function(el,time) { this.iscroll.scrollToElement(el,time); }, + scrollToPage: function(pageX,pageY,time) { this.iscroll.scrollToPage(pageX,pageY,time); }, + stop: function() { this.iscroll.stop(); }, + zoom: function(x,y,scale,time) { this.iscroll.zoom(x,y,scale,time); }, + isReady: function() { return this.iscroll.isReady(); }, + // See disable() enable() elsewhere above - they are standard widget methods + + //---------------------------------------------------------------------------------- + // Accessors for iscroll4 internal variables. These are sometimes useful externally. + // For example, let's say you are adding elements to the end of a scrolled list. + // You'd like to scroll up (using scrollToElement) if the new element would be + // below the visible area. But if the list is intially empty, you'd want to avoid + // this until the scrolling area is initially full. So you need to compare the + // scroller height (scrollerH) to the wrapper height (wrapperH). + // + // These are also useful for creating "pull to refresh" functionality. + // + //----------------------------------------------------------------------------------- + x: function() { return this.iscroll.x; }, + y: function() { return this.iscroll.y; }, + wrapperW: function() { return this.iscroll.wrapperW; }, + wrapperH: function() { return this.iscroll.wrapperH; }, + scrollerW: function() { return this.iscroll.scrollerW; }, + scrollerH: function() { return this.iscroll.scrollerH; }, + + // These have setters. Useful for "pull to refresh". + minScrollX: function(val) { if (val !== undefined) { this.iscroll.minScrollX = val; } return this.iscroll.minScrollX; }, + minScrollY: function(val) { if (val !== undefined) { this.iscroll.minScrollY = val; } return this.iscroll.minScrollY; }, + maxScrollX: function(val) { if (val !== undefined) { this.iscroll.maxScrollX = val; } return this.iscroll.maxScrollX; }, + maxScrollY: function(val) { if (val !== undefined) { this.iscroll.maxScrollY = val; } return this.iscroll.maxScrollY; }, + + //----------------------------------------------------------------------------------- + // Pull-down/Pull-up support + //----------------------------------------------------------------------------------- + // Is pull-down in "pulled" state? + _pullDownIsPulled: function () { + return this.$pullDown.length && this.$pullDown.hasClass(this.options.pullPulledClass); + }, + + // Is pull-up in "pulled" state? + _pullUpIsPulled: function () { + return this.$pullUp.length && this.$pullUp.hasClass(this.options.pullPulledClass); + }, + + // Replace the text in a pull block + _replacePullText: function ($pull, text) { + var $label; + if (text) { + $label = $("." + this.options.pullLabelClass, $pull); + if ($label) { $label.text(text); } + } + }, + + // Reset a pull block to the initial state + _pullSetStateReset: function ($pull, text) { + if ($pull.is("." + this.options.pullLoadingClass + ", ." + this.options.pullPulledClass)) { + $pull.removeClass(this.options.pullPulledClass + " " + this.options.pullLoadingClass); + this._replacePullText($pull, text); + } + }, + + _pullDownSetStateReset: function(e) { + this._pullSetStateReset(this.$pullDown, this.options.pullDownResetText); + this._triggerWidget("onpulldownreset", e); + }, + + _pullUpSetStateReset: function(e) { + this._pullSetStateReset(this.$pullUp, this.options.pullUpResetText); + this._triggerWidget("onpullupreset", e); + }, + + // Set a pull block to pulled state + _pullSetStatePulled: function($pull, text) { + $pull.removeClass(this.options.pullLoadingClass).addClass(this.options.pullPulledClass); + this._replacePullText($pull, text); + }, + + _pullDownSetStatePulled: function(e) { + this._pullSetStatePulled(this.$pullDown, this.options.pullDownPulledText); + this._triggerWidget("onpulldownpulled", e); + }, + + _pullUpSetStatePulled: function (e) { + this._pullSetStatePulled(this.$pullUp, this.options.pullUpPulledText); + this._triggerWidget("onpulluppulled", e); + }, + + // Set a pull block to the loading state + _pullSetStateLoading: function($pull, text) { + $pull.removeClass(this.options.pullPulledClass).addClass(this.options.pullLoadingClass); + this._replacePullText($pull, text); + }, + + _pullDownSetStateLoading: function (e) { + this._pullSetStateLoading(this.$pullDown, this.options.pullDownLoadingText); + this._triggerWidget("onpulldownloading", e); + }, + + _pullUpSetStateLoading: function(e) { + this._pullSetStateLoading(this.$pullUp, this.options.pullUpLoadingText); + this._triggerWidget("onpulluploading", e); + }, + + _pullOnRefresh: function (e) { + // It's debatable if this is the right place to do this. On one hand, it might be best + // to do this in the pullup/down action function. We expect that we will always do a refresh + // after the action, though (unless the action doesn't actually update anything, in which + // case it can still call refresh().) On the other hand, it might be desirable to + // "reset" the pull if a refresh comes along for some other reason. If the content were + // updated because of something other than the user's pull action, then we consider the + // pull moot. + + // Reset pull blocks to their initial state + if (this.$pullDown.length) { this._pullDownSetStateReset(e); } + if (this.$pullUp.length) { this._pullUpSetStateReset(e); } + }, + + _pullOnScrollMove: function (e) { + var pullDownIsPulled, pullUpIsPulled, pullDownHeight, pullDownPast, pullUpHeight, pullUpPast, + y = this.y(); + + if (this.$pullDown.length) { + pullDownIsPulled = this._pullDownIsPulled(); + pullDownHeight = this.options.topOffset; + // User needs to pull down past the top edge of the pulldown element. To prevent false + // triggers from aggressive scrolling, they should have to pull down some additional + // amount. Half the height of the pulldown seems reasonable, but adjust per preference. + pullDownPast = pullDownHeight / 2; + + // Set "pulled" state if not pulled and user has pulled past the pulldown element + // by pullDownPast pixels + if (!pullDownIsPulled && y > pullDownPast ) { + this._pullDownSetStatePulled(e); + this.minScrollY(0); // Circumvent top offset so pull-down element doesn't rubber-band + } + + // Allow user to "oopsie", and scroll back to cancel and avoid pull-down action + // Cancel if pulled and user has scrolled back to top of pulldown element + else if (pullDownIsPulled && y <= 0) { + this._pullDownSetStateReset(e); + this.minScrollY(-pullDownHeight); // Re-instate top offset + } + } + + if (this.$pullUp.length) { + pullUpIsPulled = this._pullUpIsPulled(); + pullUpHeight = this.options.bottomOffset; + pullUpPast = pullUpHeight / 2; + if (!pullUpIsPulled && y < this.maxScrollY() - pullUpHeight - pullUpPast ) { + this._pullUpSetStatePulled(e); + this.maxScrollY(this.wrapperH() - this.scrollerH() + this.minScrollY()); + } + + else if (pullUpIsPulled && y >= this.maxScrollY() ) { + this._pullUpSetStateReset(e); + this.maxScrollY(this.wrapperH() - this.scrollerH() + this.minScrollY() + pullUpHeight); + } + } + + }, + + _pullOnScrollEnd: function (e) { + if (this._pullDownIsPulled(e)) { + this._pullDownSetStateLoading(e); + this._triggerWidget("onpulldown", e); + } + else if (this._pullUpIsPulled(e)) { + this._pullUpSetStateLoading(e); + this._triggerWidget("onpullup", e); + } + } + + }); + +}( jQuery, window, document )); + +// Self-init +jQuery(document).bind("pagecreate", function (e) { + "use strict"; + + // In here, e.target refers to the page that was created (it's the target of the pagecreate event) + // So, we can simply find elements on this page that match a selector of our choosing, and call + // our plugin on them. + + // The find() below returns an array of elements within a newly-created page that have + // the data-iscroll attribute. The Widget Factory will enumerate these and call the widget + // _create() function for each member of the array. + // If the array is of zero length, then no _create() fucntion is called. + var elements = jQuery(e.target).find(":jqmData(iscroll)"); + elements.iscrollview(); + }); + + diff --git a/webclient/js/process_ws.js b/webclient/js/process_ws.js index 3197bd7..e690ff9 100755 --- a/webclient/js/process_ws.js +++ b/webclient/js/process_ws.js @@ -74,7 +74,9 @@ function processGetPlaylists(resultArr) { $('#playlistslist').empty(); $('#playlistslist').html(tmp); $('#playlistslist').listview('refresh'); - // $('#playlistsloader').hide(); + if (isMobileWebkit) { + playlistslistScroll.refresh(); + } showLoading(false); } @@ -89,6 +91,9 @@ function processGetTracklist(resultArr) { setSongInfo(); showLoading(false); scrollToTracklist(); + if (isMobileWebkit) { + playlisttracksScroll.refresh(); + } } /********************************************************