Removed css and js which are no longer used
This commit is contained in:
@ -1,994 +0,0 @@
|
||||
/*!
|
||||
* Jasny extension p7 to Bootstrap v3.0.0
|
||||
*
|
||||
* Copyright 2013 Twitter, Inc
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world by @mdo and @fat.
|
||||
*/
|
||||
|
||||
@media (min-width: 1px) {
|
||||
.container-smooth {
|
||||
max-width: 1170px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
line-height: 1.428571429;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-image: none;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.btn:focus {
|
||||
outline: thin dotted #333;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn:focus {
|
||||
color: #333333;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
.btn.disabled,
|
||||
.btn[disabled],
|
||||
fieldset[disabled] .btn {
|
||||
pointer-events: none;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.65;
|
||||
filter: alpha(opacity=65);
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
color: #333333;
|
||||
background-color: #ffffff;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
|
||||
.btn-default:hover,
|
||||
.btn-default:focus,
|
||||
.btn-default:active,
|
||||
.btn-default.active,
|
||||
.open .dropdown-toggle.btn-default {
|
||||
color: #333333;
|
||||
background-color: #ebebeb;
|
||||
border-color: #adadad;
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-default.active,
|
||||
.open .dropdown-toggle.btn-default {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-default.disabled,
|
||||
.btn-default[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
.btn-default.disabled:hover,
|
||||
.btn-default[disabled]:hover,
|
||||
fieldset[disabled] .btn-default:hover,
|
||||
.btn-default.disabled:focus,
|
||||
.btn-default[disabled]:focus,
|
||||
fieldset[disabled] .btn-default:focus,
|
||||
.btn-default.disabled:active,
|
||||
.btn-default[disabled]:active,
|
||||
fieldset[disabled] .btn-default:active,
|
||||
.btn-default.disabled.active,
|
||||
.btn-default[disabled].active,
|
||||
fieldset[disabled] .btn-default.active {
|
||||
background-color: #ffffff;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #ffffff;
|
||||
background-color: #428bca;
|
||||
border-color: #357ebd;
|
||||
}
|
||||
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus,
|
||||
.btn-primary:active,
|
||||
.btn-primary.active,
|
||||
.open .dropdown-toggle.btn-primary {
|
||||
color: #ffffff;
|
||||
background-color: #3276b1;
|
||||
border-color: #285e8e;
|
||||
}
|
||||
|
||||
.btn-primary:active,
|
||||
.btn-primary.active,
|
||||
.open .dropdown-toggle.btn-primary {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-primary.disabled,
|
||||
.btn-primary[disabled],
|
||||
fieldset[disabled] .btn-primary,
|
||||
.btn-primary.disabled:hover,
|
||||
.btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary:hover,
|
||||
.btn-primary.disabled:focus,
|
||||
.btn-primary[disabled]:focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
.btn-primary.disabled:active,
|
||||
.btn-primary[disabled]:active,
|
||||
fieldset[disabled] .btn-primary:active,
|
||||
.btn-primary.disabled.active,
|
||||
.btn-primary[disabled].active,
|
||||
fieldset[disabled] .btn-primary.active {
|
||||
background-color: #428bca;
|
||||
border-color: #357ebd;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
color: #ffffff;
|
||||
background-color: #f0ad4e;
|
||||
border-color: #eea236;
|
||||
}
|
||||
|
||||
.btn-warning:hover,
|
||||
.btn-warning:focus,
|
||||
.btn-warning:active,
|
||||
.btn-warning.active,
|
||||
.open .dropdown-toggle.btn-warning {
|
||||
color: #ffffff;
|
||||
background-color: #ed9c28;
|
||||
border-color: #d58512;
|
||||
}
|
||||
|
||||
.btn-warning:active,
|
||||
.btn-warning.active,
|
||||
.open .dropdown-toggle.btn-warning {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-warning.disabled,
|
||||
.btn-warning[disabled],
|
||||
fieldset[disabled] .btn-warning,
|
||||
.btn-warning.disabled:hover,
|
||||
.btn-warning[disabled]:hover,
|
||||
fieldset[disabled] .btn-warning:hover,
|
||||
.btn-warning.disabled:focus,
|
||||
.btn-warning[disabled]:focus,
|
||||
fieldset[disabled] .btn-warning:focus,
|
||||
.btn-warning.disabled:active,
|
||||
.btn-warning[disabled]:active,
|
||||
fieldset[disabled] .btn-warning:active,
|
||||
.btn-warning.disabled.active,
|
||||
.btn-warning[disabled].active,
|
||||
fieldset[disabled] .btn-warning.active {
|
||||
background-color: #f0ad4e;
|
||||
border-color: #eea236;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
color: #ffffff;
|
||||
background-color: #d9534f;
|
||||
border-color: #d43f3a;
|
||||
}
|
||||
|
||||
.btn-danger:hover,
|
||||
.btn-danger:focus,
|
||||
.btn-danger:active,
|
||||
.btn-danger.active,
|
||||
.open .dropdown-toggle.btn-danger {
|
||||
color: #ffffff;
|
||||
background-color: #d2322d;
|
||||
border-color: #ac2925;
|
||||
}
|
||||
|
||||
.btn-danger:active,
|
||||
.btn-danger.active,
|
||||
.open .dropdown-toggle.btn-danger {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-danger.disabled,
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-danger,
|
||||
.btn-danger.disabled:hover,
|
||||
.btn-danger[disabled]:hover,
|
||||
fieldset[disabled] .btn-danger:hover,
|
||||
.btn-danger.disabled:focus,
|
||||
.btn-danger[disabled]:focus,
|
||||
fieldset[disabled] .btn-danger:focus,
|
||||
.btn-danger.disabled:active,
|
||||
.btn-danger[disabled]:active,
|
||||
fieldset[disabled] .btn-danger:active,
|
||||
.btn-danger.disabled.active,
|
||||
.btn-danger[disabled].active,
|
||||
fieldset[disabled] .btn-danger.active {
|
||||
background-color: #d9534f;
|
||||
border-color: #d43f3a;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
color: #ffffff;
|
||||
background-color: #5cb85c;
|
||||
border-color: #4cae4c;
|
||||
}
|
||||
|
||||
.btn-success:hover,
|
||||
.btn-success:focus,
|
||||
.btn-success:active,
|
||||
.btn-success.active,
|
||||
.open .dropdown-toggle.btn-success {
|
||||
color: #ffffff;
|
||||
background-color: #47a447;
|
||||
border-color: #398439;
|
||||
}
|
||||
|
||||
.btn-success:active,
|
||||
.btn-success.active,
|
||||
.open .dropdown-toggle.btn-success {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-success.disabled,
|
||||
.btn-success[disabled],
|
||||
fieldset[disabled] .btn-success,
|
||||
.btn-success.disabled:hover,
|
||||
.btn-success[disabled]:hover,
|
||||
fieldset[disabled] .btn-success:hover,
|
||||
.btn-success.disabled:focus,
|
||||
.btn-success[disabled]:focus,
|
||||
fieldset[disabled] .btn-success:focus,
|
||||
.btn-success.disabled:active,
|
||||
.btn-success[disabled]:active,
|
||||
fieldset[disabled] .btn-success:active,
|
||||
.btn-success.disabled.active,
|
||||
.btn-success[disabled].active,
|
||||
fieldset[disabled] .btn-success.active {
|
||||
background-color: #5cb85c;
|
||||
border-color: #4cae4c;
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
color: #ffffff;
|
||||
background-color: #5bc0de;
|
||||
border-color: #46b8da;
|
||||
}
|
||||
|
||||
.btn-info:hover,
|
||||
.btn-info:focus,
|
||||
.btn-info:active,
|
||||
.btn-info.active,
|
||||
.open .dropdown-toggle.btn-info {
|
||||
color: #ffffff;
|
||||
background-color: #39b3d7;
|
||||
border-color: #269abc;
|
||||
}
|
||||
|
||||
.btn-info:active,
|
||||
.btn-info.active,
|
||||
.open .dropdown-toggle.btn-info {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-info.disabled,
|
||||
.btn-info[disabled],
|
||||
fieldset[disabled] .btn-info,
|
||||
.btn-info.disabled:hover,
|
||||
.btn-info[disabled]:hover,
|
||||
fieldset[disabled] .btn-info:hover,
|
||||
.btn-info.disabled:focus,
|
||||
.btn-info[disabled]:focus,
|
||||
fieldset[disabled] .btn-info:focus,
|
||||
.btn-info.disabled:active,
|
||||
.btn-info[disabled]:active,
|
||||
fieldset[disabled] .btn-info:active,
|
||||
.btn-info.disabled.active,
|
||||
.btn-info[disabled].active,
|
||||
fieldset[disabled] .btn-info.active {
|
||||
background-color: #5bc0de;
|
||||
border-color: #46b8da;
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
font-weight: normal;
|
||||
color: #428bca;
|
||||
cursor: pointer;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-link:active,
|
||||
.btn-link[disabled],
|
||||
fieldset[disabled] .btn-link {
|
||||
background-color: transparent;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-link:hover,
|
||||
.btn-link:focus,
|
||||
.btn-link:active {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.btn-link:hover,
|
||||
.btn-link:focus {
|
||||
color: #2a6496;
|
||||
text-decoration: underline;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.btn-link[disabled]:hover,
|
||||
fieldset[disabled] .btn-link:hover,
|
||||
.btn-link[disabled]:focus,
|
||||
fieldset[disabled] .btn-link:focus {
|
||||
color: #999999;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
padding: 10px 16px;
|
||||
font-size: 18px;
|
||||
line-height: 1.33;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-xs {
|
||||
padding: 5px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.btn-xs {
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
.btn-block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.btn-block + .btn-block {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
input[type="submit"].btn-block,
|
||||
input[type="reset"].btn-block,
|
||||
input[type="button"].btn-block {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn-labeled {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.btn-label {
|
||||
position: relative;
|
||||
left: -12px;
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
.btn-label.btn-label-right {
|
||||
right: -12px;
|
||||
left: auto;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
.btn-lg .btn-label {
|
||||
left: -16px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 5px 0 0 5px;
|
||||
}
|
||||
|
||||
.btn-lg .btn-label.btn-label-right {
|
||||
right: -16px;
|
||||
left: auto;
|
||||
border-radius: 0 5px 5px 0;
|
||||
}
|
||||
|
||||
.btn-sm .btn-label {
|
||||
left: -10px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 2px 0 0 2px;
|
||||
}
|
||||
|
||||
.btn-sm .btn-label.btn-label-right {
|
||||
right: -10px;
|
||||
left: auto;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
.btn-xs .btn-label {
|
||||
left: -5px;
|
||||
padding: 1px 5px;
|
||||
border-radius: 2px 0 0 2px;
|
||||
}
|
||||
|
||||
.btn-xs .btn-label.btn-label-right {
|
||||
right: -5px;
|
||||
left: auto;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
.nav-tabs-bottom {
|
||||
border-top: 1px solid #dddddd;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.nav-tabs-bottom > li {
|
||||
margin-top: -1px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.nav-tabs-bottom > li > a {
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
|
||||
.nav-tabs-bottom > li > a:hover,
|
||||
.nav-tabs-bottom > li > a:focus,
|
||||
.nav-tabs-bottom > li.active > a,
|
||||
.nav-tabs-bottom > li.active > a:hover,
|
||||
.nav-tabs-bottom > li.active > a:focus {
|
||||
border: 1px solid #dddddd;
|
||||
border-top-color: transparent;
|
||||
}
|
||||
|
||||
.nav-tabs-left {
|
||||
border-right: 1px solid #dddddd;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.nav-tabs-left > li {
|
||||
float: none;
|
||||
margin-right: -1px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.nav-tabs-left > li > a {
|
||||
margin-right: 0;
|
||||
margin-bottom: 2px;
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
|
||||
.nav-tabs-left > li > a:hover,
|
||||
.nav-tabs-left > li > a:focus,
|
||||
.nav-tabs-left > li.active > a,
|
||||
.nav-tabs-left > li.active > a:hover,
|
||||
.nav-tabs-left > li.active > a:focus {
|
||||
border: 1px solid #dddddd;
|
||||
border-right-color: transparent;
|
||||
}
|
||||
|
||||
.row > .nav-tabs-left {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding-right: 0;
|
||||
padding-left: 15px;
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
.row > .nav-tabs-left + .tab-content {
|
||||
border-left: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.nav-tabs-right {
|
||||
border-bottom: 0;
|
||||
border-left: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.nav-tabs-right > li {
|
||||
float: none;
|
||||
margin-bottom: 0;
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
.nav-tabs-right > li > a {
|
||||
margin-bottom: 2px;
|
||||
margin-left: 0;
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.nav-tabs-right > li > a:hover,
|
||||
.nav-tabs-right > li > a:focus,
|
||||
.nav-tabs-right > li.active > a,
|
||||
.nav-tabs-right > li.active > a:hover,
|
||||
.nav-tabs-right > li.active > a:focus {
|
||||
border: 1px solid #dddddd;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
.row > .nav-tabs-right {
|
||||
padding-right: 15px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.navmenu {
|
||||
width: 300px;
|
||||
height: 100%;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.navmenu-fixed-left,
|
||||
.navmenu-fixed-right {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1030;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.navmenu-fixed-left {
|
||||
left: 0;
|
||||
border-width: 0 1px 0 0;
|
||||
}
|
||||
|
||||
.navmenu-fixed-right {
|
||||
right: 0;
|
||||
border-width: 0 0 0 1px;
|
||||
}
|
||||
|
||||
.navmenu-nav {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.navmenu-nav.dropdown-menu {
|
||||
position: static;
|
||||
float: none;
|
||||
padding-top: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navmenu-brand {
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
margin: 10px 0;
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.navmenu-brand:hover,
|
||||
.navmenu-brand:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navmenu-default {
|
||||
background-color: #f8f8f8;
|
||||
border-color: #e7e7e7;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-brand {
|
||||
color: #777777;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-brand:hover,
|
||||
.navmenu-default .navmenu-brand:focus {
|
||||
color: #5e5e5e;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-text {
|
||||
color: #777777;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav > .dropdown > a:hover .caret,
|
||||
.navmenu-default .navmenu-nav > .dropdown > a:focus .caret {
|
||||
border-top-color: #333333;
|
||||
border-bottom-color: #333333;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav > .open > a,
|
||||
.navmenu-default .navmenu-nav > .open > a:hover,
|
||||
.navmenu-default .navmenu-nav > .open > a:focus {
|
||||
color: #555555;
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav > .open > a .caret,
|
||||
.navmenu-default .navmenu-nav > .open > a:hover .caret,
|
||||
.navmenu-default .navmenu-nav > .open > a:focus .caret {
|
||||
border-top-color: #555555;
|
||||
border-bottom-color: #555555;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav > .dropdown > a .caret {
|
||||
border-top-color: #777777;
|
||||
border-bottom-color: #777777;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav.dropdown-menu {
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav.dropdown-menu > .divider {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav.dropdown-menu > .active > a,
|
||||
.navmenu-default .navmenu-nav.dropdown-menu > .active > a:hover,
|
||||
.navmenu-default .navmenu-nav.dropdown-menu > .active > a:focus {
|
||||
background-color: #d7d7d7;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav > li > a {
|
||||
color: #777777;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav > li > a:hover,
|
||||
.navmenu-default .navmenu-nav > li > a:focus {
|
||||
color: #333333;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav > .active > a,
|
||||
.navmenu-default .navmenu-nav > .active > a:hover,
|
||||
.navmenu-default .navmenu-nav > .active > a:focus {
|
||||
color: #555555;
|
||||
background-color: #e7e7e7;
|
||||
}
|
||||
|
||||
.navmenu-default .navmenu-nav > .disabled > a,
|
||||
.navmenu-default .navmenu-nav > .disabled > a:hover,
|
||||
.navmenu-default .navmenu-nav > .disabled > a:focus {
|
||||
color: #cccccc;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.navmenu-inverse {
|
||||
background-color: #222222;
|
||||
border-color: #080808;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-brand {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-brand:hover,
|
||||
.navmenu-inverse .navmenu-brand:focus {
|
||||
color: #ffffff;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-text {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav > .dropdown > a:hover .caret,
|
||||
.navmenu-inverse .navmenu-nav > .dropdown > a:focus .caret {
|
||||
border-top-color: #ffffff;
|
||||
border-bottom-color: #ffffff;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav > .open > a,
|
||||
.navmenu-inverse .navmenu-nav > .open > a:hover,
|
||||
.navmenu-inverse .navmenu-nav > .open > a:focus {
|
||||
color: #ffffff;
|
||||
background-color: #080808;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav > .open > a .caret,
|
||||
.navmenu-inverse .navmenu-nav > .open > a:hover .caret,
|
||||
.navmenu-inverse .navmenu-nav > .open > a:focus .caret {
|
||||
border-top-color: #ffffff;
|
||||
border-bottom-color: #ffffff;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav > .dropdown > a .caret {
|
||||
border-top-color: #999999;
|
||||
border-bottom-color: #999999;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav.dropdown-menu {
|
||||
background-color: #080808;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav.dropdown-menu > .divider {
|
||||
background-color: #222222;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav.dropdown-menu > .active > a,
|
||||
.navmenu-inverse .navmenu-nav.dropdown-menu > .active > a:hover,
|
||||
.navmenu-inverse .navmenu-nav.dropdown-menu > .active > a:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav > li > a {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav > li > a:hover,
|
||||
.navmenu-inverse .navmenu-nav > li > a:focus {
|
||||
color: #ffffff;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav > .active > a,
|
||||
.navmenu-inverse .navmenu-nav > .active > a:hover,
|
||||
.navmenu-inverse .navmenu-nav > .active > a:focus {
|
||||
color: #ffffff;
|
||||
background-color: #080808;
|
||||
}
|
||||
|
||||
.navmenu-inverse .navmenu-nav > .disabled > a,
|
||||
.navmenu-inverse .navmenu-nav > .disabled > a:hover,
|
||||
.navmenu-inverse .navmenu-nav > .disabled > a:focus {
|
||||
color: #444444;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.alert-fixed-top,
|
||||
.alert-fixed-bottom {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 1035;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.alert-fixed-top,
|
||||
.alert-fixed-bottom {
|
||||
left: 50%;
|
||||
width: 992px;
|
||||
margin-left: -496px;
|
||||
}
|
||||
}
|
||||
|
||||
.alert-fixed-top {
|
||||
top: 0;
|
||||
border-width: 0 0 1px 0;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.alert-fixed-top {
|
||||
border-width: 0 1px 1px 1px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.alert-fixed-bottom {
|
||||
bottom: 0;
|
||||
border-width: 1px 0 0 0;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.alert-fixed-bottom {
|
||||
border-width: 1px 1px 0 1px;
|
||||
border-top-right-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.offcanvas {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.offcanvas.in {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.offcanvas-xs {
|
||||
display: none;
|
||||
}
|
||||
.offcanvas-xs.in {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.offcanvas-sm {
|
||||
display: none;
|
||||
}
|
||||
.offcanvas-sm.in {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
.offcanvas-md {
|
||||
display: none;
|
||||
}
|
||||
.offcanvas-md.in {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.offcanvas-lg {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.offcanvas-lg.in {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.canvas-sliding {
|
||||
-webkit-transition: -webkit-transform 0.35s;
|
||||
transition: transform 0.35s, -ms-transform 0.35s;
|
||||
}
|
||||
|
||||
.offcanvas-clone {
|
||||
position: absolute !important;
|
||||
top: auto !important;
|
||||
right: 0 !important;
|
||||
bottom: 0 !important;
|
||||
left: auto !important;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
overflow: hidden !important;
|
||||
border: none !important;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
.table.rowlink td:not(.rowlink-skip),
|
||||
.table .rowlink td:not(.rowlink-skip) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.table.rowlink td:not(.rowlink-skip) a,
|
||||
.table .rowlink td:not(.rowlink-skip) a {
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
.table-hover.rowlink tr:hover td,
|
||||
.table-hover .rowlink tr:hover td {
|
||||
background-color: #cfcfcf;
|
||||
}
|
||||
|
||||
.btn-file {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.btn-file > input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
font-size: 23px;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
transform: translate(-300px, 0) scale(4);
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.fileinput {
|
||||
display: inline-block;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
.fileinput .uneditable-input {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.fileinput .thumbnail {
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.fileinput .thumbnail > img {
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.fileinput .btn {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.fileinput-exists .fileinput-new,
|
||||
.fileinput-new .fileinput-exists {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fileinput-inline .fileinput-controls {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.fileinput .uneditable-input {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.fileinput-new .input-group .btn-file {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.fileinput-new .input-group .btn-file.btn-xs,
|
||||
.fileinput-new .input-group .btn-file.btn-sm {
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
.fileinput-new .input-group .btn-file.btn-lg {
|
||||
border-radius: 0 6px 6px 0;
|
||||
}
|
||||
|
||||
.form-group.has-warning .fileinput .uneditable-input {
|
||||
color: #c09853;
|
||||
border-color: #faebcc;
|
||||
}
|
||||
|
||||
.form-group.has-warning .fileinput .fileinput-preview {
|
||||
color: #c09853;
|
||||
}
|
||||
|
||||
.form-group.has-warning .fileinput .thumbnail {
|
||||
border-color: #faebcc;
|
||||
}
|
||||
|
||||
.form-group.has-error .fileinput .uneditable-input {
|
||||
color: #b94a48;
|
||||
border-color: #ebccd1;
|
||||
}
|
||||
|
||||
.form-group.has-error .fileinput .fileinput-preview {
|
||||
color: #b94a48;
|
||||
}
|
||||
|
||||
.form-group.has-error .fileinput .thumbnail {
|
||||
border-color: #ebccd1;
|
||||
}
|
||||
|
||||
.form-group.has-success .fileinput .uneditable-input {
|
||||
color: #468847;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
.form-group.has-success .fileinput .fileinput-preview {
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
.form-group.has-success .fileinput .thumbnail {
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
.input-group-addon:not(:first-child) {
|
||||
border-left: 0;
|
||||
}
|
1
public/css/themes/flat-ui.min.css
vendored
1
public/css/themes/flat-ui.min.css
vendored
File diff suppressed because one or more lines are too long
880
public/js/lib/angular-route.js
vendored
880
public/js/lib/angular-route.js
vendored
@ -1,880 +0,0 @@
|
||||
/**
|
||||
* @license AngularJS v1.2.0
|
||||
* (c) 2010-2012 Google, Inc. http://angularjs.org
|
||||
* License: MIT
|
||||
*/
|
||||
(function(window, angular, undefined) {'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name ngRoute
|
||||
* @description
|
||||
*
|
||||
* # ngRoute
|
||||
*
|
||||
* The `ngRoute` module provides routing and deeplinking services and directives for angular apps.
|
||||
*
|
||||
* {@installModule route}
|
||||
*
|
||||
* <div doc-module-components="ngRoute"></div>
|
||||
*/
|
||||
/* global -ngRouteModule */
|
||||
var ngRouteModule = angular.module('ngRoute', ['ng']).
|
||||
provider('$route', $RouteProvider);
|
||||
|
||||
/**
|
||||
* @ngdoc object
|
||||
* @name ngRoute.$routeProvider
|
||||
* @function
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* Used for configuring routes. See {@link ngRoute.$route $route} for an example.
|
||||
*
|
||||
* Requires the {@link ngRoute `ngRoute`} module to be installed.
|
||||
*/
|
||||
function $RouteProvider(){
|
||||
function inherit(parent, extra) {
|
||||
return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
|
||||
}
|
||||
|
||||
var routes = {};
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name ngRoute.$routeProvider#when
|
||||
* @methodOf ngRoute.$routeProvider
|
||||
*
|
||||
* @param {string} path Route path (matched against `$location.path`). If `$location.path`
|
||||
* contains redundant trailing slash or is missing one, the route will still match and the
|
||||
* `$location.path` will be updated to add or drop the trailing slash to exactly match the
|
||||
* route definition.
|
||||
*
|
||||
* * `path` can contain named groups starting with a colon (`:name`). All characters up
|
||||
* to the next slash are matched and stored in `$routeParams` under the given `name`
|
||||
* when the route matches.
|
||||
* * `path` can contain named groups starting with a colon and ending with a star (`:name*`).
|
||||
* All characters are eagerly stored in `$routeParams` under the given `name`
|
||||
* when the route matches.
|
||||
* * `path` can contain optional named groups with a question mark (`:name?`).
|
||||
*
|
||||
* For example, routes like `/color/:color/largecode/:largecode*\/edit` will match
|
||||
* `/color/brown/largecode/code/with/slashs/edit` and extract:
|
||||
*
|
||||
* * `color: brown`
|
||||
* * `largecode: code/with/slashs`.
|
||||
*
|
||||
*
|
||||
* @param {Object} route Mapping information to be assigned to `$route.current` on route
|
||||
* match.
|
||||
*
|
||||
* Object properties:
|
||||
*
|
||||
* - `controller` – `{(string|function()=}` – Controller fn that should be associated with
|
||||
* newly created scope or the name of a {@link angular.Module#controller registered
|
||||
* controller} if passed as a string.
|
||||
* - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be
|
||||
* published to scope under the `controllerAs` name.
|
||||
* - `template` – `{string=|function()=}` – html template as a string or a function that
|
||||
* returns an html template as a string which should be used by {@link
|
||||
* ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.
|
||||
* This property takes precedence over `templateUrl`.
|
||||
*
|
||||
* If `template` is a function, it will be called with the following parameters:
|
||||
*
|
||||
* - `{Array.<Object>}` - route parameters extracted from the current
|
||||
* `$location.path()` by applying the current route
|
||||
*
|
||||
* - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
|
||||
* template that should be used by {@link ngRoute.directive:ngView ngView}.
|
||||
*
|
||||
* If `templateUrl` is a function, it will be called with the following parameters:
|
||||
*
|
||||
* - `{Array.<Object>}` - route parameters extracted from the current
|
||||
* `$location.path()` by applying the current route
|
||||
*
|
||||
* - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should
|
||||
* be injected into the controller. If any of these dependencies are promises, the router
|
||||
* will wait for them all to be resolved or one to be rejected before the controller is
|
||||
* instantiated.
|
||||
* If all the promises are resolved successfully, the values of the resolved promises are
|
||||
* injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is
|
||||
* fired. If any of the promises are rejected the
|
||||
* {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object
|
||||
* is:
|
||||
*
|
||||
* - `key` – `{string}`: a name of a dependency to be injected into the controller.
|
||||
* - `factory` - `{string|function}`: If `string` then it is an alias for a service.
|
||||
* Otherwise if function, then it is {@link api/AUTO.$injector#invoke injected}
|
||||
* and the return value is treated as the dependency. If the result is a promise, it is
|
||||
* resolved before its value is injected into the controller. Be aware that
|
||||
* `ngRoute.$routeParams` will still refer to the previous route within these resolve
|
||||
* functions. Use `$route.current.params` to access the new route parameters, instead.
|
||||
*
|
||||
* - `redirectTo` – {(string|function())=} – value to update
|
||||
* {@link ng.$location $location} path with and trigger route redirection.
|
||||
*
|
||||
* If `redirectTo` is a function, it will be called with the following parameters:
|
||||
*
|
||||
* - `{Object.<string>}` - route parameters extracted from the current
|
||||
* `$location.path()` by applying the current route templateUrl.
|
||||
* - `{string}` - current `$location.path()`
|
||||
* - `{Object}` - current `$location.search()`
|
||||
*
|
||||
* The custom `redirectTo` function is expected to return a string which will be used
|
||||
* to update `$location.path()` and `$location.search()`.
|
||||
*
|
||||
* - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`
|
||||
* or `$location.hash()` changes.
|
||||
*
|
||||
* If the option is set to `false` and url in the browser changes, then
|
||||
* `$routeUpdate` event is broadcasted on the root scope.
|
||||
*
|
||||
* - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive
|
||||
*
|
||||
* If the option is set to `true`, then the particular route can be matched without being
|
||||
* case sensitive
|
||||
*
|
||||
* @returns {Object} self
|
||||
*
|
||||
* @description
|
||||
* Adds a new route definition to the `$route` service.
|
||||
*/
|
||||
this.when = function(path, route) {
|
||||
routes[path] = angular.extend(
|
||||
{reloadOnSearch: true},
|
||||
route,
|
||||
path && pathRegExp(path, route)
|
||||
);
|
||||
|
||||
// create redirection for trailing slashes
|
||||
if (path) {
|
||||
var redirectPath = (path[path.length-1] == '/')
|
||||
? path.substr(0, path.length-1)
|
||||
: path +'/';
|
||||
|
||||
routes[redirectPath] = angular.extend(
|
||||
{redirectTo: path},
|
||||
pathRegExp(redirectPath, route)
|
||||
);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param path {string} path
|
||||
* @param opts {Object} options
|
||||
* @return {?Object}
|
||||
*
|
||||
* @description
|
||||
* Normalizes the given path, returning a regular expression
|
||||
* and the original path.
|
||||
*
|
||||
* Inspired by pathRexp in visionmedia/express/lib/utils.js.
|
||||
*/
|
||||
function pathRegExp(path, opts) {
|
||||
var insensitive = opts.caseInsensitiveMatch,
|
||||
ret = {
|
||||
originalPath: path,
|
||||
regexp: path
|
||||
},
|
||||
keys = ret.keys = [];
|
||||
|
||||
path = path
|
||||
.replace(/([().])/g, '\\$1')
|
||||
.replace(/(\/)?:(\w+)([\?|\*])?/g, function(_, slash, key, option){
|
||||
var optional = option === '?' ? option : null;
|
||||
var star = option === '*' ? option : null;
|
||||
keys.push({ name: key, optional: !!optional });
|
||||
slash = slash || '';
|
||||
return ''
|
||||
+ (optional ? '' : slash)
|
||||
+ '(?:'
|
||||
+ (optional ? slash : '')
|
||||
+ (star && '(.+?)' || '([^/]+)')
|
||||
+ (optional || '')
|
||||
+ ')'
|
||||
+ (optional || '');
|
||||
})
|
||||
.replace(/([\/$\*])/g, '\\$1');
|
||||
|
||||
ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name ngRoute.$routeProvider#otherwise
|
||||
* @methodOf ngRoute.$routeProvider
|
||||
*
|
||||
* @description
|
||||
* Sets route definition that will be used on route change when no other route definition
|
||||
* is matched.
|
||||
*
|
||||
* @param {Object} params Mapping information to be assigned to `$route.current`.
|
||||
* @returns {Object} self
|
||||
*/
|
||||
this.otherwise = function(params) {
|
||||
this.when(null, params);
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
this.$get = ['$rootScope',
|
||||
'$location',
|
||||
'$routeParams',
|
||||
'$q',
|
||||
'$injector',
|
||||
'$http',
|
||||
'$templateCache',
|
||||
'$sce',
|
||||
function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) {
|
||||
|
||||
/**
|
||||
* @ngdoc object
|
||||
* @name ngRoute.$route
|
||||
* @requires $location
|
||||
* @requires $routeParams
|
||||
*
|
||||
* @property {Object} current Reference to the current route definition.
|
||||
* The route definition contains:
|
||||
*
|
||||
* - `controller`: The controller constructor as define in route definition.
|
||||
* - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
|
||||
* controller instantiation. The `locals` contain
|
||||
* the resolved values of the `resolve` map. Additionally the `locals` also contain:
|
||||
*
|
||||
* - `$scope` - The current route scope.
|
||||
* - `$template` - The current route template HTML.
|
||||
*
|
||||
* @property {Array.<Object>} routes Array of all configured routes.
|
||||
*
|
||||
* @description
|
||||
* `$route` is used for deep-linking URLs to controllers and views (HTML partials).
|
||||
* It watches `$location.url()` and tries to map the path to an existing route definition.
|
||||
*
|
||||
* Requires the {@link ngRoute `ngRoute`} module to be installed.
|
||||
*
|
||||
* You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.
|
||||
*
|
||||
* The `$route` service is typically used in conjunction with the
|
||||
* {@link ngRoute.directive:ngView `ngView`} directive and the
|
||||
* {@link ngRoute.$routeParams `$routeParams`} service.
|
||||
*
|
||||
* @example
|
||||
This example shows how changing the URL hash causes the `$route` to match a route against the
|
||||
URL, and the `ngView` pulls in the partial.
|
||||
|
||||
Note that this example is using {@link ng.directive:script inlined templates}
|
||||
to get it working on jsfiddle as well.
|
||||
|
||||
<example module="ngViewExample" deps="angular-route.js">
|
||||
<file name="index.html">
|
||||
<div ng-controller="MainCntl">
|
||||
Choose:
|
||||
<a href="Book/Moby">Moby</a> |
|
||||
<a href="Book/Moby/ch/1">Moby: Ch1</a> |
|
||||
<a href="Book/Gatsby">Gatsby</a> |
|
||||
<a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
|
||||
<a href="Book/Scarlet">Scarlet Letter</a><br/>
|
||||
|
||||
<div ng-view></div>
|
||||
<hr />
|
||||
|
||||
<pre>$location.path() = {{$location.path()}}</pre>
|
||||
<pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
|
||||
<pre>$route.current.params = {{$route.current.params}}</pre>
|
||||
<pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
|
||||
<pre>$routeParams = {{$routeParams}}</pre>
|
||||
</div>
|
||||
</file>
|
||||
|
||||
<file name="book.html">
|
||||
controller: {{name}}<br />
|
||||
Book Id: {{params.bookId}}<br />
|
||||
</file>
|
||||
|
||||
<file name="chapter.html">
|
||||
controller: {{name}}<br />
|
||||
Book Id: {{params.bookId}}<br />
|
||||
Chapter Id: {{params.chapterId}}
|
||||
</file>
|
||||
|
||||
<file name="script.js">
|
||||
angular.module('ngViewExample', ['ngRoute'])
|
||||
|
||||
.config(function($routeProvider, $locationProvider) {
|
||||
$routeProvider.when('/Book/:bookId', {
|
||||
templateUrl: 'book.html',
|
||||
controller: BookCntl,
|
||||
resolve: {
|
||||
// I will cause a 1 second delay
|
||||
delay: function($q, $timeout) {
|
||||
var delay = $q.defer();
|
||||
$timeout(delay.resolve, 1000);
|
||||
return delay.promise;
|
||||
}
|
||||
}
|
||||
});
|
||||
$routeProvider.when('/Book/:bookId/ch/:chapterId', {
|
||||
templateUrl: 'chapter.html',
|
||||
controller: ChapterCntl
|
||||
});
|
||||
|
||||
// configure html5 to get links working on jsfiddle
|
||||
$locationProvider.html5Mode(true);
|
||||
});
|
||||
|
||||
function MainCntl($scope, $route, $routeParams, $location) {
|
||||
$scope.$route = $route;
|
||||
$scope.$location = $location;
|
||||
$scope.$routeParams = $routeParams;
|
||||
}
|
||||
|
||||
function BookCntl($scope, $routeParams) {
|
||||
$scope.name = "BookCntl";
|
||||
$scope.params = $routeParams;
|
||||
}
|
||||
|
||||
function ChapterCntl($scope, $routeParams) {
|
||||
$scope.name = "ChapterCntl";
|
||||
$scope.params = $routeParams;
|
||||
}
|
||||
</file>
|
||||
|
||||
<file name="scenario.js">
|
||||
it('should load and compile correct template', function() {
|
||||
element('a:contains("Moby: Ch1")').click();
|
||||
var content = element('.doc-example-live [ng-view]').text();
|
||||
expect(content).toMatch(/controller\: ChapterCntl/);
|
||||
expect(content).toMatch(/Book Id\: Moby/);
|
||||
expect(content).toMatch(/Chapter Id\: 1/);
|
||||
|
||||
element('a:contains("Scarlet")').click();
|
||||
sleep(2); // promises are not part of scenario waiting
|
||||
content = element('.doc-example-live [ng-view]').text();
|
||||
expect(content).toMatch(/controller\: BookCntl/);
|
||||
expect(content).toMatch(/Book Id\: Scarlet/);
|
||||
});
|
||||
</file>
|
||||
</example>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc event
|
||||
* @name ngRoute.$route#$routeChangeStart
|
||||
* @eventOf ngRoute.$route
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
* Broadcasted before a route change. At this point the route services starts
|
||||
* resolving all of the dependencies needed for the route change to occurs.
|
||||
* Typically this involves fetching the view template as well as any dependencies
|
||||
* defined in `resolve` route property. Once all of the dependencies are resolved
|
||||
* `$routeChangeSuccess` is fired.
|
||||
*
|
||||
* @param {Object} angularEvent Synthetic event object.
|
||||
* @param {Route} next Future route information.
|
||||
* @param {Route} current Current route information.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc event
|
||||
* @name ngRoute.$route#$routeChangeSuccess
|
||||
* @eventOf ngRoute.$route
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
* Broadcasted after a route dependencies are resolved.
|
||||
* {@link ngRoute.directive:ngView ngView} listens for the directive
|
||||
* to instantiate the controller and render the view.
|
||||
*
|
||||
* @param {Object} angularEvent Synthetic event object.
|
||||
* @param {Route} current Current route information.
|
||||
* @param {Route|Undefined} previous Previous route information, or undefined if current is
|
||||
* first route entered.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc event
|
||||
* @name ngRoute.$route#$routeChangeError
|
||||
* @eventOf ngRoute.$route
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
* Broadcasted if any of the resolve promises are rejected.
|
||||
*
|
||||
* @param {Object} angularEvent Synthetic event object
|
||||
* @param {Route} current Current route information.
|
||||
* @param {Route} previous Previous route information.
|
||||
* @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc event
|
||||
* @name ngRoute.$route#$routeUpdate
|
||||
* @eventOf ngRoute.$route
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
*
|
||||
* The `reloadOnSearch` property has been set to false, and we are reusing the same
|
||||
* instance of the Controller.
|
||||
*/
|
||||
|
||||
var forceReload = false,
|
||||
$route = {
|
||||
routes: routes,
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name ngRoute.$route#reload
|
||||
* @methodOf ngRoute.$route
|
||||
*
|
||||
* @description
|
||||
* Causes `$route` service to reload the current route even if
|
||||
* {@link ng.$location $location} hasn't changed.
|
||||
*
|
||||
* As a result of that, {@link ngRoute.directive:ngView ngView}
|
||||
* creates new scope, reinstantiates the controller.
|
||||
*/
|
||||
reload: function() {
|
||||
forceReload = true;
|
||||
$rootScope.$evalAsync(updateRoute);
|
||||
}
|
||||
};
|
||||
|
||||
$rootScope.$on('$locationChangeSuccess', updateRoute);
|
||||
|
||||
return $route;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @param on {string} current url
|
||||
* @param route {Object} route regexp to match the url against
|
||||
* @return {?Object}
|
||||
*
|
||||
* @description
|
||||
* Check if the route matches the current url.
|
||||
*
|
||||
* Inspired by match in
|
||||
* visionmedia/express/lib/router/router.js.
|
||||
*/
|
||||
function switchRouteMatcher(on, route) {
|
||||
var keys = route.keys,
|
||||
params = {};
|
||||
|
||||
if (!route.regexp) return null;
|
||||
|
||||
var m = route.regexp.exec(on);
|
||||
if (!m) return null;
|
||||
|
||||
for (var i = 1, len = m.length; i < len; ++i) {
|
||||
var key = keys[i - 1];
|
||||
|
||||
var val = 'string' == typeof m[i]
|
||||
? decodeURIComponent(m[i])
|
||||
: m[i];
|
||||
|
||||
if (key && val) {
|
||||
params[key.name] = val;
|
||||
}
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
function updateRoute() {
|
||||
var next = parseRoute(),
|
||||
last = $route.current;
|
||||
|
||||
if (next && last && next.$$route === last.$$route
|
||||
&& angular.equals(next.pathParams, last.pathParams)
|
||||
&& !next.reloadOnSearch && !forceReload) {
|
||||
last.params = next.params;
|
||||
angular.copy(last.params, $routeParams);
|
||||
$rootScope.$broadcast('$routeUpdate', last);
|
||||
} else if (next || last) {
|
||||
forceReload = false;
|
||||
$rootScope.$broadcast('$routeChangeStart', next, last);
|
||||
$route.current = next;
|
||||
if (next) {
|
||||
if (next.redirectTo) {
|
||||
if (angular.isString(next.redirectTo)) {
|
||||
$location.path(interpolate(next.redirectTo, next.params)).search(next.params)
|
||||
.replace();
|
||||
} else {
|
||||
$location.url(next.redirectTo(next.pathParams, $location.path(), $location.search()))
|
||||
.replace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$q.when(next).
|
||||
then(function() {
|
||||
if (next) {
|
||||
var locals = angular.extend({}, next.resolve),
|
||||
template, templateUrl;
|
||||
|
||||
angular.forEach(locals, function(value, key) {
|
||||
locals[key] = angular.isString(value) ?
|
||||
$injector.get(value) : $injector.invoke(value);
|
||||
});
|
||||
|
||||
if (angular.isDefined(template = next.template)) {
|
||||
if (angular.isFunction(template)) {
|
||||
template = template(next.params);
|
||||
}
|
||||
} else if (angular.isDefined(templateUrl = next.templateUrl)) {
|
||||
if (angular.isFunction(templateUrl)) {
|
||||
templateUrl = templateUrl(next.params);
|
||||
}
|
||||
templateUrl = $sce.getTrustedResourceUrl(templateUrl);
|
||||
if (angular.isDefined(templateUrl)) {
|
||||
next.loadedTemplateUrl = templateUrl;
|
||||
template = $http.get(templateUrl, {cache: $templateCache}).
|
||||
then(function(response) { return response.data; });
|
||||
}
|
||||
}
|
||||
if (angular.isDefined(template)) {
|
||||
locals['$template'] = template;
|
||||
}
|
||||
return $q.all(locals);
|
||||
}
|
||||
}).
|
||||
// after route change
|
||||
then(function(locals) {
|
||||
if (next == $route.current) {
|
||||
if (next) {
|
||||
next.locals = locals;
|
||||
angular.copy(next.params, $routeParams);
|
||||
}
|
||||
$rootScope.$broadcast('$routeChangeSuccess', next, last);
|
||||
}
|
||||
}, function(error) {
|
||||
if (next == $route.current) {
|
||||
$rootScope.$broadcast('$routeChangeError', next, last, error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @returns the current active route, by matching it against the URL
|
||||
*/
|
||||
function parseRoute() {
|
||||
// Match a route
|
||||
var params, match;
|
||||
angular.forEach(routes, function(route, path) {
|
||||
if (!match && (params = switchRouteMatcher($location.path(), route))) {
|
||||
match = inherit(route, {
|
||||
params: angular.extend({}, $location.search(), params),
|
||||
pathParams: params});
|
||||
match.$$route = route;
|
||||
}
|
||||
});
|
||||
// No route matched; fallback to "otherwise" route
|
||||
return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns interpolation of the redirect path with the parameters
|
||||
*/
|
||||
function interpolate(string, params) {
|
||||
var result = [];
|
||||
angular.forEach((string||'').split(':'), function(segment, i) {
|
||||
if (i === 0) {
|
||||
result.push(segment);
|
||||
} else {
|
||||
var segmentMatch = segment.match(/(\w+)(.*)/);
|
||||
var key = segmentMatch[1];
|
||||
result.push(params[key]);
|
||||
result.push(segmentMatch[2] || '');
|
||||
delete params[key];
|
||||
}
|
||||
});
|
||||
return result.join('');
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
ngRouteModule.provider('$routeParams', $RouteParamsProvider);
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc object
|
||||
* @name ngRoute.$routeParams
|
||||
* @requires $route
|
||||
*
|
||||
* @description
|
||||
* The `$routeParams` service allows you to retrieve the current set of route parameters.
|
||||
*
|
||||
* Requires the {@link ngRoute `ngRoute`} module to be installed.
|
||||
*
|
||||
* The route parameters are a combination of {@link ng.$location `$location`}'s
|
||||
* {@link ng.$location#methods_search `search()`} and {@link ng.$location#methods_path `path()`}.
|
||||
* The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched.
|
||||
*
|
||||
* In case of parameter name collision, `path` params take precedence over `search` params.
|
||||
*
|
||||
* The service guarantees that the identity of the `$routeParams` object will remain unchanged
|
||||
* (but its properties will likely change) even when a route change occurs.
|
||||
*
|
||||
* Note that the `$routeParams` are only updated *after* a route change completes successfully.
|
||||
* This means that you cannot rely on `$routeParams` being correct in route resolve functions.
|
||||
* Instead you can use `$route.current.params` to access the new route's parameters.
|
||||
*
|
||||
* @example
|
||||
* <pre>
|
||||
* // Given:
|
||||
* // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
|
||||
* // Route: /Chapter/:chapterId/Section/:sectionId
|
||||
* //
|
||||
* // Then
|
||||
* $routeParams ==> {chapterId:1, sectionId:2, search:'moby'}
|
||||
* </pre>
|
||||
*/
|
||||
function $RouteParamsProvider() {
|
||||
this.$get = function() { return {}; };
|
||||
}
|
||||
|
||||
ngRouteModule.directive('ngView', ngViewFactory);
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name ngRoute.directive:ngView
|
||||
* @restrict ECA
|
||||
*
|
||||
* @description
|
||||
* # Overview
|
||||
* `ngView` is a directive that complements the {@link ngRoute.$route $route} service by
|
||||
* including the rendered template of the current route into the main layout (`index.html`) file.
|
||||
* Every time the current route changes, the included view changes with it according to the
|
||||
* configuration of the `$route` service.
|
||||
*
|
||||
* Requires the {@link ngRoute `ngRoute`} module to be installed.
|
||||
*
|
||||
* @animations
|
||||
* enter - animation is used to bring new content into the browser.
|
||||
* leave - animation is used to animate existing content away.
|
||||
*
|
||||
* The enter and leave animation occur concurrently.
|
||||
*
|
||||
* @scope
|
||||
* @priority 400
|
||||
* @example
|
||||
<example module="ngViewExample" deps="angular-route.js" animations="true">
|
||||
<file name="index.html">
|
||||
<div ng-controller="MainCntl as main">
|
||||
Choose:
|
||||
<a href="Book/Moby">Moby</a> |
|
||||
<a href="Book/Moby/ch/1">Moby: Ch1</a> |
|
||||
<a href="Book/Gatsby">Gatsby</a> |
|
||||
<a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
|
||||
<a href="Book/Scarlet">Scarlet Letter</a><br/>
|
||||
|
||||
<div class="view-animate-container">
|
||||
<div ng-view class="view-animate"></div>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<pre>$location.path() = {{main.$location.path()}}</pre>
|
||||
<pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>
|
||||
<pre>$route.current.params = {{main.$route.current.params}}</pre>
|
||||
<pre>$route.current.scope.name = {{main.$route.current.scope.name}}</pre>
|
||||
<pre>$routeParams = {{main.$routeParams}}</pre>
|
||||
</div>
|
||||
</file>
|
||||
|
||||
<file name="book.html">
|
||||
<div>
|
||||
controller: {{book.name}}<br />
|
||||
Book Id: {{book.params.bookId}}<br />
|
||||
</div>
|
||||
</file>
|
||||
|
||||
<file name="chapter.html">
|
||||
<div>
|
||||
controller: {{chapter.name}}<br />
|
||||
Book Id: {{chapter.params.bookId}}<br />
|
||||
Chapter Id: {{chapter.params.chapterId}}
|
||||
</div>
|
||||
</file>
|
||||
|
||||
<file name="animations.css">
|
||||
.view-animate-container {
|
||||
position:relative;
|
||||
height:100px!important;
|
||||
position:relative;
|
||||
background:white;
|
||||
border:1px solid black;
|
||||
height:40px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.view-animate {
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.view-animate.ng-enter, .view-animate.ng-leave {
|
||||
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
|
||||
transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
|
||||
|
||||
display:block;
|
||||
width:100%;
|
||||
border-left:1px solid black;
|
||||
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
.view-animate.ng-enter {
|
||||
left:100%;
|
||||
}
|
||||
.view-animate.ng-enter.ng-enter-active {
|
||||
left:0;
|
||||
}
|
||||
.view-animate.ng-leave.ng-leave-active {
|
||||
left:-100%;
|
||||
}
|
||||
</file>
|
||||
|
||||
<file name="script.js">
|
||||
angular.module('ngViewExample', ['ngRoute', 'ngAnimate'],
|
||||
function($routeProvider, $locationProvider) {
|
||||
$routeProvider.when('/Book/:bookId', {
|
||||
templateUrl: 'book.html',
|
||||
controller: BookCntl,
|
||||
controllerAs: 'book'
|
||||
});
|
||||
$routeProvider.when('/Book/:bookId/ch/:chapterId', {
|
||||
templateUrl: 'chapter.html',
|
||||
controller: ChapterCntl,
|
||||
controllerAs: 'chapter'
|
||||
});
|
||||
|
||||
// configure html5 to get links working on jsfiddle
|
||||
$locationProvider.html5Mode(true);
|
||||
});
|
||||
|
||||
function MainCntl($route, $routeParams, $location) {
|
||||
this.$route = $route;
|
||||
this.$location = $location;
|
||||
this.$routeParams = $routeParams;
|
||||
}
|
||||
|
||||
function BookCntl($routeParams) {
|
||||
this.name = "BookCntl";
|
||||
this.params = $routeParams;
|
||||
}
|
||||
|
||||
function ChapterCntl($routeParams) {
|
||||
this.name = "ChapterCntl";
|
||||
this.params = $routeParams;
|
||||
}
|
||||
</file>
|
||||
|
||||
<file name="scenario.js">
|
||||
it('should load and compile correct template', function() {
|
||||
element('a:contains("Moby: Ch1")').click();
|
||||
var content = element('.doc-example-live [ng-view]').text();
|
||||
expect(content).toMatch(/controller\: ChapterCntl/);
|
||||
expect(content).toMatch(/Book Id\: Moby/);
|
||||
expect(content).toMatch(/Chapter Id\: 1/);
|
||||
|
||||
element('a:contains("Scarlet")').click();
|
||||
content = element('.doc-example-live [ng-view]').text();
|
||||
expect(content).toMatch(/controller\: BookCntl/);
|
||||
expect(content).toMatch(/Book Id\: Scarlet/);
|
||||
});
|
||||
</file>
|
||||
</example>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc event
|
||||
* @name ngRoute.directive:ngView#$viewContentLoaded
|
||||
* @eventOf ngRoute.directive:ngView
|
||||
* @eventType emit on the current ngView scope
|
||||
* @description
|
||||
* Emitted every time the ngView content is reloaded.
|
||||
*/
|
||||
ngViewFactory.$inject = ['$route', '$anchorScroll', '$compile', '$controller', '$animate'];
|
||||
function ngViewFactory( $route, $anchorScroll, $compile, $controller, $animate) {
|
||||
return {
|
||||
restrict: 'ECA',
|
||||
terminal: true,
|
||||
priority: 400,
|
||||
transclude: 'element',
|
||||
compile: function(element, attr, linker) {
|
||||
return function(scope, $element, attr) {
|
||||
var currentScope,
|
||||
currentElement,
|
||||
autoScrollExp = attr.autoscroll,
|
||||
onloadExp = attr.onload || '';
|
||||
|
||||
scope.$on('$routeChangeSuccess', update);
|
||||
update();
|
||||
|
||||
function cleanupLastView() {
|
||||
if (currentScope) {
|
||||
currentScope.$destroy();
|
||||
currentScope = null;
|
||||
}
|
||||
if(currentElement) {
|
||||
$animate.leave(currentElement);
|
||||
currentElement = null;
|
||||
}
|
||||
}
|
||||
|
||||
function update() {
|
||||
var locals = $route.current && $route.current.locals,
|
||||
template = locals && locals.$template;
|
||||
|
||||
if (template) {
|
||||
var newScope = scope.$new();
|
||||
linker(newScope, function(clone) {
|
||||
clone.html(template);
|
||||
$animate.enter(clone, null, currentElement || $element, function onNgViewEnter () {
|
||||
if (angular.isDefined(autoScrollExp)
|
||||
&& (!autoScrollExp || scope.$eval(autoScrollExp))) {
|
||||
$anchorScroll();
|
||||
}
|
||||
});
|
||||
|
||||
cleanupLastView();
|
||||
|
||||
var link = $compile(clone.contents()),
|
||||
current = $route.current;
|
||||
|
||||
currentScope = current.scope = newScope;
|
||||
currentElement = clone;
|
||||
|
||||
if (current.controller) {
|
||||
locals.$scope = currentScope;
|
||||
var controller = $controller(current.controller, locals);
|
||||
if (current.controllerAs) {
|
||||
currentScope[current.controllerAs] = controller;
|
||||
}
|
||||
clone.data('$ngControllerController', controller);
|
||||
clone.children().data('$ngControllerController', controller);
|
||||
}
|
||||
|
||||
link(currentScope);
|
||||
currentScope.$emit('$viewContentLoaded');
|
||||
currentScope.$eval(onloadExp);
|
||||
});
|
||||
} else {
|
||||
cleanupLastView();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
})(window, window.angular);
|
20031
public/js/lib/angular.js
vendored
20031
public/js/lib/angular.js
vendored
File diff suppressed because it is too large
Load Diff
@ -1,928 +0,0 @@
|
||||
/*!
|
||||
* Jasny Bootstrap v3.0.1-p7, maintained by @ArnoldDaniels
|
||||
* Copyright 2013 Twitter, Inc
|
||||
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: offcanvas.js v3.0.0-p7
|
||||
* http://jasny.github.io/bootstrap/javascript.html#offcanvas
|
||||
*
|
||||
* Based on Boostrap collapse.js by Twitter, Inc.
|
||||
* ========================================================================
|
||||
* Copyright 2013 Jasny, BV.
|
||||
*
|
||||
* 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 ($) { "use strict";
|
||||
|
||||
// OFFCANVAS PUBLIC CLASS DEFINITION
|
||||
// ================================
|
||||
|
||||
var OffCanvas = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.$canvas = options.canvas ? $(options.canvas) : this.$element
|
||||
this.options = $.extend({}, OffCanvas.DEFAULTS, options)
|
||||
this.transitioning = null
|
||||
|
||||
this.calcTransform()
|
||||
|
||||
// If transform or transition aren't supported just slide the element
|
||||
if (!this.transform) this.$canvas = this.$element
|
||||
|
||||
if (this.options.placement === 'auto')
|
||||
this.options.placement = this.calcPlacement()
|
||||
|
||||
if (this.options.recalc) {
|
||||
this.calcClone()
|
||||
$(window).on('resize.bs.offcanvas', $.proxy(this.recalc, this))
|
||||
}
|
||||
|
||||
if (this.options.autohide)
|
||||
$(document).on('click.bs.offcanvas', $.proxy(this.autohide, this))
|
||||
|
||||
// Workaround: IE doesn't move fixed elements with translate
|
||||
var isIE = window.navigator.appName == 'Microsoft Internet Explorer'
|
||||
if (isIE && this.$canvas !== this.$element) {
|
||||
var elems = this.$canvas.find('*').filter(function() {
|
||||
return $(this).css("position") === 'fixed'
|
||||
})
|
||||
this.$canvas = this.$canvas.add(elems)
|
||||
}
|
||||
|
||||
if (this.options.toggle) this.toggle()
|
||||
}
|
||||
|
||||
OffCanvas.DEFAULTS = {
|
||||
toggle: true,
|
||||
placement: 'auto',
|
||||
autohide: true,
|
||||
recalc: true
|
||||
}
|
||||
|
||||
OffCanvas.prototype.calcTransform = function() {
|
||||
this.transform = false
|
||||
|
||||
// Don't use transform with jQuery animations just to move the element
|
||||
if (!$.support.transition && this.$canvas === this.$element) return
|
||||
|
||||
var $el = $('<div style="visibility: hidden"></div>'),
|
||||
props = {
|
||||
'transform':'transform',
|
||||
'webkitTransform':'-webkit-transform',
|
||||
'OTransform':'-o-transform',
|
||||
'msTransform':'-ms-transform',
|
||||
'MozTransform':'-moz-transform'
|
||||
}
|
||||
|
||||
// Add it to the body to get the computed style.
|
||||
$el.appendTo($('body'))
|
||||
|
||||
for (var prop in props) {
|
||||
if ($el[0].style[prop] === undefined) continue
|
||||
|
||||
$el[0].style[prop] = "translate3d(1px,1px,1px)"
|
||||
var m = window.getComputedStyle($el[0]).getPropertyValue(props[prop])
|
||||
this.transform = props[prop]
|
||||
this.translate = m.match(/^matrix3d/) ? 'translate3d' : 'translate'
|
||||
break
|
||||
}
|
||||
|
||||
$el.remove()
|
||||
}
|
||||
|
||||
OffCanvas.prototype.calcPlacement = function () {
|
||||
var horizontal = $(window).width() / this.$element.width(),
|
||||
vertical = $(window).height() / this.$element.height(),
|
||||
$element = this.$element
|
||||
|
||||
function ab(a, b) {
|
||||
if ($element.css(b) === 'auto') return a
|
||||
if ($element.css(a) === 'auto') return b
|
||||
|
||||
var size_a = parseInt($element.css(a), 10),
|
||||
size_b = parseInt($element.css(b), 10)
|
||||
|
||||
return size_a > size_b ? b : a
|
||||
}
|
||||
|
||||
return horizontal > vertical ? ab('left', 'right') : ab('top', 'bottom')
|
||||
}
|
||||
|
||||
OffCanvas.prototype.offset = function () {
|
||||
switch (this.options.placement) {
|
||||
case 'left':
|
||||
case 'right': return this.$element.outerWidth()
|
||||
case 'top':
|
||||
case 'bottom': return this.$element.outerHeight()
|
||||
}
|
||||
}
|
||||
|
||||
OffCanvas.prototype.slideTransform = function (offset, callback) {
|
||||
var placement = this.options.placement,
|
||||
prop = this.transform
|
||||
|
||||
offset *= (placement === 'right' || placement === 'bottom' ? -1 : 1)
|
||||
|
||||
var css = placement === 'left' || placement === 'right' ?
|
||||
"{}px, 0" : "0, {}px"
|
||||
if (this.translate === 'translate3d') css += ', 0'
|
||||
css = this.translate + "(" + css + ")"
|
||||
|
||||
// Use jQuery animation if CSS transitions aren't supported
|
||||
if (!$.support.transition) {
|
||||
return this.$canvas.animate({ borderSpacing: offset }, {
|
||||
step: function(now, fx) {
|
||||
$(this).css(prop, css.replace('{}', now))
|
||||
},
|
||||
complete: callback,
|
||||
duration: 350
|
||||
})
|
||||
}
|
||||
|
||||
this.$canvas.css(prop, css.replace('{}', offset))
|
||||
|
||||
this.$element
|
||||
.one($.support.transition.end, callback)
|
||||
.emulateTransitionEnd(350)
|
||||
}
|
||||
|
||||
OffCanvas.prototype.slidePosition = function (offset, callback) {
|
||||
// Use jQuery animation if CSS transitions aren't supported
|
||||
if (!$.support.transition) {
|
||||
var anim = {}
|
||||
anim[this.options.placement] = offset
|
||||
return this.$canvas.animate(anim, 350, callback)
|
||||
}
|
||||
|
||||
this.$canvas.css(this.options.placement, offset)
|
||||
|
||||
this.$element
|
||||
.one($.support.transition.end, callback)
|
||||
.emulateTransitionEnd(350)
|
||||
}
|
||||
|
||||
OffCanvas.prototype.show = function () {
|
||||
if (this.transitioning || this.$canvas.hasClass('canvas-slid')) return
|
||||
|
||||
var startEvent = $.Event('show.bs.offcanvas')
|
||||
this.$element.trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) return
|
||||
|
||||
var complete = function () {
|
||||
this.$canvas
|
||||
.addClass('canvas-slid')
|
||||
.removeClass('canvas-sliding')
|
||||
|
||||
this.transitioning = 0
|
||||
this.$element.trigger('shown.bs.offcanvas')
|
||||
}
|
||||
|
||||
if (!this.$element.is(':visible') || !this.transform)
|
||||
this.$element.css(this.options.placement, -1 * this.offset() + "px")
|
||||
this.$element.addClass('in')
|
||||
|
||||
this.$canvas.addClass('canvas-sliding')
|
||||
if (this.$canvas != this.$element) $('body').css('overflow-x', 'hidden')
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
if (this.transform) this.slideTransform(this.offset(), $.proxy(complete, this))
|
||||
else this.slidePosition(0, $.proxy(complete, this))
|
||||
}
|
||||
|
||||
OffCanvas.prototype.hide = function (fast) {
|
||||
if (this.transitioning || !this.$canvas.hasClass('canvas-slid')) return
|
||||
|
||||
var startEvent = $.Event('hide.bs.offcanvas')
|
||||
this.$element.trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) return
|
||||
|
||||
var complete = function () {
|
||||
this.transitioning = 0
|
||||
|
||||
this.$element
|
||||
.removeClass('in')
|
||||
.css('left', '').css('right', '').css('top', '').css('bottom', '')
|
||||
|
||||
this.$canvas
|
||||
.removeClass('canvas-sliding canvas-slid')
|
||||
.css('transform', '')
|
||||
|
||||
$('body').css('overflow-x', '')
|
||||
|
||||
this.$element.trigger('hidden.bs.offcanvas')
|
||||
}
|
||||
|
||||
if (fast) return complete.call(this)
|
||||
|
||||
this.$canvas.removeClass('canvas-slid').addClass('canvas-sliding')
|
||||
|
||||
this.transitioning = 1
|
||||
|
||||
if (this.transform) this.slideTransform(0, $.proxy(complete, this))
|
||||
else this.slidePosition(-1 * this.offset(), $.proxy(complete, this))
|
||||
}
|
||||
|
||||
OffCanvas.prototype.toggle = function () {
|
||||
this[this.$canvas.hasClass('canvas-slid') ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
OffCanvas.prototype.calcClone = function() {
|
||||
this.$calcClone = this.$element.clone()
|
||||
.html('')
|
||||
.addClass('offcanvas-clone').removeClass('in')
|
||||
.appendTo($('body'))
|
||||
}
|
||||
|
||||
OffCanvas.prototype.recalc = function () {
|
||||
if (this.$calcClone.css('display') !== 'none') this.hide(true)
|
||||
}
|
||||
|
||||
OffCanvas.prototype.autohide = function (e) {
|
||||
if ($(e.target).closest(this.$element).length === 0) this.hide()
|
||||
}
|
||||
|
||||
// OFFCANVAS PLUGIN DEFINITION
|
||||
// ==========================
|
||||
|
||||
var old = $.fn.offcanvas
|
||||
|
||||
$.fn.offcanvas = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.offcanvas')
|
||||
var options = $.extend({}, OffCanvas.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
|
||||
if (!data) $this.data('bs.offcanvas', (data = new OffCanvas(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.offcanvas.Constructor = OffCanvas
|
||||
|
||||
|
||||
// OFFCANVAS NO CONFLICT
|
||||
// ====================
|
||||
|
||||
$.fn.offcanvas.noConflict = function () {
|
||||
$.fn.offcanvas = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// OFFCANVAS DATA-API
|
||||
// =================
|
||||
|
||||
$(document).on('click.bs.offcanvas.data-api', '[data-toggle=offcanvas]', function (e) {
|
||||
var $this = $(this), href
|
||||
var target = $this.attr('data-target')
|
||||
|| e.preventDefault()
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
||||
var $canvas = $(target)
|
||||
var data = $canvas.data('bs.offcanvas')
|
||||
var option = data ? 'toggle' : $this.data()
|
||||
|
||||
e.stopPropagation()
|
||||
|
||||
if (data) data.toggle()
|
||||
else $canvas.offcanvas(option)
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
/* ============================================================
|
||||
* Bootstrap: rowlink.js v3.0.0-p7
|
||||
* http://jasny.github.io/bootstrap/javascript.html#rowlink
|
||||
* ============================================================
|
||||
* Copyright 2012 Jasny BV, Netherlands.
|
||||
*
|
||||
* 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 ($) { "use strict";
|
||||
|
||||
var Rowlink = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, Rowlink.DEFAULTS, options)
|
||||
|
||||
this.$element.on('click.bs.rowlink', 'td:not(.rowlink-skip)', $.proxy(this.click, this))
|
||||
}
|
||||
|
||||
Rowlink.DEFAULTS = {
|
||||
target: "a"
|
||||
}
|
||||
|
||||
Rowlink.prototype.click = function(e) {
|
||||
var target = $(e.currentTarget).closest('tr').find(this.options.target)[0]
|
||||
if ($(e.target)[0] === target) return
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if (target.click) {
|
||||
target.click()
|
||||
} else if(document.createEvent) {
|
||||
var evt = document.createEvent("MouseEvents");
|
||||
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
target.dispatchEvent(evt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ROWLINK PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
$.fn.rowlink = function (options) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('rowlink')
|
||||
if (!data) $this.data('rowlink', (data = new Rowlink(this, options)))
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.rowlink.Constructor = Rowlink
|
||||
|
||||
|
||||
// ROWLINK NO CONFLICT
|
||||
// ====================
|
||||
|
||||
$.fn.rowlink.noConflict = function () {
|
||||
$.fn.inputmask = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// ROWLINK DATA-API
|
||||
// ==================
|
||||
|
||||
$(document).on('click.bs.rowlink.data-api', '[data-link="row"]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('rowlink')) return
|
||||
$this.rowlink($this.data())
|
||||
$(e.target).trigger('click.bs.rowlink')
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
/* ===========================================================
|
||||
* Bootstrap: inputmask.js v3.0.0-p7
|
||||
* http://jasny.github.io/bootstrap/javascript.html#inputmask
|
||||
* Based on Masked Input plugin by Josh Bush (digitalbush.com)
|
||||
* ===========================================================
|
||||
* Copyright 2012 Jasny BV, Netherlands.
|
||||
*
|
||||
* 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 ($) { "use strict";
|
||||
|
||||
var isIphone = (window.orientation !== undefined)
|
||||
var isAndroid = navigator.userAgent.toLowerCase().indexOf("android") > -1
|
||||
var isIE = window.navigator.appName == 'Microsoft Internet Explorer'
|
||||
|
||||
// INPUTMASK PUBLIC CLASS DEFINITION
|
||||
// =================================
|
||||
|
||||
var Inputmask = function (element, options) {
|
||||
if (isAndroid) return // No support because caret positioning doesn't work on Android
|
||||
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, Inputmask.DEFAULS, options)
|
||||
this.mask = String(this.options.mask)
|
||||
|
||||
this.init()
|
||||
this.listen()
|
||||
|
||||
this.checkVal() //Perform initial check for existing values
|
||||
}
|
||||
|
||||
Inputmask.DEFAULS = {
|
||||
mask: "",
|
||||
placeholder: "_",
|
||||
definitions: {
|
||||
'9': "[0-9]",
|
||||
'a': "[A-Za-z]",
|
||||
'?': "[A-Za-z0-9]",
|
||||
'*': "."
|
||||
}
|
||||
}
|
||||
|
||||
Inputmask.prototype.init = function() {
|
||||
var defs = this.options.definitions
|
||||
var len = this.mask.length
|
||||
|
||||
this.tests = []
|
||||
this.partialPosition = this.mask.length
|
||||
this.firstNonMaskPos = null
|
||||
|
||||
$.each(this.mask.split(""), $.proxy(function(i, c) {
|
||||
if (c == '?') {
|
||||
len--
|
||||
this.partialPosition = i
|
||||
} else if (defs[c]) {
|
||||
this.tests.push(new RegExp(defs[c]))
|
||||
if(this.firstNonMaskPos === null)
|
||||
this.firstNonMaskPos = this.tests.length - 1
|
||||
} else {
|
||||
this.tests.push(null)
|
||||
}
|
||||
}, this))
|
||||
|
||||
this.buffer = $.map(this.mask.split(""), $.proxy(function(c, i) {
|
||||
if (c != '?') return defs[c] ? this.options.placeholder : c
|
||||
}, this))
|
||||
|
||||
this.focusText = this.$element.val()
|
||||
|
||||
this.$element.data("rawMaskFn", $.proxy(function() {
|
||||
return $.map(this.buffer, function(c, i) {
|
||||
return this.tests[i] && c != this.options.placeholder ? c : null
|
||||
}).join('')
|
||||
}, this))
|
||||
}
|
||||
|
||||
Inputmask.prototype.listen = function() {
|
||||
if (this.$element.attr("readonly")) return
|
||||
|
||||
var pasteEventName = (isIE ? 'paste' : 'input') + ".mask"
|
||||
|
||||
this.$element
|
||||
.on("unmask.bs.inputmask", $.proxy(this.unmask, this))
|
||||
|
||||
.on("focus.bs.inputmask", $.proxy(this.focusEvent, this))
|
||||
.on("blur.bs.inputmask", $.proxy(this.blurEvent, this))
|
||||
|
||||
.on("keydown.bs.inputmask", $.proxy(this.keydownEvent, this))
|
||||
.on("keypress.bs.inputmask", $.proxy(this.keypressEvent, this))
|
||||
|
||||
.on(pasteEventName, $.proxy(this.pasteEvent, this))
|
||||
}
|
||||
|
||||
//Helper Function for Caret positioning
|
||||
Inputmask.prototype.caret = function(begin, end) {
|
||||
if (this.$element.length === 0) return
|
||||
if (typeof begin == 'number') {
|
||||
end = (typeof end == 'number') ? end : begin
|
||||
return this.$element.each(function() {
|
||||
if (this.setSelectionRange) {
|
||||
this.setSelectionRange(begin, end)
|
||||
} else if (this.createTextRange) {
|
||||
var range = this.createTextRange()
|
||||
range.collapse(true)
|
||||
range.moveEnd('character', end)
|
||||
range.moveStart('character', begin)
|
||||
range.select()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (this.$element[0].setSelectionRange) {
|
||||
begin = this.$element[0].selectionStart
|
||||
end = this.$element[0].selectionEnd
|
||||
} else if (document.selection && document.selection.createRange) {
|
||||
var range = document.selection.createRange()
|
||||
begin = 0 - range.duplicate().moveStart('character', -100000)
|
||||
end = begin + range.text.length
|
||||
}
|
||||
return {
|
||||
begin: begin,
|
||||
end: end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Inputmask.prototype.seekNext = function(pos) {
|
||||
var len = this.mask.length
|
||||
while (++pos <= len && !this.tests[pos]);
|
||||
|
||||
return pos
|
||||
}
|
||||
|
||||
Inputmask.prototype.seekPrev = function(pos) {
|
||||
while (--pos >= 0 && !this.tests[pos]);
|
||||
|
||||
return pos
|
||||
}
|
||||
|
||||
Inputmask.prototype.shiftL = function(begin,end) {
|
||||
var len = this.mask.length
|
||||
|
||||
if(begin<0) return
|
||||
|
||||
for (var i = begin,j = this.seekNext(end); i < len; i++) {
|
||||
if (this.tests[i]) {
|
||||
if (j < len && this.tests[i].test(this.buffer[j])) {
|
||||
this.buffer[i] = this.buffer[j]
|
||||
this.buffer[j] = this.options.placeholder
|
||||
} else
|
||||
break
|
||||
j = this.seekNext(j)
|
||||
}
|
||||
}
|
||||
this.writeBuffer()
|
||||
this.caret(Math.max(this.firstNonMaskPos, begin))
|
||||
}
|
||||
|
||||
Inputmask.prototype.shiftR = function(pos) {
|
||||
var len = this.mask.length
|
||||
|
||||
for (var i = pos, c = this.options.placeholder; i < len; i++) {
|
||||
if (this.tests[i]) {
|
||||
var j = this.seekNext(i)
|
||||
var t = this.buffer[i]
|
||||
this.buffer[i] = c
|
||||
if (j < len && this.tests[j].test(t))
|
||||
c = t
|
||||
else
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Inputmask.prototype.unmask = function() {
|
||||
this.$element
|
||||
.unbind(".mask")
|
||||
.removeData("inputmask")
|
||||
}
|
||||
|
||||
Inputmask.prototype.focusEvent = function() {
|
||||
this.focusText = this.$element.val()
|
||||
var len = this.mask.length
|
||||
var pos = this.checkVal()
|
||||
this.writeBuffer()
|
||||
|
||||
var that = this
|
||||
var moveCaret = function() {
|
||||
if (pos == len)
|
||||
that.caret(0, pos)
|
||||
else
|
||||
that.caret(pos)
|
||||
}
|
||||
|
||||
moveCaret()
|
||||
setTimeout(moveCaret, 50)
|
||||
}
|
||||
|
||||
Inputmask.prototype.blurEvent = function() {
|
||||
this.checkVal()
|
||||
if (this.$element.val() !== this.focusText)
|
||||
this.$element.trigger('change')
|
||||
}
|
||||
|
||||
Inputmask.prototype.keydownEvent = function(e) {
|
||||
var k=e.which
|
||||
|
||||
//backspace, delete, and escape get special treatment
|
||||
if (k == 8 || k == 46 || (isIphone && k == 127)) {
|
||||
var pos = this.caret(),
|
||||
begin = pos.begin,
|
||||
end = pos.end
|
||||
|
||||
if (end-begin === 0) {
|
||||
begin = k!=46 ? this.seekPrev(begin) : (end=this.seekNext(begin-1))
|
||||
end = k==46 ? this.seekNext(end) : end
|
||||
}
|
||||
this.clearBuffer(begin, end)
|
||||
this.shiftL(begin,end-1)
|
||||
|
||||
return false
|
||||
} else if (k == 27) {//escape
|
||||
this.$element.val(this.focusText)
|
||||
this.caret(0, this.checkVal())
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Inputmask.prototype.keypressEvent = function(e) {
|
||||
var len = this.mask.length
|
||||
|
||||
var k = e.which,
|
||||
pos = this.caret()
|
||||
|
||||
if (e.ctrlKey || e.altKey || e.metaKey || k<32) {//Ignore
|
||||
return true
|
||||
} else if (k) {
|
||||
if (pos.end - pos.begin !== 0) {
|
||||
this.clearBuffer(pos.begin, pos.end)
|
||||
this.shiftL(pos.begin, pos.end-1)
|
||||
}
|
||||
|
||||
var p = this.seekNext(pos.begin - 1)
|
||||
if (p < len) {
|
||||
var c = String.fromCharCode(k)
|
||||
if (this.tests[p].test(c)) {
|
||||
this.shiftR(p)
|
||||
this.buffer[p] = c
|
||||
this.writeBuffer()
|
||||
var next = this.seekNext(p)
|
||||
this.caret(next)
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Inputmask.prototype.pasteEvent = function() {
|
||||
var that = this
|
||||
|
||||
setTimeout(function() {
|
||||
that.caret(that.checkVal(true))
|
||||
}, 0)
|
||||
}
|
||||
|
||||
Inputmask.prototype.clearBuffer = function(start, end) {
|
||||
var len = this.mask.length
|
||||
|
||||
for (var i = start; i < end && i < len; i++) {
|
||||
if (this.tests[i])
|
||||
this.buffer[i] = this.options.placeholder
|
||||
}
|
||||
}
|
||||
|
||||
Inputmask.prototype.writeBuffer = function() {
|
||||
return this.$element.val(this.buffer.join('')).val()
|
||||
}
|
||||
|
||||
Inputmask.prototype.checkVal = function(allow) {
|
||||
var len = this.mask.length
|
||||
//try to place characters where they belong
|
||||
var test = this.$element.val()
|
||||
var lastMatch = -1
|
||||
|
||||
for (var i = 0, pos = 0; i < len; i++) {
|
||||
if (this.tests[i]) {
|
||||
this.buffer[i] = this.options.placeholder
|
||||
while (pos++ < test.length) {
|
||||
var c = test.charAt(pos - 1)
|
||||
if (this.tests[i].test(c)) {
|
||||
this.buffer[i] = c
|
||||
lastMatch = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if (pos > test.length)
|
||||
break
|
||||
} else if (this.buffer[i] == test.charAt(pos) && i != this.partialPosition) {
|
||||
pos++
|
||||
lastMatch = i
|
||||
}
|
||||
}
|
||||
if (!allow && lastMatch + 1 < this.partialPosition) {
|
||||
this.$element.val("")
|
||||
this.clearBuffer(0, len)
|
||||
} else if (allow || lastMatch + 1 >= this.partialPosition) {
|
||||
this.writeBuffer()
|
||||
if (!allow) this.$element.val(this.$element.val().substring(0, lastMatch + 1))
|
||||
}
|
||||
return (this.partialPosition ? i : this.firstNonMaskPos)
|
||||
}
|
||||
|
||||
|
||||
// INPUTMASK PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
var old = $.fn.inputmask
|
||||
|
||||
$.fn.inputmask = function (options) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('inputmask')
|
||||
|
||||
if (!data) $this.data('inputmask', (data = new Inputmask(this, options)))
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.inputmask.Constructor = Inputmask
|
||||
|
||||
|
||||
// INPUTMASK NO CONFLICT
|
||||
// ====================
|
||||
|
||||
$.fn.inputmask.noConflict = function () {
|
||||
$.fn.inputmask = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// INPUTMASK DATA-API
|
||||
// ==================
|
||||
|
||||
$(document).on('focus.bs.inputmask.data-api', '[data-mask]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('inputmask')) return
|
||||
$this.inputmask($this.data())
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
/* ===========================================================
|
||||
* Bootstrap: fileinput.js v3.0.0-p7
|
||||
* http://jasny.github.com/bootstrap/javascript.html#fileinput
|
||||
* ===========================================================
|
||||
* Copyright 2012 Jasny BV, Netherlands.
|
||||
*
|
||||
* 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 ($) { "use strict";
|
||||
|
||||
var isIE = window.navigator.appName == 'Microsoft Internet Explorer'
|
||||
|
||||
// FILEUPLOAD PUBLIC CLASS DEFINITION
|
||||
// =================================
|
||||
|
||||
var Fileupload = function (element, options) {
|
||||
this.$element = $(element)
|
||||
|
||||
this.$input = this.$element.find(':file')
|
||||
if (this.$input.length === 0) return
|
||||
|
||||
this.name = this.$input.attr('name') || options.name
|
||||
|
||||
this.$hidden = this.$element.find('input[type=hidden][name="'+this.name+'"]')
|
||||
if (this.$hidden.length === 0) {
|
||||
this.$hidden = $('<input type="hidden" />')
|
||||
this.$element.prepend(this.$hidden)
|
||||
}
|
||||
|
||||
this.$preview = this.$element.find('.fileinput-preview')
|
||||
var height = this.$preview.css('height')
|
||||
if (this.$preview.css('display') != 'inline' && height != '0px' && height != 'none') this.$preview.css('line-height', height)
|
||||
|
||||
this.original = {
|
||||
exists: this.$element.hasClass('fileinput-exists'),
|
||||
preview: this.$preview.html(),
|
||||
hiddenVal: this.$hidden.val()
|
||||
}
|
||||
|
||||
this.listen()
|
||||
}
|
||||
|
||||
Fileupload.prototype.listen = function() {
|
||||
this.$input.on('change.bs.fileinput', $.proxy(this.change, this))
|
||||
$(this.$input[0].form).on('reset.bs.fileinput', $.proxy(this.reset, this))
|
||||
|
||||
this.$element.find('[data-trigger="fileinput"]').on('click.bs.fileinput', $.proxy(this.trigger, this))
|
||||
this.$element.find('[data-dismiss="fileinput"]').on('click.bs.fileinput', $.proxy(this.clear, this))
|
||||
},
|
||||
|
||||
Fileupload.prototype.change = function(e) {
|
||||
if (e.target.files === undefined) e.target.files = e.target && e.target.value ? [ {name: e.target.value.replace(/^.+\\/, '')} ] : []
|
||||
if (e.target.files.length === 0) return
|
||||
|
||||
this.$hidden.val('')
|
||||
this.$hidden.attr('name', '')
|
||||
this.$input.attr('name', this.name)
|
||||
|
||||
var file = e.target.files[0]
|
||||
|
||||
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
|
||||
var reader = new FileReader()
|
||||
var preview = this.$preview
|
||||
var element = this.$element
|
||||
|
||||
reader.onload = function(re) {
|
||||
var $img = $('<img>').attr('src', re.target.result)
|
||||
e.target.files[0].result = re.target.result
|
||||
|
||||
element.find('.fileinput-filename').text(file.name)
|
||||
|
||||
// if parent has max-height, using `(max-)height: 100%` on child doesn't take padding and border into account
|
||||
if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10))
|
||||
|
||||
preview.html($img)
|
||||
element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
|
||||
element.trigger('change.bs.fileinput', e.target.files)
|
||||
}
|
||||
|
||||
reader.readAsDataURL(file)
|
||||
} else {
|
||||
this.$element.find('.fileinput-filename').text(file.name)
|
||||
this.$preview.text(file.name)
|
||||
|
||||
this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
|
||||
this.$element.trigger('change.bs.fileinput')
|
||||
}
|
||||
},
|
||||
|
||||
Fileupload.prototype.clear = function(e) {
|
||||
if (e) e.preventDefault()
|
||||
|
||||
this.$hidden.val('')
|
||||
this.$hidden.attr('name', this.name)
|
||||
this.$input.attr('name', '')
|
||||
|
||||
//ie8+ doesn't support changing the value of input with type=file so clone instead
|
||||
if (isIE) {
|
||||
var inputClone = this.$input.clone(true);
|
||||
this.$input.after(inputClone);
|
||||
this.$input.remove();
|
||||
this.$input = inputClone;
|
||||
} else {
|
||||
this.$input.val('')
|
||||
}
|
||||
|
||||
this.$preview.html('')
|
||||
this.$element.find('.fileinput-filename').text('')
|
||||
this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
|
||||
|
||||
if (e !== false) {
|
||||
this.$input.trigger('change')
|
||||
this.$element.trigger('clear.bs.fileinput')
|
||||
}
|
||||
},
|
||||
|
||||
Fileupload.prototype.reset = function() {
|
||||
this.clear(false)
|
||||
|
||||
this.$hidden.val(this.original.hiddenVal)
|
||||
this.$preview.html(this.original.preview)
|
||||
this.$element.find('.fileinput-filename').text('')
|
||||
|
||||
if (this.original.exists) this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
else this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
|
||||
|
||||
this.$element.trigger('reset.bs.fileinput')
|
||||
},
|
||||
|
||||
Fileupload.prototype.trigger = function(e) {
|
||||
this.$input.trigger('click')
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
|
||||
// FILEUPLOAD PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
$.fn.fileinput = function (options) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('fileinput')
|
||||
if (!data) $this.data('fileinput', (data = new Fileupload(this, options)))
|
||||
if (typeof options == 'string') data[options]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.fileinput.Constructor = Fileupload
|
||||
|
||||
|
||||
// FILEUPLOAD DATA-API
|
||||
// ==================
|
||||
|
||||
$(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('fileinput')) return
|
||||
$this.fileinput($this.data())
|
||||
|
||||
var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
|
||||
if ($target.length > 0) {
|
||||
e.preventDefault()
|
||||
$target.trigger('click.bs.fileinput')
|
||||
}
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
1
public/js/lib/list.min.js
vendored
1
public/js/lib/list.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user