diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa7549c --- /dev/null +++ b/.gitignore @@ -0,0 +1,52 @@ +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm + +*.iml + +## Directory-based project format: +.idea/ +# if you remove the above rule, at least ignore the following: + +# User-specific stuff: +# .idea/workspace.xml +# .idea/tasks.xml +# .idea/dictionaries +# .idea/shelf + +# Sensitive or high-churn files: +# .idea/dataSources.ids +# .idea/dataSources.xml +# .idea/sqlDataSources.xml +# .idea/dynamic.xml +# .idea/uiDesigner.xml + +# Gradle: +# .idea/gradle.xml +# .idea/libraries + +# Mongo Explorer plugin: +# .idea/mongoSettings.xml + +## File-based project format: +*.ipr +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Server Misc +._* + diff --git a/3c_footer.php b/3c_footer.php new file mode 100644 index 0000000..a1291f7 --- /dev/null +++ b/3c_footer.php @@ -0,0 +1,22 @@ + + + + + + + + + + + + + +<?php echo $Title . " › Office of Student Financial Aid Services › UCONN"; ?> + + + + + + + + + + + + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + + + + + + + + + + +
+
+

+ + + + + + + + + + + + + + + + + + + + + + University of + + + + + + + + + + + + + + + + + + + + Connecticut + + + + +

+ +
+
+ +
+
+ + + + +
+
+ + + diff --git a/cs_footer.php b/cs_footer.php new file mode 100644 index 0000000..17a6598 --- /dev/null +++ b/cs_footer.php @@ -0,0 +1,126 @@ + +
+ + +
+
+ +
+
+ + + + diff --git a/cs_footer_generics_admin.php b/cs_footer_generics_admin.php new file mode 100644 index 0000000..940a6b6 --- /dev/null +++ b/cs_footer_generics_admin.php @@ -0,0 +1,90 @@ + + + + + + + + + diff --git a/cs_footer_pkg_admin.php b/cs_footer_pkg_admin.php new file mode 100644 index 0000000..54817d2 --- /dev/null +++ b/cs_footer_pkg_admin.php @@ -0,0 +1,98 @@ + + +
+ +
+ + + + + diff --git a/cs_header.php b/cs_header.php new file mode 100644 index 0000000..97eab22 --- /dev/null +++ b/cs_header.php @@ -0,0 +1,400 @@ + + + + + + + + + + + + + + +<?php echo $Title . " › Office of Student Financial Aid Services › UCONN"; ?> + + + + + + + + + + + + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + + + + + + + + + + +
+
+

+ + + + + + + + + + + + + + + + + + + + + + University of + + + + + + + + + + + + + + + + + + + + Connecticut + + + + +

+ +
+
+ + +
+
+
+
+ +
+
+
diff --git a/cs_header_generics_admin.php b/cs_header_generics_admin.php new file mode 100644 index 0000000..a401d6b --- /dev/null +++ b/cs_header_generics_admin.php @@ -0,0 +1,508 @@ + + + + + + + + + + + + + + +<?php echo $Title . " › Office of Student Financial Aid Services › UCONN"; ?> + + + + + + + + + + + + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+
diff --git a/cs_header_pkg_admin.php b/cs_header_pkg_admin.php new file mode 100644 index 0000000..37b6786 --- /dev/null +++ b/cs_header_pkg_admin.php @@ -0,0 +1,644 @@ + + + + + + + + + + + + + + +<?php echo $Title . " › Office of Student Financial Aid Services › UCONN"; ?> + + + + + + + + + + + + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + + + + + + + + + + + + + +
+
+
+
+ +
+
+
diff --git a/global_footer.php b/global_footer.php new file mode 100644 index 0000000..0f68dfb --- /dev/null +++ b/global_footer.php @@ -0,0 +1,89 @@ +
+
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/global_footer_no_sidebar.php b/global_footer_no_sidebar.php new file mode 100644 index 0000000..9f3ec12 --- /dev/null +++ b/global_footer_no_sidebar.php @@ -0,0 +1,26 @@ +
+
+ +
+
+ + + \ No newline at end of file diff --git a/global_header.php b/global_header.php new file mode 100644 index 0000000..da39276 --- /dev/null +++ b/global_header.php @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + +<?php echo $Title . " › Office of Student Financial Aid Services › UCONN"; ?> + + + + + + + + + + + + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/global_header_no_sidebar.php b/global_header_no_sidebar.php new file mode 100644 index 0000000..9579fce --- /dev/null +++ b/global_header_no_sidebar.php @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + +<?php echo $Title . " › Office of Student Financial Aid Services › UCONN"; ?> + + + + + + + + + + + + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + + + + + + + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + +
+
+ + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/intranet_footer_no_sidebar.php b/intranet_footer_no_sidebar.php new file mode 100644 index 0000000..a41f7e5 --- /dev/null +++ b/intranet_footer_no_sidebar.php @@ -0,0 +1,17 @@ +
+
+
+ + \ No newline at end of file diff --git a/intranet_header_no_sidebar.php b/intranet_header_no_sidebar.php new file mode 100644 index 0000000..69eb287 --- /dev/null +++ b/intranet_header_no_sidebar.php @@ -0,0 +1,250 @@ + + + + + + + +<?php echo $Title . " › OSFAS Intranet › UCONN"; ?> + + + + + + + + + + + + + + + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + 0){ + for($x=0;$x<$arrlength;$x++) + { + echo ''; + } + } + +?> + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/template/css/alert.min.css b/template/css/alert.min.css new file mode 100644 index 0000000..688ee02 --- /dev/null +++ b/template/css/alert.min.css @@ -0,0 +1 @@ +a#alert_link{border:4px solid #FFF;font:16px Helvetica,Arial,sans-serif;color:#FFF;text-decoration:none;position:relative}a#alert_link:hover{background-color:#a70d00}a#alert_link strong{font-size:1.2em;line-height:2em}a#alert_link em{font-style:normal;line-height:2.2em;*line-height:1.8em;padding-left:1em}a#alert_link span{display:block;position:absolute;right:.8em;font-size:.85em}body{margin-top:90px!important}div#alert_wrapper{position:absolute;top:0;left:0;width:100%;height:90px!important;margin-bottom:-28px!important}a#alert_link{display:block;width:90%;margin:20px auto;font-size:13px!important;border-radius:3px;height:20px!important;padding:8px 10px 15px 15px!important;border-width:1px!important}a#alert_link em{font-size:.9em!important}a#alert_link span{top:1.5em!important;text-decoration:underline}a#alert_link{border-color:#000!important;background:#c10000;background:-moz-linear-gradient(top,#c10000 0,#910000 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#c10000),color-stop(100%,#910000));background:-webkit-linear-gradient(top,#c10000 0,#910000 100%);background:-o-linear-gradient(top,#c10000 0,#910000 100%);background:-ms-linear-gradient(top,#c10000 0,#910000 100%);background:linear-gradient(to bottom,#c10000 0,#910000 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c10000', endColorstr='#910000', GradientType=0)}a#alert_link em,a#alert_link span,a#alert_link strong{color:#fff!important}a#alert_link.notEmergency{border-color:#fff!important;background:#fcffc9;background:-moz-linear-gradient(top,#fcffc9 0,#fdffa3 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#fcffc9),color-stop(100%,#fdffa3));background:-webkit-linear-gradient(top,#fcffc9 0,#fdffa3 100%);background:-o-linear-gradient(top,#fcffc9 0,#fdffa3 100%);background:-ms-linear-gradient(top,#fcffc9 0,#fdffa3 100%);background:linear-gradient(to bottom,#fcffc9 0,#fdffa3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcffc9', endColorstr='#fdffa3', GradientType=0)}a#alert_link.notEmergency em,a#alert_link.notEmergency span,a#alert_link.notEmergency strong{color:#000!important}@media (max-width:540px){body{margin-top:100px!important}div#alert_wrapper{height:100px!important}a#alert_link em{display:block;line-height:normal!important;padding-left:0!important}a#alert_link{height:35px!important}}@media (max-width:360px){a#alert_link{padding-top:6px!important;padding-bottom:17px!important}a#alert_link span{width:5em!important;top:1em!important}} \ No newline at end of file diff --git a/template/css/alt.css b/template/css/alt.css new file mode 100644 index 0000000..2daafe1 --- /dev/null +++ b/template/css/alt.css @@ -0,0 +1,32 @@ +/* + + Alt CSS + - Becasue we don't have versioning. + - Use this to avoid collisions with main stylesheet. + - fold all these styles into main afterwards. + +*/ + +#uc-header .uc-utility-item { + float:left; + margin-left:10px; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; + } + + +#uc-search #uc-search-field { + width: 175px; + padding: 0px 28px 0px 7px; + background-image: none; + /* background-color: #163794; */ + background-color: #192B5F !important; + -moz-box-shadow: inset 0 2px 3px rgba(0,0,0,0.5); + -webkit-box-shadow: inset 0 2px 3px rgba(0,0,0,0.5); + box-shadow: inset 0 2px 3px rgba(0,0,0,0.5); + border-radius: 7px; + color: white; + line-height:20px; + height:34px; + } \ No newline at end of file diff --git a/template/css/common.css b/template/css/common.css new file mode 100644 index 0000000..d9f0807 --- /dev/null +++ b/template/css/common.css @@ -0,0 +1,404 @@ + +#cs_loans, td, th +{ +border:1px solid #000E2F; +padding:2px; +text-align:center; + +} +#cs_loans th +{ +background-color:#000E2F; +color:white; +width:150px; +} +#alert_wrapper { + background-color: #0F1938; +} +#uc-header { +} +#uc-header .container { + height: 55px; + position: relative; +} +#uc-header .container * { + background-image: none; + border: 0 none; + border-radius: 0 0 0 0; + box-shadow: none; + color: #000000; + font-family: inherit; + font-size: 1em; + font-style: normal; + font-weight: normal; + line-height: normal; + list-style-type: none; + margin: 0; + min-height: 0; + outline: 0 none; + padding: 0; + text-decoration: none; + transition: none 0s ease 0s; + vertical-align: baseline; +} +#uc-identity { +} +#uc-header #uc-logo { + display: block; + left: 12px; + position: absolute; + top: 18px; +} +#uc-header #uc-logo a { + display: block; +} +#uc-header #uc-logo-fallback { + display: block; +} +.uc-svg #uc-header #uc-logo-fallback { + display: none; +} +#uc-header #uc-logo-svg { + display: none; +} +.uc-svg #uc-header #uc-logo-svg { + display: block; +} +#uc-header.container #uc-utility-btn-az { + display: block; +} +#uc-header .container #uc-utility-btn-az-fallback { + color: #FFFFFF; + display: block; + font-size: 80%; + font-weight: bold; + padding-top: 8px; + text-align: center; +} +#uc-header #uc-utility-btn-az-svg { + display: none; +} +.uc-svg #uc-header #uc-utility-btn-az-svg { + display: block; +} +.uc-svg #uc-header #uc-utility-btn-az-fallback { + display: none; +} +#uc-header #uc-title { + border-left: 2px solid #3F4760; + height: 21px; + left: 124px; + padding-left: 9px; + position: absolute; + top: 18px; +} +#uc-header #uc-title a { + display: block; + height: 13px; + margin-top: 4px; +} +#uc-header #uc-title-universityof, #uc-header #uc-title-connecticut { + float: left; +} +#uc-header #uc-title-universityof *, #uc-header #uc-title-universityof img { + height: 13px; + max-width: none; + width: 145px; +} +#uc-header #uc-title-connecticut *, #uc-header #uc-title-connecticut img { + height: 13px; + max-width: none; + width: 140px; +} +.uc-header-fallback { +} +#uc-header #uc-title-universityof-fallback { + margin-right: 7px; +} +#uc-header #uc-title-universityof-svg, #uc-header #uc-title-connecticut-svg { + display: none; +} +.uc-svg #uc-header #uc-title-universityof-svg, .uc-svg #uc-header #uc-title-connecticut-svg { + display: inline; +} +.uc-svg #uc-header #uc-title-universityof-svg { + margin-right: 7px; +} +#uc-header .uc-svg .uc-header-fallback { + display: none; +} +#uc-header #uc-hc { + border-left: 2px solid #3F4760; + height: 21px; + left: 124px; + padding-left: 9px; + position: absolute; + top: 18px; +} +#uc-header #uc-hc a { + display: block; + height: 13px; + margin-top: 4px; +} +#uc-header #uc-hc-health-center { + float: left; +} +#uc-header #uc-hc-health-center * { + height: 13px; + width: 145px; +} +#uc-header #uc-hc-health-center * { + height: 13px; + width: 140px; +} +#uc-header #uc-hc-health-center-svg { + display: none; +} +.uc-svg #uc-header #uc-hc-health-center-svg { + display: inline; +} +.uc-svg .uc-header-fallback { + display: none; +} +#uc-header #uc-utility { + float: right; + width: auto; +} +#uc-header #uc-utility-list { + padding: 11px 20px 0 0; +} +#uc-header .uc-utility-item { + float: left; + margin-left: 10px; +} +#uc-header .uc-utility-btn-wrap { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: 1px 1px 0 0 #000000; + -webkit-box-shadow: 1px 1px 0 0 #000000; + box-shadow: 1px 1px 0 0 #000000; + + /* + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 0 0 #000000;*/ +} +#uc-header .uc-utility-btn { + + display:block; + position:relative; + width:32px; + height:32px; + background-color:#27355f; + border:1px solid #1e2b51; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + + -moz-box-shadow: inset 1px 1px 0 #3957b0; + -webkit-box-shadow: inset 1px 1px 0 #3957b0; + box-shadow: inset 1px 1px 0 #3957b0; + + background: #304994; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzMwNDk5NCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxYzMxNzMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #304994 0%, #1c3173 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#304994), color-stop(100%,#1c3173)); + background: -webkit-linear-gradient(top, #304994 0%,#1c3173 100%); + background: -o-linear-gradient(top, #304994 0%,#1c3173 100%); + background: -ms-linear-gradient(top, #304994 0%,#1c3173 100%); + background: linear-gradient(to bottom, #304994 0%,#1c3173 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#304994', endColorstr='#1c3173',GradientType=0 ); +/* background: linear-gradient(to bottom, #304994 0%, #1C3173 100%) repeat scroll 0 0 rgba(0, 0, 0, 0); + border: 1px solid #1E2B51; + border-radius: 3px 3px 3px 3px; + box-shadow: 1px 1px 0 #3957B0 inset; + display: block; + height: 32px; + position: relative; + width: 32px;*/ +} +.ie9 #uc-header .uc-utility-btn { + filter: none; +} +.uc-utility-btn svg { + fill: #C1E8F8; + position: absolute; +} +.uc-utility-btn:hover svg { + fill: #FFFFFF; +} +#uc-utility-btn-search svg, #uc-utility-btn-search #uc-utility-btn-fallback { + left: 7px; + position: absolute; + top: 7px; +} +#uc-utility-btn-az svg { + left: 6px; + top: 11px; +} +#uc-utility-btn-dash svg { + left: 9px; + top: 9px; +} +#uc-utility-btn-search { + float: left; +} +#uc-search { + display: block; + float: left; + position: relative; +} +#uc-search label { + position: absolute; + visibility: hidden; +} +#uc-header .container #uc-search fieldset { + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 1px rgba(255, 255, 255, 0.2); +} +#uc-search #uc-search-field { + background-color: #212976; + background-image: none; + border-left: 1px solid #070E24; + border-radius: 3px 3px 3px 3px; + border-top: 1px solid #070E24; + box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3) inset; + color: #FFFFFF; + line-height: 20px; + padding: 7px 28px 4px 7px; + width: 175px; +} +#uc-search #uc-search-button { + left: 9px; + margin-top: -10px; + position: absolute; + top: 18px; +} +#uc-utility-btn-fallback { + display: block; +} +#uc-utility-btn-svg { + display: none; +} +.uc-svg #uc-utility-btn-svg { + display: block; +} +.uc-svg #uc-utility-btn-fallback { + display: none; +} +#uc-header { + background-color: #0F1938; + color: #FFFFFF; +} +.uc-svg #uc-logo-svg { + fill: #FFFFFF; +} +.uc-svg #uc-header #uc-title-universityof-svg, .uc-svg #uc-header #uc-title-connecticut-svg, .uc-svg #uc-header #uc-hc-health-center-svg { + fill: #9FAAB2; +} +@media (max-width: 767px) { +body { + padding-left: 0; + padding-right: 0; +} +#uc-logo { + border-right: 0 none; +} +} +@media (max-width: 680px) { +#uc-title { + padding-left: 5px; + width: 200px; +} +#uc-title a { + margin-top: 3px; +} +#uc-title-universityof #uc-title-universityof-svg, #uc-title-connecticut #uc-title-connecticut-svg { + height: 10px; + position: relative; + top: -8px; +} +#uc-search #uc-search-field { + width: 140px; +} +} +@media (max-width: 510px) { +#uc-title { + display: none; +} +} +@media (max-width: 321px) { +#uc-search #uc-search-field { + width: 85px; +} +} +#uc-titlebar.uc-titlebar-gradient { + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9Ijg1JSIgc3RvcC1jb2xvcj0iI2Y5ZjlmOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMmYyZjIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #ffffff 0%, #f9f9f9 75%, #e7e7e7 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(75%,#f9f9f9), color-stop(100%,#e7e7e7)); + background: -webkit-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: -o-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: -ms-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: linear-gradient(to bottom, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e7e7e7',GradientType=0 ); +} +.ie10 #uc-titlebar.uc-titlebar-gradient, +.gt10 #uc-titlebar.uc-titlebar-gradient { + filter:none; +} +#uc-navbar { + margin-bottom:0; + } + #uc-navbar .navbar-inner { + padding: 0; + border-radius:0; + border-color:transparent; + border-width:0; + filter:none; + -webkit-box-shadow:none; + -moz-box-shadow:none; + box-shadow:none; + background-color:transparent; + background-image:none; + } + #uc-navbar.navbar .menu-icon { + display:block; + float:left; + } + #uc-navbar.navbar .menu-label { + display:block; + float:left; + padding-left:10px; + color: rgba(17,23,57,.6); + font:500 15px 'Proxima Nova', Helvetica, Arial, sans-serif; + text-shadow: 0px 1px 0 rgba(255, 255, 255, 0.9); + } + .navbar .nav { + width:100%; + margin-right:0; + } + #uc-navbar.navbar .nav > li > a { + color: rgba(17,23,57,.8); + font:500 15px 'Proxima Nova', Helvetica, Arial, sans-serif; + } + #uc-navbar.navbar .nav > li > a:hover, + #uc-navbar.navbar .nav > li.open > a.dropdown-toggle { + color:rgba(17,23,57,1); + text-shadow: 0px 1px 0 rgba(255, 255, 255, 0.9); + } + #uc-navbar.navbar .nav > .active > a, + #uc-navbar.navbar .nav > .active > a:hover, + #uc-navbar.navbar .nav > .active > a:focus { + color:rgba(17,23,57,.55); + text-decoration: none; + background-color:transparent; + -webkit-box-shadow:none; + -moz-box-shadow:none; + box-shadow:none; + } + #uc-navbar .dropdown-menu { + border-radius:0; + } + #uc-navbar .caret { + margin-left: 4px; + } diff --git a/template/css/prod.css b/template/css/prod.css new file mode 100644 index 0000000..a3a8e79 --- /dev/null +++ b/template/css/prod.css @@ -0,0 +1,4 @@ +/* Suppress All Wordpress errors on widgets. This is for Prod only. Not for DEV or TEST. */ +.suppress-errors-hack { + display: none; + } \ No newline at end of file diff --git a/template/css/style.css b/template/css/style.css new file mode 100644 index 0000000..0002384 --- /dev/null +++ b/template/css/style.css @@ -0,0 +1,953 @@ + +#wp-admin-bar-wp-logo > .ab-item .ab-icon { + background-image: url("../../plugins/uc-admin-themes/logo.png"); + background-position: 0 1px !important; + width: 120px; +} +#wp-admin-bar-wp-logo-default, #wp-admin-bar-wp-logo-external, img.avatar, #wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { + display: none !important; +} +#wp-admin-bar-root-default, #wp-admin-bar-wp-logo, #wp-admin-bar-wp-logo .ab-item, #wp-admin-bar-wp-logo .ab-item .ab-icon, #wp-admin-bar-root-default:hover, #wp-admin-bar-wp-logo:hover, #wp-admin-bar-wp-logo .ab-item:hover, #wp-admin-bar-wp-logo .ab-item .ab-icon:hover { + background-color: #464646 !important; +} +#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li { + margin-left: 0 !important; +} +#signup-welcome { + display: none; +} +/* +@font-face { + font-family: "Proxima Nova"; + font-style: normal; + font-weight: normal; + src: url("fonts/proximanova_regular/ProximaNova-Reg-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/proximanova_regular/ProximaNova-Reg-webfont.svg#proxima_nova_rgregular") format("svg"), url("fonts/proximanova_regular/ProximaNova-Reg-webfont.woff") format("woff"), url("fonts/proximanova_regular/ProximaNova-Reg-webfont.ttf") format("truetype"); +} +@font-face { + font-family: "Proxima Nova"; + font-style: italic; + font-weight: normal; + src: url("fonts/proximanova_italic/ProximaNova-RegIt-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/proximanova_italic/ProximaNova-RegIt-webfont.svg#proxima_novaregular_italic") format("svg"), url("fonts/proximanova_italic/ProximaNova-RegIt-webfont.woff") format("woff"), url("fonts/proximanova_italic/ProximaNova-RegIt-webfont.ttf") format("truetype"); +}*/ +/*@font-face { + font-family: "Proxima Nova"; + font-style: normal; + font-weight: 500; + src: url("../fonts/proxima-nova/ProximaNova-Sbold-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/proxima-nova/ProximaNova-Sbold-webfont.svg#proxima_nova_ltsemibold") format("svg"), url("../fonts/proxima-nova/ProximaNova-Sbold-webfont.woff") format("woff"), url("../fonts/proxima-nova/ProximaNova-Sbold-webfont.ttf") format("truetype"); +}*//* +@font-face { + font-family: "Proxima Nova"; + font-style: italic; + font-weight: 500; + src: url("fonts/proximanova_semibolditalic/ProximaNova-SboldIt-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/proximanova_semibolditalic/ProximaNova-SboldIt-webfont.svg#proxima_nova_ltsemibold") format("svg"), url("fonts/proximanova_semibolditalic/ProximaNova-SboldIt-webfont.woff") format("woff"), url("fonts/proximanova_semibolditalic/ProximaNova-SboldIt-webfont.ttf") format("truetype"); +} +@font-face { + font-family: "Proxima Nova"; + font-style: normal; + font-weight: bold; + src: url("fonts/proximanova_bold/ProximaNova-Bold-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/proximanova_bold/ProximaNova-Bold-webfont.svg#proxima_nova_ltsemibold") format("svg"), url("fonts/proximanova_bold/ProximaNova-Bold-webfont.woff") format("woff"), url("fonts/proximanova_bold/ProximaNova-Bold-webfont.ttf") format("truetype"); +} +@font-face { + font-family: "Proxima Nova"; + font-style: italic; + font-weight: bold; + src: url("fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.svg#proxima_novabold_italic") format("svg"), url("fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.woff") format("woff"), url("fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.ttf") format("truetype"); +}*/ +#uc-titlebar { + background: none repeat scroll 0 0 #FFFFFF; + border-bottom-color: #B8BCC9; + margin-bottom: 0; +} +#uc-titlebar.uc-titlebar-gradient { + background: linear-gradient(to bottom, #FFFFFF 0%, #F9F9F9 75%, #E7E7E7 100%) repeat scroll 0 0 rgba(0, 0, 0, 0); +} +.ie10 #uc-titlebar.uc-titlebar-gradient, .gt10 #uc-titlebar.uc-titlebar-gradient { + filter: none; +} +#uc-site-header { + padding-bottom: 15px; + padding-right: 270px; + padding-top: 30px; +} +#uc-site-parent, #uc-site-title { + font-weight: normal; + line-height: inherit; + margin: 0; +} +#uc-site-parent { + padding-left: 15px; + text-transform: uppercase; +} +#uc-site-parent a { + color: #868695; + display: block; + float: left; + font: 13px 'Proxima Nova',Helvetica,Arial,sans-serif; + letter-spacing: 1px; + margin-bottom: 5px; +} +#uc-site-title { + padding-left: 15px; +} +#uc-site-title a { + clear: both; + color: #0B1860; + display: block; + float: left; + font: 500 24px 'Proxima Nova',Helvetica,Arial,sans-serif; + word-wrap: break-word; +} +#uc-navbar { + margin-bottom: 0; +} +#uc-navbar .navbar-inner { + background-color: rgba(0, 0, 0, 0); + background-image: none; + border-color: rgba(0, 0, 0, 0); + border-radius: 0 0 0 0; + border-width: 0; + box-shadow: none; + filter: none; + padding: 0; +} +#uc-navbar.navbar .menu-icon { + display: block; + float: left; +} +#uc-navbar.navbar .menu-label { + color: rgba(17, 23, 57, 0.6); + display: block; + float: left; + font: 500 15px 'Proxima Nova',Helvetica,Arial,sans-serif; + padding-left: 10px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9); +} +.navbar .nav { + margin-right: 0; + width: 100%; +} +#uc-navbar.navbar .nav > li > a { + color: rgba(17, 23, 57, 0.8); + font: 500 15px 'Proxima Nova',Helvetica,Arial,sans-serif; +} +.ie #uc-navbar.navbar .nav li a { + color: #333333; + font-weight: bold; +} +.ie #uc-navbar.navbar .nav li li a:hover { + color: #FFFFFF; +} +#uc-navbar.navbar .nav > li > a:hover, #uc-navbar.navbar .nav > li.open > a.dropdown-toggle { + color: #111739; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9); +} +#uc-navbar.navbar .nav > .active > a, #uc-navbar.navbar .nav > .active > a:hover, #uc-navbar.navbar .nav > .active > a:focus { + background-color: rgba(0, 0, 0, 0); + box-shadow: none; + color: rgba(17, 23, 57, 0.55); + text-decoration: none; +} +#uc-navbar .dropdown-menu { + border-radius: 0 0 0 0; +} +#uc-navbar .caret { + margin-left: 4px; +} +body { + background-color: #F6F6F6; +} +#top-gradient { + background: linear-gradient(to bottom, #FFFFFF 0%, #F6F6F6 100%) repeat scroll 0 0 rgba(0, 0, 0, 0); + height: 400px; + margin-bottom: -400px; +} +.ie10 #top-gradient, .gt10 #top-gradient { + filter: none; +} +.ie8 #top-gradient { + display: none; +} +#uc-main { + padding-top: 20px; +} +.lte9 #uc-main { + position: relative; +} +#home .row-fluid + .row-fluid { + margin-top: 40px; +} +.entry-content img, .comment-content img, .widget img { + max-width: 100%; +} +img[class*="align"], img[class*="wp-image-"], img[class*="attachment-"] { + height: auto; +} +img.size-full, img.size-large, img.header-image, img.wp-post-image { + height: auto; + max-width: 100%; +} +embed, iframe, object, video { + max-width: 100%; +} +.entry-content .twitter-tweet-rendered { + max-width: 100% !important; +} +.entry-content dl.gallery-item { + margin: 0; +} +.gallery-item a, .gallery-caption { + width: 90%; +} +.gallery-item a { + display: block; +} +.gallery-caption a { + display: inline; +} +.gallery-columns-1 .gallery-item a { + max-width: 100%; + width: auto; +} +.gallery .gallery-icon img { + height: auto; + max-width: 90%; + padding: 5%; +} +.gallery-columns-1 .gallery-icon img { + padding: 3%; +} +.content { + font-family: "Proxima Nova",sans-serif; + word-wrap: break-word; +} +.lte9 .content { + font-family: Helvetica,Arial,sans-serif; +} +.content h1 { + font-size: 21px; + line-height: 28px; +} +.content h2 { + font-size: 18px; + line-height: 24px; +} +.content h3 { + font-size: 16px; + line-height: 20px; +} +.content h4, .content h5, .content h6 { + font-size: 14px; + line-height: 18px; +} +.ie8 .content h1, .ie8 .content h2, .ie8 .content h3, .ie8 .content h4, .ie8 .content h5, .ie8 .content h6 { + font-weight: bold; +} +.content blockquote p { + font-size: 14px; +} +.content cite { + color: #999999; + display: block; + font-style: italic; +} +.content code { + font-size: 11px; +} +.content pre { + font-size: 11px; + line-height: 18px; +} +.content a { + border-bottom: 1px solid #CFEDFF; +} +.content .gallery a { + border-bottom: medium none; +} +.content a:hover { + border-bottom-color: #005580; + text-decoration: none; +} +.content img { +} +.lte9 .content .img { +} +.content .alignright { + float: right; + margin: 0 0 20px 20px; +} +.content .alignleft { + float: left; + margin: 0 20px 20px 0; +} +.content .aligncenter { + margin-bottom: 20px; +} +.content .aligncenter { + margin-left: auto; + margin-right: auto; + text-align: center; +} +.content .wp-caption { + max-width: 100% !important; +} +.content .wp-caption-text { + color: #5C5C5C; + font-size: 0.8em; + font-style: italic; + text-align: left; + text-indent: 3px; +} +.content table { + margin-bottom: 20px; + width: 100%; +} +.content table th, .content table td { + border-top: 1px solid #DDDDDD; + line-height: 20px; + padding: 8px; + text-align: left; + vertical-align: top; +} +.content table th { + font-weight: bold; +} +.content table thead th { + vertical-align: bottom; +} +.content table caption + thead tr:first-child th, .content table caption + thead tr:first-child td, .content table colgroup + thead tr:first-child th, .content table colgroup + thead tr:first-child td, .content table thead:first-child tr:first-child th, .content table thead:first-child tr:first-child td { + border-top: 0 none; +} +.content table tbody + tbody { + border-top: 2px solid #DDDDDD; +} +.content table .content table { + background-color: #FFFFFF; +} +.content table-condensed th, .content table-condensed td { + padding: 4px 5px; +} +.content table tbody > tr:nth-child(2n+1) > td, .content table striped tbody > tr:nth-child(2n+1) > th { + background-color: #F9F9F9; +} +.post { + background-color: #FFFFFF; + border: medium none; + border-radius: 7px 7px 7px 7px; + box-shadow: 0 1px 1px 1px #EEEEEE; + padding: 20px 40px 50px; +} +.posts .post { + margin-bottom: 30px; +} +.post-meta { + color: #999999; + font-size: 90%; +} +.content .post-meta a { + border-bottom-width: 0; + color: #999999; +} +.content .post-meta a:hover { + color: #0099FF; + text-decoration: underline; +} +.post-meta i { + margin: -1px 5px 0 0; + opacity: 0.3; +} +.post-date, .post-author, .post-tags { + margin-right: 15px; +} +.post-tags { + color: #CCCCCC; +} +.navigation { + margin-bottom: 10px; + padding: 20px 0; +} +.navigation .older { + float: left; +} +.navigation .newer { + float: right; +} +.navigation a { + display: inline-block; + max-width: 400px; + word-wrap: break-word; +} +.author-info { + background-color: #F7F7F7; + border: 1px solid #EEEEEE; + border-radius: 7px 7px 7px 7px; + margin-bottom: 30px; + padding: 20px; +} +#sidebar-widgets { + margin: 0; +} +.widget { + background-color: #FFFFFF; + border: 1px solid #E0E0E0; + border-radius: 7px 7px 7px 7px; + font-family: "Proxima Nova",sans-serif; + font-size: 90%; + list-style-type: none; + margin-bottom: 20px; + min-height: 20px; + overflow: hidden; +} +.lte9 .widget { + font-family: Helvetica,Arial,sans-serif; +} +.widget-title { + -moz-font-feature-settings: normal; + -moz-font-language-override: normal; + background: linear-gradient(to bottom, #FFFFFF 0%, #F1F1F1 100%) repeat scroll 0 0 rgba(0, 0, 0, 0); + border-bottom: 1px solid #E0E0E0; + color: #333333; + font-family: 'Proxima Nova',Helvetica,Arial,sans-serif; + font-size: 13px; + font-size-adjust: none; + font-stretch: normal; + font-style: normal; + font-variant: normal; + font-weight: 500; + line-height: normal !important; + margin: 0; + padding: 11px 10px 7px; + text-shadow: 0 1px 0 #FFFFFF; +} +.ie10 .widget-title, #uc-navbar .navbar-inner { + filter: none; +} +.lte9 .widget-title { + background-color: #CCCCCC; + font-family: Helvetica,Arial,sans-serif; +} +.lte8 .widget-title { + background-color: #EEEEEE; + font-weight: bold; +} +.widget_archive ul, .widget_categories ul, .widget_meta ul, .widget_pages ul, .widget_recent_comments ul, .widget_recent_entries ul { + list-style-type: none; + margin: 10px; +} +.widget_archive ul ul, .widget_categories ul ul, .widget_meta ul ul, .widget_pages ul ul, .widget_recent_comments ul ul, .widget_recent_entries ul ul { + color: #B9B9B9; + list-style-type: circle; + margin: 0 0 5px 18px; +} +.widget_calendar table { + margin-bottom: 0; + margin-top: 10px; +} +.widget_rss { +} +.widget_rss .widget-title { + position: relative; + top: 1px; +} +.widget_rss .widget-title img { + position: relative; + top: -1px; +} +.widget_rss ul { + list-style-type: none; + margin: 15px; +} +.widget_rss li { + margin: 15px 0; +} +.widget_rss ul .rsswidget { + display: block; +} +.widget_rss .rss-date { + color: #AAAAAA; + display: block; + font-size: 0.8em; +} +.widget_rss .rssSummary { + display: block; +} +.widget_rss cite { + color: #AAAAAA; + display: block; + font-size: 0.8em; +} +.widget_tag_cloud .tagcloud { + margin: 15px 20px; +} +.widget_nav_menu { +} +.widget_nav_menu .menu { + list-style-type: none; + margin-left: 15px; + margin-top: 10px; +} +.widget_text { +} +.textwidget { + padding: 15px; +} +.textwidget { + font-family: "Proxima Nova",sans-serif; + word-wrap: break-word; +} +.lte9 .textwidget { + font-family: Helvetica,Arial,sans-serif; +} +.textwidget h1 { + font-size: 21px; + line-height: 28px; +} +.textwidget h2 { + font-size: 18px; + line-height: 24px; +} +.textwidget h3 { + font-size: 16px; + line-height: 20px; +} +.textwidget h4, .textwidget h5, .textwidget h6 { + font-size: 14px; + line-height: 18px; +} +.textwidget blockquote p { + font-size: 14px; +} +.textwidget code { + font-size: 11px; +} +.textwidget pre { + font-size: 11px; + line-height: 18px; +} +.textwidget a { + border-bottom: 1px solid #CFEDFF; +} +.textwidget .gallery a { + border-bottom: medium none; +} +.textwidget a:hover { + border-bottom-color: #005580; + text-decoration: none; +} +.textwidget img { + max-width: 100% !important; +} +.lte9 .textwidget .img { + width: 100% !important; +} +.widget_search { +} +.widget_search #searchform { + padding: 15px 15px 0; +} +.span3 input, .span3 textarea, .span3 .uneditable-input { + max-width: 174px; +} +#searchsubmit { + -moz-border-bottom-colors: none; + -moz-border-left-colors: none; + -moz-border-right-colors: none; + -moz-border-top-colors: none; + background-color: #F5F5F5; + background-image: linear-gradient(to bottom, #FFFFFF, #E6E6E6); + background-repeat: repeat-x; + border-color: #CCCCCC #CCCCCC #B3B3B3; + border-image: none; + border-radius: 4px 4px 4px 4px; + border-style: solid; + border-width: 1px; + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + color: #333333; + cursor: pointer; + display: inline-block; + font-size: 14px; + line-height: 20px; + margin-bottom: 10px; + padding: 4px 12px; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; +} +.widget_sp_image { + background-color: rgba(0, 0, 0, 0); + border: medium none; +} +.widget_sp_image img { + max-width: 100% !important; +} +.widget_rcpt { +} +.rcpt_items { + width: 100%; +} +.rcpt_items + .rcpt_items { + border-top: 1px solid #EEEEEE; +} +.rcpt_items:after { + clear: both; + content: "."; + display: block; + height: 0; + line-height: 0; + visibility: hidden; +} +.rcpt_items { + display: inline-block; +} +html[xmlns] .rcpt_items { + display: block; +} +* html .rcpt_items { + height: 1%; +} +.rcpt_items_list { + list-style-type: none; + margin: 0; + padding: 10px; +} +.rcpt_items_list li { + list-style-type: none; + margin: 0; +} +.rcpt_item_title { + font-size: 110%; + font-weight: bold; +} +.rcpt_item_image { + float: right; + margin: 0 0 10px 10px; +} +.lte9 .rcpt_item_image img { + width: 150px; +} +.rcpt_item_excerpt { + margin: 10px 0; +} +.rcpt_item_date { +} +.uc-ssw { + border: medium none; +} +.uc-ssw .theme-light.slider-wrapper { + padding: 0 !important; +} +.uc-ssw .nivoSlider { + margin-bottom: 0 !important; + overflow: hidden; +} +.span3 .uc-ssw .nivoSlider { + height: 86px; +} +.span4 .uc-ssw .nivoSlider { + height: 117px; +} +.span6 .uc-ssw .nivoSlider { + height: 179px; +} +.span8 .uc-ssw .nivoSlider { + height: 241px; +} +.span9 .uc-ssw .nivoSlider { + height: 272px; +} +.span12 .uc-ssw .nivoSlider { + height: 366px; +} +@media (min-width: 1200px) { +.span3 .uc-ssw .nivoSlider { + height: 105px; +} +.span4 .uc-ssw .nivoSlider { + height: 144px; +} +.span6 .uc-ssw .nivoSlider { + height: 222px; +} +.span8 .uc-ssw .nivoSlider { + height: 300px; +} +.span9 .uc-ssw .nivoSlider { + height: 338px; +} +.span12 .uc-ssw .nivoSlider { + height: 456px; +} +} +@media (min-width: 980px) and (max-width: 1199px) { +} +@media (min-width: 480px) and (max-width: 979px) { +.span3 .uc-ssw .nivoSlider { + height: 65px; +} +.span4 .uc-ssw .nivoSlider { + height: 89px; +} +.span6 .uc-ssw .nivoSlider { + height: 137px; +} +.span8 .uc-ssw .nivoSlider { + height: 185px; +} +.span9 .uc-ssw .nivoSlider { + height: 209px; +} +.span12 .uc-ssw .nivoSlider { + height: 282px; +} +} +@media (max-width: 479px) { +.span3 .uc-ssw .nivoSlider, .span4 .uc-ssw .nivoSlider, .span6 .uc-ssw .nivoSlider, .span8 .uc-ssw .nivoSlider, .span9 .uc-ssw .nivoSlider, .span12 .uc-ssw .nivoSlider { + height: 117px; +} +} +.uc-ssw .nivoSlider img { + min-height: 100%; + min-width: 100%; +} +#home1 .nivoSlider a.nivo-imageLink { + height: auto !important; + min-height: 100% !important; + min-width: 100% !important; + width: auto !important; +} +.commentlist { + list-style-type: none; + margin-left: 0; +} +.comment, .pingback { + border-top: 1px dotted #DDDDDD; + padding: 30px 0; +} +.comment .comment { + border: medium none; + padding: 0; +} +.comment-body { + min-height: 50px; + padding-left: 175px; + position: relative; +} +.comment .comment .comment-body { + min-height: inherit; + padding: 0; +} +.comment-author { + left: 0; + position: absolute; + top: 0; + width: 150px; +} +.comment .comment .comment-author { + position: relative; + width: auto; +} +.comment-meta { + float: right; +} +.content .comment-meta a { + border-bottom-width: 0; + color: #999999; +} +.content .comment-meta a.comment-edit-link { + border-bottom-width: 1px; + color: #0088CC; +} +.children { + list-style-type: none; + margin-left: 175px; + padding-top: 20px; +} +.children .children { + margin-left: 25px; +} +#commentform { +} +#comment { + width: 100%; +} +.nocomments { + margin: 30px; +} +.uup-list-wrapper { +} +.uup-list, .uup-item { + list-style-type: none; + margin: 0; + padding: 0; +} +.uup-list { +} +.uup-item { + font-size: 13px; + line-height: 16px; + margin: 10px 0; +} +.uup-user { + border: medium none; + display: inline-block; + margin: 5px; + min-height: 110px; + padding-left: 125px; + position: relative; +} +.content a.uup-user { + border-bottom: medium none; +} +.user-profile .uup-user { + padding-left: 0; +} +a.uup-user:hover { +} +.uup-thumbnail { + height: 100px; + left: 5px; + position: absolute; + top: 5px; + width: 100px; +} +.uup-name { + display: block; + font-weight: bold; + padding-bottom: 5px; + padding-top: 25px; +} +.uup-first { + margin-right: 0.3em; +} +.uup-last { +} +.uup-title { + display: block; +} +.uup-phones { +} +.uup-phone1 { + display: block; +} +.uup-phone2 { + display: block; +} +.uup-email { + display: block; +} +.uup-fax { + display: block; +} +.uup-office-location { + display: block; +} +.uup-office-hours { + display: block; +} +.uup-mailing-address { + display: block; +} +#uc-footer { + margin-top: 30px; + padding: 0 20px 20px; +} +#uc-footer-links, #uc-footer-links li { + list-style-type: none; + margin: 0; + padding: 0; +} +#uc-footer-links li { + float: left; + font-size: 0.8em; + margin-right: 2em; +} +#uc-footer-links a { + color: #707070; +} +#uc-footer-links a:hover { + color: #0088CC; +} +@media (max-width: 979px) { +.nav { + padding-top: 10px; + position: relative; +} +#uc-navbar .navbar-inner { + min-height: 0; +} +#uc-nav-mobile { + margin: 0; + position: absolute; + right: 20px; + top: 65px; + width: 70px; +} +#uc-navbar.navbar .nav #sitesearch { + left: 15px; + position: absolute; + top: 10px; +} +html.ua-mobile-android .dropdown-submenu > .dropdown-menu { + display: block; +} +html.ua-mobile-android .dropdown-submenu > a:after { + border: medium none; +} +#uc-site-header { + padding-bottom: 25px; + padding-right: 118px; +} +#uc-site-title { + margin-bottom: 5px; +} +} +@media (max-width: 767px) { +body { + padding-left: 0; + padding-right: 0; +} +#uc-site-header { + padding-bottom: 10px; + padding-left: 10px; + padding-top: 20px; +} +#uc-logo { + border-right: 0 none; +} +#uc-site-parent a { + font-size: 10px; +} +#uc-site-title a { + font-size: 18px; + line-height: 1.1em; +} +#uc-main { + padding-left: 7px; + padding-right: 7px; +} +.post { + padding: 10px 10px 20px; +} +.comment-body { + padding-left: 0; +} +.comment-author { + position: relative; + width: auto; +} +.comment-meta { + float: none; + margin-bottom: 1em; +} +.children { + margin-left: 20px; +} +} +@media (max-width: 680px) { +#uc-footer-links li { + float: none; + font-size: 0.9em; + margin: 0.75em 0; +} +} +@media (max-width: 321px) { +} diff --git a/template/css/style_intranet.css b/template/css/style_intranet.css new file mode 100644 index 0000000..9d658fe --- /dev/null +++ b/template/css/style_intranet.css @@ -0,0 +1,508 @@ + +/* +Max width before this PARTICULAR table gets nasty +This query will take effect for any screen smaller than 760px +and also iPads specifically. +*/ + + +/* Sidebar */ + #menu_cs > a{ + color:green; + } + #one{ + background-color: #d0e9c6; + } + #one > li > a{ + color:#777; + background-color: #d0e9c6; + } + #one > li > a:hover{ + color:#3c763d; + } + .text-center { + padding-top: 20px; + } + .col-xs-12 { + background-color: #fff; + } + #sidebar { + height: 100%; + min-height: 100%; + padding-right: 0; + padding-top: 20px; + + } + #sidebar .nav { + width: 95%; + } + #sidebar li { + border:0 #f2f2f2 solid; + border-bottom-width:1px; + } + + /* collapsed sidebar styles */ + @media screen and (max-width: 767px) { + .row-offcanvas { + position: relative; + -webkit-transition: all 0.25s ease-out; + -moz-transition: all 0.25s ease-out; + transition: all 0.25s ease-out; + } + .row-offcanvas-right + .sidebar-offcanvas { + right: -41.6%; + } + + .row-offcanvas-left + .sidebar-offcanvas { + left: -41.6%; + } + .row-offcanvas-right.active { + right: 41.6%; + } + .row-offcanvas-left.active { + left: 41.6%; + } + .sidebar-offcanvas { + position: absolute; + top: 0; + width: 41.6%; + } + #sidebar { + background-color:#3b3b3b; + padding-top:0; + } + #sidebar .nav>li { + color: #ddd; + background: linear-gradient(#3E3E3E, #383838); + border-top: 1px solid #484848; + border-bottom: 1px solid #2E2E2E; + } + #sidebar .nav>li:first-child { + border-top:0; + } + #sidebar .nav>li>a { + color: #ddd; + } + #sidebar .nav>li>a>img { + max-width: 14px; + } + #sidebar .nav>li>a:hover, #sidebar .nav>li>a:focus { + text-decoration: none; + background: linear-gradient(#373737, #323232); + color: #fff; + } + #sidebar .nav .caret { + border-top-color: #fff; + border-bottom-color: #fff; + } + #sidebar .nav a:hover .caret{ + border-top-color: #fff; + border-bottom-color: #fff; + } + } + +/* End Sidebar */ +/* Navbar Mod's */ + + .navbar { + margin-bottom:-1px; + border-radius:0; + font-size:13px; + min-height:0px; + z-index: 100; + } + + + #submenu { + background: #e7e7e7; + margin-bottom:20px; + + } + .navbar-default .nav > li > a, + .navbar-default .navbar-right > li > a + { + padding:10px; + + + } + .navbar-default .nav > li > a:hover, + .navbar-default .navbar-right > li > a:hover { + color:#ac0000; + } + .collapsing { + display:none; + } + .navbar-brand, .navbar-text{ + + color: #000E2F !important; + font-size:13px; + padding:10px; + margin:0; + } + .container-fluid{ /* Fixes margin problem with Bootstrap 3.0 */ + margin-left: 15px !important; + margin-right: 15px !important; + } + +/* Begin CSS From Hale Template for UCONN Banner */ + #uc-header { + } + #uc-header .container { + height: 55px; + position: relative; + } + #uc-header .container * { + background-image: none; + border: 0 none; + border-radius: 0 0 0 0; + box-shadow: none; + color: #000000; + font-family: inherit; + font-size: 1em; + font-style: normal; + font-weight: normal; + line-height: normal; + list-style-type: none; + margin: 0; + min-height: 0; + outline: 0 none; + padding: 0; + text-decoration: none; + transition: none 0s ease 0s; + vertical-align: baseline; + } + #uc-identity { + } + #uc-header #uc-logo { + display: block; + left: 12px; + position: absolute; + top: 18px; + } + #uc-header #uc-logo a { + display: block; + } + #uc-header #uc-logo-fallback { + display: block; + } + .uc-svg #uc-header #uc-logo-fallback { + display: none; + } + #uc-header #uc-logo-svg { + display: none; + } + .uc-svg #uc-header #uc-logo-svg { + display: block; + } + #uc-header.container #uc-utility-btn-az { + display: block; + } + #uc-header .container #uc-utility-btn-az-fallback { + color: #FFFFFF; + display: block; + font-size: 80%; + font-weight: bold; + padding-top: 8px; + text-align: center; + } + #uc-header #uc-utility-btn-az-svg { + display: none; + } + .uc-svg #uc-header #uc-utility-btn-az-svg { + display: block; + } + .uc-svg #uc-header #uc-utility-btn-az-fallback { + display: none; + } + #uc-header #uc-title { + border-left: 2px solid #3F4760; + height: 21px; + left: 124px; + padding-left: 9px; + position: absolute; + top: 18px; + } + #uc-header #uc-title a { + display: block; + height: 13px; + margin-top: 4px; + } + #uc-header #uc-title-universityof, #uc-header #uc-title-connecticut { + float: left; + } + #uc-header #uc-title-universityof *, #uc-header #uc-title-universityof img { + height: 13px; + max-width: none; + width: 145px; + } + #uc-header #uc-title-connecticut *, #uc-header #uc-title-connecticut img { + height: 13px; + max-width: none; + width: 140px; + } + .uc-header-fallback { + } + #uc-header #uc-title-universityof-fallback { + margin-right: 7px; + } + #uc-header #uc-title-universityof-svg, #uc-header #uc-title-connecticut-svg { + display: none; + } + .uc-svg #uc-header #uc-title-universityof-svg, .uc-svg #uc-header #uc-title-connecticut-svg { + display: inline; + } + .uc-svg #uc-header #uc-title-universityof-svg { + margin-right: 7px; + } + #uc-header .uc-svg .uc-header-fallback { + display: none; + } + #uc-header #uc-hc { + border-left: 2px solid #3F4760; + height: 21px; + left: 124px; + padding-left: 9px; + position: absolute; + top: 18px; + } + #uc-header #uc-hc a { + display: block; + height: 13px; + margin-top: 4px; + } + #uc-header #uc-hc-health-center { + float: left; + } + #uc-header #uc-hc-health-center * { + height: 13px; + width: 145px; + } + #uc-header #uc-hc-health-center * { + height: 13px; + width: 140px; + } + #uc-header #uc-hc-health-center-svg { + display: none; + } + .uc-svg #uc-header #uc-hc-health-center-svg { + display: inline; + } + .uc-svg .uc-header-fallback { + display: none; + } + #uc-header #uc-utility { + float: right; + width: auto; + } + #uc-header #uc-utility-list { + padding: 11px 20px 0 0; + } + #uc-header .uc-utility-item { + float: left; + margin-left: 10px; + } + #uc-header .uc-utility-btn-wrap { + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: 1px 1px 0 0 #000000; + -webkit-box-shadow: 1px 1px 0 0 #000000; + box-shadow: 1px 1px 0 0 #000000; + + /* + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 0 0 #000000;*/ + } + #uc-header .uc-utility-btn { + + display:block; + position:relative; + width:32px; + height:32px; + background-color:#27355f; + border:1px solid #1e2b51; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + + -moz-box-shadow: inset 1px 1px 0 #3957b0; + -webkit-box-shadow: inset 1px 1px 0 #3957b0; + box-shadow: inset 1px 1px 0 #3957b0; + + background: #304994; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzMwNDk5NCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxYzMxNzMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #304994 0%, #1c3173 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#304994), color-stop(100%,#1c3173)); + background: -webkit-linear-gradient(top, #304994 0%,#1c3173 100%); + background: -o-linear-gradient(top, #304994 0%,#1c3173 100%); + background: -ms-linear-gradient(top, #304994 0%,#1c3173 100%); + background: linear-gradient(to bottom, #304994 0%,#1c3173 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#304994', endColorstr='#1c3173',GradientType=0 ); + /* background: linear-gradient(to bottom, #304994 0%, #1C3173 100%) repeat scroll 0 0 rgba(0, 0, 0, 0); + border: 1px solid #1E2B51; + border-radius: 3px 3px 3px 3px; + box-shadow: 1px 1px 0 #3957B0 inset; + display: block; + height: 32px; + position: relative; + width: 32px;*/ + } + .ie9 #uc-header .uc-utility-btn { + filter: none; + } + .uc-utility-btn svg { + fill: #C1E8F8; + position: absolute; + } + .uc-utility-btn:hover svg { + fill: #FFFFFF; + } + #uc-utility-btn-search svg, #uc-utility-btn-search #uc-utility-btn-fallback { + left: 7px; + position: absolute; + top: 7px; + } + #uc-utility-btn-az svg { + left: 6px; + top: 11px; + } + #uc-utility-btn-dash svg { + left: 9px; + top: 9px; + } + #uc-utility-btn-search { + float: left; + } + #uc-search { + display: block; + float: left; + position: relative; + } + #uc-search label { + position: absolute; + visibility: hidden; + } + #uc-header .container #uc-search fieldset { + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 1px rgba(255, 255, 255, 0.2); + } + #uc-search #uc-search-field { + background-color: #212976; + background-image: none; + border-left: 1px solid #070E24; + border-radius: 3px 3px 3px 3px; + border-top: 1px solid #070E24; + box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3) inset; + color: #FFFFFF; + line-height: 20px; + padding: 7px 28px 4px 7px; + width: 175px; + } + #uc-search #uc-search-button { + left: 9px; + margin-top: -10px; + position: absolute; + top: 18px; + } + #uc-utility-btn-fallback { + display: block; + } + #uc-utility-btn-svg { + display: none; + } + .uc-svg #uc-utility-btn-svg { + display: block; + } + .uc-svg #uc-utility-btn-fallback { + display: none; + } + #uc-header { + background-color: #0F1938; + color: #FFFFFF; + } + .uc-svg #uc-logo-svg { + fill: #FFFFFF; + } + .uc-svg #uc-header #uc-title-universityof-svg, .uc-svg #uc-header #uc-title-connecticut-svg, .uc-svg #uc-header #uc-hc-health-center-svg { + fill: #9FAAB2; + } + @media (max-width: 767px) { + body { + padding-left: 0; + padding-right: 0; + } + #uc-logo { + border-right: 0 none; + } + } + @media (max-width: 680px) { + #uc-title { + padding-left: 5px; + width: 200px; + } + #uc-title a { + margin-top: 3px; + } + #uc-title-universityof #uc-title-universityof-svg, #uc-title-connecticut #uc-title-connecticut-svg { + height: 10px; + position: relative; + top: -8px; + } + #uc-search #uc-search-field { + width: 140px; + } + } + @media (max-width: 510px) { + #uc-title { + display: none; + } + } + @media (max-width: 321px) { + #uc-search #uc-search-field { + width: 85px; + } + } + #uc-titlebar.uc-titlebar-gradient { + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9Ijg1JSIgc3RvcC1jb2xvcj0iI2Y5ZjlmOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMmYyZjIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #ffffff 0%, #f9f9f9 75%, #e7e7e7 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(75%,#f9f9f9), color-stop(100%,#e7e7e7)); + background: -webkit-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: -o-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: -ms-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: linear-gradient(to bottom, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e7e7e7',GradientType=0 ); + } + .ie10 #uc-titlebar.uc-titlebar-gradient, + .gt10 #uc-titlebar.uc-titlebar-gradient { + filter:none; + } + +/* End CSS From Hale Template for UCONN Banner */ + + + + + +#main_container{ + height:100%; + width:100%; + padding-left: 25px; + opacity:1.0; + filter:alpha(opacity=100); /* For IE8 and earlier */ +} +#main_container .panel-uc-blue{ + border:1px solid #000E2F; + +} +#main_container .panel-uc-blue>.panel-heading{ + font-weight: bold; + color: #000E2F; + background-color: #E6E7EA; + border-color: #000E2F; +} +.panel{ + opacity:1.0; +} + diff --git a/template/css/style_old.css b/template/css/style_old.css new file mode 100644 index 0000000..09a8ad8 --- /dev/null +++ b/template/css/style_old.css @@ -0,0 +1,1710 @@ +/* +Theme Name: Huskypress: Hale +Author: UConn WebDev +Author URI: http://webdev.uconn.edu/ +Description: This theme uses the new UConn web template, and is mobile responsive. It's built with the Twitter Bootstrap library, and supports traditional site layouts or blogs. +Version: 3.0 +License: GNU General Public License v2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html +Text Domain: hale +*/ + + + + +/** +* #.# Section title +* +* Description of section, whether or not it has media queries, etc. +*/ + + + +/* + + UCONN Web Tempalte v5.0 + by UITS WebDev + andrew.bacon@uconn.edu + June 2013 + +*/ + +/* + + UCONN Banner + + Notes + - Built to work independently of any template, theme, or library. + + Changes from UC Template v4 + - all selectors begin with prefix "uc-" + - single CSS file for all color variations. + + Dependencies + - uc-print.css + - uc-modernizr.js + +*/ + +/* Wordpress system hacks */ + +#wp-admin-bar-wp-logo>.ab-item .ab-icon { + background-image:url(../../plugins/uc-admin-themes/logo.png); + background-position:0 1px !important; + + width:120px; + } +#wp-admin-bar-wp-logo-default, +#wp-admin-bar-wp-logo-external { +display:none !important; +} +#wp-admin-bar-root-default, +#wp-admin-bar-wp-logo, +#wp-admin-bar-wp-logo .ab-item, +#wp-admin-bar-wp-logo .ab-item .ab-icon, +#wp-admin-bar-root-default:hover, +#wp-admin-bar-wp-logo:hover, +#wp-admin-bar-wp-logo .ab-item:hover, +#wp-admin-bar-wp-logo .ab-item .ab-icon:hover { +background-color:#464646 !important; +} +img.avatar, +#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img +{display:none; !important} +#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li { +margin-left:0 !important; +} + +#wp-admin-bar-wp-logo.menupop.hover{ +} + + +#signup-welcome {display:none;}/* hack to prevent confusion about login process */ + + +/* END Wordpress hacks */ + + +body { + position: relative; /* so the mobile menu button positions correctly when logged in */ + } + + + + +/* UCONN Top banner */ + + +#uc-header { + } + #uc-header .container { + position: relative; + height:55px; + } + #uc-header .container * { + min-height:0; + margin:0; + padding:0; + border:0; + outline:0; + font-weight:normal; + font-family:inherit; + vertical-align:baseline; + background-image:none; + font-style:normal; + text-decoration:none; + font-size:1em; + line-height:normal; + list-style-type:none; + border-radius:0; + box-shadow:none; + transition:none; + color:#000; + } + #uc-header .row-fluid { + } + + + /* uc-identity refers to University Identity area, includes the UConn Logo and tthe "University of Connecticut" */ + #uc-identity { + } + + + + /* + #uc-logo + - Controls UConn Wordmark logo + - Uses a PNG background image by default, hides SVG + - If uc-modernizr detects support for SVG, background image is hidden, and SVG is displayed. + + */ + + #uc-header #uc-logo { + display:block; + position:absolute; + left:12px; + top:18px; + } + .uc-win #uc-logo { + } + + /* ffox adjustments */ + @-moz-document url-prefix() { + } + + /* chrome chacks */ + @media all and (min-width: 0px) {} + + + #uc-header #uc-logo a { + display:block; + + } + + #uc-logo-fallback, + #uc-logo-svg { + } + + #uc-header #uc-logo-fallback { + display:block; + } + .uc-svg #uc-header #uc-logo-fallback { + display:none; + } + + #uc-header #uc-logo-svg { + display:none; + } + .uc-svg #uc-header #uc-logo-svg { + display:block; + } + + + + #uc-header.container #uc-utility-btn-az { + display:block; + } + #uc-header .container #uc-utility-btn-az-fallback { + color:white; + display:block; + text-align:center; + padding-top:8px; + font-size:80%; + font-weight:bold; + } + #uc-header .container #uc-utility-btn-search-fallback { + color:white; + display:block; + text-align:center; + font-size:80%; + font-weight:bold; + } + + #uc-header #uc-utility-btn-az-svg { + display:none; + } + .uc-svg #uc-header #uc-utility-btn-az-svg { + display:block; + } + .uc-svg #uc-header #uc-utility-btn-az-fallback { + display:none; + } + .uc-svg #uc-header #uc-utility-btn-search-fallback { + display:none; + } + + + + + #uc-header #uc-title { + position:absolute; + top:18px; + left:124px; + height:21px; + padding-left:9px; + border-left:2px solid #3f4760; + + } + #uc-header #uc-title a { + display:block; + height:13px; + margin-top:4px; + } + #uc-header #uc-title a * { + + } + + + #uc-header #uc-title-universityof, + #uc-header #uc-title-connecticut { + float:left; + } + + + #uc-header #uc-title-universityof * { + height:13px; + } + + #uc-header #uc-title-connecticut * { + height:13px; + } + + .uc-header-fallback {} + + #uc-header #uc-title-universityof-fallback { + margin-right:7px; + } + #uc-title-connecticut-fallback { + } + + #uc-header #uc-title-universityof-svg, + #uc-header #uc-title-connecticut-svg { + display:none; + } + .uc-svg #uc-header #uc-title-universityof-svg, + .uc-svg #uc-header #uc-title-connecticut-svg { + display:inline; + } + .uc-svg #uc-header #uc-title-universityof-svg { + margin-right:7px; + } + .uc-svg #uc-header #uc-title-connecticut-svg {} + + + + #uc-header .uc-header-fallback { + } + #uc-header .uc-svg .uc-header-fallback { + display:none; + } + + + + + #uc-header #uc-hc { + position:absolute; + top:18px; + left:124px; + height:21px; + padding-left:9px; + border-left:2px solid #3f4760; + + } + #uc-header #uc-hc a { + display:block; + height:13px; + margin-top:4px; + } + #uc-hc a * { + + } + + + #uc-header #uc-hc-health-center { + float:left; + } + + + #uc-header #uc-hc-health-center * { + height:13px; + width:145px; + } + + #uc-header #uc-hc-health-center * { + height:13px; + width:140px; + } + + #uc-header #uc-hc-health-center-svg { + display:none; + } + .uc-svg #uc-header #uc-hc-health-center-svg { + display:inline; + } + .uc-svg .uc-header-fallback { + display:none; + } + + + #uc-header #uc-utility { + float:right; + width:auto; + } + #uc-header #uc-utility-list { + padding:11px 20px 0 0; + } + #uc-header .uc-utility-item { + float:left; + margin-left:10px; + -moz-box-shadow: 1px 1px 0 0 #000000; + -webkit-box-shadow: 1px 1px 0 0 #000000; + box-shadow: 1px 1px 0 0 #000000; + } + #uc-header .uc-utility-btn { + display:block; + position:relative; + width:32px; + height:32px; + background-color:#27355f; + border:1px solid #1e2b51; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + + -moz-box-shadow: inset 1px 1px 0 #3957b0; + -webkit-box-shadow: inset 1px 1px 0 #3957b0; + box-shadow: inset 1px 1px 0 #3957b0; + + background: #304994; /* Old browsers */ + /* IE9 SVG, needs conditional override of 'filter' to 'none' */ + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzMwNDk5NCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxYzMxNzMiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #304994 0%, #1c3173 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#304994), color-stop(100%,#1c3173)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #304994 0%,#1c3173 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #304994 0%,#1c3173 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #304994 0%,#1c3173 100%); /* IE10+ */ + background: linear-gradient(to bottom, #304994 0%,#1c3173 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#304994', endColorstr='#1c3173',GradientType=0 ); /* IE6-8 */ + } + .ie9 #uc-header .uc-utility-btn { + filter:none; + } + .uc-utility-btn svg { + fill:#c1e8f8; + position:absolute; + } + .uc-utility-btn:hover svg { + fill:#ffffff; + } + #uc-utility-btn-search svg { + right:0px; + top:0px; + } + #uc-utility-btn-az svg { + left:6px; + top:11px; + } + #uc-utility-btn-dash svg { + left:9px; + top:9px; + } + + #uc-utility-btn-search { + float:left; + } + #uc-search { + float:left; + display:block; + position: relative; + } + #uc-search label { + visibility: hidden; + position: absolute; + } + #uc-search #uc-search-field { + width: 175px; + padding: 9px 28px 6px 7px; + background-image: none; + background-color: #163794; + -moz-box-shadow: inset 0 2px 3px rgba(0,0,0,0.5); + -webkit-box-shadow: inset 0 2px 3px rgba(0,0,0,0.5); + box-shadow: inset 0 2px 3px rgba(0,0,0,0.5); + border-radius: 7px; + color: white; + } + #uc-search #uc-search-button { + position: absolute; + right: 7px; + top: 16px; + margin-top: -8px; + } + + +.uc-blue #uc-header { + color:#fff; + background-color:#0f1938; + } + + + .uc-svg .uc-blue #uc-logo-svg { + fill:#ffffff; + } + + .uc-svg #uc-header #uc-title-universityof-svg, + .uc-svg #uc-header #uc-title-connecticut-svg, + .uc-svg #uc-header #uc-hc-health-center-svg { + fill:#9faab2; + } + + + + +#uc-header.uc-white { + border-bottom: 1px solid #ccc; + color:#0b1860; + background-color:#fff; + -moz-box-shadow: 5px 5px 5px rgba(68,68,68,0.6); + -webkit-box-shadow: 5px 5px 5px rgba(68,68,68,0.6); + box-shadow: 5px 5px 5px rgba(68,68,68,0.6); + } + .uc-white #uc-identity { + } + .uc-svg .uc-white #uc-logo-svg { + fill:#0b1860; + } + .uc-white #uc-title { + + } + .uc-white #uc-title a { + color:#9faab2; + } + + + + + + /* + + .uc-blue #uc-search { + position:absolute; + top:13px; + right:20px; + } + #uc-search-label { + margin:0; + line-height:normal; + display:none; + } + #uc-search-text { + background-color: rgb(67, 73, 114); + + display:inline; + height:auto; + width:auto; + + padding: 4px 6px; + margin-left: 0; + margin-bottom: 0; + + vertical-align:auto; + + border: 1px solid #080b26; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #fff; + } + #uc-search-button {} + + */ +/* + + UConn Standard Template + + - Will be separate file on release + - requires bootstrap, jquery + + +*/ + + + +/* --- FONTS +*/ + + /* + * Web Fonts from fontspring.com + * + * All OpenType features and all extended glyphs have been removed. + * Fully installable fonts can be purchased at http://www.fontspring.com + * + * The fonts included in this stylesheet are subject to the End User License you purchased + * from Fontspring. The fonts are protected under domestic and international trademark and + * copyright law. You are prohibited from modifying, reverse engineering, duplicating, or + * distributing this font software. + * + * (c) 2010-2012 Fontspring + * + * + * + * + * The fonts included are copyrighted by the vendor listed below. + * + * Vendor: Mark Simonson Studio + * License URL: http://www.fontspring.com/fflicense/mark-simonson-studio + * + * + */ + /*@font-face { + font-family: 'Proxima Nova'; + src: url('fonts/proximanova_bold/ProximaNova-Bold-webfont.eot'); + src: url('fonts/proximanova_bold/ProximaNova-Bold-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/proximanova_bold/ProximaNova-Bold-webfont.svg#proxima_nova_ltsemibold') format('svg'), + url('fonts/proximanova_bold/ProximaNova-Bold-webfont.woff') format('woff'), + url('fonts/proximanova_bold/ProximaNova-Bold-webfont.ttf') format('truetype'); + font-weight: bold; + font-style: normal; + } + @font-face { + font-family: 'Proxima Nova'; + src: url('fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.eot'); + src: url('fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.svg#proxima_novabold_italic') format('svg'), + url('fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.woff') format('woff'), + url('fonts/proximanova_bolditalic/ProximaNova-BoldIt-webfont.ttf') format('truetype'); + font-weight: bold; + font-style: italic; + + } + @font-face { + font-family: 'Proxima Nova'; + src: url('fonts/proximanova_semibold/ProximaNova-Sbold-webfont.eot'); + src: url('fonts/proximanova_semibold/ProximaNova-Sbold-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/proximanova_semibold/ProximaNova-Sbold-webfont.svg#proxima_nova_ltsemibold') format('svg'), + url('fonts/proximanova_semibold/ProximaNova-Sbold-webfont.woff') format('woff'), + url('fonts/proximanova_semibold/ProximaNova-Sbold-webfont.ttf') format('truetype'); + font-weight: 500; + font-style: normal; + } + @font-face { + font-family: 'Proxima Nova'; + src: url('fonts/proximanova_regular/ProximaNova-Reg-webfont.eot'); + src: url('fonts/proximanova_regular/ProximaNova-Reg-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/proximanova_regular/ProximaNova-Reg-webfont.svg#proxima_nova_rgregular') format('svg'), + url('fonts/proximanova_regular/ProximaNova-Reg-webfont.woff') format('woff'), + url('fonts/proximanova_regular/ProximaNova-Reg-webfont.ttf') format('truetype'); + font-weight: normal; + font-style: normal; + } + + @font-face { + font-family: 'Proxima Nova'; + src: url('fonts/proximanova_italic/ProximaNova-RegIt-webfont.eot'); + src: url('fonts/proximanova_italic/ProximaNova-RegIt-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/proximanova_italic/ProximaNova-RegIt-webfont.svg#proxima_novaregular_italic') format('svg'), + url('fonts/proximanova_italic/ProximaNova-RegIt-webfont.woff') format('woff'), + url('fonts/proximanova_italic/ProximaNova-RegIt-webfont.ttf') format('truetype'); + font-weight: normal; + font-style: italic; + + }*/ + + + +#uc-titlebar { + /*position:relative;*/ + border-bottom:1px solid red; + margin-bottom:20px; + background: #FFF; + border-bottom-color: #b8bcc9; + } + + #uc-titlebar.uc-titlebar-gradient { + + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9Ijg1JSIgc3RvcC1jb2xvcj0iI2Y5ZjlmOSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMmYyZjIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #ffffff 0%, #f9f9f9 75%, #e7e7e7 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(75%,#f9f9f9), color-stop(100%,#e7e7e7)); + background: -webkit-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: -o-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: -ms-linear-gradient(top, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + background: linear-gradient(to bottom, #ffffff 0%,#f9f9f9 75%,#e7e7e7 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e7e7e7',GradientType=0 ); + } + + + + /*.lte9 #uc-titlebar {filter:none; height:300px; border:10px solid red; width:1000px; background:green;}*/ + #uc-site-header { + padding-bottom:15px; + padding-top:30px; + padding-right:270px; + } + #uc-site-parent, + #uc-site-title { + margin:0; + font-weight:normal; + line-height:inherit; + } + #uc-site-parent { + text-transform:uppercase; + padding-left: 15px; + } + #uc-site-parent a { + display:block; + float:left; + color:#868695; + font:13px 'Proxima Nova', Helvetica, Arial, sans-serif; + letter-spacing:1px; + margin-bottom:5px; + } + #uc-site-title { + padding-left: 15px; + + } + #uc-site-title a { + display:block; + float:left; + clear:both; + -ms-word-wrap: break-word; + word-wrap: break-word; + + color:#0b1860; + font:500 24px 'Proxima Nova', Helvetica, Arial, sans-serif; + } + + #uc-navbar { + margin-bottom:0; + } + #uc-navbar .navbar-inner { + padding: 0; + background-color:transparent; + background-image:none; + border-radius:0; + border-color:transparent; + border-width:0; + filter:none; + -webkit-box-shadow:none; + -moz-box-shadow:none; + box-shadow:none; + } + #uc-navbar.navbar .menu-icon { + display:block; + float:left; + } + #uc-navbar.navbar .menu-label { + display:block; + float:left; + padding-left:10px; + color: rgba(17,23,57,.6); + font:500 15px 'Proxima Nova' Helvetica, Arial, sans-serif; + text-shadow: 0px 1px 0 rgba(255, 255, 255, 0.9); + } + + .navbar .nav { + width:100%; + margin-right:0; + } + + #uc-navbar.navbar .nav #sitesearch { + position:absolute; + top:-43px; + right:0; + } + + #uc-navbar.navbar .nav #sitesearch .input-append { + } + #uc-navbar.navbar .nav #sitesearch #sitesearch-input { + width:170px; + } + + #uc-navbar.navbar .nav > li:nth-child(2) a:first-child { + } + + #uc-navbar.navbar .nav li:first-child a { + + } + #uc-navbar.navbar .nav > li > a { + color: rgba(17,23,57,.8); + font:500 15px 'Proxima Nova' Helvetica, Arial, sans-serif; + } + #uc-navbar.navbar .nav > li > a:hover, + #uc-navbar.navbar .nav > li.open > a.dropdown-toggle { + color:rgba(17,23,57,1); + text-shadow: 0px 1px 0 rgba(255, 255, 255, 0.9); + } + #uc-navbar.navbar .nav > .active > a, + #uc-navbar.navbar .nav > .active > a:hover, + #uc-navbar.navbar .nav > .active > a:focus { + + color:rgba(17,23,57,.55); + text-decoration: none; + background-color:transparent; + -webkit-box-shadow:none; + -moz-box-shadow:none; + box-shadow:none; + } + + #uc-navbar .dropdown-menu { + border-radius:0; + } + #uc-navbar .caret { + margin-left: 4px; + } + + + +/* Hale theme proper */ + +#uc-titlebar {margin-bottom:0;} + +body { +background-color:#f6f6f6; +} + +#top-gradient { +height:400px; +margin-bottom:-400px; + + + +background: #ffffff; /* Old browsers */ + +/* IE9 SVG, needs conditional override of 'filter' to 'none' */ + +background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmNmY2ZjYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + +background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 100%); /* FF3.6+ */ + +background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */ + +background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */ + +background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 100%); /* Opera 11.10+ */ + +background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 100%); /* IE10+ */ + +background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 100%); /* W3C */ + +filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-8 */ + +} + + +#uc-main { + padding-top:20px; + + } + .lte9 #uc-main { + position: relative; + } + + +#home div div { + + } +#home .row-fluid+.row-fluid { + margin-top:40px; + } + + + + +.post { + + padding:20px 40px 50px; + border:1px solid #ddd; + border:none; + -webkit-border-radius: 7px; + -moz-border-radius: 7px; + border-radius: 7px; + + -moz-box-shadow: 0px 1px 1px 1px #eee; + -webkit-box-shadow: 0px 1px 1px 1px #eee; + box-shadow: 0px 1px 1px 1px #eee; + background-color: #fff; + } + + .posts .post { + margin-bottom:30px; + } + + .post-meta { + font-size:90%; + color:#999; + } + .content .post-meta a { + color:#999; + border-bottom-width: 0; + } + .content .post-meta a:hover { + color:#09F; + text-decoration: underline; + } + .post-meta i { + opacity:.3; + margin:-1px 5px 0 0; + } + .post-date, + .post-author, + .post-tags { + margin-right: 15px; + } + .post-tags { + color:#ccc; + } + +.navigation { + padding: 20px 0; + margin-bottom: 10px; + } + .navigation a { + -ms-word-wrap: break-word; + word-wrap: break-word; + max-width: 400px; + display: inline-block; + } + .navigation .older { + float: left; + } + .navigation .newer { + float: right; + } + + + .post .wp-caption { + max-width:100% !important; + } + .lte9 .post .wp-caption { + width:100% !important; + } + + +.author-info { + border-radius: 7px; + border:1px solid #eee; + padding: 20px; + background-color: #f7f7f7; + margin-bottom: 30px; + } + +#sidebar-widgets { + margin: 0; + } + +.widget { + overflow:hidden; + list-style-type:none; + border:1px solid #e0e0e0; + border-radius: 7px; + background-color: #fff; + font-size: 90%; + margin-bottom: 20px; + min-height:20px; + font-family: "Proxima Nova", sans-serif; + } + .lte9 .widget { + font-family:Helvetica, Arial, sans-serif; + } + + + + + + .widget-title { + padding:11px 10px 7px; + margin:0; + border-bottom: 1px solid #e0e0e0; + background: #ffffff; /* Old browsers */ + /* IE9 SVG, needs conditional override of 'filter' to 'none' */ + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMWYxZjEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-linear-gradient(top, #ffffff 0%, #f1f1f1 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#f1f1f1)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f1f1f1 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f1f1f1 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f1f1f1 100%); /* IE10+ */ + background: linear-gradient(to bottom, #ffffff 0%,#f1f1f1 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f1f1f1',GradientType=0 ); /* IE6-8 */ + font:500 13px 'Proxima Nova' Helvetica, Arial, sans-serif; + line-height:normal !important; + color:#333; + text-shadow: 0 1px 0 #fff; + font-size: 13px; + font-weight: 500; + } + .lte9 .widget-title { + font-family:Helvetica, Arial, sans-serif; + background-color:#ccc; + } + .lte8 .widget-title { + background-color:#eee; + } + /* specfic widgets */ + + /* Wordpress Standard Widgets */ + + /* List widgets. These just generate ULs */ + .widget_archive ul, + .widget_categories ul, + .widget_meta ul, + .widget_pages ul, + .widget_recent_comments ul, + .widget_recent_entries ul { + margin:10px; + list-style-type: none; + } + .widget_archive ul ul, + .widget_categories ul ul, + .widget_meta ul ul, + .widget_pages ul ul, + .widget_recent_comments ul ul, + .widget_recent_entries ul ul { + list-style-type:circle; + margin: 0 0 5px 18px; + color: #b9b9b9; + } + + + .widget_calendar table { + margin-bottom:0; + margin-top: 10px; + } + + + + .widget_rss {} + .widget_rss .widget-title { + position:relative; + top:1px; + } + .widget_rss .widget-title img { + position: relative; + top:-1px; + } + .widget_rss ul { + list-style-type: none; + margin: 15px; + } + .widget_rss li { + margin:15px 0; + } + .widget_rss ul .rsswidget { + display: block; + } + .widget_rss .rss-date { + display: block; + color: #aaa; + font-size: .8em; + } + .widget_rss .rssSummary { + display: block; + } + .widget_rss cite { + display: block; + color: #aaa; + font-size: .8em; + } + + + .widget_tag_cloud .tagcloud { + margin: 15px 20px; + } + + .widget_nav_menu {} + .widget_nav_menu .menu { + margin-top: 10px; + margin-left:15px; + list-style-type: none; + } + .widget_text {} + .textwidget { + padding:15px; + } + .widget_search { + + } + .widget_search #searchform { + padding:15px 15px 0; + } + .span3 input, .span3 textarea, .span3 .uneditable-input { + max-width: 174px; + } + + + /* WPMUDEV Widgets */ + + /* Recent Custom Posts */ + + /* remember... + - Show Titles + - Titles as links + - Show dates + - Show Featured Image + All optional! + */ + .widget_rcpt {} + .rcpt_items { + width:100%; + } + .rcpt_items+.rcpt_items { + border-top:1px solid #eee; + } + /* clearfixing the main divs.*/ + .rcpt_items:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; + } + + .rcpt_items { + display: inline-block; + } + + html[xmlns] .rcpt_items { + display: block; + } + + * html .rcpt_items { + height: 1%; + } + + + .rcpt_items_list { + list-style-type: none; + padding: 10px; + margin:0; + } + .rcpt_items_list li { + list-style-type: none; + margin: 0; + } + .rcpt_item_title { + font-size:110%; + font-weight: bold; + } + .rcpt_item_image{ + float: right; + margin: 0 0 10px 10px; + } + .lte9 .rcpt_item_image img { + width:150px; + } + .rcpt_item_excerpt { + margin: 10px 0; + } + .rcpt_item_date { + + } + + + + + /* image widget */ + + .widget_sp_image { + border:none; + background-color:transparent; + } + .widget_sp_image img { + max-width:100% !important; + } + .lte9 .widget_sp_image img { + + } + + /* slideshow widget */ + + .uc-ssw { + border: none; + } + .uc-ssw .nivoSlider { + overflow: hidden; + margin-bottom: 0 !important; + } + + + + + + @media (min-width: 1200px) { + .span3 .uc-ssw .nivoSlider { + height:105px; + } + .span4 .uc-ssw .nivoSlider { + height: 144px; + } + .span6 .uc-ssw .nivoSlider { + height: 222px; + } + .span8 .uc-ssw .nivoSlider { + height: 300px; + } + .span12 .uc-ssw .nivoSlider { + height:456px; + } + + } + @media (min-width: 980px) and (max-width: 1199px) { + .span3 .uc-ssw .nivoSlider { + height:86px; + } + .span4 .uc-ssw .nivoSlider { + height: 117px; + } + .span6 .uc-ssw .nivoSlider { + height: 179px; + } + .span8 .uc-ssw .nivoSlider { + height: 241px; + } + .span12 .uc-ssw .nivoSlider { + height:366px; + } + } + @media (min-width: 480px) and (max-width: 979px) { + .span3 .uc-ssw .nivoSlider { + height:65px; + } + .span4 .uc-ssw .nivoSlider { + height: 89px; + } + .span6 .uc-ssw .nivoSlider { + height: 137px; + } + .span8 .uc-ssw .nivoSlider { + height: 185px; + } + .span12 .uc-ssw .nivoSlider { + height:282px; + } + } + @media (max-width: 479px) { + .span3 .uc-ssw .nivoSlider, + .span4 .uc-ssw .nivoSlider, + .span6 .uc-ssw .nivoSlider, + .span8 .uc-ssw .nivoSlider, + .span12 .uc-ssw .nivoSlider { + height:117px; + } + } + + .uc-ssw .nivoSlider img { + min-width: 100%; + min-height: 100%; + } + .uc-ssw .slider-wrapper { + padding: 0 !important; + } + + + #home1 .nivoSlider a.nivo-imageLink { + width:auto !important; + height: auto !important; + min-height: 100% !important; + min-width: 100% !important; + } + +/* bring bootstrap styles to the wordpress selectors. Ideally, we can get some PHP that will instead add the bootstrap selectors, but this is for the interim. */ + +table { + width: 100%; + margin-bottom: 20px; +} + +table th, +table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + /*border-top: 1px solid #dddddd;*/ +} + +table th { + font-weight: bold; +} + +table thead th { + vertical-align: bottom; +} + +table caption + thead tr:first-child th, +table caption + thead tr:first-child td, +table colgroup + thead tr:first-child th, +table colgroup + thead tr:first-child td, +table thead:first-child tr:first-child th, +table thead:first-child tr:first-child td { + border-top: 0; +} + +table tbody + tbody { + /* border-top: 2px solid #dddddd;*/ +} + +table .table { + background-color: #ffffff; +} + +/* Lifted from twentytwelve */ + + /* Responsive images */ + + .entry-content img, + .comment-content img, + .widget img { + max-width: 100%; /* Fluid images for posts, comments, and widgets */ + } + img[class*="align"], + img[class*="wp-image-"], + img[class*="attachment-"] { + height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ + } + img.size-full, + img.size-large, + img.header-image, + img.wp-post-image { + max-width: 100%; + height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ + } + + /* Make sure videos and embeds fit their containers */ + embed, + iframe, + object, + video { + max-width: 100%; + } + .entry-content .twitter-tweet-rendered { + max-width: 100% !important; /* Override the Twitter embed fixed width */ + } + + + + /* Images */ + + + .alignleft { + float: left; + } + .alignright { + float: right; + } + .aligncenter { + display: block; + margin-left: auto; + margin-right: auto; + } + + .wp-caption { + max-width: 100%; /* Keep wide captions from overflowing their container. */ + } + + .entry-content dl.gallery-item { + margin: 0; + } + .gallery-item a, + .gallery-caption { + width: 90%; + } + .gallery-item a { + display: block; + } + .gallery-caption a { + display: inline; + } + .gallery-columns-1 .gallery-item a { + max-width: 100%; + width: auto; + } + .gallery .gallery-icon img { + height: auto; + max-width: 90%; + padding: 5%; + } + .gallery-columns-1 .gallery-icon img { + padding: 3%; + } + +/* /twentytwelve */ + + + +/* + + Basic Content sytles for posts, pages. Let's clean up that overly-large Bootstrap typography. + - remember to duplicate this for the text widget. +*/ + .content { + font-family: "Proxima Nova", sans-serif; + -ms-word-wrap: break-word; + word-wrap: break-word; + } + .lte9 .content { + font-family:Helvetica, Arial, sans-serif; + } + .content h1 { + font-size: 21px; + line-height: 28px; + } + .content h2 { + font-size: 18px; + line-height: 24px; + } + .content h3 { + font-size: 16px; + line-height: 20px; + } + .content h4, + .content h5, + .content h6 { + font-size: 14px; + line-height: 18px; + } + + + .content blockquote p { + font-size: 14px; + } + .content code { + font-size: 11px; + } + .content pre { + font-size: 11px; + line-height: 18px; + } + .content a { + border-bottom: 1px solid #cfedff; + } + .content .gallery a { + border-bottom: none; + } + .content a:hover { + border-bottom-color: #005580; + text-decoration: none; + } + + .content img.alignright { + margin:0 0 20px 20px; + } + .content img.alignleft { + margin: 0 20px 20px 0; + } + .content img.aligncenter { + margin-bottom:20px; + } + + .content .wp-caption-text { + text-indent: 3px; + font-size: .8em; + color: #5c5c5c; + font-style: italic; + } + + + /* copy, paste, find, replace for text widget. Hacky, but will do until I get more PHP devs. */ + + .textwidget { + font-family: "Proxima Nova", sans-serif; + } + .lte9 .textwidget { + font-family:Arial, Helvetica, sans-serif; + } + .textwidget h1 { + font-size: 21px; + } + .textwidget h2 { + font-size: 18px; + } + .textwidget h3 { + font-size: 16px; + } + .textwidget h4, + .textwidget h5, + .textwidget h6 { + font-size: 14px; + } + + + .textwidget blockquote p { + font-size: 14px; + } + .textwidget code { + font-size: 11px; + } + .textwidget pre { + font-size: 11px; + line-height: 18px; + } + .textwidget a { + border-bottom: 1px solid #cfedff; + } + .textwidget a:hover { + border-bottom-color: #005580; + text-decoration: none; + } + + .textwidget img.alignright { + margin:0 0 20px 20px; + } + .textwidget img.alignleft { + margin: 0 20px 20px 0; + } + .textwidget img.aligncenter { + margin-bottom:20px; + } + + .textwidget .wp-caption-text { + text-indent: 3px; + font-size: .8em; + color: #5c5c5c; + font-style: italic; + } + + + + +.featured-image { + float: right; + padding: 0 0 20px 30px; + } + + +/* + + Comments + +*/ + + +.commentlist { + list-style-type: none; + margin-left: 0; + } + .comment, + .pingback { + padding: 30px 0; + border-top: 1px dotted #ddd; + } + .comment .comment { + padding: 0; + border: none; + } + .comment-body { + position: relative; + padding-left: 175px; + min-height: 50px; + } + .comment .comment .comment-body { + padding: 0; + min-height: inherit; + } + .comment-author { + position: absolute; + top:0; + left: 0; + width: 150px; + } + .comment .comment .comment-author { + position: relative; + width: auto; + } + .comment-meta { + float: right; + } + .content .comment-meta a { + color: #999; + border-bottom-width:0; + } + .content .comment-meta a.comment-edit-link { + color: #08c; + border-bottom-width: 1px; + } + .children { + list-style-type: none; + margin-left: 175px; + padding-top: 20px; + } + .children .children { + margin-left: 25px; + } + +#commentform {} + #comment { + width:100%; + } + + .nocomments { + margin: 30px; + } + + + +#uc-footer { + padding: 0 20px 20px; + margin-top: 30px; + } + #uc-footer-links, + #uc-footer-links li { + padding: 0; + margin: 0; + list-style-type: none; + } + #uc-footer-links li { + float: left; + font-size: .8em; + margin-right: 2em; + } + #uc-footer-links a { + color: #707070; + } + #uc-footer-links a:hover { + color:#08c; + } + + + + + + + + + + + + + +/* IE Hacks */ +.ie9 .gradient, +.gt9 .gradient { + filter: none; +} +@media (max-width: 979px) { + /* alterations to the bootstrap mobile nav */ + #uc-nav-mobile { + position:absolute; + top:65px; + right:20px; + margin:0; + width:70px; + } + #uc-navbar .navbar-inner { + min-height:0; + } + .nav { + padding-top: 10px; + position: relative; + } + #uc-navbar.navbar .nav #sitesearch { + position:absolute; + top:10px; + left:15px; + } + + + html.ua-mobile-android .dropdown-submenu>.dropdown-menu { + display: block; + } + html.ua-mobile-android .dropdown-submenu>a:after { + border:none; + } + #uc-site-header { + padding-right:118px; + padding-bottom:25px; + } + #uc-site-title { + margin-bottom:5px; + } + #uc-search #uc-search-field { + display: none; + } +} +@media (max-width: 767px) { + /* tablet rules */ + body { + /* overwrites bootstrap defaults so the top bar can be full width. */ + padding-left:0; + padding-right:0; + } + + #uc-site-header { + padding-left:10px; + padding-top: 20px; + padding-bottom: 10px; + } + #uc-logo { + border-right:0; + } + #uc-site-parent a { + font-size: 10px; + } + #uc-site-title a { + font-size: 18px; + line-height:1.1em; + } + #uc-main { + /* reintroduce the extra padding for the content area */ + padding-left:7px; + padding-right:7px; + } + .post { + padding: 10px 10px 20px + } + .comment-body { + padding-left: 0; + } + .comment-author { + position: relative; + width: auto; + } + .comment-meta { + float: none; + margin-bottom: 1em; + } + .children { + margin-left: 20px; + } +} + +@media (max-width: 680px) { + #uc-title { + width:200px; + padding-left:5px; + } + #uc-title a { + margin-top:3px; + } + #uc-title-universityof #uc-title-universityof-svg, + #uc-title-connecticut #uc-title-connecticut-svg { + position: relative; + top:-8px; + height:10px; + } + #uc-footer-links li { + float: none; + font-size: .9em; + margin: .75em 0; + } +} +@media (max-width: 510px) { + /* phones */ + #uc-title { + display:none; + } + + } +@media (max-width: 321px) { + #uc-search-text { + width:110px; + } + + + +} + + + + +/* temp debugging */ +/* +#uc-main, +#top-gradient, +#uc-footer { +display: none; +} +*/ + + + diff --git a/template/css/uc-print.css b/template/css/uc-print.css new file mode 100644 index 0000000..246251d --- /dev/null +++ b/template/css/uc-print.css @@ -0,0 +1,72 @@ +/* + + PRINT STYLES : UCONN Web Tempalte v5.0 + by UITS WebDev + andrew.bacon@uconn.edu + June 2013 + +*/ + +/* UC Banner */ + +#uc-header { + background-color:transparent; + height:auto; + padding-bottom:.5em; + margin-bottom:1em; + border-bottom:1px double #ccc; + } + #uc-header a:link:after, + #uc-header a:visited:after { + content: " (" attr(href) ") "; + display:none; + } + + #uc-search { + display:none; + } + + #uc-title { + position:relative; + top:0; + left:0; + height:auto; + margin:0; + padding:0; + border-left:none; + font-size:9pt; + } + #uc-title a { + display:inline; + padding:0; + color:#0f1938; + } + + +/* Huskypress */ + +/* Title Bar */ + +#uc-site-header { + margin-top:.5em; + padding:0; + padding-bottom:1em; + } + #uc-site-header a:link:after, + #uc-site-header a:visited:after { + content: " (" attr(href) ") "; + display:none; + } + + #uc-site-parent a { + float:none; + margin-bottom:.5em; + } + #uc-site-title a { + float:none; + } + +#uc-navbar { + display:none; + } + \ No newline at end of file diff --git a/template/datepicker/.gitignore b/template/datepicker/.gitignore new file mode 100644 index 0000000..e46fcb2 --- /dev/null +++ b/template/datepicker/.gitignore @@ -0,0 +1,2 @@ +instrumented/ +tests/coverage.html diff --git a/template/datepicker/.hgignore b/template/datepicker/.hgignore new file mode 100644 index 0000000..e46fcb2 --- /dev/null +++ b/template/datepicker/.hgignore @@ -0,0 +1,2 @@ +instrumented/ +tests/coverage.html diff --git a/template/datepicker/.hgtags b/template/datepicker/.hgtags new file mode 100644 index 0000000..c0c1896 --- /dev/null +++ b/template/datepicker/.hgtags @@ -0,0 +1,11 @@ +b965e03abfcb10d66c8dad96d54d6f8e1c5d8501 v1.0.0 +7a490672b362af7640bbeb68553a0e0a5a95cb9e v1.0.1 +9a730557f14d79c2ce2d28eacb24bdf52ac2e042 1.0.2-rc.1 +62604d506e5ba9d85ee6c2d86723b9b3d817e7bd 1.0.2-rc.1.1 +f6211e251c021331decc16bfbcf25577dd354ef4 1.0.2-rc.2 +493d2332f0cb7f2dd308c442920da86063ff2e0f 1.0.2 +77a6755dc3df3ada745024648535562587fab630 1.1.0 +fe9e4106def42741adba1606245ab0eab32acb55 1.1.1 +e37ab4f7d0d30a45ee80a7019fd2bcf8c1765de7 1.1.2 +0596a9619e30c5f52d0f56c9cba9daf0d69d29ab 1.1.3 +ba267071688d93d973bee4ddb11344971e851e9e 1.2.0-rc.1 diff --git a/template/datepicker/.travis.yml b/template/datepicker/.travis.yml new file mode 100644 index 0000000..7851a08 --- /dev/null +++ b/template/datepicker/.travis.yml @@ -0,0 +1,4 @@ +before_script: + - cd ./tests + - echo "new Date().toString();" | phantomjs +script: phantomjs run-qunit.js tests.html diff --git a/template/datepicker/CHANGELOG.md b/template/datepicker/CHANGELOG.md new file mode 100644 index 0000000..2121ee5 --- /dev/null +++ b/template/datepicker/CHANGELOG.md @@ -0,0 +1,134 @@ +Changelog +========= + +1.2.0 +----- + +New features: +* Google Closure Compiler Compatibility +* Smart orientation by default, and explicit picker orientation with the `orientation` option +* Text inside the picker is no longer user-selectable +* Packagist/Composer support (I think...) +* No longer depends on glyphicons for arrows +* `clearDate` event added, fired when the date is cleared + +Bug squashed: +* `noConflict` fixed +* Fix for large years causing an infinite loop in date parsing +* Fixed cases where `changeYear` and `changeMonth` events were not being triggered +* `component.js` moved to `bower.js` +* Falsey values for `startDate` and `endDate` translate to `-Infinity` and `Infinity`, respectively (effectively, falsey values mean "no bounds") +* Fixed `autoclose` for non-input, non-component elements +* Fixed 50% param in `mix()` less function -- expands compatibility with less compilers +* Fixed `update` method to update the selected date +* `beforeShowDay` was getting UTC dates, now it gets local dates (all dates that developers are given should be in local time, not UTC). +* `startDate` and `endDate` were a bit confused when given `new Date()` -- they would not allow today to be selected (the range should be inclusive), they would change whether it was selectable based on local time, etc. These quirks should be fixed now. They both also now expect local dates (which will then be time-zeroed and converted to UTC). +* Fixed selected date not being automatically constrained to the specified range when `setStartDate` and `setEndDate` were called. +* No longer uses jQuery's `.size()` (deprecated in favor of `.length`) +* `changeDate` triggered during manual user input +* `change` event fired when input value changed, it wasn't in some cases + +Locale changes: +* Added Arabic, Norwegian, Georgian +* `clear` for French +* `today` and `clear` for Bahasa +* `today` and `clear` for Portuguese (both `pt` and `pt-BR`) +* `format` for Turkish +* `format` and `weekStart` for Swedish +* `format` and `weekStart` for Simplified Chinese; `today`, `format`, and `weekStart` for Traditional Chinese +* Fixed typo in Serbian latin (`rs-latin`) +* More appropriate use of Traditional Chinese habit in `zh-TW` + + +1.1.3 +---------- + +Clicking the clear button now triggers the input's `change` and datepicker's `changeDate` events. +Fixed a bug that broke the event-attached `format` function. + + +1.1.2 +---------- + +Botched release, no change from 1.1.1 + + +1.1.1 +---------- + +Fixes a bug when setting startDate or endDate during initialization. + + +1.1.0 +---------- + +New features: +* Date range picker. +* Data API / noConflict. +* `getDate` and `setDate` methods. +* `format` method for events; this allows you to easily format the `date` associated with the event. +* New options: + * `beforeShowDay` option: a dev-provided function that can enable/disable dates, add css classes, and add tooltips. + * `clearBtn`, a button for resetting the picker. + +Internal changes: +* Cleaner and more reliable method for extracting options from all potential sources (defaults, locale overrides, data-attrs, and instantiation options, in that order). This also populates `$.fn.datepicker.defaults` with the default values, and uses this hash as the actual source of defaults, meaning you can globally change the default value for a given option. + +Bugs squashed: +* Resolved a conflict with bootstrap's native `.switch` class. +* Fixed a bug with components where they would be stuck with a stale value when editing the value manually. +* The `date` attributes on events are now local dates instead of internal UTC dates. +* Separate `Date` objects for internal selected and view date references. +* Clicking multiple times inside inputs no longer hides the picker. + +Minor improvements: +* Better text color for highlighted "today" date. +* Last year in decade view now marked as "new" instead of "old". +* Formats now properly handle trailing separators. + +Locale changes: +* Added Albanian, Estonian, and Macedonian +* Added `weekStart` for Russian +* Added `weekStart` and `format` for Finnish + +Potentially backward-incompatible changes: +* Options revamp: + * This fixes bugs in the correlation of some data-attrs to their associated option names. If you use `data-date-weekstart`, `data-date-startdate`, or `data-date-enddate`, you should update these to `data-date-week-start`, `data-date-start-date`, or `data-date-end-date`, respectively. + * All options for datepicker are now properties on the datepicker's `o` property; options are no longer stored on the Datepicker instance itself. If you have code that accesses options stored on the datepicker instance (eg, `datepicker.format`), you will need to update it to access those options via the `o` property (eg, `datepicker.o.format`). "Raw" options are available via the `_o` property. + +1.0.2 +---------- + +Small optimizations release + +* Reduced the number of times `update` is called on initialization. +* Datepicker now detaches the picker dropdown when it is hidden, and appends it when shown. This removes the picker from the DOM when it is not in use. +* No longer listens to document/window events unless picker is visible. + +v1.0.1 +------ + +* Support for [Bower](http://twitter.github.com/bower/) +* Component pickers are now aligned under the input, not the add-on element. +* Japanese locale now has "today" and "format". +* "remove" method removes `.data().date` if the datepicker is on a non-input. +* Events on initialized elements are no longer blocked from bubbling up the DOM (jQuery.live et al can now catch the events). +* Component triggers now include `.btn` in addition to `.add-on`. +* Updates to README contents. + +v1.0.0 +------ + +Initial release: + +* format option +* weekStart option +* calendarWeeks option +* startDate / endDate options +* daysOfWeekDisabled option +* autoclose option +* startView / mnViewMode options +* todayBtn / todayHighlight options +* keyboardNavigation option +* language option +* forceParse option diff --git a/template/datepicker/CONTRIBUTING.md b/template/datepicker/CONTRIBUTING.md new file mode 100644 index 0000000..7056940 --- /dev/null +++ b/template/datepicker/CONTRIBUTING.md @@ -0,0 +1,40 @@ +# Contributing + +## Support requests + +The issue tracker is not the place for support requests. If you get stuck with bootstrap-datepicker, it's very likely that the fine folks at [StackOverflow](http://stackoverflow.com/) will be able to help you; simply describe the problem you're having and provide them a link to the repo (so they know what code you're using). Another option is to post to the [bootstrap-datepicker google group](https://groups.google.com/group/bootstrap-datepicker). + +## Issues + +If you've found a bug in bootstrap-datepicker, we want to know about it! However, please keep the following in mind: + +* This is not the bootstrap-datepicker from [eyecon.ro](http://www.eyecon.ro/bootstrap-datepicker/). Stefan provided the initial code for bootstrap-datepicker, but this repo is divergent from his codebase. Please make sure you're using either the latest tagged version or the latest master from https://github.com/eternicode/bootstrap-datepicker/ . +* A working example of the bug you've found is *much* easier to work with than a description alone. If possible, please provide a link to a demonstration of the bug, perhaps using http://jsfiddle.net/ . +* Finally, it's possible someone else has already reported the same bug you have. Please search the issue tracker for similar issues before posting your own. Thanks! + +## Pull Requests + +Patches welcome! + +For all cases, you should have your own fork of the repo. + +To submit a pull request for a **new feature**: + +1. Run the tests. Every pull request for a new feature should have an accompanying unit test. See the README in the `tests/` directory for details. +2. Create a new branch off of the `master` branch for your feature, with a name following the pattern `feature/`, where `` is a short description of the new feature. This is particularly helpful when you want to submit multiple pull requests. +3. Add a test (or multiple tests) for your feature. Again, see `tests/README.md`. +4. Add your new feature, making the test pass. +5. Push to your fork and submit the pull request! + +To submit a **bug fix**: + +1. Create a new branch off of the `master` branch, with a name following the pattern `bug/`. +2. Add a test that demonstrates the bug. +3. Make the test pass. +4. Push to your fork and submit the pll request! + +To submit a **documentation fix**: + +1. Create a new branch off of the `master` branch, with a name following the pattern `docs/`. +2. Add your documentation fixes (no tests required). +3. Push to your fork and submit the pull request! diff --git a/template/datepicker/LICENSE b/template/datepicker/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/template/datepicker/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/template/datepicker/README.md b/template/datepicker/README.md new file mode 100644 index 0000000..5eebd38 --- /dev/null +++ b/template/datepicker/README.md @@ -0,0 +1,532 @@ +# [bootstrap-datepicker](http://eternicode.github.com/bootstrap-datepicker/) [![Build Status](https://travis-ci.org/eternicode/bootstrap-datepicker.png?branch=master)](https://travis-ci.org/eternicode/bootstrap-datepicker) + +This is a fork of Stefan Petre's [original code](http://www.eyecon.ro/bootstrap-datepicker/); +thanks go to him for getting this thing started! + +Please note that this fork is not used on Stefan's page at this time, nor is it maintained or +contributed to by him (yet?) + +Versions are incremented according to [semver](http://semver.org/). + +[Online Demo](http://eternicode.github.com/bootstrap-datepicker/) + +# Requirements + +* [Bootstrap](http://twitter.github.com/bootstrap/) 2.0.4+ +* [jQuery](http://jquery.com/) 1.7.1+ + +These are the specific versions bootstrap-datepicker is tested against (`js` files) and built against (`css` files). Use other versions at your own risk. + +# Example + +Attached to a field with the format specified via options: + +```html + +``` +```javascript +$('.datepicker').datepicker({ + format: 'mm-dd-yyyy' +}); +``` + +Attached to a field with the format specified via data tag: + +```html + +``` +```javascript +$('.datepicker').datepicker(); +``` + +As component: + +```html +
+ +
+``` +```javascript +$('.datepicker').datepicker(); +``` + +Attached to non-field element, using events to work with the date values. + +```html +
+ Oh snap! +
+ + + + + + + + + + + + + +
+ Start date + Change + + End date + Change +
2012-02-202012-02-25
+``` +```javascript +var startDate = new Date(2012,1,20); +var endDate = new Date(2012,1,25); +$('#date-start') + .datepicker() + .on('changeDate', function(ev){ + if (ev.date.valueOf() > endDate.valueOf()){ + $('#alert').show().find('strong').text('The start date must be before the end date.'); + } else { + $('#alert').hide(); + startDate = new Date(ev.date); + $('#date-start-display').text($('#date-start').data('date')); + } + $('#date-start').datepicker('hide'); + }); +$('#date-end') + .datepicker() + .on('changeDate', function(ev){ + if (ev.date.valueOf() < startDate.valueOf()){ + $('#alert').show().find('strong').text('The end date must be after the start date.'); + } else { + $('#alert').hide(); + endDate = new Date(ev.date); + $('#date-end-display').text($('#date-end').data('date')); + } + $('#date-end').datepicker('hide'); + }); +``` + +As inline datepicker: + +```html +
+``` +```javascript +$('.datepicker').datepicker(); +``` + + +# Using bootstrap-datepicker.js + +Call the datepicker via javascript: + +```javascript +$('.datepicker').datepicker() +``` + +## Dependencies + +Requires bootstrap's dropdown component (`dropdowns.less`) for some styles. + +A standalone .css file (including necessary dropdown styles) can be generated by running `build/build_standalone.less` through the `lessc` compiler: + +```bash +$ lessc build/build_standalone.less datepicker.css +``` + +## Data API + +As with bootstrap's own plugins, datepicker provides a data-api that can be used to instantiate datepickers without the need for custom javascript. For most datepickers, simply set `data-provide="datepicker"` on the element you want to initialize, and it will be intialized lazily, in true bootstrap fashion. For inline datepickers, this can alternatively be `data-provide="datepicker-inline"`; these will be immediately initialized on page load, and cannot be lazily loaded. + +You can disable datepicker's data-api in the same way as you would disable other bootstrap plugins: + +```javascript +$(document).off('.datepicker.data-api'); +``` + +## No Conflict + +```javascript +var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value +$.fn.bootstrapDP = datepicker; // give $().bootstrapDP the bootstrap-datepicker functionality +``` + +## Options + +All options that take a "Date" can handle a `Date` object; a String formatted according to the given `format`; or a timedelta relative to today, eg '-1d', '+6m +1y', etc, where valid units are 'd' (day), 'w' (week), 'm' (month), and 'y' (year). + +Most options can be provided via data-attributes. An option can be converted to a data-attribute by taking its name, replacing each uppercase letter with its lowercase equivalent preceded by a dash, and prepending "data-date-" to the result. For example, `startDate` would be `data-date-start-date`, `format` would be `data-date-format`, and `daysOfWeekDisabled` would be `data-date-days-of-week-disabled`. + +### format + +String. Default: 'mm/dd/yyyy' + +The date format, combination of d, dd, D, DD, m, mm, M, MM, yy, yyyy. + +* d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05. +* D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday. +* m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07. +* M, MM: Abbreviated and full month names, respectively. Eg, Jan, January +* yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012. + +### weekStart + +Integer. Default: 0 + +Day of the week start. 0 (Sunday) to 6 (Saturday) + +### calendarWeeks + +Boolean. Default: false + +Whether or not to show week numbers to the left of week rows. + +### startDate + +Date. Default: Beginning of time + +The earliest date that may be selected; all earlier dates will be disabled. + +### endDate + +Date. Default: End of time + +The latest date that may be selected; all later dates will be disabled. + +### daysOfWeekDisabled + +String, Array. Default: '', [] + +Days of the week that should be disabled. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: disable weekends: `'0,6'` or `[0,6]`. + +### autoclose + +Boolean. Default: false + +Whether or not to close the datepicker immediately when a date is selected. + +### startView + +Number, String. Default: 0, 'month' + +The view that the datepicker should show when it is opened. Accepts values of 0 or 'month' for month view (the default), 1 or 'year' for the 12-month overview, and 2 or 'decade' for the 10-year overview. Useful for date-of-birth datepickers. + +### minViewMode + +Number, String. Default: 0, 'days' + +Set a limit for the view mode. Accepts: 'days' or 0, 'months' or 1, and 'years' or 2. +Gives the ability to pick only a month or an year. The day is set to the 1st for 'months', and the month is set to January for 'years'. + +### todayBtn + +Boolean, "linked". Default: false + +If true or "linked", displays a "Today" button at the bottom of the datepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected. + +### todayHighlight + +Boolean. Default: false + +If true, highlights the current date. + +### clearBtn + +Boolean. Default: false + +If true, displays a "Clear" button at the bottom of the datepicker to clear the input value. If "autoclose" is also set to true, this button will also close the datepicker. + +### keyboardNavigation + +Boolean. Default: true + +Whether or not to allow date navigation by arrow keys. + +### language + +String. Default: 'en' + +The IETF code (eg "en" for English, "pt-BR" for Brazilian Portuguese) of the language to use for month and day names. These will also be used as the input's value (and subsequently sent to the server in the case of form submissions). If a full code (eg "de-DE") is supplied the picker will first check for an "de-DE" language and if not found will fallback and check for a "de" language. If an unknown language code is given, English will be used. See I18N below. + +### forceParse + +Boolean. Default: true + +Whether or not to force parsing of the input value when the picker is closed. That is, when an invalid date is left in the input field by the user, the picker will forcibly parse that value, and set the input's value to the new, valid date, conforming to the given `format`. + +### inputs + +Array. Default: None + +A list of inputs to be used in a range picker, which will be attached to the selected element. Allows for explicitly creating a range picker on a non-standard element. + +### beforeShowDay + +Function(Date). Default: $.noop + +A function that takes a date as a parameter and returns one of the following values: + + * undefined to have no effect + * A Boolean, indicating whether or not this date is selectable + * A String representing additional CSS classes to apply to the date's cell + * An object with the following properties: + * `enabled`: same as the Boolean value above + * `classes`: same as the String value above + * `tooltip`: a tooltip to apply to this date, via the `title` HTML attribute + +### orientation + +String. Default: "auto" + +A space-separated string consisting of one or two of "left" or "right", "top" or "bottom", and "auto" (may be omitted); for example, "top left", "bottom" (horizontal orientation will default to "auto"), "right" (vertical orientation will default to "auto"), "auto top". Allows for fixed placement of the picker popup. + +"orientation" refers to the location of the picker popup's "anchor"; you can also think of it as the location of the trigger element (input, component, etc) relative to the picker. + +"auto" triggers "smart orientation" of the picker. Horizontal orientation will default to "left" and left offset will be tweaked to keep the picker inside the browser viewport; vertical orientation will simply choose "top" or "bottom", whichever will show more of the picker in the viewport. + +## Markup + +Format a component. + +```html +
+ +
+``` + +Create a date-range picker: + +```html +
+ + to + +
+``` + +## Methods + +### .datepicker(options) + +Initializes an datepicker. + +### remove + +Arguments: None + +Remove the datepicker. Removes attached events, internal attached objects, and +added HTML elements. + +```javascript +$('.datepicker').datepicker('remove'); +``` + +### show + +Arguments: None + +Show the datepicker. + +```javascript +$('.datepicker').datepicker('show'); +``` + +### hide + +Arguments: None + +Hide the datepicker. + +```javascript +$('.datepicker').datepicker('hide'); +``` + +### update + +Arguments: + +* date (String|Date) + +Update the datepicker with given argument or the current input value. + +If `date` is provided and is a Date objects, it is assumed to be a "local" date object, and will be converted to UTC for internal use. + +```javascript +$('.datepicker').datepicker('update'); +$('.datepicker').datepicker('update', '2011-03-05'); +$('.datepicker').datepicker('update', new Date(2011, 2, 5)); +``` + +### setDate + +Arguments: + +* date (Date) + +Sets the internal date. `date` is assumed to be a "local" date object, and will be converted to UTC for internal use. + +### setUTCDate + +Arguments: + +* date (Date) + +Sets the internal date. `date` is assumed to be a UTC date object, and will not be converted. + +### getDate + +Arguments: None + +Returns a localized date object representing the internal date object of the first datepicker in the selection. + +### setUTCDate + +Arguments: None + +Returns the internal UTC date object, as-is and unconverted to local time, of the first datepicker in the selection. + +### setStartDate + +Arguments: + +* startDate (Date) + +Sets a new lower date limit on the datepicker. + +```javascript +$('.datepicker').datepicker('setStartDate', '2012-01-01'); +``` + +Omit startDate (or provide an otherwise falsey value) to unset the limit. + +```javascript +$('.datepicker').datepicker('setStartDate'); +$('.datepicker').datepicker('setStartDate', null); +``` + +### setEndDate + +Arguments: + +* endDate (Date) + +Sets a new upper date limit on the datepicker. + +```javascript +$('.datepicker').datepicker('setEndDate', '2012-12-31'); +``` + +Omit endDate (or provide an otherwise falsey value) to unset the limit. + +```javascript +$('.datepicker').datepicker('setEndDate'); +$('.datepicker').datepicker('setEndDate', null); +``` + +### setDaysOfWeekDisabled + +Arguments: + +* daysOfWeekDisabled (String|Array) + +Sets the days of week that should be disabled. + +```javascript +$('.datepicker').datepicker('setDaysOfWeekDisabled', [0,6]); +``` + +Omit daysOfWeekDisabled (or provide an otherwise falsey value) to unset the disabled days. + +```javascript +$('.datepicker').datepicker('setDaysOfWeekDisabled'); +$('.datepicker').datepicker('setDaysOfWeekDisabled', null); +``` + +## Events + +Datepicker triggers a number of events in certain circumstances. All events have extra data attached to the event object that is passed to any event handlers: + +```javascript +$('.datepicker').datepicker() + .on(picker_event, function(e){ + # `e` here contains the extra attributes + }); +``` + +* `date`: the relevant Date object, in local timezone. +* `format([format])`: a function to make formatting `date` easier. `format` can be any format string that datepicker supports. If `format` is not given, the format set on the datepicker will be used. + +### show + +Fired when the date picker is displayed. + +### hide + +Fired when the date picker is hidden. + +### clearDate + +Fired when the date is cleared, normally when the "clear" button (enabled with the `clearBtn` option) is pressed. + +### changeDate + +Fired when the date is changed. + +### changeYear + +Fired when the *view* year is changed from decade view. + +### changeMonth + +Fired when the *view* month is changed from year view. + +## Keyboard support + +The datepicker includes some keyboard navigation: + +### up, down, left, right arrow keys + +By themselves, left/right will move backward/forward one day, up/down will move back/forward one week. + +With the shift key, up/left will move backward one month, down/right will move forward one month. + +With the ctrl key, up/left will move backward one year, down/right will move forward oone year. + +Shift+ctrl behaves the same as ctrl -- that is, it does not change both month and year simultaneously, only the year. + +### escape + +The escape key can be used to hide and re-show the datepicker; this is necessary if the user wants to manually edit the value. + +### enter + +When the picker is visible, enter will simply hide it. When the picker is not visible, enter will have normal effects -- submitting the current form, etc. + +## I18N + +The plugin supports i18n for the month and weekday names and the `weekStart` option. The default is English ('en'); other available translations are avilable in the `js/locales/` directory, simply include your desired locale after the plugin. To add more languages, simply add a key to `$.fn.datepicker.dates`, before calling `.datepicker()`. Example: + +```javascript +$.fn.datepicker.dates['en'] = { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today" +}; +``` + +Right-to-left languages may also include `rtl: true` to make the calendar display appropriately. + +If your browser (or those of your users) is displaying characters wrong, chances are the browser is loading the javascript file with a non-unicode encoding. Simply add `charset="UTF-8"` to your `script` tag: + +```html + +``` + +```javascript +$('.datepicker').datepicker({ + language: XX //as you defined in bootstrap-datepicker.XX.js +}); +``` diff --git a/template/datepicker/bower.json b/template/datepicker/bower.json new file mode 100644 index 0000000..eebfdd8 --- /dev/null +++ b/template/datepicker/bower.json @@ -0,0 +1,9 @@ +{ + "name": "bootstrap-datepicker", + "version": "1.2.0", + "main": ["js/bootstrap-datepicker.js","css/datepicker.css"], + "dependencies": { + "jquery" : ">=1.7.1", + "bootstrap" : ">=2.0.4 <3.0" + } +} diff --git a/template/datepicker/build/build.less b/template/datepicker/build/build.less new file mode 100644 index 0000000..04fce23 --- /dev/null +++ b/template/datepicker/build/build.less @@ -0,0 +1,67 @@ +// Datepicker .less buildfile. Includes select mixins/variables from bootstrap +// and imports the included datepicker.less to output a minimal datepicker.css +// +// Usage: +// lessc build.less datepicker.css +// +// Variables and mixins copied from bootstrap 2.0.2 + +// Variables +@grayLight: #999; +@grayLighter: #eee; +@white: #fff; +@linkColor: #08c; +@btnPrimaryBackground: @linkColor; +@orange: #f89406; +@baseLineHeight: 18px; + +// Mixins + +// Border Radius +.border-radius(@radius: 5px) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + +// Button backgrounds +.buttonBackground(@startColor, @endColor) { + .gradientBar(@startColor, @endColor); + .reset-filter(); + &:hover, &:active, &.active, &.disabled, &[disabled] { + background-color: @endColor; + } + &:active, + &.active { + background-color: darken(@endColor, 10%) e("\9"); + } +} + +// Reset filters for IE +.reset-filter() { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} + +// Gradient Bar Colors for buttons and alerts +.gradientBar(@primaryColor, @secondaryColor) { + #gradient > .vertical(@primaryColor, @secondaryColor); + border-color: @secondaryColor @secondaryColor darken(@secondaryColor, 15%); + border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%); +} + +// Gradients +#gradient { + .vertical(@startColor: #555, @endColor: #333) { + background-color: mix(@startColor, @endColor, 60%); + background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ + background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10 + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(top, @startColor, @endColor); // The standard + background-repeat: repeat-x; + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down + } +} + +@import "../less/datepicker.less"; diff --git a/template/datepicker/build/build_standalone.less b/template/datepicker/build/build_standalone.less new file mode 100644 index 0000000..fe5a269 --- /dev/null +++ b/template/datepicker/build/build_standalone.less @@ -0,0 +1,61 @@ +// Datepicker standalone .less buildfile. Includes all necessary mixins/variables/rules from bootstrap +// and imports the included datepicker.less to output a minimal standalone datepicker.css +// +// Usage: +// lessc build_standalone.less datepicker.css +// +// Variables, mixins, and rules copied from bootstrap 2.0.2 + +@import "build.less"; + +// Dropdown css + +@zindexDropdown: 1000; +@grayDark: #333; +@baseLineHeight: 18px; +@tableBackground: transparent; // overall background-color +@dropdownBackground: @white; +@dropdownBorder: rgba(0,0,0,.2); +@dropdownLinkColor: @grayDark; +@dropdownLinkColorHover: @white; +@dropdownLinkBackgroundHover: @linkColor; + +// Drop shadows +.box-shadow(@shadow) { + -webkit-box-shadow: @shadow; + -moz-box-shadow: @shadow; + box-shadow: @shadow; +} + +// The dropdown menu (ul) +// ---------------------- +.datepicker.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: @zindexDropdown; + float: left; + display: none; // none by default, but block on "open" of the menu + min-width: 160px; + list-style: none; + background-color: @dropdownBackground; + border: 1px solid #ccc; + border: 1px solid rgba(0,0,0,.2); + .border-radius(5px); + .box-shadow(0 5px 10px rgba(0,0,0,.2)); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + *border-right-width: 2px; + *border-bottom-width: 2px; + + // Normally inherited from bootstrap's `body` + color: #333333; + font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; + font-size:13px; + line-height: @baseLineHeight; + + th, td { + padding: 4px 5px; + } +} diff --git a/template/datepicker/composer.json b/template/datepicker/composer.json new file mode 100644 index 0000000..176630c --- /dev/null +++ b/template/datepicker/composer.json @@ -0,0 +1,7 @@ +{ + "name": "eternicode/bootstrap-datepicker", + "require": { + "frameworks/jquery" : ">=1.7.1", + "twitter/bootstrap" : ">=2.0.4, <3.0" + } +} diff --git a/template/datepicker/css/datepicker.css b/template/datepicker/css/datepicker.css new file mode 100644 index 0000000..03bd90d --- /dev/null +++ b/template/datepicker/css/datepicker.css @@ -0,0 +1,481 @@ +/*! + * Datepicker for Bootstrap + * + * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ +.datepicker { + padding: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + direction: ltr; + /*.dow { + border-top: 1px solid #ddd !important; + }*/ + +} +.datepicker-inline { + width: 220px; +} +.datepicker.datepicker-rtl { + direction: rtl; +} +.datepicker.datepicker-rtl table tr td span { + float: right; +} +.datepicker-dropdown { + top: 0; + left: 0; +} +.datepicker-dropdown:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-top: 0; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; +} +.datepicker-dropdown:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + border-top: 0; + position: absolute; +} +.datepicker-dropdown.datepicker-orient-left:before { + left: 6px; +} +.datepicker-dropdown.datepicker-orient-left:after { + left: 7px; +} +.datepicker-dropdown.datepicker-orient-right:before { + right: 6px; +} +.datepicker-dropdown.datepicker-orient-right:after { + right: 7px; +} +.datepicker-dropdown.datepicker-orient-top:before { + top: -7px; +} +.datepicker-dropdown.datepicker-orient-top:after { + top: -6px; +} +.datepicker-dropdown.datepicker-orient-bottom:before { + bottom: -7px; + border-bottom: 0; + border-top: 7px solid #999; +} +.datepicker-dropdown.datepicker-orient-bottom:after { + bottom: -6px; + border-bottom: 0; + border-top: 6px solid #ffffff; +} +.datepicker > div { + display: none; +} +.datepicker.days div.datepicker-days { + display: block; +} +.datepicker.months div.datepicker-months { + display: block; +} +.datepicker.years div.datepicker-years { + display: block; +} +.datepicker table { + margin: 0; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.datepicker td, +.datepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + border: none; +} +.table-striped .datepicker table tr td, +.table-striped .datepicker table tr th { + background-color: transparent; +} +.datepicker table tr td.day:hover { + background: #eeeeee; + cursor: pointer; +} +.datepicker table tr td.old, +.datepicker table tr td.new { + color: #999999; +} +.datepicker table tr td.disabled, +.datepicker table tr td.disabled:hover { + background: none; + color: #999999; + cursor: default; +} +.datepicker table tr td.today, +.datepicker table tr td.today:hover, +.datepicker table tr td.today.disabled, +.datepicker table tr td.today.disabled:hover { + background-color: #fde19a; + background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a); + background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a)); + background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a); + background-image: -o-linear-gradient(top, #fdd49a, #fdf59a); + background-image: linear-gradient(top, #fdd49a, #fdf59a); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0); + border-color: #fdf59a #fdf59a #fbed50; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + color: #000; +} +.datepicker table tr td.today:hover, +.datepicker table tr td.today:hover:hover, +.datepicker table tr td.today.disabled:hover, +.datepicker table tr td.today.disabled:hover:hover, +.datepicker table tr td.today:active, +.datepicker table tr td.today:hover:active, +.datepicker table tr td.today.disabled:active, +.datepicker table tr td.today.disabled:hover:active, +.datepicker table tr td.today.active, +.datepicker table tr td.today:hover.active, +.datepicker table tr td.today.disabled.active, +.datepicker table tr td.today.disabled:hover.active, +.datepicker table tr td.today.disabled, +.datepicker table tr td.today:hover.disabled, +.datepicker table tr td.today.disabled.disabled, +.datepicker table tr td.today.disabled:hover.disabled, +.datepicker table tr td.today[disabled], +.datepicker table tr td.today:hover[disabled], +.datepicker table tr td.today.disabled[disabled], +.datepicker table tr td.today.disabled:hover[disabled] { + background-color: #fdf59a; +} +.datepicker table tr td.today:active, +.datepicker table tr td.today:hover:active, +.datepicker table tr td.today.disabled:active, +.datepicker table tr td.today.disabled:hover:active, +.datepicker table tr td.today.active, +.datepicker table tr td.today:hover.active, +.datepicker table tr td.today.disabled.active, +.datepicker table tr td.today.disabled:hover.active { + background-color: #fbf069 \9; +} +.datepicker table tr td.today:hover:hover { + color: #000; +} +.datepicker table tr td.today.active:hover { + color: #fff; +} +.datepicker table tr td.range, +.datepicker table tr td.range:hover, +.datepicker table tr td.range.disabled, +.datepicker table tr td.range.disabled:hover { + background: #eeeeee; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.datepicker table tr td.range.today, +.datepicker table tr td.range.today:hover, +.datepicker table tr td.range.today.disabled, +.datepicker table tr td.range.today.disabled:hover { + background-color: #f3d17a; + background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a); + background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a)); + background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a); + background-image: -o-linear-gradient(top, #f3c17a, #f3e97a); + background-image: linear-gradient(top, #f3c17a, #f3e97a); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0); + border-color: #f3e97a #f3e97a #edde34; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.datepicker table tr td.range.today:hover, +.datepicker table tr td.range.today:hover:hover, +.datepicker table tr td.range.today.disabled:hover, +.datepicker table tr td.range.today.disabled:hover:hover, +.datepicker table tr td.range.today:active, +.datepicker table tr td.range.today:hover:active, +.datepicker table tr td.range.today.disabled:active, +.datepicker table tr td.range.today.disabled:hover:active, +.datepicker table tr td.range.today.active, +.datepicker table tr td.range.today:hover.active, +.datepicker table tr td.range.today.disabled.active, +.datepicker table tr td.range.today.disabled:hover.active, +.datepicker table tr td.range.today.disabled, +.datepicker table tr td.range.today:hover.disabled, +.datepicker table tr td.range.today.disabled.disabled, +.datepicker table tr td.range.today.disabled:hover.disabled, +.datepicker table tr td.range.today[disabled], +.datepicker table tr td.range.today:hover[disabled], +.datepicker table tr td.range.today.disabled[disabled], +.datepicker table tr td.range.today.disabled:hover[disabled] { + background-color: #f3e97a; +} +.datepicker table tr td.range.today:active, +.datepicker table tr td.range.today:hover:active, +.datepicker table tr td.range.today.disabled:active, +.datepicker table tr td.range.today.disabled:hover:active, +.datepicker table tr td.range.today.active, +.datepicker table tr td.range.today:hover.active, +.datepicker table tr td.range.today.disabled.active, +.datepicker table tr td.range.today.disabled:hover.active { + background-color: #efe24b \9; +} +.datepicker table tr td.selected, +.datepicker table tr td.selected:hover, +.datepicker table tr td.selected.disabled, +.datepicker table tr td.selected.disabled:hover { + background-color: #9e9e9e; + background-image: -moz-linear-gradient(top, #b3b3b3, #808080); + background-image: -ms-linear-gradient(top, #b3b3b3, #808080); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080)); + background-image: -webkit-linear-gradient(top, #b3b3b3, #808080); + background-image: -o-linear-gradient(top, #b3b3b3, #808080); + background-image: linear-gradient(top, #b3b3b3, #808080); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0); + border-color: #808080 #808080 #595959; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker table tr td.selected:hover, +.datepicker table tr td.selected:hover:hover, +.datepicker table tr td.selected.disabled:hover, +.datepicker table tr td.selected.disabled:hover:hover, +.datepicker table tr td.selected:active, +.datepicker table tr td.selected:hover:active, +.datepicker table tr td.selected.disabled:active, +.datepicker table tr td.selected.disabled:hover:active, +.datepicker table tr td.selected.active, +.datepicker table tr td.selected:hover.active, +.datepicker table tr td.selected.disabled.active, +.datepicker table tr td.selected.disabled:hover.active, +.datepicker table tr td.selected.disabled, +.datepicker table tr td.selected:hover.disabled, +.datepicker table tr td.selected.disabled.disabled, +.datepicker table tr td.selected.disabled:hover.disabled, +.datepicker table tr td.selected[disabled], +.datepicker table tr td.selected:hover[disabled], +.datepicker table tr td.selected.disabled[disabled], +.datepicker table tr td.selected.disabled:hover[disabled] { + background-color: #808080; +} +.datepicker table tr td.selected:active, +.datepicker table tr td.selected:hover:active, +.datepicker table tr td.selected.disabled:active, +.datepicker table tr td.selected.disabled:hover:active, +.datepicker table tr td.selected.active, +.datepicker table tr td.selected:hover.active, +.datepicker table tr td.selected.disabled.active, +.datepicker table tr td.selected.disabled:hover.active { + background-color: #666666 \9; +} +.datepicker table tr td.active, +.datepicker table tr td.active:hover, +.datepicker table tr td.active.disabled, +.datepicker table tr td.active.disabled:hover { + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(top, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker table tr td.active:hover, +.datepicker table tr td.active:hover:hover, +.datepicker table tr td.active.disabled:hover, +.datepicker table tr td.active.disabled:hover:hover, +.datepicker table tr td.active:active, +.datepicker table tr td.active:hover:active, +.datepicker table tr td.active.disabled:active, +.datepicker table tr td.active.disabled:hover:active, +.datepicker table tr td.active.active, +.datepicker table tr td.active:hover.active, +.datepicker table tr td.active.disabled.active, +.datepicker table tr td.active.disabled:hover.active, +.datepicker table tr td.active.disabled, +.datepicker table tr td.active:hover.disabled, +.datepicker table tr td.active.disabled.disabled, +.datepicker table tr td.active.disabled:hover.disabled, +.datepicker table tr td.active[disabled], +.datepicker table tr td.active:hover[disabled], +.datepicker table tr td.active.disabled[disabled], +.datepicker table tr td.active.disabled:hover[disabled] { + background-color: #0044cc; +} +.datepicker table tr td.active:active, +.datepicker table tr td.active:hover:active, +.datepicker table tr td.active.disabled:active, +.datepicker table tr td.active.disabled:hover:active, +.datepicker table tr td.active.active, +.datepicker table tr td.active:hover.active, +.datepicker table tr td.active.disabled.active, +.datepicker table tr td.active.disabled:hover.active { + background-color: #003399 \9; +} +.datepicker table tr td span { + display: block; + width: 23%; + height: 54px; + line-height: 54px; + float: left; + margin: 1%; + cursor: pointer; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker table tr td span:hover { + background: #eeeeee; +} +.datepicker table tr td span.disabled, +.datepicker table tr td span.disabled:hover { + background: none; + color: #999999; + cursor: default; +} +.datepicker table tr td span.active, +.datepicker table tr td span.active:hover, +.datepicker table tr td span.active.disabled, +.datepicker table tr td span.active.disabled:hover { + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(top, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker table tr td span.active:hover, +.datepicker table tr td span.active:hover:hover, +.datepicker table tr td span.active.disabled:hover, +.datepicker table tr td span.active.disabled:hover:hover, +.datepicker table tr td span.active:active, +.datepicker table tr td span.active:hover:active, +.datepicker table tr td span.active.disabled:active, +.datepicker table tr td span.active.disabled:hover:active, +.datepicker table tr td span.active.active, +.datepicker table tr td span.active:hover.active, +.datepicker table tr td span.active.disabled.active, +.datepicker table tr td span.active.disabled:hover.active, +.datepicker table tr td span.active.disabled, +.datepicker table tr td span.active:hover.disabled, +.datepicker table tr td span.active.disabled.disabled, +.datepicker table tr td span.active.disabled:hover.disabled, +.datepicker table tr td span.active[disabled], +.datepicker table tr td span.active:hover[disabled], +.datepicker table tr td span.active.disabled[disabled], +.datepicker table tr td span.active.disabled:hover[disabled] { + background-color: #0044cc; +} +.datepicker table tr td span.active:active, +.datepicker table tr td span.active:hover:active, +.datepicker table tr td span.active.disabled:active, +.datepicker table tr td span.active.disabled:hover:active, +.datepicker table tr td span.active.active, +.datepicker table tr td span.active:hover.active, +.datepicker table tr td span.active.disabled.active, +.datepicker table tr td span.active.disabled:hover.active { + background-color: #003399 \9; +} +.datepicker table tr td span.old, +.datepicker table tr td span.new { + color: #999999; +} +.datepicker th.datepicker-switch { + width: 145px; +} +.datepicker thead tr:first-child th, +.datepicker tfoot tr th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover, +.datepicker tfoot tr th:hover { + background: #eeeeee; +} +.datepicker .cw { + font-size: 10px; + width: 12px; + padding: 0 2px 0 5px; + vertical-align: middle; +} +.datepicker thead tr:first-child th.cw { + cursor: default; + background-color: transparent; +} +.input-append.date .add-on i, +.input-prepend.date .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.input-daterange input { + text-align: center; +} +.input-daterange input:first-child { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-daterange input:last-child { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-daterange .add-on { + display: inline-block; + width: auto; + min-width: 16px; + height: 18px; + padding: 4px 5px; + font-weight: normal; + line-height: 18px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + vertical-align: middle; + background-color: #eeeeee; + border: 1px solid #ccc; + margin-left: -5px; + margin-right: -5px; +} diff --git a/template/datepicker/js/bootstrap-datepicker.js b/template/datepicker/js/bootstrap-datepicker.js new file mode 100644 index 0000000..78c346c --- /dev/null +++ b/template/datepicker/js/bootstrap-datepicker.js @@ -0,0 +1,1395 @@ +/* ========================================================= + * bootstrap-datepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + +(function( $ ) { + + var $window = $(window); + + function UTCDate(){ + return new Date(Date.UTC.apply(Date, arguments)); + } + function UTCToday(){ + var today = new Date(); + return UTCDate(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate()); + } + + + // Picker object + + var Datepicker = function(element, options) { + var that = this; + + this._process_options(options); + + this.element = $(element); + this.isInline = false; + this.isInput = this.element.is('input'); + this.component = this.element.is('.date') ? this.element.find('.add-on, .btn') : false; + this.hasInput = this.component && this.element.find('input').length; + if(this.component && this.component.length === 0) + this.component = false; + + this.picker = $(DPGlobal.template); + this._buildEvents(); + this._attachEvents(); + + if(this.isInline) { + this.picker.addClass('datepicker-inline').appendTo(this.element); + } else { + this.picker.addClass('datepicker-dropdown dropdown-menu'); + } + + if (this.o.rtl){ + this.picker.addClass('datepicker-rtl'); + this.picker.find('.prev i, .next i') + .toggleClass('icon-arrow-left icon-arrow-right'); + } + + + this.viewMode = this.o.startView; + + if (this.o.calendarWeeks) + this.picker.find('tfoot th.today') + .attr('colspan', function(i, val){ + return parseInt(val) + 1; + }); + + this._allow_update = false; + + this.setStartDate(this._o.startDate); + this.setEndDate(this._o.endDate); + this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled); + + this.fillDow(); + this.fillMonths(); + + this._allow_update = true; + + this.update(); + this.showMode(); + + if(this.isInline) { + this.show(); + } + }; + + Datepicker.prototype = { + constructor: Datepicker, + + _process_options: function(opts){ + // Store raw options for reference + this._o = $.extend({}, this._o, opts); + // Processed options + var o = this.o = $.extend({}, this._o); + + // Check if "de-DE" style date is available, if not language should + // fallback to 2 letter code eg "de" + var lang = o.language; + if (!dates[lang]) { + lang = lang.split('-')[0]; + if (!dates[lang]) + lang = defaults.language; + } + o.language = lang; + + switch(o.startView){ + case 2: + case 'decade': + o.startView = 2; + break; + case 1: + case 'year': + o.startView = 1; + break; + default: + o.startView = 0; + } + + switch (o.minViewMode) { + case 1: + case 'months': + o.minViewMode = 1; + break; + case 2: + case 'years': + o.minViewMode = 2; + break; + default: + o.minViewMode = 0; + } + + o.startView = Math.max(o.startView, o.minViewMode); + + o.weekStart %= 7; + o.weekEnd = ((o.weekStart + 6) % 7); + + var format = DPGlobal.parseFormat(o.format); + if (o.startDate !== -Infinity) { + if (!!o.startDate) { + if (o.startDate instanceof Date) + o.startDate = this._local_to_utc(this._zero_time(o.startDate)); + else + o.startDate = DPGlobal.parseDate(o.startDate, format, o.language); + } else { + o.startDate = -Infinity; + } + } + if (o.endDate !== Infinity) { + if (!!o.endDate) { + if (o.endDate instanceof Date) + o.endDate = this._local_to_utc(this._zero_time(o.endDate)); + else + o.endDate = DPGlobal.parseDate(o.endDate, format, o.language); + } else { + o.endDate = Infinity; + } + } + + o.daysOfWeekDisabled = o.daysOfWeekDisabled||[]; + if (!$.isArray(o.daysOfWeekDisabled)) + o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/); + o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function (d) { + return parseInt(d, 10); + }); + + var plc = String(o.orientation).toLowerCase().split(/\s+/g), + _plc = o.orientation.toLowerCase(); + plc = $.grep(plc, function(word){ + return (/^auto|left|right|top|bottom$/).test(word); + }); + o.orientation = {x: 'auto', y: 'auto'}; + if (!_plc || _plc === 'auto') + ; // no action + else if (plc.length === 1){ + switch(plc[0]){ + case 'top': + case 'bottom': + o.orientation.y = plc[0]; + break; + case 'left': + case 'right': + o.orientation.x = plc[0]; + break; + } + } + else { + _plc = $.grep(plc, function(word){ + return (/^left|right$/).test(word); + }); + o.orientation.x = _plc[0] || 'auto'; + + _plc = $.grep(plc, function(word){ + return (/^top|bottom$/).test(word); + }); + o.orientation.y = _plc[0] || 'auto'; + } + }, + _events: [], + _secondaryEvents: [], + _applyEvents: function(evs){ + for (var i=0, el, ev; i windowWidth) + left = windowWidth - calendarWidth - visualPadding; + } + + // auto y orientation is best-situation: top or bottom, no fudging, + // decision based on which shows more of the calendar + var yorient = this.o.orientation.y, + top_overflow, bottom_overflow; + if (yorient === 'auto') { + top_overflow = -scrollTop + offset.top - calendarHeight; + bottom_overflow = scrollTop + windowHeight - (offset.top + height + calendarHeight); + if (Math.max(top_overflow, bottom_overflow) === bottom_overflow) + yorient = 'top'; + else + yorient = 'bottom'; + } + this.picker.addClass('datepicker-orient-' + yorient); + if (yorient === 'top') + top += height; + else + top -= calendarHeight + parseInt(this.picker.css('padding-top')); + + this.picker.css({ + top: top, + left: left, + zIndex: zIndex + }); + }, + + _allow_update: true, + update: function(){ + if (!this._allow_update) return; + + var oldDate = new Date(this.date), + date, fromArgs = false; + if(arguments && arguments.length && (typeof arguments[0] === 'string' || arguments[0] instanceof Date)) { + date = arguments[0]; + if (date instanceof Date) + date = this._local_to_utc(date); + fromArgs = true; + } else { + date = this.isInput ? this.element.val() : this.element.data('date') || this.element.find('input').val(); + delete this.element.data().date; + } + + this.date = DPGlobal.parseDate(date, this.o.format, this.o.language); + + if (fromArgs) { + // setting date by clicking + this.setValue(); + } else if (date) { + // setting date by typing + if (oldDate.getTime() !== this.date.getTime()) + this._trigger('changeDate'); + } else { + // clearing date + this._trigger('clearDate'); + } + + if (this.date < this.o.startDate) { + this.viewDate = new Date(this.o.startDate); + this.date = new Date(this.o.startDate); + } else if (this.date > this.o.endDate) { + this.viewDate = new Date(this.o.endDate); + this.date = new Date(this.o.endDate); + } else { + this.viewDate = new Date(this.date); + this.date = new Date(this.date); + } + this.fill(); + }, + + fillDow: function(){ + var dowCnt = this.o.weekStart, + html = ''; + if(this.o.calendarWeeks){ + var cell = ' '; + html += cell; + this.picker.find('.datepicker-days thead tr:first-child').prepend(cell); + } + while (dowCnt < this.o.weekStart + 7) { + html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+''; + } + html += ''; + this.picker.find('.datepicker-days thead').append(html); + }, + + fillMonths: function(){ + var html = '', + i = 0; + while (i < 12) { + html += ''+dates[this.o.language].monthsShort[i++]+''; + } + this.picker.find('.datepicker-months td').html(html); + }, + + setRange: function(range){ + if (!range || !range.length) + delete this.range; + else + this.range = $.map(range, function(d){ return d.valueOf(); }); + this.fill(); + }, + + getClassNames: function(date){ + var cls = [], + year = this.viewDate.getUTCFullYear(), + month = this.viewDate.getUTCMonth(), + currentDate = this.date.valueOf(), + today = new Date(); + if (date.getUTCFullYear() < year || (date.getUTCFullYear() == year && date.getUTCMonth() < month)) { + cls.push('old'); + } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() == year && date.getUTCMonth() > month)) { + cls.push('new'); + } + // Compare internal UTC date with local today, not UTC today + if (this.o.todayHighlight && + date.getUTCFullYear() == today.getFullYear() && + date.getUTCMonth() == today.getMonth() && + date.getUTCDate() == today.getDate()) { + cls.push('today'); + } + if (currentDate && date.valueOf() == currentDate) { + cls.push('active'); + } + if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate || + $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1) { + cls.push('disabled'); + } + if (this.range){ + if (date > this.range[0] && date < this.range[this.range.length-1]){ + cls.push('range'); + } + if ($.inArray(date.valueOf(), this.range) != -1){ + cls.push('selected'); + } + } + return cls; + }, + + fill: function() { + var d = new Date(this.viewDate), + year = d.getUTCFullYear(), + month = d.getUTCMonth(), + startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, + startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, + endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, + endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, + currentDate = this.date && this.date.valueOf(), + tooltip; + this.picker.find('.datepicker-days thead th.datepicker-switch') + .text(dates[this.o.language].months[month]+' '+year); + this.picker.find('tfoot th.today') + .text(dates[this.o.language].today) + .toggle(this.o.todayBtn !== false); + this.picker.find('tfoot th.clear') + .text(dates[this.o.language].clear) + .toggle(this.o.clearBtn !== false); + this.updateNavArrows(); + this.fillMonths(); + var prevMonth = UTCDate(year, month-1, 28,0,0,0,0), + day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); + prevMonth.setUTCDate(day); + prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); + var nextMonth = new Date(prevMonth); + nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); + nextMonth = nextMonth.valueOf(); + var html = []; + var clsName; + while(prevMonth.valueOf() < nextMonth) { + if (prevMonth.getUTCDay() == this.o.weekStart) { + html.push(''); + if(this.o.calendarWeeks){ + // ISO 8601: First week contains first thursday. + // ISO also states week starts on Monday, but we can be more abstract here. + var + // Start of current week: based on weekstart/current date + ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5), + // Thursday of this week + th = new Date(+ws + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), + // First Thursday of year, year from thursday + yth = new Date(+(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5), + // Calendar week: ms between thursdays, div ms per day, div 7 days + calWeek = (th - yth) / 864e5 / 7 + 1; + html.push(''+ calWeek +''); + + } + } + clsName = this.getClassNames(prevMonth); + clsName.push('day'); + + if (this.o.beforeShowDay !== $.noop){ + var before = this.o.beforeShowDay(this._utc_to_local(prevMonth)); + if (before === undefined) + before = {}; + else if (typeof(before) === 'boolean') + before = {enabled: before}; + else if (typeof(before) === 'string') + before = {classes: before}; + if (before.enabled === false) + clsName.push('disabled'); + if (before.classes) + clsName = clsName.concat(before.classes.split(/\s+/)); + if (before.tooltip) + tooltip = before.tooltip; + } + + clsName = $.unique(clsName); + html.push(''+prevMonth.getUTCDate() + ''); + if (prevMonth.getUTCDay() == this.o.weekEnd) { + html.push(''); + } + prevMonth.setUTCDate(prevMonth.getUTCDate()+1); + } + this.picker.find('.datepicker-days tbody').empty().append(html.join('')); + var currentYear = this.date && this.date.getUTCFullYear(); + + var months = this.picker.find('.datepicker-months') + .find('th:eq(1)') + .text(year) + .end() + .find('span').removeClass('active'); + if (currentYear && currentYear == year) { + months.eq(this.date.getUTCMonth()).addClass('active'); + } + if (year < startYear || year > endYear) { + months.addClass('disabled'); + } + if (year == startYear) { + months.slice(0, startMonth).addClass('disabled'); + } + if (year == endYear) { + months.slice(endMonth+1).addClass('disabled'); + } + + html = ''; + year = parseInt(year/10, 10) * 10; + var yearCont = this.picker.find('.datepicker-years') + .find('th:eq(1)') + .text(year + '-' + (year + 9)) + .end() + .find('td'); + year -= 1; + for (var i = -1; i < 11; i++) { + html += ''+year+''; + year += 1; + } + yearCont.html(html); + }, + + updateNavArrows: function() { + if (!this._allow_update) return; + + var d = new Date(this.viewDate), + year = d.getUTCFullYear(), + month = d.getUTCMonth(); + switch (this.viewMode) { + case 0: + if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()) { + this.picker.find('.prev').css({visibility: 'hidden'}); + } else { + this.picker.find('.prev').css({visibility: 'visible'}); + } + if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()) { + this.picker.find('.next').css({visibility: 'hidden'}); + } else { + this.picker.find('.next').css({visibility: 'visible'}); + } + break; + case 1: + case 2: + if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()) { + this.picker.find('.prev').css({visibility: 'hidden'}); + } else { + this.picker.find('.prev').css({visibility: 'visible'}); + } + if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()) { + this.picker.find('.next').css({visibility: 'hidden'}); + } else { + this.picker.find('.next').css({visibility: 'visible'}); + } + break; + } + }, + + click: function(e) { + e.preventDefault(); + var target = $(e.target).closest('span, td, th'); + if (target.length == 1) { + switch(target[0].nodeName.toLowerCase()) { + case 'th': + switch(target[0].className) { + case 'datepicker-switch': + this.showMode(1); + break; + case 'prev': + case 'next': + var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1); + switch(this.viewMode){ + case 0: + this.viewDate = this.moveMonth(this.viewDate, dir); + this._trigger('changeMonth', this.viewDate); + break; + case 1: + case 2: + this.viewDate = this.moveYear(this.viewDate, dir); + if (this.viewMode === 1) + this._trigger('changeYear', this.viewDate); + break; + } + this.fill(); + break; + case 'today': + var date = new Date(); + date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); + + this.showMode(-2); + var which = this.o.todayBtn == 'linked' ? null : 'view'; + this._setDate(date, which); + break; + case 'clear': + var element; + if (this.isInput) + element = this.element; + else if (this.component) + element = this.element.find('input'); + if (element) + element.val("").change(); + this._trigger('changeDate'); + this.update(); + if (this.o.autoclose) + this.hide(); + break; + } + break; + case 'span': + if (!target.is('.disabled')) { + this.viewDate.setUTCDate(1); + if (target.is('.month')) { + var day = 1; + var month = target.parent().find('span').index(target); + var year = this.viewDate.getUTCFullYear(); + this.viewDate.setUTCMonth(month); + this._trigger('changeMonth', this.viewDate); + if (this.o.minViewMode === 1) { + this._setDate(UTCDate(year, month, day,0,0,0,0)); + } + } else { + var year = parseInt(target.text(), 10)||0; + var day = 1; + var month = 0; + this.viewDate.setUTCFullYear(year); + this._trigger('changeYear', this.viewDate); + if (this.o.minViewMode === 2) { + this._setDate(UTCDate(year, month, day,0,0,0,0)); + } + } + this.showMode(-1); + this.fill(); + } + break; + case 'td': + if (target.is('.day') && !target.is('.disabled')){ + var day = parseInt(target.text(), 10)||1; + var year = this.viewDate.getUTCFullYear(), + month = this.viewDate.getUTCMonth(); + if (target.is('.old')) { + if (month === 0) { + month = 11; + year -= 1; + } else { + month -= 1; + } + } else if (target.is('.new')) { + if (month == 11) { + month = 0; + year += 1; + } else { + month += 1; + } + } + this._setDate(UTCDate(year, month, day,0,0,0,0)); + } + break; + } + } + }, + + _setDate: function(date, which){ + if (!which || which == 'date') + this.date = new Date(date); + if (!which || which == 'view') + this.viewDate = new Date(date); + this.fill(); + this.setValue(); + this._trigger('changeDate'); + var element; + if (this.isInput) { + element = this.element; + } else if (this.component){ + element = this.element.find('input'); + } + if (element) { + element.change(); + } + if (this.o.autoclose && (!which || which == 'date')) { + this.hide(); + } + }, + + moveMonth: function(date, dir){ + if (!dir) return date; + var new_date = new Date(date.valueOf()), + day = new_date.getUTCDate(), + month = new_date.getUTCMonth(), + mag = Math.abs(dir), + new_month, test; + dir = dir > 0 ? 1 : -1; + if (mag == 1){ + test = dir == -1 + // If going back one month, make sure month is not current month + // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) + ? function(){ return new_date.getUTCMonth() == month; } + // If going forward one month, make sure month is as expected + // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) + : function(){ return new_date.getUTCMonth() != new_month; }; + new_month = month + dir; + new_date.setUTCMonth(new_month); + // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 + if (new_month < 0 || new_month > 11) + new_month = (new_month + 12) % 12; + } else { + // For magnitudes >1, move one month at a time... + for (var i=0; i= this.o.startDate && date <= this.o.endDate; + }, + + keydown: function(e){ + if (this.picker.is(':not(:visible)')){ + if (e.keyCode == 27) // allow escape to hide and re-show picker + this.show(); + return; + } + var dateChanged = false, + dir, day, month, + newDate, newViewDate; + switch(e.keyCode){ + case 27: // escape + this.hide(); + e.preventDefault(); + break; + case 37: // left + case 39: // right + if (!this.o.keyboardNavigation) break; + dir = e.keyCode == 37 ? -1 : 1; + if (e.ctrlKey){ + newDate = this.moveYear(this.date, dir); + newViewDate = this.moveYear(this.viewDate, dir); + this._trigger('changeYear', this.viewDate); + } else if (e.shiftKey){ + newDate = this.moveMonth(this.date, dir); + newViewDate = this.moveMonth(this.viewDate, dir); + this._trigger('changeMonth', this.viewDate); + } else { + newDate = new Date(this.date); + newDate.setUTCDate(this.date.getUTCDate() + dir); + newViewDate = new Date(this.viewDate); + newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir); + } + if (this.dateWithinRange(newDate)){ + this.date = newDate; + this.viewDate = newViewDate; + this.setValue(); + this.update(); + e.preventDefault(); + dateChanged = true; + } + break; + case 38: // up + case 40: // down + if (!this.o.keyboardNavigation) break; + dir = e.keyCode == 38 ? -1 : 1; + if (e.ctrlKey){ + newDate = this.moveYear(this.date, dir); + newViewDate = this.moveYear(this.viewDate, dir); + this._trigger('changeYear', this.viewDate); + } else if (e.shiftKey){ + newDate = this.moveMonth(this.date, dir); + newViewDate = this.moveMonth(this.viewDate, dir); + this._trigger('changeMonth', this.viewDate); + } else { + newDate = new Date(this.date); + newDate.setUTCDate(this.date.getUTCDate() + dir * 7); + newViewDate = new Date(this.viewDate); + newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir * 7); + } + if (this.dateWithinRange(newDate)){ + this.date = newDate; + this.viewDate = newViewDate; + this.setValue(); + this.update(); + e.preventDefault(); + dateChanged = true; + } + break; + case 13: // enter + this.hide(); + e.preventDefault(); + break; + case 9: // tab + this.hide(); + break; + } + if (dateChanged){ + this._trigger('changeDate'); + var element; + if (this.isInput) { + element = this.element; + } else if (this.component){ + element = this.element.find('input'); + } + if (element) { + element.change(); + } + } + }, + + showMode: function(dir) { + if (dir) { + this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir)); + } + /* + vitalets: fixing bug of very special conditions: + jquery 1.7.1 + webkit + show inline datepicker in bootstrap popover. + Method show() does not set display css correctly and datepicker is not shown. + Changed to .css('display', 'block') solve the problem. + See https://github.com/vitalets/x-editable/issues/37 + + In jquery 1.7.2+ everything works fine. + */ + //this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); + this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block'); + this.updateNavArrows(); + } + }; + + var DateRangePicker = function(element, options){ + this.element = $(element); + this.inputs = $.map(options.inputs, function(i){ return i.jquery ? i[0] : i; }); + delete options.inputs; + + $(this.inputs) + .datepicker(options) + .bind('changeDate', $.proxy(this.dateUpdated, this)); + + this.pickers = $.map(this.inputs, function(i){ return $(i).data('datepicker'); }); + this.updateDates(); + }; + DateRangePicker.prototype = { + updateDates: function(){ + this.dates = $.map(this.pickers, function(i){ return i.date; }); + this.updateRanges(); + }, + updateRanges: function(){ + var range = $.map(this.dates, function(d){ return d.valueOf(); }); + $.each(this.pickers, function(i, p){ + p.setRange(range); + }); + }, + dateUpdated: function(e){ + var dp = $(e.target).data('datepicker'), + new_date = dp.getUTCDate(), + i = $.inArray(e.target, this.inputs), + l = this.inputs.length; + if (i == -1) return; + + if (new_date < this.dates[i]){ + // Date being moved earlier/left + while (i>=0 && new_date < this.dates[i]){ + this.pickers[i--].setUTCDate(new_date); + } + } + else if (new_date > this.dates[i]){ + // Date being moved later/right + while (i this.dates[i]){ + this.pickers[i++].setUTCDate(new_date); + } + } + this.updateDates(); + }, + remove: function(){ + $.map(this.pickers, function(p){ p.remove(); }); + delete this.element.data().datepicker; + } + }; + + function opts_from_el(el, prefix){ + // Derive options from element data-attrs + var data = $(el).data(), + out = {}, inkey, + replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'), + prefix = new RegExp('^' + prefix.toLowerCase()); + for (var key in data) + if (prefix.test(key)){ + inkey = key.replace(replace, function(_,a){ return a.toLowerCase(); }); + out[inkey] = data[key]; + } + return out; + } + + function opts_from_locale(lang){ + // Derive options from locale plugins + var out = {}; + // Check if "de-DE" style date is available, if not language should + // fallback to 2 letter code eg "de" + if (!dates[lang]) { + lang = lang.split('-')[0] + if (!dates[lang]) + return; + } + var d = dates[lang]; + $.each(locale_opts, function(i,k){ + if (k in d) + out[k] = d[k]; + }); + return out; + } + + var old = $.fn.datepicker; + $.fn.datepicker = function ( option ) { + var args = Array.apply(null, arguments); + args.shift(); + var internal_return, + this_return; + this.each(function () { + var $this = $(this), + data = $this.data('datepicker'), + options = typeof option == 'object' && option; + if (!data) { + var elopts = opts_from_el(this, 'date'), + // Preliminary otions + xopts = $.extend({}, defaults, elopts, options), + locopts = opts_from_locale(xopts.language), + // Options priority: js args, data-attrs, locales, defaults + opts = $.extend({}, defaults, locopts, elopts, options); + if ($this.is('.input-daterange') || opts.inputs){ + var ropts = { + inputs: opts.inputs || $this.find('input').toArray() + }; + $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts)))); + } + else{ + $this.data('datepicker', (data = new Datepicker(this, opts))); + } + } + if (typeof option == 'string' && typeof data[option] == 'function') { + internal_return = data[option].apply(data, args); + if (internal_return !== undefined) + return false; + } + }); + if (internal_return !== undefined) + return internal_return; + else + return this; + }; + + var defaults = $.fn.datepicker.defaults = { + autoclose: false, + beforeShowDay: $.noop, + calendarWeeks: false, + clearBtn: false, + daysOfWeekDisabled: [], + endDate: Infinity, + forceParse: true, + format: 'mm/dd/yyyy', + keyboardNavigation: true, + language: 'en', + minViewMode: 0, + orientation: "auto", + rtl: false, + startDate: -Infinity, + startView: 0, + todayBtn: false, + todayHighlight: false, + weekStart: 0 + }; + var locale_opts = $.fn.datepicker.locale_opts = [ + 'format', + 'rtl', + 'weekStart' + ]; + $.fn.datepicker.Constructor = Datepicker; + var dates = $.fn.datepicker.dates = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear" + } + }; + + var DPGlobal = { + modes: [ + { + clsName: 'days', + navFnc: 'Month', + navStep: 1 + }, + { + clsName: 'months', + navFnc: 'FullYear', + navStep: 1 + }, + { + clsName: 'years', + navFnc: 'FullYear', + navStep: 10 + }], + isLeapYear: function (year) { + return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); + }, + getDaysInMonth: function (year, month) { + return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; + }, + validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, + nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g, + parseFormat: function(format){ + // IE treats \0 as a string end in inputs (truncating the value), + // so it's a bad format delimiter, anyway + var separators = format.replace(this.validParts, '\0').split('\0'), + parts = format.match(this.validParts); + if (!separators || !separators.length || !parts || parts.length === 0){ + throw new Error("Invalid date format."); + } + return {separators: separators, parts: parts}; + }, + parseDate: function(date, format, language) { + if (date instanceof Date) return date; + if (typeof format === 'string') + format = DPGlobal.parseFormat(format); + if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) { + var part_re = /([\-+]\d+)([dmwy])/, + parts = date.match(/([\-+]\d+)([dmwy])/g), + part, dir; + date = new Date(); + for (var i=0; i'+ + ''+ + '«'+ + ''+ + '»'+ + ''+ + '', + contTemplate: '', + footTemplate: '' + }; + DPGlobal.template = '
'+ + '
'+ + ''+ + DPGlobal.headTemplate+ + ''+ + DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + DPGlobal.headTemplate+ + DPGlobal.contTemplate+ + DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + DPGlobal.headTemplate+ + DPGlobal.contTemplate+ + DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'; + + $.fn.datepicker.DPGlobal = DPGlobal; + + + /* DATEPICKER NO CONFLICT + * =================== */ + + $.fn.datepicker.noConflict = function(){ + $.fn.datepicker = old; + return this; + }; + + + /* DATEPICKER DATA-API + * ================== */ + + $(document).on( + 'focus.datepicker.data-api click.datepicker.data-api', + '[data-provide="datepicker"]', + function(e){ + var $this = $(this); + if ($this.data('datepicker')) return; + e.preventDefault(); + // component click requires us to explicitly show it + $this.datepicker('show'); + } + ); + $(function(){ + $('[data-provide="datepicker-inline"]').datepicker(); + }); + +}( window.jQuery )); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.ar.js b/template/datepicker/js/locales/bootstrap-datepicker.ar.js new file mode 100644 index 0000000..12ae182 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.ar.js @@ -0,0 +1,15 @@ +/** + * Arabic translation for bootstrap-datepicker + * Mohammed Alshehri + */ +;(function($){ + $.fn.datepicker.dates['ar'] = { + days: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"], + daysShort: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت", "أحد"], + daysMin: ["ح", "ن", "ث", "ع", "خ", "ج", "س", "ح"], + months: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], + monthsShort: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], + today: "هذا اليوم", + rtl: true + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.bg.js b/template/datepicker/js/locales/bootstrap-datepicker.bg.js new file mode 100644 index 0000000..6837afd --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.bg.js @@ -0,0 +1,14 @@ +/** + * Bulgarian translation for bootstrap-datepicker + * Apostol Apostolov + */ +;(function($){ + $.fn.datepicker.dates['bg'] = { + days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"], + daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб", "Нед"], + daysMin: ["Н", "П", "В", "С", "Ч", "П", "С", "Н"], + months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"], + monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"], + today: "днес" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.ca.js b/template/datepicker/js/locales/bootstrap-datepicker.ca.js new file mode 100644 index 0000000..3fc4d84 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.ca.js @@ -0,0 +1,14 @@ +/** + * Catalan translation for bootstrap-datepicker + * J. Garcia + */ +;(function($){ + $.fn.datepicker.dates['ca'] = { + days: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte", "Diumenge"], + daysShort: ["Diu", "Dil", "Dmt", "Dmc", "Dij", "Div", "Dis", "Diu"], + daysMin: ["dg", "dl", "dt", "dc", "dj", "dv", "ds", "dg"], + months: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"], + monthsShort: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"], + today: "Avui" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.cs.js b/template/datepicker/js/locales/bootstrap-datepicker.cs.js new file mode 100644 index 0000000..f76a2c0 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.cs.js @@ -0,0 +1,15 @@ +/** + * Czech translation for bootstrap-datepicker + * Matěj Koubík + * Fixes by Michal Remiš + */ +;(function($){ + $.fn.datepicker.dates['cs'] = { + days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota", "Neděle"], + daysShort: ["Ned", "Pon", "Úte", "Stř", "Čtv", "Pát", "Sob", "Ned"], + daysMin: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So", "Ne"], + months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], + monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"], + today: "Dnes" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.da.js b/template/datepicker/js/locales/bootstrap-datepicker.da.js new file mode 100644 index 0000000..6307be5 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.da.js @@ -0,0 +1,14 @@ +/** + * Danish translation for bootstrap-datepicker + * Christian Pedersen + */ +;(function($){ + $.fn.datepicker.dates['da'] = { + days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], + daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], + daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"], + months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "I Dag" + }; +}(jQuery)); \ No newline at end of file diff --git a/template/datepicker/js/locales/bootstrap-datepicker.de.js b/template/datepicker/js/locales/bootstrap-datepicker.de.js new file mode 100644 index 0000000..3d491a2 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.de.js @@ -0,0 +1,16 @@ +/** + * German translation for bootstrap-datepicker + * Sam Zurcher + */ +;(function($){ + $.fn.datepicker.dates['de'] = { + days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"], + daysShort: ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam", "Son"], + daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"], + months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], + monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], + today: "Heute", + weekStart: 1, + format: "dd.mm.yyyy" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.el.js b/template/datepicker/js/locales/bootstrap-datepicker.el.js new file mode 100644 index 0000000..6de26bc --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.el.js @@ -0,0 +1,13 @@ +/** +* Greek translation for bootstrap-datepicker +*/ +;(function($){ + $.fn.datepicker.dates['el'] = { + days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο", "Κυριακή"], + daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ", "Κυρ"], + daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα", "Κυ"], + months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], + monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"], + today: "Σήμερα" + }; +}(jQuery)); \ No newline at end of file diff --git a/template/datepicker/js/locales/bootstrap-datepicker.es.js b/template/datepicker/js/locales/bootstrap-datepicker.es.js new file mode 100644 index 0000000..7217690 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.es.js @@ -0,0 +1,14 @@ +/** + * Spanish translation for bootstrap-datepicker + * Bruno Bonamin + */ +;(function($){ + $.fn.datepicker.dates['es'] = { + days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"], + daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb", "Dom"], + daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa", "Do"], + months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], + monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], + today: "Hoy" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.et.js b/template/datepicker/js/locales/bootstrap-datepicker.et.js new file mode 100644 index 0000000..a052861 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.et.js @@ -0,0 +1,14 @@ +/** + * Estonian translation for bootstrap-datepicker + * Ando Roots + */ +;(function($){ + $.fn.datepicker.dates['et'] = { + days: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev", "Pühapäev"], + daysShort: ["Püh", "Esm", "Tei", "Kol", "Nel", "Ree", "Lau", "Sun"], + daysMin: ["P", "E", "T", "K", "N", "R", "L", "P"], + months: ["Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"], + monthsShort: ["Jaan", "Veeb", "Märts", "Apr", "Mai", "Juuni", "Juuli", "Aug", "Sept", "Okt", "Nov", "Dets"], + today: "Täna" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.fi.js b/template/datepicker/js/locales/bootstrap-datepicker.fi.js new file mode 100644 index 0000000..01f40dc --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.fi.js @@ -0,0 +1,16 @@ +/** + * Finnish translation for bootstrap-datepicker + * Jaakko Salonen + */ +;(function($){ + $.fn.datepicker.dates['fi'] = { + days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"], + daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "lau", "sun"], + daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la", "su"], + months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], + monthsShort: ["tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mar", "jou"], + today: "tänään", + weekStart: 1, + format: "d.m.yyyy" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.fr.js b/template/datepicker/js/locales/bootstrap-datepicker.fr.js new file mode 100644 index 0000000..1bef017 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.fr.js @@ -0,0 +1,17 @@ +/** + * French translation for bootstrap-datepicker + * Nico Mollet + */ +;(function($){ + $.fn.datepicker.dates['fr'] = { + days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"], + daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"], + daysMin: ["D", "L", "Ma", "Me", "J", "V", "S", "D"], + months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], + monthsShort: ["Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec"], + today: "Aujourd'hui", + clear: "Effacer", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.he.js b/template/datepicker/js/locales/bootstrap-datepicker.he.js new file mode 100644 index 0000000..2e17393 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.he.js @@ -0,0 +1,15 @@ +/** + * Hebrew translation for bootstrap-datepicker + * Sagie Maoz + */ +;(function($){ + $.fn.datepicker.dates['he'] = { + days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"], + daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], + daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"], + months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], + monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], + today: "היום", + rtl: true + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.hr.js b/template/datepicker/js/locales/bootstrap-datepicker.hr.js new file mode 100644 index 0000000..8d13d11 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.hr.js @@ -0,0 +1,13 @@ +/** + * Croatian localisation + */ +;(function($){ + $.fn.datepicker.dates['hr'] = { + days: ["Nedjelja", "Ponedjelja", "Utorak", "Srijeda", "Četrtak", "Petak", "Subota", "Nedjelja"], + daysShort: ["Ned", "Pon", "Uto", "Srr", "Čet", "Pet", "Sub", "Ned"], + daysMin: ["Ne", "Po", "Ut", "Sr", "Če", "Pe", "Su", "Ne"], + months: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], + monthsShort: ["Sije", "Velj", "Ožu", "Tra", "Svi", "Lip", "Jul", "Kol", "Ruj", "Lis", "Stu", "Pro"], + today: "Danas" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.hu.js b/template/datepicker/js/locales/bootstrap-datepicker.hu.js new file mode 100644 index 0000000..bf5308a --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.hu.js @@ -0,0 +1,16 @@ +/** + * Hungarian translation for bootstrap-datepicker + * Sotus László + */ +;(function($){ + $.fn.datepicker.dates['hu'] = { + days: ["Vasárnap", "Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat", "Vasárnap"], + daysShort: ["Vas", "Hét", "Ked", "Sze", "Csü", "Pén", "Szo", "Vas"], + daysMin: ["Va", "Hé", "Ke", "Sz", "Cs", "Pé", "Sz", "Va"], + months: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"], + monthsShort: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Sze", "Okt", "Nov", "Dec"], + today: "Ma", + weekStart: 1, + format: "yyyy.mm.dd" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.id.js b/template/datepicker/js/locales/bootstrap-datepicker.id.js new file mode 100644 index 0000000..aae6e89 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.id.js @@ -0,0 +1,15 @@ +/** + * Bahasa translation for bootstrap-datepicker + * Azwar Akbar + */ +;(function($){ + $.fn.datepicker.dates['id'] = { + days: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu"], + daysShort: ["Mgu", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Mgu"], + daysMin: ["Mg", "Sn", "Sl", "Ra", "Ka", "Ju", "Sa", "Mg"], + months: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], + today: "Hari Ini", + clear: "Kosongkan" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.is.js b/template/datepicker/js/locales/bootstrap-datepicker.is.js new file mode 100644 index 0000000..0e57a91 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.is.js @@ -0,0 +1,14 @@ +/** + * Icelandic translation for bootstrap-datepicker + * Hinrik Örn Sigurðsson + */ +;(function($){ + $.fn.datepicker.dates['is'] = { + days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur", "Sunnudagur"], + daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau", "Sun"], + daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La", "Su"], + months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"], + today: "Í Dag" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.it.js b/template/datepicker/js/locales/bootstrap-datepicker.it.js new file mode 100644 index 0000000..8209f2a --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.it.js @@ -0,0 +1,16 @@ +/** + * Italian translation for bootstrap-datepicker + * Enrico Rubboli + */ +;(function($){ + $.fn.datepicker.dates['it'] = { + days: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato", "Domenica"], + daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab", "Dom"], + daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa", "Do"], + months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], + monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], + today: "Oggi", + weekStart: 1, + format: "dd/mm/yyyy" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.ja.js b/template/datepicker/js/locales/bootstrap-datepicker.ja.js new file mode 100644 index 0000000..ed0bc0f --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.ja.js @@ -0,0 +1,15 @@ +/** + * Japanese translation for bootstrap-datepicker + * Norio Suzuki + */ +;(function($){ + $.fn.datepicker.dates['ja'] = { + days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜", "日曜"], + daysShort: ["日", "月", "火", "水", "木", "金", "土", "日"], + daysMin: ["日", "月", "火", "水", "木", "金", "土", "日"], + months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], + today: "今日", + format: "yyyy/mm/dd" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.ka.js b/template/datepicker/js/locales/bootstrap-datepicker.ka.js new file mode 100644 index 0000000..3580494 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.ka.js @@ -0,0 +1,15 @@ +/** + * Georgian translation for bootstrap-datepicker + * Levan Melikishvili + */ +;(function($){ + $.fn.datepicker.dates['ka'] = { + days: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი", "კვირა"], + daysShort: ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ", "კვი"], + daysMin: ["კვ", "ორ", "სა", "ოთ", "ხუ", "პა", "შა", "კვ"], + months: ["იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომები", "ნოემბერი", "დეკემბერი"], + monthsShort: ["იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"], + today: "დღეს", + clear: "გასუფთავება" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.kr.js b/template/datepicker/js/locales/bootstrap-datepicker.kr.js new file mode 100644 index 0000000..183a88d --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.kr.js @@ -0,0 +1,13 @@ +/** + * Korean translation for bootstrap-datepicker + * Gu Youn + */ +;(function($){ + $.fn.datepicker.dates['kr'] = { + days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"], + daysShort: ["일", "월", "화", "수", "목", "금", "토", "일"], + daysMin: ["일", "월", "화", "수", "목", "금", "토", "일"], + months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], + monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"] + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.lt.js b/template/datepicker/js/locales/bootstrap-datepicker.lt.js new file mode 100644 index 0000000..11c1b3a --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.lt.js @@ -0,0 +1,16 @@ +/** + * Lithuanian translation for bootstrap-datepicker + * Šarūnas Gliebus + */ + +;(function($){ + $.fn.datepicker.dates['lt'] = { + days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis", "Sekmadienis"], + daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š", "S"], + daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št", "Sk"], + months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"], + monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"], + today: "Šiandien", + weekStart: 1 + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.lv.js b/template/datepicker/js/locales/bootstrap-datepicker.lv.js new file mode 100644 index 0000000..cc75fe0 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.lv.js @@ -0,0 +1,16 @@ +/** + * Latvian translation for bootstrap-datepicker + * Artis Avotins + */ + +;(function($){ + $.fn.datepicker.dates['lv'] = { + days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"], + daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S", "Sv"], + daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "St", "Sv"], + months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec."], + today: "Šodien", + weekStart: 1 + }; +}(jQuery)); \ No newline at end of file diff --git a/template/datepicker/js/locales/bootstrap-datepicker.mk.js b/template/datepicker/js/locales/bootstrap-datepicker.mk.js new file mode 100644 index 0000000..da02018 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.mk.js @@ -0,0 +1,14 @@ +/** + * Macedonian translation for bootstrap-datepicker + * Marko Aleksic + */ +;(function($){ + $.fn.datepicker.dates['mk'] = { + days: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота", "Недела"], + daysShort: ["Нед", "Пон", "Вто", "Сре", "Чет", "Пет", "Саб", "Нед"], + daysMin: ["Не", "По", "Вт", "Ср", "Че", "Пе", "Са", "Не"], + months: ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"], + monthsShort: ["Јан", "Фев", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Ное", "Дек"], + today: "Денес" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.ms.js b/template/datepicker/js/locales/bootstrap-datepicker.ms.js new file mode 100644 index 0000000..fa3a21a --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.ms.js @@ -0,0 +1,14 @@ +/** + * Malay translation for bootstrap-datepicker + * Ateman Faiz + */ +;(function($){ + $.fn.datepicker.dates['ms'] = { + days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu", "Ahad"], + daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab", "Aha"], + daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa", "Ah"], + months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"], + today: "Hari Ini" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.nb.js b/template/datepicker/js/locales/bootstrap-datepicker.nb.js new file mode 100644 index 0000000..fb9fe2a --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.nb.js @@ -0,0 +1,14 @@ +/** + * Norwegian (bokmål) translation for bootstrap-datepicker + * Fredrik Sundmyhr + */ +;(function($){ + $.fn.datepicker.dates['nb'] = { + days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"], + daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"], + daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"], + months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], + today: "I Dag" + }; +}(jQuery)); \ No newline at end of file diff --git a/template/datepicker/js/locales/bootstrap-datepicker.nl.js b/template/datepicker/js/locales/bootstrap-datepicker.nl.js new file mode 100644 index 0000000..13a2f1a --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.nl.js @@ -0,0 +1,14 @@ +/** + * Dutch translation for bootstrap-datepicker + * Reinier Goltstein + */ +;(function($){ + $.fn.datepicker.dates['nl'] = { + days: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"], + daysShort: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"], + daysMin: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"], + months: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "Vandaag" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.no.js b/template/datepicker/js/locales/bootstrap-datepicker.no.js new file mode 100644 index 0000000..7d104d4 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.no.js @@ -0,0 +1,15 @@ +/** + * Norwegian translation for bootstrap-datepicker + **/ +;(function($){ + $.fn.datepicker.dates['no'] = { + days: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], + daysShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], + daysMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], + months: ['Januar','Februar','Mars','April','Mai','Juni','Juli','August','September','Oktober','November','Desember'], + monthsShort: ['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Des'], + today: 'I dag', + clear: 'Nullstill', + weekStart: 0 + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.pl.js b/template/datepicker/js/locales/bootstrap-datepicker.pl.js new file mode 100644 index 0000000..f3fff8c --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.pl.js @@ -0,0 +1,15 @@ +/** + * Polish translation for bootstrap-datepicker + * Robert + */ +;(function($){ + $.fn.datepicker.dates['pl'] = { + days: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela"], + daysShort: ["Nie", "Pn", "Wt", "Śr", "Czw", "Pt", "So", "Nie"], + daysMin: ["N", "Pn", "Wt", "Śr", "Cz", "Pt", "So", "N"], + months: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], + monthsShort: ["Sty", "Lu", "Mar", "Kw", "Maj", "Cze", "Lip", "Sie", "Wrz", "Pa", "Lis", "Gru"], + today: "Dzisiaj", + weekStart: 1 + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.pt-BR.js b/template/datepicker/js/locales/bootstrap-datepicker.pt-BR.js new file mode 100644 index 0000000..eb642b7 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.pt-BR.js @@ -0,0 +1,15 @@ +/** + * Brazilian translation for bootstrap-datepicker + * Cauan Cabral + */ +;(function($){ + $.fn.datepicker.dates['pt-BR'] = { + days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"], + daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"], + daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"], + months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], + monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], + today: "Hoje", + clear: "Limpar" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.pt.js b/template/datepicker/js/locales/bootstrap-datepicker.pt.js new file mode 100644 index 0000000..e54981d --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.pt.js @@ -0,0 +1,16 @@ +/** + * Portuguese translation for bootstrap-datepicker + * Original code: Cauan Cabral + * Tiago Melo + */ +;(function($){ + $.fn.datepicker.dates['pt'] = { + days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"], + daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"], + daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"], + months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], + monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], + today: "Hoje", + clear: "Limpar" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.ro.js b/template/datepicker/js/locales/bootstrap-datepicker.ro.js new file mode 100644 index 0000000..03c1a47 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.ro.js @@ -0,0 +1,15 @@ +/** + * Romanian translation for bootstrap-datepicker + * Cristian Vasile + */ +;(function($){ + $.fn.datepicker.dates['ro'] = { + days: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă", "Duminică"], + daysShort: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm", "Dum"], + daysMin: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ", "Du"], + months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"], + monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Astăzi", + weekStart: 1 + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.rs-latin.js b/template/datepicker/js/locales/bootstrap-datepicker.rs-latin.js new file mode 100644 index 0000000..d942485 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.rs-latin.js @@ -0,0 +1,14 @@ +/** + * Serbian latin translation for bootstrap-datepicker + * Bojan Milosavlević + */ +;(function($){ + $.fn.datepicker.dates['rs-latin'] = { + days: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota", "Nedelja"], + daysShort: ["Ned", "Pon", "Uto", "Sre", "Čet", "Pet", "Sub", "Ned"], + daysMin: ["N", "Po", "U", "Sr", "Č", "Pe", "Su", "N"], + months: ["Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], + today: "Danas" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.rs.js b/template/datepicker/js/locales/bootstrap-datepicker.rs.js new file mode 100644 index 0000000..6b65747 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.rs.js @@ -0,0 +1,14 @@ +/** + * Serbian cyrillic translation for bootstrap-datepicker + * Bojan Milosavlević + */ +;(function($){ + $.fn.datepicker.dates['rs'] = { + days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота", "Недеља"], + daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб", "Нед"], + daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су", "Н"], + months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"], + monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"], + today: "Данас" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.ru.js b/template/datepicker/js/locales/bootstrap-datepicker.ru.js new file mode 100644 index 0000000..e230aa9 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.ru.js @@ -0,0 +1,15 @@ +/** + * Russian translation for bootstrap-datepicker + * Victor Taranenko + */ +;(function($){ + $.fn.datepicker.dates['ru'] = { + days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"], + daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Вск"], + daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"], + months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"], + monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"], + today: "Сегодня", + weekStart: 1 + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.sk.js b/template/datepicker/js/locales/bootstrap-datepicker.sk.js new file mode 100644 index 0000000..c48032a --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.sk.js @@ -0,0 +1,15 @@ +/** + * Slovak translation for bootstrap-datepicker + * Marek Lichtner + * Fixes by Michal Remiš + */ +;(function($){ + $.fn.datepicker.dates["sk"] = { + days: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota", "Nedeľa"], + daysShort: ["Ned", "Pon", "Uto", "Str", "Štv", "Pia", "Sob", "Ned"], + daysMin: ["Ne", "Po", "Ut", "St", "Št", "Pia", "So", "Ne"], + months: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "Dnes" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.sl.js b/template/datepicker/js/locales/bootstrap-datepicker.sl.js new file mode 100644 index 0000000..41b0e06 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.sl.js @@ -0,0 +1,14 @@ +/** + * Slovene translation for bootstrap-datepicker + * Gregor Rudolf + */ +;(function($){ + $.fn.datepicker.dates['sl'] = { + days: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota", "Nedelja"], + daysShort: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob", "Ned"], + daysMin: ["Ne", "Po", "To", "Sr", "Če", "Pe", "So", "Ne"], + months: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"], + today: "Danes" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.sq.js b/template/datepicker/js/locales/bootstrap-datepicker.sq.js new file mode 100644 index 0000000..a045a9d --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.sq.js @@ -0,0 +1,15 @@ +/** + * Albanian translation for bootstrap-datepicker + * Tomor Pupovci + */ +;(function($){ + $.fn.datepicker.dates['sq'] = { + days: ["E Diel", "E Hënë", "E martē", "E mërkurë", "E Enjte", "E Premte", "E Shtunë", "E Diel"], + daysShort: ["Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu", "Die"], + daysMin: ["Di", "Hë", "Ma", "Më", "En", "Pr", "Sht", "Di"], + months: ["Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"], + monthsShort: ["Jan", "Shk", "Mar", "Pri", "Maj", "Qer", "Korr", "Gu", "Sht", "Tet", "Nën", "Dhjet"], + today: "Sot" + }; +}(jQuery)); + diff --git a/template/datepicker/js/locales/bootstrap-datepicker.sv.js b/template/datepicker/js/locales/bootstrap-datepicker.sv.js new file mode 100644 index 0000000..3462a39 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.sv.js @@ -0,0 +1,16 @@ +/** + * Swedish translation for bootstrap-datepicker + * Patrik Ragnarsson + */ +;(function($){ + $.fn.datepicker.dates['sv'] = { + days: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag", "Söndag"], + daysShort: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör", "Sön"], + daysMin: ["Sö", "Må", "Ti", "On", "To", "Fr", "Lö", "Sö"], + months: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], + today: "I Dag", + format: "yyyy-mm-dd", + weekStart: 1 + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.sw.js b/template/datepicker/js/locales/bootstrap-datepicker.sw.js new file mode 100644 index 0000000..622e0ef --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.sw.js @@ -0,0 +1,15 @@ +/** + * Swahili translation for bootstrap-datepicker + * Edwin Mugendi + * Source: http://scriptsource.org/cms/scripts/page.php?item_id=entry_detail&uid=xnfaqyzcku + */ +;(function($){ + $.fn.datepicker.dates['sw'] = { + days: ["Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi", "Jumapili"], + daysShort: ["J2", "J3", "J4", "J5", "Alh", "Ij", "J1", "J2"], + daysMin: ["2", "3", "4", "5", "A", "I", "1", "2"], + months: ["Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"], + monthsShort: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"], + today: "Leo" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.th.js b/template/datepicker/js/locales/bootstrap-datepicker.th.js new file mode 100644 index 0000000..562b063 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.th.js @@ -0,0 +1,14 @@ +/** + * Thai translation for bootstrap-datepicker + * Suchau Jiraprapot + */ +;(function($){ + $.fn.datepicker.dates['th'] = { + days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"], + daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], + daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"], + months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"], + monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."], + today: "วันนี้" + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.tr.js b/template/datepicker/js/locales/bootstrap-datepicker.tr.js new file mode 100644 index 0000000..2be8b6d --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.tr.js @@ -0,0 +1,16 @@ +/** + * Turkish translation for bootstrap-datepicker + * Serkan Algur + */ +;(function($){ + $.fn.datepicker.dates['tr'] = { + days: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi", "Pazar"], + daysShort: ["Pz", "Pzt", "Sal", "Çrş", "Prş", "Cu", "Cts", "Pz"], + daysMin: ["Pz", "Pzt", "Sa", "Çr", "Pr", "Cu", "Ct", "Pz"], + months: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], + monthsShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], + today: "Bugün", + format: "dd.mm.yyyy" + }; +}(jQuery)); + diff --git a/template/datepicker/js/locales/bootstrap-datepicker.uk.js b/template/datepicker/js/locales/bootstrap-datepicker.uk.js new file mode 100644 index 0000000..bbd0c73 --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.uk.js @@ -0,0 +1,14 @@ +/** + * Ukrainian translation for bootstrap-datepicker + * Andrey Vityuk + */ +;(function($){ + $.fn.datepicker.dates['uk'] = { + days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота", "Неділя"], + daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"], + daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"], + months: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], + monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], + today: "Сьогодні" + }; +}(jQuery)); \ No newline at end of file diff --git a/template/datepicker/js/locales/bootstrap-datepicker.zh-CN.js b/template/datepicker/js/locales/bootstrap-datepicker.zh-CN.js new file mode 100644 index 0000000..d6625ec --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.zh-CN.js @@ -0,0 +1,16 @@ +/** + * Simplified Chinese translation for bootstrap-datepicker + * Yuan Cheung + */ +;(function($){ + $.fn.datepicker.dates['zh-CN'] = { + days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"], + daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"], + daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"], + months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + today: "今日", + format: "yyyy年mm月dd日", + weekStart: 1 + }; +}(jQuery)); diff --git a/template/datepicker/js/locales/bootstrap-datepicker.zh-TW.js b/template/datepicker/js/locales/bootstrap-datepicker.zh-TW.js new file mode 100644 index 0000000..53337ae --- /dev/null +++ b/template/datepicker/js/locales/bootstrap-datepicker.zh-TW.js @@ -0,0 +1,17 @@ +/** + * Traditional Chinese translation for bootstrap-datepicker + * Rung-Sheng Jang + * FrankWu Fix more appropriate use of Traditional Chinese habit + */ +;(function($){ + $.fn.datepicker.dates['zh-TW'] = { + days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"], + daysShort: ["週日", "週一", "週二", "週三", "週四", "週五", "週六", "週日"], + daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"], + months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], + today: "今天", + format: "yyyy年mm月dd日", + weekStart: 1 + }; +}(jQuery)); diff --git a/template/datepicker/less/datepicker.less b/template/datepicker/less/datepicker.less new file mode 100644 index 0000000..044a1da --- /dev/null +++ b/template/datepicker/less/datepicker.less @@ -0,0 +1,258 @@ +/*! + * Datepicker for Bootstrap + * + * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ + +.datepicker { + padding: 4px; + .border-radius(4px); + &-inline { + width: 220px; + } + direction: ltr; + &&-rtl { + direction: rtl; + table tr td span { + float: right; + } + } + &-dropdown { + top: 0; + left: 0; + &:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-top: 0; + border-bottom-color: rgba(0,0,0,.2); + position: absolute; + } + &:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid @white; + border-top: 0; + position: absolute; + } + &.datepicker-orient-left:before { left: 6px; } + &.datepicker-orient-left:after { left: 7px; } + &.datepicker-orient-right:before { right: 6px; } + &.datepicker-orient-right:after { right: 7px; } + &.datepicker-orient-top:before { top: -7px; } + &.datepicker-orient-top:after { top: -6px; } + &.datepicker-orient-bottom:before { + bottom: -7px; + border-bottom: 0; + border-top: 7px solid #999; + } + &.datepicker-orient-bottom:after { + bottom: -6px; + border-bottom: 0; + border-top: 6px solid @white; + } + } + >div { + display: none; + } + &.days div.datepicker-days { + display: block; + } + &.months div.datepicker-months { + display: block; + } + &.years div.datepicker-years { + display: block; + } + table{ + margin: 0; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + td, + th{ + text-align: center; + width: 20px; + height: 20px; + .border-radius(4px); + + border: none; + } + // Inline display inside a table presents some problems with + // border and background colors. + .table-striped & table tr { + td, th { + background-color:transparent; + } + } + table tr td { + &.day:hover { + background: @grayLighter; + cursor: pointer; + } + &.old, + &.new { + color: @grayLight; + } + &.disabled, + &.disabled:hover { + background: none; + color: @grayLight; + cursor: default; + } + &.today, + &.today:hover, + &.today.disabled, + &.today.disabled:hover { + @todayBackground: lighten(@orange, 30%); + .buttonBackground(@todayBackground, spin(@todayBackground, 20)); + color: #000; + } + &.today:hover:hover { // Thank bootstrap 2.0 for this selector... + // TODO: Bump min BS to 2.1, use @textColor in buttonBackground above + color: #000; + } + &.today.active:hover { + color: #fff; + } + &.range, + &.range:hover, + &.range.disabled, + &.range.disabled:hover { + background:@grayLighter; + .border-radius(0); + } + &.range.today, + &.range.today:hover, + &.range.today.disabled, + &.range.today.disabled:hover { + @todayBackground: mix(@orange, @grayLighter, 50%); + .buttonBackground(@todayBackground, spin(@todayBackground, 20)); + .border-radius(0); + } + &.selected, + &.selected:hover, + &.selected.disabled, + &.selected.disabled:hover { + .buttonBackground(lighten(@grayLight, 10), darken(@grayLight, 10)); + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + } + &.active, + &.active:hover, + &.active.disabled, + &.active.disabled:hover { + .buttonBackground(@btnPrimaryBackground, spin(@btnPrimaryBackground, 20)); + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + } + span { + display: block; + width: 23%; + height: 54px; + line-height: 54px; + float: left; + margin: 1%; + cursor: pointer; + .border-radius(4px); + &:hover { + background: @grayLighter; + } + &.disabled, + &.disabled:hover { + background:none; + color: @grayLight; + cursor: default; + } + &.active, + &.active:hover, + &.active.disabled, + &.active.disabled:hover { + .buttonBackground(@btnPrimaryBackground, spin(@btnPrimaryBackground, 20)); + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + } + &.old, + &.new { + color: @grayLight; + } + } + } + + th.datepicker-switch { + width: 145px; + } + + thead tr:first-child th, + tfoot tr th { + cursor: pointer; + &:hover{ + background: @grayLighter; + } + } + /*.dow { + border-top: 1px solid #ddd !important; + }*/ + + // Basic styling for calendar-week cells + .cw { + font-size: 10px; + width: 12px; + padding: 0 2px 0 5px; + vertical-align: middle; + } + thead tr:first-child th.cw { + cursor: default; + background-color: transparent; + } +} +.input-append, +.input-prepend { + &.date { + .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; + } + } +} +.input-daterange { + input { + text-align:center; + } + input:first-child { + .border-radius(3px 0 0 3px); + } + input:last-child { + .border-radius(0 3px 3px 0); + } + .add-on { + display: inline-block; + width: auto; + min-width: 16px; + height: @baseLineHeight; + padding: 4px 5px; + font-weight: normal; + line-height: @baseLineHeight; + text-align: center; + text-shadow: 0 1px 0 @white; + vertical-align: middle; + background-color: @grayLighter; + border: 1px solid #ccc; + margin-left:-5px; + margin-right:-5px; + } +} diff --git a/template/datepicker/tests/README.md b/template/datepicker/tests/README.md new file mode 100644 index 0000000..6f48f2b --- /dev/null +++ b/template/datepicker/tests/README.md @@ -0,0 +1,55 @@ +Unit tests, written with [QUnit](http://docs.jquery.com/QUnit), are used to +expose bugs for squashing, prevent bugs from respawning, and suppress new +bugs when adding new features and making changes. + +# Running the tests + +The simplest way to run the tests is to open `tests/tests.html` in your browser. +The test suites will automatically run themselves and present their results. + +To run the tests from the command line, download and install +[PhantomJS](http://phantomjs.org/), and run `run-qunit.js` with it: + + $ cd tests/ + $ phantomjs run-qunit.js tests.html + +Failed tests and their failed assertions will be printed to the console. A +results summary will be printed at the end. + +To generate coverage statistics, use [JSCoverage](http://siliconforks.com/jscoverage/) +to instrument the js files: + + $ cd tests/ + $ jscoverage ../js/ ../instrumented/ + $ phantomjs run-qunit.js tests.html + +Coverage percentage will be included in the output summary, and a highlighted +line-by-line html file will be generated. + +# Shout-out + +Thanks to Rod @ While One Fork for the +[CIS guide](http://whileonefork.blogspot.com/2011/10/integrating-javascript-tests-into-cli.html) +on putting the above together. + +# Adding tests + +Tests go in js files in the `tests/suites/` directory tree. QUnit organizes +tests into suites called "modules"; there is one module per js file. If the +tests you are adding do not fit into an existing module, create a new one at +`tests/suites/.js`, where `` is a broad yet +descriptive name for the suite. If tests have many year-specific cases (ie, +behave differently in leap years vs normal years, or have specific buggy +behavior in a certain year), create the module in a new directory, +`tests/suites//.js`, where `` is the decriptive +name and `` is the four-digit year the tests pertain to. + +In order for new tests to be run, they must be imported into `tests/tests.html`. +Find the script includes headed by the html comment ``, and +add a new one to the list which includes the new js files. + +# Can I use this? + +By all means, please do! Just note that I stopped working on this structure +once it fit my needs, there's no real support for it, and it may change in the +future. Otherwise, have at it. diff --git a/template/datepicker/tests/_coverage.html b/template/datepicker/tests/_coverage.html new file mode 100644 index 0000000..33d838d --- /dev/null +++ b/template/datepicker/tests/_coverage.html @@ -0,0 +1,26 @@ + + + + + + + +COLORIZED_LINE_HTML + + + + diff --git a/template/datepicker/tests/assets/coverage.js b/template/datepicker/tests/assets/coverage.js new file mode 100644 index 0000000..2e5704b --- /dev/null +++ b/template/datepicker/tests/assets/coverage.js @@ -0,0 +1,48 @@ +(function(){ + //we want this at global scope so outside callers can find it. In a more realistic implementation we + //should probably put it in a namespace. + window.getCoverageByLine = function(silent) { + var key = null; + var lines = null; + var source = null; + //look for code coverage data + if (typeof window._$jscoverage === 'object') { + for (key in _$jscoverage) {} + lines = _$jscoverage[key]; + } + + if (!lines && !silent) { + console.log('code coverage data is NOT available'); + } + + return { 'key': key, 'lines': lines }; + }; + + QUnit.done = function(t) { + var cvgInfo = getCoverageByLine(true); + if (!!cvgInfo.key) { + var testableLines = 0; + var testedLines = 0; + var untestableLines = 0; + for (lineIdx in cvgInfo.lines) { + var cvg = cvgInfo.lines[lineIdx]; + if (typeof cvg === 'number') { + testableLines += 1; + if (cvg > 0) { + testedLines += 1; + } + } else { + untestableLines += 1; + } + } + var coverage = '' + Math.floor(100 * testedLines / testableLines) + '%'; + + var result = document.getElementById('qunit-testresult'); + if (result != null) { + result.innerHTML = result.innerHTML + ' ' + coverage + ' test coverage of ' + cvgInfo.key; + } else { + console.log('can\'t find test-result element to update'); + } + } + }; +}()); \ No newline at end of file diff --git a/template/datepicker/tests/assets/jquery-1.7.1.min.js b/template/datepicker/tests/assets/jquery-1.7.1.min.js new file mode 100644 index 0000000..198b3ff --- /dev/null +++ b/template/datepicker/tests/assets/jquery-1.7.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/template/datepicker/tests/assets/mock.js b/template/datepicker/tests/assets/mock.js new file mode 100644 index 0000000..b1d1340 --- /dev/null +++ b/template/datepicker/tests/assets/mock.js @@ -0,0 +1,26 @@ +;(function(){ + +window.patch_date = function patch(f){ + var NativeDate = window.Date; + var date = function date(y,m,d,h,i,s,j){ + switch(arguments.length){ + case 0: return date.now ? new NativeDate(date.now) : new NativeDate(); + case 1: return new NativeDate(y); + case 2: return new NativeDate(y,m); + case 3: return new NativeDate(y,m,d); + case 4: return new NativeDate(y,m,d,h); + case 5: return new NativeDate(y,m,d,h,i); + case 6: return new NativeDate(y,m,d,h,i,s); + case 7: return new NativeDate(y,y,m,d,h,i,s,j); + } + }; + date.UTC = NativeDate.UTC; + return function(){ + Array.prototype.push.call(arguments, date); + window.Date = date; + res = f.apply(this, arguments); + window.Date = NativeDate; + } +} + +}()); \ No newline at end of file diff --git a/template/datepicker/tests/assets/qunit-logging.js b/template/datepicker/tests/assets/qunit-logging.js new file mode 100644 index 0000000..5bef1a5 --- /dev/null +++ b/template/datepicker/tests/assets/qunit-logging.js @@ -0,0 +1,29 @@ +// Dummy logging calls (ie, if tests are run in IE) +window.console = window.console || {}; +window.console.log = window.console.log || function(){}; +window.console.debug = window.console.debug || function(){}; +window.console.info = window.console.info || function(){}; +window.console.warn = window.console.warn || function(){}; +window.console.error = window.console.error || function(){}; + +(function() { + var modName, testName; + + //arg: { name } + QUnit.testStart = function(t) { + modName = t.module; + testName = t.name; + }; + + //arg: { name, failed, passed, total } + QUnit.testDone = function(t) { + if (t.failed) + console.log('Test "' + t.module + ': ' + t.name + '" completed: ' + (0 === t.failed ? 'pass' : 'FAIL') + '\n') + }; + + //{ result, actual, expected, message } + QUnit.log = function(t) { + if (!t.result) + console.log('Test "' + modName + ': ' + testName + '" assertion failed. Expected <' + t.expected + '> Actual <' + t.actual + '>' + (t.message ? ': \'' + t.message + '\'' : '')); + }; +}()); diff --git a/template/datepicker/tests/assets/qunit.css b/template/datepicker/tests/assets/qunit.css new file mode 100644 index 0000000..b948bae --- /dev/null +++ b/template/datepicker/tests/assets/qunit.css @@ -0,0 +1,235 @@ +/** + * QUnit v1.5.0 - A JavaScript Unit Testing Framework + * + * http://docs.jquery.com/QUnit + * + * Copyright (c) 2012 John Resig, Jörn Zaefferer + * Dual licensed under the MIT (MIT-LICENSE.txt) + * or GPL (GPL-LICENSE.txt) licenses. + */ + +/** Font Family and Sizes */ + +#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { + font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; +} + +#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } +#qunit-tests { font-size: smaller; } + + +/** Resets */ + +#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { + margin: 0; + padding: 0; +} + + +/** Header */ + +#qunit-header { + padding: 0.5em 0 0.5em 1em; + + color: #8699a4; + background-color: #0d3349; + + font-size: 1.5em; + line-height: 1em; + font-weight: normal; + + border-radius: 15px 15px 0 0; + -moz-border-radius: 15px 15px 0 0; + -webkit-border-top-right-radius: 15px; + -webkit-border-top-left-radius: 15px; +} + +#qunit-header a { + text-decoration: none; + color: #c2ccd1; +} + +#qunit-header a:hover, +#qunit-header a:focus { + color: #fff; +} + +#qunit-header label { + display: inline-block; +} + +#qunit-banner { + height: 5px; +} + +#qunit-testrunner-toolbar { + padding: 0.5em 0 0.5em 2em; + color: #5E740B; + background-color: #eee; +} + +#qunit-userAgent { + padding: 0.5em 0 0.5em 2.5em; + background-color: #2b81af; + color: #fff; + text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; +} + + +/** Tests: Pass/Fail */ + +#qunit-tests { + list-style-position: inside; +} + +#qunit-tests li { + padding: 0.4em 0.5em 0.4em 2.5em; + border-bottom: 1px solid #fff; + list-style-position: inside; +} + +#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { + display: none; +} + +#qunit-tests li strong { + cursor: pointer; +} + +#qunit-tests li a { + padding: 0.5em; + color: #c2ccd1; + text-decoration: none; +} +#qunit-tests li a:hover, +#qunit-tests li a:focus { + color: #000; +} + +#qunit-tests ol { + margin-top: 0.5em; + padding: 0.5em; + + background-color: #fff; + + border-radius: 15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + + box-shadow: inset 0px 2px 13px #999; + -moz-box-shadow: inset 0px 2px 13px #999; + -webkit-box-shadow: inset 0px 2px 13px #999; +} + +#qunit-tests table { + border-collapse: collapse; + margin-top: .2em; +} + +#qunit-tests th { + text-align: right; + vertical-align: top; + padding: 0 .5em 0 0; +} + +#qunit-tests td { + vertical-align: top; +} + +#qunit-tests pre { + margin: 0; + white-space: pre-wrap; + word-wrap: break-word; +} + +#qunit-tests del { + background-color: #e0f2be; + color: #374e0c; + text-decoration: none; +} + +#qunit-tests ins { + background-color: #ffcaca; + color: #500; + text-decoration: none; +} + +/*** Test Counts */ + +#qunit-tests b.counts { color: black; } +#qunit-tests b.passed { color: #5E740B; } +#qunit-tests b.failed { color: #710909; } + +#qunit-tests li li { + margin: 0.5em; + padding: 0.4em 0.5em 0.4em 0.5em; + background-color: #fff; + border-bottom: none; + list-style-position: inside; +} + +/*** Passing Styles */ + +#qunit-tests li li.pass { + color: #5E740B; + background-color: #fff; + border-left: 26px solid #C6E746; +} + +#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } +#qunit-tests .pass .test-name { color: #366097; } + +#qunit-tests .pass .test-actual, +#qunit-tests .pass .test-expected { color: #999999; } + +#qunit-banner.qunit-pass { background-color: #C6E746; } + +/*** Failing Styles */ + +#qunit-tests li li.fail { + color: #710909; + background-color: #fff; + border-left: 26px solid #EE5757; + white-space: pre; +} + +#qunit-tests > li:last-child { + border-radius: 0 0 15px 15px; + -moz-border-radius: 0 0 15px 15px; + -webkit-border-bottom-right-radius: 15px; + -webkit-border-bottom-left-radius: 15px; +} + +#qunit-tests .fail { color: #000000; background-color: #EE5757; } +#qunit-tests .fail .test-name, +#qunit-tests .fail .module-name { color: #000000; } + +#qunit-tests .fail .test-actual { color: #EE5757; } +#qunit-tests .fail .test-expected { color: green; } + +#qunit-banner.qunit-fail { background-color: #EE5757; } + + +/** Result */ + +#qunit-testresult { + padding: 0.5em 0.5em 0.5em 2.5em; + + color: #2b81af; + background-color: #D2E0E6; + + border-bottom: 1px solid white; +} +#qunit-testresult .module-name { + font-weight: bold; +} + +/** Fixture */ + +#qunit-fixture { + position: absolute; + top: -10000px; + left: -10000px; + width: 1000px; + height: 1000px; +} diff --git a/template/datepicker/tests/assets/qunit.js b/template/datepicker/tests/assets/qunit.js new file mode 100644 index 0000000..66dd721 --- /dev/null +++ b/template/datepicker/tests/assets/qunit.js @@ -0,0 +1,1669 @@ +/** + * QUnit v1.5.0 - A JavaScript Unit Testing Framework + * + * http://docs.jquery.com/QUnit + * + * Copyright (c) 2012 John Resig, Jörn Zaefferer + * Dual licensed under the MIT (MIT-LICENSE.txt) + * or GPL (GPL-LICENSE.txt) licenses. + */ + +(function(window) { + +var defined = { + setTimeout: typeof window.setTimeout !== "undefined", + sessionStorage: (function() { + var x = "qunit-test-string"; + try { + sessionStorage.setItem(x, x); + sessionStorage.removeItem(x); + return true; + } catch(e) { + return false; + } + }()) +}; + +var testId = 0, + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty; + +var Test = function(name, testName, expected, async, callback) { + this.name = name; + this.testName = testName; + this.expected = expected; + this.async = async; + this.callback = callback; + this.assertions = []; +}; +Test.prototype = { + init: function() { + var tests = id("qunit-tests"); + if (tests) { + var b = document.createElement("strong"); + b.innerHTML = "Running " + this.name; + var li = document.createElement("li"); + li.appendChild( b ); + li.className = "running"; + li.id = this.id = "test-output" + testId++; + tests.appendChild( li ); + } + }, + setup: function() { + if (this.module != config.previousModule) { + if ( config.previousModule ) { + runLoggingCallbacks('moduleDone', QUnit, { + name: config.previousModule, + failed: config.moduleStats.bad, + passed: config.moduleStats.all - config.moduleStats.bad, + total: config.moduleStats.all + } ); + } + config.previousModule = this.module; + config.moduleStats = { all: 0, bad: 0 }; + runLoggingCallbacks( 'moduleStart', QUnit, { + name: this.module + } ); + } else if (config.autorun) { + runLoggingCallbacks( 'moduleStart', QUnit, { + name: this.module + } ); + } + + config.current = this; + this.testEnvironment = extend({ + setup: function() {}, + teardown: function() {} + }, this.moduleTestEnvironment); + + runLoggingCallbacks( 'testStart', QUnit, { + name: this.testName, + module: this.module + }); + + // allow utility functions to access the current test environment + // TODO why?? + QUnit.current_testEnvironment = this.testEnvironment; + + if ( !config.pollution ) { + saveGlobal(); + } + if ( config.notrycatch ) { + this.testEnvironment.setup.call(this.testEnvironment); + return; + } + try { + this.testEnvironment.setup.call(this.testEnvironment); + } catch(e) { + QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); + } + }, + run: function() { + config.current = this; + + var running = id("qunit-testresult"); + + if ( running ) { + running.innerHTML = "Running:
" + this.name; + } + + if ( this.async ) { + QUnit.stop(); + } + + if ( config.notrycatch ) { + this.callback.call(this.testEnvironment); + return; + } + try { + this.callback.call(this.testEnvironment); + } catch(e) { + QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + ": " + e.message, extractStacktrace( e, 1 ) ); + // else next test will carry the responsibility + saveGlobal(); + + // Restart the tests if they're blocking + if ( config.blocking ) { + QUnit.start(); + } + } + }, + teardown: function() { + config.current = this; + if ( config.notrycatch ) { + this.testEnvironment.teardown.call(this.testEnvironment); + return; + } else { + try { + this.testEnvironment.teardown.call(this.testEnvironment); + } catch(e) { + QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) ); + } + } + checkPollution(); + }, + finish: function() { + config.current = this; + if ( this.expected != null && this.expected != this.assertions.length ) { + QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" ); + } else if ( this.expected == null && !this.assertions.length ) { + QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions." ); + } + + var good = 0, bad = 0, + li, i, + tests = id("qunit-tests"); + + config.stats.all += this.assertions.length; + config.moduleStats.all += this.assertions.length; + + if ( tests ) { + var ol = document.createElement("ol"); + + for ( i = 0; i < this.assertions.length; i++ ) { + var assertion = this.assertions[i]; + + li = document.createElement("li"); + li.className = assertion.result ? "pass" : "fail"; + li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed"); + ol.appendChild( li ); + + if ( assertion.result ) { + good++; + } else { + bad++; + config.stats.bad++; + config.moduleStats.bad++; + } + } + + // store result when possible + if ( QUnit.config.reorder && defined.sessionStorage ) { + if (bad) { + sessionStorage.setItem("qunit-test-" + this.module + "-" + this.testName, bad); + } else { + sessionStorage.removeItem("qunit-test-" + this.module + "-" + this.testName); + } + } + + if (bad === 0) { + ol.style.display = "none"; + } + + var b = document.createElement("strong"); + b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; + + var a = document.createElement("a"); + a.innerHTML = "Rerun"; + a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); + + addEvent(b, "click", function() { + var next = b.nextSibling.nextSibling, + display = next.style.display; + next.style.display = display === "none" ? "block" : "none"; + }); + + addEvent(b, "dblclick", function(e) { + var target = e && e.target ? e.target : window.event.srcElement; + if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) { + target = target.parentNode; + } + if ( window.location && target.nodeName.toLowerCase() === "strong" ) { + window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); + } + }); + + li = id(this.id); + li.className = bad ? "fail" : "pass"; + li.removeChild( li.firstChild ); + li.appendChild( b ); + li.appendChild( a ); + li.appendChild( ol ); + + } else { + for ( i = 0; i < this.assertions.length; i++ ) { + if ( !this.assertions[i].result ) { + bad++; + config.stats.bad++; + config.moduleStats.bad++; + } + } + } + + QUnit.reset(); + + runLoggingCallbacks( 'testDone', QUnit, { + name: this.testName, + module: this.module, + failed: bad, + passed: this.assertions.length - bad, + total: this.assertions.length + } ); + }, + + queue: function() { + var test = this; + synchronize(function() { + test.init(); + }); + function run() { + // each of these can by async + synchronize(function() { + test.setup(); + }); + synchronize(function() { + test.run(); + }); + synchronize(function() { + test.teardown(); + }); + synchronize(function() { + test.finish(); + }); + } + // defer when previous test run passed, if storage is available + var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-test-" + this.module + "-" + this.testName); + if (bad) { + run(); + } else { + synchronize(run, true); + } + } + +}; + +var QUnit = { + + // call on start of module test to prepend name to all tests + module: function(name, testEnvironment) { + config.currentModule = name; + config.currentModuleTestEnviroment = testEnvironment; + }, + + asyncTest: function(testName, expected, callback) { + if ( arguments.length === 2 ) { + callback = expected; + expected = null; + } + + QUnit.test(testName, expected, callback, true); + }, + + test: function(testName, expected, callback, async) { + var name = '' + escapeInnerText(testName) + ''; + + if ( arguments.length === 2 ) { + callback = expected; + expected = null; + } + + if ( config.currentModule ) { + name = '' + config.currentModule + ": " + name; + } + + if ( !validTest(config.currentModule + ": " + testName) ) { + return; + } + + var test = new Test(name, testName, expected, async, callback); + test.module = config.currentModule; + test.moduleTestEnvironment = config.currentModuleTestEnviroment; + test.queue(); + }, + + // Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. + expect: function(asserts) { + config.current.expected = asserts; + }, + + // Asserts true. + // @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); + ok: function(result, msg) { + if (!config.current) { + throw new Error("ok() assertion outside test context, was " + sourceFromStacktrace(2)); + } + result = !!result; + var details = { + result: result, + message: msg + }; + msg = escapeInnerText(msg || (result ? "okay" : "failed")); + if ( !result ) { + var source = sourceFromStacktrace(2); + if (source) { + details.source = source; + msg += '
Source:
' + escapeInnerText(source) + '
'; + } + } + runLoggingCallbacks( 'log', QUnit, details ); + config.current.assertions.push({ + result: result, + message: msg + }); + }, + + // Checks that the first two arguments are equal, with an optional message. Prints out both actual and expected values. + // @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); + equal: function(actual, expected, message) { + QUnit.push(expected == actual, actual, expected, message); + }, + + notEqual: function(actual, expected, message) { + QUnit.push(expected != actual, actual, expected, message); + }, + + deepEqual: function(actual, expected, message) { + QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); + }, + + notDeepEqual: function(actual, expected, message) { + QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message); + }, + + strictEqual: function(actual, expected, message) { + QUnit.push(expected === actual, actual, expected, message); + }, + + notStrictEqual: function(actual, expected, message) { + QUnit.push(expected !== actual, actual, expected, message); + }, + + raises: function(block, expected, message) { + var actual, ok = false; + + if (typeof expected === 'string') { + message = expected; + expected = null; + } + + try { + block.call(config.current.testEnvironment); + } catch (e) { + actual = e; + } + + if (actual) { + // we don't want to validate thrown error + if (!expected) { + ok = true; + // expected is a regexp + } else if (QUnit.objectType(expected) === "regexp") { + ok = expected.test(actual); + // expected is a constructor + } else if (actual instanceof expected) { + ok = true; + // expected is a validation function which returns true is validation passed + } else if (expected.call({}, actual) === true) { + ok = true; + } + } + + QUnit.ok(ok, message); + }, + + start: function(count) { + config.semaphore -= count || 1; + if (config.semaphore > 0) { + // don't start until equal number of stop-calls + return; + } + if (config.semaphore < 0) { + // ignore if start is called more often then stop + config.semaphore = 0; + } + // A slight delay, to avoid any current callbacks + if ( defined.setTimeout ) { + window.setTimeout(function() { + if (config.semaphore > 0) { + return; + } + if ( config.timeout ) { + clearTimeout(config.timeout); + } + + config.blocking = false; + process(true); + }, 13); + } else { + config.blocking = false; + process(true); + } + }, + + stop: function(count) { + config.semaphore += count || 1; + config.blocking = true; + + if ( config.testTimeout && defined.setTimeout ) { + clearTimeout(config.timeout); + config.timeout = window.setTimeout(function() { + QUnit.ok( false, "Test timed out" ); + config.semaphore = 1; + QUnit.start(); + }, config.testTimeout); + } + } +}; + +//We want access to the constructor's prototype +(function() { + function F(){} + F.prototype = QUnit; + QUnit = new F(); + //Make F QUnit's constructor so that we can add to the prototype later + QUnit.constructor = F; +}()); + +// deprecated; still export them to window to provide clear error messages +// next step: remove entirely +QUnit.equals = function() { + QUnit.push(false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead"); +}; +QUnit.same = function() { + QUnit.push(false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead"); +}; + +// Maintain internal state +var config = { + // The queue of tests to run + queue: [], + + // block until document ready + blocking: true, + + // when enabled, show only failing tests + // gets persisted through sessionStorage and can be changed in UI via checkbox + hidepassed: false, + + // by default, run previously failed tests first + // very useful in combination with "Hide passed tests" checked + reorder: true, + + // by default, modify document.title when suite is done + altertitle: true, + + urlConfig: ['noglobals', 'notrycatch'], + + //logging callback queues + begin: [], + done: [], + log: [], + testStart: [], + testDone: [], + moduleStart: [], + moduleDone: [] +}; + +// Load paramaters +(function() { + var location = window.location || { search: "", protocol: "file:" }, + params = location.search.slice( 1 ).split( "&" ), + length = params.length, + urlParams = {}, + current; + + if ( params[ 0 ] ) { + for ( var i = 0; i < length; i++ ) { + current = params[ i ].split( "=" ); + current[ 0 ] = decodeURIComponent( current[ 0 ] ); + // allow just a key to turn on a flag, e.g., test.html?noglobals + current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true; + urlParams[ current[ 0 ] ] = current[ 1 ]; + } + } + + QUnit.urlParams = urlParams; + config.filter = urlParams.filter; + + // Figure out if we're running the tests from a server or not + QUnit.isLocal = location.protocol === 'file:'; +}()); + +// Expose the API as global variables, unless an 'exports' +// object exists, in that case we assume we're in CommonJS - export everything at the end +if ( typeof exports === "undefined" || typeof require === "undefined" ) { + extend(window, QUnit); + window.QUnit = QUnit; +} + +// define these after exposing globals to keep them in these QUnit namespace only +extend(QUnit, { + config: config, + + // Initialize the configuration options + init: function() { + extend(config, { + stats: { all: 0, bad: 0 }, + moduleStats: { all: 0, bad: 0 }, + started: +new Date(), + updateRate: 1000, + blocking: false, + autostart: true, + autorun: false, + filter: "", + queue: [], + semaphore: 0 + }); + + var qunit = id( "qunit" ); + if ( qunit ) { + qunit.innerHTML = + '

' + escapeInnerText( document.title ) + '

' + + '

' + + '
' + + '

' + + '
    '; + } + + var tests = id( "qunit-tests" ), + banner = id( "qunit-banner" ), + result = id( "qunit-testresult" ); + + if ( tests ) { + tests.innerHTML = ""; + } + + if ( banner ) { + banner.className = ""; + } + + if ( result ) { + result.parentNode.removeChild( result ); + } + + if ( tests ) { + result = document.createElement( "p" ); + result.id = "qunit-testresult"; + result.className = "result"; + tests.parentNode.insertBefore( result, tests ); + result.innerHTML = 'Running...
     '; + } + }, + + // Resets the test setup. Useful for tests that modify the DOM. + // If jQuery is available, uses jQuery's html(), otherwise just innerHTML. + reset: function() { + if ( window.jQuery ) { + jQuery( "#qunit-fixture" ).html( config.fixture ); + } else { + var main = id( 'qunit-fixture' ); + if ( main ) { + main.innerHTML = config.fixture; + } + } + }, + + // Trigger an event on an element. + // @example triggerEvent( document.body, "click" ); + triggerEvent: function( elem, type, event ) { + if ( document.createEvent ) { + event = document.createEvent("MouseEvents"); + event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, + 0, 0, 0, 0, 0, false, false, false, false, 0, null); + elem.dispatchEvent( event ); + + } else if ( elem.fireEvent ) { + elem.fireEvent("on"+type); + } + }, + + // Safe object type checking + is: function( type, obj ) { + return QUnit.objectType( obj ) == type; + }, + + objectType: function( obj ) { + if (typeof obj === "undefined") { + return "undefined"; + + // consider: typeof null === object + } + if (obj === null) { + return "null"; + } + + var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || ''; + + switch (type) { + case 'Number': + if (isNaN(obj)) { + return "nan"; + } + return "number"; + case 'String': + case 'Boolean': + case 'Array': + case 'Date': + case 'RegExp': + case 'Function': + return type.toLowerCase(); + } + if (typeof obj === "object") { + return "object"; + } + return undefined; + }, + + push: function(result, actual, expected, message) { + if (!config.current) { + throw new Error("assertion outside test context, was " + sourceFromStacktrace()); + } + var details = { + result: result, + message: message, + actual: actual, + expected: expected + }; + + message = escapeInnerText(message) || (result ? "okay" : "failed"); + message = '' + message + ""; + var output = message; + if (!result) { + expected = escapeInnerText(QUnit.jsDump.parse(expected)); + actual = escapeInnerText(QUnit.jsDump.parse(actual)); + output += ''; + if (actual != expected) { + output += ''; + output += ''; + } + var source = sourceFromStacktrace(); + if (source) { + details.source = source; + output += ''; + } + output += "
    Expected:
    ' + expected + '
    Result:
    ' + actual + '
    Diff:
    ' + QUnit.diff(expected, actual) +'
    Source:
    ' + escapeInnerText(source) + '
    "; + } + + runLoggingCallbacks( 'log', QUnit, details ); + + config.current.assertions.push({ + result: !!result, + message: output + }); + }, + + pushFailure: function(message, source) { + var details = { + result: false, + message: message + }; + var output = escapeInnerText(message); + if (source) { + details.source = source; + output += '
    Source:
    ' + escapeInnerText(source) + '
    '; + } + runLoggingCallbacks( 'log', QUnit, details ); + config.current.assertions.push({ + result: false, + message: output + }); + }, + + url: function( params ) { + params = extend( extend( {}, QUnit.urlParams ), params ); + var querystring = "?", + key; + for ( key in params ) { + if ( !hasOwn.call( params, key ) ) { + continue; + } + querystring += encodeURIComponent( key ) + "=" + + encodeURIComponent( params[ key ] ) + "&"; + } + return window.location.pathname + querystring.slice( 0, -1 ); + }, + + extend: extend, + id: id, + addEvent: addEvent +}); + +//QUnit.constructor is set to the empty F() above so that we can add to it's prototype later +//Doing this allows us to tell if the following methods have been overwritten on the actual +//QUnit object, which is a deprecated way of using the callbacks. +extend(QUnit.constructor.prototype, { + // Logging callbacks; all receive a single argument with the listed properties + // run test/logs.html for any related changes + begin: registerLoggingCallback('begin'), + // done: { failed, passed, total, runtime } + done: registerLoggingCallback('done'), + // log: { result, actual, expected, message } + log: registerLoggingCallback('log'), + // testStart: { name } + testStart: registerLoggingCallback('testStart'), + // testDone: { name, failed, passed, total } + testDone: registerLoggingCallback('testDone'), + // moduleStart: { name } + moduleStart: registerLoggingCallback('moduleStart'), + // moduleDone: { name, failed, passed, total } + moduleDone: registerLoggingCallback('moduleDone') +}); + +if ( typeof document === "undefined" || document.readyState === "complete" ) { + config.autorun = true; +} + +QUnit.load = function() { + runLoggingCallbacks( 'begin', QUnit, {} ); + + // Initialize the config, saving the execution queue + var oldconfig = extend({}, config); + QUnit.init(); + extend(config, oldconfig); + + config.blocking = false; + + var urlConfigHtml = '', len = config.urlConfig.length; + for ( var i = 0, val; i < len; i++ ) { + val = config.urlConfig[i]; + config[val] = QUnit.urlParams[val]; + urlConfigHtml += ''; + } + + var userAgent = id("qunit-userAgent"); + if ( userAgent ) { + userAgent.innerHTML = navigator.userAgent; + } + var banner = id("qunit-header"); + if ( banner ) { + banner.innerHTML = ' ' + banner.innerHTML + ' ' + urlConfigHtml; + addEvent( banner, "change", function( event ) { + var params = {}; + params[ event.target.name ] = event.target.checked ? true : undefined; + window.location = QUnit.url( params ); + }); + } + + var toolbar = id("qunit-testrunner-toolbar"); + if ( toolbar ) { + var filter = document.createElement("input"); + filter.type = "checkbox"; + filter.id = "qunit-filter-pass"; + addEvent( filter, "click", function() { + var ol = document.getElementById("qunit-tests"); + if ( filter.checked ) { + ol.className = ol.className + " hidepass"; + } else { + var tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " "; + ol.className = tmp.replace(/ hidepass /, " "); + } + if ( defined.sessionStorage ) { + if (filter.checked) { + sessionStorage.setItem("qunit-filter-passed-tests", "true"); + } else { + sessionStorage.removeItem("qunit-filter-passed-tests"); + } + } + }); + if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) { + filter.checked = true; + var ol = document.getElementById("qunit-tests"); + ol.className = ol.className + " hidepass"; + } + toolbar.appendChild( filter ); + + var label = document.createElement("label"); + label.setAttribute("for", "qunit-filter-pass"); + label.innerHTML = "Hide passed tests"; + toolbar.appendChild( label ); + } + + var main = id('qunit-fixture'); + if ( main ) { + config.fixture = main.innerHTML; + } + + if (config.autostart) { + QUnit.start(); + } +}; + +addEvent(window, "load", QUnit.load); + +// addEvent(window, "error") gives us a useless event object +window.onerror = function( message, file, line ) { + if ( QUnit.config.current ) { + QUnit.pushFailure( message, file + ":" + line ); + } else { + QUnit.test( "global failure", function() { + QUnit.pushFailure( message, file + ":" + line ); + }); + } +}; + +function done() { + config.autorun = true; + + // Log the last module results + if ( config.currentModule ) { + runLoggingCallbacks( 'moduleDone', QUnit, { + name: config.currentModule, + failed: config.moduleStats.bad, + passed: config.moduleStats.all - config.moduleStats.bad, + total: config.moduleStats.all + } ); + } + + var banner = id("qunit-banner"), + tests = id("qunit-tests"), + runtime = +new Date() - config.started, + passed = config.stats.all - config.stats.bad, + html = [ + 'Tests completed in ', + runtime, + ' milliseconds.
    ', + '', + passed, + ' tests of ', + config.stats.all, + ' passed, ', + config.stats.bad, + ' failed.' + ].join(''); + + if ( banner ) { + banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); + } + + if ( tests ) { + id( "qunit-testresult" ).innerHTML = html; + } + + if ( config.altertitle && typeof document !== "undefined" && document.title ) { + // show ✖ for good, ✔ for bad suite result in title + // use escape sequences in case file gets loaded with non-utf-8-charset + document.title = [ + (config.stats.bad ? "\u2716" : "\u2714"), + document.title.replace(/^[\u2714\u2716] /i, "") + ].join(" "); + } + + // clear own sessionStorage items if all tests passed + if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) { + var key; + for ( var i = 0; i < sessionStorage.length; i++ ) { + key = sessionStorage.key( i++ ); + if ( key.indexOf("qunit-test-") === 0 ) { + sessionStorage.removeItem( key ); + } + } + } + + runLoggingCallbacks( 'done', QUnit, { + failed: config.stats.bad, + passed: passed, + total: config.stats.all, + runtime: runtime + } ); +} + +function validTest( name ) { + var filter = config.filter, + run = false; + + if ( !filter ) { + return true; + } + + var not = filter.charAt( 0 ) === "!"; + if ( not ) { + filter = filter.slice( 1 ); + } + + if ( name.indexOf( filter ) !== -1 ) { + return !not; + } + + if ( not ) { + run = true; + } + + return run; +} + +// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions) +// Later Safari and IE10 are supposed to support error.stack as well +// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack +function extractStacktrace( e, offset ) { + offset = offset || 3; + if (e.stacktrace) { + // Opera + return e.stacktrace.split("\n")[offset + 3]; + } else if (e.stack) { + // Firefox, Chrome + var stack = e.stack.split("\n"); + if (/^error$/i.test(stack[0])) { + stack.shift(); + } + return stack[offset]; + } else if (e.sourceURL) { + // Safari, PhantomJS + // hopefully one day Safari provides actual stacktraces + // exclude useless self-reference for generated Error objects + if ( /qunit.js$/.test( e.sourceURL ) ) { + return; + } + // for actual exceptions, this is useful + return e.sourceURL + ":" + e.line; + } +} +function sourceFromStacktrace(offset) { + try { + throw new Error(); + } catch ( e ) { + return extractStacktrace( e, offset ); + } +} + +function escapeInnerText(s) { + if (!s) { + return ""; + } + s = s + ""; + return s.replace(/[\&<>]/g, function(s) { + switch(s) { + case "&": return "&"; + case "<": return "<"; + case ">": return ">"; + default: return s; + } + }); +} + +function synchronize( callback, last ) { + config.queue.push( callback ); + + if ( config.autorun && !config.blocking ) { + process(last); + } +} + +function process( last ) { + function next() { + process( last ); + } + var start = new Date().getTime(); + config.depth = config.depth ? config.depth + 1 : 1; + + while ( config.queue.length && !config.blocking ) { + if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) { + config.queue.shift()(); + } else { + window.setTimeout( next, 13 ); + break; + } + } + config.depth--; + if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) { + done(); + } +} + +function saveGlobal() { + config.pollution = []; + + if ( config.noglobals ) { + for ( var key in window ) { + if ( !hasOwn.call( window, key ) ) { + continue; + } + config.pollution.push( key ); + } + } +} + +function checkPollution( name ) { + var old = config.pollution; + saveGlobal(); + + var newGlobals = diff( config.pollution, old ); + if ( newGlobals.length > 0 ) { + QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") ); + } + + var deletedGlobals = diff( old, config.pollution ); + if ( deletedGlobals.length > 0 ) { + QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") ); + } +} + +// returns a new Array with the elements that are in a but not in b +function diff( a, b ) { + var result = a.slice(); + for ( var i = 0; i < result.length; i++ ) { + for ( var j = 0; j < b.length; j++ ) { + if ( result[i] === b[j] ) { + result.splice(i, 1); + i--; + break; + } + } + } + return result; +} + +function extend(a, b) { + for ( var prop in b ) { + if ( b[prop] === undefined ) { + delete a[prop]; + + // Avoid "Member not found" error in IE8 caused by setting window.constructor + } else if ( prop !== "constructor" || a !== window ) { + a[prop] = b[prop]; + } + } + + return a; +} + +function addEvent(elem, type, fn) { + if ( elem.addEventListener ) { + elem.addEventListener( type, fn, false ); + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, fn ); + } else { + fn(); + } +} + +function id(name) { + return !!(typeof document !== "undefined" && document && document.getElementById) && + document.getElementById( name ); +} + +function registerLoggingCallback(key){ + return function(callback){ + config[key].push( callback ); + }; +} + +// Supports deprecated method of completely overwriting logging callbacks +function runLoggingCallbacks(key, scope, args) { + //debugger; + var callbacks; + if ( QUnit.hasOwnProperty(key) ) { + QUnit[key].call(scope, args); + } else { + callbacks = config[key]; + for( var i = 0; i < callbacks.length; i++ ) { + callbacks[i].call( scope, args ); + } + } +} + +// Test for equality any JavaScript type. +// Author: Philippe Rathé +QUnit.equiv = (function() { + + var innerEquiv; // the real equiv function + var callers = []; // stack to decide between skip/abort functions + var parents = []; // stack to avoiding loops from circular referencing + + // Call the o related callback with the given arguments. + function bindCallbacks(o, callbacks, args) { + var prop = QUnit.objectType(o); + if (prop) { + if (QUnit.objectType(callbacks[prop]) === "function") { + return callbacks[prop].apply(callbacks, args); + } else { + return callbacks[prop]; // or undefined + } + } + } + + var getProto = Object.getPrototypeOf || function (obj) { + return obj.__proto__; + }; + + var callbacks = (function () { + + // for string, boolean, number and null + function useStrictEquality(b, a) { + if (b instanceof a.constructor || a instanceof b.constructor) { + // to catch short annotaion VS 'new' annotation of a + // declaration + // e.g. var i = 1; + // var j = new Number(1); + return a == b; + } else { + return a === b; + } + } + + return { + "string" : useStrictEquality, + "boolean" : useStrictEquality, + "number" : useStrictEquality, + "null" : useStrictEquality, + "undefined" : useStrictEquality, + + "nan" : function(b) { + return isNaN(b); + }, + + "date" : function(b, a) { + return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); + }, + + "regexp" : function(b, a) { + return QUnit.objectType(b) === "regexp" && + // the regex itself + a.source === b.source && + // and its modifers + a.global === b.global && + // (gmi) ... + a.ignoreCase === b.ignoreCase && + a.multiline === b.multiline; + }, + + // - skip when the property is a method of an instance (OOP) + // - abort otherwise, + // initial === would have catch identical references anyway + "function" : function() { + var caller = callers[callers.length - 1]; + return caller !== Object && typeof caller !== "undefined"; + }, + + "array" : function(b, a) { + var i, j, loop; + var len; + + // b could be an object literal here + if (QUnit.objectType(b) !== "array") { + return false; + } + + len = a.length; + if (len !== b.length) { // safe and faster + return false; + } + + // track reference to avoid circular references + parents.push(a); + for (i = 0; i < len; i++) { + loop = false; + for (j = 0; j < parents.length; j++) { + if (parents[j] === a[i]) { + loop = true;// dont rewalk array + } + } + if (!loop && !innerEquiv(a[i], b[i])) { + parents.pop(); + return false; + } + } + parents.pop(); + return true; + }, + + "object" : function(b, a) { + var i, j, loop; + var eq = true; // unless we can proove it + var aProperties = [], bProperties = []; // collection of + // strings + + // comparing constructors is more strict than using + // instanceof + if (a.constructor !== b.constructor) { + // Allow objects with no prototype to be equivalent to + // objects with Object as their constructor. + if (!((getProto(a) === null && getProto(b) === Object.prototype) || + (getProto(b) === null && getProto(a) === Object.prototype))) + { + return false; + } + } + + // stack constructor before traversing properties + callers.push(a.constructor); + // track reference to avoid circular references + parents.push(a); + + for (i in a) { // be strict: don't ensures hasOwnProperty + // and go deep + loop = false; + for (j = 0; j < parents.length; j++) { + if (parents[j] === a[i]) { + // don't go down the same path twice + loop = true; + } + } + aProperties.push(i); // collect a's properties + + if (!loop && !innerEquiv(a[i], b[i])) { + eq = false; + break; + } + } + + callers.pop(); // unstack, we are done + parents.pop(); + + for (i in b) { + bProperties.push(i); // collect b's properties + } + + // Ensures identical properties name + return eq && innerEquiv(aProperties.sort(), bProperties.sort()); + } + }; + }()); + + innerEquiv = function() { // can take multiple arguments + var args = Array.prototype.slice.apply(arguments); + if (args.length < 2) { + return true; // end transition + } + + return (function(a, b) { + if (a === b) { + return true; // catch the most you can + } else if (a === null || b === null || typeof a === "undefined" || + typeof b === "undefined" || + QUnit.objectType(a) !== QUnit.objectType(b)) { + return false; // don't lose time with error prone cases + } else { + return bindCallbacks(a, callbacks, [ b, a ]); + } + + // apply transition with (1..n) arguments + }(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length - 1))); + }; + + return innerEquiv; + +}()); + +/** + * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | + * http://flesler.blogspot.com Licensed under BSD + * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008 + * + * @projectDescription Advanced and extensible data dumping for Javascript. + * @version 1.0.0 + * @author Ariel Flesler + * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} + */ +QUnit.jsDump = (function() { + function quote( str ) { + return '"' + str.toString().replace(/"/g, '\\"') + '"'; + } + function literal( o ) { + return o + ''; + } + function join( pre, arr, post ) { + var s = jsDump.separator(), + base = jsDump.indent(), + inner = jsDump.indent(1); + if ( arr.join ) { + arr = arr.join( ',' + s + inner ); + } + if ( !arr ) { + return pre + post; + } + return [ pre, inner + arr, base + post ].join(s); + } + function array( arr, stack ) { + var i = arr.length, ret = new Array(i); + this.up(); + while ( i-- ) { + ret[i] = this.parse( arr[i] , undefined , stack); + } + this.down(); + return join( '[', ret, ']' ); + } + + var reName = /^function (\w+)/; + + var jsDump = { + parse: function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance + stack = stack || [ ]; + var parser = this.parsers[ type || this.typeOf(obj) ]; + type = typeof parser; + var inStack = inArray(obj, stack); + if (inStack != -1) { + return 'recursion('+(inStack - stack.length)+')'; + } + //else + if (type == 'function') { + stack.push(obj); + var res = parser.call( this, obj, stack ); + stack.pop(); + return res; + } + // else + return (type == 'string') ? parser : this.parsers.error; + }, + typeOf: function( obj ) { + var type; + if ( obj === null ) { + type = "null"; + } else if (typeof obj === "undefined") { + type = "undefined"; + } else if (QUnit.is("RegExp", obj)) { + type = "regexp"; + } else if (QUnit.is("Date", obj)) { + type = "date"; + } else if (QUnit.is("Function", obj)) { + type = "function"; + } else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") { + type = "window"; + } else if (obj.nodeType === 9) { + type = "document"; + } else if (obj.nodeType) { + type = "node"; + } else if ( + // native arrays + toString.call( obj ) === "[object Array]" || + // NodeList objects + ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) ) + ) { + type = "array"; + } else { + type = typeof obj; + } + return type; + }, + separator: function() { + return this.multiline ? this.HTML ? '
    ' : '\n' : this.HTML ? ' ' : ' '; + }, + indent: function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing + if ( !this.multiline ) { + return ''; + } + var chr = this.indentChar; + if ( this.HTML ) { + chr = chr.replace(/\t/g,' ').replace(/ /g,' '); + } + return new Array( this._depth_ + (extra||0) ).join(chr); + }, + up: function( a ) { + this._depth_ += a || 1; + }, + down: function( a ) { + this._depth_ -= a || 1; + }, + setParser: function( name, parser ) { + this.parsers[name] = parser; + }, + // The next 3 are exposed so you can use them + quote: quote, + literal: literal, + join: join, + // + _depth_: 1, + // This is the list of parsers, to modify them, use jsDump.setParser + parsers: { + window: '[Window]', + document: '[Document]', + error: '[ERROR]', //when no parser is found, shouldn't happen + unknown: '[Unknown]', + 'null': 'null', + 'undefined': 'undefined', + 'function': function( fn ) { + var ret = 'function', + name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE + if ( name ) { + ret += ' ' + name; + } + ret += '('; + + ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join(''); + return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' ); + }, + array: array, + nodelist: array, + 'arguments': array, + object: function( map, stack ) { + var ret = [ ], keys, key, val, i; + QUnit.jsDump.up(); + if (Object.keys) { + keys = Object.keys( map ); + } else { + keys = []; + for (key in map) { keys.push( key ); } + } + keys.sort(); + for (i = 0; i < keys.length; i++) { + key = keys[ i ]; + val = map[ key ]; + ret.push( QUnit.jsDump.parse( key, 'key' ) + ': ' + QUnit.jsDump.parse( val, undefined, stack ) ); + } + QUnit.jsDump.down(); + return join( '{', ret, '}' ); + }, + node: function( node ) { + var open = QUnit.jsDump.HTML ? '<' : '<', + close = QUnit.jsDump.HTML ? '>' : '>'; + + var tag = node.nodeName.toLowerCase(), + ret = open + tag; + + for ( var a in QUnit.jsDump.DOMAttrs ) { + var val = node[QUnit.jsDump.DOMAttrs[a]]; + if ( val ) { + ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' ); + } + } + return ret + close + open + '/' + tag + close; + }, + functionArgs: function( fn ) {//function calls it internally, it's the arguments part of the function + var l = fn.length; + if ( !l ) { + return ''; + } + + var args = new Array(l); + while ( l-- ) { + args[l] = String.fromCharCode(97+l);//97 is 'a' + } + return ' ' + args.join(', ') + ' '; + }, + key: quote, //object calls it internally, the key part of an item in a map + functionCode: '[code]', //function calls it internally, it's the content of the function + attribute: quote, //node calls it internally, it's an html attribute value + string: quote, + date: quote, + regexp: literal, //regex + number: literal, + 'boolean': literal + }, + DOMAttrs:{//attributes to dump from nodes, name=>realName + id:'id', + name:'name', + 'class':'className' + }, + HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) + indentChar:' ',//indentation unit + multiline:true //if true, items in a collection, are separated by a \n, else just a space. + }; + + return jsDump; +}()); + +// from Sizzle.js +function getText( elems ) { + var ret = "", elem; + + for ( var i = 0; elems[i]; i++ ) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if ( elem.nodeType === 3 || elem.nodeType === 4 ) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if ( elem.nodeType !== 8 ) { + ret += getText( elem.childNodes ); + } + } + + return ret; +} + +//from jquery.js +function inArray( elem, array ) { + if ( array.indexOf ) { + return array.indexOf( elem ); + } + + for ( var i = 0, length = array.length; i < length; i++ ) { + if ( array[ i ] === elem ) { + return i; + } + } + + return -1; +} + +/* + * Javascript Diff Algorithm + * By John Resig (http://ejohn.org/) + * Modified by Chu Alan "sprite" + * + * Released under the MIT license. + * + * More Info: + * http://ejohn.org/projects/javascript-diff-algorithm/ + * + * Usage: QUnit.diff(expected, actual) + * + * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" + */ +QUnit.diff = (function() { + function diff(o, n) { + var ns = {}; + var os = {}; + var i; + + for (i = 0; i < n.length; i++) { + if (ns[n[i]] == null) { + ns[n[i]] = { + rows: [], + o: null + }; + } + ns[n[i]].rows.push(i); + } + + for (i = 0; i < o.length; i++) { + if (os[o[i]] == null) { + os[o[i]] = { + rows: [], + n: null + }; + } + os[o[i]].rows.push(i); + } + + for (i in ns) { + if ( !hasOwn.call( ns, i ) ) { + continue; + } + if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { + n[ns[i].rows[0]] = { + text: n[ns[i].rows[0]], + row: os[i].rows[0] + }; + o[os[i].rows[0]] = { + text: o[os[i].rows[0]], + row: ns[i].rows[0] + }; + } + } + + for (i = 0; i < n.length - 1; i++) { + if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && + n[i + 1] == o[n[i].row + 1]) { + n[i + 1] = { + text: n[i + 1], + row: n[i].row + 1 + }; + o[n[i].row + 1] = { + text: o[n[i].row + 1], + row: i + 1 + }; + } + } + + for (i = n.length - 1; i > 0; i--) { + if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && + n[i - 1] == o[n[i].row - 1]) { + n[i - 1] = { + text: n[i - 1], + row: n[i].row - 1 + }; + o[n[i].row - 1] = { + text: o[n[i].row - 1], + row: i - 1 + }; + } + } + + return { + o: o, + n: n + }; + } + + return function(o, n) { + o = o.replace(/\s+$/, ''); + n = n.replace(/\s+$/, ''); + var out = diff(o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/)); + + var str = ""; + var i; + + var oSpace = o.match(/\s+/g); + if (oSpace == null) { + oSpace = [" "]; + } + else { + oSpace.push(" "); + } + var nSpace = n.match(/\s+/g); + if (nSpace == null) { + nSpace = [" "]; + } + else { + nSpace.push(" "); + } + + if (out.n.length === 0) { + for (i = 0; i < out.o.length; i++) { + str += '' + out.o[i] + oSpace[i] + ""; + } + } + else { + if (out.n[0].text == null) { + for (n = 0; n < out.o.length && out.o[n].text == null; n++) { + str += '' + out.o[n] + oSpace[n] + ""; + } + } + + for (i = 0; i < out.n.length; i++) { + if (out.n[i].text == null) { + str += '' + out.n[i] + nSpace[i] + ""; + } + else { + var pre = ""; + + for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { + pre += '' + out.o[n] + oSpace[n] + ""; + } + str += " " + out.n[i].text + nSpace[i] + pre; + } + } + } + + return str; + }; +}()); + +// for CommonJS enviroments, export everything +if ( typeof exports !== "undefined" || typeof require !== "undefined" ) { + extend(exports, QUnit); +} + +// get at whatever the global object is, like window in browsers +}( (function() {return this;}.call()) )); diff --git a/template/datepicker/tests/assets/utils.js b/template/datepicker/tests/assets/utils.js new file mode 100644 index 0000000..6f9cac5 --- /dev/null +++ b/template/datepicker/tests/assets/utils.js @@ -0,0 +1,21 @@ +function UTCDate(){ + return new Date(Date.UTC.apply(Date, arguments)); +} + + +function format_date(date){ + var y = date.getUTCFullYear(), + m = date.getUTCMonth() + 1, + d = date.getUTCDate(), + h = date.getUTCHours(), + i = date.getUTCMinutes(), + s = date.getUTCSeconds(), + l = date.getUTCMilliseconds(); + function z(i){return (i <= 9 ? '0'+i : i);} + return y+'-'+z(m)+'-'+z(d)+' '+z(h)+':'+z(i)+':'+z(s)+'.'+z(l); +} + + +function datesEqual(actual, expected, message){ + QUnit.push(QUnit.equiv(actual, expected), format_date(actual), format_date(expected), message); +} diff --git a/template/datepicker/tests/run-qunit.js b/template/datepicker/tests/run-qunit.js new file mode 100644 index 0000000..effdc3f --- /dev/null +++ b/template/datepicker/tests/run-qunit.js @@ -0,0 +1,157 @@ +var system = require('system'); + +/** + * Wait until the test condition is true or a timeout occurs. Useful for waiting + * on a server response or for a ui change (fadeIn, etc.) to occur. + * + * @param testFx javascript condition that evaluates to a boolean, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param onReady what to do when testFx condition is fulfilled, + * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or + * as a callback function. + * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. + */ +function waitFor(testFx, onReady, timeOutMillis) { + var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 10001, //< Default Max Timout is 3s + start = new Date().getTime(), + condition = false, + interval = setInterval(function() { + if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) { + // If not time-out yet and condition not yet fulfilled + condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code + } else { + if(!condition) { + // If condition still not fulfilled (timeout but condition is 'false') + console.log("'waitFor()' timeout"); + phantom.exit(1); + } else { + // Condition fulfilled (timeout and/or condition is 'true') + //console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms."); + typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled + clearInterval(interval); //< Stop this interval + } + } + }, 100); //< repeat check every 100ms +}; + +if (system.args.length !== 2) { + console.log('Usage: run-qunit.js URL'); + phantom.exit(1); +} + +var fs = require('fs'); +var page = require('webpage').create(); + +// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") +page.onConsoleMessage = function(msg) { + console.log(msg); +}; +page.onError = function (msg, trace) { + console.log(msg); + trace.forEach(function(item) { + console.log(' ', item.file, ':', item.line); + }) +} + +var _openPath = phantom.args[0].replace(/^.*(\\|\/)/, ''); +var openPath = _openPath; +var origdir = '../js/'; +var basedir = '../instrumented/'; +var coverageBase = fs.read('_coverage.html'); + +if (fs.exists(basedir)){ + var script = /<\/script>/g, + src = /src=(["'])(.*?)\1/, + contents = fs.read(openPath), + _contents = contents, + srcs = [], + s; + while (script.exec(contents)){ + s = src.exec(RegExp.lastMatch)[2]; + if (s && s.indexOf(origdir) != -1) + _contents = _contents.replace(s, s.replace(origdir, basedir)) + } + if (_contents != contents){ + openPath += '.cov.html'; + fs.write(openPath, _contents); + } +} + +page.open(openPath, function(status){ + if (status !== "success") { + console.log("Unable to access network"); + phantom.exit(1); + } else { + // Inject instrumented sources if they exist + if (fs.exists(basedir)) + for (var i=0; i0 ? 'hit' : 'miss'); + } else { + hitmiss = ' ' + 'undef'; + } + var htmlLine = fileLines[idx] + if (!source) + htmlLine = htmlLine.replace('<', '<').replace('>', '>'); + colorized += '
    ' + htmlLine + '
    \n'; + }; + colorized = coverageBase.replace('COLORIZED_LINE_HTML', colorized); + + fs.write('coverage.html', colorized, 'w'); + + console.log('Coverage for ' + coverageInfo.key + ' in coverage.html'); + } + if (_openPath != openPath) + fs.remove(openPath); + + var failedNum = page.evaluate(function(){ + var el = document.getElementById('qunit-testresult'); + console.log(el.innerText); + try { + return el.getElementsByClassName('failed')[0].innerHTML; + } catch (e) { } + return 10000; + }); + phantom.exit((parseInt(failedNum, 10) > 0) ? 1 : 0); + }); + } +}); + +function readFileLines(filename) { + var stream = fs.open(filename, 'r'); + var lines = []; + var line; + while (!stream.atEnd()) { + lines.push(stream.readLine()); + } + stream.close(); + + return lines; +} + diff --git a/template/datepicker/tests/suites/calendar-weeks.js b/template/datepicker/tests/suites/calendar-weeks.js new file mode 100644 index 0000000..6c466f1 --- /dev/null +++ b/template/datepicker/tests/suites/calendar-weeks.js @@ -0,0 +1,48 @@ +module('Calendar Weeks', { + setup: function(){ + this.input = $('') + .appendTo('#qunit-fixture') + .val('2013-01-14') + .datepicker({ + format: 'yyyy-mm-dd', + calendarWeeks: true + }) + .focus(); // Activate for visibility checks + this.dp = this.input.data('datepicker') + this.picker = this.dp.picker; + }, + teardown: function(){ + this.picker.remove(); + } +}); + +test('adds cw header column', function(){ + var target = this.picker.find('.datepicker-days thead th:first-child'); + ok(target.hasClass('cw'), 'First column heading is from cw column'); +}); + +test('adds calendar week cells to each day row', function(){ + var target = this.picker.find('.datepicker-days tbody tr'); + + expect(target.length); + target.each(function(i){ + var t = $(this).children().first(); + ok(t.hasClass('cw'), "First column is cw column"); + }); +}); + +test('displays correct calendar week', function(){ + var target = this.picker.find('.datepicker-days tbody tr'); + + expect(target.length); + target.each(function(i){ + var t = $(this).children().first(); + equal(t.text(), i+1, "Displays correct calendar weeks"); + }); +}); + +test('it prepends column to switcher thead row', function(){ + var target = this.picker.find('.datepicker-days thead tr:first-child'); + equal(target.children().length, 4, 'first row has 4 columns'); + ok(target.children().first().hasClass('cw'), 'cw column is prepended'); +}); diff --git a/template/datepicker/tests/suites/component.js b/template/datepicker/tests/suites/component.js new file mode 100644 index 0000000..a6ede72 --- /dev/null +++ b/template/datepicker/tests/suites/component.js @@ -0,0 +1,194 @@ +module('Component', { + setup: function(){ + this.component = $('
    '+ + ''+ + ''+ + '
    ') + .appendTo('#qunit-fixture') + .datepicker({format: "dd-mm-yyyy"}); + this.input = this.component.find('input'); + this.addon = this.component.find('.add-on'); + this.dp = this.component.data('datepicker') + this.picker = this.dp.picker; + }, + teardown: function(){ + this.picker.remove(); + } +}); + + +test('Component gets date/viewDate from input value', function(){ + datesEqual(this.dp.date, UTCDate(2012, 1, 12)); + datesEqual(this.dp.viewDate, UTCDate(2012, 1, 12)); +}); + +test('Activation by component', function(){ + ok(!this.picker.is(':visible')); + this.addon.click(); + ok(this.picker.is(':visible')); +}); + +test('simple keyboard nav test', function(){ + var target; + + // Keyboard nav only works with non-readonly inputs + this.input.removeAttr('readonly'); + + equal(this.dp.viewMode, 0); + target = this.picker.find('.datepicker-days thead th.datepicker-switch'); + equal(target.text(), 'February 2012', 'Title is "February 2012"'); + datesEqual(this.dp.date, UTCDate(2012, 1, 12)); + datesEqual(this.dp.viewDate, UTCDate(2012, 1, 12)); + + // Focus/open + this.addon.click(); + + // Navigation: -1 day, left arrow key + this.input.trigger({ + type: 'keydown', + keyCode: 37 + }); + datesEqual(this.dp.viewDate, UTCDate(2012, 1, 11)); + datesEqual(this.dp.date, UTCDate(2012, 1, 11)); + // Month not changed + target = this.picker.find('.datepicker-days thead th.datepicker-switch'); + equal(target.text(), 'February 2012', 'Title is "February 2012"'); + + // Navigation: +1 month, shift + right arrow key + this.input.trigger({ + type: 'keydown', + keyCode: 39, + shiftKey: true + }); + datesEqual(this.dp.viewDate, UTCDate(2012, 2, 11)); + datesEqual(this.dp.date, UTCDate(2012, 2, 11)); + target = this.picker.find('.datepicker-days thead th.datepicker-switch'); + equal(target.text(), 'March 2012', 'Title is "March 2012"'); + + // Navigation: -1 year, ctrl + left arrow key + this.input.trigger({ + type: 'keydown', + keyCode: 37, + ctrlKey: true + }); + datesEqual(this.dp.viewDate, UTCDate(2011, 2, 11)); + datesEqual(this.dp.date, UTCDate(2011, 2, 11)); + target = this.picker.find('.datepicker-days thead th.datepicker-switch'); + equal(target.text(), 'March 2011', 'Title is "March 2011"'); +}); + +test('setValue', function(){ + this.dp.date = UTCDate(2012, 2, 13) + this.dp.setValue() + datesEqual(this.dp.date, UTCDate(2012, 2, 13)); + equal(this.input.val(), '13-03-2012'); +}); + +test('update', function(){ + this.input.val('13-03-2012'); + this.dp.update() + datesEqual(this.dp.date, UTCDate(2012, 2, 13)); +}); + +test('Navigating to/from decade view', function(){ + var target; + + this.addon.click(); + this.input.val('31-03-2012'); + this.dp.update(); + + equal(this.dp.viewMode, 0); + target = this.picker.find('.datepicker-days thead th.datepicker-switch'); + ok(target.is(':visible'), 'View switcher is visible'); + + target.click(); + ok(this.picker.find('.datepicker-months').is(':visible'), 'Month picker is visible'); + equal(this.dp.viewMode, 1); + // Not modified when switching modes + datesEqual(this.dp.viewDate, UTCDate(2012, 2, 31)); + datesEqual(this.dp.date, UTCDate(2012, 2, 31)); + + target = this.picker.find('.datepicker-months thead th.datepicker-switch'); + ok(target.is(':visible'), 'View switcher is visible'); + + target.click(); + ok(this.picker.find('.datepicker-years').is(':visible'), 'Year picker is visible'); + equal(this.dp.viewMode, 2); + // Not modified when switching modes + datesEqual(this.dp.viewDate, UTCDate(2012, 2, 31)); + datesEqual(this.dp.date, UTCDate(2012, 2, 31)); + + // Change years to test internal state changes + target = this.picker.find('.datepicker-years tbody span:contains(2011)'); + target.click(); + equal(this.dp.viewMode, 1); + // Only viewDate modified + datesEqual(this.dp.viewDate, UTCDate(2011, 2, 1)); + datesEqual(this.dp.date, UTCDate(2012, 2, 31)); + + target = this.picker.find('.datepicker-months tbody span:contains(Apr)'); + target.click(); + equal(this.dp.viewMode, 0); + // Only viewDate modified + datesEqual(this.dp.viewDate, UTCDate(2011, 3, 1)); + datesEqual(this.dp.date, UTCDate(2012, 2, 31)); +}); + +test('Selecting date resets viewDate and date', function(){ + var target; + + this.addon.click(); + this.input.val('31-03-2012'); + this.dp.update(); + + // Rendered correctly + equal(this.dp.viewMode, 0); + target = this.picker.find('.datepicker-days tbody td:first'); + equal(target.text(), '26'); // Should be Feb 26 + + // Updated internally on click + target.click(); + datesEqual(this.dp.viewDate, UTCDate(2012, 1, 26)) + datesEqual(this.dp.date, UTCDate(2012, 1, 26)) + + // Re-rendered on click + target = this.picker.find('.datepicker-days tbody td:first'); + equal(target.text(), '29'); // Should be Jan 29 +}); + +test('"remove" removes associated HTML', function(){ + var datepickerDivSelector = '.datepicker'; + + $('#datepicker').datepicker('show'); + + //there should be one datepicker initiated so that means one hidden .datepicker div + equal($(datepickerDivSelector).length, 1); + this.component.datepicker('remove'); + equal($(datepickerDivSelector).length, 0);//hidden HTML should be gone +}); + +test('Does not block events', function(){ + var clicks = 0; + function handler(){ + clicks++; + } + $('#qunit-fixture').on('click', '.add-on', handler); + this.addon.click(); + equal(clicks, 1); + $('#qunit-fixture').off('click', '.add-on', handler); +}); + + +test('date and viewDate must be between startDate and endDate when setStartDate called', function() { + this.dp.setDate(new Date(2013, 1, 1)); + this.dp.setStartDate(new Date(2013, 5, 6)); + datesEqual(this.dp.viewDate, UTCDate(2013, 5, 6)); + datesEqual(this.dp.date, UTCDate(2013, 5, 6)); +}); + +test('date and viewDate must be between startDate and endDate when setEndDate called', function() { + this.dp.setDate(new Date(2013, 12, 1)); + this.dp.setEndDate(new Date(2013, 5, 6)); + datesEqual(this.dp.viewDate, UTCDate(2013, 5, 6)); + datesEqual(this.dp.date, UTCDate(2013, 5, 6)); +}); diff --git a/template/datepicker/tests/suites/data-api.js b/template/datepicker/tests/suites/data-api.js new file mode 100644 index 0000000..a751f57 --- /dev/null +++ b/template/datepicker/tests/suites/data-api.js @@ -0,0 +1,114 @@ +module('DATA-API'); + +test('DATA-API: data-provide="datepicker" on input; focus', function(){ + var input = $('') + .appendTo('#qunit-fixture'); + input.focus(); + ok(input.data('datepicker'), 'datepicker is initialized by "focus" event'); +}); + +test('DATA-API: data-provide="datepicker" on input; click', function(){ + var input = $('') + .appendTo('#qunit-fixture'); + input.click(); + ok(input.data('datepicker'), 'datepicker is initialized by "focus" event'); +}); + +test('DATA-API: data-provide="datepicker" on component', function(){ + var html, comp; + + html = '
    '+ + ''+ + '
    '; + + comp = $(html).appendTo('#qunit-fixture'); + comp.find('input').focus(); + ok(comp.data('datepicker'), 'append component initialized by "focus" event on input'); + comp.remove(); + + comp = $(html).appendTo('#qunit-fixture'); + comp.find('input').click(); + ok(comp.data('datepicker'), 'append component initialized by "click" event on input'); + comp.remove(); + + comp = $(html).appendTo('#qunit-fixture'); + comp.find('.add-on').focus(); + ok(comp.data('datepicker'), 'append component initialized by "focus" event on add-on'); + comp.remove(); + + comp = $(html).appendTo('#qunit-fixture'); + comp.find('.add-on').click(); + ok(comp.data('datepicker'), 'append component initialized by "click" event on add-on'); + comp.remove(); + + + html = '
    '+ + ''+ + '
    '; + + comp = $(html).prependTo('#qunit-fixture'); + comp.find('input').focus(); + ok(comp.data('datepicker'), 'prepend component initialized by "focus" event on input'); + comp.remove(); + + comp = $(html).prependTo('#qunit-fixture'); + comp.find('input').click(); + ok(comp.data('datepicker'), 'prepend component initialized by "click" event on input'); + comp.remove(); + + comp = $(html).prependTo('#qunit-fixture'); + comp.find('.add-on').focus(); + ok(comp.data('datepicker'), 'prepend component initialized by "focus" event on add-on'); + comp.remove(); + + comp = $(html).prependTo('#qunit-fixture'); + comp.find('.add-on').click(); + ok(comp.data('datepicker'), 'prepend component initialized by "click" event on add-on'); + comp.remove(); +}); + +test('DATA-API: data-provide="datepicker" on button', function(){ + var html, comp; + + html = '