Interactive interface for browsing global, full-resolution satellite imagery
Fixed problem with scrollbars, added group titles to active list, styled product picker accordions
Taylor Gunnoe0b26c2403d1e
diff --git a/web/css/bank.css b/web/css/bank.cssindex f66b8a34e..7b133a6cc 100644--- a/web/css/bank.css+++ b/web/css/bank.css@@ -114,8 +114,8 @@ a.atexpand {background: none;padding: 1px 3px;font-size:0.9em;- margin-top:10px;- margin-left:2%;+ margin-top:0px;+ margin-left:0;text-transform:uppercase;}.bank li.item {diff --git a/web/css/dataDownload.css b/web/css/dataDownload.cssindex dadeba9b8..ea8d7b24b 100644--- a/web/css/dataDownload.css+++ b/web/css/dataDownload.css@@ -1,5 +1,7 @@-+#wv-data{+ overflow:scroll;+}#wv-data-selection ul {display: list;margin: 0 5px;@@ -249,6 +251,16 @@display:inline-block;margin:0 10px 0 5px;}+#wv-datacontent{++}+#wv-datacontent>div{+ padding:0 5px;+ box-sizing:border-box;+ -moz-box-sizing:border-box;+ -webkit-box-sizing:border-box;+ -o-box-sizing:border-box;+}#wv-datacontent div[data-product='__NO_PRODUCT'] a {color: #000;}diff --git a/web/css/wv.layers.modal.css b/web/css/wv.layers.modal.cssindex 3177844da..597a7c2e0 100644--- a/web/css/wv.layers.modal.css+++ b/web/css/wv.layers.modal.css@@ -85,7 +85,7 @@font-family: open_sans_light;padding:0 10px;position:absolute;- left:50px;+ left:35px;right:50px;width:100%;padding-right:50px;@@ -103,13 +103,19 @@position: absolute;top: 50%;left: 50%;- width: 32px;- height: 32px;- margin: -16px 0 0 -16px;- background: url('../images/wv-icons.png') 0 32px;+ width: 26px;+ height: 26px;+ margin: -13px 0 0 -13px;+ background: url('../images/wv-icons.png') 0 26px;}#layer-search .search-on i{- background-position: 32px 32px;+ background-position: 26px 26px;+}+#layer-search .search-on:hover{+ background-color:#1a1a1a;+}+#layer-search .search-on:hover i{+ background-position: 26px 0px;}#layer-modal header nav {float:left;@@ -138,16 +144,16 @@position: absolute;top: 50%;left: 50%;- width: 32px;- height: 32px;- margin: -16px 0 0 -16px;- background: url('../images/wv-icons.png') 64px 32px;+ width: 26px;+ height: 26px;+ margin: -13px 0 0 -13px;+ background: url('../images/wv-icons.png') 52px 26px;}#layers-modal-close:hover{background-color:#1a1a1a;}#layers-modal-close:hover i{- background-position: 64px -64px;+ background-position: 52px -52px;}#layer-modal nav .nav-selected{background:#00457B;@@ -159,12 +165,13 @@/* Tile layout */#layer-modal{padding-left:10px;- padding-right:10px;+ padding-right:0;padding-top:0;overflow:hidden;}#layer-modal-main{overflow:auto;+ position:relative;}.stamp {@@ -176,9 +183,8 @@}.layer-category {- background-color:#000;cursor:pointer;- background-color:#666;+ background-color:rgba(0,0,0,0.75);width: 310px;height:230px;overflow:hidden;@@ -279,11 +285,16 @@#selected-category .ui-accordion-header,#selected-category .ui-state-focus,#layers-all .layers-all-layer {- background:rgba(0, 0, 0, 0.75);+ background:rgba(0, 0, 0, 0.85);+}+#selected-category .ui-accordion-header:hover{+ background: rgba(0, 0, 0, 0.75);}+#selected-category .ui-state-active,+#selected-category .ui-state-active:hover,#selected-category .ui-accordion-content{- background:rgba(0, 0, 0, 0.65);+ background:rgba(0, 0, 0, 0.85);}#selected-category .ui-accordion .ui-corner-top{border-radius:0;@@ -292,12 +303,25 @@#layers-all .layers-all-layer {padding-left:1.2em;}-#selected-category .ui-accordion-header-icon-,+#selected-category .ui-accordion-header-icon,#layers-all .layers-all-layer .layers-all-layer-icon {left:auto;right:1.2em;}+#selected-category .ui-icon-triangle-1-e,+#selected-category .ui-icon-triangle-1-s+{+ width:30px;+ height:30px;+ margin-top:-15px;+ background: url('../images/wv.layers/accordion.png') transparent;+}+#selected-category .ui-icon-triangle-1-e{+ background-position:0 0;+}+#selected-category .ui-icon-triangle-1-s{+ background-position:30px 0;+}#selected-category .ui-accordion-header h3,#layers-all .layers-all-layer h3 {color:#fff;@@ -317,6 +341,13 @@padding: .5em 1.2em;}+/*Override jqueryUI hover class*/+#selected-category .ui-widget-content .ui-state-hover{+ background:none;+}+#selected-category .ui-tabs-nav li.ui-state-default:hover a{+ background:rgba(255,255,255,0.2);+}#selected-category .ui-tabs .ui-tabs-nav{float:left;clear:both;@@ -324,9 +355,15 @@padding:0;}#selected-category .ui-tabs .ui-tabs-nav li {+ max-width:200px;+ border-left:10px solid transparent;margin: 0;padding: 0;clear:both;+ box-sizing: border-box;+ -moz-box-sizing: border-box;+ -webkit-box-sizing: border-box;+ -o-box-sizing: border-box;}#selected-category .ui-tabs .ui-tabs-nav li a {float:none;@@ -342,7 +379,11 @@font-weight:300;}#selected-category .ui-tabs .ui-tabs-nav li.ui-tabs-active {- background:rgba(255, 255, 255,0.35);+ background:rgba(255, 255, 255,0.9);+ border-left:10px solid #d54e21;+}+#selected-category .ui-tabs .ui-tabs-nav li.ui-tabs-active a{+ color:#000;}#selected-category .ui-tabs-panel{@@ -363,7 +404,78 @@}#selected-category .ui-tabs-panel .ui-buttonset{+}+#selected-category .ui-tabs-panel li.measurement-settings-item iCheck-checkbox,+#selected-category .ui-tabs-panel li.measurement-settings-item label,+#selected-category .ui-tabs-panel li.measurement-settings-item+{+ cursor:pointer;+}+#selected-category .ui-tabs-panel li.measurement-settings-item{+ padding:5px 0;+ margin:0 0 2px 10px;+}+#selected-category .ui-tabs-panel li.measurement-settings-item:hover{+ background:rgba(255,255,255,0.3);+ cursor:pointer;}#layers-all .iCheck-checkbox {float: right;-}\ No newline at end of file+}+/*lazy code to put scrollbar in the right place*/++#layer-categories,+#selected-category,+#layers-all+{+ padding-right:10px;+}+#categories-nav {+ margin-right:10px;+}++/* perfect-scrollbar */+.ps-container > .ps-scrollbar-y-rail,+.ps-container > .ps-scrollbar-y-rail .ps-scrollbar-y+{+ border-radius:0;+ -webkit-border-radius:0;+ -moz-border-radius:0;+ -o-border-radius:0;+ -webkit-transition: none;+ -moz-transition: none;+ -o-transition: none;+ transition: none;+ opacity:1;+}+.ps-container > .ps-scrollbar-y-rail {+ right:0;+}+.ps-container > .ps-scrollbar-y-rail .ps-scrollbar-y{+ background-color: #666;+}+.ps-container:hover.ps-in-scrolling {+ pointer-events: none; }+ .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail {+ background-color: #eee;+ opacity: 1; }+ .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x {+ background-color: #999; }+ .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail {+ background-color: #eee;+ opacity: 1; }+ .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y {+ background-color: #999; }+ .ps-container:hover > .ps-scrollbar-x-rail,+ .ps-container:hover > .ps-scrollbar-y-rail {+ opacity: 1; }+ .ps-container:hover > .ps-scrollbar-x-rail:hover {+ background-color: #eee;+ opacity: 1; }+ .ps-container:hover > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x {+ background-color: #999; }+ .ps-container:hover > .ps-scrollbar-y-rail:hover {+ background-color: #eee;+ opacity: 1; }+ .ps-container:hover > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y {+ background-color: #999; }diff --git a/web/css/wv.sidebar.css b/web/css/wv.sidebar.cssindex dee6d6fb0..546d32976 100644--- a/web/css/wv.sidebar.css+++ b/web/css/wv.sidebar.css@@ -24,6 +24,7 @@-o-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;+ padding-right:0;}#productsHolder main#products{@@ -33,21 +34,10 @@-webkit-box-sizing:border-box;-o-box-sizing:border-box;padding:5px 0 0 0;-}-main#products::-webkit-scrollbar-track {- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);- background-color: transparent;-}--main#products::-webkit-scrollbar {- width: 12px;- background-color: transparent;+ position:relative;+ padding-right:.2em;}-main#products::-webkit-scrollbar-thumb {- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);- background-color: #F5F5F5;-}#productsHolder ul#overlays{margin-bottom:10px;}@@ -59,7 +49,12 @@ main#products::-webkit-scrollbar-thumb {border-color:transparent;color: #fff;cursor: pointer;- border-radius: 5px;+ border-radius:0;+ background: #d54e21;+ background-image:none;+}+#productsHolder footer .action:hover{+ background:#ccc;}#productsHolder footer .action.ui-button-disabled {background-color: #000;@@ -71,16 +66,14 @@ main#products::-webkit-scrollbar-thumb {color: #333;}#productsHolder footer .action.ui-state-focus {- background: #666;+ background: #d54e21;+ background-image:none;}-/* fixed Scrollbars-::-webkit-scrollbar {- -webkit-appearance: none;- width: 10px;-}-::-webkit-scrollbar-thumb {- border-radius: 0px;- background-color: rgba(255,255,255,.5);- -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);+/* perfect scrollbars */+#products .ps-scrollbar-y-rail{+ background-color: transparent;+ margin-top:5px;}-*/+#products .ps-scrollbar-y {+ background:#ccc;+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/_all.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/_all.cssnew file mode 100644index 000000000..23837a8b9--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/_all.css@@ -0,0 +1,710 @@+/* iCheck plugin Line skin+----------------------------------- */+.icheckbox_line,+.iradio_line {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #000;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line .icheck_line-icon,+ .iradio_line .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line.hover,+ .icheckbox_line.checked.hover,+ .iradio_line.hover {+ background: #444;+ }+ .icheckbox_line.checked,+ .iradio_line.checked {+ background: #000;+ }+ .icheckbox_line.checked .icheck_line-icon,+ .iradio_line.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line.disabled,+ .iradio_line.disabled {+ background: #ccc;+ cursor: default;+ }+ .icheckbox_line.disabled .icheck_line-icon,+ .iradio_line.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line.checked.disabled,+ .iradio_line.checked.disabled {+ background: #ccc;+ }+ .icheckbox_line.checked.disabled .icheck_line-icon,+ .iradio_line.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line .icheck_line-icon,+ .iradio_line .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* red */+.icheckbox_line-red,+.iradio_line-red {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #e56c69;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-red .icheck_line-icon,+ .iradio_line-red .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-red.hover,+ .icheckbox_line-red.checked.hover,+ .iradio_line-red.hover {+ background: #E98582;+ }+ .icheckbox_line-red.checked,+ .iradio_line-red.checked {+ background: #e56c69;+ }+ .icheckbox_line-red.checked .icheck_line-icon,+ .iradio_line-red.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-red.disabled,+ .iradio_line-red.disabled {+ background: #F7D3D2;+ cursor: default;+ }+ .icheckbox_line-red.disabled .icheck_line-icon,+ .iradio_line-red.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-red.checked.disabled,+ .iradio_line-red.checked.disabled {+ background: #F7D3D2;+ }+ .icheckbox_line-red.checked.disabled .icheck_line-icon,+ .iradio_line-red.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line-red .icheck_line-icon,+ .iradio_line-red .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* green */+.icheckbox_line-green,+.iradio_line-green {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #1b7e5a;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-green .icheck_line-icon,+ .iradio_line-green .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-green.hover,+ .icheckbox_line-green.checked.hover,+ .iradio_line-green.hover {+ background: #24AA7A;+ }+ .icheckbox_line-green.checked,+ .iradio_line-green.checked {+ background: #1b7e5a;+ }+ .icheckbox_line-green.checked .icheck_line-icon,+ .iradio_line-green.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-green.disabled,+ .iradio_line-green.disabled {+ background: #89E6C4;+ cursor: default;+ }+ .icheckbox_line-green.disabled .icheck_line-icon,+ .iradio_line-green.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-green.checked.disabled,+ .iradio_line-green.checked.disabled {+ background: #89E6C4;+ }+ .icheckbox_line-green.checked.disabled .icheck_line-icon,+ .iradio_line-green.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line-green .icheck_line-icon,+ .iradio_line-green .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* blue */+.icheckbox_line-blue,+.iradio_line-blue {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #2489c5;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-blue .icheck_line-icon,+ .iradio_line-blue .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-blue.hover,+ .icheckbox_line-blue.checked.hover,+ .iradio_line-blue.hover {+ background: #3DA0DB;+ }+ .icheckbox_line-blue.checked,+ .iradio_line-blue.checked {+ background: #2489c5;+ }+ .icheckbox_line-blue.checked .icheck_line-icon,+ .iradio_line-blue.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-blue.disabled,+ .iradio_line-blue.disabled {+ background: #ADD7F0;+ cursor: default;+ }+ .icheckbox_line-blue.disabled .icheck_line-icon,+ .iradio_line-blue.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-blue.checked.disabled,+ .iradio_line-blue.checked.disabled {+ background: #ADD7F0;+ }+ .icheckbox_line-blue.checked.disabled .icheck_line-icon,+ .iradio_line-blue.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line-blue .icheck_line-icon,+ .iradio_line-blue .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* aero */+.icheckbox_line-aero,+.iradio_line-aero {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #9cc2cb;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-aero .icheck_line-icon,+ .iradio_line-aero .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-aero.hover,+ .icheckbox_line-aero.checked.hover,+ .iradio_line-aero.hover {+ background: #B5D1D8;+ }+ .icheckbox_line-aero.checked,+ .iradio_line-aero.checked {+ background: #9cc2cb;+ }+ .icheckbox_line-aero.checked .icheck_line-icon,+ .iradio_line-aero.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-aero.disabled,+ .iradio_line-aero.disabled {+ background: #D2E4E8;+ cursor: default;+ }+ .icheckbox_line-aero.disabled .icheck_line-icon,+ .iradio_line-aero.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-aero.checked.disabled,+ .iradio_line-aero.checked.disabled {+ background: #D2E4E8;+ }+ .icheckbox_line-aero.checked.disabled .icheck_line-icon,+ .iradio_line-aero.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line-aero .icheck_line-icon,+ .iradio_line-aero .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* grey */+.icheckbox_line-grey,+.iradio_line-grey {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #73716e;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-grey .icheck_line-icon,+ .iradio_line-grey .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-grey.hover,+ .icheckbox_line-grey.checked.hover,+ .iradio_line-grey.hover {+ background: #8B8986;+ }+ .icheckbox_line-grey.checked,+ .iradio_line-grey.checked {+ background: #73716e;+ }+ .icheckbox_line-grey.checked .icheck_line-icon,+ .iradio_line-grey.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-grey.disabled,+ .iradio_line-grey.disabled {+ background: #D5D4D3;+ cursor: default;+ }+ .icheckbox_line-grey.disabled .icheck_line-icon,+ .iradio_line-grey.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-grey.checked.disabled,+ .iradio_line-grey.checked.disabled {+ background: #D5D4D3;+ }+ .icheckbox_line-grey.checked.disabled .icheck_line-icon,+ .iradio_line-grey.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line-grey .icheck_line-icon,+ .iradio_line-grey .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* orange */+.icheckbox_line-orange,+.iradio_line-orange {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #f70;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-orange .icheck_line-icon,+ .iradio_line-orange .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-orange.hover,+ .icheckbox_line-orange.checked.hover,+ .iradio_line-orange.hover {+ background: #FF9233;+ }+ .icheckbox_line-orange.checked,+ .iradio_line-orange.checked {+ background: #f70;+ }+ .icheckbox_line-orange.checked .icheck_line-icon,+ .iradio_line-orange.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-orange.disabled,+ .iradio_line-orange.disabled {+ background: #FFD6B3;+ cursor: default;+ }+ .icheckbox_line-orange.disabled .icheck_line-icon,+ .iradio_line-orange.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-orange.checked.disabled,+ .iradio_line-orange.checked.disabled {+ background: #FFD6B3;+ }+ .icheckbox_line-orange.checked.disabled .icheck_line-icon,+ .iradio_line-orange.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line-orange .icheck_line-icon,+ .iradio_line-orange .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* yellow */+.icheckbox_line-yellow,+.iradio_line-yellow {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #FFC414;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-yellow .icheck_line-icon,+ .iradio_line-yellow .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-yellow.hover,+ .icheckbox_line-yellow.checked.hover,+ .iradio_line-yellow.hover {+ background: #FFD34F;+ }+ .icheckbox_line-yellow.checked,+ .iradio_line-yellow.checked {+ background: #FFC414;+ }+ .icheckbox_line-yellow.checked .icheck_line-icon,+ .iradio_line-yellow.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-yellow.disabled,+ .iradio_line-yellow.disabled {+ background: #FFE495;+ cursor: default;+ }+ .icheckbox_line-yellow.disabled .icheck_line-icon,+ .iradio_line-yellow.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-yellow.checked.disabled,+ .iradio_line-yellow.checked.disabled {+ background: #FFE495;+ }+ .icheckbox_line-yellow.checked.disabled .icheck_line-icon,+ .iradio_line-yellow.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line-yellow .icheck_line-icon,+ .iradio_line-yellow .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* pink */+.icheckbox_line-pink,+.iradio_line-pink {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #a77a94;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-pink .icheck_line-icon,+ .iradio_line-pink .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-pink.hover,+ .icheckbox_line-pink.checked.hover,+ .iradio_line-pink.hover {+ background: #B995A9;+ }+ .icheckbox_line-pink.checked,+ .iradio_line-pink.checked {+ background: #a77a94;+ }+ .icheckbox_line-pink.checked .icheck_line-icon,+ .iradio_line-pink.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-pink.disabled,+ .iradio_line-pink.disabled {+ background: #E0D0DA;+ cursor: default;+ }+ .icheckbox_line-pink.disabled .icheck_line-icon,+ .iradio_line-pink.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-pink.checked.disabled,+ .iradio_line-pink.checked.disabled {+ background: #E0D0DA;+ }+ .icheckbox_line-pink.checked.disabled .icheck_line-icon,+ .iradio_line-pink.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) {+ .icheckbox_line-pink .icheck_line-icon,+ .iradio_line-pink .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}++/* purple */+.icheckbox_line-purple,+.iradio_line-purple {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #6a5a8c;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-purple .icheck_line-icon,+ .iradio_line-purple .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-purple.hover,+ .icheckbox_line-purple.checked.hover,+ .iradio_line-purple.hover {+ background: #8677A7;+ }+ .icheckbox_line-purple.checked,+ .iradio_line-purple.checked {+ background: #6a5a8c;+ }+ .icheckbox_line-purple.checked .icheck_line-icon,+ .iradio_line-purple.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-purple.disabled,+ .iradio_line-purple.disabled {+ background: #D2CCDE;+ cursor: default;+ }+ .icheckbox_line-purple.disabled .icheck_line-icon,+ .iradio_line-purple.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-purple.checked.disabled,+ .iradio_line-purple.checked.disabled {+ background: #D2CCDE;+ }+ .icheckbox_line-purple.checked.disabled .icheck_line-icon,+ .iradio_line-purple.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-purple .icheck_line-icon,+ .iradio_line-purple .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/aero.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/aero.cssnew file mode 100644index 000000000..e6dd82a6c--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/aero.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, aero+----------------------------------- */+.icheckbox_line-aero,+.iradio_line-aero {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #9cc2cb;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-aero .icheck_line-icon,+ .iradio_line-aero .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-aero.hover,+ .icheckbox_line-aero.checked.hover,+ .iradio_line-aero.hover {+ background: #B5D1D8;+ }+ .icheckbox_line-aero.checked,+ .iradio_line-aero.checked {+ background: #9cc2cb;+ }+ .icheckbox_line-aero.checked .icheck_line-icon,+ .iradio_line-aero.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-aero.disabled,+ .iradio_line-aero.disabled {+ background: #D2E4E8;+ cursor: default;+ }+ .icheckbox_line-aero.disabled .icheck_line-icon,+ .iradio_line-aero.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-aero.checked.disabled,+ .iradio_line-aero.checked.disabled {+ background: #D2E4E8;+ }+ .icheckbox_line-aero.checked.disabled .icheck_line-icon,+ .iradio_line-aero.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-aero .icheck_line-icon,+ .iradio_line-aero .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/blue.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/blue.cssnew file mode 100644index 000000000..8f105d908--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/blue.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, blue+----------------------------------- */+.icheckbox_line-blue,+.iradio_line-blue {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #2489c5;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-blue .icheck_line-icon,+ .iradio_line-blue .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-blue.hover,+ .icheckbox_line-blue.checked.hover,+ .iradio_line-blue.hover {+ background: #3DA0DB;+ }+ .icheckbox_line-blue.checked,+ .iradio_line-blue.checked {+ background: #2489c5;+ }+ .icheckbox_line-blue.checked .icheck_line-icon,+ .iradio_line-blue.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-blue.disabled,+ .iradio_line-blue.disabled {+ background: #ADD7F0;+ cursor: default;+ }+ .icheckbox_line-blue.disabled .icheck_line-icon,+ .iradio_line-blue.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-blue.checked.disabled,+ .iradio_line-blue.checked.disabled {+ background: #ADD7F0;+ }+ .icheckbox_line-blue.checked.disabled .icheck_line-icon,+ .iradio_line-blue.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-blue .icheck_line-icon,+ .iradio_line-blue .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/green.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/green.cssnew file mode 100644index 000000000..9535c7c33--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/green.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, green+----------------------------------- */+.icheckbox_line-green,+.iradio_line-green {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #1b7e5a;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-green .icheck_line-icon,+ .iradio_line-green .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-green.hover,+ .icheckbox_line-green.checked.hover,+ .iradio_line-green.hover {+ background: #24AA7A;+ }+ .icheckbox_line-green.checked,+ .iradio_line-green.checked {+ background: #1b7e5a;+ }+ .icheckbox_line-green.checked .icheck_line-icon,+ .iradio_line-green.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-green.disabled,+ .iradio_line-green.disabled {+ background: #89E6C4;+ cursor: default;+ }+ .icheckbox_line-green.disabled .icheck_line-icon,+ .iradio_line-green.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-green.checked.disabled,+ .iradio_line-green.checked.disabled {+ background: #89E6C4;+ }+ .icheckbox_line-green.checked.disabled .icheck_line-icon,+ .iradio_line-green.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-green .icheck_line-icon,+ .iradio_line-green .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/grey.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/grey.cssnew file mode 100644index 000000000..9e3405353--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/grey.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, grey+----------------------------------- */+.icheckbox_line-grey,+.iradio_line-grey {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #73716e;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-grey .icheck_line-icon,+ .iradio_line-grey .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-grey.hover,+ .icheckbox_line-grey.checked.hover,+ .iradio_line-grey.hover {+ background: #8B8986;+ }+ .icheckbox_line-grey.checked,+ .iradio_line-grey.checked {+ background: #73716e;+ }+ .icheckbox_line-grey.checked .icheck_line-icon,+ .iradio_line-grey.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-grey.disabled,+ .iradio_line-grey.disabled {+ background: #D5D4D3;+ cursor: default;+ }+ .icheckbox_line-grey.disabled .icheck_line-icon,+ .iradio_line-grey.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-grey.checked.disabled,+ .iradio_line-grey.checked.disabled {+ background: #D5D4D3;+ }+ .icheckbox_line-grey.checked.disabled .icheck_line-icon,+ .iradio_line-grey.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-grey .icheck_line-icon,+ .iradio_line-grey .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/line.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/line.cssnew file mode 100644index 000000000..2173a25c3--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/line.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, black+----------------------------------- */+.icheckbox_line,+.iradio_line {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #000;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line .icheck_line-icon,+ .iradio_line .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line.hover,+ .icheckbox_line.checked.hover,+ .iradio_line.hover {+ background: #444;+ }+ .icheckbox_line.checked,+ .iradio_line.checked {+ background: #000;+ }+ .icheckbox_line.checked .icheck_line-icon,+ .iradio_line.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line.disabled,+ .iradio_line.disabled {+ background: #ccc;+ cursor: default;+ }+ .icheckbox_line.disabled .icheck_line-icon,+ .iradio_line.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line.checked.disabled,+ .iradio_line.checked.disabled {+ background: #ccc;+ }+ .icheckbox_line.checked.disabled .icheck_line-icon,+ .iradio_line.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line .icheck_line-icon,+ .iradio_line .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/line.png b/web/ext/ui/iCheck-1.0.2-patch/skins/line/line.pngnew file mode 100644index 000000000..d21d7a7b4Binary files /dev/null and b/web/ext/ui/iCheck-1.0.2-patch/skins/line/line.png differdiff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/[email protected] b/web/ext/ui/iCheck-1.0.2-patch/skins/line/[email protected]new file mode 100644index 000000000..62900a2d9Binary files /dev/null and b/web/ext/ui/iCheck-1.0.2-patch/skins/line/[email protected] differdiff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/orange.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/orange.cssnew file mode 100644index 000000000..e408a6afc--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/orange.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, orange+----------------------------------- */+.icheckbox_line-orange,+.iradio_line-orange {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #f70;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-orange .icheck_line-icon,+ .iradio_line-orange .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-orange.hover,+ .icheckbox_line-orange.checked.hover,+ .iradio_line-orange.hover {+ background: #FF9233;+ }+ .icheckbox_line-orange.checked,+ .iradio_line-orange.checked {+ background: #f70;+ }+ .icheckbox_line-orange.checked .icheck_line-icon,+ .iradio_line-orange.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-orange.disabled,+ .iradio_line-orange.disabled {+ background: #FFD6B3;+ cursor: default;+ }+ .icheckbox_line-orange.disabled .icheck_line-icon,+ .iradio_line-orange.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-orange.checked.disabled,+ .iradio_line-orange.checked.disabled {+ background: #FFD6B3;+ }+ .icheckbox_line-orange.checked.disabled .icheck_line-icon,+ .iradio_line-orange.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-orange .icheck_line-icon,+ .iradio_line-orange .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/pink.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/pink.cssnew file mode 100644index 000000000..d19459eda--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/pink.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, pink+----------------------------------- */+.icheckbox_line-pink,+.iradio_line-pink {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #a77a94;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-pink .icheck_line-icon,+ .iradio_line-pink .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-pink.hover,+ .icheckbox_line-pink.checked.hover,+ .iradio_line-pink.hover {+ background: #B995A9;+ }+ .icheckbox_line-pink.checked,+ .iradio_line-pink.checked {+ background: #a77a94;+ }+ .icheckbox_line-pink.checked .icheck_line-icon,+ .iradio_line-pink.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-pink.disabled,+ .iradio_line-pink.disabled {+ background: #E0D0DA;+ cursor: default;+ }+ .icheckbox_line-pink.disabled .icheck_line-icon,+ .iradio_line-pink.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-pink.checked.disabled,+ .iradio_line-pink.checked.disabled {+ background: #E0D0DA;+ }+ .icheckbox_line-pink.checked.disabled .icheck_line-icon,+ .iradio_line-pink.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-pink .icheck_line-icon,+ .iradio_line-pink .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/purple.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/purple.cssnew file mode 100644index 000000000..ecca700b4--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/purple.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, purple+----------------------------------- */+.icheckbox_line-purple,+.iradio_line-purple {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #6a5a8c;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-purple .icheck_line-icon,+ .iradio_line-purple .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-purple.hover,+ .icheckbox_line-purple.checked.hover,+ .iradio_line-purple.hover {+ background: #8677A7;+ }+ .icheckbox_line-purple.checked,+ .iradio_line-purple.checked {+ background: #6a5a8c;+ }+ .icheckbox_line-purple.checked .icheck_line-icon,+ .iradio_line-purple.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-purple.disabled,+ .iradio_line-purple.disabled {+ background: #D2CCDE;+ cursor: default;+ }+ .icheckbox_line-purple.disabled .icheck_line-icon,+ .iradio_line-purple.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-purple.checked.disabled,+ .iradio_line-purple.checked.disabled {+ background: #D2CCDE;+ }+ .icheckbox_line-purple.checked.disabled .icheck_line-icon,+ .iradio_line-purple.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-purple .icheck_line-icon,+ .iradio_line-purple .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/red.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/red.cssnew file mode 100644index 000000000..3a8aee21b--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/red.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, red+----------------------------------- */+.icheckbox_line-red,+.iradio_line-red {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #e56c69;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-red .icheck_line-icon,+ .iradio_line-red .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-red.hover,+ .icheckbox_line-red.checked.hover,+ .iradio_line-red.hover {+ background: #E98582;+ }+ .icheckbox_line-red.checked,+ .iradio_line-red.checked {+ background: #e56c69;+ }+ .icheckbox_line-red.checked .icheck_line-icon,+ .iradio_line-red.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-red.disabled,+ .iradio_line-red.disabled {+ background: #F7D3D2;+ cursor: default;+ }+ .icheckbox_line-red.disabled .icheck_line-icon,+ .iradio_line-red.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-red.checked.disabled,+ .iradio_line-red.checked.disabled {+ background: #F7D3D2;+ }+ .icheckbox_line-red.checked.disabled .icheck_line-icon,+ .iradio_line-red.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-red .icheck_line-icon,+ .iradio_line-red .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/line/yellow.css b/web/ext/ui/iCheck-1.0.2-patch/skins/line/yellow.cssnew file mode 100644index 000000000..c6eaccfaf--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/line/yellow.css@@ -0,0 +1,71 @@+/* iCheck plugin Line skin, yellow+----------------------------------- */+.icheckbox_line-yellow,+.iradio_line-yellow {+ position: relative;+ display: block;+ margin: 0;+ padding: 5px 15px 5px 38px;+ font-size: 13px;+ line-height: 17px;+ color: #fff;+ background: #FFC414;+ border: none;+ -webkit-border-radius: 3px;+ -moz-border-radius: 3px;+ border-radius: 3px;+ cursor: pointer;+}+ .icheckbox_line-yellow .icheck_line-icon,+ .iradio_line-yellow .icheck_line-icon {+ position: absolute;+ top: 50%;+ left: 13px;+ width: 13px;+ height: 11px;+ margin: -5px 0 0 0;+ padding: 0;+ overflow: hidden;+ background: url(line.png) no-repeat;+ border: none;+ }+ .icheckbox_line-yellow.hover,+ .icheckbox_line-yellow.checked.hover,+ .iradio_line-yellow.hover {+ background: #FFD34F;+ }+ .icheckbox_line-yellow.checked,+ .iradio_line-yellow.checked {+ background: #FFC414;+ }+ .icheckbox_line-yellow.checked .icheck_line-icon,+ .iradio_line-yellow.checked .icheck_line-icon {+ background-position: -15px 0;+ }+ .icheckbox_line-yellow.disabled,+ .iradio_line-yellow.disabled {+ background: #FFE495;+ cursor: default;+ }+ .icheckbox_line-yellow.disabled .icheck_line-icon,+ .iradio_line-yellow.disabled .icheck_line-icon {+ background-position: -30px 0;+ }+ .icheckbox_line-yellow.checked.disabled,+ .iradio_line-yellow.checked.disabled {+ background: #FFE495;+ }+ .icheckbox_line-yellow.checked.disabled .icheck_line-icon,+ .iradio_line-yellow.checked.disabled .icheck_line-icon {+ background-position: -45px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_line-yellow .icheck_line-icon,+ .iradio_line-yellow .icheck_line-icon {+ background-image: url([email protected]);+ -webkit-background-size: 60px 13px;+ background-size: 60px 13px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/square/orange.css b/web/ext/ui/iCheck-1.0.2-patch/skins/square/orange.cssnew file mode 100644index 000000000..55b458973--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/square/orange.css@@ -0,0 +1,59 @@+/* iCheck plugin Square skin, orange+----------------------------------- */+.icheckbox_square-orange,+.iradio_square-orange {+ display: inline-block;+ *display: inline;+ vertical-align: middle;+ margin: 0;+ padding: 0;+ width: 22px;+ height: 22px;+ background: url(orange.png) no-repeat;+ border: none;+ cursor: pointer;+}++.icheckbox_square-orange {+ background-position: 0 0;+}+ .icheckbox_square-orange.hover {+ background-position: -24px 0;+ }+ .icheckbox_square-orange.checked {+ background-position: -48px 0;+ }+ .icheckbox_square-orange.disabled {+ background-position: -72px 0;+ cursor: default;+ }+ .icheckbox_square-orange.checked.disabled {+ background-position: -96px 0;+ }++.iradio_square-orange {+ background-position: -120px 0;+}+ .iradio_square-orange.hover {+ background-position: -144px 0;+ }+ .iradio_square-orange.checked {+ background-position: -168px 0;+ }+ .iradio_square-orange.disabled {+ background-position: -192px 0;+ cursor: default;+ }+ .iradio_square-orange.checked.disabled {+ background-position: -216px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_square-orange,+ .iradio_square-orange {+ background-image: url([email protected]);+ -webkit-background-size: 240px 24px;+ background-size: 240px 24px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/square/orange.png b/web/ext/ui/iCheck-1.0.2-patch/skins/square/orange.pngnew file mode 100644index 000000000..84608500aBinary files /dev/null and b/web/ext/ui/iCheck-1.0.2-patch/skins/square/orange.png differdiff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/square/[email protected] b/web/ext/ui/iCheck-1.0.2-patch/skins/square/[email protected]new file mode 100644index 000000000..b1f231973Binary files /dev/null and b/web/ext/ui/iCheck-1.0.2-patch/skins/square/[email protected] differdiff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/square/red.css b/web/ext/ui/iCheck-1.0.2-patch/skins/square/red.cssnew file mode 100644index 000000000..43399b8e8--- /dev/null+++ b/web/ext/ui/iCheck-1.0.2-patch/skins/square/red.css@@ -0,0 +1,59 @@+/* iCheck plugin Square skin, red+----------------------------------- */+.icheckbox_square-red,+.iradio_square-red {+ display: inline-block;+ *display: inline;+ vertical-align: middle;+ margin: 0;+ padding: 0;+ width: 22px;+ height: 22px;+ background: url(red.png) no-repeat;+ border: none;+ cursor: pointer;+}++.icheckbox_square-red {+ background-position: 0 0;+}+ .icheckbox_square-red.hover {+ background-position: -24px 0;+ }+ .icheckbox_square-red.checked {+ background-position: -48px 0;+ }+ .icheckbox_square-red.disabled {+ background-position: -72px 0;+ cursor: default;+ }+ .icheckbox_square-red.checked.disabled {+ background-position: -96px 0;+ }++.iradio_square-red {+ background-position: -120px 0;+}+ .iradio_square-red.hover {+ background-position: -144px 0;+ }+ .iradio_square-red.checked {+ background-position: -168px 0;+ }+ .iradio_square-red.disabled {+ background-position: -192px 0;+ cursor: default;+ }+ .iradio_square-red.checked.disabled {+ background-position: -216px 0;+ }++/* HiDPI support */+@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) {+ .icheckbox_square-red,+ .iradio_square-red {+ background-image: url([email protected]);+ -webkit-background-size: 240px 24px;+ background-size: 240px 24px;+ }+}\ No newline at end of filediff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/square/red.png b/web/ext/ui/iCheck-1.0.2-patch/skins/square/red.pngnew file mode 100644index 000000000..749675a97Binary files /dev/null and b/web/ext/ui/iCheck-1.0.2-patch/skins/square/red.png differdiff --git a/web/ext/ui/iCheck-1.0.2-patch/skins/square/[email protected] b/web/ext/ui/iCheck-1.0.2-patch/skins/square/[email protected]new file mode 100644index 000000000..c05700a57Binary files /dev/null and b/web/ext/ui/iCheck-1.0.2-patch/skins/square/[email protected] differdiff --git a/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.css b/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.cssnew file mode 100644index 000000000..a051caed0--- /dev/null+++ b/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.css@@ -0,0 +1,120 @@+/*+ * CSS Styles that are needed by jScrollPane for it to operate correctly.+ *+ * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane+ * may not operate correctly without them.+ */++.jspContainer+{+ overflow: hidden;+ position: relative;+}++.jspPane+{+ position: absolute;+}++.jspVerticalBar+{+ position: absolute;+ top: 0;+ right: 0;+ width: 16px;+ height: 100%;+ background: red;+}++.jspHorizontalBar+{+ position: absolute;+ bottom: 0;+ left: 0;+ width: 100%;+ height: 16px;+ background: red;+}++.jspVerticalBar *,+.jspHorizontalBar *+{+ margin: 0;+ padding: 0;+}++.jspCap+{+ display: none;+}++.jspHorizontalBar .jspCap+{+ float: left;+}++.jspTrack+{+ background: #dde;+ position: relative;+}++.jspDrag+{+ background: #bbd;+ position: relative;+ top: 0;+ left: 0;+ cursor: pointer;+}++.jspHorizontalBar .jspTrack,+.jspHorizontalBar .jspDrag+{+ float: left;+ height: 100%;+}++.jspArrow+{+ background: #50506d;+ text-indent: -20000px;+ display: block;+ cursor: pointer;+}++.jspArrow.jspDisabled+{+ cursor: default;+ background: #80808d;+}++.jspVerticalBar .jspArrow+{+ height: 16px;+}++.jspHorizontalBar .jspArrow+{+ width: 16px;+ float: left;+ height: 100%;+}++.jspVerticalBar .jspArrow:focus+{+ outline: none;+}++.jspCorner+{+ background: #eeeef4;+ float: left;+ height: 100%;+}++/* Yuk! CSS Hack for IE6 3 pixel bug :( */+* html .jspCorner+{+ margin: 0 -3px 0 0;+}\ No newline at end of filediff --git a/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.js b/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.jsnew file mode 100644index 000000000..dcd36e8fd--- /dev/null+++ b/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.js@@ -0,0 +1,1474 @@+/*!+ * jScrollPane - v2.0.22 - 2015-04-25+ * http://jscrollpane.kelvinluck.com/+ *+ * Copyright (c) 2014 Kelvin Luck+ * Dual licensed under the MIT or GPL licenses.+ */++// Script: jScrollPane - cross browser customisable scrollbars+//+// *Version: 2.0.22, Last updated: 2015-04-25*+//+// Project Home - http://jscrollpane.kelvinluck.com/+// GitHub - http://github.com/vitch/jScrollPane+// Source - http://github.com/vitch/jScrollPane/raw/master/script/jquery.jscrollpane.js+// (Minified) - http://github.com/vitch/jScrollPane/raw/master/script/jquery.jscrollpane.min.js+//+// About: License+//+// Copyright (c) 2014 Kelvin Luck+// Dual licensed under the MIT or GPL Version 2 licenses.+// http://jscrollpane.kelvinluck.com/MIT-LICENSE.txt+// http://jscrollpane.kelvinluck.com/GPL-LICENSE.txt+//+// About: Examples+//+// All examples and demos are available through the jScrollPane example site at:+// http://jscrollpane.kelvinluck.com/+//+// About: Support and Testing+//+// This plugin is tested on the browsers below and has been found to work reliably on them. If you run+// into a problem on one of the supported browsers then please visit the support section on the jScrollPane+// website (http://jscrollpane.kelvinluck.com/) for more information on getting support. You are also+// welcome to fork the project on GitHub if you can contribute a fix for a given issue.+//+// jQuery Versions - tested in 1.4.2+ - reported to work in 1.3.x+// Browsers Tested - Firefox 3.6.8, Safari 5, Opera 10.6, Chrome 5.0, IE 6, 7, 8+//+// About: Release History+//+// 2.0.22 - (2015-04-25) Resolve a memory leak due to an event handler that isn't cleaned up in destroy (thanks @timjnh)+// 2.0.21 - (2015-02-24) Simplify UMD pattern: fixes browserify when loading jQuery outside of bundle+// 2.0.20 - (2014-10-23) Adds AMD support (thanks @carlosrberto) and support for overflow-x/overflow-y (thanks @darimpulso)+// 2.0.19 - (2013-11-16) Changes for more reliable scroll amount with latest mousewheel plugin (thanks @brandonaaron)+// 2.0.18 - (2013-10-23) Fix for issue with gutters and scrollToElement (thanks @Dubiy)+// 2.0.17 - (2013-08-17) Working correctly when box-sizing is set to border-box (thanks @pieht)+// 2.0.16 - (2013-07-30) Resetting left position when scroll is removed. Fixes #189+// 2.0.15 - (2013-07-29) Fixed issue with scrollToElement where the destX and destY are undefined.+// 2.0.14 - (2013-05-01) Updated to most recent mouse wheel plugin (see #106) and related changes for sensible scroll speed+// 2.0.13 - (2013-05-01) Switched to semver compatible version name+// 2.0.0beta12 - (2012-09-27) fix for jQuery 1.8++// 2.0.0beta11 - (2012-05-14)+// 2.0.0beta10 - (2011-04-17) cleaner required size calculation, improved keyboard support, stickToBottom/Left, other small fixes+// 2.0.0beta9 - (2011-01-31) new API methods, bug fixes and correct keyboard support for FF/OSX+// 2.0.0beta8 - (2011-01-29) touchscreen support, improved keyboard support+// 2.0.0beta7 - (2011-01-23) scroll speed consistent (thanks Aivo Paas)+// 2.0.0beta6 - (2010-12-07) scrollToElement horizontal support+// 2.0.0beta5 - (2010-10-18) jQuery 1.4.3 support, various bug fixes+// 2.0.0beta4 - (2010-09-17) clickOnTrack support, bug fixes+// 2.0.0beta3 - (2010-08-27) Horizontal mousewheel, mwheelIntent, keyboard support, bug fixes+// 2.0.0beta2 - (2010-08-21) Bug fixes+// 2.0.0beta1 - (2010-08-17) Rewrite to follow modern best practices and enable horizontal scrolling, initially hidden+// elements and dynamically sized elements.+// 1.x - (2006-12-31 - 2010-07-31) Initial version, hosted at googlecode, deprecated++(function (factory) {+ if ( typeof define === 'function' && define.amd ) {+ // AMD. Register as an anonymous module.+ define(['jquery'], factory);+ } else if (typeof exports === 'object') {+ // Node/CommonJS style for Browserify+ module.exports = factory(require('jquery'));+ } else {+ // Browser globals+ factory(jQuery);+ }+}(function($){++ $.fn.jScrollPane = function(settings)+ {+ // JScrollPane "class" - public methods are available through $('selector').data('jsp')+ function JScrollPane(elem, s)+ {+ var settings, jsp = this, pane, paneWidth, paneHeight, container, contentWidth, contentHeight,+ percentInViewH, percentInViewV, isScrollableV, isScrollableH, verticalDrag, dragMaxY,+ verticalDragPosition, horizontalDrag, dragMaxX, horizontalDragPosition,+ verticalBar, verticalTrack, scrollbarWidth, verticalTrackHeight, verticalDragHeight, arrowUp, arrowDown,+ horizontalBar, horizontalTrack, horizontalTrackWidth, horizontalDragWidth, arrowLeft, arrowRight,+ reinitialiseInterval, originalPadding, originalPaddingTotalWidth, previousContentWidth,+ wasAtTop = true, wasAtLeft = true, wasAtBottom = false, wasAtRight = false,+ originalElement = elem.clone(false, false).empty(),+ mwEvent = $.fn.mwheelIntent ? 'mwheelIntent.jsp' : 'mousewheel.jsp';++ if (elem.css('box-sizing') === 'border-box') {+ originalPadding = 0;+ originalPaddingTotalWidth = 0;+ } else {+ originalPadding = elem.css('paddingTop') + ' ' ++ elem.css('paddingRight') + ' ' ++ elem.css('paddingBottom') + ' ' ++ elem.css('paddingLeft');+ originalPaddingTotalWidth = (parseInt(elem.css('paddingLeft'), 10) || 0) ++ (parseInt(elem.css('paddingRight'), 10) || 0);+ }++ function initialise(s)+ {++ var /*firstChild, lastChild, */isMaintainingPositon, lastContentX, lastContentY,+ hasContainingSpaceChanged, originalScrollTop, originalScrollLeft,+ maintainAtBottom = false, maintainAtRight = false;++ settings = s;++ if (pane === undefined) {+ originalScrollTop = elem.scrollTop();+ originalScrollLeft = elem.scrollLeft();++ elem.css(+ {+ overflow: 'hidden',+ padding: 0+ }+ );+ // TODO: Deal with where width/ height is 0 as it probably means the element is hidden and we should+ // come back to it later and check once it is unhidden...+ paneWidth = elem.innerWidth() + originalPaddingTotalWidth;+ paneHeight = elem.innerHeight();++ elem.width(paneWidth);++ pane = $('<div class="jspPane" />').css('padding', originalPadding).append(elem.children());+ container = $('<div class="jspContainer" />')+ .css({+ 'width': paneWidth + 'px',+ 'height': paneHeight + 'px'+ }+ ).append(pane).appendTo(elem);++ /*+ // Move any margins from the first and last children up to the container so they can still+ // collapse with neighbouring elements as they would before jScrollPane+ firstChild = pane.find(':first-child');+ lastChild = pane.find(':last-child');+ elem.css(+ {+ 'margin-top': firstChild.css('margin-top'),+ 'margin-bottom': lastChild.css('margin-bottom')+ }+ );+ firstChild.css('margin-top', 0);+ lastChild.css('margin-bottom', 0);+ */+ } else {+ elem.css('width', '');++ maintainAtBottom = settings.stickToBottom && isCloseToBottom();+ maintainAtRight = settings.stickToRight && isCloseToRight();++ hasContainingSpaceChanged = elem.innerWidth() + originalPaddingTotalWidth != paneWidth || elem.outerHeight() != paneHeight;++ if (hasContainingSpaceChanged) {+ paneWidth = elem.innerWidth() + originalPaddingTotalWidth;+ paneHeight = elem.innerHeight();+ container.css({+ width: paneWidth + 'px',+ height: paneHeight + 'px'+ });+ }++ // If nothing changed since last check...+ if (!hasContainingSpaceChanged && previousContentWidth == contentWidth && pane.outerHeight() == contentHeight) {+ elem.width(paneWidth);+ return;+ }+ previousContentWidth = contentWidth;++ pane.css('width', '');+ elem.width(paneWidth);++ container.find('>.jspVerticalBar,>.jspHorizontalBar').remove().end();+ }++ pane.css('overflow', 'auto');+ if (s.contentWidth) {+ contentWidth = s.contentWidth;+ } else {+ contentWidth = pane[0].scrollWidth;+ }+ contentHeight = pane[0].scrollHeight;+ pane.css('overflow', '');++ percentInViewH = contentWidth / paneWidth;+ percentInViewV = contentHeight / paneHeight;+ isScrollableV = percentInViewV > 1;++ isScrollableH = percentInViewH > 1;++ //console.log(paneWidth, paneHeight, contentWidth, contentHeight, percentInViewH, percentInViewV, isScrollableH, isScrollableV);++ if (!(isScrollableH || isScrollableV)) {+ elem.removeClass('jspScrollable');+ pane.css({+ top: 0,+ left: 0,+ width: container.width() - originalPaddingTotalWidth+ });+ removeMousewheel();+ removeFocusHandler();+ removeKeyboardNav();+ removeClickOnTrack();+ } else {+ elem.addClass('jspScrollable');++ isMaintainingPositon = settings.maintainPosition && (verticalDragPosition || horizontalDragPosition);+ if (isMaintainingPositon) {+ lastContentX = contentPositionX();+ lastContentY = contentPositionY();+ }++ initialiseVerticalScroll();+ initialiseHorizontalScroll();+ resizeScrollbars();++ if (isMaintainingPositon) {+ scrollToX(maintainAtRight ? (contentWidth - paneWidth ) : lastContentX, false);+ scrollToY(maintainAtBottom ? (contentHeight - paneHeight) : lastContentY, false);+ }++ initFocusHandler();+ initMousewheel();+ initTouch();++ if (settings.enableKeyboardNavigation) {+ initKeyboardNav();+ }+ if (settings.clickOnTrack) {+ initClickOnTrack();+ }++ observeHash();+ if (settings.hijackInternalLinks) {+ hijackInternalLinks();+ }+ }++ if (settings.autoReinitialise && !reinitialiseInterval) {+ reinitialiseInterval = setInterval(+ function()+ {+ initialise(settings);+ },+ settings.autoReinitialiseDelay+ );+ } else if (!settings.autoReinitialise && reinitialiseInterval) {+ clearInterval(reinitialiseInterval);+ }++ originalScrollTop && elem.scrollTop(0) && scrollToY(originalScrollTop, false);+ originalScrollLeft && elem.scrollLeft(0) && scrollToX(originalScrollLeft, false);++ elem.trigger('jsp-initialised', [isScrollableH || isScrollableV]);+ }++ function initialiseVerticalScroll()+ {+ if (isScrollableV) {++ container.append(+ $('<div class="jspVerticalBar" />').append(+ $('<div class="jspCap jspCapTop" />'),+ $('<div class="jspTrack" />').append(+ $('<div class="jspDrag" />').append(+ $('<div class="jspDragTop" />'),+ $('<div class="jspDragBottom" />')+ )+ ),+ $('<div class="jspCap jspCapBottom" />')+ )+ );++ verticalBar = container.find('>.jspVerticalBar');+ verticalTrack = verticalBar.find('>.jspTrack');+ verticalDrag = verticalTrack.find('>.jspDrag');++ if (settings.showArrows) {+ arrowUp = $('<a class="jspArrow jspArrowUp" />').bind(+ 'mousedown.jsp', getArrowScroll(0, -1)+ ).bind('click.jsp', nil);+ arrowDown = $('<a class="jspArrow jspArrowDown" />').bind(+ 'mousedown.jsp', getArrowScroll(0, 1)+ ).bind('click.jsp', nil);+ if (settings.arrowScrollOnHover) {+ arrowUp.bind('mouseover.jsp', getArrowScroll(0, -1, arrowUp));+ arrowDown.bind('mouseover.jsp', getArrowScroll(0, 1, arrowDown));+ }++ appendArrows(verticalTrack, settings.verticalArrowPositions, arrowUp, arrowDown);+ }++ verticalTrackHeight = paneHeight;+ container.find('>.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow').each(+ function()+ {+ verticalTrackHeight -= $(this).outerHeight();+ }+ );+++ verticalDrag.hover(+ function()+ {+ verticalDrag.addClass('jspHover');+ },+ function()+ {+ verticalDrag.removeClass('jspHover');+ }+ ).bind(+ 'mousedown.jsp',+ function(e)+ {+ // Stop IE from allowing text selection+ $('html').bind('dragstart.jsp selectstart.jsp', nil);++ verticalDrag.addClass('jspActive');++ var startY = e.pageY - verticalDrag.position().top;++ $('html').bind(+ 'mousemove.jsp',+ function(e)+ {+ positionDragY(e.pageY - startY, false);+ }+ ).bind('mouseup.jsp mouseleave.jsp', cancelDrag);+ return false;+ }+ );+ sizeVerticalScrollbar();+ }+ }++ function sizeVerticalScrollbar()+ {+ verticalTrack.height(verticalTrackHeight + 'px');+ verticalDragPosition = 0;+ scrollbarWidth = settings.verticalGutter + verticalTrack.outerWidth();++ // Make the pane thinner to allow for the vertical scrollbar+ pane.width(paneWidth - scrollbarWidth - originalPaddingTotalWidth);++ // Add margin to the left of the pane if scrollbars are on that side (to position+ // the scrollbar on the left or right set it's left or right property in CSS)+ try {+ if (verticalBar.position().left === 0) {+ pane.css('margin-left', scrollbarWidth + 'px');+ }+ } catch (err) {+ }+ }++ function initialiseHorizontalScroll()+ {+ if (isScrollableH) {++ container.append(+ $('<div class="jspHorizontalBar" />').append(+ $('<div class="jspCap jspCapLeft" />'),+ $('<div class="jspTrack" />').append(+ $('<div class="jspDrag" />').append(+ $('<div class="jspDragLeft" />'),+ $('<div class="jspDragRight" />')+ )+ ),+ $('<div class="jspCap jspCapRight" />')+ )+ );++ horizontalBar = container.find('>.jspHorizontalBar');+ horizontalTrack = horizontalBar.find('>.jspTrack');+ horizontalDrag = horizontalTrack.find('>.jspDrag');++ if (settings.showArrows) {+ arrowLeft = $('<a class="jspArrow jspArrowLeft" />').bind(+ 'mousedown.jsp', getArrowScroll(-1, 0)+ ).bind('click.jsp', nil);+ arrowRight = $('<a class="jspArrow jspArrowRight" />').bind(+ 'mousedown.jsp', getArrowScroll(1, 0)+ ).bind('click.jsp', nil);+ if (settings.arrowScrollOnHover) {+ arrowLeft.bind('mouseover.jsp', getArrowScroll(-1, 0, arrowLeft));+ arrowRight.bind('mouseover.jsp', getArrowScroll(1, 0, arrowRight));+ }+ appendArrows(horizontalTrack, settings.horizontalArrowPositions, arrowLeft, arrowRight);+ }++ horizontalDrag.hover(+ function()+ {+ horizontalDrag.addClass('jspHover');+ },+ function()+ {+ horizontalDrag.removeClass('jspHover');+ }+ ).bind(+ 'mousedown.jsp',+ function(e)+ {+ // Stop IE from allowing text selection+ $('html').bind('dragstart.jsp selectstart.jsp', nil);++ horizontalDrag.addClass('jspActive');++ var startX = e.pageX - horizontalDrag.position().left;++ $('html').bind(+ 'mousemove.jsp',+ function(e)+ {+ positionDragX(e.pageX - startX, false);+ }+ ).bind('mouseup.jsp mouseleave.jsp', cancelDrag);+ return false;+ }+ );+ horizontalTrackWidth = container.innerWidth();+ sizeHorizontalScrollbar();+ }+ }++ function sizeHorizontalScrollbar()+ {+ container.find('>.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow').each(+ function()+ {+ horizontalTrackWidth -= $(this).outerWidth();+ }+ );++ horizontalTrack.width(horizontalTrackWidth + 'px');+ horizontalDragPosition = 0;+ }++ function resizeScrollbars()+ {+ if (isScrollableH && isScrollableV) {+ var horizontalTrackHeight = horizontalTrack.outerHeight(),+ verticalTrackWidth = verticalTrack.outerWidth();+ verticalTrackHeight -= horizontalTrackHeight;+ $(horizontalBar).find('>.jspCap:visible,>.jspArrow').each(+ function()+ {+ horizontalTrackWidth += $(this).outerWidth();+ }+ );+ horizontalTrackWidth -= verticalTrackWidth;+ paneHeight -= verticalTrackWidth;+ paneWidth -= horizontalTrackHeight;+ horizontalTrack.parent().append(+ $('<div class="jspCorner" />').css('width', horizontalTrackHeight + 'px')+ );+ sizeVerticalScrollbar();+ sizeHorizontalScrollbar();+ }+ // reflow content+ if (isScrollableH) {+ pane.width((container.outerWidth() - originalPaddingTotalWidth) + 'px');+ }+ contentHeight = pane.outerHeight();+ percentInViewV = contentHeight / paneHeight;++ if (isScrollableH) {+ horizontalDragWidth = Math.ceil(1 / percentInViewH * horizontalTrackWidth);+ if (horizontalDragWidth > settings.horizontalDragMaxWidth) {+ horizontalDragWidth = settings.horizontalDragMaxWidth;+ } else if (horizontalDragWidth < settings.horizontalDragMinWidth) {+ horizontalDragWidth = settings.horizontalDragMinWidth;+ }+ horizontalDrag.width(horizontalDragWidth + 'px');+ dragMaxX = horizontalTrackWidth - horizontalDragWidth;+ _positionDragX(horizontalDragPosition); // To update the state for the arrow buttons+ }+ if (isScrollableV) {+ verticalDragHeight = Math.ceil(1 / percentInViewV * verticalTrackHeight);+ if (verticalDragHeight > settings.verticalDragMaxHeight) {+ verticalDragHeight = settings.verticalDragMaxHeight;+ } else if (verticalDragHeight < settings.verticalDragMinHeight) {+ verticalDragHeight = settings.verticalDragMinHeight;+ }+ verticalDrag.height(verticalDragHeight + 'px');+ dragMaxY = verticalTrackHeight - verticalDragHeight;+ _positionDragY(verticalDragPosition); // To update the state for the arrow buttons+ }+ }++ function appendArrows(ele, p, a1, a2)+ {+ var p1 = "before", p2 = "after", aTemp;++ // Sniff for mac... Is there a better way to determine whether the arrows would naturally appear+ // at the top or the bottom of the bar?+ if (p == "os") {+ p = /Mac/.test(navigator.platform) ? "after" : "split";+ }+ if (p == p1) {+ p2 = p;+ } else if (p == p2) {+ p1 = p;+ aTemp = a1;+ a1 = a2;+ a2 = aTemp;+ }++ ele[p1](a1)[p2](a2);+ }++ function getArrowScroll(dirX, dirY, ele)+ {+ return function()+ {+ arrowScroll(dirX, dirY, this, ele);+ this.blur();+ return false;+ };+ }++ function arrowScroll(dirX, dirY, arrow, ele)+ {+ arrow = $(arrow).addClass('jspActive');++ var eve,+ scrollTimeout,+ isFirst = true,+ doScroll = function()+ {+ if (dirX !== 0) {+ jsp.scrollByX(dirX * settings.arrowButtonSpeed);+ }+ if (dirY !== 0) {+ jsp.scrollByY(dirY * settings.arrowButtonSpeed);+ }+ scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.arrowRepeatFreq);+ isFirst = false;+ };++ doScroll();++ eve = ele ? 'mouseout.jsp' : 'mouseup.jsp';+ ele = ele || $('html');+ ele.bind(+ eve,+ function()+ {+ arrow.removeClass('jspActive');+ scrollTimeout && clearTimeout(scrollTimeout);+ scrollTimeout = null;+ ele.unbind(eve);+ }+ );+ }++ function initClickOnTrack()+ {+ removeClickOnTrack();+ if (isScrollableV) {+ verticalTrack.bind(+ 'mousedown.jsp',+ function(e)+ {+ if (e.originalTarget === undefined || e.originalTarget == e.currentTarget) {+ var clickedTrack = $(this),+ offset = clickedTrack.offset(),+ direction = e.pageY - offset.top - verticalDragPosition,+ scrollTimeout,+ isFirst = true,+ doScroll = function()+ {+ var offset = clickedTrack.offset(),+ pos = e.pageY - offset.top - verticalDragHeight / 2,+ contentDragY = paneHeight * settings.scrollPagePercent,+ dragY = dragMaxY * contentDragY / (contentHeight - paneHeight);+ if (direction < 0) {+ if (verticalDragPosition - dragY > pos) {+ jsp.scrollByY(-contentDragY);+ } else {+ positionDragY(pos);+ }+ } else if (direction > 0) {+ if (verticalDragPosition + dragY < pos) {+ jsp.scrollByY(contentDragY);+ } else {+ positionDragY(pos);+ }+ } else {+ cancelClick();+ return;+ }+ scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.trackClickRepeatFreq);+ isFirst = false;+ },+ cancelClick = function()+ {+ scrollTimeout && clearTimeout(scrollTimeout);+ scrollTimeout = null;+ $(document).unbind('mouseup.jsp', cancelClick);+ };+ doScroll();+ $(document).bind('mouseup.jsp', cancelClick);+ return false;+ }+ }+ );+ }++ if (isScrollableH) {+ horizontalTrack.bind(+ 'mousedown.jsp',+ function(e)+ {+ if (e.originalTarget === undefined || e.originalTarget == e.currentTarget) {+ var clickedTrack = $(this),+ offset = clickedTrack.offset(),+ direction = e.pageX - offset.left - horizontalDragPosition,+ scrollTimeout,+ isFirst = true,+ doScroll = function()+ {+ var offset = clickedTrack.offset(),+ pos = e.pageX - offset.left - horizontalDragWidth / 2,+ contentDragX = paneWidth * settings.scrollPagePercent,+ dragX = dragMaxX * contentDragX / (contentWidth - paneWidth);+ if (direction < 0) {+ if (horizontalDragPosition - dragX > pos) {+ jsp.scrollByX(-contentDragX);+ } else {+ positionDragX(pos);+ }+ } else if (direction > 0) {+ if (horizontalDragPosition + dragX < pos) {+ jsp.scrollByX(contentDragX);+ } else {+ positionDragX(pos);+ }+ } else {+ cancelClick();+ return;+ }+ scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.trackClickRepeatFreq);+ isFirst = false;+ },+ cancelClick = function()+ {+ scrollTimeout && clearTimeout(scrollTimeout);+ scrollTimeout = null;+ $(document).unbind('mouseup.jsp', cancelClick);+ };+ doScroll();+ $(document).bind('mouseup.jsp', cancelClick);+ return false;+ }+ }+ );+ }+ }++ function removeClickOnTrack()+ {+ if (horizontalTrack) {+ horizontalTrack.unbind('mousedown.jsp');+ }+ if (verticalTrack) {+ verticalTrack.unbind('mousedown.jsp');+ }+ }++ function cancelDrag()+ {+ $('html').unbind('dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp');++ if (verticalDrag) {+ verticalDrag.removeClass('jspActive');+ }+ if (horizontalDrag) {+ horizontalDrag.removeClass('jspActive');+ }+ }++ function positionDragY(destY, animate)+ {+ if (!isScrollableV) {+ return;+ }+ if (destY < 0) {+ destY = 0;+ } else if (destY > dragMaxY) {+ destY = dragMaxY;+ }++ // can't just check if(animate) because false is a valid value that could be passed in...+ if (animate === undefined) {+ animate = settings.animateScroll;+ }+ if (animate) {+ jsp.animate(verticalDrag, 'top', destY, _positionDragY);+ } else {+ verticalDrag.css('top', destY);+ _positionDragY(destY);+ }++ }++ function _positionDragY(destY)+ {+ if (destY === undefined) {+ destY = verticalDrag.position().top;+ }++ container.scrollTop(0);+ verticalDragPosition = destY || 0;++ var isAtTop = verticalDragPosition === 0,+ isAtBottom = verticalDragPosition == dragMaxY,+ percentScrolled = destY/ dragMaxY,+ destTop = -percentScrolled * (contentHeight - paneHeight);++ if (wasAtTop != isAtTop || wasAtBottom != isAtBottom) {+ wasAtTop = isAtTop;+ wasAtBottom = isAtBottom;+ elem.trigger('jsp-arrow-change', [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]);+ }++ updateVerticalArrows(isAtTop, isAtBottom);+ pane.css('top', destTop);+ elem.trigger('jsp-scroll-y', [-destTop, isAtTop, isAtBottom]).trigger('scroll');+ }++ function positionDragX(destX, animate)+ {+ if (!isScrollableH) {+ return;+ }+ if (destX < 0) {+ destX = 0;+ } else if (destX > dragMaxX) {+ destX = dragMaxX;+ }++ if (animate === undefined) {+ animate = settings.animateScroll;+ }+ if (animate) {+ jsp.animate(horizontalDrag, 'left', destX, _positionDragX);+ } else {+ horizontalDrag.css('left', destX);+ _positionDragX(destX);+ }+ }++ function _positionDragX(destX)+ {+ if (destX === undefined) {+ destX = horizontalDrag.position().left;+ }++ container.scrollTop(0);+ horizontalDragPosition = destX ||0;++ var isAtLeft = horizontalDragPosition === 0,+ isAtRight = horizontalDragPosition == dragMaxX,+ percentScrolled = destX / dragMaxX,+ destLeft = -percentScrolled * (contentWidth - paneWidth);++ if (wasAtLeft != isAtLeft || wasAtRight != isAtRight) {+ wasAtLeft = isAtLeft;+ wasAtRight = isAtRight;+ elem.trigger('jsp-arrow-change', [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]);+ }++ updateHorizontalArrows(isAtLeft, isAtRight);+ pane.css('left', destLeft);+ elem.trigger('jsp-scroll-x', [-destLeft, isAtLeft, isAtRight]).trigger('scroll');+ }++ function updateVerticalArrows(isAtTop, isAtBottom)+ {+ if (settings.showArrows) {+ arrowUp[isAtTop ? 'addClass' : 'removeClass']('jspDisabled');+ arrowDown[isAtBottom ? 'addClass' : 'removeClass']('jspDisabled');+ }+ }++ function updateHorizontalArrows(isAtLeft, isAtRight)+ {+ if (settings.showArrows) {+ arrowLeft[isAtLeft ? 'addClass' : 'removeClass']('jspDisabled');+ arrowRight[isAtRight ? 'addClass' : 'removeClass']('jspDisabled');+ }+ }++ function scrollToY(destY, animate)+ {+ var percentScrolled = destY / (contentHeight - paneHeight);+ positionDragY(percentScrolled * dragMaxY, animate);+ }++ function scrollToX(destX, animate)+ {+ var percentScrolled = destX / (contentWidth - paneWidth);+ positionDragX(percentScrolled * dragMaxX, animate);+ }++ function scrollToElement(ele, stickToTop, animate)+ {+ var e, eleHeight, eleWidth, eleTop = 0, eleLeft = 0, viewportTop, viewportLeft, maxVisibleEleTop, maxVisibleEleLeft, destY, destX;++ // Legal hash values aren't necessarily legal jQuery selectors so we need to catch any+ // errors from the lookup...+ try {+ e = $(ele);+ } catch (err) {+ return;+ }+ eleHeight = e.outerHeight();+ eleWidth= e.outerWidth();++ container.scrollTop(0);+ container.scrollLeft(0);++ // loop through parents adding the offset top of any elements that are relatively positioned between+ // the focused element and the jspPane so we can get the true distance from the top+ // of the focused element to the top of the scrollpane...+ while (!e.is('.jspPane')) {+ eleTop += e.position().top;+ eleLeft += e.position().left;+ e = e.offsetParent();+ if (/^body|html$/i.test(e[0].nodeName)) {+ // we ended up too high in the document structure. Quit!+ return;+ }+ }++ viewportTop = contentPositionY();+ maxVisibleEleTop = viewportTop + paneHeight;+ if (eleTop < viewportTop || stickToTop) { // element is above viewport+ destY = eleTop - settings.horizontalGutter;+ } else if (eleTop + eleHeight > maxVisibleEleTop) { // element is below viewport+ destY = eleTop - paneHeight + eleHeight + settings.horizontalGutter;+ }+ if (!isNaN(destY)) {+ scrollToY(destY, animate);+ }++ viewportLeft = contentPositionX();+ maxVisibleEleLeft = viewportLeft + paneWidth;+ if (eleLeft < viewportLeft || stickToTop) { // element is to the left of viewport+ destX = eleLeft - settings.horizontalGutter;+ } else if (eleLeft + eleWidth > maxVisibleEleLeft) { // element is to the right viewport+ destX = eleLeft - paneWidth + eleWidth + settings.horizontalGutter;+ }+ if (!isNaN(destX)) {+ scrollToX(destX, animate);+ }++ }++ function contentPositionX()+ {+ return -pane.position().left;+ }++ function contentPositionY()+ {+ return -pane.position().top;+ }++ function isCloseToBottom()+ {+ var scrollableHeight = contentHeight - paneHeight;+ return (scrollableHeight > 20) && (scrollableHeight - contentPositionY() < 10);+ }++ function isCloseToRight()+ {+ var scrollableWidth = contentWidth - paneWidth;+ return (scrollableWidth > 20) && (scrollableWidth - contentPositionX() < 10);+ }++ function initMousewheel()+ {+ container.unbind(mwEvent).bind(+ mwEvent,+ function (event, delta, deltaX, deltaY) {++ if (!horizontalDragPosition) horizontalDragPosition = 0;+ if (!verticalDragPosition) verticalDragPosition = 0;++ var dX = horizontalDragPosition, dY = verticalDragPosition, factor = event.deltaFactor || settings.mouseWheelSpeed;+ jsp.scrollBy(deltaX * factor, -deltaY * factor, false);+ // return true if there was no movement so rest of screen can scroll+ return dX == horizontalDragPosition && dY == verticalDragPosition;+ }+ );+ }++ function removeMousewheel()+ {+ container.unbind(mwEvent);+ }++ function nil()+ {+ return false;+ }++ function initFocusHandler()+ {+ pane.find(':input,a').unbind('focus.jsp').bind(+ 'focus.jsp',+ function(e)+ {+ scrollToElement(e.target, false);+ }+ );+ }++ function removeFocusHandler()+ {+ pane.find(':input,a').unbind('focus.jsp');+ }++ function initKeyboardNav()+ {+ var keyDown, elementHasScrolled, validParents = [];+ isScrollableH && validParents.push(horizontalBar[0]);+ isScrollableV && validParents.push(verticalBar[0]);++ // IE also focuses elements that don't have tabindex set.+ pane.bind(+ 'focus.jsp',+ function()+ {+ elem.focus();+ }+ );++ elem.attr('tabindex', 0)+ .unbind('keydown.jsp keypress.jsp')+ .bind(+ 'keydown.jsp',+ function(e)+ {+ if (e.target !== this && !(validParents.length && $(e.target).closest(validParents).length)){+ return;+ }+ var dX = horizontalDragPosition, dY = verticalDragPosition;+ switch(e.keyCode) {+ case 40: // down+ case 38: // up+ case 34: // page down+ case 32: // space+ case 33: // page up+ case 39: // right+ case 37: // left+ keyDown = e.keyCode;+ keyDownHandler();+ break;+ case 35: // end+ scrollToY(contentHeight - paneHeight);+ keyDown = null;+ break;+ case 36: // home+ scrollToY(0);+ keyDown = null;+ break;+ }++ elementHasScrolled = e.keyCode == keyDown && dX != horizontalDragPosition || dY != verticalDragPosition;+ return !elementHasScrolled;+ }+ ).bind(+ 'keypress.jsp', // For FF/ OSX so that we can cancel the repeat key presses if the JSP scrolls...+ function(e)+ {+ if (e.keyCode == keyDown) {+ keyDownHandler();+ }+ // If the keypress is not related to the area, ignore it. Fixes problem with inputs inside scrolled area. Copied from line 955.+ if (e.target !== this && !(validParents.length && $(e.target).closest(validParents).length)){+ return;+ }+ return !elementHasScrolled;+ }+ );++ if (settings.hideFocus) {+ elem.css('outline', 'none');+ if ('hideFocus' in container[0]){+ elem.attr('hideFocus', true);+ }+ } else {+ elem.css('outline', '');+ if ('hideFocus' in container[0]){+ elem.attr('hideFocus', false);+ }+ }++ function keyDownHandler()+ {+ var dX = horizontalDragPosition, dY = verticalDragPosition;+ switch(keyDown) {+ case 40: // down+ jsp.scrollByY(settings.keyboardSpeed, false);+ break;+ case 38: // up+ jsp.scrollByY(-settings.keyboardSpeed, false);+ break;+ case 34: // page down+ case 32: // space+ jsp.scrollByY(paneHeight * settings.scrollPagePercent, false);+ break;+ case 33: // page up+ jsp.scrollByY(-paneHeight * settings.scrollPagePercent, false);+ break;+ case 39: // right+ jsp.scrollByX(settings.keyboardSpeed, false);+ break;+ case 37: // left+ jsp.scrollByX(-settings.keyboardSpeed, false);+ break;+ }++ elementHasScrolled = dX != horizontalDragPosition || dY != verticalDragPosition;+ return elementHasScrolled;+ }+ }++ function removeKeyboardNav()+ {+ elem.attr('tabindex', '-1')+ .removeAttr('tabindex')+ .unbind('keydown.jsp keypress.jsp');++ pane.unbind('.jsp');+ }++ function observeHash()+ {+ if (location.hash && location.hash.length > 1) {+ var e,+ retryInt,+ hash = escape(location.hash.substr(1)) // hash must be escaped to prevent XSS+ ;+ try {+ e = $('#' + hash + ', a[name="' + hash + '"]');+ } catch (err) {+ return;+ }++ if (e.length && pane.find(hash)) {+ // nasty workaround but it appears to take a little while before the hash has done its thing+ // to the rendered page so we just wait until the container's scrollTop has been messed up.+ if (container.scrollTop() === 0) {+ retryInt = setInterval(+ function()+ {+ if (container.scrollTop() > 0) {+ scrollToElement(e, true);+ $(document).scrollTop(container.position().top);+ clearInterval(retryInt);+ }+ },+ 50+ );+ } else {+ scrollToElement(e, true);+ $(document).scrollTop(container.position().top);+ }+ }+ }+ }++ function hijackInternalLinks()+ {+ // only register the link handler once+ if ($(document.body).data('jspHijack')) {+ return;+ }++ // remember that the handler was bound+ $(document.body).data('jspHijack', true);++ // use live handler to also capture newly created links+ $(document.body).delegate('a[href*=#]', 'click', function(event) {+ // does the link point to the same page?+ // this also takes care of cases with a <base>-Tag or Links not starting with the hash #+ // e.g. <a href="index.html#test"> when the current url already is index.html+ var href = this.href.substr(0, this.href.indexOf('#')),+ locationHref = location.href,+ hash,+ element,+ container,+ jsp,+ scrollTop,+ elementTop;+ if (location.href.indexOf('#') !== -1) {+ locationHref = location.href.substr(0, location.href.indexOf('#'));+ }+ if (href !== locationHref) {+ // the link points to another page+ return;+ }++ // check if jScrollPane should handle this click event+ hash = escape(this.href.substr(this.href.indexOf('#') + 1));++ // find the element on the page+ element;+ try {+ element = $('#' + hash + ', a[name="' + hash + '"]');+ } catch (e) {+ // hash is not a valid jQuery identifier+ return;+ }++ if (!element.length) {+ // this link does not point to an element on this page+ return;+ }++ container = element.closest('.jspScrollable');+ jsp = container.data('jsp');++ // jsp might be another jsp instance than the one, that bound this event+ // remember: this event is only bound once for all instances.+ jsp.scrollToElement(element, true);++ if (container[0].scrollIntoView) {+ // also scroll to the top of the container (if it is not visible)+ scrollTop = $(window).scrollTop();+ elementTop = element.offset().top;+ if (elementTop < scrollTop || elementTop > scrollTop + $(window).height()) {+ container[0].scrollIntoView();+ }+ }++ // jsp handled this event, prevent the browser default (scrolling :P)+ event.preventDefault();+ });+ }++ // Init touch on iPad, iPhone, iPod, Android+ function initTouch()+ {+ var startX,+ startY,+ touchStartX,+ touchStartY,+ moved,+ moving = false;++ container.unbind('touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick').bind(+ 'touchstart.jsp',+ function(e)+ {+ var touch = e.originalEvent.touches[0];+ startX = contentPositionX();+ startY = contentPositionY();+ touchStartX = touch.pageX;+ touchStartY = touch.pageY;+ moved = false;+ moving = true;+ }+ ).bind(+ 'touchmove.jsp',+ function(ev)+ {+ if(!moving) {+ return;+ }++ var touchPos = ev.originalEvent.touches[0],+ dX = horizontalDragPosition, dY = verticalDragPosition;++ jsp.scrollTo(startX + touchStartX - touchPos.pageX, startY + touchStartY - touchPos.pageY);++ moved = moved || Math.abs(touchStartX - touchPos.pageX) > 5 || Math.abs(touchStartY - touchPos.pageY) > 5;++ // return true if there was no movement so rest of screen can scroll+ return dX == horizontalDragPosition && dY == verticalDragPosition;+ }+ ).bind(+ 'touchend.jsp',+ function(e)+ {+ moving = false;+ /*if(moved) {+ return false;+ }*/+ }+ ).bind(+ 'click.jsp-touchclick',+ function(e)+ {+ if(moved) {+ moved = false;+ return false;+ }+ }+ );+ }++ function destroy(){+ var currentY = contentPositionY(),+ currentX = contentPositionX();+ elem.removeClass('jspScrollable').unbind('.jsp');+ pane.unbind('.jsp');+ elem.replaceWith(originalElement.append(pane.children()));+ originalElement.scrollTop(currentY);+ originalElement.scrollLeft(currentX);++ // clear reinitialize timer if active+ if (reinitialiseInterval) {+ clearInterval(reinitialiseInterval);+ }+ }++ // Public API+ $.extend(+ jsp,+ {+ // Reinitialises the scroll pane (if it's internal dimensions have changed since the last time it+ // was initialised). The settings object which is passed in will override any settings from the+ // previous time it was initialised - if you don't pass any settings then the ones from the previous+ // initialisation will be used.+ reinitialise: function(s)+ {+ s = $.extend({}, settings, s);+ initialise(s);+ },+ // Scrolls the specified element (a jQuery object, DOM node or jQuery selector string) into view so+ // that it can be seen within the viewport. If stickToTop is true then the element will appear at+ // the top of the viewport, if it is false then the viewport will scroll as little as possible to+ // show the element. You can also specify if you want animation to occur. If you don't provide this+ // argument then the animateScroll value from the settings object is used instead.+ scrollToElement: function(ele, stickToTop, animate)+ {+ scrollToElement(ele, stickToTop, animate);+ },+ // Scrolls the pane so that the specified co-ordinates within the content are at the top left+ // of the viewport. animate is optional and if not passed then the value of animateScroll from+ // the settings object this jScrollPane was initialised with is used.+ scrollTo: function(destX, destY, animate)+ {+ scrollToX(destX, animate);+ scrollToY(destY, animate);+ },+ // Scrolls the pane so that the specified co-ordinate within the content is at the left of the+ // viewport. animate is optional and if not passed then the value of animateScroll from the settings+ // object this jScrollPane was initialised with is used.+ scrollToX: function(destX, animate)+ {+ scrollToX(destX, animate);+ },+ // Scrolls the pane so that the specified co-ordinate within the content is at the top of the+ // viewport. animate is optional and if not passed then the value of animateScroll from the settings+ // object this jScrollPane was initialised with is used.+ scrollToY: function(destY, animate)+ {+ scrollToY(destY, animate);+ },+ // Scrolls the pane to the specified percentage of its maximum horizontal scroll position. animate+ // is optional and if not passed then the value of animateScroll from the settings object this+ // jScrollPane was initialised with is used.+ scrollToPercentX: function(destPercentX, animate)+ {+ scrollToX(destPercentX * (contentWidth - paneWidth), animate);+ },+ // Scrolls the pane to the specified percentage of its maximum vertical scroll position. animate+ // is optional and if not passed then the value of animateScroll from the settings object this+ // jScrollPane was initialised with is used.+ scrollToPercentY: function(destPercentY, animate)+ {+ scrollToY(destPercentY * (contentHeight - paneHeight), animate);+ },+ // Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then+ // the value of animateScroll from the settings object this jScrollPane was initialised with is used.+ scrollBy: function(deltaX, deltaY, animate)+ {+ jsp.scrollByX(deltaX, animate);+ jsp.scrollByY(deltaY, animate);+ },+ // Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then+ // the value of animateScroll from the settings object this jScrollPane was initialised with is used.+ scrollByX: function(deltaX, animate)+ {+ var destX = contentPositionX() + Math[deltaX<0 ? 'floor' : 'ceil'](deltaX),+ percentScrolled = destX / (contentWidth - paneWidth);+ positionDragX(percentScrolled * dragMaxX, animate);+ },+ // Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then+ // the value of animateScroll from the settings object this jScrollPane was initialised with is used.+ scrollByY: function(deltaY, animate)+ {+ var destY = contentPositionY() + Math[deltaY<0 ? 'floor' : 'ceil'](deltaY),+ percentScrolled = destY / (contentHeight - paneHeight);+ positionDragY(percentScrolled * dragMaxY, animate);+ },+ // Positions the horizontal drag at the specified x position (and updates the viewport to reflect+ // this). animate is optional and if not passed then the value of animateScroll from the settings+ // object this jScrollPane was initialised with is used.+ positionDragX: function(x, animate)+ {+ positionDragX(x, animate);+ },+ // Positions the vertical drag at the specified y position (and updates the viewport to reflect+ // this). animate is optional and if not passed then the value of animateScroll from the settings+ // object this jScrollPane was initialised with is used.+ positionDragY: function(y, animate)+ {+ positionDragY(y, animate);+ },+ // This method is called when jScrollPane is trying to animate to a new position. You can override+ // it if you want to provide advanced animation functionality. It is passed the following arguments:+ // * ele - the element whose position is being animated+ // * prop - the property that is being animated+ // * value - the value it's being animated to+ // * stepCallback - a function that you must execute each time you update the value of the property+ // You can use the default implementation (below) as a starting point for your own implementation.+ animate: function(ele, prop, value, stepCallback)+ {+ var params = {};+ params[prop] = value;+ ele.animate(+ params,+ {+ 'duration' : settings.animateDuration,+ 'easing' : settings.animateEase,+ 'queue' : false,+ 'step' : stepCallback+ }+ );+ },+ // Returns the current x position of the viewport with regards to the content pane.+ getContentPositionX: function()+ {+ return contentPositionX();+ },+ // Returns the current y position of the viewport with regards to the content pane.+ getContentPositionY: function()+ {+ return contentPositionY();+ },+ // Returns the width of the content within the scroll pane.+ getContentWidth: function()+ {+ return contentWidth;+ },+ // Returns the height of the content within the scroll pane.+ getContentHeight: function()+ {+ return contentHeight;+ },+ // Returns the horizontal position of the viewport within the pane content.+ getPercentScrolledX: function()+ {+ return contentPositionX() / (contentWidth - paneWidth);+ },+ // Returns the vertical position of the viewport within the pane content.+ getPercentScrolledY: function()+ {+ return contentPositionY() / (contentHeight - paneHeight);+ },+ // Returns whether or not this scrollpane has a horizontal scrollbar.+ getIsScrollableH: function()+ {+ return isScrollableH;+ },+ // Returns whether or not this scrollpane has a vertical scrollbar.+ getIsScrollableV: function()+ {+ return isScrollableV;+ },+ // Gets a reference to the content pane. It is important that you use this method if you want to+ // edit the content of your jScrollPane as if you access the element directly then you may have some+ // problems (as your original element has had additional elements for the scrollbars etc added into+ // it).+ getContentPane: function()+ {+ return pane;+ },+ // Scrolls this jScrollPane down as far as it can currently scroll. If animate isn't passed then the+ // animateScroll value from settings is used instead.+ scrollToBottom: function(animate)+ {+ positionDragY(dragMaxY, animate);+ },+ // Hijacks the links on the page which link to content inside the scrollpane. If you have changed+ // the content of your page (e.g. via AJAX) and want to make sure any new anchor links to the+ // contents of your scroll pane will work then call this function.+ hijackInternalLinks: $.noop,+ // Removes the jScrollPane and returns the page to the state it was in before jScrollPane was+ // initialised.+ destroy: function()+ {+ destroy();+ }+ }+ );++ initialise(s);+ }++ // Pluginifying code...+ settings = $.extend({}, $.fn.jScrollPane.defaults, settings);++ // Apply default speed+ $.each(['arrowButtonSpeed', 'trackClickSpeed', 'keyboardSpeed'], function() {+ settings[this] = settings[this] || settings.speed;+ });++ return this.each(+ function()+ {+ var elem = $(this), jspApi = elem.data('jsp');+ if (jspApi) {+ jspApi.reinitialise(settings);+ } else {+ $("script",elem).filter('[type="text/javascript"],:not([type])').remove();+ jspApi = new JScrollPane(elem, settings);+ elem.data('jsp', jspApi);+ }+ }+ );+ };++ $.fn.jScrollPane.defaults = {+ showArrows : false,+ maintainPosition : true,+ stickToBottom : false,+ stickToRight : false,+ clickOnTrack : true,+ autoReinitialise : false,+ autoReinitialiseDelay : 500,+ verticalDragMinHeight : 0,+ verticalDragMaxHeight : 99999,+ horizontalDragMinWidth : 0,+ horizontalDragMaxWidth : 99999,+ contentWidth : undefined,+ animateScroll : false,+ animateDuration : 300,+ animateEase : 'linear',+ hijackInternalLinks : false,+ verticalGutter : 4,+ horizontalGutter : 4,+ mouseWheelSpeed : 3,+ arrowButtonSpeed : 0,+ arrowRepeatFreq : 50,+ arrowScrollOnHover : false,+ trackClickSpeed : 0,+ trackClickRepeatFreq : 70,+ verticalArrowPositions : 'split',+ horizontalArrowPositions : 'split',+ enableKeyboardNavigation : true,+ hideFocus : false,+ keyboardSpeed : 0,+ initialDelay : 300, // Delay before starting repeating+ speed : 30, // Default speed when others falsey+ scrollPagePercent : .8 // Percent of visible area scrolled when pageUp/Down or track area pressed+ };++}));diff --git a/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.min.css b/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.min.cssnew file mode 100644index 000000000..05754295a--- /dev/null+++ b/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.min.css@@ -0,0 +1 @@+.jspContainer{overflow:hidden;position:relative}.jspPane{position:absolute}.jspVerticalBar{position:absolute;top:0;right:0;width:16px;height:100%;background:red}.jspHorizontalBar{position:absolute;bottom:0;left:0;width:100%;height:16px;background:red}.jspHorizontalBar *,.jspVerticalBar *{margin:0;padding:0}.jspCap{display:none}.jspHorizontalBar .jspCap{float:left}.jspTrack{background:#dde;position:relative}.jspDrag{background:#bbd;position:relative;top:0;left:0;cursor:pointer}.jspHorizontalBar .jspDrag,.jspHorizontalBar .jspTrack{float:left;height:100%}.jspArrow{background:#50506d;text-indent:-20000px;display:block;cursor:pointer}.jspArrow.jspDisabled{cursor:default;background:#80808d}.jspVerticalBar .jspArrow{height:16px}.jspHorizontalBar .jspArrow{width:16px;float:left;height:100%}.jspVerticalBar .jspArrow:focus{outline:0}.jspCorner{background:#eeeef4;float:left;height:100%}* html .jspCorner{margin:0 -3px 0 0}\ No newline at end of filediff --git a/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.min.js b/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.min.jsnew file mode 100644index 000000000..d90d105b2--- /dev/null+++ b/web/ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.min.js@@ -0,0 +1,8 @@+/*!+ * jScrollPane - v2.0.22 - 2015-04-25+ * http://jscrollpane.kelvinluck.com/+ *+ * Copyright (c) 2014 Kelvin Luck+ * Dual licensed under the MIT or GPL licenses.+ */+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.fn.jScrollPane=function(b){function c(b,c){function d(c){var f,h,j,k,l,o,p=!1,q=!1;if(N=c,void 0===O)l=b.scrollTop(),o=b.scrollLeft(),b.css({overflow:"hidden",padding:0}),P=b.innerWidth()+ra,Q=b.innerHeight(),b.width(P),O=a('<div class="jspPane" />').css("padding",qa).append(b.children()),R=a('<div class="jspContainer" />').css({width:P+"px",height:Q+"px"}).append(O).appendTo(b);else{if(b.css("width",""),p=N.stickToBottom&&A(),q=N.stickToRight&&B(),k=b.innerWidth()+ra!=P||b.outerHeight()!=Q,k&&(P=b.innerWidth()+ra,Q=b.innerHeight(),R.css({width:P+"px",height:Q+"px"})),!k&&sa==S&&O.outerHeight()==T)return void b.width(P);sa=S,O.css("width",""),b.width(P),R.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}O.css("overflow","auto"),S=c.contentWidth?c.contentWidth:O[0].scrollWidth,T=O[0].scrollHeight,O.css("overflow",""),U=S/P,V=T/Q,W=V>1,X=U>1,X||W?(b.addClass("jspScrollable"),f=N.maintainPosition&&($||ba),f&&(h=y(),j=z()),e(),g(),i(),f&&(w(q?S-P:h,!1),v(p?T-Q:j,!1)),F(),C(),L(),N.enableKeyboardNavigation&&H(),N.clickOnTrack&&m(),J(),N.hijackInternalLinks&&K()):(b.removeClass("jspScrollable"),O.css({top:0,left:0,width:R.width()-ra}),D(),G(),I(),n()),N.autoReinitialise&&!pa?pa=setInterval(function(){d(N)},N.autoReinitialiseDelay):!N.autoReinitialise&&pa&&clearInterval(pa),l&&b.scrollTop(0)&&v(l,!1),o&&b.scrollLeft(0)&&w(o,!1),b.trigger("jsp-initialised",[X||W])}function e(){W&&(R.append(a('<div class="jspVerticalBar" />').append(a('<div class="jspCap jspCapTop" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragTop" />'),a('<div class="jspDragBottom" />'))),a('<div class="jspCap jspCapBottom" />'))),ca=R.find(">.jspVerticalBar"),da=ca.find(">.jspTrack"),Y=da.find(">.jspDrag"),N.showArrows&&(ha=a('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",k(0,-1)).bind("click.jsp",E),ia=a('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",k(0,1)).bind("click.jsp",E),N.arrowScrollOnHover&&(ha.bind("mouseover.jsp",k(0,-1,ha)),ia.bind("mouseover.jsp",k(0,1,ia))),j(da,N.verticalArrowPositions,ha,ia)),fa=Q,R.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){fa-=a(this).outerHeight()}),Y.hover(function(){Y.addClass("jspHover")},function(){Y.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",E),Y.addClass("jspActive");var c=b.pageY-Y.position().top;return a("html").bind("mousemove.jsp",function(a){p(a.pageY-c,!1)}).bind("mouseup.jsp mouseleave.jsp",o),!1}),f())}function f(){da.height(fa+"px"),$=0,ea=N.verticalGutter+da.outerWidth(),O.width(P-ea-ra);try{0===ca.position().left&&O.css("margin-left",ea+"px")}catch(a){}}function g(){X&&(R.append(a('<div class="jspHorizontalBar" />').append(a('<div class="jspCap jspCapLeft" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragLeft" />'),a('<div class="jspDragRight" />'))),a('<div class="jspCap jspCapRight" />'))),ja=R.find(">.jspHorizontalBar"),ka=ja.find(">.jspTrack"),_=ka.find(">.jspDrag"),N.showArrows&&(na=a('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",k(-1,0)).bind("click.jsp",E),oa=a('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",k(1,0)).bind("click.jsp",E),N.arrowScrollOnHover&&(na.bind("mouseover.jsp",k(-1,0,na)),oa.bind("mouseover.jsp",k(1,0,oa))),j(ka,N.horizontalArrowPositions,na,oa)),_.hover(function(){_.addClass("jspHover")},function(){_.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",E),_.addClass("jspActive");var c=b.pageX-_.position().left;return a("html").bind("mousemove.jsp",function(a){r(a.pageX-c,!1)}).bind("mouseup.jsp mouseleave.jsp",o),!1}),la=R.innerWidth(),h())}function h(){R.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){la-=a(this).outerWidth()}),ka.width(la+"px"),ba=0}function i(){if(X&&W){var b=ka.outerHeight(),c=da.outerWidth();fa-=b,a(ja).find(">.jspCap:visible,>.jspArrow").each(function(){la+=a(this).outerWidth()}),la-=c,Q-=c,P-=b,ka.parent().append(a('<div class="jspCorner" />').css("width",b+"px")),f(),h()}X&&O.width(R.outerWidth()-ra+"px"),T=O.outerHeight(),V=T/Q,X&&(ma=Math.ceil(1/U*la),ma>N.horizontalDragMaxWidth?ma=N.horizontalDragMaxWidth:ma<N.horizontalDragMinWidth&&(ma=N.horizontalDragMinWidth),_.width(ma+"px"),aa=la-ma,s(ba)),W&&(ga=Math.ceil(1/V*fa),ga>N.verticalDragMaxHeight?ga=N.verticalDragMaxHeight:ga<N.verticalDragMinHeight&&(ga=N.verticalDragMinHeight),Y.height(ga+"px"),Z=fa-ga,q($))}function j(a,b,c,d){var e,f="before",g="after";"os"==b&&(b=/Mac/.test(navigator.platform)?"after":"split"),b==f?g=b:b==g&&(f=b,e=c,c=d,d=e),a[f](c)[g](d)}function k(a,b,c){return function(){return l(a,b,this,c),this.blur(),!1}}function l(b,c,d,e){d=a(d).addClass("jspActive");var f,g,h=!0,i=function(){0!==b&&ta.scrollByX(b*N.arrowButtonSpeed),0!==c&&ta.scrollByY(c*N.arrowButtonSpeed),g=setTimeout(i,h?N.initialDelay:N.arrowRepeatFreq),h=!1};i(),f=e?"mouseout.jsp":"mouseup.jsp",e=e||a("html"),e.bind(f,function(){d.removeClass("jspActive"),g&&clearTimeout(g),g=null,e.unbind(f)})}function m(){n(),W&&da.bind("mousedown.jsp",function(b){if(void 0===b.originalTarget||b.originalTarget==b.currentTarget){var c,d=a(this),e=d.offset(),f=b.pageY-e.top-$,g=!0,h=function(){var a=d.offset(),e=b.pageY-a.top-ga/2,j=Q*N.scrollPagePercent,k=Z*j/(T-Q);if(0>f)$-k>e?ta.scrollByY(-j):p(e);else{if(!(f>0))return void i();e>$+k?ta.scrollByY(j):p(e)}c=setTimeout(h,g?N.initialDelay:N.trackClickRepeatFreq),g=!1},i=function(){c&&clearTimeout(c),c=null,a(document).unbind("mouseup.jsp",i)};return h(),a(document).bind("mouseup.jsp",i),!1}}),X&&ka.bind("mousedown.jsp",function(b){if(void 0===b.originalTarget||b.originalTarget==b.currentTarget){var c,d=a(this),e=d.offset(),f=b.pageX-e.left-ba,g=!0,h=function(){var a=d.offset(),e=b.pageX-a.left-ma/2,j=P*N.scrollPagePercent,k=aa*j/(S-P);if(0>f)ba-k>e?ta.scrollByX(-j):r(e);else{if(!(f>0))return void i();e>ba+k?ta.scrollByX(j):r(e)}c=setTimeout(h,g?N.initialDelay:N.trackClickRepeatFreq),g=!1},i=function(){c&&clearTimeout(c),c=null,a(document).unbind("mouseup.jsp",i)};return h(),a(document).bind("mouseup.jsp",i),!1}})}function n(){ka&&ka.unbind("mousedown.jsp"),da&&da.unbind("mousedown.jsp")}function o(){a("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"),Y&&Y.removeClass("jspActive"),_&&_.removeClass("jspActive")}function p(a,b){W&&(0>a?a=0:a>Z&&(a=Z),void 0===b&&(b=N.animateScroll),b?ta.animate(Y,"top",a,q):(Y.css("top",a),q(a)))}function q(a){void 0===a&&(a=Y.position().top),R.scrollTop(0),$=a||0;var c=0===$,d=$==Z,e=a/Z,f=-e*(T-Q);(ua!=c||wa!=d)&&(ua=c,wa=d,b.trigger("jsp-arrow-change",[ua,wa,va,xa])),t(c,d),O.css("top",f),b.trigger("jsp-scroll-y",[-f,c,d]).trigger("scroll")}function r(a,b){X&&(0>a?a=0:a>aa&&(a=aa),void 0===b&&(b=N.animateScroll),b?ta.animate(_,"left",a,s):(_.css("left",a),s(a)))}function s(a){void 0===a&&(a=_.position().left),R.scrollTop(0),ba=a||0;var c=0===ba,d=ba==aa,e=a/aa,f=-e*(S-P);(va!=c||xa!=d)&&(va=c,xa=d,b.trigger("jsp-arrow-change",[ua,wa,va,xa])),u(c,d),O.css("left",f),b.trigger("jsp-scroll-x",[-f,c,d]).trigger("scroll")}function t(a,b){N.showArrows&&(ha[a?"addClass":"removeClass"]("jspDisabled"),ia[b?"addClass":"removeClass"]("jspDisabled"))}function u(a,b){N.showArrows&&(na[a?"addClass":"removeClass"]("jspDisabled"),oa[b?"addClass":"removeClass"]("jspDisabled"))}function v(a,b){var c=a/(T-Q);p(c*Z,b)}function w(a,b){var c=a/(S-P);r(c*aa,b)}function x(b,c,d){var e,f,g,h,i,j,k,l,m,n=0,o=0;try{e=a(b)}catch(p){return}for(f=e.outerHeight(),g=e.outerWidth(),R.scrollTop(0),R.scrollLeft(0);!e.is(".jspPane");)if(n+=e.position().top,o+=e.position().left,e=e.offsetParent(),/^body|html$/i.test(e[0].nodeName))return;h=z(),j=h+Q,h>n||c?l=n-N.horizontalGutter:n+f>j&&(l=n-Q+f+N.horizontalGutter),isNaN(l)||v(l,d),i=y(),k=i+P,i>o||c?m=o-N.horizontalGutter:o+g>k&&(m=o-P+g+N.horizontalGutter),isNaN(m)||w(m,d)}function y(){return-O.position().left}function z(){return-O.position().top}function A(){var a=T-Q;return a>20&&a-z()<10}function B(){var a=S-P;return a>20&&a-y()<10}function C(){R.unbind(za).bind(za,function(a,b,c,d){ba||(ba=0),$||($=0);var e=ba,f=$,g=a.deltaFactor||N.mouseWheelSpeed;return ta.scrollBy(c*g,-d*g,!1),e==ba&&f==$})}function D(){R.unbind(za)}function E(){return!1}function F(){O.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(a){x(a.target,!1)})}function G(){O.find(":input,a").unbind("focus.jsp")}function H(){function c(){var a=ba,b=$;switch(d){case 40:ta.scrollByY(N.keyboardSpeed,!1);break;case 38:ta.scrollByY(-N.keyboardSpeed,!1);break;case 34:case 32:ta.scrollByY(Q*N.scrollPagePercent,!1);break;case 33:ta.scrollByY(-Q*N.scrollPagePercent,!1);break;case 39:ta.scrollByX(N.keyboardSpeed,!1);break;case 37:ta.scrollByX(-N.keyboardSpeed,!1)}return e=a!=ba||b!=$}var d,e,f=[];X&&f.push(ja[0]),W&&f.push(ca[0]),O.bind("focus.jsp",function(){b.focus()}),b.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(b){if(b.target===this||f.length&&a(b.target).closest(f).length){var g=ba,h=$;switch(b.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:d=b.keyCode,c();break;case 35:v(T-Q),d=null;break;case 36:v(0),d=null}return e=b.keyCode==d&&g!=ba||h!=$,!e}}).bind("keypress.jsp",function(b){return b.keyCode==d&&c(),b.target===this||f.length&&a(b.target).closest(f).length?!e:void 0}),N.hideFocus?(b.css("outline","none"),"hideFocus"in R[0]&&b.attr("hideFocus",!0)):(b.css("outline",""),"hideFocus"in R[0]&&b.attr("hideFocus",!1))}function I(){b.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp"),O.unbind(".jsp")}function J(){if(location.hash&&location.hash.length>1){var b,c,d=escape(location.hash.substr(1));try{b=a("#"+d+', a[name="'+d+'"]')}catch(e){return}b.length&&O.find(d)&&(0===R.scrollTop()?c=setInterval(function(){R.scrollTop()>0&&(x(b,!0),a(document).scrollTop(R.position().top),clearInterval(c))},50):(x(b,!0),a(document).scrollTop(R.position().top)))}}function K(){a(document.body).data("jspHijack")||(a(document.body).data("jspHijack",!0),a(document.body).delegate("a[href*=#]","click",function(b){var c,d,e,f,g,h,i=this.href.substr(0,this.href.indexOf("#")),j=location.href;if(-1!==location.href.indexOf("#")&&(j=location.href.substr(0,location.href.indexOf("#"))),i===j){c=escape(this.href.substr(this.href.indexOf("#")+1));try{d=a("#"+c+', a[name="'+c+'"]')}catch(k){return}d.length&&(e=d.closest(".jspScrollable"),f=e.data("jsp"),f.scrollToElement(d,!0),e[0].scrollIntoView&&(g=a(window).scrollTop(),h=d.offset().top,(g>h||h>g+a(window).height())&&e[0].scrollIntoView()),b.preventDefault())}}))}function L(){var a,b,c,d,e,f=!1;R.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(g){var h=g.originalEvent.touches[0];a=y(),b=z(),c=h.pageX,d=h.pageY,e=!1,f=!0}).bind("touchmove.jsp",function(g){if(f){var h=g.originalEvent.touches[0],i=ba,j=$;return ta.scrollTo(a+c-h.pageX,b+d-h.pageY),e=e||Math.abs(c-h.pageX)>5||Math.abs(d-h.pageY)>5,i==ba&&j==$}}).bind("touchend.jsp",function(a){f=!1}).bind("click.jsp-touchclick",function(a){return e?(e=!1,!1):void 0})}function M(){var a=z(),c=y();b.removeClass("jspScrollable").unbind(".jsp"),O.unbind(".jsp"),b.replaceWith(ya.append(O.children())),ya.scrollTop(a),ya.scrollLeft(c),pa&&clearInterval(pa)}var N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta=this,ua=!0,va=!0,wa=!1,xa=!1,ya=b.clone(!1,!1).empty(),za=a.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";"border-box"===b.css("box-sizing")?(qa=0,ra=0):(qa=b.css("paddingTop")+" "+b.css("paddingRight")+" "+b.css("paddingBottom")+" "+b.css("paddingLeft"),ra=(parseInt(b.css("paddingLeft"),10)||0)+(parseInt(b.css("paddingRight"),10)||0)),a.extend(ta,{reinitialise:function(b){b=a.extend({},N,b),d(b)},scrollToElement:function(a,b,c){x(a,b,c)},scrollTo:function(a,b,c){w(a,c),v(b,c)},scrollToX:function(a,b){w(a,b)},scrollToY:function(a,b){v(a,b)},scrollToPercentX:function(a,b){w(a*(S-P),b)},scrollToPercentY:function(a,b){v(a*(T-Q),b)},scrollBy:function(a,b,c){ta.scrollByX(a,c),ta.scrollByY(b,c)},scrollByX:function(a,b){var c=y()+Math[0>a?"floor":"ceil"](a),d=c/(S-P);r(d*aa,b)},scrollByY:function(a,b){var c=z()+Math[0>a?"floor":"ceil"](a),d=c/(T-Q);p(d*Z,b)},positionDragX:function(a,b){r(a,b)},positionDragY:function(a,b){p(a,b)},animate:function(a,b,c,d){var e={};e[b]=c,a.animate(e,{duration:N.animateDuration,easing:N.animateEase,queue:!1,step:d})},getContentPositionX:function(){return y()},getContentPositionY:function(){return z()},getContentWidth:function(){return S},getContentHeight:function(){return T},getPercentScrolledX:function(){return y()/(S-P)},getPercentScrolledY:function(){return z()/(T-Q)},getIsScrollableH:function(){return X},getIsScrollableV:function(){return W},getContentPane:function(){return O},scrollToBottom:function(a){p(Z,a)},hijackInternalLinks:a.noop,destroy:function(){M()}}),d(c)}return b=a.extend({},a.fn.jScrollPane.defaults,b),a.each(["arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){b[this]=b[this]||b.speed}),this.each(function(){var d=a(this),e=d.data("jsp");e?e.reinitialise(b):(a("script",d).filter('[type="text/javascript"],:not([type])').remove(),e=new c(d,b),d.data("jsp",e))})},a.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:void 0,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:3,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:.8}});\ No newline at end of filediff --git a/web/ext/ui/perfect-scrollbar/perfect-scrollbar.css b/web/ext/ui/perfect-scrollbar/perfect-scrollbar.cssnew file mode 100644index 000000000..df44c9c5d--- /dev/null+++ b/web/ext/ui/perfect-scrollbar/perfect-scrollbar.css@@ -0,0 +1,106 @@+/* perfect-scrollbar v0.6.7 */+.ps-container {+ -ms-touch-action: none;+ overflow: hidden !important; }+ .ps-container.ps-active-x > .ps-scrollbar-x-rail,+ .ps-container.ps-active-y > .ps-scrollbar-y-rail {+ display: block; }+ .ps-container.ps-in-scrolling {+ pointer-events: none; }+ .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail {+ background-color: #eee;+ opacity: 0.9; }+ .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x {+ background-color: #999; }+ .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail {+ background-color: #eee;+ opacity: 0.9; }+ .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y {+ background-color: #999; }+ .ps-container > .ps-scrollbar-x-rail {+ display: none;+ position: absolute;+ /* please don't change 'position' */+ -webkit-border-radius: 4px;+ -moz-border-radius: 4px;+ -ms-border-radius: 4px;+ border-radius: 4px;+ opacity: 0;+ -webkit-transition: background-color 0.2s linear, opacity 0.2s linear;+ -moz-transition: background-color 0.2s linear, opacity 0.2s linear;+ -o-transition: background-color 0.2s linear, opacity 0.2s linear;+ transition: background-color 0.2s linear, opacity 0.2s linear;+ bottom: 3px;+ /* there must be 'bottom' for ps-scrollbar-x-rail */+ height: 8px; }+ .ps-container > .ps-scrollbar-x-rail > .ps-scrollbar-x {+ position: absolute;+ /* please don't change 'position' */+ background-color: #aaa;+ -webkit-border-radius: 4px;+ -moz-border-radius: 4px;+ -ms-border-radius: 4px;+ border-radius: 4px;+ -webkit-transition: background-color 0.2s linear;+ -moz-transition: background-color 0.2s linear;+ -o-transition: background-color 0.2s linear;+ transition: background-color 0.2s linear;+ bottom: 0;+ /* there must be 'bottom' for ps-scrollbar-x */+ height: 8px; }+ .ps-container > .ps-scrollbar-y-rail {+ display: none;+ position: absolute;+ /* please don't change 'position' */+ -webkit-border-radius: 4px;+ -moz-border-radius: 4px;+ -ms-border-radius: 4px;+ border-radius: 4px;+ opacity: 0;+ -webkit-transition: background-color 0.2s linear, opacity 0.2s linear;+ -moz-transition: background-color 0.2s linear, opacity 0.2s linear;+ -o-transition: background-color 0.2s linear, opacity 0.2s linear;+ transition: background-color 0.2s linear, opacity 0.2s linear;+ right: 3px;+ /* there must be 'right' for ps-scrollbar-y-rail */+ width: 8px; }+ .ps-container > .ps-scrollbar-y-rail > .ps-scrollbar-y {+ position: absolute;+ /* please don't change 'position' */+ background-color: #aaa;+ -webkit-border-radius: 4px;+ -moz-border-radius: 4px;+ -ms-border-radius: 4px;+ border-radius: 4px;+ -webkit-transition: background-color 0.2s linear;+ -moz-transition: background-color 0.2s linear;+ -o-transition: background-color 0.2s linear;+ transition: background-color 0.2s linear;+ right: 0;+ /* there must be 'right' for ps-scrollbar-y */+ width: 8px; }+ .ps-container:hover.ps-in-scrolling {+ pointer-events: none; }+ .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail {+ background-color: #eee;+ opacity: 0.9; }+ .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x {+ background-color: #999; }+ .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail {+ background-color: #eee;+ opacity: 0.9; }+ .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y {+ background-color: #999; }+ .ps-container:hover > .ps-scrollbar-x-rail,+ .ps-container:hover > .ps-scrollbar-y-rail {+ opacity: 0.6; }+ .ps-container:hover > .ps-scrollbar-x-rail:hover {+ background-color: #eee;+ opacity: 0.9; }+ .ps-container:hover > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x {+ background-color: #999; }+ .ps-container:hover > .ps-scrollbar-y-rail:hover {+ background-color: #eee;+ opacity: 0.9; }+ .ps-container:hover > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y {+ background-color: #999; }diff --git a/web/ext/ui/perfect-scrollbar/perfect-scrollbar.jquery.js b/web/ext/ui/perfect-scrollbar/perfect-scrollbar.jquery.jsnew file mode 100644index 000000000..9e93de017--- /dev/null+++ b/web/ext/ui/perfect-scrollbar/perfect-scrollbar.jquery.js@@ -0,0 +1,1610 @@+/* perfect-scrollbar v0.6.7 */+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var ps = require('../main')+ , psInstances = require('../plugin/instances');++function mountJQuery(jQuery) {+ jQuery.fn.perfectScrollbar = function (settingOrCommand) {+ return this.each(function () {+ if (typeof settingOrCommand === 'object' ||+ typeof settingOrCommand === 'undefined') {+ // If it's an object or none, initialize.+ var settings = settingOrCommand;++ if (!psInstances.get(this)) {+ ps.initialize(this, settings);+ }+ } else {+ // Unless, it may be a command.+ var command = settingOrCommand;++ if (command === 'update') {+ ps.update(this);+ } else if (command === 'destroy') {+ ps.destroy(this);+ }+ }++ return jQuery(this);+ });+ };+}++if (typeof define === 'function' && define.amd) {+ // AMD. Register as an anonymous module.+ define(['jquery'], mountJQuery);+} else {+ var jq = window.jQuery ? window.jQuery : window.$;+ if (typeof jq !== 'undefined') {+ mountJQuery(jq);+ }+}++module.exports = mountJQuery;++},{"../main":7,"../plugin/instances":18}],2:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++function oldAdd(element, className) {+ var classes = element.className.split(' ');+ if (classes.indexOf(className) < 0) {+ classes.push(className);+ }+ element.className = classes.join(' ');+}++function oldRemove(element, className) {+ var classes = element.className.split(' ');+ var idx = classes.indexOf(className);+ if (idx >= 0) {+ classes.splice(idx, 1);+ }+ element.className = classes.join(' ');+}++exports.add = function (element, className) {+ if (element.classList) {+ element.classList.add(className);+ } else {+ oldAdd(element, className);+ }+};++exports.remove = function (element, className) {+ if (element.classList) {+ element.classList.remove(className);+ } else {+ oldRemove(element, className);+ }+};++exports.list = function (element) {+ if (element.classList) {+ return Array.prototype.slice.apply(element.classList);+ } else {+ return element.className.split(' ');+ }+};++},{}],3:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var DOM = {};++DOM.e = function (tagName, className) {+ var element = document.createElement(tagName);+ element.className = className;+ return element;+};++DOM.appendTo = function (child, parent) {+ parent.appendChild(child);+ return child;+};++function cssGet(element, styleName) {+ return window.getComputedStyle(element)[styleName];+}++function cssSet(element, styleName, styleValue) {+ if (typeof styleValue === 'number') {+ styleValue = styleValue.toString() + 'px';+ }+ element.style[styleName] = styleValue;+ return element;+}++function cssMultiSet(element, obj) {+ for (var key in obj) {+ var val = obj[key];+ if (typeof val === 'number') {+ val = val.toString() + 'px';+ }+ element.style[key] = val;+ }+ return element;+}++DOM.css = function (element, styleNameOrObject, styleValue) {+ if (typeof styleNameOrObject === 'object') {+ // multiple set with object+ return cssMultiSet(element, styleNameOrObject);+ } else {+ if (typeof styleValue === 'undefined') {+ return cssGet(element, styleNameOrObject);+ } else {+ return cssSet(element, styleNameOrObject, styleValue);+ }+ }+};++DOM.matches = function (element, query) {+ if (typeof element.matches !== 'undefined') {+ return element.matches(query);+ } else {+ if (typeof element.matchesSelector !== 'undefined') {+ return element.matchesSelector(query);+ } else if (typeof element.webkitMatchesSelector !== 'undefined') {+ return element.webkitMatchesSelector(query);+ } else if (typeof element.mozMatchesSelector !== 'undefined') {+ return element.mozMatchesSelector(query);+ } else if (typeof element.msMatchesSelector !== 'undefined') {+ return element.msMatchesSelector(query);+ }+ }+};++DOM.remove = function (element) {+ if (typeof element.remove !== 'undefined') {+ element.remove();+ } else {+ if (element.parentNode) {+ element.parentNode.removeChild(element);+ }+ }+};++DOM.queryChildren = function (element, selector) {+ return Array.prototype.filter.call(element.childNodes, function (child) {+ return DOM.matches(child, selector);+ });+};++module.exports = DOM;++},{}],4:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var EventElement = function (element) {+ this.element = element;+ this.events = {};+};++EventElement.prototype.bind = function (eventName, handler) {+ if (typeof this.events[eventName] === 'undefined') {+ this.events[eventName] = [];+ }+ this.events[eventName].push(handler);+ this.element.addEventListener(eventName, handler, false);+};++EventElement.prototype.unbind = function (eventName, handler) {+ var isHandlerProvided = (typeof handler !== 'undefined');+ this.events[eventName] = this.events[eventName].filter(function (hdlr) {+ if (isHandlerProvided && hdlr !== handler) {+ return true;+ }+ this.element.removeEventListener(eventName, hdlr, false);+ return false;+ }, this);+};++EventElement.prototype.unbindAll = function () {+ for (var name in this.events) {+ this.unbind(name);+ }+};++var EventManager = function () {+ this.eventElements = [];+};++EventManager.prototype.eventElement = function (element) {+ var ee = this.eventElements.filter(function (eventElement) {+ return eventElement.element === element;+ })[0];+ if (typeof ee === 'undefined') {+ ee = new EventElement(element);+ this.eventElements.push(ee);+ }+ return ee;+};++EventManager.prototype.bind = function (element, eventName, handler) {+ this.eventElement(element).bind(eventName, handler);+};++EventManager.prototype.unbind = function (element, eventName, handler) {+ this.eventElement(element).unbind(eventName, handler);+};++EventManager.prototype.unbindAll = function () {+ for (var i = 0; i < this.eventElements.length; i++) {+ this.eventElements[i].unbindAll();+ }+};++EventManager.prototype.once = function (element, eventName, handler) {+ var ee = this.eventElement(element);+ var onceHandler = function (e) {+ ee.unbind(eventName, onceHandler);+ handler(e);+ };+ ee.bind(eventName, onceHandler);+};++module.exports = EventManager;++},{}],5:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++module.exports = (function () {+ function s4() {+ return Math.floor((1 + Math.random()) * 0x10000)+ .toString(16)+ .substring(1);+ }+ return function () {+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' ++ s4() + '-' + s4() + s4() + s4();+ };+})();++},{}],6:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var cls = require('./class')+ , d = require('./dom');++exports.toInt = function (x) {+ return parseInt(x, 10) || 0;+};++exports.clone = function (obj) {+ if (obj === null) {+ return null;+ } else if (typeof obj === 'object') {+ var result = {};+ for (var key in obj) {+ result[key] = this.clone(obj[key]);+ }+ return result;+ } else {+ return obj;+ }+};++exports.extend = function (original, source) {+ var result = this.clone(original);+ for (var key in source) {+ result[key] = this.clone(source[key]);+ }+ return result;+};++exports.isEditable = function (el) {+ return d.matches(el, "input,[contenteditable]") ||+ d.matches(el, "select,[contenteditable]") ||+ d.matches(el, "textarea,[contenteditable]") ||+ d.matches(el, "button,[contenteditable]");+};++exports.removePsClasses = function (element) {+ var clsList = cls.list(element);+ for (var i = 0; i < clsList.length; i++) {+ var className = clsList[i];+ if (className.indexOf('ps-') === 0) {+ cls.remove(element, className);+ }+ }+};++exports.outerWidth = function (element) {+ return this.toInt(d.css(element, 'width')) ++ this.toInt(d.css(element, 'paddingLeft')) ++ this.toInt(d.css(element, 'paddingRight')) ++ this.toInt(d.css(element, 'borderLeftWidth')) ++ this.toInt(d.css(element, 'borderRightWidth'));+};++exports.startScrolling = function (element, axis) {+ cls.add(element, 'ps-in-scrolling');+ if (typeof axis !== 'undefined') {+ cls.add(element, 'ps-' + axis);+ } else {+ cls.add(element, 'ps-x');+ cls.add(element, 'ps-y');+ }+};++exports.stopScrolling = function (element, axis) {+ cls.remove(element, 'ps-in-scrolling');+ if (typeof axis !== 'undefined') {+ cls.remove(element, 'ps-' + axis);+ } else {+ cls.remove(element, 'ps-x');+ cls.remove(element, 'ps-y');+ }+};++exports.env = {+ isWebKit: 'WebkitAppearance' in document.documentElement.style,+ supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),+ supportsIePointer: window.navigator.msMaxTouchPoints !== null+};++},{"./class":2,"./dom":3}],7:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var destroy = require('./plugin/destroy')+ , initialize = require('./plugin/initialize')+ , update = require('./plugin/update');++module.exports = {+ initialize: initialize,+ update: update,+ destroy: destroy+};++},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++module.exports = {+ maxScrollbarLength: null,+ minScrollbarLength: null,+ scrollXMarginOffset: 0,+ scrollYMarginOffset: 0,+ stopPropagationOnClick: true,+ suppressScrollX: false,+ suppressScrollY: false,+ swipePropagation: true,+ useBothWheelAxes: false,+ useKeyboard: true,+ useSelectionScroll: false,+ wheelPropagation: false,+ wheelSpeed: 1+};++},{}],9:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var d = require('../lib/dom')+ , h = require('../lib/helper')+ , instances = require('./instances');++module.exports = function (element) {+ var i = instances.get(element);++ if (!i) {+ return;+ }++ i.event.unbindAll();+ d.remove(i.scrollbarX);+ d.remove(i.scrollbarY);+ d.remove(i.scrollbarXRail);+ d.remove(i.scrollbarYRail);+ h.removePsClasses(element);++ instances.remove(element);+};++},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindClickRailHandler(element, i) {+ function pageOffset(el) {+ return el.getBoundingClientRect();+ }+ var stopPropagation = window.Event.prototype.stopPropagation.bind;++ if (i.settings.stopPropagationOnClick) {+ i.event.bind(i.scrollbarY, 'click', stopPropagation);+ }+ i.event.bind(i.scrollbarYRail, 'click', function (e) {+ var halfOfScrollbarLength = h.toInt(i.scrollbarYHeight / 2);+ var positionTop = i.railYRatio * (e.pageY - window.scrollY - pageOffset(i.scrollbarYRail).top - halfOfScrollbarLength);+ var maxPositionTop = i.railYRatio * (i.railYHeight - i.scrollbarYHeight);+ var positionRatio = positionTop / maxPositionTop;++ if (positionRatio < 0) {+ positionRatio = 0;+ } else if (positionRatio > 1) {+ positionRatio = 1;+ }++ updateScroll(element, 'top', (i.contentHeight - i.containerHeight) * positionRatio);+ updateGeometry(element);++ e.stopPropagation();+ });++ if (i.settings.stopPropagationOnClick) {+ i.event.bind(i.scrollbarX, 'click', stopPropagation);+ }+ i.event.bind(i.scrollbarXRail, 'click', function (e) {+ var halfOfScrollbarLength = h.toInt(i.scrollbarXWidth / 2);+ var positionLeft = i.railXRatio * (e.pageX - window.scrollX - pageOffset(i.scrollbarXRail).left - halfOfScrollbarLength);+ var maxPositionLeft = i.railXRatio * (i.railXWidth - i.scrollbarXWidth);+ var positionRatio = positionLeft / maxPositionLeft;++ if (positionRatio < 0) {+ positionRatio = 0;+ } else if (positionRatio > 1) {+ positionRatio = 1;+ }++ updateScroll(element, 'left', ((i.contentWidth - i.containerWidth) * positionRatio) - i.negativeScrollAdjustment);+ updateGeometry(element);++ e.stopPropagation();+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindClickRailHandler(element, i);+};++},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var d = require('../../lib/dom')+ , h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindMouseScrollXHandler(element, i) {+ var currentLeft = null;+ var currentPageX = null;++ function updateScrollLeft(deltaX) {+ var newLeft = currentLeft + (deltaX * i.railXRatio);+ var maxLeft = i.scrollbarXRail.getBoundingClientRect().left + (i.railXRatio * (i.railXWidth - i.scrollbarXWidth));++ if (newLeft < 0) {+ i.scrollbarXLeft = 0;+ } else if (newLeft > maxLeft) {+ i.scrollbarXLeft = maxLeft;+ } else {+ i.scrollbarXLeft = newLeft;+ }++ var scrollLeft = h.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment;+ updateScroll(element, 'left', scrollLeft);+ }++ var mouseMoveHandler = function (e) {+ updateScrollLeft(e.pageX - currentPageX);+ updateGeometry(element);+ e.stopPropagation();+ e.preventDefault();+ };++ var mouseUpHandler = function () {+ h.stopScrolling(element, 'x');+ i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);+ };++ i.event.bind(i.scrollbarX, 'mousedown', function (e) {+ currentPageX = e.pageX;+ currentLeft = h.toInt(d.css(i.scrollbarX, 'left')) * i.railXRatio;+ h.startScrolling(element, 'x');++ i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);+ i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);++ e.stopPropagation();+ e.preventDefault();+ });+}++function bindMouseScrollYHandler(element, i) {+ var currentTop = null;+ var currentPageY = null;++ function updateScrollTop(deltaY) {+ var newTop = currentTop + (deltaY * i.railYRatio);+ var maxTop = i.scrollbarYRail.getBoundingClientRect().top + (i.railYRatio * (i.railYHeight - i.scrollbarYHeight));++ if (newTop < 0) {+ i.scrollbarYTop = 0;+ } else if (newTop > maxTop) {+ i.scrollbarYTop = maxTop;+ } else {+ i.scrollbarYTop = newTop;+ }++ var scrollTop = h.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight)));+ updateScroll(element, 'top', scrollTop);+ }++ var mouseMoveHandler = function (e) {+ updateScrollTop(e.pageY - currentPageY);+ updateGeometry(element);+ e.stopPropagation();+ e.preventDefault();+ };++ var mouseUpHandler = function () {+ h.stopScrolling(element, 'y');+ i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);+ };++ i.event.bind(i.scrollbarY, 'mousedown', function (e) {+ currentPageY = e.pageY;+ currentTop = h.toInt(d.css(i.scrollbarY, 'top')) * i.railYRatio;+ h.startScrolling(element, 'y');++ i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);+ i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);++ e.stopPropagation();+ e.preventDefault();+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindMouseScrollXHandler(element, i);+ bindMouseScrollYHandler(element, i);+};++},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindKeyboardHandler(element, i) {+ var hovered = false;+ i.event.bind(element, 'mouseenter', function () {+ hovered = true;+ });+ i.event.bind(element, 'mouseleave', function () {+ hovered = false;+ });++ var shouldPrevent = false;+ function shouldPreventDefault(deltaX, deltaY) {+ var scrollTop = element.scrollTop;+ if (deltaX === 0) {+ if (!i.scrollbarYActive) {+ return false;+ }+ if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) {+ return !i.settings.wheelPropagation;+ }+ }++ var scrollLeft = element.scrollLeft;+ if (deltaY === 0) {+ if (!i.scrollbarXActive) {+ return false;+ }+ if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) {+ return !i.settings.wheelPropagation;+ }+ }+ return true;+ }++ i.event.bind(i.ownerDocument, 'keydown', function (e) {+ if (e.isDefaultPrevented && e.isDefaultPrevented()) {+ return;+ }++ if (!hovered) {+ return;+ }++ var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement;+ if (activeElement) {+ // go deeper if element is a webcomponent+ while (activeElement.shadowRoot) {+ activeElement = activeElement.shadowRoot.activeElement;+ }+ if (h.isEditable(activeElement)) {+ return;+ }+ }++ var deltaX = 0;+ var deltaY = 0;++ switch (e.which) {+ case 37: // left+ deltaX = -30;+ break;+ case 38: // up+ deltaY = 30;+ break;+ case 39: // right+ deltaX = 30;+ break;+ case 40: // down+ deltaY = -30;+ break;+ case 33: // page up+ deltaY = 90;+ break;+ case 32: // space bar+ if (e.shiftKey) {+ deltaY = 90;+ } else {+ deltaY = -90;+ }+ break;+ case 34: // page down+ deltaY = -90;+ break;+ case 35: // end+ if (e.ctrlKey) {+ deltaY = -i.contentHeight;+ } else {+ deltaY = -i.containerHeight;+ }+ break;+ case 36: // home+ if (e.ctrlKey) {+ deltaY = element.scrollTop;+ } else {+ deltaY = i.containerHeight;+ }+ break;+ default:+ return;+ }++ updateScroll(element, 'top', element.scrollTop - deltaY);+ updateScroll(element, 'left', element.scrollLeft + deltaX);+ updateGeometry(element);++ shouldPrevent = shouldPreventDefault(deltaX, deltaY);+ if (shouldPrevent) {+ e.preventDefault();+ }+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindKeyboardHandler(element, i);+};++},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindMouseWheelHandler(element, i) {+ var shouldPrevent = false;++ function shouldPreventDefault(deltaX, deltaY) {+ var scrollTop = element.scrollTop;+ if (deltaX === 0) {+ if (!i.scrollbarYActive) {+ return false;+ }+ if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) {+ return !i.settings.wheelPropagation;+ }+ }++ var scrollLeft = element.scrollLeft;+ if (deltaY === 0) {+ if (!i.scrollbarXActive) {+ return false;+ }+ if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) {+ return !i.settings.wheelPropagation;+ }+ }+ return true;+ }++ function getDeltaFromEvent(e) {+ var deltaX = e.deltaX;+ var deltaY = -1 * e.deltaY;++ if (typeof deltaX === "undefined" || typeof deltaY === "undefined") {+ // OS X Safari+ deltaX = -1 * e.wheelDeltaX / 6;+ deltaY = e.wheelDeltaY / 6;+ }++ if (e.deltaMode && e.deltaMode === 1) {+ // Firefox in deltaMode 1: Line scrolling+ deltaX *= 10;+ deltaY *= 10;+ }++ if (deltaX !== deltaX && deltaY !== deltaY/* NaN checks */) {+ // IE in some mouse drivers+ deltaX = 0;+ deltaY = e.wheelDelta;+ }++ return [deltaX, deltaY];+ }++ function shouldBeConsumedByTextarea(deltaX, deltaY) {+ var hoveredTextarea = element.querySelector('textarea:hover');+ if (hoveredTextarea) {+ var maxScrollTop = hoveredTextarea.scrollHeight - hoveredTextarea.clientHeight;+ if (maxScrollTop > 0) {+ if (!(hoveredTextarea.scrollTop === 0 && deltaY > 0) &&+ !(hoveredTextarea.scrollTop === maxScrollTop && deltaY < 0)) {+ return true;+ }+ }+ var maxScrollLeft = hoveredTextarea.scrollLeft - hoveredTextarea.clientWidth;+ if (maxScrollLeft > 0) {+ if (!(hoveredTextarea.scrollLeft === 0 && deltaX < 0) &&+ !(hoveredTextarea.scrollLeft === maxScrollLeft && deltaX > 0)) {+ return true;+ }+ }+ }+ return false;+ }++ function mousewheelHandler(e) {+ // FIXME: this is a quick fix for the select problem in FF and IE.+ // If there comes an effective way to deal with the problem,+ // this lines should be removed.+ if (!h.env.isWebKit && element.querySelector('select:focus')) {+ return;+ }++ var delta = getDeltaFromEvent(e);++ var deltaX = delta[0];+ var deltaY = delta[1];++ if (shouldBeConsumedByTextarea(deltaX, deltaY)) {+ return;+ }++ shouldPrevent = false;+ if (!i.settings.useBothWheelAxes) {+ // deltaX will only be used for horizontal scrolling and deltaY will+ // only be used for vertical scrolling - this is the default+ updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));+ updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));+ } else if (i.scrollbarYActive && !i.scrollbarXActive) {+ // only vertical scrollbar is active and useBothWheelAxes option is+ // active, so let's scroll vertical bar using both mouse wheel axes+ if (deltaY) {+ updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));+ } else {+ updateScroll(element, 'top', element.scrollTop + (deltaX * i.settings.wheelSpeed));+ }+ shouldPrevent = true;+ } else if (i.scrollbarXActive && !i.scrollbarYActive) {+ // useBothWheelAxes and only horizontal bar is active, so use both+ // wheel axes for horizontal bar+ if (deltaX) {+ updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));+ } else {+ updateScroll(element, 'left', element.scrollLeft - (deltaY * i.settings.wheelSpeed));+ }+ shouldPrevent = true;+ }++ updateGeometry(element);++ shouldPrevent = (shouldPrevent || shouldPreventDefault(deltaX, deltaY));+ if (shouldPrevent) {+ e.stopPropagation();+ e.preventDefault();+ }+ }++ if (typeof window.onwheel !== "undefined") {+ i.event.bind(element, 'wheel', mousewheelHandler);+ } else if (typeof window.onmousewheel !== "undefined") {+ i.event.bind(element, 'mousewheel', mousewheelHandler);+ }+}++module.exports = function (element) {+ var i = instances.get(element);+ bindMouseWheelHandler(element, i);+};++},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var instances = require('../instances')+ , updateGeometry = require('../update-geometry');++function bindNativeScrollHandler(element, i) {+ i.event.bind(element, 'scroll', function () {+ updateGeometry(element);+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindNativeScrollHandler(element, i);+};++},{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindSelectionHandler(element, i) {+ function getRangeNode() {+ var selection = window.getSelection ? window.getSelection() :+ document.getSelection ? document.getSelection() : '';+ if (selection.toString().length === 0) {+ return null;+ } else {+ return selection.getRangeAt(0).commonAncestorContainer;+ }+ }++ var scrollingLoop = null;+ var scrollDiff = {top: 0, left: 0};+ function startScrolling() {+ if (!scrollingLoop) {+ scrollingLoop = setInterval(function () {+ if (!instances.get(element)) {+ clearInterval(scrollingLoop);+ return;+ }++ updateScroll(element, 'top', element.scrollTop + scrollDiff.top);+ updateScroll(element, 'left', element.scrollLeft + scrollDiff.left);+ updateGeometry(element);+ }, 50); // every .1 sec+ }+ }+ function stopScrolling() {+ if (scrollingLoop) {+ clearInterval(scrollingLoop);+ scrollingLoop = null;+ }+ h.stopScrolling(element);+ }++ var isSelected = false;+ i.event.bind(i.ownerDocument, 'selectionchange', function () {+ if (element.contains(getRangeNode())) {+ isSelected = true;+ } else {+ isSelected = false;+ stopScrolling();+ }+ });+ i.event.bind(window, 'mouseup', function () {+ if (isSelected) {+ isSelected = false;+ stopScrolling();+ }+ });++ i.event.bind(window, 'mousemove', function (e) {+ if (isSelected) {+ var mousePosition = {x: e.pageX, y: e.pageY};+ var containerGeometry = {+ left: element.offsetLeft,+ right: element.offsetLeft + element.offsetWidth,+ top: element.offsetTop,+ bottom: element.offsetTop + element.offsetHeight+ };++ if (mousePosition.x < containerGeometry.left + 3) {+ scrollDiff.left = -5;+ h.startScrolling(element, 'x');+ } else if (mousePosition.x > containerGeometry.right - 3) {+ scrollDiff.left = 5;+ h.startScrolling(element, 'x');+ } else {+ scrollDiff.left = 0;+ }++ if (mousePosition.y < containerGeometry.top + 3) {+ if (containerGeometry.top + 3 - mousePosition.y < 5) {+ scrollDiff.top = -5;+ } else {+ scrollDiff.top = -20;+ }+ h.startScrolling(element, 'y');+ } else if (mousePosition.y > containerGeometry.bottom - 3) {+ if (mousePosition.y - containerGeometry.bottom + 3 < 5) {+ scrollDiff.top = 5;+ } else {+ scrollDiff.top = 20;+ }+ h.startScrolling(element, 'y');+ } else {+ scrollDiff.top = 0;+ }++ if (scrollDiff.top === 0 && scrollDiff.left === 0) {+ stopScrolling();+ } else {+ startScrolling();+ }+ }+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindSelectionHandler(element, i);+};++},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {+ function shouldPreventDefault(deltaX, deltaY) {+ var scrollTop = element.scrollTop;+ var scrollLeft = element.scrollLeft;+ var magnitudeX = Math.abs(deltaX);+ var magnitudeY = Math.abs(deltaY);++ if (magnitudeY > magnitudeX) {+ // user is perhaps trying to swipe up/down the page++ if (((deltaY < 0) && (scrollTop === i.contentHeight - i.containerHeight)) ||+ ((deltaY > 0) && (scrollTop === 0))) {+ return !i.settings.swipePropagation;+ }+ } else if (magnitudeX > magnitudeY) {+ // user is perhaps trying to swipe left/right across the page++ if (((deltaX < 0) && (scrollLeft === i.contentWidth - i.containerWidth)) ||+ ((deltaX > 0) && (scrollLeft === 0))) {+ return !i.settings.swipePropagation;+ }+ }++ return true;+ }++ function applyTouchMove(differenceX, differenceY) {+ updateScroll(element, 'top', element.scrollTop - differenceY);+ updateScroll(element, 'left', element.scrollLeft - differenceX);++ updateGeometry(element);+ }++ var startOffset = {};+ var startTime = 0;+ var speed = {};+ var easingLoop = null;+ var inGlobalTouch = false;+ var inLocalTouch = false;++ function globalTouchStart() {+ inGlobalTouch = true;+ }+ function globalTouchEnd() {+ inGlobalTouch = false;+ }++ function getTouch(e) {+ if (e.targetTouches) {+ return e.targetTouches[0];+ } else {+ // Maybe IE pointer+ return e;+ }+ }+ function shouldHandle(e) {+ if (e.targetTouches && e.targetTouches.length === 1) {+ return true;+ }+ if (e.pointerType && e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {+ return true;+ }+ return false;+ }+ function touchStart(e) {+ if (shouldHandle(e)) {+ inLocalTouch = true;++ var touch = getTouch(e);++ startOffset.pageX = touch.pageX;+ startOffset.pageY = touch.pageY;++ startTime = (new Date()).getTime();++ if (easingLoop !== null) {+ clearInterval(easingLoop);+ }++ e.stopPropagation();+ }+ }+ function touchMove(e) {+ if (!inGlobalTouch && inLocalTouch && shouldHandle(e)) {+ var touch = getTouch(e);++ var currentOffset = {pageX: touch.pageX, pageY: touch.pageY};++ var differenceX = currentOffset.pageX - startOffset.pageX;+ var differenceY = currentOffset.pageY - startOffset.pageY;++ applyTouchMove(differenceX, differenceY);+ startOffset = currentOffset;++ var currentTime = (new Date()).getTime();++ var timeGap = currentTime - startTime;+ if (timeGap > 0) {+ speed.x = differenceX / timeGap;+ speed.y = differenceY / timeGap;+ startTime = currentTime;+ }++ if (shouldPreventDefault(differenceX, differenceY)) {+ e.stopPropagation();+ e.preventDefault();+ }+ }+ }+ function touchEnd() {+ if (!inGlobalTouch && inLocalTouch) {+ inLocalTouch = false;++ clearInterval(easingLoop);+ easingLoop = setInterval(function () {+ if (!instances.get(element)) {+ clearInterval(easingLoop);+ return;+ }++ if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {+ clearInterval(easingLoop);+ return;+ }++ applyTouchMove(speed.x * 30, speed.y * 30);++ speed.x *= 0.8;+ speed.y *= 0.8;+ }, 10);+ }+ }++ if (supportsTouch) {+ i.event.bind(window, 'touchstart', globalTouchStart);+ i.event.bind(window, 'touchend', globalTouchEnd);+ i.event.bind(element, 'touchstart', touchStart);+ i.event.bind(element, 'touchmove', touchMove);+ i.event.bind(element, 'touchend', touchEnd);+ }++ if (supportsIePointer) {+ if (window.PointerEvent) {+ i.event.bind(window, 'pointerdown', globalTouchStart);+ i.event.bind(window, 'pointerup', globalTouchEnd);+ i.event.bind(element, 'pointerdown', touchStart);+ i.event.bind(element, 'pointermove', touchMove);+ i.event.bind(element, 'pointerup', touchEnd);+ } else if (window.MSPointerEvent) {+ i.event.bind(window, 'MSPointerDown', globalTouchStart);+ i.event.bind(window, 'MSPointerUp', globalTouchEnd);+ i.event.bind(element, 'MSPointerDown', touchStart);+ i.event.bind(element, 'MSPointerMove', touchMove);+ i.event.bind(element, 'MSPointerUp', touchEnd);+ }+ }+}++module.exports = function (element, supportsTouch, supportsIePointer) {+ var i = instances.get(element);+ bindTouchHandler(element, i, supportsTouch, supportsIePointer);+};++},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var cls = require('../lib/class')+ , h = require('../lib/helper')+ , instances = require('./instances')+ , updateGeometry = require('./update-geometry');++// Handlers+var clickRailHandler = require('./handler/click-rail')+ , dragScrollbarHandler = require('./handler/drag-scrollbar')+ , keyboardHandler = require('./handler/keyboard')+ , mouseWheelHandler = require('./handler/mouse-wheel')+ , nativeScrollHandler = require('./handler/native-scroll')+ , selectionHandler = require('./handler/selection')+ , touchHandler = require('./handler/touch');++module.exports = function (element, userSettings) {+ userSettings = typeof userSettings === 'object' ? userSettings : {};++ cls.add(element, 'ps-container');++ // Create a plugin instance.+ var i = instances.add(element);++ i.settings = h.extend(i.settings, userSettings);++ clickRailHandler(element);+ dragScrollbarHandler(element);+ mouseWheelHandler(element);+ nativeScrollHandler(element);++ if (i.settings.useSelectionScroll) {+ selectionHandler(element);+ }++ if (h.env.supportsTouch || h.env.supportsIePointer) {+ touchHandler(element, h.env.supportsTouch, h.env.supportsIePointer);+ }+ if (i.settings.useKeyboard) {+ keyboardHandler(element);+ }++ updateGeometry(element);+};++},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var d = require('../lib/dom')+ , defaultSettings = require('./default-setting')+ , EventManager = require('../lib/event-manager')+ , guid = require('../lib/guid')+ , h = require('../lib/helper');++var instances = {};++function Instance(element) {+ var i = this;++ i.settings = h.clone(defaultSettings);+ i.containerWidth = null;+ i.containerHeight = null;+ i.contentWidth = null;+ i.contentHeight = null;++ i.isRtl = d.css(element, 'direction') === "rtl";+ i.isNegativeScroll = (function () {+ var originalScrollLeft = element.scrollLeft;+ var result = null;+ element.scrollLeft = -1;+ result = element.scrollLeft < 0;+ element.scrollLeft = originalScrollLeft;+ return result;+ })();+ i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;+ i.event = new EventManager();+ i.ownerDocument = element.ownerDocument || document;++ i.scrollbarXRail = d.appendTo(d.e('div', 'ps-scrollbar-x-rail'), element);+ i.scrollbarX = d.appendTo(d.e('div', 'ps-scrollbar-x'), i.scrollbarXRail);+ i.scrollbarXActive = null;+ i.scrollbarXWidth = null;+ i.scrollbarXLeft = null;+ i.scrollbarXBottom = h.toInt(d.css(i.scrollbarXRail, 'bottom'));+ i.isScrollbarXUsingBottom = i.scrollbarXBottom === i.scrollbarXBottom; // !isNaN+ i.scrollbarXTop = i.isScrollbarXUsingBottom ? null : h.toInt(d.css(i.scrollbarXRail, 'top'));+ i.railBorderXWidth = h.toInt(d.css(i.scrollbarXRail, 'borderLeftWidth')) + h.toInt(d.css(i.scrollbarXRail, 'borderRightWidth'));+ // Set rail to display:block to calculate margins+ d.css(i.scrollbarXRail, 'display', 'block');+ i.railXMarginWidth = h.toInt(d.css(i.scrollbarXRail, 'marginLeft')) + h.toInt(d.css(i.scrollbarXRail, 'marginRight'));+ d.css(i.scrollbarXRail, 'display', '');+ i.railXWidth = null;+ i.railXRatio = null;++ i.scrollbarYRail = d.appendTo(d.e('div', 'ps-scrollbar-y-rail'), element);+ i.scrollbarY = d.appendTo(d.e('div', 'ps-scrollbar-y'), i.scrollbarYRail);+ i.scrollbarYActive = null;+ i.scrollbarYHeight = null;+ i.scrollbarYTop = null;+ i.scrollbarYRight = h.toInt(d.css(i.scrollbarYRail, 'right'));+ i.isScrollbarYUsingRight = i.scrollbarYRight === i.scrollbarYRight; // !isNaN+ i.scrollbarYLeft = i.isScrollbarYUsingRight ? null : h.toInt(d.css(i.scrollbarYRail, 'left'));+ i.scrollbarYOuterWidth = i.isRtl ? h.outerWidth(i.scrollbarY) : null;+ i.railBorderYWidth = h.toInt(d.css(i.scrollbarYRail, 'borderTopWidth')) + h.toInt(d.css(i.scrollbarYRail, 'borderBottomWidth'));+ d.css(i.scrollbarYRail, 'display', 'block');+ i.railYMarginHeight = h.toInt(d.css(i.scrollbarYRail, 'marginTop')) + h.toInt(d.css(i.scrollbarYRail, 'marginBottom'));+ d.css(i.scrollbarYRail, 'display', '');+ i.railYHeight = null;+ i.railYRatio = null;+}++function getId(element) {+ if (typeof element.dataset === 'undefined') {+ return element.getAttribute('data-ps-id');+ } else {+ return element.dataset.psId;+ }+}++function setId(element, id) {+ if (typeof element.dataset === 'undefined') {+ element.setAttribute('data-ps-id', id);+ } else {+ element.dataset.psId = id;+ }+}++function removeId(element) {+ if (typeof element.dataset === 'undefined') {+ element.removeAttribute('data-ps-id');+ } else {+ delete element.dataset.psId;+ }+}++exports.add = function (element) {+ var newId = guid();+ setId(element, newId);+ instances[newId] = new Instance(element);+ return instances[newId];+};++exports.remove = function (element) {+ delete instances[getId(element)];+ removeId(element);+};++exports.get = function (element) {+ return instances[getId(element)];+};++},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var cls = require('../lib/class')+ , d = require('../lib/dom')+ , h = require('../lib/helper')+ , instances = require('./instances')+ , updateScroll = require('./update-scroll');++function getThumbSize(i, thumbSize) {+ if (i.settings.minScrollbarLength) {+ thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);+ }+ if (i.settings.maxScrollbarLength) {+ thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);+ }+ return thumbSize;+}++function updateCss(element, i) {+ var xRailOffset = {width: i.railXWidth};+ if (i.isRtl) {+ xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth;+ } else {+ xRailOffset.left = element.scrollLeft;+ }+ if (i.isScrollbarXUsingBottom) {+ xRailOffset.bottom = i.scrollbarXBottom - element.scrollTop;+ } else {+ xRailOffset.top = i.scrollbarXTop + element.scrollTop;+ }+ d.css(i.scrollbarXRail, xRailOffset);++ var yRailOffset = {top: element.scrollTop, height: i.railYHeight};+ if (i.isScrollbarYUsingRight) {+ if (i.isRtl) {+ yRailOffset.right = i.contentWidth - (i.negativeScrollAdjustment + element.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth;+ } else {+ yRailOffset.right = i.scrollbarYRight - element.scrollLeft;+ }+ } else {+ if (i.isRtl) {+ yRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth * 2 - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth;+ } else {+ yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;+ }+ }+ d.css(i.scrollbarYRail, yRailOffset);++ d.css(i.scrollbarX, {left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth});+ d.css(i.scrollbarY, {top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth});+}++module.exports = function (element) {+ var i = instances.get(element);++ i.containerWidth = element.clientWidth;+ i.containerHeight = element.clientHeight;+ i.contentWidth = element.scrollWidth;+ i.contentHeight = element.scrollHeight;++ var existingRails;+ if (!element.contains(i.scrollbarXRail)) {+ existingRails = d.queryChildren(element, '.ps-scrollbar-x-rail');+ if (existingRails.length > 0) {+ existingRails.forEach(function (rail) {+ d.remove(rail);+ });+ }+ d.appendTo(i.scrollbarXRail, element);+ }+ if (!element.contains(i.scrollbarYRail)) {+ existingRails = d.queryChildren(element, '.ps-scrollbar-y-rail');+ if (existingRails.length > 0) {+ existingRails.forEach(function (rail) {+ d.remove(rail);+ });+ }+ d.appendTo(i.scrollbarYRail, element);+ }++ if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) {+ i.scrollbarXActive = true;+ i.railXWidth = i.containerWidth - i.railXMarginWidth;+ i.railXRatio = i.containerWidth / i.railXWidth;+ i.scrollbarXWidth = getThumbSize(i, h.toInt(i.railXWidth * i.containerWidth / i.contentWidth));+ i.scrollbarXLeft = h.toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth));+ } else {+ i.scrollbarXActive = false;+ i.scrollbarXWidth = 0;+ i.scrollbarXLeft = 0;+ element.scrollLeft = 0;+ }++ if (!i.settings.suppressScrollY && i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight) {+ i.scrollbarYActive = true;+ i.railYHeight = i.containerHeight - i.railYMarginHeight;+ i.railYRatio = i.containerHeight / i.railYHeight;+ i.scrollbarYHeight = getThumbSize(i, h.toInt(i.railYHeight * i.containerHeight / i.contentHeight));+ i.scrollbarYTop = h.toInt(element.scrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight));+ } else {+ i.scrollbarYActive = false;+ i.scrollbarYHeight = 0;+ i.scrollbarYTop = 0;+ updateScroll(element, 'top', 0);+ }++ if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {+ i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;+ }+ if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {+ i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;+ }++ updateCss(element, i);++ cls[i.scrollbarXActive ? 'add' : 'remove'](element, 'ps-active-x');+ cls[i.scrollbarYActive ? 'add' : 'remove'](element, 'ps-active-y');+};++},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var instances = require('./instances');++var upEvent = document.createEvent('Event')+ , downEvent = document.createEvent('Event')+ , leftEvent = document.createEvent('Event')+ , rightEvent = document.createEvent('Event')+ , yEvent = document.createEvent('Event')+ , xEvent = document.createEvent('Event')+ , xStartEvent = document.createEvent('Event')+ , xEndEvent = document.createEvent('Event')+ , yStartEvent = document.createEvent('Event')+ , yEndEvent = document.createEvent('Event')+ , lastTop+ , lastLeft;++upEvent.initEvent('ps-scroll-up', true, true);+downEvent.initEvent('ps-scroll-down', true, true);+leftEvent.initEvent('ps-scroll-left', true, true);+rightEvent.initEvent('ps-scroll-right', true, true);+yEvent.initEvent('ps-scroll-y', true, true);+xEvent.initEvent('ps-scroll-x', true, true);+xStartEvent.initEvent('ps-x-reach-start', true, true);+xEndEvent.initEvent('ps-x-reach-end', true, true);+yStartEvent.initEvent('ps-y-reach-start', true, true);+yEndEvent.initEvent('ps-y-reach-end', true, true);++module.exports = function (element, axis, value) {+ if (typeof element === 'undefined') {+ throw 'You must provide an element to the update-scroll function';+ }++ if (typeof axis === 'undefined') {+ throw 'You must provide an axis to the update-scroll function';+ }++ if (typeof value === 'undefined') {+ throw 'You must provide a value to the update-scroll function';+ }++ if (axis === 'top' && value <= 0) {+ element.scrollTop = 0;+ element.dispatchEvent(yStartEvent);+ return; // don't allow negative scroll+ }++ if (axis === 'left' && value <= 0) {+ element.scrollLeft = 0;+ element.dispatchEvent(xStartEvent);+ return; // don't allow negative scroll+ }++ var i = instances.get(element);++ if (axis === 'top' && value > i.contentHeight - i.containerHeight) {+ element.scrollTop = i.contentHeight - i.containerHeight;+ element.dispatchEvent(yEndEvent);+ return; // don't allow scroll past container+ }++ if (axis === 'left' && value > i.contentWidth - i.containerWidth) {+ element.scrollLeft = i.contentWidth - i.containerWidth;+ element.dispatchEvent(xEndEvent);+ return; // don't allow scroll past container+ }++ if (!lastTop) {+ lastTop = element.scrollTop;+ }++ if (!lastLeft) {+ lastLeft = element.scrollLeft;+ }++ if (axis === 'top' && value < lastTop) {+ element.dispatchEvent(upEvent);+ }++ if (axis === 'top' && value > lastTop) {+ element.dispatchEvent(downEvent);+ }++ if (axis === 'left' && value < lastLeft) {+ element.dispatchEvent(leftEvent);+ }++ if (axis === 'left' && value > lastLeft) {+ element.dispatchEvent(rightEvent);+ }++ if (axis === 'top') {+ element.scrollTop = lastTop = value;+ element.dispatchEvent(yEvent);+ }++ if (axis === 'left') {+ element.scrollLeft = lastLeft = value;+ element.dispatchEvent(xEvent);+ }++};++},{"./instances":18}],21:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var d = require('../lib/dom')+ , h = require('../lib/helper')+ , instances = require('./instances')+ , updateGeometry = require('./update-geometry');++module.exports = function (element) {+ var i = instances.get(element);++ if (!i) {+ return;+ }++ // Recalcuate negative scrollLeft adjustment+ i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;++ // Recalculate rail margins+ d.css(i.scrollbarXRail, 'display', 'block');+ d.css(i.scrollbarYRail, 'display', 'block');+ i.railXMarginWidth = h.toInt(d.css(i.scrollbarXRail, 'marginLeft')) + h.toInt(d.css(i.scrollbarXRail, 'marginRight'));+ i.railYMarginHeight = h.toInt(d.css(i.scrollbarYRail, 'marginTop')) + h.toInt(d.css(i.scrollbarYRail, 'marginBottom'));++ // Hide scrollbars not to affect scrollWidth and scrollHeight+ d.css(i.scrollbarXRail, 'display', 'none');+ d.css(i.scrollbarYRail, 'display', 'none');++ updateGeometry(element);++ d.css(i.scrollbarXRail, 'display', '');+ d.css(i.scrollbarYRail, 'display', '');+};++},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19}]},{},[1]);diff --git a/web/ext/ui/perfect-scrollbar/perfect-scrollbar.js b/web/ext/ui/perfect-scrollbar/perfect-scrollbar.jsnew file mode 100644index 000000000..938376e8e--- /dev/null+++ b/web/ext/ui/perfect-scrollbar/perfect-scrollbar.js@@ -0,0 +1,1581 @@+/* perfect-scrollbar v0.6.7 */+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var ps = require('../main');++if (typeof define === 'function' && define.amd) {+ // AMD+ define(ps);+} else {+ // Add to a global object.+ window.PerfectScrollbar = ps;+ if (typeof window.Ps === 'undefined') {+ window.Ps = ps;+ }+}++},{"../main":7}],2:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++function oldAdd(element, className) {+ var classes = element.className.split(' ');+ if (classes.indexOf(className) < 0) {+ classes.push(className);+ }+ element.className = classes.join(' ');+}++function oldRemove(element, className) {+ var classes = element.className.split(' ');+ var idx = classes.indexOf(className);+ if (idx >= 0) {+ classes.splice(idx, 1);+ }+ element.className = classes.join(' ');+}++exports.add = function (element, className) {+ if (element.classList) {+ element.classList.add(className);+ } else {+ oldAdd(element, className);+ }+};++exports.remove = function (element, className) {+ if (element.classList) {+ element.classList.remove(className);+ } else {+ oldRemove(element, className);+ }+};++exports.list = function (element) {+ if (element.classList) {+ return Array.prototype.slice.apply(element.classList);+ } else {+ return element.className.split(' ');+ }+};++},{}],3:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var DOM = {};++DOM.e = function (tagName, className) {+ var element = document.createElement(tagName);+ element.className = className;+ return element;+};++DOM.appendTo = function (child, parent) {+ parent.appendChild(child);+ return child;+};++function cssGet(element, styleName) {+ return window.getComputedStyle(element)[styleName];+}++function cssSet(element, styleName, styleValue) {+ if (typeof styleValue === 'number') {+ styleValue = styleValue.toString() + 'px';+ }+ element.style[styleName] = styleValue;+ return element;+}++function cssMultiSet(element, obj) {+ for (var key in obj) {+ var val = obj[key];+ if (typeof val === 'number') {+ val = val.toString() + 'px';+ }+ element.style[key] = val;+ }+ return element;+}++DOM.css = function (element, styleNameOrObject, styleValue) {+ if (typeof styleNameOrObject === 'object') {+ // multiple set with object+ return cssMultiSet(element, styleNameOrObject);+ } else {+ if (typeof styleValue === 'undefined') {+ return cssGet(element, styleNameOrObject);+ } else {+ return cssSet(element, styleNameOrObject, styleValue);+ }+ }+};++DOM.matches = function (element, query) {+ if (typeof element.matches !== 'undefined') {+ return element.matches(query);+ } else {+ if (typeof element.matchesSelector !== 'undefined') {+ return element.matchesSelector(query);+ } else if (typeof element.webkitMatchesSelector !== 'undefined') {+ return element.webkitMatchesSelector(query);+ } else if (typeof element.mozMatchesSelector !== 'undefined') {+ return element.mozMatchesSelector(query);+ } else if (typeof element.msMatchesSelector !== 'undefined') {+ return element.msMatchesSelector(query);+ }+ }+};++DOM.remove = function (element) {+ if (typeof element.remove !== 'undefined') {+ element.remove();+ } else {+ if (element.parentNode) {+ element.parentNode.removeChild(element);+ }+ }+};++DOM.queryChildren = function (element, selector) {+ return Array.prototype.filter.call(element.childNodes, function (child) {+ return DOM.matches(child, selector);+ });+};++module.exports = DOM;++},{}],4:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var EventElement = function (element) {+ this.element = element;+ this.events = {};+};++EventElement.prototype.bind = function (eventName, handler) {+ if (typeof this.events[eventName] === 'undefined') {+ this.events[eventName] = [];+ }+ this.events[eventName].push(handler);+ this.element.addEventListener(eventName, handler, false);+};++EventElement.prototype.unbind = function (eventName, handler) {+ var isHandlerProvided = (typeof handler !== 'undefined');+ this.events[eventName] = this.events[eventName].filter(function (hdlr) {+ if (isHandlerProvided && hdlr !== handler) {+ return true;+ }+ this.element.removeEventListener(eventName, hdlr, false);+ return false;+ }, this);+};++EventElement.prototype.unbindAll = function () {+ for (var name in this.events) {+ this.unbind(name);+ }+};++var EventManager = function () {+ this.eventElements = [];+};++EventManager.prototype.eventElement = function (element) {+ var ee = this.eventElements.filter(function (eventElement) {+ return eventElement.element === element;+ })[0];+ if (typeof ee === 'undefined') {+ ee = new EventElement(element);+ this.eventElements.push(ee);+ }+ return ee;+};++EventManager.prototype.bind = function (element, eventName, handler) {+ this.eventElement(element).bind(eventName, handler);+};++EventManager.prototype.unbind = function (element, eventName, handler) {+ this.eventElement(element).unbind(eventName, handler);+};++EventManager.prototype.unbindAll = function () {+ for (var i = 0; i < this.eventElements.length; i++) {+ this.eventElements[i].unbindAll();+ }+};++EventManager.prototype.once = function (element, eventName, handler) {+ var ee = this.eventElement(element);+ var onceHandler = function (e) {+ ee.unbind(eventName, onceHandler);+ handler(e);+ };+ ee.bind(eventName, onceHandler);+};++module.exports = EventManager;++},{}],5:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++module.exports = (function () {+ function s4() {+ return Math.floor((1 + Math.random()) * 0x10000)+ .toString(16)+ .substring(1);+ }+ return function () {+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' ++ s4() + '-' + s4() + s4() + s4();+ };+})();++},{}],6:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var cls = require('./class')+ , d = require('./dom');++exports.toInt = function (x) {+ return parseInt(x, 10) || 0;+};++exports.clone = function (obj) {+ if (obj === null) {+ return null;+ } else if (typeof obj === 'object') {+ var result = {};+ for (var key in obj) {+ result[key] = this.clone(obj[key]);+ }+ return result;+ } else {+ return obj;+ }+};++exports.extend = function (original, source) {+ var result = this.clone(original);+ for (var key in source) {+ result[key] = this.clone(source[key]);+ }+ return result;+};++exports.isEditable = function (el) {+ return d.matches(el, "input,[contenteditable]") ||+ d.matches(el, "select,[contenteditable]") ||+ d.matches(el, "textarea,[contenteditable]") ||+ d.matches(el, "button,[contenteditable]");+};++exports.removePsClasses = function (element) {+ var clsList = cls.list(element);+ for (var i = 0; i < clsList.length; i++) {+ var className = clsList[i];+ if (className.indexOf('ps-') === 0) {+ cls.remove(element, className);+ }+ }+};++exports.outerWidth = function (element) {+ return this.toInt(d.css(element, 'width')) ++ this.toInt(d.css(element, 'paddingLeft')) ++ this.toInt(d.css(element, 'paddingRight')) ++ this.toInt(d.css(element, 'borderLeftWidth')) ++ this.toInt(d.css(element, 'borderRightWidth'));+};++exports.startScrolling = function (element, axis) {+ cls.add(element, 'ps-in-scrolling');+ if (typeof axis !== 'undefined') {+ cls.add(element, 'ps-' + axis);+ } else {+ cls.add(element, 'ps-x');+ cls.add(element, 'ps-y');+ }+};++exports.stopScrolling = function (element, axis) {+ cls.remove(element, 'ps-in-scrolling');+ if (typeof axis !== 'undefined') {+ cls.remove(element, 'ps-' + axis);+ } else {+ cls.remove(element, 'ps-x');+ cls.remove(element, 'ps-y');+ }+};++exports.env = {+ isWebKit: 'WebkitAppearance' in document.documentElement.style,+ supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),+ supportsIePointer: window.navigator.msMaxTouchPoints !== null+};++},{"./class":2,"./dom":3}],7:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var destroy = require('./plugin/destroy')+ , initialize = require('./plugin/initialize')+ , update = require('./plugin/update');++module.exports = {+ initialize: initialize,+ update: update,+ destroy: destroy+};++},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++module.exports = {+ maxScrollbarLength: null,+ minScrollbarLength: null,+ scrollXMarginOffset: 0,+ scrollYMarginOffset: 0,+ stopPropagationOnClick: true,+ suppressScrollX: false,+ suppressScrollY: false,+ swipePropagation: true,+ useBothWheelAxes: false,+ useKeyboard: true,+ useSelectionScroll: false,+ wheelPropagation: false,+ wheelSpeed: 1+};++},{}],9:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var d = require('../lib/dom')+ , h = require('../lib/helper')+ , instances = require('./instances');++module.exports = function (element) {+ var i = instances.get(element);++ if (!i) {+ return;+ }++ i.event.unbindAll();+ d.remove(i.scrollbarX);+ d.remove(i.scrollbarY);+ d.remove(i.scrollbarXRail);+ d.remove(i.scrollbarYRail);+ h.removePsClasses(element);++ instances.remove(element);+};++},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindClickRailHandler(element, i) {+ function pageOffset(el) {+ return el.getBoundingClientRect();+ }+ var stopPropagation = window.Event.prototype.stopPropagation.bind;++ if (i.settings.stopPropagationOnClick) {+ i.event.bind(i.scrollbarY, 'click', stopPropagation);+ }+ i.event.bind(i.scrollbarYRail, 'click', function (e) {+ var halfOfScrollbarLength = h.toInt(i.scrollbarYHeight / 2);+ var positionTop = i.railYRatio * (e.pageY - window.scrollY - pageOffset(i.scrollbarYRail).top - halfOfScrollbarLength);+ var maxPositionTop = i.railYRatio * (i.railYHeight - i.scrollbarYHeight);+ var positionRatio = positionTop / maxPositionTop;++ if (positionRatio < 0) {+ positionRatio = 0;+ } else if (positionRatio > 1) {+ positionRatio = 1;+ }++ updateScroll(element, 'top', (i.contentHeight - i.containerHeight) * positionRatio);+ updateGeometry(element);++ e.stopPropagation();+ });++ if (i.settings.stopPropagationOnClick) {+ i.event.bind(i.scrollbarX, 'click', stopPropagation);+ }+ i.event.bind(i.scrollbarXRail, 'click', function (e) {+ var halfOfScrollbarLength = h.toInt(i.scrollbarXWidth / 2);+ var positionLeft = i.railXRatio * (e.pageX - window.scrollX - pageOffset(i.scrollbarXRail).left - halfOfScrollbarLength);+ var maxPositionLeft = i.railXRatio * (i.railXWidth - i.scrollbarXWidth);+ var positionRatio = positionLeft / maxPositionLeft;++ if (positionRatio < 0) {+ positionRatio = 0;+ } else if (positionRatio > 1) {+ positionRatio = 1;+ }++ updateScroll(element, 'left', ((i.contentWidth - i.containerWidth) * positionRatio) - i.negativeScrollAdjustment);+ updateGeometry(element);++ e.stopPropagation();+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindClickRailHandler(element, i);+};++},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var d = require('../../lib/dom')+ , h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindMouseScrollXHandler(element, i) {+ var currentLeft = null;+ var currentPageX = null;++ function updateScrollLeft(deltaX) {+ var newLeft = currentLeft + (deltaX * i.railXRatio);+ var maxLeft = i.scrollbarXRail.getBoundingClientRect().left + (i.railXRatio * (i.railXWidth - i.scrollbarXWidth));++ if (newLeft < 0) {+ i.scrollbarXLeft = 0;+ } else if (newLeft > maxLeft) {+ i.scrollbarXLeft = maxLeft;+ } else {+ i.scrollbarXLeft = newLeft;+ }++ var scrollLeft = h.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment;+ updateScroll(element, 'left', scrollLeft);+ }++ var mouseMoveHandler = function (e) {+ updateScrollLeft(e.pageX - currentPageX);+ updateGeometry(element);+ e.stopPropagation();+ e.preventDefault();+ };++ var mouseUpHandler = function () {+ h.stopScrolling(element, 'x');+ i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);+ };++ i.event.bind(i.scrollbarX, 'mousedown', function (e) {+ currentPageX = e.pageX;+ currentLeft = h.toInt(d.css(i.scrollbarX, 'left')) * i.railXRatio;+ h.startScrolling(element, 'x');++ i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);+ i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);++ e.stopPropagation();+ e.preventDefault();+ });+}++function bindMouseScrollYHandler(element, i) {+ var currentTop = null;+ var currentPageY = null;++ function updateScrollTop(deltaY) {+ var newTop = currentTop + (deltaY * i.railYRatio);+ var maxTop = i.scrollbarYRail.getBoundingClientRect().top + (i.railYRatio * (i.railYHeight - i.scrollbarYHeight));++ if (newTop < 0) {+ i.scrollbarYTop = 0;+ } else if (newTop > maxTop) {+ i.scrollbarYTop = maxTop;+ } else {+ i.scrollbarYTop = newTop;+ }++ var scrollTop = h.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight)));+ updateScroll(element, 'top', scrollTop);+ }++ var mouseMoveHandler = function (e) {+ updateScrollTop(e.pageY - currentPageY);+ updateGeometry(element);+ e.stopPropagation();+ e.preventDefault();+ };++ var mouseUpHandler = function () {+ h.stopScrolling(element, 'y');+ i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);+ };++ i.event.bind(i.scrollbarY, 'mousedown', function (e) {+ currentPageY = e.pageY;+ currentTop = h.toInt(d.css(i.scrollbarY, 'top')) * i.railYRatio;+ h.startScrolling(element, 'y');++ i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);+ i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);++ e.stopPropagation();+ e.preventDefault();+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindMouseScrollXHandler(element, i);+ bindMouseScrollYHandler(element, i);+};++},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindKeyboardHandler(element, i) {+ var hovered = false;+ i.event.bind(element, 'mouseenter', function () {+ hovered = true;+ });+ i.event.bind(element, 'mouseleave', function () {+ hovered = false;+ });++ var shouldPrevent = false;+ function shouldPreventDefault(deltaX, deltaY) {+ var scrollTop = element.scrollTop;+ if (deltaX === 0) {+ if (!i.scrollbarYActive) {+ return false;+ }+ if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) {+ return !i.settings.wheelPropagation;+ }+ }++ var scrollLeft = element.scrollLeft;+ if (deltaY === 0) {+ if (!i.scrollbarXActive) {+ return false;+ }+ if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) {+ return !i.settings.wheelPropagation;+ }+ }+ return true;+ }++ i.event.bind(i.ownerDocument, 'keydown', function (e) {+ if (e.isDefaultPrevented && e.isDefaultPrevented()) {+ return;+ }++ if (!hovered) {+ return;+ }++ var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement;+ if (activeElement) {+ // go deeper if element is a webcomponent+ while (activeElement.shadowRoot) {+ activeElement = activeElement.shadowRoot.activeElement;+ }+ if (h.isEditable(activeElement)) {+ return;+ }+ }++ var deltaX = 0;+ var deltaY = 0;++ switch (e.which) {+ case 37: // left+ deltaX = -30;+ break;+ case 38: // up+ deltaY = 30;+ break;+ case 39: // right+ deltaX = 30;+ break;+ case 40: // down+ deltaY = -30;+ break;+ case 33: // page up+ deltaY = 90;+ break;+ case 32: // space bar+ if (e.shiftKey) {+ deltaY = 90;+ } else {+ deltaY = -90;+ }+ break;+ case 34: // page down+ deltaY = -90;+ break;+ case 35: // end+ if (e.ctrlKey) {+ deltaY = -i.contentHeight;+ } else {+ deltaY = -i.containerHeight;+ }+ break;+ case 36: // home+ if (e.ctrlKey) {+ deltaY = element.scrollTop;+ } else {+ deltaY = i.containerHeight;+ }+ break;+ default:+ return;+ }++ updateScroll(element, 'top', element.scrollTop - deltaY);+ updateScroll(element, 'left', element.scrollLeft + deltaX);+ updateGeometry(element);++ shouldPrevent = shouldPreventDefault(deltaX, deltaY);+ if (shouldPrevent) {+ e.preventDefault();+ }+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindKeyboardHandler(element, i);+};++},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindMouseWheelHandler(element, i) {+ var shouldPrevent = false;++ function shouldPreventDefault(deltaX, deltaY) {+ var scrollTop = element.scrollTop;+ if (deltaX === 0) {+ if (!i.scrollbarYActive) {+ return false;+ }+ if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) {+ return !i.settings.wheelPropagation;+ }+ }++ var scrollLeft = element.scrollLeft;+ if (deltaY === 0) {+ if (!i.scrollbarXActive) {+ return false;+ }+ if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) {+ return !i.settings.wheelPropagation;+ }+ }+ return true;+ }++ function getDeltaFromEvent(e) {+ var deltaX = e.deltaX;+ var deltaY = -1 * e.deltaY;++ if (typeof deltaX === "undefined" || typeof deltaY === "undefined") {+ // OS X Safari+ deltaX = -1 * e.wheelDeltaX / 6;+ deltaY = e.wheelDeltaY / 6;+ }++ if (e.deltaMode && e.deltaMode === 1) {+ // Firefox in deltaMode 1: Line scrolling+ deltaX *= 10;+ deltaY *= 10;+ }++ if (deltaX !== deltaX && deltaY !== deltaY/* NaN checks */) {+ // IE in some mouse drivers+ deltaX = 0;+ deltaY = e.wheelDelta;+ }++ return [deltaX, deltaY];+ }++ function shouldBeConsumedByTextarea(deltaX, deltaY) {+ var hoveredTextarea = element.querySelector('textarea:hover');+ if (hoveredTextarea) {+ var maxScrollTop = hoveredTextarea.scrollHeight - hoveredTextarea.clientHeight;+ if (maxScrollTop > 0) {+ if (!(hoveredTextarea.scrollTop === 0 && deltaY > 0) &&+ !(hoveredTextarea.scrollTop === maxScrollTop && deltaY < 0)) {+ return true;+ }+ }+ var maxScrollLeft = hoveredTextarea.scrollLeft - hoveredTextarea.clientWidth;+ if (maxScrollLeft > 0) {+ if (!(hoveredTextarea.scrollLeft === 0 && deltaX < 0) &&+ !(hoveredTextarea.scrollLeft === maxScrollLeft && deltaX > 0)) {+ return true;+ }+ }+ }+ return false;+ }++ function mousewheelHandler(e) {+ // FIXME: this is a quick fix for the select problem in FF and IE.+ // If there comes an effective way to deal with the problem,+ // this lines should be removed.+ if (!h.env.isWebKit && element.querySelector('select:focus')) {+ return;+ }++ var delta = getDeltaFromEvent(e);++ var deltaX = delta[0];+ var deltaY = delta[1];++ if (shouldBeConsumedByTextarea(deltaX, deltaY)) {+ return;+ }++ shouldPrevent = false;+ if (!i.settings.useBothWheelAxes) {+ // deltaX will only be used for horizontal scrolling and deltaY will+ // only be used for vertical scrolling - this is the default+ updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));+ updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));+ } else if (i.scrollbarYActive && !i.scrollbarXActive) {+ // only vertical scrollbar is active and useBothWheelAxes option is+ // active, so let's scroll vertical bar using both mouse wheel axes+ if (deltaY) {+ updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));+ } else {+ updateScroll(element, 'top', element.scrollTop + (deltaX * i.settings.wheelSpeed));+ }+ shouldPrevent = true;+ } else if (i.scrollbarXActive && !i.scrollbarYActive) {+ // useBothWheelAxes and only horizontal bar is active, so use both+ // wheel axes for horizontal bar+ if (deltaX) {+ updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));+ } else {+ updateScroll(element, 'left', element.scrollLeft - (deltaY * i.settings.wheelSpeed));+ }+ shouldPrevent = true;+ }++ updateGeometry(element);++ shouldPrevent = (shouldPrevent || shouldPreventDefault(deltaX, deltaY));+ if (shouldPrevent) {+ e.stopPropagation();+ e.preventDefault();+ }+ }++ if (typeof window.onwheel !== "undefined") {+ i.event.bind(element, 'wheel', mousewheelHandler);+ } else if (typeof window.onmousewheel !== "undefined") {+ i.event.bind(element, 'mousewheel', mousewheelHandler);+ }+}++module.exports = function (element) {+ var i = instances.get(element);+ bindMouseWheelHandler(element, i);+};++},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var instances = require('../instances')+ , updateGeometry = require('../update-geometry');++function bindNativeScrollHandler(element, i) {+ i.event.bind(element, 'scroll', function () {+ updateGeometry(element);+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindNativeScrollHandler(element, i);+};++},{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var h = require('../../lib/helper')+ , instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindSelectionHandler(element, i) {+ function getRangeNode() {+ var selection = window.getSelection ? window.getSelection() :+ document.getSelection ? document.getSelection() : '';+ if (selection.toString().length === 0) {+ return null;+ } else {+ return selection.getRangeAt(0).commonAncestorContainer;+ }+ }++ var scrollingLoop = null;+ var scrollDiff = {top: 0, left: 0};+ function startScrolling() {+ if (!scrollingLoop) {+ scrollingLoop = setInterval(function () {+ if (!instances.get(element)) {+ clearInterval(scrollingLoop);+ return;+ }++ updateScroll(element, 'top', element.scrollTop + scrollDiff.top);+ updateScroll(element, 'left', element.scrollLeft + scrollDiff.left);+ updateGeometry(element);+ }, 50); // every .1 sec+ }+ }+ function stopScrolling() {+ if (scrollingLoop) {+ clearInterval(scrollingLoop);+ scrollingLoop = null;+ }+ h.stopScrolling(element);+ }++ var isSelected = false;+ i.event.bind(i.ownerDocument, 'selectionchange', function () {+ if (element.contains(getRangeNode())) {+ isSelected = true;+ } else {+ isSelected = false;+ stopScrolling();+ }+ });+ i.event.bind(window, 'mouseup', function () {+ if (isSelected) {+ isSelected = false;+ stopScrolling();+ }+ });++ i.event.bind(window, 'mousemove', function (e) {+ if (isSelected) {+ var mousePosition = {x: e.pageX, y: e.pageY};+ var containerGeometry = {+ left: element.offsetLeft,+ right: element.offsetLeft + element.offsetWidth,+ top: element.offsetTop,+ bottom: element.offsetTop + element.offsetHeight+ };++ if (mousePosition.x < containerGeometry.left + 3) {+ scrollDiff.left = -5;+ h.startScrolling(element, 'x');+ } else if (mousePosition.x > containerGeometry.right - 3) {+ scrollDiff.left = 5;+ h.startScrolling(element, 'x');+ } else {+ scrollDiff.left = 0;+ }++ if (mousePosition.y < containerGeometry.top + 3) {+ if (containerGeometry.top + 3 - mousePosition.y < 5) {+ scrollDiff.top = -5;+ } else {+ scrollDiff.top = -20;+ }+ h.startScrolling(element, 'y');+ } else if (mousePosition.y > containerGeometry.bottom - 3) {+ if (mousePosition.y - containerGeometry.bottom + 3 < 5) {+ scrollDiff.top = 5;+ } else {+ scrollDiff.top = 20;+ }+ h.startScrolling(element, 'y');+ } else {+ scrollDiff.top = 0;+ }++ if (scrollDiff.top === 0 && scrollDiff.left === 0) {+ stopScrolling();+ } else {+ startScrolling();+ }+ }+ });+}++module.exports = function (element) {+ var i = instances.get(element);+ bindSelectionHandler(element, i);+};++},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var instances = require('../instances')+ , updateGeometry = require('../update-geometry')+ , updateScroll = require('../update-scroll');++function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {+ function shouldPreventDefault(deltaX, deltaY) {+ var scrollTop = element.scrollTop;+ var scrollLeft = element.scrollLeft;+ var magnitudeX = Math.abs(deltaX);+ var magnitudeY = Math.abs(deltaY);++ if (magnitudeY > magnitudeX) {+ // user is perhaps trying to swipe up/down the page++ if (((deltaY < 0) && (scrollTop === i.contentHeight - i.containerHeight)) ||+ ((deltaY > 0) && (scrollTop === 0))) {+ return !i.settings.swipePropagation;+ }+ } else if (magnitudeX > magnitudeY) {+ // user is perhaps trying to swipe left/right across the page++ if (((deltaX < 0) && (scrollLeft === i.contentWidth - i.containerWidth)) ||+ ((deltaX > 0) && (scrollLeft === 0))) {+ return !i.settings.swipePropagation;+ }+ }++ return true;+ }++ function applyTouchMove(differenceX, differenceY) {+ updateScroll(element, 'top', element.scrollTop - differenceY);+ updateScroll(element, 'left', element.scrollLeft - differenceX);++ updateGeometry(element);+ }++ var startOffset = {};+ var startTime = 0;+ var speed = {};+ var easingLoop = null;+ var inGlobalTouch = false;+ var inLocalTouch = false;++ function globalTouchStart() {+ inGlobalTouch = true;+ }+ function globalTouchEnd() {+ inGlobalTouch = false;+ }++ function getTouch(e) {+ if (e.targetTouches) {+ return e.targetTouches[0];+ } else {+ // Maybe IE pointer+ return e;+ }+ }+ function shouldHandle(e) {+ if (e.targetTouches && e.targetTouches.length === 1) {+ return true;+ }+ if (e.pointerType && e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {+ return true;+ }+ return false;+ }+ function touchStart(e) {+ if (shouldHandle(e)) {+ inLocalTouch = true;++ var touch = getTouch(e);++ startOffset.pageX = touch.pageX;+ startOffset.pageY = touch.pageY;++ startTime = (new Date()).getTime();++ if (easingLoop !== null) {+ clearInterval(easingLoop);+ }++ e.stopPropagation();+ }+ }+ function touchMove(e) {+ if (!inGlobalTouch && inLocalTouch && shouldHandle(e)) {+ var touch = getTouch(e);++ var currentOffset = {pageX: touch.pageX, pageY: touch.pageY};++ var differenceX = currentOffset.pageX - startOffset.pageX;+ var differenceY = currentOffset.pageY - startOffset.pageY;++ applyTouchMove(differenceX, differenceY);+ startOffset = currentOffset;++ var currentTime = (new Date()).getTime();++ var timeGap = currentTime - startTime;+ if (timeGap > 0) {+ speed.x = differenceX / timeGap;+ speed.y = differenceY / timeGap;+ startTime = currentTime;+ }++ if (shouldPreventDefault(differenceX, differenceY)) {+ e.stopPropagation();+ e.preventDefault();+ }+ }+ }+ function touchEnd() {+ if (!inGlobalTouch && inLocalTouch) {+ inLocalTouch = false;++ clearInterval(easingLoop);+ easingLoop = setInterval(function () {+ if (!instances.get(element)) {+ clearInterval(easingLoop);+ return;+ }++ if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {+ clearInterval(easingLoop);+ return;+ }++ applyTouchMove(speed.x * 30, speed.y * 30);++ speed.x *= 0.8;+ speed.y *= 0.8;+ }, 10);+ }+ }++ if (supportsTouch) {+ i.event.bind(window, 'touchstart', globalTouchStart);+ i.event.bind(window, 'touchend', globalTouchEnd);+ i.event.bind(element, 'touchstart', touchStart);+ i.event.bind(element, 'touchmove', touchMove);+ i.event.bind(element, 'touchend', touchEnd);+ }++ if (supportsIePointer) {+ if (window.PointerEvent) {+ i.event.bind(window, 'pointerdown', globalTouchStart);+ i.event.bind(window, 'pointerup', globalTouchEnd);+ i.event.bind(element, 'pointerdown', touchStart);+ i.event.bind(element, 'pointermove', touchMove);+ i.event.bind(element, 'pointerup', touchEnd);+ } else if (window.MSPointerEvent) {+ i.event.bind(window, 'MSPointerDown', globalTouchStart);+ i.event.bind(window, 'MSPointerUp', globalTouchEnd);+ i.event.bind(element, 'MSPointerDown', touchStart);+ i.event.bind(element, 'MSPointerMove', touchMove);+ i.event.bind(element, 'MSPointerUp', touchEnd);+ }+ }+}++module.exports = function (element, supportsTouch, supportsIePointer) {+ var i = instances.get(element);+ bindTouchHandler(element, i, supportsTouch, supportsIePointer);+};++},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var cls = require('../lib/class')+ , h = require('../lib/helper')+ , instances = require('./instances')+ , updateGeometry = require('./update-geometry');++// Handlers+var clickRailHandler = require('./handler/click-rail')+ , dragScrollbarHandler = require('./handler/drag-scrollbar')+ , keyboardHandler = require('./handler/keyboard')+ , mouseWheelHandler = require('./handler/mouse-wheel')+ , nativeScrollHandler = require('./handler/native-scroll')+ , selectionHandler = require('./handler/selection')+ , touchHandler = require('./handler/touch');++module.exports = function (element, userSettings) {+ userSettings = typeof userSettings === 'object' ? userSettings : {};++ cls.add(element, 'ps-container');++ // Create a plugin instance.+ var i = instances.add(element);++ i.settings = h.extend(i.settings, userSettings);++ clickRailHandler(element);+ dragScrollbarHandler(element);+ mouseWheelHandler(element);+ nativeScrollHandler(element);++ if (i.settings.useSelectionScroll) {+ selectionHandler(element);+ }++ if (h.env.supportsTouch || h.env.supportsIePointer) {+ touchHandler(element, h.env.supportsTouch, h.env.supportsIePointer);+ }+ if (i.settings.useKeyboard) {+ keyboardHandler(element);+ }++ updateGeometry(element);+};++},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var d = require('../lib/dom')+ , defaultSettings = require('./default-setting')+ , EventManager = require('../lib/event-manager')+ , guid = require('../lib/guid')+ , h = require('../lib/helper');++var instances = {};++function Instance(element) {+ var i = this;++ i.settings = h.clone(defaultSettings);+ i.containerWidth = null;+ i.containerHeight = null;+ i.contentWidth = null;+ i.contentHeight = null;++ i.isRtl = d.css(element, 'direction') === "rtl";+ i.isNegativeScroll = (function () {+ var originalScrollLeft = element.scrollLeft;+ var result = null;+ element.scrollLeft = -1;+ result = element.scrollLeft < 0;+ element.scrollLeft = originalScrollLeft;+ return result;+ })();+ i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;+ i.event = new EventManager();+ i.ownerDocument = element.ownerDocument || document;++ i.scrollbarXRail = d.appendTo(d.e('div', 'ps-scrollbar-x-rail'), element);+ i.scrollbarX = d.appendTo(d.e('div', 'ps-scrollbar-x'), i.scrollbarXRail);+ i.scrollbarXActive = null;+ i.scrollbarXWidth = null;+ i.scrollbarXLeft = null;+ i.scrollbarXBottom = h.toInt(d.css(i.scrollbarXRail, 'bottom'));+ i.isScrollbarXUsingBottom = i.scrollbarXBottom === i.scrollbarXBottom; // !isNaN+ i.scrollbarXTop = i.isScrollbarXUsingBottom ? null : h.toInt(d.css(i.scrollbarXRail, 'top'));+ i.railBorderXWidth = h.toInt(d.css(i.scrollbarXRail, 'borderLeftWidth')) + h.toInt(d.css(i.scrollbarXRail, 'borderRightWidth'));+ // Set rail to display:block to calculate margins+ d.css(i.scrollbarXRail, 'display', 'block');+ i.railXMarginWidth = h.toInt(d.css(i.scrollbarXRail, 'marginLeft')) + h.toInt(d.css(i.scrollbarXRail, 'marginRight'));+ d.css(i.scrollbarXRail, 'display', '');+ i.railXWidth = null;+ i.railXRatio = null;++ i.scrollbarYRail = d.appendTo(d.e('div', 'ps-scrollbar-y-rail'), element);+ i.scrollbarY = d.appendTo(d.e('div', 'ps-scrollbar-y'), i.scrollbarYRail);+ i.scrollbarYActive = null;+ i.scrollbarYHeight = null;+ i.scrollbarYTop = null;+ i.scrollbarYRight = h.toInt(d.css(i.scrollbarYRail, 'right'));+ i.isScrollbarYUsingRight = i.scrollbarYRight === i.scrollbarYRight; // !isNaN+ i.scrollbarYLeft = i.isScrollbarYUsingRight ? null : h.toInt(d.css(i.scrollbarYRail, 'left'));+ i.scrollbarYOuterWidth = i.isRtl ? h.outerWidth(i.scrollbarY) : null;+ i.railBorderYWidth = h.toInt(d.css(i.scrollbarYRail, 'borderTopWidth')) + h.toInt(d.css(i.scrollbarYRail, 'borderBottomWidth'));+ d.css(i.scrollbarYRail, 'display', 'block');+ i.railYMarginHeight = h.toInt(d.css(i.scrollbarYRail, 'marginTop')) + h.toInt(d.css(i.scrollbarYRail, 'marginBottom'));+ d.css(i.scrollbarYRail, 'display', '');+ i.railYHeight = null;+ i.railYRatio = null;+}++function getId(element) {+ if (typeof element.dataset === 'undefined') {+ return element.getAttribute('data-ps-id');+ } else {+ return element.dataset.psId;+ }+}++function setId(element, id) {+ if (typeof element.dataset === 'undefined') {+ element.setAttribute('data-ps-id', id);+ } else {+ element.dataset.psId = id;+ }+}++function removeId(element) {+ if (typeof element.dataset === 'undefined') {+ element.removeAttribute('data-ps-id');+ } else {+ delete element.dataset.psId;+ }+}++exports.add = function (element) {+ var newId = guid();+ setId(element, newId);+ instances[newId] = new Instance(element);+ return instances[newId];+};++exports.remove = function (element) {+ delete instances[getId(element)];+ removeId(element);+};++exports.get = function (element) {+ return instances[getId(element)];+};++},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var cls = require('../lib/class')+ , d = require('../lib/dom')+ , h = require('../lib/helper')+ , instances = require('./instances')+ , updateScroll = require('./update-scroll');++function getThumbSize(i, thumbSize) {+ if (i.settings.minScrollbarLength) {+ thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);+ }+ if (i.settings.maxScrollbarLength) {+ thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);+ }+ return thumbSize;+}++function updateCss(element, i) {+ var xRailOffset = {width: i.railXWidth};+ if (i.isRtl) {+ xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth;+ } else {+ xRailOffset.left = element.scrollLeft;+ }+ if (i.isScrollbarXUsingBottom) {+ xRailOffset.bottom = i.scrollbarXBottom - element.scrollTop;+ } else {+ xRailOffset.top = i.scrollbarXTop + element.scrollTop;+ }+ d.css(i.scrollbarXRail, xRailOffset);++ var yRailOffset = {top: element.scrollTop, height: i.railYHeight};+ if (i.isScrollbarYUsingRight) {+ if (i.isRtl) {+ yRailOffset.right = i.contentWidth - (i.negativeScrollAdjustment + element.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth;+ } else {+ yRailOffset.right = i.scrollbarYRight - element.scrollLeft;+ }+ } else {+ if (i.isRtl) {+ yRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth * 2 - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth;+ } else {+ yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;+ }+ }+ d.css(i.scrollbarYRail, yRailOffset);++ d.css(i.scrollbarX, {left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth});+ d.css(i.scrollbarY, {top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth});+}++module.exports = function (element) {+ var i = instances.get(element);++ i.containerWidth = element.clientWidth;+ i.containerHeight = element.clientHeight;+ i.contentWidth = element.scrollWidth;+ i.contentHeight = element.scrollHeight;++ var existingRails;+ if (!element.contains(i.scrollbarXRail)) {+ existingRails = d.queryChildren(element, '.ps-scrollbar-x-rail');+ if (existingRails.length > 0) {+ existingRails.forEach(function (rail) {+ d.remove(rail);+ });+ }+ d.appendTo(i.scrollbarXRail, element);+ }+ if (!element.contains(i.scrollbarYRail)) {+ existingRails = d.queryChildren(element, '.ps-scrollbar-y-rail');+ if (existingRails.length > 0) {+ existingRails.forEach(function (rail) {+ d.remove(rail);+ });+ }+ d.appendTo(i.scrollbarYRail, element);+ }++ if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) {+ i.scrollbarXActive = true;+ i.railXWidth = i.containerWidth - i.railXMarginWidth;+ i.railXRatio = i.containerWidth / i.railXWidth;+ i.scrollbarXWidth = getThumbSize(i, h.toInt(i.railXWidth * i.containerWidth / i.contentWidth));+ i.scrollbarXLeft = h.toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth));+ } else {+ i.scrollbarXActive = false;+ i.scrollbarXWidth = 0;+ i.scrollbarXLeft = 0;+ element.scrollLeft = 0;+ }++ if (!i.settings.suppressScrollY && i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight) {+ i.scrollbarYActive = true;+ i.railYHeight = i.containerHeight - i.railYMarginHeight;+ i.railYRatio = i.containerHeight / i.railYHeight;+ i.scrollbarYHeight = getThumbSize(i, h.toInt(i.railYHeight * i.containerHeight / i.contentHeight));+ i.scrollbarYTop = h.toInt(element.scrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight));+ } else {+ i.scrollbarYActive = false;+ i.scrollbarYHeight = 0;+ i.scrollbarYTop = 0;+ updateScroll(element, 'top', 0);+ }++ if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {+ i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;+ }+ if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {+ i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;+ }++ updateCss(element, i);++ cls[i.scrollbarXActive ? 'add' : 'remove'](element, 'ps-active-x');+ cls[i.scrollbarYActive ? 'add' : 'remove'](element, 'ps-active-y');+};++},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var instances = require('./instances');++var upEvent = document.createEvent('Event')+ , downEvent = document.createEvent('Event')+ , leftEvent = document.createEvent('Event')+ , rightEvent = document.createEvent('Event')+ , yEvent = document.createEvent('Event')+ , xEvent = document.createEvent('Event')+ , xStartEvent = document.createEvent('Event')+ , xEndEvent = document.createEvent('Event')+ , yStartEvent = document.createEvent('Event')+ , yEndEvent = document.createEvent('Event')+ , lastTop+ , lastLeft;++upEvent.initEvent('ps-scroll-up', true, true);+downEvent.initEvent('ps-scroll-down', true, true);+leftEvent.initEvent('ps-scroll-left', true, true);+rightEvent.initEvent('ps-scroll-right', true, true);+yEvent.initEvent('ps-scroll-y', true, true);+xEvent.initEvent('ps-scroll-x', true, true);+xStartEvent.initEvent('ps-x-reach-start', true, true);+xEndEvent.initEvent('ps-x-reach-end', true, true);+yStartEvent.initEvent('ps-y-reach-start', true, true);+yEndEvent.initEvent('ps-y-reach-end', true, true);++module.exports = function (element, axis, value) {+ if (typeof element === 'undefined') {+ throw 'You must provide an element to the update-scroll function';+ }++ if (typeof axis === 'undefined') {+ throw 'You must provide an axis to the update-scroll function';+ }++ if (typeof value === 'undefined') {+ throw 'You must provide a value to the update-scroll function';+ }++ if (axis === 'top' && value <= 0) {+ element.scrollTop = 0;+ element.dispatchEvent(yStartEvent);+ return; // don't allow negative scroll+ }++ if (axis === 'left' && value <= 0) {+ element.scrollLeft = 0;+ element.dispatchEvent(xStartEvent);+ return; // don't allow negative scroll+ }++ var i = instances.get(element);++ if (axis === 'top' && value > i.contentHeight - i.containerHeight) {+ element.scrollTop = i.contentHeight - i.containerHeight;+ element.dispatchEvent(yEndEvent);+ return; // don't allow scroll past container+ }++ if (axis === 'left' && value > i.contentWidth - i.containerWidth) {+ element.scrollLeft = i.contentWidth - i.containerWidth;+ element.dispatchEvent(xEndEvent);+ return; // don't allow scroll past container+ }++ if (!lastTop) {+ lastTop = element.scrollTop;+ }++ if (!lastLeft) {+ lastLeft = element.scrollLeft;+ }++ if (axis === 'top' && value < lastTop) {+ element.dispatchEvent(upEvent);+ }++ if (axis === 'top' && value > lastTop) {+ element.dispatchEvent(downEvent);+ }++ if (axis === 'left' && value < lastLeft) {+ element.dispatchEvent(leftEvent);+ }++ if (axis === 'left' && value > lastLeft) {+ element.dispatchEvent(rightEvent);+ }++ if (axis === 'top') {+ element.scrollTop = lastTop = value;+ element.dispatchEvent(yEvent);+ }++ if (axis === 'left') {+ element.scrollLeft = lastLeft = value;+ element.dispatchEvent(xEvent);+ }++};++},{"./instances":18}],21:[function(require,module,exports){+/* Copyright (c) 2015 Hyunje Alex Jun and other contributors+ * Licensed under the MIT License+ */+'use strict';++var d = require('../lib/dom')+ , h = require('../lib/helper')+ , instances = require('./instances')+ , updateGeometry = require('./update-geometry');++module.exports = function (element) {+ var i = instances.get(element);++ if (!i) {+ return;+ }++ // Recalcuate negative scrollLeft adjustment+ i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;++ // Recalculate rail margins+ d.css(i.scrollbarXRail, 'display', 'block');+ d.css(i.scrollbarYRail, 'display', 'block');+ i.railXMarginWidth = h.toInt(d.css(i.scrollbarXRail, 'marginLeft')) + h.toInt(d.css(i.scrollbarXRail, 'marginRight'));+ i.railYMarginHeight = h.toInt(d.css(i.scrollbarYRail, 'marginTop')) + h.toInt(d.css(i.scrollbarYRail, 'marginBottom'));++ // Hide scrollbars not to affect scrollWidth and scrollHeight+ d.css(i.scrollbarXRail, 'display', 'none');+ d.css(i.scrollbarYRail, 'display', 'none');++ updateGeometry(element);++ d.css(i.scrollbarXRail, 'display', '');+ d.css(i.scrollbarYRail, 'display', '');+};++},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19}]},{},[1]);diff --git a/web/ext/ui/perfect-scrollbar/perfect-scrollbar.min.css b/web/ext/ui/perfect-scrollbar/perfect-scrollbar.min.cssnew file mode 100644index 000000000..df509e956--- /dev/null+++ b/web/ext/ui/perfect-scrollbar/perfect-scrollbar.min.css@@ -0,0 +1,2 @@+/* perfect-scrollbar v0.6.7 */+.ps-container{-ms-touch-action:none;overflow:hidden !important}.ps-container.ps-active-x>.ps-scrollbar-x-rail,.ps-container.ps-active-y>.ps-scrollbar-y-rail{display:block}.ps-container.ps-in-scrolling{pointer-events:none}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:0.9}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:0.9}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999}.ps-container>.ps-scrollbar-x-rail{display:none;position:absolute;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px;opacity:0;-webkit-transition:background-color 0.2s linear,opacity 0.2s linear;-moz-transition:background-color 0.2s linear,opacity 0.2s linear;-o-transition:background-color 0.2s linear,opacity 0.2s linear;transition:background-color 0.2s linear,opacity 0.2s linear;bottom:3px;height:8px}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{position:absolute;background-color:#aaa;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px;-webkit-transition:background-color 0.2s linear;-moz-transition:background-color 0.2s linear;-o-transition:background-color 0.2s linear;transition:background-color 0.2s linear;bottom:0;height:8px}.ps-container>.ps-scrollbar-y-rail{display:none;position:absolute;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px;opacity:0;-webkit-transition:background-color 0.2s linear,opacity 0.2s linear;-moz-transition:background-color 0.2s linear,opacity 0.2s linear;-o-transition:background-color 0.2s linear,opacity 0.2s linear;transition:background-color 0.2s linear,opacity 0.2s linear;right:3px;width:8px}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{position:absolute;background-color:#aaa;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px;-webkit-transition:background-color 0.2s linear;-moz-transition:background-color 0.2s linear;-o-transition:background-color 0.2s linear;transition:background-color 0.2s linear;right:0;width:8px}.ps-container:hover.ps-in-scrolling{pointer-events:none}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:0.9}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:0.9}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999}.ps-container:hover>.ps-scrollbar-x-rail,.ps-container:hover>.ps-scrollbar-y-rail{opacity:0.6}.ps-container:hover>.ps-scrollbar-x-rail:hover{background-color:#eee;opacity:0.9}.ps-container:hover>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x{background-color:#999}.ps-container:hover>.ps-scrollbar-y-rail:hover{background-color:#eee;opacity:0.9}.ps-container:hover>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y{background-color:#999}diff --git a/web/images/wv-icons.png b/web/images/wv-icons.pngindex 4818c0a67..a31d559ba 100644Binary files a/web/images/wv-icons.png and b/web/images/wv-icons.png differdiff --git a/web/images/wv.layers/accordion.png b/web/images/wv.layers/accordion.pngnew file mode 100644index 000000000..4b72a6474Binary files /dev/null and b/web/images/wv.layers/accordion.png differdiff --git a/web/index.html b/web/index.htmlindex c917a86ce..71fdd61bc 100644--- a/web/index.html+++ b/web/index.html@@ -45,10 +45,15 @@<!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/ui/jquery-ui-1.11.4/jquery-ui.css"><!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/ui/jquery-ui-1.11.4/jquery-ui.min.css"> -->- <link type="text/css" rel="Stylesheet" href="ext/ui/iCheck-1.0.2-patch/skins/square/grey.css">+ <link type="text/css" rel="Stylesheet" href="ext/ui/iCheck-1.0.2-patch/skins/square/grey.css">+ <link type="text/css" rel="Stylesheet" href="ext/ui/iCheck-1.0.2-patch/skins/square/red.css">+ <link type="text/css" rel="Stylesheet" href="ext/ui/iCheck-1.0.2-patch/skins/line/red.css">++ <!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.css">+ <!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.min.css"> -->- <!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/ui/jquery.jscrollpane-2.0.17/jquery.jscrollpane.css">- <!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/ui/jquery.jscrollpane-2.0.17/jquery.jscrollpane.min.css"> -->+ <!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/ui/perfect-scrollbar/perfect-scrollbar.css">+ <!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/ui/perfect-scrollbar/perfect-scrollbar.min.css"> --><!-- link.dev --> <link type="text/css" rel="Stylesheet" href="ext/date/mobiscroll-2.6.0/mobiscroll.css"><!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/date/mobiscroll-2.6.0/mobiscroll.min.css"> -->@@ -109,8 +114,11 @@<!-- link.dev --> <script type="text/javascript" src="ext/ui/iCheck-1.0.2-patch/icheck.js"></script><!-- link.prod --> <!-- <script type="text/javascript" src="ext/ui/iCheck-1.0.2-patch/icheck.min.js"></script> -->- <!-- link.dev --> <script type="text/javascript" src="ext/ui/jquery.jscrollpane-2.0.17/jquery.jscrollpane.js"></script>- <!-- link.prod --> <!-- <script type="text/javascript" src="ext/ui/jquery.jscrollpane-2.0.17/jquery.jscrollpane.min.js"></script> -->+ <!-- link.dev --> <script type="text/javascript" src="ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.js"></script>+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/ui/jquery.jscrollpane-2.0.22/jquery.jscrollpane.min.js"></script> -->++ <!-- link.dev --> <script type="text/javascript" src="ext/ui/perfect-scrollbar/perfect-scrollbar.jquery.js"></script>+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/ui/perfect-scrollbar/perfect-scrollbar.jquery.js"></script> --><!-- link.dev --> <script type="text/javascript" src="ext/date/mobiscroll-2.6.0/mobiscroll.js"></script><!-- link.prod --> <!-- <script type="text/javascript" src="ext/date/mobiscroll-2.6.0/mobiscroll.min.js"></script> -->diff --git a/web/js/data/wv.data.ui.js b/web/js/data/wv.data.ui.jsindex a4f2f9c52..284bce28a 100644--- a/web/js/data/wv.data.ui.js+++ b/web/js/data/wv.data.ui.js@@ -64,6 +64,7 @@ wv.data.ui = wv.data.ui || function(models, ui, config) {.addClass(self.id + "list").addClass("bank");+ sizeDownloadTab();var $actionButton = $("<button></button>").attr("id", "wv-data-download-button").addClass("action")@@ -165,7 +166,7 @@ wv.data.ui = wv.data.ui || function(models, ui, config) {$container.append($item);};- var resize = function() {+ var resize = function() {var $pane = $(self.selector + "content");var api = $pane.data("jsp");if ( !wv.util.browser.small ) {@@ -179,8 +180,47 @@ wv.data.ui = wv.data.ui || function(models, ui, config) {api.destroy();}}- };-+ sizeDownloadTab();+ };+ var sizeDownloadTab = function(){+ var winSize = $(window).outerHeight(true);+ var headSize = $("ul#productsHolder-tabs").outerHeight(true);//+ var footSize = $("section#productsHolder footer").outerHeight(true);+ var secSize = $("#productsHolder").innerHeight() - $("#productsHolder").height();+ var offset = $("#productsHolder").offset();+ var timeSize = $("#timeline").outerHeight(true); // + $("#timeline").offset()['top'];++ //FIXME: -10 here is the timeline's bottom position from page, fix+ // after timeline markup is corrected to be loaded first+ var maxHeight = winSize - headSize - footSize -+ offset.top - timeSize - secSize - 10 - 5+ $(self.selector).css("max-height", maxHeight);+ /*+ var childrenHeight = $('ul#overlays').outerHeight(true) ++ $('ul#baselayers').outerHeight(true);+ //console.log(maxHeight, childrenHeight);++ if((maxHeight <= childrenHeight)) {+ $("#products").css('height', maxHeight)+ .css('padding-right', '10px');+ if(productsIsOverflow){+ $(self.selector).perfectScrollbar('update');+ }+ else{+ $(self.selector).perfectScrollbar();+ productsIsOverflow = true;+ }+ }+ else{+ $("#products").css('height', '')+ .css('padding-right', '');+ if(productsIsOverflow){+ $(self.selector).perfectScrollbar('destroy');+ productsIsOverflow = false;+ }+ }+ */+ };self.onViewChange = function() {var indicator;var map = ui.map.selected;diff --git a/web/js/layers/wv.layers.active.js b/web/js/layers/wv.layers.active.jsindex 69f208670..23ab2f13e 100644--- a/web/js/layers/wv.layers.active.js+++ b/web/js/layers/wv.layers.active.js@@ -86,7 +86,6 @@ wv.layers.active = wv.layers.active || function(models, ui, config) {tolerance: "pointer",placeholder: "state-saver"});-$("." + self.id + "category li").disableSelection();$("." + self.id + "category").bind('sortstop', moveLayer);@@ -105,11 +104,17 @@ wv.layers.active = wv.layers.active || function(models, ui, config) {.attr("id", group.id).addClass("category");+ var $header = $("<h3></h3>")+ .addClass("head")+ .html(group.description);++ $parent.append($header);+_.each(model.get({ group: group.id }), function(layer) {renderLayer($container, group, layer);});- //$container.append($header);+//$contain.append($layers);$parent.append($container);@@ -255,7 +260,7 @@ wv.layers.active = wv.layers.active || function(models, ui, config) {//onLoad: //adjustCategoryHeights});};-+ var productsIsOverflow = false;var sizeProducts = function(){var winSize = $(window).outerHeight(true);var headSize = $("ul#productsHolder-tabs").outerHeight(true);//@@ -266,10 +271,34 @@ wv.layers.active = wv.layers.active || function(models, ui, config) {//FIXME: -10 here is the timeline's bottom position from page, fix// after timeline markup is corrected to be loaded first- $("section#productsHolder #products").css("max-height", winSize -- headSize - footSize -- offset.top - timeSize -- secSize - 10 - 5);+ // 26 is the combined height of the OVERLAYS and BASE LAYERS titles.+ var maxHeight = winSize - headSize - footSize -+ offset.top - timeSize - secSize - 10 - 5;+ $("section#productsHolder #products").css("max-height", maxHeight);++ var childrenHeight = $('ul#overlays').outerHeight(true) ++ $('ul#baselayers').outerHeight(true);+ //console.log(maxHeight, childrenHeight);++ if((maxHeight <= childrenHeight)) {+ $("#products").css('height', maxHeight)+ .css('padding-right', '10px');+ if(productsIsOverflow){+ $(self.selector).perfectScrollbar('update');+ }+ else{+ $(self.selector).perfectScrollbar();+ productsIsOverflow = true;+ }+ }+ else{+ $("#products").css('height', '')+ .css('padding-right', '');+ if(productsIsOverflow){+ $(self.selector).perfectScrollbar('destroy');+ productsIsOverflow = false;+ }+ }};var resize = function() {@@ -310,6 +339,7 @@ wv.layers.active = wv.layers.active || function(models, ui, config) {if ( legends[layer.id] ) {delete legends[layer.id];}+ resize();//adjustCategoryHeights();};@@ -323,6 +353,7 @@ wv.layers.active = wv.layers.active || function(models, ui, config) {if ( layer.palette ) {renderLegendCanvas(layer);}+ resize();//adjustCategoryHeights();};diff --git a/web/js/layers/wv.layers.modal.js b/web/js/layers/wv.layers.modal.jsindex a37d914bb..8d45a10ab 100644--- a/web/js/layers/wv.layers.modal.js+++ b/web/js/layers/wv.layers.modal.js@@ -74,6 +74,11 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {sizeMultiplier = Math.floor( availableWidth / gridItemWidth );modalHeight = $( window ).height() - 100;};++ $.fn.hasScrollBar = function() {+ return this.get(0).scrollHeight > this.height();+ };+var redo = function(){setModalSize();@@ -81,8 +86,9 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {height: modalHeight,width: gridItemWidth * sizeMultiplier + 10,});-- $( '#layer-modal-main' ).css( 'height', modalHeight - 40 );++ $( '#layer-modal-main' ).css( 'height', modalHeight - 40 )+ .perfectScrollbar('update');//$( '.stamp' ).css("width", sizeMultiplier * gridItemWidth - 10 + "px");};@@ -93,39 +99,37 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {var drawPage = function() {var projection = models.proj.selected.id;- console.log(projection);+ //console.log(projection);if(projection==='geographic') {- _.each( config.categories['hazards and disasters'].All.measurements,- function( measurement ) {- _.each( config.measurements[measurement].sources,- function( source, sourceIndex ) {-- _.each( source.settings, function( setting ) {-- var fproj = filterProjection(setting);- var layer = config.layers[ setting ];-- if( fproj ) {- var mm = measurement;- return mm;- }-- /*_.each( config.layers[ setting ].projections,- function( proj, projId ) {-- }+ _.each( config.categories['hazards and disasters'].All.measurements,+ function( measurement ) {+ _.each( config.measurements[measurement].sources,+ function( source, sourceIndex ) {++ _.each( source.settings, function( setting ) {++ var fproj = filterProjection(setting);+ var layer = config.layers[ setting ];++ if( fproj ) {+ var mm = measurement;+ return mm;+ }++ /*_.each( config.layers[ setting ].projections,+ function( proj, projId ) {++ });- */- });-- }- );- //console.log(mm);- }- );---+ */+ });++ }+ );+ //console.log(mm);+ }+ );+$selectedCategory.hide();$allLayers.hide();drawCategories();@@ -194,7 +198,9 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {_.each( source.settings, function( setting ) {var layer = config.layers[setting];var title;- var $wrapper = $('<li></li>');+ var $wrapper = $('<li></li>')+ .attr('data-layer', encodeURIComponent(layer.id) )+ .addClass('measurement-settings-item');var $setting = $( '<input></input>' ).attr( 'type', 'checkbox' ).addClass( 'settings-check')@@ -270,7 +276,8 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {$allLayers.hide();$selectedCategory.show();- $selectedCategory.iCheck({checkboxClass: 'icheckbox_square-grey'});+ $('#layer-modal-main').perfectScrollbar('update');+ $selectedCategory.iCheck({checkboxClass: 'icheckbox_square-red'});$breadcrumb.show();};@@ -358,6 +365,7 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {$allLayers.hide();$breadcrumb.hide();$( '#layers-search-input' ).val('');+ $( '#layer-search label.search-icon' ).removeClass('search-on');searchClickState = 0;$( '#layer-categories, #categories-nav' ).show();$( "#layer-categories" ).isotope();@@ -476,6 +484,8 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {$nav.append( $label );//Create radiobuttons with filter buttons$nav.buttonset();++ console.log($('#layer-modal-main').hasScrollBar());});var $tiles = $( '#layer-categories' ).isotope( {@@ -536,7 +546,8 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {setModalSize();- $( '#layer-modal-main' ).css( 'height', modalHeight - 40 );+ $( '#layer-modal-main' ).css( 'height', modalHeight - 40 )+ .perfectScrollbar();var $search = $( "<div></div>" ).attr( "id", "layer-search" );@@ -697,6 +708,7 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {searchOpen = 1;searchClickState = 1;$('label.search-icon').addClass('search-on');+ $('label.search-on').click(categoriesCrumb);}});//adjustCategoryHeights();