remove print relative css
This commit is contained in:
parent
633ee684ff
commit
3bf4ab1864
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 2.0.6 on 2018-12-03 21:00
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('projects', '0021_project_is_open'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='project',
|
||||
name='is_annotation_editable',
|
||||
field=models.BooleanField(default=True, verbose_name='是否可新增或修改注释'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='project',
|
||||
name='is_annoy_comment',
|
||||
field=models.BooleanField(default=False, verbose_name='是否匿名评论'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 2.0.6 on 2018-12-03 21:00
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0006_user_educoder_userid'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='address',
|
||||
field=models.CharField(default='', max_length=100, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='avatar',
|
||||
field=models.ImageField(default='avatar/users/default.png', null=True, upload_to='avatar/'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='nick_name',
|
||||
field=models.CharField(default='', max_length=50, null=True, verbose_name='昵称'),
|
||||
),
|
||||
]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -228,16 +228,14 @@ html {
|
|||
|
||||
|
||||
/*打印需求*/
|
||||
.WPGhelp {
|
||||
/* .WPGhelp {
|
||||
position: relative;
|
||||
z-index: 5555;
|
||||
width: 100%;
|
||||
/*height: 100%;*/
|
||||
background: none #fff;
|
||||
visibility: hidden;
|
||||
top: -80px;
|
||||
left: 0px;
|
||||
/*height: 952px;*/
|
||||
overflow: hidden;
|
||||
}
|
||||
.WPGstep{
|
||||
|
@ -256,4 +254,4 @@ html {
|
|||
.WPGstep .WPGnext, .WPGstep .WPGover{
|
||||
color:#000;
|
||||
border:1px solid #000;
|
||||
}
|
||||
} */
|
|
@ -1824,7 +1824,7 @@ code{
|
|||
color:#D0D0D0 !important;
|
||||
}
|
||||
/*打印需求*/
|
||||
.head {
|
||||
/* .head {
|
||||
background-color: #FFF !important;
|
||||
color:#000;
|
||||
border-bottom: 1px solid #000;
|
||||
|
@ -1856,7 +1856,6 @@ color:#D0D0D0 !important;
|
|||
.tab_item.active{
|
||||
background-color: #fff;
|
||||
color:#000;
|
||||
/*border: 1px solid #000;*/
|
||||
}
|
||||
.tab_item.active a:first-child{
|
||||
color:#000 !important;
|
||||
|
@ -1881,7 +1880,6 @@ color:#D0D0D0 !important;
|
|||
text-align: center;
|
||||
line-height: 40px;
|
||||
background-color: #fff;
|
||||
/*border:1px solid #000;*/
|
||||
}
|
||||
.Fontchevronright{
|
||||
color: #000;
|
||||
|
@ -1893,7 +1891,6 @@ color:#D0D0D0 !important;
|
|||
text-align: center;
|
||||
line-height: 40px;
|
||||
background-color: #fff;
|
||||
/*border:1px solid #000;*/
|
||||
}
|
||||
.left-tab {
|
||||
background: #fff;
|
||||
|
@ -1963,9 +1960,6 @@ color:#D0D0D0 !important;
|
|||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
}
|
||||
/*.code_file{*/
|
||||
/*border-left:1px solid #000;*/
|
||||
/*}*/
|
||||
.sourcecode{
|
||||
background: #fff !important;
|
||||
}
|
||||
|
@ -1986,4 +1980,4 @@ code{
|
|||
}
|
||||
.sourcecode:hover {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
} */
|
|
@ -125,7 +125,7 @@ ol,ul,li{ list-style-type:none}
|
|||
|
||||
|
||||
/*打印需求*/
|
||||
.navbar-inverse{
|
||||
/* .navbar-inverse{
|
||||
background-color: #FFF !important;
|
||||
border-color: #FFF !important;
|
||||
}
|
||||
|
@ -133,4 +133,4 @@ ol,ul,li{ list-style-type:none}
|
|||
.navbar-inverse .navbar-nav > .active > a{
|
||||
color: #000 !important;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
} */
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "xadmin",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"jquery": ">=1.8.3",
|
||||
"jquery-ui": ">=1.10.0",
|
||||
"bootstrap": "http://twitter.github.io/bootstrap/assets/bootstrap.zip",
|
||||
"bootstrap-timepicker": ">=0.2.3",
|
||||
"bootstrap-datepicker": ">=1.0.0",
|
||||
"bootstrap-modal": ">=2.1",
|
||||
"flot": ">=0.8",
|
||||
"font-awesome": ">=3.0.2",
|
||||
"load-image": "blueimp/JavaScript-Load-Image",
|
||||
"bootstrap-image-gallery": "blueimp/Bootstrap-Image-Gallery",
|
||||
"select2": ">=3.3.2",
|
||||
"selectize": ">=0.8.4",
|
||||
"datejs": "datejs/Datejs",
|
||||
"bootstrap-multiselect": "davidstutz/bootstrap-multiselect"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,459 @@
|
|||
/*!
|
||||
* Bootstrap v3.0.2 by @fat and @mdo
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world by @mdo and @fat.
|
||||
*/
|
||||
|
||||
.btn-default,
|
||||
.btn-primary,
|
||||
.btn-success,
|
||||
.btn-info,
|
||||
.btn-warning,
|
||||
.btn-danger {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-primary:active,
|
||||
.btn-success:active,
|
||||
.btn-info:active,
|
||||
.btn-warning:active,
|
||||
.btn-danger:active,
|
||||
.btn-default.active,
|
||||
.btn-primary.active,
|
||||
.btn-success.active,
|
||||
.btn-info.active,
|
||||
.btn-warning.active,
|
||||
.btn-danger.active {
|
||||
-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:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#e0e0e0));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dbdbdb;
|
||||
border-color: #ccc;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-default:hover,
|
||||
.btn-default:focus {
|
||||
background-color: #e0e0e0;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
border-color: #dbdbdb;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#2d6ca2));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #2b669a;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus {
|
||||
background-color: #2d6ca2;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
background-color: #2d6ca2;
|
||||
border-color: #2b669a;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#419641));
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -moz-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3e8f3e;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-success:hover,
|
||||
.btn-success:focus {
|
||||
background-color: #419641;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
background-color: #419641;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#eb9316));
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -moz-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #e38d13;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-warning:hover,
|
||||
.btn-warning:focus {
|
||||
background-color: #eb9316;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c12e2a));
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b92c28;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-danger:hover,
|
||||
.btn-danger:focus {
|
||||
background-color: #c12e2a;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#2aabd2));
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -moz-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #28a4c9;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-info:hover,
|
||||
.btn-info:focus {
|
||||
background-color: #2aabd2;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-info:active,
|
||||
.btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
|
||||
.thumbnail,
|
||||
.img-thumbnail {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.dropdown-menu > li > a:hover,
|
||||
.dropdown-menu > li > a:focus {
|
||||
background-color: #e8e8e8;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
}
|
||||
|
||||
.dropdown-menu > .active > a,
|
||||
.dropdown-menu > .active > a:hover,
|
||||
.dropdown-menu > .active > a:focus {
|
||||
background-color: #357ebd;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
|
||||
}
|
||||
|
||||
.navbar-default {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#f8f8f8));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.navbar-default .navbar-nav > .active > a {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f3f3f3));
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
|
||||
background-image: -moz-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.navbar-brand,
|
||||
.navbar-nav > li > a {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.navbar-inverse {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#3c3c3c), to(#222222));
|
||||
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);
|
||||
background-image: -moz-linear-gradient(top, #3c3c3c 0%, #222222 100%);
|
||||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#222222), to(#282828));
|
||||
background-image: -webkit-linear-gradient(top, #222222 0%, #282828 100%);
|
||||
background-image: -moz-linear-gradient(top, #222222 0%, #282828 100%);
|
||||
background-image: linear-gradient(to bottom, #222222 0%, #282828 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand,
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.navbar-static-top,
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.alert {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#c8e5bc));
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -moz-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b2dba1;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#b9def0));
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #9acfea;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#f8efc0));
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -moz-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #f5e79e;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#e7c3c3));
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -moz-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dca7a7;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||
}
|
||||
|
||||
.progress {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -moz-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#449d44));
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -moz-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#31b0d5));
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -moz-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#ec971f));
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -moz-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c9302c));
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||
}
|
||||
|
||||
.list-group {
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.list-group-item.active,
|
||||
.list-group-item.active:hover,
|
||||
.list-group-item.active:focus {
|
||||
text-shadow: 0 -1px 0 #3071a9;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3278b3));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #3278b3 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3278b3;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
|
||||
}
|
||||
|
||||
.panel {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.panel-default > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-primary > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-success > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#d0e9c6));
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -moz-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-info > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#c4e3f3));
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-warning > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#faf2cc));
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -moz-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-danger > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#ebcccc));
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -moz-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||
}
|
||||
|
||||
.well {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#e8e8e8), to(#f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -moz-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dcdcdc;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,62 @@
|
|||
|
||||
/* results table */
|
||||
.table th {
|
||||
background-color: #FAFAFA;
|
||||
background-image: -moz-linear-gradient(top, white, #F2F2F2);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), to(#F2F2F2));
|
||||
background-image: -webkit-linear-gradient(top, white, #F2F2F2);
|
||||
background-image: -o-linear-gradient(top, white, #F2F2F2);
|
||||
background-image: linear-gradient(to bottom, white, #F2F2F2);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||
border-bottom-width: 1px !important;
|
||||
}
|
||||
|
||||
/** panel **/
|
||||
.panel-default {
|
||||
border-radius: 2px;
|
||||
}
|
||||
.panel-default > .panel-heading {
|
||||
background-color: #F8F8F8;
|
||||
background-image: -moz-linear-gradient(top, #FDFDFD, #F6F6F6);
|
||||
background-image: -ms-linear-gradient(top, #FDFDFD, #F6F6F6);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#FDFDFD), to(#F6F6F6));
|
||||
background-image: -webkit-linear-gradient(top, #FDFDFD, #F6F6F6);
|
||||
background-image: -o-linear-gradient(top, #FDFDFD, #F6F6F6);
|
||||
background-image: linear-gradient(top, #FDFDFD, #F6F6F6);
|
||||
}
|
||||
|
||||
.form-group {
|
||||
border-bottom: 1px solid #EEE;
|
||||
background-color: #FBFBFB;
|
||||
margin-top: 0px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
.controls {
|
||||
background-color: white;
|
||||
padding: 15px !important;
|
||||
}
|
||||
.control-label {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
.fieldset .panel-body {
|
||||
padding-top: 0px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
.form-inline .form-group {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/** fieldset **/
|
||||
@media (min-width: 768px) {
|
||||
.form-horizontal .controls{
|
||||
border-left: 1px solid #EEE;
|
||||
}
|
||||
.form-horizontal .control-label {
|
||||
padding-top: 22px !important;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,195 @@
|
|||
|
||||
/* CUSTOM FORM FIELDS */
|
||||
select.selectmultiple {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
}
|
||||
.select2-container{
|
||||
width: 100%;
|
||||
}
|
||||
.select2-container.form-control{
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
.select2-container .select2-choice {
|
||||
height: 35px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
/* form css */
|
||||
.form-container .column{
|
||||
min-height: 60px;
|
||||
}
|
||||
.form-group {
|
||||
margin-right: -15px;
|
||||
margin-left: -15px;
|
||||
}
|
||||
.control-label {
|
||||
padding: 7px 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.form-horizontal .control-label {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.controls {
|
||||
padding: 0px 15px 0px 15px;
|
||||
}
|
||||
.controls:before,
|
||||
.controls:after {
|
||||
display: table;
|
||||
content: " ";
|
||||
}
|
||||
.controls:after {
|
||||
clear: both;
|
||||
}
|
||||
.control-wrap {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding-right: 45px;
|
||||
}
|
||||
.asteriskField, .asterisk-field {
|
||||
color: red;
|
||||
}
|
||||
.controls > .radio:first-child,
|
||||
.controls > .checkbox:first-child,
|
||||
.control-wrap > .radio:first-child,
|
||||
.control-wrap > .checkbox:first-child {
|
||||
margin-top: -7px;
|
||||
}
|
||||
.controls > span {
|
||||
padding: 5px 0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.form-row .row {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.fieldset .panel-body {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
|
||||
.text-field,
|
||||
.textinput,
|
||||
.url-field,
|
||||
select,
|
||||
.input-group ~ .text-field,
|
||||
.input-group ~ .textinput,
|
||||
.input-group ~ .url-field
|
||||
{
|
||||
max-width: 300px;
|
||||
}
|
||||
.input-group.date{ max-width: 300px;}
|
||||
.input-group.time{ max-width: 180px;}
|
||||
.int-field {
|
||||
max-width: 100px;
|
||||
}
|
||||
.datetime > .input-group {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.datetime > .input-group:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
select.selectmultiple {
|
||||
max-width: 350px;
|
||||
}
|
||||
.select2-container, .selectize-control{
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.form-actions.fixed{
|
||||
position:fixed;
|
||||
_position:absolute;
|
||||
bottom:0px;
|
||||
z-index:295;
|
||||
margin-left: -10px;
|
||||
-webkit-box-shadow: 2px 2px 16px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 2px 2px 16px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 2px 2px 16px rgba(0, 0, 0, 0.5);
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.form-actions.fixed .pull-right{
|
||||
float: none !important;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.form-horizontal .control-label {
|
||||
width: 170px;
|
||||
float: left;
|
||||
}
|
||||
.form-horizontal .controls {
|
||||
margin-left: 175px;
|
||||
}
|
||||
.form-horizontal.short_label .control-label,
|
||||
.form-horizontal .short_label .control-label {
|
||||
width: 120px;
|
||||
}
|
||||
.form-horizontal.short_label .controls,
|
||||
.form-horizontal .short_label .controls {
|
||||
margin-left: 120px;
|
||||
}
|
||||
.form-horizontal .form-group {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.form-horizontal .form-inline .form-group {
|
||||
margin: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
.form-horizontal .fieldset .panel-body {
|
||||
padding-top: 24px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.form-horizontal .control-label {
|
||||
width: 150px;
|
||||
}
|
||||
.form-horizontal .controls {
|
||||
margin-left: 155px;
|
||||
}
|
||||
.form-horizontal.short_label .control-label,
|
||||
.form-horizontal .short_label .control-label {
|
||||
width: 100px;
|
||||
}
|
||||
.form-horizontal.short_label .controls,
|
||||
.form-horizontal .short_label .controls {
|
||||
margin-left: 100px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.btn-toolbar.top-toolbar {
|
||||
margin: 0 10px 10px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
/** detail page **/
|
||||
img.field_img {
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
/** revision form **/
|
||||
.diff_field .control-label {
|
||||
color: #FF8040;
|
||||
}
|
||||
.diff_field .controls{
|
||||
background-color: #FCF8E3;
|
||||
}
|
||||
|
||||
/** tabs **/
|
||||
.nav.nav-tabs {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
/** selectize **/
|
||||
.selectize-input {
|
||||
vertical-align: bottom;
|
||||
}
|
|
@ -0,0 +1,429 @@
|
|||
|
||||
a { cursor: pointer;}
|
||||
|
||||
#body-content {
|
||||
margin-top: 65px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.popover{
|
||||
width: auto;
|
||||
}
|
||||
.dropdown-submenu .popover {
|
||||
padding: 0px;
|
||||
max-width: none;
|
||||
left: 100%;
|
||||
}
|
||||
.dropdown-submenu .popover.right {
|
||||
margin-top: -35px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
.dropdown-submenu .popover.left {
|
||||
margin-top: -35px;
|
||||
}
|
||||
.dropdown-submenu .popover.right .arrow, .dropdown-submenu .popover.left .arrow{
|
||||
top: 47px;
|
||||
}
|
||||
.dropdown-submenu .popover form{
|
||||
margin: 6px 0;
|
||||
}
|
||||
.dropdown-submenu .popover form input {
|
||||
min-width: 120px;
|
||||
}
|
||||
.dropdown-submenu .popover form > .input-group {
|
||||
width: 100%;
|
||||
}
|
||||
.dropdown-submenu .popover form > .btn {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.dropdown-submenu .popover form > .input-group + .input-group {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.filter-date .menu-choice-date .input-group-addon {
|
||||
width: 50px;
|
||||
text-align: right;
|
||||
}
|
||||
.filter-date .menu-date-range .ranges .btn{
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.filter-date .menu-date-range .popover {
|
||||
width: 600px;
|
||||
left: 10px;
|
||||
top: 35px;
|
||||
margin-top: -2px;
|
||||
margin-left: -40px;
|
||||
}
|
||||
.filter-date .menu-date-range .popover .arrow {
|
||||
left: 60px;
|
||||
}
|
||||
.top-search-form {
|
||||
margin-top: 6px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.top-search-form .input-group {
|
||||
width: 240px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.filter-date .menu-date-range .datepicker-inline{
|
||||
width: auto;
|
||||
}
|
||||
.filter-date .menu-date-range .table-condensed{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-fk-search .select-search{
|
||||
min-width: 160px;
|
||||
}
|
||||
.filter-char form input.input-char{
|
||||
min-width: 180px;
|
||||
}
|
||||
.filter-number form .input-group-btn > .btn {
|
||||
width: 34px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.panel .panel-heading .icon{
|
||||
float: right;
|
||||
top: 50%;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.panel .panel-heading .badge { float: right; top: 50%; margin-left: 10px;}
|
||||
.panel.no_title .panel-heading{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.panel .panel-body.nopadding{
|
||||
padding: 0px;
|
||||
}
|
||||
.ui-sortable-placeholder { border: 1px dotted #CCC; visibility: visible !important; }
|
||||
.ui-sortable-placeholder * { visibility: hidden; }
|
||||
|
||||
/* dropdowns */
|
||||
.dropdown-menu li.with_menu_btn > a:first-child {
|
||||
padding-right: 35px;
|
||||
}
|
||||
.dropdown-menu .dropdown-menu-btn {
|
||||
float: right;
|
||||
margin-top: -26px;
|
||||
height: 26px;
|
||||
padding: 6px 8px 6px 5px;
|
||||
margin-right: 7px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.dropdown-menu .dropdown-menu-btn:hover {
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
|
||||
}
|
||||
|
||||
/* mask */
|
||||
.mask {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 8px;
|
||||
width: 100%;
|
||||
z-index: 9999;
|
||||
margin-top: -8px;
|
||||
background-color: rgba(255,255,255,.6);
|
||||
height: 100%;
|
||||
padding-top: 24px;
|
||||
}
|
||||
.mask .progress{
|
||||
position: absolute;
|
||||
width: 80%;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
left: 10%;
|
||||
}
|
||||
.mask .progress .bar{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* export */
|
||||
.export .dropdown-submenu .popover{
|
||||
width: 240px;
|
||||
margin-left: -80px;
|
||||
}
|
||||
|
||||
/* search form */
|
||||
.input-group.search-group{
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
/* results table */
|
||||
.table th {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.table td .btn-group {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.content-toolbar, .steps-nav {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* details dl */
|
||||
.data-details dl.dl-horizontal dt{
|
||||
width: 80px;
|
||||
}
|
||||
.data-details dl.dl-horizontal dd{
|
||||
margin-left: 90px;
|
||||
}
|
||||
.data-details .btn{
|
||||
float: right;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* related menu */
|
||||
.dropdown.related_menu .dropdown-menu {
|
||||
width: 200px;
|
||||
}
|
||||
.dropdown.related_menu .dropdown-menu > li > a {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.rel-brand {
|
||||
font-size: .8em;
|
||||
color: #a10000;
|
||||
}
|
||||
|
||||
/* list overflow */
|
||||
.x-scroll {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* nav sitemenu */
|
||||
ul.nav-sitemenu {
|
||||
padding: 10px;
|
||||
}
|
||||
ul.nav-sitemenu li a {
|
||||
padding: 6px 10px;
|
||||
}
|
||||
.panel-group.nav-sitemenu .panel .accordion-toggle{
|
||||
text-decoration: none;
|
||||
}
|
||||
.panel-group.nav-sitemenu .panel:not(:first-child) {
|
||||
border-radius: 0px;
|
||||
border-top: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
.panel-group.nav-sitemenu .panel:not(:first-child) .panel-heading {
|
||||
border-radius: 0px;
|
||||
}
|
||||
.panel-group.nav-sitemenu .panel:first-child {
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
}
|
||||
.panel-group.nav-sitemenu .panel .list-group {
|
||||
border-radius: 0px;
|
||||
}
|
||||
.panel-group.nav-sitemenu .panel .list-group .list-group-item:first-child {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
.panel-group.nav-sitemenu .panel .list-group .list-group-item:last-child {
|
||||
border-bottom-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.panel-group.nav-sitemenu {
|
||||
top: 65px;
|
||||
bottom: 0;
|
||||
overflow-y: auto;
|
||||
position: fixed;
|
||||
margin-left: -15px;
|
||||
}
|
||||
.panel-group.nav-sitemenu .panel .list-group.in{
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.panel-group.nav-sitemenu {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
/* models list */
|
||||
ul.model_ul{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
ul.model_ul, ul.model_ul ul{
|
||||
padding-left: 20px;
|
||||
list-style: none;
|
||||
}
|
||||
ul.model_ul li{
|
||||
line-height: 20px;
|
||||
margin: 8px 0px;
|
||||
}
|
||||
ul.model_ul li span {
|
||||
padding: 3px 6px;
|
||||
min-width: auto;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
/* icon */
|
||||
*[class^="icon-"] sub,
|
||||
*[class^="icon-"] sup{
|
||||
font-size: 0.5em;
|
||||
margin-left: -6px;
|
||||
}
|
||||
|
||||
/* ajax btn */
|
||||
.btn-ajax {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* g-search */
|
||||
#g-search .btn-group{
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/** Font Icons **/
|
||||
a[class^="icon-"]:before, a[class*=" icon-"]:before {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
.btn[class^="icon-"]:before, .btn[class*=" icon-"]:before {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
/** fix navbar input-append and input-prepend margin **/
|
||||
.navbar .navbar-brand {
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
/** import for bp3.0 */
|
||||
.pagination.pagination-inline{margin-top: 0px; margin-bottom: 10px;}
|
||||
.modal { overflow-y: auto;}
|
||||
.dropdown {position: relative;}
|
||||
.input-group-btn:not(:first-child):not(:last-child) > .btn{
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.dropdown-submenu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -6px;
|
||||
margin-left: -1px;
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
|
||||
.dropup .dropdown-submenu > .dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: -2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.dropdown-submenu > a:after {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-top: 5px;
|
||||
margin-right: -10px;
|
||||
border-color: transparent;
|
||||
border-left-color: #cccccc;
|
||||
border-style: solid;
|
||||
border-width: 5px 0 5px 5px;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.dropdown-submenu:hover > a:after {
|
||||
border-left-color: #ffffff;
|
||||
}
|
||||
|
||||
.dropdown-submenu.pull-left {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.dropdown-submenu.pull-left > .dropdown-menu {
|
||||
left: -100%;
|
||||
margin-left: 10px;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.dropdown .dropdown-menu .nav-header {
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.dropdown-submenu:hover > .dropdown-menu,
|
||||
.dropdown-submenu:hover > .popover {
|
||||
display: none;
|
||||
}
|
||||
.dropdown-submenu.open > .dropdown-menu,
|
||||
.dropdown-submenu.open > .popover {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/** nav-header **/
|
||||
.navbar-collapse {max-height: none !important;}
|
||||
.nav-header {
|
||||
display: block;
|
||||
padding: 3px 15px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
line-height: 1.428571429;
|
||||
color: #999999;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.nav > li + .nav-header {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
/** table in panel **/
|
||||
.panel .panel-body > .table {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/** thumbnail **/
|
||||
.thumbnail-panel.panel .panel-body { padding-bottom: 0px;}
|
||||
.thumbnail-panel .thumbnail{margin-bottom: 15px;}
|
||||
.thumbnail-panel .thumbnail:hover { background-color: #efefef; }
|
||||
.thumbnail > h1 { margin: 0px; }
|
||||
.thumbnail.warning {
|
||||
background-color: #fcf8e3;
|
||||
border-color: #fbeed5;
|
||||
}
|
||||
.thumbnail .action-select {position: absolute; top: 0px; left: 20px;}
|
||||
.thumbnail .dropdown.related_menu {position: absolute; top: 0px; right: 20px;}
|
||||
|
||||
/* panel single **/
|
||||
.panel-single {
|
||||
margin: 50px auto 20px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: 0 0 40px rgba(0,0,0,.3);
|
||||
-moz-box-shadow: 0 0 40px rgba(0,0,0,.3);
|
||||
box-shadow: 0 0 40px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
/* change list */
|
||||
form#changelist-form + .pagination {
|
||||
margin-top: 0px;
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
#body-content {
|
||||
margin-top: 50px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#top-nav, #footer, .breadcrumb {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#top-nav .breadcrumb {
|
||||
margin-top: 20px;
|
||||
}
|
||||
#left-side {
|
||||
min-height: 0px;
|
||||
position: fixed;
|
||||
padding: 0px;
|
||||
top: 50px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
background: #FFF;
|
||||
z-index: 999;
|
||||
overflow: auto;
|
||||
}
|
||||
#left-side .well {
|
||||
border: 0px;
|
||||
}
|
||||
#changelist-form {
|
||||
clear: both;
|
||||
}
|
||||
.navbar-brand {
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.panel-content.nopadding {
|
||||
margin: -15px;
|
||||
}
|
||||
|
||||
.panel-content.nopadding .table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.col {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.row {
|
||||
margin-right: -10px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
.results {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
margin-bottom: 0px;
|
||||
padding: 10px;
|
||||
position:fixed;
|
||||
bottom:0px;
|
||||
z-index:295;
|
||||
width: 100%;
|
||||
margin-right: -10px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
.form-actions .more-btns input:first-child{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.change-form #body-content {
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
.model_ul {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-toggle{
|
||||
color: white;
|
||||
top: 7px;
|
||||
padding: 7px 12px;
|
||||
}
|
||||
.navbar.tools-navbar {
|
||||
height: 50px;
|
||||
margin-top: -10px;
|
||||
text-align: right;
|
||||
}
|
||||
.navbar-btns .btn span{
|
||||
display: none;
|
||||
}
|
||||
.navbar-btns {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 10px;
|
||||
}
|
||||
.nav-back {
|
||||
left: 10px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.layout-btns {
|
||||
display: none;
|
||||
}
|
||||
.pagination.pagination-small{
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
.dashboard.container-fluid {
|
||||
padding-left: 0px;
|
||||
}
|
||||
.dashboard .column{
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.widget {
|
||||
}
|
||||
.widget_options {
|
||||
}
|
||||
|
||||
/* Quick Buttons
|
||||
=================================================================== */
|
||||
.qbutton .panel-body {
|
||||
padding-top: 5px;
|
||||
}
|
||||
.btn-quick {
|
||||
margin-top: 10px;
|
||||
padding: 20px 0px 0px 0px;
|
||||
font-size: 15px;
|
||||
display:block;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
.btn-quick i {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
/* Quick Buttons Small
|
||||
=================================================================== */
|
||||
|
||||
.btn-quick-small {
|
||||
border-radius: 3px;
|
||||
padding: 15px 0px 0px 0px;
|
||||
font-size: 10px;
|
||||
display:block;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.btn-quick-small i {
|
||||
font-size: 20px;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
td.aggregate {
|
||||
font-weight: bold;
|
||||
}
|
||||
td.aggregate span.aggregate_title {
|
||||
float: right;
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
|
||||
.empty-form {
|
||||
display: none;
|
||||
}
|
||||
.formset:not(.one) > .panel-body {
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
.formset .row-deleted{
|
||||
background: #fff0f0 !important;
|
||||
}
|
||||
.formset .row-added {
|
||||
background: #d1ffdd !important;
|
||||
}
|
||||
.formset .formset-heading{
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #EEE;
|
||||
}
|
||||
.formset .row-deleted .formset-form {
|
||||
display: none;
|
||||
}
|
||||
.formset .box-content.accordion {
|
||||
margin: 0px;
|
||||
padding: 5px 5px 3px;
|
||||
}
|
||||
.formset .formset-form {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.formset .accordion-heading .delete-row {
|
||||
float: right;
|
||||
margin: 8px;
|
||||
}
|
||||
.formset .nav{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.formset .nav.nav-tabs{
|
||||
padding: 10px 10px 0px;
|
||||
}
|
||||
.formset .panel-body.tabs {
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
.formset .box-content.tabs{
|
||||
padding: 5px 0px 0px;
|
||||
}
|
||||
.formset .tabs .tab-content{
|
||||
overflow: hidden;
|
||||
}
|
||||
.formset .tabs .delete-row{
|
||||
float: right;
|
||||
margin: 8px 8px;
|
||||
}
|
||||
.formset .table{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.formset .table td{
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.formset .table td .delete-row{
|
||||
margin-top: 4px;
|
||||
display: block;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/* FORM ROWS */
|
||||
|
||||
.form-row {
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
font-size: 13px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.form-row img, .form-row input {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-row label input[type="checkbox"] {
|
||||
margin-top: 0;
|
||||
vertical-align: 0;
|
||||
}
|
||||
|
||||
form .form-row p {
|
||||
padding-left: 0;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
.nav-quickfilter .filter-item {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.nav-quickfilter .filter-col-1 {
|
||||
margin: 3px 2px 0 -2px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.nav-quickfilter .filter-col-2 {
|
||||
}
|
||||
|
||||
.nav-quickfilter .nav-expand {
|
||||
z-index:100;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
/** Action **/
|
||||
.action-checkbox-column {
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
/** quick-form **/
|
||||
.quick-form .modal-body {
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
.quick-form .modal-footer {
|
||||
margin-top: 0px;
|
||||
}
|
|
@ -0,0 +1,249 @@
|
|||
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
ul.nav-sitemenu{
|
||||
padding: 0px;
|
||||
}
|
||||
ul.nav-sitemenu > li.app_menu>a{
|
||||
padding: 3px 0px;
|
||||
margin: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
ul.nav-sitemenu .dropdown-menu{
|
||||
z-index: 1100;
|
||||
}
|
||||
ul.nav-sitemenu > li.app_menu>a:after{
|
||||
display: none;
|
||||
}
|
||||
ul.nav-sitemenu > li.app_menu>hr{ margin: 0px;}
|
||||
ul.nav-sitemenu > li.app_menu>a>i.icon{
|
||||
font-size: 20px;
|
||||
line-height: 1.7em;
|
||||
}
|
||||
ul.nav-sitemenu > li.app_menu li {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#content-block:not(.full-content) {
|
||||
padding-left: 5px;
|
||||
min-height: 450px;
|
||||
}
|
||||
.form-actions .more-btns{
|
||||
display: inline-block !important;
|
||||
}
|
||||
.form-actions .hidden-sm{
|
||||
display: inline-block !important;
|
||||
}
|
||||
.form-actions .col-1,
|
||||
.form-actions .col-2,
|
||||
.form-actions .col-3,
|
||||
.form-actions .col-4,
|
||||
.form-actions .col-5,
|
||||
.form-actions .col-6,
|
||||
.form-actions .col-7,
|
||||
.form-actions .col-8,
|
||||
.form-actions .col-9,
|
||||
.form-actions .col-10,
|
||||
.form-actions .col-11,
|
||||
.form-actions .col-12
|
||||
{
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
.quick-form .modal-dialog {
|
||||
width: auto;
|
||||
}
|
||||
.detail-modal .modal-dialog {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#body-content {
|
||||
margin-top: 50px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
#body-content.show_menu{
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
#footer, .breadcrumb {
|
||||
display: none;
|
||||
}
|
||||
#top-nav .navbar-nav {
|
||||
float: none;
|
||||
}
|
||||
#left-side {
|
||||
min-height: 0px;
|
||||
position: fixed;
|
||||
top: 65px;
|
||||
left: 0px;
|
||||
bottom: 0px;
|
||||
background: #FFF;
|
||||
z-index: 999;
|
||||
overflow: auto;
|
||||
display: none;
|
||||
width: 70%;
|
||||
}
|
||||
#body-content.show_menu #left-side {
|
||||
display: block;
|
||||
}
|
||||
#body-content.show_menu #content-block{
|
||||
margin-left: 70%;
|
||||
width: 100%;
|
||||
}
|
||||
#left-side .well {
|
||||
border: 0px;
|
||||
}
|
||||
#changelist-form {
|
||||
clear: both;
|
||||
}
|
||||
.popover.dropdown-menu form > .btn {
|
||||
width: 100%;
|
||||
}
|
||||
.navbar .navbar-brand {
|
||||
max-width: 260px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.panel-content.nopadding {
|
||||
margin: -15px;
|
||||
}
|
||||
|
||||
.panel-content.nopadding .table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
margin-bottom: 0px;
|
||||
padding: 10px;
|
||||
position:fixed;
|
||||
bottom:0px;
|
||||
z-index:295;
|
||||
width: 100%;
|
||||
margin-right: -15px;
|
||||
margin-left: -15px;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
.form-actions .btn-group {
|
||||
padding-left: 10px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
.form-actions .more-btns{
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
}
|
||||
.form-actions .more-btns .btn:first-child{
|
||||
}
|
||||
.form-actions .more-btns .btn, .form-actions .more-btns .btn-group {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.form-actions .more-btns .btn,
|
||||
.form-actions .more-btns .btn-group {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#body-content {
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
.model_ul {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
.navbar.content-navbar {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
left: 0;
|
||||
top: 0px;
|
||||
z-index: 1030;
|
||||
border-radius: 0;
|
||||
}
|
||||
.content-navbar .navbar-toggle{
|
||||
padding: 3px 10px;
|
||||
font-size: 20px;
|
||||
color: white;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
.navbar-toggle.pull-left{
|
||||
margin-left: 15px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
.btn span{
|
||||
display: none;
|
||||
}
|
||||
.navbar-btn {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 10px;
|
||||
}
|
||||
.navbar-nav > .dropdown > .dropdown-menu{
|
||||
position: relative;
|
||||
float: none;
|
||||
max-height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
.navbar-nav > .dropdown > .dropdown-menu li>a{
|
||||
padding: 8px 20px;
|
||||
}
|
||||
.navbar-nav > .dropdown .dropdown-submenu > .dropdown-menu,
|
||||
.navbar-nav > .dropdown .dropdown-submenu > .popover{
|
||||
position: relative;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
margin: 10px;
|
||||
float: none;
|
||||
}
|
||||
.navbar-nav .dropdown-submenu .popover {
|
||||
max-width: none;
|
||||
}
|
||||
.navbar-nav .dropdown-submenu .popover .arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layout-btns {
|
||||
display: none;
|
||||
}
|
||||
.pagination.pagination-small{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* search form */
|
||||
.input-group.search-group{
|
||||
max-width: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.show-sm, .show-md, .show-lg, .hide-xs{
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
.show-xs, .show-md, .show-lg, .hide-sm{
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1199px) {
|
||||
.show-xs, .show-sm, .show-lg, .hide-md{
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.show-xs, .show-sm, .show-md, .hide-lg{
|
||||
display: none !important;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
.editable-handler .popover{
|
||||
width: auto;
|
||||
}
|
||||
.editable .popover-title{
|
||||
white-space:nowrap;
|
||||
}
|
||||
.editable .popover-title .close {
|
||||
margin: -4px 0px 0px 10px;
|
||||
}
|
||||
.editable form .btn-ajax{
|
||||
display: none;
|
||||
}
|
||||
.editable form .control-wrap{
|
||||
padding-right: 0px;
|
||||
}
|
||||
.editable form{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.editable form .controls{
|
||||
margin: 0px;
|
||||
padding: 0px !important;
|
||||
border: 0px;
|
||||
}
|
||||
.editable form .form-group {
|
||||
margin: 0px 0px 10px !important;
|
||||
}
|
||||
.editable form .control-label{
|
||||
display: none;
|
||||
}
|
||||
.editable form .controls label {
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.editable form .text-field,
|
||||
.editable form .textinput {
|
||||
width: 200px;
|
||||
}
|
||||
.editable form .int-field {
|
||||
width: 150px;
|
||||
}
|
||||
.editable form .textarea-field{
|
||||
width: 250px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.editable form select,
|
||||
.editable form .select2-container {
|
||||
max-width: 200px;
|
||||
min-width: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.popover.editpop{
|
||||
position: fixed;
|
||||
top: 30px !important;
|
||||
left: 10px !important;
|
||||
right: 10px !important;
|
||||
z-index: 1040;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
|
||||
.selector {
|
||||
position: relative;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
.selector-available, .selector-chosen {
|
||||
float: left;
|
||||
width: 45%;
|
||||
}
|
||||
.selector.stacked .selector-available, .selector.stacked .selector-chosen {
|
||||
width: 756px;
|
||||
}
|
||||
.selector p.title {
|
||||
padding: 7px 5px 0px 7px;
|
||||
font-size: 14px;
|
||||
line-height: 13px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.selector .selector-filter {
|
||||
width: 100%;
|
||||
}
|
||||
.selector .selector-available .selector-filter {
|
||||
}
|
||||
.selector .selector-chosen .selector-filter {
|
||||
}
|
||||
.selector.stacked .selector-filter input[type=text] {
|
||||
width: 716px !important;
|
||||
max-width: 716px !important;
|
||||
}
|
||||
.selector select[multiple=multiple] {
|
||||
margin: 0;
|
||||
padding-left: 3px;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
display: block;
|
||||
max-width: none !important;
|
||||
}
|
||||
.selector .selector-chosen select[multiple=multiple] {
|
||||
height: 230px;
|
||||
}
|
||||
.selector.stacked select[multiple=multiple] {
|
||||
width: 757px !important;
|
||||
max-width: 757px !important;
|
||||
}
|
||||
.selector ul.selector-chooser {
|
||||
float: left;
|
||||
margin: 100px 2px 0;
|
||||
padding: 0;
|
||||
width: 31px;
|
||||
list-style: none;
|
||||
}
|
||||
.selector ul.selector-chooser li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.selector.stacked ul.selector-chooser {
|
||||
margin: 4px 0 0 356px;
|
||||
width: 36px;
|
||||
}
|
||||
.selector.stacked ul.selector-chooser li {
|
||||
float: left;
|
||||
}
|
||||
a.selector-chooseall, a.selector-clearall {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 2px 7px;
|
||||
font-size: 11px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.selector-available, .selector-chosen {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
|
||||
background: #eee;
|
||||
}
|
||||
.selector h3, .inline-group .selector h3,
|
||||
.inline-related fieldset .selector-available h3, .inline-related fieldset .selector-chosen h3 {
|
||||
border: 0;
|
||||
border-bottom: 1px solid #d0d0d0;
|
||||
background: transparent;
|
||||
}
|
||||
.selector select[multiple=multiple] {
|
||||
border-left: 0;
|
||||
border-top: 1px solid #d0d0d0;
|
||||
border-bottom: 1px solid #d0d0d0;
|
||||
border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0;
|
||||
}
|
||||
|
||||
a.selector-chooseall, a.selector-clearall {
|
||||
border-top: 1px solid #e4e4e4;
|
||||
}
|
||||
|
||||
.selector h3 + select {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
a.selector-chooseall, a.selector-clearall {
|
||||
border-top: 1px solid #e4e4e4;
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
;(function($){
|
||||
|
||||
$.fn.exform = function(){
|
||||
this.each(function () {
|
||||
var form = $(this);
|
||||
for (var i = $.fn.exform.renders.length - 1; i >= 0; i--) {
|
||||
$.fn.exform.renders[i](form)
|
||||
};
|
||||
form.addClass('rended');
|
||||
})
|
||||
}
|
||||
$.fn.exform.renders = [];
|
||||
$(function() {
|
||||
$('.exform:not(.rended)').exform();
|
||||
});
|
||||
|
||||
$.getCookie = function(name) {
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
|
||||
//dropdown submenu plugin
|
||||
$(document)
|
||||
.on('click.xa.dropdown.data-api touchstart.xa.dropdown.data-api', '.dropdown-submenu', function (e) { e.stopPropagation(); })
|
||||
.on('click.xa.dropdown.data-api', function(e){
|
||||
$('.dropdown-submenu.open').removeClass('open');
|
||||
});
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('.dropdown-submenu a').on('click.xa.dropdown.data-api', function(e){
|
||||
$(this).parent().toggleClass('open');
|
||||
});
|
||||
} else{
|
||||
$('.dropdown-submenu').on('click.xa.dropdown.data-api mouseover.xa.dropdown.data-api', function(e){
|
||||
$(this).parent().find('>.dropdown-submenu.open').removeClass('open');
|
||||
$(this).addClass('open');
|
||||
});
|
||||
}
|
||||
|
||||
//toggle class button
|
||||
$('body').on('click.xa.togglebtn.data-api', '[data-toggle=class]', 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 className = $this.attr('data-class-name')
|
||||
$(target).toggleClass(className)
|
||||
})
|
||||
|
||||
// loading btn
|
||||
// $('.btn.btn-loading,.btn[type=submit]')
|
||||
// .click(function () {
|
||||
// var btn = $(this)
|
||||
// btn.button('loading')
|
||||
// })
|
||||
|
||||
//.nav-content bar nav-menu
|
||||
$('.navbar-xs .navbar-nav > li')
|
||||
.on('shown.bs.dropdown', function(e){
|
||||
$(this).find('>.dropdown-menu').css('max-height', $(window).height()-120);
|
||||
$(this).parent().find('>li').addClass('hidden-xs');
|
||||
$(this).removeClass('hidden-xs');
|
||||
})
|
||||
.on('hidden.bs.dropdown', function(e){
|
||||
$(this).parent().find('>li').removeClass('hidden-xs');
|
||||
});
|
||||
|
||||
// dashboard widget
|
||||
$('.widget-form').each(function(e){
|
||||
var el = $(this);
|
||||
el.find('.btn-remove').click(function(){
|
||||
el.find('input[name=_delete]').val('on');
|
||||
el.submit();
|
||||
});
|
||||
});
|
||||
|
||||
// g-search
|
||||
$('#g-search .dropdown-menu a').click(function(){
|
||||
$('#g-search').attr('action', $(this).data('action')).submit();
|
||||
})
|
||||
|
||||
// save settings
|
||||
$.save_user_settings = function(key, value, success, error){
|
||||
var csrftoken = $.getCookie('csrftoken');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: window.__admin_path_prefix__ + 'settings/user',
|
||||
data: {'key': key, 'value': value},
|
||||
success: success,
|
||||
error: error,
|
||||
beforeSend: function(xhr, settings) {
|
||||
xhr.setRequestHeader("X-CSRFToken", csrftoken);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery)
|
|
@ -0,0 +1,78 @@
|
|||
jQuery(function() {
|
||||
$( ".btn-quick-form" ).click(function(){
|
||||
var btn = $(this),
|
||||
form_url;
|
||||
if(btn.is('a')){
|
||||
form_url = btn.attr('href');
|
||||
}
|
||||
if(form_url == undefined){
|
||||
form_url = btn.data('form-url');
|
||||
}
|
||||
if(!btn.data('form-modal')){
|
||||
var modal = $('<div class="modal hide fade quick-form" role="dialog"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3>'+
|
||||
btn.attr('title') +'</h3></div><div class="modal-body"></div>'+
|
||||
'<div class="modal-footer"><button class="btn btn-default" data-dismiss="modal" aria-hidden="true">'+gettext('Close')+'</button>'+
|
||||
'<a class="btn btn-primary btn-submit">'+gettext('Save changes')+'</a></div></div>');
|
||||
$('body').append(modal);
|
||||
btn.data('form-modal', modal);
|
||||
modal.find('.modal-body').load(form_url, function(form_html, status, xhr){
|
||||
var form = $(this).find('form');
|
||||
form.exform();
|
||||
modal.find('.btn-submit').click(function(){
|
||||
var csrftoken = $.getCookie('csrftoken');
|
||||
//clean form errors
|
||||
form.find('.text-error,.help-inline.error').remove();
|
||||
form.find('.control-group').removeClass('error');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: form.attr('action'),
|
||||
data: form.serialize(),
|
||||
success: function(data){
|
||||
if(data['result'] != 'success' && data['errors']){
|
||||
var non_fields_errors = [];
|
||||
for (var i = data['errors'].length - 1; i >= 0; i--) {
|
||||
var e = data['errors'][i];
|
||||
var errdiv = form.find('#div_' + e['id']);
|
||||
if(errdiv.length){
|
||||
errdiv.addClass('error');
|
||||
var err_html = [];
|
||||
for (var i = e['errors'].length - 1; i >= 0; i--) {
|
||||
err_html.push('<span id="error_'+i+'_'+ e['id'] +'" class="help-inline error"><strong>'+e['errors'][i]+'</strong></span>');
|
||||
};
|
||||
errdiv.find('.controls').append(err_html.join('\n'));
|
||||
} else {
|
||||
non_fields_errors = non_fields_errors.concat(e['errors']);
|
||||
}
|
||||
};
|
||||
if(non_fields_errors.length){
|
||||
var err_html = [];
|
||||
for (var i = non_fields_errors.length - 1; i >= 0; i--) {
|
||||
err_html.push('<p class="text-error"><strong>'+e['errors'][i]+'</strong></p>');
|
||||
};
|
||||
form.prepend(err_html.join('\n'));
|
||||
}
|
||||
} else {
|
||||
btn.trigger('post-success');
|
||||
}
|
||||
},
|
||||
dataType: 'json',
|
||||
beforeSend: function(xhr, settings) {
|
||||
xhr.setRequestHeader("X-CSRFToken", csrftoken);
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
btn.data('form-modal').modal().css(
|
||||
{
|
||||
'margin-top': function () {
|
||||
return window.pageYOffset;
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn-quick-form').on('post-success', function(e){
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,51 @@
|
|||
;(function($){
|
||||
$(function() {
|
||||
var action_bar = $('.form-actions');
|
||||
if(action_bar.length){
|
||||
var height=action_bar[0].offsetTop + action_bar.outerHeight();
|
||||
var onchange = function(){
|
||||
var s=(document.body.scrollTop||document.documentElement.scrollTop) + window.innerHeight;
|
||||
if(s<height){action_bar.addClass('fixed');}
|
||||
else{action_bar.removeClass('fixed');}
|
||||
}
|
||||
window.onscroll=onchange;
|
||||
onchange();
|
||||
}
|
||||
if(window.__admin_ismobile__){
|
||||
$(window).bind('resize', function(e){
|
||||
var rate = $(window).height() / $(window).width();
|
||||
var action_bar = $('.form-actions');
|
||||
if(rate < 1){
|
||||
action_bar.css('display', 'none');
|
||||
} else {
|
||||
action_bar.css('display', 'block');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
var exform = $('.exform').first();
|
||||
if (exform.find('.text-error').length > 0){
|
||||
var first_activated = false;
|
||||
exform.find('.error').each(function(){
|
||||
if (!first_activated){
|
||||
var parent = $(this);
|
||||
while (!(parent.html() == exform.html())){
|
||||
if (parent.hasClass('tab-pane')){
|
||||
parent.addClass('active');
|
||||
parent.siblings().removeClass('active');
|
||||
var menu_tab = $('a[href="#' + parent.attr('id') + '"]');
|
||||
menu_tab.parent().addClass('active');
|
||||
menu_tab.parent().siblings().removeClass('active');
|
||||
first_activated = true;
|
||||
|
||||
}
|
||||
if (parent.hasClass('box-content')){
|
||||
parent.show();
|
||||
}
|
||||
parent = parent.parent();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})(jQuery)
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
jQuery(function($){
|
||||
//full screen btn
|
||||
$('.layout-btns .layout-full').click(function(e){
|
||||
var icon = $(this).find('i')
|
||||
if($(this).hasClass('active')){
|
||||
// reset
|
||||
$('#left-side, ul.breadcrumb').show('fast');
|
||||
$('#content-block').removeClass('col-md-12 col-sm-12 full-content').addClass('col-sm-11 col-md-10');
|
||||
icon.removeClass('fa-compress').addClass('fa-expand');
|
||||
$(window).trigger('resize');
|
||||
} else {
|
||||
// full screen
|
||||
$('#left-side, ul.breadcrumb').hide('fast', function(){
|
||||
$('#content-block').removeClass('col-sm-11 col-md-10').addClass('col-md-12 col-sm-12 full-content');
|
||||
icon.removeClass('fa-expand').addClass('fa-compress');
|
||||
$(window).trigger('resize');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('.layout-btns .layout-normal').click(function(e){
|
||||
$('.results table').removeClass('table-condensed');
|
||||
});
|
||||
|
||||
$('.layout-btns .layout-condensed').click(function(e){
|
||||
$('.results table').addClass('table-condensed');
|
||||
});
|
||||
|
||||
});
|
|
@ -0,0 +1,118 @@
|
|||
(function($) {
|
||||
|
||||
$.fn.actions = function(opts) {
|
||||
var options = $.extend({}, $.fn.actions.defaults, opts);
|
||||
var actionCheckboxes = $(this);
|
||||
|
||||
updateCounter = function() {
|
||||
var sel = $(actionCheckboxes).filter(":checked").length;
|
||||
|
||||
$(options.counterContainer).html(interpolate(
|
||||
ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), {
|
||||
sel: sel,
|
||||
cnt: _actions_icnt
|
||||
}, true));
|
||||
|
||||
if (sel == actionCheckboxes.length) {
|
||||
showQuestion();
|
||||
$(options.allToggle).prop('checked', true);
|
||||
} else {
|
||||
clearAcross();
|
||||
$(options.allToggle).prop('checked', false);
|
||||
}
|
||||
}
|
||||
showQuestion = function() {
|
||||
$(options.acrossClears).hide();
|
||||
$(options.acrossQuestions).show();
|
||||
$(options.allContainer).hide();
|
||||
}
|
||||
showClear = function() {
|
||||
$(options.acrossClears).show();
|
||||
$(options.acrossQuestions).hide();
|
||||
$(options.allContainer).show();
|
||||
$(options.counterContainer).hide();
|
||||
}
|
||||
reset = function() {
|
||||
$(options.acrossClears).hide();
|
||||
$(options.acrossQuestions).hide();
|
||||
$(options.allContainer).hide();
|
||||
$(options.counterContainer).show();
|
||||
}
|
||||
clearAcross = function() {
|
||||
reset();
|
||||
$(options.acrossInput).val(0);
|
||||
}
|
||||
|
||||
// Show counter by default
|
||||
$(options.counterContainer).show();
|
||||
$(options.allToggle).show().click(function() {
|
||||
$(actionCheckboxes).trigger('checker', $(this).is(":checked"));
|
||||
});
|
||||
|
||||
$("div.form-actions .question").click(function(event) {
|
||||
event.preventDefault();
|
||||
$(options.acrossInput).val(1);
|
||||
showClear();
|
||||
});
|
||||
$("div.form-actions .clear").click(function(event) {
|
||||
event.preventDefault();
|
||||
$(options.allToggle).prop("checked", false);
|
||||
$(actionCheckboxes).trigger('checker', false);
|
||||
clearAcross();
|
||||
});
|
||||
|
||||
$(actionCheckboxes).bind('checker', function(e, checked){
|
||||
$(this).prop("checked", checked)
|
||||
.parentsUntil('.grid-item').parent().toggleClass(options.selectedClass, checked);
|
||||
updateCounter();
|
||||
});
|
||||
|
||||
lastChecked = null;
|
||||
$(actionCheckboxes).click(function(event) {
|
||||
if (!event) { var event = window.event; }
|
||||
var target = event.target ? event.target : event.srcElement;
|
||||
|
||||
if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey == true) {
|
||||
var inrange = false;
|
||||
$(lastChecked).trigger('checker', target.checked);
|
||||
$(actionCheckboxes).each(function() {
|
||||
if ($.data(this) == $.data(lastChecked) || $.data(this) == $.data(target)) {
|
||||
inrange = (inrange) ? false : true;
|
||||
}
|
||||
if (inrange) {
|
||||
$(this).trigger('checker', target.checked);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(target).trigger('checker', target.checked);
|
||||
lastChecked = target;
|
||||
});
|
||||
|
||||
// Check state of checkboxes and reinit state if needed
|
||||
$(this).filter(":checked").trigger('checker', true);
|
||||
updateCounter();
|
||||
if ($(options.acrossInput).val() == 1) {
|
||||
showClear();
|
||||
}
|
||||
}
|
||||
/* Setup plugin defaults */
|
||||
$.fn.actions.defaults = {
|
||||
counterContainer: "div.form-actions .action-counter",
|
||||
allContainer: "div.form-actions .all",
|
||||
acrossInput: "div.form-actions #select-across",
|
||||
acrossQuestions: "div.form-actions .question",
|
||||
acrossClears: "div.form-actions .clear",
|
||||
allToggle: "#action-toggle",
|
||||
selectedClass: "warning"
|
||||
}
|
||||
|
||||
$.do_action = function(name){
|
||||
$('#action').val(name);
|
||||
$('#changelist-form').submit();
|
||||
}
|
||||
|
||||
$(document).ready(function($) {
|
||||
$(".results input.action-select").actions();
|
||||
});
|
||||
})(jQuery);
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
;(function($){
|
||||
|
||||
$('.batch-field-checkbox').bind('click', function(event){
|
||||
if (!event) { var event = window.event; }
|
||||
var target = event.target ? event.target : event.srcElement;
|
||||
|
||||
var wrap = $(this).parent().parent().find('.control-wrap');
|
||||
if(target.checked){
|
||||
wrap.show('fast');
|
||||
} else {
|
||||
wrap.hide('fast');
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery)
|
|
@ -0,0 +1,17 @@
|
|||
(function($) {
|
||||
|
||||
$(function(){
|
||||
$('#bookmark_form').each(function(){
|
||||
var f = $(this);
|
||||
f.submit(function(e){
|
||||
f.find('button[type=submit]').button('loading');
|
||||
$.post(f.attr('action'), f.serialize(), function(data){
|
||||
$('#bookmark-menu .add-bookmark').remove();
|
||||
$('#bookmark-menu').append('<li><a href="'+ data.url +'" title="'+ data.title +'"><i class="fa fa-bookmark"></i> '+ data.title +'</a></li>');
|
||||
}, 'json');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,58 @@
|
|||
$(document).ready(function(){
|
||||
|
||||
function showTooltip(x, y, contents) {
|
||||
$('<div id="chart-tooltip" class="tooltip-inner">' + contents + '</div>').css( {
|
||||
position: 'absolute',
|
||||
display: 'none',
|
||||
top: y + 5,
|
||||
left: x + 5
|
||||
}).appendTo("body").fadeIn(200);
|
||||
}
|
||||
|
||||
$.fn.chart = function(){
|
||||
$(this).each(function(){
|
||||
var $chart = $(this);
|
||||
|
||||
if($chart.data('chart-obj')) return;
|
||||
|
||||
$chart.html('<span class="text-muted"><i class="icon fa-spinner fa-spin"></i> Loading chart...</span>');
|
||||
|
||||
$.getJSON($chart.data('chart-url'), function(data){
|
||||
var chart = $.plot($chart, data.data, data.option);
|
||||
var previousPoint = null;
|
||||
$chart.bind("plothover", function (event, pos, item) {
|
||||
if (item) {
|
||||
if (previousPoint != item.dataIndex) {
|
||||
previousPoint = item.dataIndex;
|
||||
|
||||
$("#chart-tooltip").remove();
|
||||
var x = item.series.xaxis.tickFormatter(item.datapoint[0], item.series.xaxis),
|
||||
y = item.series.yaxis.tickFormatter(item.datapoint[1], item.series.yaxis);
|
||||
if (item.series.xaxis.options.mode=="categories") {
|
||||
x = item.series.data[item.dataIndex][0];
|
||||
}
|
||||
if (item.series.yaxis.options.mode=="categories") {
|
||||
y = item.series.data[item.dataIndex][1];
|
||||
}
|
||||
showTooltip(item.pageX, item.pageY,
|
||||
item.series.label + " :<br/>(" + x + " , " + y+")");
|
||||
}
|
||||
} else {
|
||||
$("#chart-tooltip").remove();
|
||||
previousPoint = null;
|
||||
}
|
||||
});
|
||||
$chart.data('chart-obj', chart);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
$('.chart-tab a').click(function(e){
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
|
||||
$($(this).attr('href')).chart();
|
||||
});
|
||||
$('.chart-tab a:first').click();
|
||||
$('.chart.init').chart();
|
||||
});
|
|
@ -0,0 +1,61 @@
|
|||
(function($){
|
||||
|
||||
var DetailsPop = function(element){
|
||||
this.$element = $(element);
|
||||
this.res_uri = this.$element.data('res-uri');
|
||||
this.edit_uri = this.$element.data('edit-uri');
|
||||
this.obj_data = null;
|
||||
|
||||
this.$element.on('click', $.proxy(this.click, this));
|
||||
};
|
||||
|
||||
DetailsPop.prototype = {
|
||||
constructor: DetailsPop,
|
||||
|
||||
click: function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var modal = $('#detail-modal-id');
|
||||
var el = this.$element;
|
||||
if(!modal.length){
|
||||
modal = $('<div id="detail-modal-id" class="modal fade detail-modal" role="dialog"><div class="modal-dialog"><div class="modal-content">'+
|
||||
'<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title">'+
|
||||
el.attr('title') +'</h4></div><div class="modal-body"></div>'+
|
||||
'<div class="modal-footer"><button class="btn btn-default" data-dismiss="modal" aria-hidden="true">'+gettext('Close')+'</button>'+
|
||||
'<a class="btn btn-submit btn-primary edit-btn"><i class="fa fa-pencil"></i> '+gettext('Edit')+'</a></div></div></div></div>');
|
||||
$('body').append(modal);
|
||||
}
|
||||
modal.find('.modal-title').html(el.attr('title'));
|
||||
var edit_btn = modal.find('.edit-btn');
|
||||
if(this.edit_uri != ""){
|
||||
edit_btn.attr('href', this.edit_uri);
|
||||
}else{
|
||||
edit_btn.remove();
|
||||
}
|
||||
modal.find('.modal-body').html('<h1 style="text-align:center;"><i class="fa-spinner fa-spin fa fa-large"></i></h1>');
|
||||
modal.find('.modal-body').load(this.res_uri + '?_format=html', function(response, status, xhr) {
|
||||
if (status == "error") {
|
||||
var msg = "Sorry but there was an error: ";
|
||||
modal.find('.modal-body').html(msg + xhr.status + " " + (typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!'));
|
||||
}
|
||||
});
|
||||
modal.modal();
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.details = function () {
|
||||
return this.each(function () {
|
||||
var $this = $(this), data = $this.data('details');
|
||||
if (!data) {
|
||||
$this.data('details', (data = new DetailsPop(this)));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$(function(){
|
||||
$('.details-handler').details();
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
|
||||
+function ($) { "use strict";
|
||||
|
||||
// POPOVER PUBLIC CLASS DEFINITION
|
||||
// ===============================
|
||||
|
||||
var Editpop = function (element, options) {
|
||||
this.einit('editpop', element, options)
|
||||
}
|
||||
|
||||
Editpop.DEFAULTS = $.extend({} , $.fn.popover.Constructor.DEFAULTS, {
|
||||
container: 'body'
|
||||
, trigger: 'manual'
|
||||
, placement: function(tip, el) {
|
||||
var $tip = $(tip)
|
||||
var $el = $(el)
|
||||
|
||||
var tip_width = $tip.width(),
|
||||
tip_height = $tip.height(),
|
||||
el_width = $el.width(),
|
||||
el_height = $el.height(),
|
||||
client_width = document.body.clientWidth,
|
||||
gap = 20
|
||||
|
||||
var top_gap = $el.offset().top - $("body").scrollTop() - 40,
|
||||
left_gap = $el.offset().left - $("body").scrollLeft(),
|
||||
right_gap = client_width - left_gap - el_width
|
||||
|
||||
if(top_gap > tip_height + gap && left_gap > tip_width/2 + gap && right_gap > tip_width/2 + gap){
|
||||
return 'top'
|
||||
}
|
||||
if(top_gap > tip_height/2){
|
||||
if(right_gap > tip_width + gap){
|
||||
return 'right'
|
||||
} else if(left_gap > tip_width + gap) {
|
||||
return 'left'
|
||||
}
|
||||
}
|
||||
return 'bottom'
|
||||
}
|
||||
, template: '<div class="popover editpop editable"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
||||
})
|
||||
|
||||
|
||||
// NOTE: POPOVER EXTENDS tooltip.js
|
||||
// ================================
|
||||
|
||||
Editpop.prototype = $.extend({}, $.fn.popover.Constructor.prototype)
|
||||
|
||||
Editpop.prototype.constructor = Editpop
|
||||
|
||||
Editpop.prototype.einit = function (type, element, options) {
|
||||
this.init(type, element, options)
|
||||
this.content = null
|
||||
this.$element.on('click.' + this.type, $.proxy(this.beforeToggle, this))
|
||||
|
||||
this.$text = this.$element.parent().parent().find('.editable-field')
|
||||
this.field = this.$element.data('editable-field')
|
||||
}
|
||||
|
||||
Editpop.prototype.getDefaults = function () {
|
||||
return Editpop.DEFAULTS
|
||||
}
|
||||
|
||||
Editpop.prototype.beforeToggle = function() {
|
||||
var $el = this.$element
|
||||
|
||||
if(this.content == null){
|
||||
var that = this
|
||||
$el.find('>i').removeClass('fa fa-edit').addClass('fa fa-spinner fa-spin')
|
||||
$.ajax({
|
||||
url: $el.data('editable-loadurl'),
|
||||
success: function(content){
|
||||
$el.find('>i').removeClass('fa fa-spinner fa-spin').addClass('fa fa-edit')
|
||||
that.content = content
|
||||
that.toggle()
|
||||
},
|
||||
dataType: 'html'
|
||||
})
|
||||
} else {
|
||||
this.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
Editpop.prototype.setContent = function () {
|
||||
var $tip = this.tip()
|
||||
var title = this.getTitle()
|
||||
|
||||
$tip.find('.popover-title').html('<button class="close" data-dismiss="editpop">×</button>' + title)
|
||||
$tip.find('.popover-content').html(this.content)
|
||||
|
||||
var $form = $tip.find('.popover-content > form')
|
||||
$form.exform()
|
||||
$form.submit($.proxy(this.submit, this))
|
||||
|
||||
this.$form = $form
|
||||
this.$mask = $('<div class="mask"><h2 style="text-align:center;"><i class="fa-spinner fa-spin fa fa-large"></i></h2></div>')
|
||||
$tip.find('.popover-content').prepend(this.$mask)
|
||||
|
||||
$tip.removeClass('fade top bottom left right in')
|
||||
|
||||
//bind events
|
||||
$tip.find('[data-dismiss=editpop]').on('click.' + this.type, $.proxy(this.leave, this, this))
|
||||
|
||||
var me = ((Math.random() * 10) + "").replace(/\D/g, '')
|
||||
var click_event_ns = "click." + me + " touchstart." + me
|
||||
var that = this
|
||||
|
||||
// $('body').on(click_event_ns, function(e) {
|
||||
// if ( !$tip.has(e.target).length ) { that.hide() }
|
||||
// })
|
||||
|
||||
$(document).bind('keyup.editpop', function(e) {
|
||||
if (e.keyCode == 27) { that.leave(that) }
|
||||
return
|
||||
})
|
||||
}
|
||||
|
||||
Editpop.prototype.hasContent = function () {
|
||||
return this.getTitle() || this.content
|
||||
}
|
||||
|
||||
Editpop.prototype.submit = function(e) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
|
||||
$.when(this.save())
|
||||
.done($.proxy(function(data) {
|
||||
this.$mask.hide()
|
||||
this.$mask.parents('.popover').hide()
|
||||
if(data['result'] != 'success' && data['errors']){
|
||||
var err_html = []
|
||||
for (var i = data['errors'].length - 1; i >= 0; i--) {
|
||||
var e = data['errors'][i]
|
||||
for (var j = e['errors'].length - 1; j >= 0; j--) {
|
||||
err_html.push('<span class="help-block error">'+e['errors'][j]+'</span>')
|
||||
}
|
||||
}
|
||||
this.$form.find(".control-group").addClass('has-error')
|
||||
this.$form.find('.controls').append(err_html.join('\n'))
|
||||
} else {
|
||||
this.$text.html(data['new_html'][this.field])
|
||||
this.leave(this)
|
||||
}
|
||||
}, this))
|
||||
.fail($.proxy(function(xhr) {
|
||||
this.$mask.hide()
|
||||
this.$mask.parents('.popover').hide()
|
||||
alert(typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!');
|
||||
}, this))
|
||||
}
|
||||
|
||||
Editpop.prototype.save = function(newValue) {
|
||||
this.$form.find('.control-group').removeClass('has-error')
|
||||
this.$form.find('.controls .help-block.error').remove()
|
||||
|
||||
this.$mask.show()
|
||||
|
||||
var off_check_box = Object();
|
||||
this.$form.find('input[type=checkbox]').each(function(){
|
||||
if(!$(this).is(':checked')){
|
||||
off_check_box[$(this).attr('name')] = ''
|
||||
}
|
||||
})
|
||||
|
||||
return $.ajax({
|
||||
data: [this.$form.serialize(), $.param(off_check_box)].join('&'),
|
||||
url: this.$form.attr('action'),
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
beforeSend: function(xhr, settings) {
|
||||
xhr.setRequestHeader("X-CSRFToken", $.getCookie('csrftoken'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// POPOVER PLUGIN DEFINITION
|
||||
// =========================
|
||||
|
||||
var old = $.fn.editpop
|
||||
|
||||
$.fn.editpop = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('bs.editpop')
|
||||
var options = typeof option == 'object' && options
|
||||
|
||||
if (!data) $this.data('bs.editpop', (data = new Editpop(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.editpop.Constructor = Editpop
|
||||
|
||||
|
||||
// POPOVER NO CONFLICT
|
||||
// ===================
|
||||
|
||||
$.fn.editpop.noConflict = function () {
|
||||
$.fn.editpop = old
|
||||
return this
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('.editable-handler').editpop();
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
|
@ -0,0 +1,57 @@
|
|||
(function($) {
|
||||
|
||||
$(function(){
|
||||
|
||||
// filter
|
||||
$('.filter-multiselect input[type=checkbox]').click(function(e){
|
||||
window.location.href = $(this).parent().attr('href');
|
||||
});
|
||||
|
||||
// menber filter
|
||||
$('.filter-number .remove').click(function(e){
|
||||
$(this).parent().parent().find('input[type="number"]').val('');
|
||||
});
|
||||
|
||||
$('.filter-number .toggle').click(function(e){
|
||||
var new_name = $(this).hasClass('active') ? $(this).attr('data-off-name') : $(this).attr('data-on-name');
|
||||
$(this).parent().parent().find('input[type="number"]').attr('name', new_name);
|
||||
});
|
||||
|
||||
$('#filter-menu form').submit(function(){
|
||||
$(this).find('input[type="text"],input[type="number"]').each(function(e){
|
||||
if(!$(this).val()) $(this).attr('name', '');
|
||||
});
|
||||
return true;
|
||||
});
|
||||
|
||||
$('.menu-date-range form').each(function(){
|
||||
var el = $(this);
|
||||
var start_date = el.find('.calendar.date-start').datepicker({format: 'yyyy-mm-dd', language: 'xadmin'});
|
||||
var end_date = el.find('.calendar.date-end').datepicker({format: 'yyyy-mm-dd', language: 'xadmin'});
|
||||
|
||||
var checkAvailable = function(){
|
||||
if(start_date.data('datepicker').getDate().valueOf() <= end_date.data('datepicker').getDate().valueOf()){
|
||||
el.find('button[type=submit]').removeAttr('disabled');
|
||||
} else {
|
||||
el.find('button[type=submit]').attr('disabled', 'disabled');
|
||||
}
|
||||
}
|
||||
|
||||
start_date.on('changeDate', function(ev){
|
||||
var startdate = start_date.data('date');
|
||||
el.find('.start_input').val(startdate);
|
||||
end_date.data('datepicker').setStartDate(startdate);
|
||||
checkAvailable();
|
||||
});
|
||||
end_date.on('changeDate', function(ev){
|
||||
var enddate = end_date.data('date');
|
||||
el.find('.end_input').val(enddate);
|
||||
start_date.data('datepicker').setEndDate(enddate);
|
||||
checkAvailable();
|
||||
});
|
||||
|
||||
checkAvailable();
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,145 @@
|
|||
;(function($) {
|
||||
$.fn.formset = function(opts){
|
||||
var $$ = $(this);
|
||||
|
||||
var options = $.extend({
|
||||
prefix: $$.data('prefix')
|
||||
}, $.fn.formset.styles[$$.data('style')], opts),
|
||||
|
||||
updateElementIndex = function(elem, prefix, ndx) {
|
||||
var idRegex = new RegExp(prefix + '-(\\d+|__prefix__)-'),
|
||||
replacement = prefix + '-' + ndx + '-';
|
||||
if (elem.attr("for")) elem.attr("for", elem.attr("for").replace(idRegex, replacement));
|
||||
if (elem.attr('id')) elem.attr('id', elem.attr('id').replace(idRegex, replacement));
|
||||
if (elem.attr('name')) elem.attr('name', elem.attr('name').replace(idRegex, replacement));
|
||||
if (elem.attr('href')) elem.attr('href', elem.attr('href').replace(idRegex, replacement));
|
||||
elem.find('.formset-num').html(ndx + 1);
|
||||
},
|
||||
|
||||
hasChildElements = function(row) {
|
||||
return row.find('input,select,textarea,label,div,a').length > 0;
|
||||
},
|
||||
|
||||
updateRowIndex = function(row, i){
|
||||
if (options.update) options.update(row, (function(elem){
|
||||
updateElementIndex(elem, options.prefix, i);
|
||||
}));
|
||||
updateElementIndex(row, options.prefix, i);
|
||||
row.find('input,select,textarea,label,div,a').each(function() {
|
||||
updateElementIndex($(this), options.prefix, i);
|
||||
});
|
||||
row.data('row-index', i);
|
||||
},
|
||||
|
||||
insertDeleteLink = function(row) {
|
||||
row.find('a.delete-row').click(function() {
|
||||
var row = $(this).parents(".formset-row"),
|
||||
del = row.find('input[id $= "-DELETE"]');
|
||||
|
||||
if (options.removed) options.removed(row, del, $$);
|
||||
|
||||
if (del.length) {
|
||||
if(del.val() == 'on'){
|
||||
row.removeClass('row-deleted');
|
||||
} else {
|
||||
row.addClass('row-deleted');
|
||||
}
|
||||
del.val(del.val() == 'on'?'':'on');
|
||||
} else {
|
||||
var parent = row.parent();
|
||||
row.remove();
|
||||
var forms = parent.find('.formset-row');
|
||||
$('#id_' + options.prefix + '-TOTAL_FORMS').val(forms.length);
|
||||
for (var i=0, formCount=forms.length; i<formCount; i++) {
|
||||
updateRowIndex(forms.eq(i), i);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
$$.find(".formset-row").each(function(i) {
|
||||
insertDeleteLink($(this));
|
||||
});
|
||||
|
||||
if ($$.length) {
|
||||
var template, el = $('#' + options.prefix + '-empty');
|
||||
if(el.is('textarea')) {
|
||||
template = el.val();
|
||||
} else if(el.is('span')) {
|
||||
template = el.html();
|
||||
}else if(el.is('script')) {
|
||||
template = el.html();
|
||||
}
|
||||
|
||||
template = el.html(template).text(); // decoded
|
||||
template = $($.parseHTML(template));
|
||||
|
||||
template.removeAttr('id');
|
||||
if(template.data("replace-id")){
|
||||
template.attr('id', template.data("replace-id"));
|
||||
template.removeAttr('data-replace-id');
|
||||
}
|
||||
options.formTemplate = template;
|
||||
|
||||
$('#' + options.prefix + '-add-row').click(function() {
|
||||
var formCount = parseInt($('#id_' + options.prefix + '-TOTAL_FORMS').val()),
|
||||
row = options.formTemplate.clone(true).removeClass('empty-form');
|
||||
updateRowIndex(row, formCount);
|
||||
row.appendTo($$);
|
||||
insertDeleteLink(row);
|
||||
row.exform();
|
||||
$('#id_' + options.prefix + '-TOTAL_FORMS').val(formCount + 1);
|
||||
// If a post-add callback was supplied, call it with the added form:
|
||||
if (options.added) options.added(row, $$);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
return $$;
|
||||
}
|
||||
|
||||
$.fn.formset.styles = {
|
||||
'tab': {
|
||||
added: function(row, $$){
|
||||
var new_tab = $('<li><a data-toggle="tab" href="#'+ row.attr('id') +'">#<span class="formset-num">'+ (row.data('row-index') + 1) +'</span></a></li>');
|
||||
$$.parent().find('.nav-tabs').append(new_tab);
|
||||
new_tab.find('a').tab('show');
|
||||
},
|
||||
update: function(row, update){
|
||||
var rowId = row.attr('id');
|
||||
if(rowId){
|
||||
$('a[href=#'+rowId+']').each(function(){
|
||||
update($(this));
|
||||
})
|
||||
}
|
||||
},
|
||||
removed: function(row, del, $$){
|
||||
var rowId = row.attr('id');
|
||||
if(rowId){
|
||||
var tab = $('a[href=#'+rowId+']');
|
||||
if (del.length) {
|
||||
if(del.val() == 'on'){
|
||||
tab.removeClass('row-deleted');
|
||||
} else {
|
||||
tab.addClass('row-deleted');
|
||||
}
|
||||
} else {
|
||||
if(tab.parent().next().length){
|
||||
tab.parent().next().find('a').tab('show');
|
||||
} else {
|
||||
tab.parent().prev().find('a').tab('show');
|
||||
}
|
||||
tab.parent().remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$(function(){
|
||||
$('.formset-content').each(function(){
|
||||
$(this).formset();
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
|
@ -0,0 +1,12 @@
|
|||
$("#export-menu").click(function () {
|
||||
$("input[name='_select_across']").val($("input[name='select_across']").val());
|
||||
if (0 == $("input[name='select_across']").val()) {
|
||||
var selectedRecords = [];
|
||||
$.each($('.action-select'), function () {
|
||||
if (true == $(this).prop('checked')) {
|
||||
selectedRecords.push($(this).val());
|
||||
}
|
||||
});
|
||||
$("input[name='_selected_actions']").val(selectedRecords.join(','));
|
||||
}
|
||||
});
|
|
@ -0,0 +1,30 @@
|
|||
jQuery(function() {
|
||||
$( ".column" ).sortable({
|
||||
connectWith: ".column",
|
||||
handle: '.panel-heading',
|
||||
forcePlaceholderSize: true,
|
||||
cursor: "move",
|
||||
cancel: ".unsort, .tab-content",
|
||||
stop: function( event, ui ) {
|
||||
var pos = [];
|
||||
$('.column').each(function(){
|
||||
var col = [];
|
||||
$(this).find('.panel').each(function(){
|
||||
col.push($(this).attr('id'));
|
||||
});
|
||||
pos.push(col.join(','));
|
||||
});
|
||||
var pos_val = pos.join('|');
|
||||
var key = $('#_portal_key').val();
|
||||
$.save_user_settings(key, pos_val, function(){
|
||||
//alert('success');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$( ".panel-heading .icon.chevron" ).click(function() {
|
||||
$( this ).toggleClass( "fa fa-chevron-up" ).toggleClass( "fa fa-chevron-down" );
|
||||
$( this ).parents( ".panel:first" ).find( ".panel-body" ).toggle('fast');
|
||||
});
|
||||
|
||||
});
|
|
@ -0,0 +1,231 @@
|
|||
|
||||
;(function($){
|
||||
|
||||
$('form.widget-form').on('post-success', function(e, data){
|
||||
$(this).data('ajaxform').clean()
|
||||
$('.alert-success #change-link').attr('href', data['change_url'])
|
||||
$('.alert-success').show()
|
||||
})
|
||||
|
||||
var AjaxForm = function(element, options) {
|
||||
var that = this
|
||||
|
||||
this.$form = $(element)
|
||||
this.ainit()
|
||||
}
|
||||
|
||||
AjaxForm.prototype = {
|
||||
|
||||
constructor: AjaxForm
|
||||
|
||||
, ainit: function(){
|
||||
this.$mask = $('<div class="mask"><h1 style="text-align:center;"><i class="fa-spinner fa-spin fa fa-large"></i></h1></div>')
|
||||
|
||||
this.$form.prepend(this.$mask)
|
||||
this.$form.submit($.proxy(this.submit, this))
|
||||
|
||||
this.$form.find('input, select, textarea').each(function(){
|
||||
var el = $(this)
|
||||
if (el.is("[type=checkbox]")) {
|
||||
el.data('init-value', el.attr('checked'))
|
||||
} else if (el.is("select")) {
|
||||
el.data('init-value', el[0].selectedIndex)
|
||||
} else {
|
||||
el.data('init-value', el.val())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
, clean: function(){
|
||||
this.$form.find('input, select, textarea').each(function(){
|
||||
var el = $(this)
|
||||
if (el.is("[type=checkbox]")) {
|
||||
el.removeAttr('checked')
|
||||
} else if (el.is("select")) {
|
||||
el[0].selectedIndex = el.data('init-value')||0
|
||||
} else {
|
||||
el.val(el.data('init-value')||'')
|
||||
}
|
||||
el.change()
|
||||
})
|
||||
}
|
||||
|
||||
, submit: function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$.when(this.save())
|
||||
.done($.proxy(function(data) {
|
||||
this.$mask.hide();
|
||||
|
||||
this.$form.find('submit, button[type=submit], input[type=submit]').removeClass('disabled');
|
||||
this.$form.find('.alert-success').hide()
|
||||
|
||||
if(data['result'] != 'success' && data['errors']){
|
||||
var non_fields_errors = []
|
||||
for (var i = data['errors'].length - 1; i >= 0; i--) {
|
||||
var e = data['errors'][i]
|
||||
var errdiv = this.$form.find('#div_' + e['id'])
|
||||
if(errdiv.length){
|
||||
errdiv.addClass('has-error')
|
||||
var err_html = []
|
||||
for (var j = e['errors'].length - 1; j >= 0; j--) {
|
||||
err_html.push('<span id="error_'+j+'_'+ e['id'] +'" class="text-danger">'+e['errors'][j]+'</span>')
|
||||
}
|
||||
errdiv.find('.controls').append(err_html.join('\n'))
|
||||
} else {
|
||||
non_fields_errors = non_fields_errors.concat(e['errors'])
|
||||
}
|
||||
}
|
||||
if(non_fields_errors.length){
|
||||
var err_html = []
|
||||
for (var i = non_fields_errors.length - 1; i >= 0; i--) {
|
||||
err_html.push('<p class="text-danger"><strong>'+e['errors'][i]+'</strong></p>')
|
||||
}
|
||||
this.$form.prepend(err_html.join('\n'))
|
||||
}
|
||||
} else {
|
||||
this.$form.trigger('post-success', data);
|
||||
}
|
||||
}, this))
|
||||
.fail($.proxy(function(xhr) {
|
||||
this.$mask.hide();
|
||||
alert(typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!');
|
||||
}, this));
|
||||
}
|
||||
, save: function(newValue) {
|
||||
|
||||
this.$form.find('.text-error, .help-inline.error').remove();
|
||||
this.$form.find('.control-group').removeClass('error');
|
||||
|
||||
this.$mask.show();
|
||||
this.$form.find('submit, button[type=submit], input[type=submit]').addClass('disabled');
|
||||
|
||||
var off_check_box = Object();
|
||||
// this.$form.find('input[type=checkbox]').each(function(){
|
||||
// if(!$(this).attr('checked')){
|
||||
// off_check_box[$(this).attr('name')] = '';
|
||||
// }
|
||||
// })
|
||||
|
||||
return $.ajax({
|
||||
data: [this.$form.serialize(), $.param(off_check_box)].join('&'),
|
||||
url: this.$form.attr('action'),
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
beforeSend: function(xhr, settings) {
|
||||
xhr.setRequestHeader("X-CSRFToken", $.getCookie('csrftoken'));
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
$.fn.ajaxform = function ( option ) {
|
||||
var args = Array.apply(null, arguments);
|
||||
args.shift();
|
||||
return this.each(function () {
|
||||
var $this = $(this),
|
||||
data = $this.data('ajaxform'),
|
||||
options = typeof option == 'object' && option;
|
||||
if (!data) {
|
||||
$this.data('ajaxform', (data = new AjaxForm(this)));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.ajaxform.Constructor = AjaxForm
|
||||
|
||||
$.fn.exform.renders.push(function(f){
|
||||
if (f.is('.quick-form')) {
|
||||
f.ajaxform()
|
||||
}
|
||||
})
|
||||
|
||||
var QuickAddBtn = function(element, options) {
|
||||
var that = this;
|
||||
|
||||
this.$btn = $(element)
|
||||
this.add_url = this.$btn.attr('href')
|
||||
this.$for_input = $('#' + this.$btn.data('for-id'))
|
||||
this.$for_wrap = $('#' + this.$btn.data('for-id') + '_wrap_container')
|
||||
this.refresh_url = this.$btn.data('refresh-url')
|
||||
this.rendered_form = false
|
||||
|
||||
this.binit(element, options);
|
||||
}
|
||||
|
||||
QuickAddBtn.prototype = {
|
||||
|
||||
constructor: QuickAddBtn
|
||||
|
||||
, binit: function(element, options){
|
||||
this.$btn.click($.proxy(this.click, this))
|
||||
}
|
||||
, click: function(e) {
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
|
||||
if(!this.modal){
|
||||
var modal = $('<div class="modal fade quick-form" role="dialog"><div class="modal-dialog"><div class="modal-content">'+
|
||||
'<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3>'+
|
||||
this.$btn.attr('title') +'</h3></div><div class="modal-body"></div>'+
|
||||
'<div class="modal-footer" style="display: none;"><button class="btn btn-default" data-dismiss="modal" aria-hidden="true">'+gettext('Close')+'</button>'+
|
||||
'<a class="btn btn-primary btn-submit">'+gettext('Add')+'</a></div></div></div></div>')
|
||||
$('body').append(modal)
|
||||
|
||||
var self = this
|
||||
modal.find('.modal-body').html('<h2 style="text-align:center;"><i class="fa-spinner fa-spin fa fa-large"></i></h2>')
|
||||
modal.find('.modal-body').load(this.add_url, function(form_html, status, xhr){
|
||||
var form = $(this).find('form')
|
||||
form.addClass('quick-form')
|
||||
form.on('post-success', $.proxy(self.post, self))
|
||||
form.exform()
|
||||
|
||||
modal.find('.modal-footer').show()
|
||||
modal.find('.btn-submit').click(function(){form.submit()})
|
||||
|
||||
self.$form = form
|
||||
})
|
||||
this.modal = modal
|
||||
}
|
||||
this.modal.modal();
|
||||
|
||||
return false
|
||||
}
|
||||
, post: function(e, data){
|
||||
this.$form.data('ajaxform').clean();
|
||||
var wrap = this.$for_wrap;
|
||||
var input = this.$for_input;
|
||||
var selected = [data['obj_id']];
|
||||
if (input.attr('multiple')){
|
||||
var opt = 'option';
|
||||
if (input.hasClass('selectdropdown') || input.hasClass('select-multi')){
|
||||
opt = 'option:selected';
|
||||
}
|
||||
selected.push($.map(input.find(opt) ,function(opt) { return opt.value; }));
|
||||
}
|
||||
$.get(this.refresh_url + selected.join() ,function(form_html, status, xhr){
|
||||
wrap.html($('<body>' + form_html + '</body>').find('#' + wrap.attr('id')).html());
|
||||
wrap.exform();
|
||||
});
|
||||
this.modal.modal('hide');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.fn.ajax_addbtn = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this), data = $this.data('ajax_addbtn');
|
||||
if (!data) {
|
||||
$this.data('ajax_addbtn', (data = new QuickAddBtn(this)));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.ajax_addbtn.Constructor = QuickAddBtn
|
||||
|
||||
$.fn.exform.renders.push(function(f){
|
||||
f.find('a.btn-ajax').ajax_addbtn()
|
||||
})
|
||||
|
||||
})(jQuery)
|
|
@ -0,0 +1,49 @@
|
|||
;(function($){
|
||||
$('[data-toggle=tooltip]').tooltip();
|
||||
var max=10;
|
||||
|
||||
function addShowMore($,v){
|
||||
$(v).nextUntil('li.nav-header').last().after(
|
||||
$('<li class="filter-multiselect"><a class="small filter-item" href="#"><input class="filter-col-1" type="checkbox"><span class="filter-col-2">Show more</span></a></li>').click(function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$(v).nextUntil('li.nav-header').show();
|
||||
$(v).nextUntil('li.nav-header').last().remove();
|
||||
addShowLess($,v);
|
||||
})
|
||||
);
|
||||
$(v).nextUntil('li.nav-header').last().show();
|
||||
}
|
||||
|
||||
function addShowLess($,v){
|
||||
$(v).nextUntil('li.nav-header').last().after(
|
||||
$('<li class="filter-multiselect"><a class="small filter-item" href="#"><input class="filter-col-1" type="checkbox"><span class="filter-col-2">Show less</span></a></li>').click(function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$(v).nextUntil('li.nav-header').filter(function(i){return !$(this).find('input').is(':checked');}).slice(max).hide();
|
||||
$(v).nextUntil('li.nav-header').last().remove();
|
||||
$(v).scrollMinimal(3000);
|
||||
addShowMore($,v);
|
||||
})
|
||||
);
|
||||
$(v).nextUntil('li.nav-header').last().show();
|
||||
}
|
||||
|
||||
$.each($('.nav-quickfilter li.nav-header'),function(i,v){
|
||||
if ($(v).nextUntil('li.nav-header').size()>max) {
|
||||
$(v).nextUntil('li.nav-header').filter(function(i){return !$(this).find('input').is(':checked');}).slice(max).hide();
|
||||
addShowMore($,v);
|
||||
}
|
||||
});
|
||||
|
||||
$('.nav-quickfilter li.nav-header').on('click',function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$('.nav-quickfilter li.nav-header i').toggleClass('icon-chevron-right');
|
||||
$('.nav-quickfilter li.nav-header i').toggleClass('icon-chevron-left');
|
||||
$('#left-side').toggleClass('col-md-2');
|
||||
$('#left-side').toggleClass('col-md-4');
|
||||
$('#content-block').toggleClass('col-md-10');
|
||||
$('#content-block').toggleClass('col-md-8');
|
||||
});
|
||||
})(jQuery)
|
|
@ -0,0 +1,22 @@
|
|||
(function($) {
|
||||
|
||||
$.dofresh = function(){
|
||||
var refresh_el = $('#refresh_time');
|
||||
var time = parseInt(refresh_el.text());
|
||||
if(time == 1){
|
||||
refresh_el.text(0);
|
||||
window.location.reload();
|
||||
} else {
|
||||
refresh_el.text(time-1);
|
||||
setTimeout("$.dofresh()",1000)
|
||||
}
|
||||
};
|
||||
|
||||
$(function(){
|
||||
var refresh_el = $('#refresh_time');
|
||||
if(refresh_el){
|
||||
setTimeout("$.dofresh()",1000)
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,28 @@
|
|||
jQuery(function($){
|
||||
$('.diff_field').each(function(){
|
||||
var el = $(this);
|
||||
var textarea = el.find('textarea.org-data');
|
||||
var title = el.data('org-data') || el.attr('title');
|
||||
if(textarea.length){
|
||||
title = textarea.val();
|
||||
}
|
||||
el.find('.controls').tooltip({
|
||||
title: title,
|
||||
html: true
|
||||
})
|
||||
});
|
||||
|
||||
$('.formset-content .formset-row').each(function(){
|
||||
var row = $(this);
|
||||
var del = row.find('input[id $= "-DELETE"]');
|
||||
if(del.val() == 'on' || del.val() == 'True'){
|
||||
row.addClass('row-deleted');
|
||||
del.val('on');
|
||||
}
|
||||
var idinput = row.find('input[id $= "-id"]');
|
||||
if(idinput.val() == '' || idinput.val() == undefined){
|
||||
row.addClass('row-added');
|
||||
row.find('.formset-num').html(gettext('New Item'));
|
||||
}
|
||||
});
|
||||
});
|
|
@ -0,0 +1,49 @@
|
|||
(function($) {
|
||||
$(function() {
|
||||
$.ajaxSetup({
|
||||
beforeSend: function(xhr, settings) {
|
||||
function getCookie(name) {
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
// Does this cookie string begin with the name we want?
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
if (!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings.url))) {
|
||||
// Only send the token to relative URLs i.e. locally.
|
||||
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(".results table tbody").sortable({
|
||||
axis: 'y',
|
||||
items: 'tr',
|
||||
cursor: 'move',
|
||||
opacity: 0.8,
|
||||
update: function(event, ui) {
|
||||
var $rows = $(this);
|
||||
$("#save-order").on("click", function(e) {
|
||||
$.ajax({
|
||||
url: $(this).attr('post-url'),
|
||||
method: 'POST',
|
||||
data: $rows.sortable('serialize', {
|
||||
attribute: 'order-key',
|
||||
expression: (/(.+)_(.+)/),
|
||||
})
|
||||
});
|
||||
location.reload();
|
||||
}).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,95 @@
|
|||
(function($) {
|
||||
|
||||
$.setCookie = function(name, value, options){
|
||||
options = options || {};
|
||||
if (value === null) {
|
||||
value = '';
|
||||
options.expires = -1;
|
||||
}
|
||||
var expires = '';
|
||||
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
||||
var date;
|
||||
if (typeof options.expires == 'number') {
|
||||
date = new Date();
|
||||
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
||||
} else {
|
||||
date = options.expires;
|
||||
}
|
||||
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
||||
}
|
||||
var path = options.path ? '; path=' + options.path : '';
|
||||
var domain = options.domain ? '; domain=' + options.domain : '';
|
||||
var secure = options.secure ? '; secure' : '';
|
||||
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var top_nav = $('#top-nav');
|
||||
$('#body-content').css('margin-top', (top_nav.height() + 15) + 'px');
|
||||
|
||||
if($("#g-theme-menu")){
|
||||
$('#g-theme-menu li>a').click(function(){
|
||||
var $el = $(this);
|
||||
var themeHref = $el.data('css-href');
|
||||
|
||||
var topmenu = $('#top-nav .navbar-collapse');
|
||||
if(topmenu.data('bs.collapse')) topmenu.collapse('hide');
|
||||
|
||||
var modal = $('<div id="load-theme-modal" class="modal fade" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4>'+
|
||||
'Loading theme</h4></div><div class="modal-body"><h2 style="text-align:center;"><i class="fa-spinner fa-spin fa fa-large"></i></h2></div></div></div></div>');
|
||||
$('body').append(modal);
|
||||
|
||||
modal.on('shown.bs.modal', function(){
|
||||
$.save_user_settings("site-theme", themeHref, function(){
|
||||
$.setCookie('_theme', themeHref);
|
||||
|
||||
var iframe = document.createElement("IFRAME");
|
||||
iframe.style.display = 'none';
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
modal.on('hidden', function(e){
|
||||
if(iframe){
|
||||
$(iframe).unbind('load');
|
||||
iframe.parentNode.removeChild(iframe);
|
||||
iframe = null;
|
||||
}
|
||||
modal.remove();
|
||||
});
|
||||
|
||||
$(iframe).load(function () {
|
||||
$('#site-theme').attr('href', themeHref);
|
||||
|
||||
setTimeout(function(){
|
||||
var nav_height = $('#top-nav').height();
|
||||
$('#body-content').animate({'margin-top': (nav_height + 15)}, 500, 'easeOutBounce');
|
||||
}, 500);
|
||||
|
||||
modal.modal('hide');
|
||||
iframe.parentNode.removeChild(iframe);
|
||||
iframe = null;
|
||||
})
|
||||
|
||||
var ifmDoc = iframe.contentDocument || iframe.contentWindow.document;
|
||||
ifmDoc.open();
|
||||
ifmDoc.write('<!doctype><html><head></head><body>');
|
||||
ifmDoc.write('<link rel="stylesheet" href="'+themeHref+'" />');
|
||||
ifmDoc.write('</body></html>');
|
||||
ifmDoc.close();
|
||||
|
||||
|
||||
$('#g-theme-menu li').removeClass('active');
|
||||
$el.parent().addClass('active');
|
||||
});
|
||||
})
|
||||
|
||||
modal.modal().css(
|
||||
{
|
||||
'margin-top': function () {
|
||||
return window.pageYOffset;
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,132 @@
|
|||
/* include breakpoints.js
|
||||
Breakpoints.js
|
||||
version 1.0
|
||||
|
||||
Creates handy events for your responsive design breakpoints
|
||||
|
||||
Copyright 2011 XOXCO, Inc
|
||||
http://xoxco.com/
|
||||
|
||||
Documentation for this plugin lives here:
|
||||
http://xoxco.com/projects/code/breakpoints
|
||||
|
||||
Licensed under the MIT license:
|
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
var lastSize = 0;
|
||||
var interval = null;
|
||||
|
||||
$.fn.resetBreakpoints = function() {
|
||||
$(window).unbind('resize');
|
||||
if (interval) {
|
||||
clearInterval(interval);
|
||||
}
|
||||
lastSize = 0;
|
||||
};
|
||||
|
||||
$.fn.setBreakpoints = function(settings) {
|
||||
var options = jQuery.extend({
|
||||
distinct: true,
|
||||
breakpoints: new Array(320,480,768,1024)
|
||||
},settings);
|
||||
|
||||
|
||||
interval = setInterval(function() {
|
||||
|
||||
var w = $(window).width();
|
||||
var done = false;
|
||||
|
||||
for (var bp in options.breakpoints.sort(function(a,b) { return (b-a) })) {
|
||||
|
||||
// fire onEnter when a browser expands into a new breakpoint
|
||||
// if in distinct mode, remove all other breakpoints first.
|
||||
if (!done && w >= options.breakpoints[bp] && lastSize < options.breakpoints[bp]) {
|
||||
if (options.distinct) {
|
||||
for (var x in options.breakpoints.sort(function(a,b) { return (b-a) })) {
|
||||
if ($('body').hasClass('breakpoint-' + options.breakpoints[x])) {
|
||||
$('body').removeClass('breakpoint-' + options.breakpoints[x]);
|
||||
$(window).trigger('exitBreakpoint' + options.breakpoints[x]);
|
||||
}
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
$('body').addClass('breakpoint-' + options.breakpoints[bp]);
|
||||
$(window).trigger('enterBreakpoint' + options.breakpoints[bp]);
|
||||
|
||||
}
|
||||
|
||||
// fire onExit when browser contracts out of a larger breakpoint
|
||||
if (w < options.breakpoints[bp] && lastSize >= options.breakpoints[bp]) {
|
||||
$('body').removeClass('breakpoint-' + options.breakpoints[bp]);
|
||||
$(window).trigger('exitBreakpoint' + options.breakpoints[bp]);
|
||||
|
||||
}
|
||||
|
||||
// if in distinct mode, fire onEnter when browser contracts into a smaller breakpoint
|
||||
if (
|
||||
options.distinct && // only one breakpoint at a time
|
||||
w >= options.breakpoints[bp] && // and we are in this one
|
||||
w < options.breakpoints[bp-1] && // and smaller than the bigger one
|
||||
lastSize > w && // and we contracted
|
||||
lastSize >0 && // and this is not the first time
|
||||
!$('body').hasClass('breakpoint-' + options.breakpoints[bp]) // and we aren't already in this breakpoint
|
||||
) {
|
||||
$('body').addClass('breakpoint-' + options.breakpoints[bp]);
|
||||
$(window).trigger('enterBreakpoint' + options.breakpoints[bp]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// set up for next call
|
||||
if (lastSize != w) {
|
||||
lastSize = w;
|
||||
}
|
||||
},250);
|
||||
};
|
||||
|
||||
var enterPhone = function(){
|
||||
$('.content-navbar .navbar-brand').html("sm-" + $(window).width());
|
||||
}
|
||||
|
||||
var exitPhone = function(){
|
||||
$('.content-navbar .navbar-brand').html("lg-" + $(window).width());
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$(window).bind('enterBreakpoint768',function() {
|
||||
enterPhone();
|
||||
});
|
||||
$(window).bind('exitBreakpoint768',function() {
|
||||
exitPhone();
|
||||
});
|
||||
//$(window).setBreakpoints();
|
||||
var lastMode = 'lg';
|
||||
$(window).bind('resize', function(e){
|
||||
var width = $(window).width();
|
||||
var mode = 'lg';
|
||||
if(width < 768){ mode = 'xs'; }
|
||||
else if(width < 992){ mode = 'sm'; }
|
||||
else if(width < 1200){ mode = 'md'; }
|
||||
if(lastMode != mode){
|
||||
$('[data-toggle=breakpoint]').each(function(){
|
||||
if(newClass = $(this).data('class-' + mode)){
|
||||
$(this)[0].className = newClass;
|
||||
} else {
|
||||
$(this)[0].className = $(this).data('class-org');
|
||||
}
|
||||
})
|
||||
lastMode = mode;
|
||||
}
|
||||
});
|
||||
$('[data-toggle=breakpoint]').each(function(){
|
||||
$(this).data('class-org', $(this)[0].className);
|
||||
})
|
||||
$(window).trigger('resize');
|
||||
})
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
;(function($){
|
||||
$.convert_format = function(format){
|
||||
var fields = {
|
||||
d: 'dd',
|
||||
H: 'hh',
|
||||
I: "HH",
|
||||
m: 'mm',
|
||||
M: 'MM',
|
||||
p: 'PM/AM',
|
||||
S: 'ss',
|
||||
w: 'w',
|
||||
y: 'yy',
|
||||
Y: 'yyyy',
|
||||
'%' : '%'
|
||||
};
|
||||
var result = '', i = 0;
|
||||
while (i < format.length) {
|
||||
if (format.charAt(i) === '%') {
|
||||
if(f = fields[format.charAt(i + 1)]){
|
||||
result = result + f;
|
||||
}
|
||||
++i;
|
||||
} else {
|
||||
result = result + format.charAt(i);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
$.date_local = {
|
||||
days: gettext("Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday").split(' '),
|
||||
daysShort: gettext("Sun Mon Tue Wed Thu Fri Sat Sun").split(' '),
|
||||
daysMin: gettext("Su Mo Tu We Th Fr Sa Su").split(' '),
|
||||
months: gettext('January February March April May June July August September October November December').split(' '),
|
||||
monthsShort: gettext("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec").split(' '),
|
||||
today: gettext("Today"),
|
||||
date_string: gettext('%a %d %b %Y %T %Z'),
|
||||
ampm: gettext("AM PM").split(' '),
|
||||
ampmLower: gettext("am pm").split(' '),
|
||||
dateFormat: get_format('DATE_INPUT_FORMATS')[0],
|
||||
dateJSFormat: $.convert_format(get_format('DATE_INPUT_FORMATS')[0]),
|
||||
timeRepr: gettext('%T')
|
||||
}
|
||||
|
||||
$.fn.datepicker.dates['xadmin'] = $.date_local;
|
||||
|
||||
$.fn.exform.renders.push(function(f){
|
||||
f.find('.input-group.date input').each(function(e){
|
||||
var dp = $(this).datepicker({format: $.date_local.dateJSFormat, language: 'xadmin', todayBtn: "linked", autoclose: true})
|
||||
.data('datepicker');
|
||||
$(this).parent().find('button').click(function(e){
|
||||
dp.update(new Date());
|
||||
})
|
||||
})
|
||||
if($.fn.clockpicker){
|
||||
f.find('.input-group.bootstrap-clockpicker').each(function(e){
|
||||
var el = $(this).find('input');
|
||||
var tp = el.clockpicker({
|
||||
autoclose: true,
|
||||
'default': 'now'
|
||||
});
|
||||
|
||||
$(this).find('button').click(function(e){
|
||||
var now = new Date()
|
||||
, value = now.getHours() + ':' + now.getMinutes();
|
||||
el.attr('value', value);
|
||||
})
|
||||
})
|
||||
}
|
||||
if($.fn.timepicker){
|
||||
f.find('.input-group.bootstrap-timepicker').each(function(e){
|
||||
var el = $(this).find('input');
|
||||
var value = el.val();
|
||||
var tp = el.timepicker({
|
||||
minuteStep: 1,
|
||||
showSeconds: true,
|
||||
showMeridian: false,
|
||||
defaultTime: false
|
||||
}).data('timepicker');
|
||||
$(this).find('button').click(function(e){
|
||||
tp.$element.val("");
|
||||
tp.setDefaultTime('current');
|
||||
tp.update();
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery)
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
;(function($){
|
||||
|
||||
$.fn.exform.renders.push(function(f){
|
||||
if($.fn.multiselect){
|
||||
f.find('.selectmultiple.selectdropdown').multiselect({
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery)
|
|
@ -0,0 +1,241 @@
|
|||
|
||||
;(function($){
|
||||
|
||||
var SelectBox = function(element, options) {
|
||||
var that = this;
|
||||
|
||||
this.el = $(element);
|
||||
var el = this.el;
|
||||
|
||||
this.filter_input = el.find('.selector-filter input');
|
||||
this.from_box = el.find('.selector-available select');
|
||||
this.to_box = el.find('.selector-chosen select');
|
||||
|
||||
var findForm = function(node) {
|
||||
if (node.tagName.toLowerCase() != 'form') {
|
||||
return findForm(node.parentNode);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
this.form = $(findForm(element));
|
||||
|
||||
// link
|
||||
this.btn_add_all = el.find(".btn.selector-chooseall");
|
||||
this.btn_remove_all = el.find(".btn.selector-clearall");
|
||||
this.btn_add = el.find(".btn.selector-add");
|
||||
this.btn_remove = el.find(".btn.selector-remove");
|
||||
|
||||
// setup event
|
||||
this.filter_input.keyup($.proxy(this.filter_key_up, this));
|
||||
this.filter_input.keydown($.proxy(this.filter_key_down, this));
|
||||
|
||||
this.from_box.on('change', $.proxy(this.refresh_icons, this));
|
||||
this.to_box.on('change', $.proxy(this.refresh_icons, this));
|
||||
|
||||
this.from_box.on('dblclick', $.proxy(this.move, this));
|
||||
this.to_box.on('dblclick', $.proxy(this.remove, this));
|
||||
|
||||
this.btn_add.on('click', $.proxy(this.move, this));
|
||||
this.btn_remove.on('click', $.proxy(this.remove, this));
|
||||
|
||||
this.btn_add_all.on('click', $.proxy(this.move_all, this));
|
||||
this.btn_remove_all.on('click', $.proxy(this.remove_all, this));
|
||||
|
||||
this.form.submit($.proxy(this.select_all, this));
|
||||
|
||||
// init cache
|
||||
var from_cache = new Array();
|
||||
for (var i = 0; (node = this.from_box[0].options[i]); i++) {
|
||||
from_cache.push({value: node.value, text: node.text, displayed: 1});
|
||||
}
|
||||
this.from_box.data('cache', from_cache);
|
||||
|
||||
var to_cache = new Array();
|
||||
for (var i = 0; (node = this.to_box[0].options[i]); i++) {
|
||||
to_cache.push({value: node.value, text: node.text, displayed: 1});
|
||||
}
|
||||
this.to_box.data('cache', to_cache);
|
||||
|
||||
this.refresh_icons();
|
||||
}
|
||||
|
||||
SelectBox.prototype = {
|
||||
constructor: SelectBox,
|
||||
redisplay : function(box){
|
||||
var select = box[0];
|
||||
var cache = box.data('cache');
|
||||
select.options.length = 0; // clear all options
|
||||
for (var i = 0, j = cache.length; i < j; i++) {
|
||||
var node = cache[i];
|
||||
if (node.displayed) {
|
||||
select.options[select.options.length] = new Option(node.text, node.value, false, false);
|
||||
}
|
||||
}
|
||||
},
|
||||
filter: function(text) {
|
||||
// Redisplay the HTML select box, displaying only the choices containing ALL
|
||||
// the words in text. (It's an AND search.)
|
||||
var tokens = text.toLowerCase().split(/\s+/);
|
||||
var node, token;
|
||||
for (var i = 0; (node = this.from_box.data('cache')[i]); i++) {
|
||||
node.displayed = 1;
|
||||
for (var j = 0; (token = tokens[j]); j++) {
|
||||
if (node.text.toLowerCase().indexOf(token) == -1) {
|
||||
node.displayed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.redisplay(this.from_box);
|
||||
},
|
||||
remove: function(){
|
||||
this.trans(this.to_box, this.from_box);
|
||||
},
|
||||
move: function(){
|
||||
this.trans(this.from_box, this.to_box);
|
||||
},
|
||||
delete_from_cache: function(box, value) {
|
||||
var node, delete_index = null;
|
||||
var cache = box.data('cache');
|
||||
for (var i = 0; (node = cache[i]); i++) {
|
||||
if (node.value == value) {
|
||||
delete_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var j = cache.length - 1;
|
||||
for (var i = delete_index; i < j; i++) {
|
||||
cache[i] = cache[i+1];
|
||||
}
|
||||
cache.length--;
|
||||
},
|
||||
add_to_cache: function(box, option) {
|
||||
box.data('cache').push({value: option.value, text: option.text, displayed: 1});
|
||||
},
|
||||
cache_contains: function(box, value) {
|
||||
// Check if an item is contained in the cache
|
||||
var node;
|
||||
for (var i = 0; (node = box.data('cache')[i]); i++) {
|
||||
if (node.value == value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
trans: function(from, to){
|
||||
for (var i = 0; (option = from[0].options[i]); i++) {
|
||||
if (option.selected && this.cache_contains(from, option.value)) {
|
||||
this.add_to_cache(to, {value: option.value, text: option.text, displayed: 1});
|
||||
this.delete_from_cache(from, option.value);
|
||||
}
|
||||
}
|
||||
this.redisplay(from);
|
||||
this.redisplay(to);
|
||||
|
||||
this.refresh_icons();
|
||||
},
|
||||
move_all : function(){
|
||||
this.trans_all(this.from_box, this.to_box);
|
||||
},
|
||||
remove_all: function(){
|
||||
this.trans_all(this.to_box, this.from_box);
|
||||
},
|
||||
trans_all: function(from, to) {
|
||||
var option;
|
||||
for (var i = 0; (option = from[0].options[i]); i++) {
|
||||
if (this.cache_contains(from, option.value)) {
|
||||
this.add_to_cache(to, {value: option.value, text: option.text, displayed: 1});
|
||||
this.delete_from_cache(from, option.value);
|
||||
}
|
||||
}
|
||||
this.redisplay(from);
|
||||
this.redisplay(to);
|
||||
|
||||
this.refresh_icons();
|
||||
},
|
||||
sort: function(box) {
|
||||
box.data('cache').sort( function(a, b) {
|
||||
a = a.text.toLowerCase();
|
||||
b = b.text.toLowerCase();
|
||||
try {
|
||||
if (a > b) return 1;
|
||||
if (a < b) return -1;
|
||||
}
|
||||
catch (e) {
|
||||
// silently fail on IE 'unknown' exception
|
||||
}
|
||||
return 0;
|
||||
} );
|
||||
},
|
||||
select_all: function() {
|
||||
var box = this.to_box[0];
|
||||
for (var i = 0; i < box.options.length; i++) {
|
||||
box.options[i].selected = 'selected';
|
||||
}
|
||||
},
|
||||
refresh_icons: function() {
|
||||
var is_from_selected = this.from_box.find('option:selected').length > 0;
|
||||
var is_to_selected = this.to_box.find('option:selected').length > 0;
|
||||
// Active if at least one item is selected
|
||||
this.btn_add.toggleClass('disabled', !is_from_selected);
|
||||
this.btn_remove.toggleClass('disabled', !is_to_selected);
|
||||
// Active if the corresponding box isn't empty
|
||||
this.btn_add_all.toggleClass('disabled', this.from_box.find('option').length == 0);
|
||||
this.btn_remove_all.toggleClass('disabled', this.to_box.find('option').length == 0);
|
||||
},
|
||||
filter_key_up: function(event) {
|
||||
var from = this.from_box[0];
|
||||
// don't submit form if user pressed Enter
|
||||
if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) {
|
||||
var temp = from.selectedIndex;
|
||||
this.move();
|
||||
from.selectedIndex = temp;
|
||||
return false;
|
||||
}
|
||||
var temp = from.selectedIndex;
|
||||
this.filter(this.filter_input.val());
|
||||
from.selectedIndex = temp;
|
||||
return true;
|
||||
},
|
||||
filter_key_down: function(event) {
|
||||
var from = this.from_box[0];
|
||||
if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) {
|
||||
return false;
|
||||
}
|
||||
// right arrow -- move across
|
||||
if ((event.which && event.which == 39) || (event.keyCode && event.keyCode == 39)) {
|
||||
var old_index = from.selectedIndex;
|
||||
this.move();
|
||||
from.selectedIndex = (old_index == from.length) ? from.length - 1 : old_index;
|
||||
return false;
|
||||
}
|
||||
// down arrow -- wrap around
|
||||
if ((event.which && event.which == 40) || (event.keyCode && event.keyCode == 40)) {
|
||||
from.selectedIndex = (from.length == from.selectedIndex + 1) ? 0 : from.selectedIndex + 1;
|
||||
}
|
||||
// up arrow -- wrap around
|
||||
if ((event.which && event.which == 38) || (event.keyCode && event.keyCode == 38)) {
|
||||
from.selectedIndex = (from.selectedIndex == 0) ? from.length - 1 : from.selectedIndex - 1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.fn.select_transfer = function ( option ) {
|
||||
var args = Array.apply(null, arguments);
|
||||
args.shift();
|
||||
return this.each(function () {
|
||||
var $this = $(this),
|
||||
data = $this.data('transfer'),
|
||||
options = typeof option == 'object' && option;
|
||||
if (!data) {
|
||||
$this.data('transfer', (data = new SelectBox(this)));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.exform.renders.push(function(f){
|
||||
f.find('.select-transfer').select_transfer();
|
||||
});
|
||||
|
||||
})(jQuery)
|
|
@ -0,0 +1,38 @@
|
|||
;(function($){
|
||||
// add select render
|
||||
$.fn.exform.renders.push(function(f){
|
||||
if($.fn.selectize){
|
||||
f.find('select:not(.select-search):not([multiple=multiple])').selectize();
|
||||
f.find('.select-search').each(function(){
|
||||
var $el = $(this);
|
||||
var preload = $el.hasClass('select-preload');
|
||||
$el.selectize({
|
||||
valueField: 'id',
|
||||
labelField: '__str__',
|
||||
searchField: '__str__',
|
||||
create: false,
|
||||
maxItems: 1,
|
||||
preload: preload,
|
||||
load: function(query, callback) {
|
||||
if(!preload && !query.length) return callback();
|
||||
$.ajax({
|
||||
url: $el.data('search-url')+$el.data('choices'),
|
||||
dataType: 'json',
|
||||
data: {
|
||||
'_q_' : query,
|
||||
'_cols': 'id.__str__'
|
||||
},
|
||||
type: 'GET',
|
||||
error: function() {
|
||||
callback();
|
||||
},
|
||||
success: function(res) {
|
||||
callback(res.objects);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
}});
|
||||
})(jQuery)
|
||||
|
|
@ -0,0 +1,283 @@
|
|||
/**
|
||||
* jQuery.autotype - Simple, accurate, typing simulation for jQuery
|
||||
*
|
||||
* version 0.5.0
|
||||
*
|
||||
* http://michaelmonteleone.net/projects/autotype
|
||||
* http://github.com/mmonteleone/jquery.autotype
|
||||
*
|
||||
* Copyright (c) 2009 Michael Monteleone
|
||||
* Licensed under terms of the MIT License (README.markdown)
|
||||
*/
|
||||
(function($){
|
||||
|
||||
// code type constants
|
||||
var CHARACTER = 1,
|
||||
NON_CHARACTER = 2,
|
||||
MODIFIER_BEGIN = 3,
|
||||
MODIFIER_END = 4,
|
||||
isNullOrEmpty = function(val) { return val === null || val.length === 0; },
|
||||
isUpper = function(char) { return char.toUpperCase() === char; },
|
||||
isLower = function(char) { return char.toLowerCase() === char; },
|
||||
areDifferentlyCased = function(char1,char2) {
|
||||
return (isUpper(char1) && isLower(char2)) ||
|
||||
(isLower(char1) && isUpper(char2));
|
||||
},
|
||||
convertCase = function(char) {
|
||||
return isUpper(char) ? char.toLowerCase() : char.toUpperCase();
|
||||
},
|
||||
parseCodes = function(value, codeMap) {
|
||||
// buffer to hold a collection of key/char code pairs corresponding to input string value
|
||||
var codes = [],
|
||||
// buffer to hold the name of a control key as it's being parsed
|
||||
definingControlKey = false,
|
||||
// hold a collection of currently pushed modifier keys
|
||||
activeModifiers = {
|
||||
alt: false,
|
||||
meta: false,
|
||||
shift: false,
|
||||
ctrl: false
|
||||
},
|
||||
explicitModifiers = $.extend({}, activeModifiers),
|
||||
// buffer to hold construction of current control key
|
||||
currentControlKey = '',
|
||||
previousChar = '',
|
||||
pushCode = function(opts) {
|
||||
codes.push($.extend({}, opts, activeModifiers));
|
||||
},
|
||||
pushModifierBeginCode = function(modifierName) {
|
||||
activeModifiers[modifierName] = true;
|
||||
pushCode({
|
||||
keyCode: codeMap[modifierName],
|
||||
charCode: 0,
|
||||
char: '',
|
||||
type: MODIFIER_BEGIN
|
||||
});
|
||||
},
|
||||
pushModifierEndCode = function(modifierName) {
|
||||
activeModifiers[modifierName] = false;
|
||||
pushCode({
|
||||
keyCode: codeMap[modifierName],
|
||||
charCode: 0,
|
||||
char: '',
|
||||
type: MODIFIER_END
|
||||
});
|
||||
};
|
||||
|
||||
for(var i=0;i<value.length;i++) {
|
||||
// if the character is about to define a control key
|
||||
if(!definingControlKey &&
|
||||
i <= value.length - 5 &&
|
||||
value.charAt(i) === '{' &&
|
||||
value.charAt(i+1) === '{')
|
||||
{
|
||||
// skip the next "{"
|
||||
i++;
|
||||
|
||||
definingControlKey = true;
|
||||
}
|
||||
// if the character is about to end definition of control key
|
||||
else if (definingControlKey &&
|
||||
i <= value.length - 2 &&
|
||||
value.charAt(i) === '}' &&
|
||||
value.charAt(i+1) === '}')
|
||||
{
|
||||
// skip the next "}"
|
||||
i++;
|
||||
|
||||
// check if this key is a modifier-opener (is a ctrl,alt,del,shift)
|
||||
if(activeModifiers[currentControlKey] !== undefined)
|
||||
{
|
||||
explicitModifiers[currentControlKey] = true;
|
||||
pushModifierBeginCode(currentControlKey);
|
||||
}
|
||||
// check if this key is a modifier-closer (is a /ctrl,/alt,/del,.shift)
|
||||
else if(activeModifiers[currentControlKey.substring(1)] !== undefined)
|
||||
{
|
||||
explicitModifiers[currentControlKey] = false;
|
||||
pushModifierEndCode(currentControlKey.substring(1));
|
||||
}
|
||||
// otherwise is some other kind of non-modifier control key
|
||||
else
|
||||
{
|
||||
pushCode({
|
||||
keyCode: codeMap[currentControlKey],
|
||||
charCode: 0,
|
||||
char: '',
|
||||
type: NON_CHARACTER,
|
||||
controlKeyName: currentControlKey
|
||||
});
|
||||
}
|
||||
|
||||
definingControlKey = false;
|
||||
currentControlKey = '';
|
||||
}
|
||||
// currently defining control key
|
||||
else if (definingControlKey)
|
||||
{
|
||||
currentControlKey += value.charAt(i);
|
||||
}
|
||||
// otherwise is just a text character
|
||||
else
|
||||
{
|
||||
var character = value.charAt(i);
|
||||
|
||||
// check for any implicitly changing of cases, and register presses/releases
|
||||
// of the shift key in accord with them.
|
||||
if(
|
||||
(!isNullOrEmpty(previousChar) && areDifferentlyCased(previousChar, character)) ||
|
||||
(isNullOrEmpty(previousChar) && isUpper(character))
|
||||
)
|
||||
{
|
||||
if(isUpper(character) && !activeModifiers.shift) {
|
||||
pushModifierBeginCode("shift");
|
||||
} else if (isLower(character) && activeModifiers.shift && !explicitModifiers.shift){
|
||||
pushModifierEndCode("shift");
|
||||
}
|
||||
}
|
||||
|
||||
// modify the current character if there are active modifiers
|
||||
if((activeModifiers.shift && isLower(character)) ||
|
||||
(!activeModifiers.shift && isUpper(character))) {
|
||||
// shift converts case
|
||||
character = convertCase(character);
|
||||
}
|
||||
|
||||
var code = {
|
||||
// if can't identify a keycode, just fudge with the char code.
|
||||
// nope, this isn't ideal by any means.
|
||||
keyCode: codeMap[character] || character.charCodeAt(0),
|
||||
charCode: character.charCodeAt(0),
|
||||
char: character,
|
||||
type: CHARACTER
|
||||
};
|
||||
|
||||
// modify the current character if there are active modifiers
|
||||
if(activeModifiers.alt ||
|
||||
activeModifiers.ctrl ||
|
||||
activeModifiers.meta) {
|
||||
// alt, ctrl, meta make it so nothing is typed
|
||||
code.char = '';
|
||||
}
|
||||
pushCode(code);
|
||||
if(code.char !== '') { previousChar = code.char; }
|
||||
}
|
||||
}
|
||||
return codes;
|
||||
},
|
||||
triggerCodeOnField = function(code, field) {
|
||||
// build up base content that every event should contain
|
||||
// with information about whether certain chord keys are
|
||||
// simulated as being pressed
|
||||
var evnt = {
|
||||
altKey: code.alt,
|
||||
metaKey: code.meta,
|
||||
shiftKey: code.shift,
|
||||
ctrlKey: code.ctrl
|
||||
};
|
||||
|
||||
// build out 3 event instances for all the steps of a key entry
|
||||
var keyDownEvent = $.extend($.Event(), evnt, {type:'keydown', keyCode: code.keyCode, charCode: 0, which: code.keyCode});
|
||||
var keyPressEvent = $.extend($.Event(), evnt, {type:'keypress', keyCode: 0, charCode: code.charCode, which: code.charCode || code.keyCode});
|
||||
var keyUpEvent = $.extend($.Event(), evnt, {type:'keyup', keyCode: code.keyCode, charCode: 0, which: code.keyCode});
|
||||
|
||||
// go ahead and trigger the first 2 (down and press)
|
||||
// a keyup of a modifier shouldn't also re-trigger a keydown
|
||||
if(code.type !== MODIFIER_END) {
|
||||
field.trigger(keyDownEvent);
|
||||
}
|
||||
|
||||
// modifier keys don't have a keypress event, only down or up
|
||||
if(code.type !== MODIFIER_BEGIN && code.type !== MODIFIER_END) {
|
||||
field.trigger(keyPressEvent);
|
||||
}
|
||||
|
||||
// only actually add the new character to the input if the keydown or keypress events
|
||||
// weren't cancelled by any consuming event handlers
|
||||
if(!keyDownEvent.isPropagationStopped() &&
|
||||
!keyPressEvent.isPropagationStopped()) {
|
||||
if(code.type === NON_CHARACTER) {
|
||||
switch(code.controlKeyName) {
|
||||
case 'enter':
|
||||
field.val(field.val() + "\n");
|
||||
break;
|
||||
case 'back':
|
||||
field.val(field.val().substring(0,field.val().length-1));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
field.val(field.val() + code.char);
|
||||
}
|
||||
}
|
||||
|
||||
// then also trigger the 3rd event (up)
|
||||
// a keydown of a modifier shouldn't also trigger a keyup until coded
|
||||
if(code.type !== MODIFIER_BEGIN) {
|
||||
field.trigger(keyUpEvent);
|
||||
}
|
||||
},
|
||||
triggerCodesOnField = function(codes, field, delay, global) {
|
||||
if(delay > 0) {
|
||||
codes = codes.reverse();
|
||||
var keyInterval = global.setInterval(function(){
|
||||
var code = codes.pop();
|
||||
triggerCodeOnField(code, field);
|
||||
if(codes.length === 0) {
|
||||
global.clearInterval(keyInterval);
|
||||
field.trigger('autotyped');
|
||||
}
|
||||
}, delay);
|
||||
} else {
|
||||
$.each(codes,function(){
|
||||
triggerCodeOnField(this, field);
|
||||
});
|
||||
field.trigger('autotyped');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.autotype = function(value, options) {
|
||||
if(value === undefined || value === null) { throw("Value is required by jQuery.autotype plugin"); }
|
||||
var settings = $.extend({}, $.fn.autotype.defaults, options);
|
||||
|
||||
// 1st Pass
|
||||
// step through the input string and convert it into
|
||||
// a logical sequence of steps, key, and charcodes to apply to the inputs
|
||||
var codes = parseCodes(value, settings.keyCodes[settings.keyBoard]);
|
||||
|
||||
// 2nd Pass
|
||||
// Run the translated codes against each input through a realistic
|
||||
// and cancelable series of key down/press/up events
|
||||
return this.each(function(){ triggerCodesOnField(codes, $(this), settings.delay, settings.global); });
|
||||
};
|
||||
|
||||
$.fn.autotype.defaults = {
|
||||
version: '0.5.0',
|
||||
keyBoard: 'enUs',
|
||||
delay: 0,
|
||||
global: window,
|
||||
keyCodes: {
|
||||
enUs: { 'back':8,'ins':45,'del':46,'enter':13,'shift':16,'ctrl':17,'meta':224,
|
||||
'alt':18,'pause':19,'caps':20,'esc':27,'pgup':33,'pgdn':34,
|
||||
'end':35,'home':36,'left':37,'up':38,'right':39,'down':40,
|
||||
'printscr':44,'num0':96,'num1':97,'num2':98,'num3':99,'num4':100,
|
||||
'num5':101,'num6':102,'num7':103,'num8':104,'num9':105,
|
||||
'multiply':106,'add':107,'subtract':109,'decimal':110,
|
||||
'divide':111,'f1':112,'f2':113,'f3':114,'f4':115,'f5':116,
|
||||
'f6':117,'f7':118,'f8':119,'f9':120,'f10':121,'f11':122,
|
||||
'f12':123,'numlock':144,'scrolllock':145,' ':9,' ':32,
|
||||
'tab':9,'space':32,'0':48,'1':49,'2':50,'3':51,'4':52,
|
||||
'5':53,'6':54,'7':55,'8':56,'9':57,')':48,'!':49,'@':50,
|
||||
'#':51,'$':52,'%':53,'^':54,'&':55,'*':56,'(':57,';':186,
|
||||
'=':187,',':188,'-':189,'.':190,'/':191,'[':219,'\\':220,
|
||||
']':221,"'":222,':':186,'+':187,'<':188,'_':189,'>':190,
|
||||
'?':191,'{':219,'|':220,'}':221,'"':222,'a':65,'b':66,'c':67,
|
||||
'd':68,'e':69,'f':70,'g':71,'h':72,'i':73,'j':74,'k':75,
|
||||
'l':76,'m':77,'n':78,'o':79,'p':80,'q':81,'r':82,'s':83,
|
||||
't':84,'u':85,'v':86,'w':87,'x':88,'y':89,'z':90,'A':65,
|
||||
'B':66,'C':67,'D':68,'E':69,'F':70,'G':71,'H':72,'I':73,
|
||||
'J':74,'K':75,'L':76,'M':77,'N':78,'O':79,'P':80,'Q':81,
|
||||
'R':82,'S':83,'T':84,'U':85,'V':86,'W':87,'X':88,'Y':89,'Z':90 }
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
|
@ -0,0 +1,168 @@
|
|||
/*!
|
||||
* ClockPicker v0.0.7 for Bootstrap (http://weareoutman.github.io/clockpicker/)
|
||||
* Copyright 2014 Wang Shenwei.
|
||||
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
||||
*/
|
||||
|
||||
.clockpicker .input-group-addon {
|
||||
cursor: pointer;
|
||||
}
|
||||
.clockpicker-moving {
|
||||
cursor: move;
|
||||
}
|
||||
.clockpicker-align-left.popover > .arrow {
|
||||
left: 25px;
|
||||
}
|
||||
.clockpicker-align-top.popover > .arrow {
|
||||
top: 17px;
|
||||
}
|
||||
.clockpicker-align-right.popover > .arrow {
|
||||
left: auto;
|
||||
right: 25px;
|
||||
}
|
||||
.clockpicker-align-bottom.popover > .arrow {
|
||||
top: auto;
|
||||
bottom: 6px;
|
||||
}
|
||||
.clockpicker-popover .popover-title {
|
||||
background-color: #fff;
|
||||
color: #999;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
.clockpicker-popover .popover-title span {
|
||||
cursor: pointer;
|
||||
}
|
||||
.clockpicker-popover .popover-content {
|
||||
background-color: #f8f8f8;
|
||||
padding: 12px;
|
||||
}
|
||||
.popover-content:last-child {
|
||||
border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
}
|
||||
.clockpicker-plate {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 50%;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
/* Disable text selection highlighting. Thanks to Hermanya */
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.clockpicker-canvas,
|
||||
.clockpicker-dial {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: -1px;
|
||||
}
|
||||
.clockpicker-minutes {
|
||||
visibility: hidden;
|
||||
}
|
||||
.clockpicker-tick {
|
||||
border-radius: 50%;
|
||||
color: #666;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
}
|
||||
.clockpicker-tick.active,
|
||||
.clockpicker-tick:hover {
|
||||
background-color: rgb(192, 229, 247);
|
||||
background-color: rgba(0, 149, 221, .25);
|
||||
}
|
||||
.clockpicker-button {
|
||||
background-image: none;
|
||||
background-color: #fff;
|
||||
border-width: 1px 0 0;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.clockpicker-button:hover {
|
||||
background-image: none;
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
.clockpicker-button:focus {
|
||||
outline: none!important;
|
||||
}
|
||||
.clockpicker-dial {
|
||||
-webkit-transition: -webkit-transform 350ms, opacity 350ms;
|
||||
-moz-transition: -moz-transform 350ms, opacity 350ms;
|
||||
-ms-transition: -ms-transform 350ms, opacity 350ms;
|
||||
-o-transition: -o-transform 350ms, opacity 350ms;
|
||||
transition: transform 350ms, opacity 350ms;
|
||||
}
|
||||
.clockpicker-dial-out {
|
||||
opacity: 0;
|
||||
}
|
||||
.clockpicker-hours.clockpicker-dial-out {
|
||||
-webkit-transform: scale(1.2, 1.2);
|
||||
-moz-transform: scale(1.2, 1.2);
|
||||
-ms-transform: scale(1.2, 1.2);
|
||||
-o-transform: scale(1.2, 1.2);
|
||||
transform: scale(1.2, 1.2);
|
||||
}
|
||||
.clockpicker-minutes.clockpicker-dial-out {
|
||||
-webkit-transform: scale(.8, .8);
|
||||
-moz-transform: scale(.8, .8);
|
||||
-ms-transform: scale(.8, .8);
|
||||
-o-transform: scale(.8, .8);
|
||||
transform: scale(.8, .8);
|
||||
}
|
||||
.clockpicker-canvas {
|
||||
-webkit-transition: opacity 175ms;
|
||||
-moz-transition: opacity 175ms;
|
||||
-ms-transition: opacity 175ms;
|
||||
-o-transition: opacity 175ms;
|
||||
transition: opacity 175ms;
|
||||
}
|
||||
.clockpicker-canvas-out {
|
||||
opacity: 0.25;
|
||||
}
|
||||
.clockpicker-canvas-bearing,
|
||||
.clockpicker-canvas-fg {
|
||||
stroke: none;
|
||||
fill: rgb(0, 149, 221);
|
||||
}
|
||||
.clockpicker-canvas-bg {
|
||||
stroke: none;
|
||||
fill: rgb(192, 229, 247);
|
||||
}
|
||||
.clockpicker-canvas-bg-trans {
|
||||
fill: rgba(0, 149, 221, .25);
|
||||
}
|
||||
.clockpicker-canvas line {
|
||||
stroke: rgb(0, 149, 221);
|
||||
stroke-width: 1;
|
||||
stroke-linecap: round;
|
||||
/*shape-rendering: crispEdges;*/
|
||||
}
|
||||
.clockpicker-button.am-button {
|
||||
margin: 1px;
|
||||
padding: 5px;
|
||||
border: 1px solid rgba(0, 0, 0, .2);
|
||||
border-radius: 4px;
|
||||
|
||||
}
|
||||
.clockpicker-button.pm-button {
|
||||
margin: 1px 1px 1px 136px;
|
||||
padding: 5px;
|
||||
border: 1px solid rgba(0, 0, 0, .2);
|
||||
border-radius: 4px;
|
||||
}
|
|
@ -0,0 +1,729 @@
|
|||
/*!
|
||||
* ClockPicker v0.0.7 (http://weareoutman.github.io/clockpicker/)
|
||||
* Copyright 2014 Wang Shenwei.
|
||||
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
||||
*/
|
||||
|
||||
;(function(){
|
||||
var $ = window.jQuery,
|
||||
$win = $(window),
|
||||
$doc = $(document),
|
||||
$body;
|
||||
|
||||
// Can I use inline svg ?
|
||||
var svgNS = 'http://www.w3.org/2000/svg',
|
||||
svgSupported = 'SVGAngle' in window && (function(){
|
||||
var supported,
|
||||
el = document.createElement('div');
|
||||
el.innerHTML = '<svg/>';
|
||||
supported = (el.firstChild && el.firstChild.namespaceURI) == svgNS;
|
||||
el.innerHTML = '';
|
||||
return supported;
|
||||
})();
|
||||
|
||||
// Can I use transition ?
|
||||
var transitionSupported = (function(){
|
||||
var style = document.createElement('div').style;
|
||||
return 'transition' in style ||
|
||||
'WebkitTransition' in style ||
|
||||
'MozTransition' in style ||
|
||||
'msTransition' in style ||
|
||||
'OTransition' in style;
|
||||
})();
|
||||
|
||||
// Listen touch events in touch screen device, instead of mouse events in desktop.
|
||||
var touchSupported = 'ontouchstart' in window,
|
||||
mousedownEvent = 'mousedown' + ( touchSupported ? ' touchstart' : ''),
|
||||
mousemoveEvent = 'mousemove.clockpicker' + ( touchSupported ? ' touchmove.clockpicker' : ''),
|
||||
mouseupEvent = 'mouseup.clockpicker' + ( touchSupported ? ' touchend.clockpicker' : '');
|
||||
|
||||
// Vibrate the device if supported
|
||||
var vibrate = navigator.vibrate ? 'vibrate' : navigator.webkitVibrate ? 'webkitVibrate' : null;
|
||||
|
||||
function createSvgElement(name) {
|
||||
return document.createElementNS(svgNS, name);
|
||||
}
|
||||
|
||||
function leadingZero(num) {
|
||||
return (num < 10 ? '0' : '') + num;
|
||||
}
|
||||
|
||||
// Get a unique id
|
||||
var idCounter = 0;
|
||||
function uniqueId(prefix) {
|
||||
var id = ++idCounter + '';
|
||||
return prefix ? prefix + id : id;
|
||||
}
|
||||
|
||||
// Clock size
|
||||
var dialRadius = 100,
|
||||
outerRadius = 80,
|
||||
// innerRadius = 80 on 12 hour clock
|
||||
innerRadius = 54,
|
||||
tickRadius = 13,
|
||||
diameter = dialRadius * 2,
|
||||
duration = transitionSupported ? 350 : 1;
|
||||
|
||||
// Popover template
|
||||
var tpl = [
|
||||
'<div class="popover clockpicker-popover">',
|
||||
'<div class="arrow"></div>',
|
||||
'<div class="popover-title">',
|
||||
'<span class="clockpicker-span-hours text-primary"></span>',
|
||||
' : ',
|
||||
'<span class="clockpicker-span-minutes"></span>',
|
||||
'<span class="clockpicker-span-am-pm"></span>',
|
||||
'</div>',
|
||||
'<div class="popover-content">',
|
||||
'<div class="clockpicker-plate">',
|
||||
'<div class="clockpicker-canvas"></div>',
|
||||
'<div class="clockpicker-dial clockpicker-hours"></div>',
|
||||
'<div class="clockpicker-dial clockpicker-minutes clockpicker-dial-out"></div>',
|
||||
'</div>',
|
||||
'<span class="clockpicker-am-pm-block">',
|
||||
'</span>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
// ClockPicker
|
||||
function ClockPicker(element, options) {
|
||||
var popover = $(tpl),
|
||||
plate = popover.find('.clockpicker-plate'),
|
||||
hoursView = popover.find('.clockpicker-hours'),
|
||||
minutesView = popover.find('.clockpicker-minutes'),
|
||||
amPmBlock = popover.find('.clockpicker-am-pm-block'),
|
||||
isInput = element.prop('tagName') === 'INPUT',
|
||||
input = isInput ? element : element.find('input'),
|
||||
addon = element.find('.input-group-addon'),
|
||||
self = this,
|
||||
timer;
|
||||
|
||||
this.id = uniqueId('cp');
|
||||
this.element = element;
|
||||
this.options = options;
|
||||
this.isAppended = false;
|
||||
this.isShown = false;
|
||||
this.currentView = 'hours';
|
||||
this.isInput = isInput;
|
||||
this.input = input;
|
||||
this.addon = addon;
|
||||
this.popover = popover;
|
||||
this.plate = plate;
|
||||
this.hoursView = hoursView;
|
||||
this.minutesView = minutesView;
|
||||
this.amPmBlock = amPmBlock;
|
||||
this.spanHours = popover.find('.clockpicker-span-hours');
|
||||
this.spanMinutes = popover.find('.clockpicker-span-minutes');
|
||||
this.spanAmPm = popover.find('.clockpicker-span-am-pm');
|
||||
this.amOrPm = "PM";
|
||||
|
||||
// Setup for for 12 hour clock if option is selected
|
||||
if (options.twelvehour) {
|
||||
|
||||
var amPmButtonsTemplate = ['<div class="clockpicker-am-pm-block">',
|
||||
'<button type="button" class="btn btn-sm btn-default clockpicker-button clockpicker-am-button">',
|
||||
'AM</button>',
|
||||
'<button type="button" class="btn btn-sm btn-default clockpicker-button clockpicker-pm-button">',
|
||||
'PM</button>',
|
||||
'</div>'].join('');
|
||||
|
||||
var amPmButtons = $(amPmButtonsTemplate);
|
||||
//amPmButtons.appendTo(plate);
|
||||
|
||||
////Not working b/c they are not shown when this runs
|
||||
//$('clockpicker-am-button')
|
||||
// .on("click", function() {
|
||||
// self.amOrPm = "AM";
|
||||
// $('.clockpicker-span-am-pm').empty().append('AM');
|
||||
// });
|
||||
//
|
||||
//$('clockpicker-pm-button')
|
||||
// .on("click", function() {
|
||||
// self.amOrPm = "PM";
|
||||
// $('.clockpicker-span-am-pm').empty().append('PM');
|
||||
// });
|
||||
|
||||
$('<button type="button" class="btn btn-sm btn-default clockpicker-button am-button">' + "AM" + '</button>')
|
||||
.on("click", function() {
|
||||
self.amOrPm = "AM";
|
||||
$('.clockpicker-span-am-pm').empty().append('AM');
|
||||
}).appendTo(this.amPmBlock);
|
||||
|
||||
|
||||
$('<button type="button" class="btn btn-sm btn-default clockpicker-button pm-button">' + "PM" + '</button>')
|
||||
.on("click", function() {
|
||||
self.amOrPm = 'PM';
|
||||
$('.clockpicker-span-am-pm').empty().append('PM');
|
||||
}).appendTo(this.amPmBlock);
|
||||
|
||||
}
|
||||
|
||||
if (! options.autoclose) {
|
||||
// If autoclose is not setted, append a button
|
||||
$('<button type="button" class="btn btn-sm btn-default btn-block clockpicker-button">' + options.donetext + '</button>')
|
||||
.click($.proxy(this.done, this))
|
||||
.appendTo(popover);
|
||||
}
|
||||
|
||||
// Placement and arrow align - make sure they make sense.
|
||||
if ((options.placement === 'top' || options.placement === 'bottom') && (options.align === 'top' || options.align === 'bottom')) options.align = 'left';
|
||||
if ((options.placement === 'left' || options.placement === 'right') && (options.align === 'left' || options.align === 'right')) options.align = 'top';
|
||||
|
||||
popover.addClass(options.placement);
|
||||
popover.addClass('clockpicker-align-' + options.align);
|
||||
|
||||
this.spanHours.click($.proxy(this.toggleView, this, 'hours'));
|
||||
this.spanMinutes.click($.proxy(this.toggleView, this, 'minutes'));
|
||||
|
||||
// Show or toggle
|
||||
input.on('focus.clockpicker click.clockpicker', $.proxy(this.show, this));
|
||||
addon.on('click.clockpicker', $.proxy(this.toggle, this));
|
||||
|
||||
// Build ticks
|
||||
var tickTpl = $('<div class="clockpicker-tick"></div>'),
|
||||
i, tick, radian, radius;
|
||||
|
||||
// Hours view
|
||||
if (options.twelvehour) {
|
||||
for (i = 1; i < 13; i += 1) {
|
||||
tick = tickTpl.clone();
|
||||
radian = i / 6 * Math.PI;
|
||||
radius = outerRadius;
|
||||
tick.css('font-size', '120%');
|
||||
tick.css({
|
||||
left: dialRadius + Math.sin(radian) * radius - tickRadius,
|
||||
top: dialRadius - Math.cos(radian) * radius - tickRadius
|
||||
});
|
||||
tick.html(i === 0 ? '00' : i);
|
||||
hoursView.append(tick);
|
||||
tick.on(mousedownEvent, mousedown);
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < 24; i += 1) {
|
||||
tick = tickTpl.clone();
|
||||
radian = i / 6 * Math.PI;
|
||||
var inner = i > 0 && i < 13;
|
||||
radius = inner ? innerRadius : outerRadius;
|
||||
tick.css({
|
||||
left: dialRadius + Math.sin(radian) * radius - tickRadius,
|
||||
top: dialRadius - Math.cos(radian) * radius - tickRadius
|
||||
});
|
||||
if (inner) {
|
||||
tick.css('font-size', '120%');
|
||||
}
|
||||
tick.html(i === 0 ? '00' : i);
|
||||
hoursView.append(tick);
|
||||
tick.on(mousedownEvent, mousedown);
|
||||
}
|
||||
}
|
||||
|
||||
// Minutes view
|
||||
for (i = 0; i < 60; i += 5) {
|
||||
tick = tickTpl.clone();
|
||||
radian = i / 30 * Math.PI;
|
||||
tick.css({
|
||||
left: dialRadius + Math.sin(radian) * outerRadius - tickRadius,
|
||||
top: dialRadius - Math.cos(radian) * outerRadius - tickRadius
|
||||
});
|
||||
tick.css('font-size', '120%');
|
||||
tick.html(leadingZero(i));
|
||||
minutesView.append(tick);
|
||||
tick.on(mousedownEvent, mousedown);
|
||||
}
|
||||
|
||||
// Clicking on minutes view space
|
||||
plate.on(mousedownEvent, function(e){
|
||||
if ($(e.target).closest('.clockpicker-tick').length === 0) {
|
||||
mousedown(e, true);
|
||||
}
|
||||
});
|
||||
|
||||
// Mousedown or touchstart
|
||||
function mousedown(e, space) {
|
||||
var offset = plate.offset(),
|
||||
isTouch = /^touch/.test(e.type),
|
||||
x0 = offset.left + dialRadius,
|
||||
y0 = offset.top + dialRadius,
|
||||
dx = (isTouch ? e.originalEvent.touches[0] : e).pageX - x0,
|
||||
dy = (isTouch ? e.originalEvent.touches[0] : e).pageY - y0,
|
||||
z = Math.sqrt(dx * dx + dy * dy),
|
||||
moved = false;
|
||||
|
||||
// When clicking on minutes view space, check the mouse position
|
||||
if (space && (z < outerRadius - tickRadius || z > outerRadius + tickRadius)) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
|
||||
// Set cursor style of body after 200ms
|
||||
var movingTimer = setTimeout(function(){
|
||||
$body.addClass('clockpicker-moving');
|
||||
}, 200);
|
||||
|
||||
// Place the canvas to top
|
||||
if (svgSupported) {
|
||||
plate.append(self.canvas);
|
||||
}
|
||||
|
||||
// Clock
|
||||
self.setHand(dx, dy, ! space, true);
|
||||
|
||||
// Mousemove on document
|
||||
$doc.off(mousemoveEvent).on(mousemoveEvent, function(e){
|
||||
e.preventDefault();
|
||||
var isTouch = /^touch/.test(e.type),
|
||||
x = (isTouch ? e.originalEvent.touches[0] : e).pageX - x0,
|
||||
y = (isTouch ? e.originalEvent.touches[0] : e).pageY - y0;
|
||||
if (! moved && x === dx && y === dy) {
|
||||
// Clicking in chrome on windows will trigger a mousemove event
|
||||
return;
|
||||
}
|
||||
moved = true;
|
||||
self.setHand(x, y, false, true);
|
||||
});
|
||||
|
||||
// Mouseup on document
|
||||
$doc.off(mouseupEvent).on(mouseupEvent, function(e){
|
||||
$doc.off(mouseupEvent);
|
||||
e.preventDefault();
|
||||
var isTouch = /^touch/.test(e.type),
|
||||
x = (isTouch ? e.originalEvent.changedTouches[0] : e).pageX - x0,
|
||||
y = (isTouch ? e.originalEvent.changedTouches[0] : e).pageY - y0;
|
||||
if ((space || moved) && x === dx && y === dy) {
|
||||
self.setHand(x, y);
|
||||
}
|
||||
if (self.currentView === 'hours') {
|
||||
self.toggleView('minutes', duration / 2);
|
||||
} else {
|
||||
if (options.autoclose) {
|
||||
self.minutesView.addClass('clockpicker-dial-out');
|
||||
setTimeout(function(){
|
||||
self.done();
|
||||
}, duration / 2);
|
||||
}
|
||||
}
|
||||
plate.prepend(canvas);
|
||||
|
||||
// Reset cursor style of body
|
||||
clearTimeout(movingTimer);
|
||||
$body.removeClass('clockpicker-moving');
|
||||
|
||||
// Unbind mousemove event
|
||||
$doc.off(mousemoveEvent);
|
||||
});
|
||||
}
|
||||
|
||||
if (svgSupported) {
|
||||
// Draw clock hands and others
|
||||
var canvas = popover.find('.clockpicker-canvas'),
|
||||
svg = createSvgElement('svg');
|
||||
svg.setAttribute('class', 'clockpicker-svg');
|
||||
svg.setAttribute('width', diameter);
|
||||
svg.setAttribute('height', diameter);
|
||||
var g = createSvgElement('g');
|
||||
g.setAttribute('transform', 'translate(' + dialRadius + ',' + dialRadius + ')');
|
||||
var bearing = createSvgElement('circle');
|
||||
bearing.setAttribute('class', 'clockpicker-canvas-bearing');
|
||||
bearing.setAttribute('cx', 0);
|
||||
bearing.setAttribute('cy', 0);
|
||||
bearing.setAttribute('r', 2);
|
||||
var hand = createSvgElement('line');
|
||||
hand.setAttribute('x1', 0);
|
||||
hand.setAttribute('y1', 0);
|
||||
var bg = createSvgElement('circle');
|
||||
bg.setAttribute('class', 'clockpicker-canvas-bg');
|
||||
bg.setAttribute('r', tickRadius);
|
||||
var fg = createSvgElement('circle');
|
||||
fg.setAttribute('class', 'clockpicker-canvas-fg');
|
||||
fg.setAttribute('r', 3.5);
|
||||
g.appendChild(hand);
|
||||
g.appendChild(bg);
|
||||
g.appendChild(fg);
|
||||
g.appendChild(bearing);
|
||||
svg.appendChild(g);
|
||||
canvas.append(svg);
|
||||
|
||||
this.hand = hand;
|
||||
this.bg = bg;
|
||||
this.fg = fg;
|
||||
this.bearing = bearing;
|
||||
this.g = g;
|
||||
this.canvas = canvas;
|
||||
}
|
||||
|
||||
raiseCallback(this.options.init);
|
||||
}
|
||||
|
||||
function raiseCallback(callbackFunction) {
|
||||
if (callbackFunction && typeof callbackFunction === "function") {
|
||||
callbackFunction();
|
||||
}
|
||||
}
|
||||
|
||||
// Default options
|
||||
ClockPicker.DEFAULTS = {
|
||||
'default': '', // default time, 'now' or '13:14' e.g.
|
||||
fromnow: 0, // set default time to * milliseconds from now (using with default = 'now')
|
||||
placement: 'bottom', // clock popover placement
|
||||
align: 'left', // popover arrow align
|
||||
donetext: '完成', // done button text
|
||||
autoclose: false, // auto close when minute is selected
|
||||
twelvehour: false, // change to 12 hour AM/PM clock from 24 hour
|
||||
vibrate: true // vibrate the device when dragging clock hand
|
||||
};
|
||||
|
||||
// Show or hide popover
|
||||
ClockPicker.prototype.toggle = function(){
|
||||
this[this.isShown ? 'hide' : 'show']();
|
||||
};
|
||||
|
||||
// Set popover position
|
||||
ClockPicker.prototype.locate = function(){
|
||||
var element = this.element,
|
||||
popover = this.popover,
|
||||
offset = element.offset(),
|
||||
width = element.outerWidth(),
|
||||
height = element.outerHeight(),
|
||||
placement = this.options.placement,
|
||||
align = this.options.align,
|
||||
styles = {},
|
||||
self = this;
|
||||
|
||||
popover.show();
|
||||
|
||||
// Place the popover
|
||||
switch (placement) {
|
||||
case 'bottom':
|
||||
styles.top = offset.top + height;
|
||||
break;
|
||||
case 'right':
|
||||
styles.left = offset.left + width;
|
||||
break;
|
||||
case 'top':
|
||||
styles.top = offset.top - popover.outerHeight();
|
||||
break;
|
||||
case 'left':
|
||||
styles.left = offset.left - popover.outerWidth();
|
||||
break;
|
||||
}
|
||||
|
||||
// Align the popover arrow
|
||||
switch (align) {
|
||||
case 'left':
|
||||
styles.left = offset.left;
|
||||
break;
|
||||
case 'right':
|
||||
styles.left = offset.left + width - popover.outerWidth();
|
||||
break;
|
||||
case 'top':
|
||||
styles.top = offset.top;
|
||||
break;
|
||||
case 'bottom':
|
||||
styles.top = offset.top + height - popover.outerHeight();
|
||||
break;
|
||||
}
|
||||
|
||||
popover.css(styles);
|
||||
};
|
||||
|
||||
// Show popover
|
||||
ClockPicker.prototype.show = function(e){
|
||||
// Not show again
|
||||
if (this.isShown) {
|
||||
return;
|
||||
}
|
||||
|
||||
raiseCallback(this.options.beforeShow);
|
||||
|
||||
var self = this;
|
||||
|
||||
// Initialize
|
||||
if (! this.isAppended) {
|
||||
// Append popover to body
|
||||
$body = $(document.body).append(this.popover);
|
||||
|
||||
// Reset position when resize
|
||||
$win.on('resize.clockpicker' + this.id, function(){
|
||||
if (self.isShown) {
|
||||
self.locate();
|
||||
}
|
||||
});
|
||||
|
||||
this.isAppended = true;
|
||||
}
|
||||
|
||||
// Get the time
|
||||
var value = ((this.input.prop('value') || this.options['default'] || '') + '').split(':');
|
||||
if (value[0] === 'now') {
|
||||
var now = new Date(+ new Date() + this.options.fromnow);
|
||||
value = [
|
||||
now.getHours(),
|
||||
now.getMinutes()
|
||||
];
|
||||
}
|
||||
this.hours = + value[0] || 0;
|
||||
this.minutes = + value[1] || 0;
|
||||
this.spanHours.html(leadingZero(this.hours));
|
||||
this.spanMinutes.html(leadingZero(this.minutes));
|
||||
|
||||
// Toggle to hours view
|
||||
this.toggleView('hours');
|
||||
|
||||
// Set position
|
||||
this.locate();
|
||||
|
||||
this.isShown = true;
|
||||
|
||||
// Hide when clicking or tabbing on any element except the clock, input and addon
|
||||
$doc.on('click.clockpicker.' + this.id + ' focusin.clockpicker.' + this.id, function(e){
|
||||
var target = $(e.target);
|
||||
if (target.closest(self.popover).length === 0 &&
|
||||
target.closest(self.addon).length === 0 &&
|
||||
target.closest(self.input).length === 0) {
|
||||
self.hide();
|
||||
}
|
||||
});
|
||||
|
||||
// Hide when ESC is pressed
|
||||
$doc.on('keyup.clockpicker.' + this.id, function(e){
|
||||
if (e.keyCode === 27) {
|
||||
self.hide();
|
||||
}
|
||||
});
|
||||
|
||||
raiseCallback(this.options.afterShow);
|
||||
};
|
||||
|
||||
// Hide popover
|
||||
ClockPicker.prototype.hide = function(){
|
||||
raiseCallback(this.options.beforeHide);
|
||||
|
||||
this.isShown = false;
|
||||
|
||||
// Unbinding events on document
|
||||
$doc.off('click.clockpicker.' + this.id + ' focusin.clockpicker.' + this.id);
|
||||
$doc.off('keyup.clockpicker.' + this.id);
|
||||
|
||||
this.popover.hide();
|
||||
|
||||
raiseCallback(this.options.afterHide);
|
||||
};
|
||||
|
||||
// Toggle to hours or minutes view
|
||||
ClockPicker.prototype.toggleView = function(view, delay){
|
||||
var raiseAfterHourSelect = false;
|
||||
if (view === 'minutes' && $(this.hoursView).css("visibility") === "visible") {
|
||||
raiseCallback(this.options.beforeHourSelect);
|
||||
raiseAfterHourSelect = true;
|
||||
}
|
||||
var isHours = view === 'hours',
|
||||
nextView = isHours ? this.hoursView : this.minutesView,
|
||||
hideView = isHours ? this.minutesView : this.hoursView;
|
||||
|
||||
this.currentView = view;
|
||||
|
||||
this.spanHours.toggleClass('text-primary', isHours);
|
||||
this.spanMinutes.toggleClass('text-primary', ! isHours);
|
||||
|
||||
// Let's make transitions
|
||||
hideView.addClass('clockpicker-dial-out');
|
||||
nextView.css('visibility', 'visible').removeClass('clockpicker-dial-out');
|
||||
|
||||
// Reset clock hand
|
||||
this.resetClock(delay);
|
||||
|
||||
// After transitions ended
|
||||
clearTimeout(this.toggleViewTimer);
|
||||
this.toggleViewTimer = setTimeout(function(){
|
||||
hideView.css('visibility', 'hidden');
|
||||
}, duration);
|
||||
|
||||
if (raiseAfterHourSelect) {
|
||||
raiseCallback(this.options.afterHourSelect);
|
||||
}
|
||||
};
|
||||
|
||||
// Reset clock hand
|
||||
ClockPicker.prototype.resetClock = function(delay){
|
||||
var view = this.currentView,
|
||||
value = this[view],
|
||||
isHours = view === 'hours',
|
||||
unit = Math.PI / (isHours ? 6 : 30),
|
||||
radian = value * unit,
|
||||
radius = isHours && value > 0 && value < 13 ? innerRadius : outerRadius,
|
||||
x = Math.sin(radian) * radius,
|
||||
y = - Math.cos(radian) * radius,
|
||||
self = this;
|
||||
if (svgSupported && delay) {
|
||||
self.canvas.addClass('clockpicker-canvas-out');
|
||||
setTimeout(function(){
|
||||
self.canvas.removeClass('clockpicker-canvas-out');
|
||||
self.setHand(x, y);
|
||||
}, delay);
|
||||
} else {
|
||||
this.setHand(x, y);
|
||||
}
|
||||
};
|
||||
|
||||
// Set clock hand to (x, y)
|
||||
ClockPicker.prototype.setHand = function(x, y, roundBy5, dragging){
|
||||
var radian = Math.atan2(x, - y),
|
||||
isHours = this.currentView === 'hours',
|
||||
unit = Math.PI / (isHours || roundBy5 ? 6 : 30),
|
||||
z = Math.sqrt(x * x + y * y),
|
||||
options = this.options,
|
||||
inner = isHours && z < (outerRadius + innerRadius) / 2,
|
||||
radius = inner ? innerRadius : outerRadius,
|
||||
value;
|
||||
|
||||
if (options.twelvehour) {
|
||||
radius = outerRadius;
|
||||
}
|
||||
|
||||
// Radian should in range [0, 2PI]
|
||||
if (radian < 0) {
|
||||
radian = Math.PI * 2 + radian;
|
||||
}
|
||||
|
||||
// Get the round value
|
||||
value = Math.round(radian / unit);
|
||||
|
||||
// Get the round radian
|
||||
radian = value * unit;
|
||||
|
||||
// Correct the hours or minutes
|
||||
if (options.twelvehour) {
|
||||
if (isHours) {
|
||||
if (value === 0) {
|
||||
value = 12;
|
||||
}
|
||||
} else {
|
||||
if (roundBy5) {
|
||||
value *= 5;
|
||||
}
|
||||
if (value === 60) {
|
||||
value = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isHours) {
|
||||
if (value === 12) {
|
||||
value = 0;
|
||||
}
|
||||
value = inner ? (value === 0 ? 12 : value) : value === 0 ? 0 : value + 12;
|
||||
} else {
|
||||
if (roundBy5) {
|
||||
value *= 5;
|
||||
}
|
||||
if (value === 60) {
|
||||
value = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Once hours or minutes changed, vibrate the device
|
||||
if (this[this.currentView] !== value) {
|
||||
if (vibrate && this.options.vibrate) {
|
||||
// Do not vibrate too frequently
|
||||
if (! this.vibrateTimer) {
|
||||
navigator[vibrate](10);
|
||||
this.vibrateTimer = setTimeout($.proxy(function(){
|
||||
this.vibrateTimer = null;
|
||||
}, this), 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this[this.currentView] = value;
|
||||
this[isHours ? 'spanHours' : 'spanMinutes'].html(leadingZero(value));
|
||||
|
||||
// If svg is not supported, just add an active class to the tick
|
||||
if (! svgSupported) {
|
||||
this[isHours ? 'hoursView' : 'minutesView'].find('.clockpicker-tick').each(function(){
|
||||
var tick = $(this);
|
||||
tick.toggleClass('active', value === + tick.html());
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Place clock hand at the top when dragging
|
||||
if (dragging || (! isHours && value % 5)) {
|
||||
this.g.insertBefore(this.hand, this.bearing);
|
||||
this.g.insertBefore(this.bg, this.fg);
|
||||
this.bg.setAttribute('class', 'clockpicker-canvas-bg clockpicker-canvas-bg-trans');
|
||||
} else {
|
||||
// Or place it at the bottom
|
||||
this.g.insertBefore(this.hand, this.bg);
|
||||
this.g.insertBefore(this.fg, this.bg);
|
||||
this.bg.setAttribute('class', 'clockpicker-canvas-bg');
|
||||
}
|
||||
|
||||
// Set clock hand and others' position
|
||||
var cx = Math.sin(radian) * radius,
|
||||
cy = - Math.cos(radian) * radius;
|
||||
this.hand.setAttribute('x2', cx);
|
||||
this.hand.setAttribute('y2', cy);
|
||||
this.bg.setAttribute('cx', cx);
|
||||
this.bg.setAttribute('cy', cy);
|
||||
this.fg.setAttribute('cx', cx);
|
||||
this.fg.setAttribute('cy', cy);
|
||||
};
|
||||
|
||||
// Hours and minutes are selected
|
||||
ClockPicker.prototype.done = function() {
|
||||
raiseCallback(this.options.beforeDone);
|
||||
this.hide();
|
||||
var last = this.input.prop('value'),
|
||||
value = leadingZero(this.hours) + ':' + leadingZero(this.minutes);
|
||||
if (this.options.twelvehour) {
|
||||
value = value + this.amOrPm;
|
||||
}
|
||||
|
||||
this.input.prop('value', value);
|
||||
if (value !== last) {
|
||||
this.input.triggerHandler('change');
|
||||
if (! this.isInput) {
|
||||
this.element.trigger('change');
|
||||
}
|
||||
}
|
||||
|
||||
if (this.options.autoclose) {
|
||||
this.input.trigger('blur');
|
||||
}
|
||||
|
||||
raiseCallback(this.options.afterDone);
|
||||
};
|
||||
|
||||
// Remove clockpicker from input
|
||||
ClockPicker.prototype.remove = function() {
|
||||
this.element.removeData('clockpicker');
|
||||
this.input.off('focus.clockpicker click.clockpicker');
|
||||
this.addon.off('click.clockpicker');
|
||||
if (this.isShown) {
|
||||
this.hide();
|
||||
}
|
||||
if (this.isAppended) {
|
||||
$win.off('resize.clockpicker' + this.id);
|
||||
this.popover.remove();
|
||||
}
|
||||
};
|
||||
|
||||
// Extends $.fn.clockpicker
|
||||
$.fn.clockpicker = function(option){
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
return this.each(function(){
|
||||
var $this = $(this),
|
||||
data = $this.data('clockpicker');
|
||||
if (! data) {
|
||||
var options = $.extend({}, ClockPicker.DEFAULTS, $this.data(), typeof option == 'object' && option);
|
||||
$this.data('clockpicker', new ClockPicker($this, options));
|
||||
} else {
|
||||
// Manual operatsions. show, hide, remove, e.g.
|
||||
if (typeof data[option] === 'function') {
|
||||
data[option].apply(data, args);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}());
|
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
* ClockPicker v0.0.7 for Bootstrap (http://weareoutman.github.io/clockpicker/)
|
||||
* Copyright 2014 Wang Shenwei.
|
||||
* Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)
|
||||
*/.clockpicker .input-group-addon{cursor:pointer}.clockpicker-moving{cursor:move}.clockpicker-align-left.popover>.arrow{left:25px}.clockpicker-align-top.popover>.arrow{top:17px}.clockpicker-align-right.popover>.arrow{left:auto;right:25px}.clockpicker-align-bottom.popover>.arrow{top:auto;bottom:6px}.clockpicker-popover .popover-title{background-color:#fff;color:#999;font-size:24px;font-weight:700;line-height:30px;text-align:center}.clockpicker-popover .popover-title span{cursor:pointer}.clockpicker-popover .popover-content{background-color:#f8f8f8;padding:12px}.popover-content:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.clockpicker-plate{background-color:#fff;border:1px solid #ccc;border-radius:50%;width:200px;height:200px;overflow:visible;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.clockpicker-canvas,.clockpicker-dial{width:200px;height:200px;position:absolute;left:-1px;top:-1px}.clockpicker-minutes{visibility:hidden}.clockpicker-tick{border-radius:50%;color:#666;line-height:26px;text-align:center;width:26px;height:26px;position:absolute;cursor:pointer}.clockpicker-tick.active,.clockpicker-tick:hover{background-color:#c0e5f7;background-color:rgba(0,149,221,.25)}.clockpicker-button{background-image:none;background-color:#fff;border-width:1px 0 0;border-top-left-radius:0;border-top-right-radius:0;margin:0;padding:10px 0}.clockpicker-button:hover{background-image:none;background-color:#ebebeb}.clockpicker-button:focus{outline:0!important}.clockpicker-dial{-webkit-transition:-webkit-transform 350ms,opacity 350ms;-moz-transition:-moz-transform 350ms,opacity 350ms;-ms-transition:-ms-transform 350ms,opacity 350ms;-o-transition:-o-transform 350ms,opacity 350ms;transition:transform 350ms,opacity 350ms}.clockpicker-dial-out{opacity:0}.clockpicker-hours.clockpicker-dial-out{-webkit-transform:scale(1.2,1.2);-moz-transform:scale(1.2,1.2);-ms-transform:scale(1.2,1.2);-o-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}.clockpicker-minutes.clockpicker-dial-out{-webkit-transform:scale(.8,.8);-moz-transform:scale(.8,.8);-ms-transform:scale(.8,.8);-o-transform:scale(.8,.8);transform:scale(.8,.8)}.clockpicker-canvas{-webkit-transition:opacity 175ms;-moz-transition:opacity 175ms;-ms-transition:opacity 175ms;-o-transition:opacity 175ms;transition:opacity 175ms}.clockpicker-canvas-out{opacity:.25}.clockpicker-canvas-bearing,.clockpicker-canvas-fg{stroke:none;fill:#0095dd}.clockpicker-canvas-bg{stroke:none;fill:#c0e5f7}.clockpicker-canvas-bg-trans{fill:rgba(0,149,221,.25)}.clockpicker-canvas line{stroke:#0095dd;stroke-width:1;stroke-linecap:round}.clockpicker-button.am-button{margin:1px;padding:5px;border:1px solid rgba(0,0,0,.2);border-radius:4px}.clockpicker-button.pm-button{margin:1px 1px 1px 136px;padding:5px;border:1px solid rgba(0,0,0,.2);border-radius:4px}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,301 @@
|
|||
/*!
|
||||
* 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-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 6px;
|
||||
}
|
||||
.datepicker-dropdown:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #ffffff;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 7px;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.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 !important;
|
||||
}
|
||||
.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.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 {
|
||||
color: #999999;
|
||||
}
|
||||
.datepicker th.switch {
|
||||
width: 145px;
|
||||
}
|
||||
.datepicker thead tr:first-child th,
|
||||
.datepicker tfoot tr:first-child th {
|
||||
cursor: pointer;
|
||||
}
|
||||
.datepicker thead tr:first-child th:hover,
|
||||
.datepicker tfoot tr:first-child 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;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.bg.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.bg.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Bulgarian translation for bootstrap-datepicker
|
||||
* Apostol Apostolov <apostol.s.apostolov@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['bg'] = {
|
||||
days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"],
|
||||
daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб", "Нед"],
|
||||
daysMin: ["Н", "П", "В", "С", "Ч", "П", "С", "Н"],
|
||||
months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"],
|
||||
monthsShort: ["Ян", "Фев", "Мар", "Апр", "Май", "Юни", "Юли", "Авг", "Сеп", "Окт", "Ное", "Дек"],
|
||||
today: "днес"
|
||||
};
|
||||
}(jQuery));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ca.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ca.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Catalan translation for bootstrap-datepicker
|
||||
* J. Garcia <jogaco.en@gmail.com>
|
||||
*/
|
||||
;(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));
|
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.cs.js
vendored
Normal file
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.cs.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Czech translation for bootstrap-datepicker
|
||||
* Matěj Koubík <matej@koubik.name>
|
||||
* Fixes by Michal Remiš <michal.remis@gmail.com>
|
||||
*/
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.da.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Danish translation for bootstrap-datepicker
|
||||
* Christian Pedersen <http://github.com/chripede>
|
||||
*/
|
||||
;(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));
|
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js
vendored
Normal file
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* German translation for bootstrap-datepicker
|
||||
* Sam Zurcher <sam@orelias.ch>
|
||||
*/
|
||||
;(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));
|
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js
vendored
Normal file
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.el.js
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Greek translation for bootstrap-datepicker
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['el'] = {
|
||||
days: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο", "Κυριακή"],
|
||||
daysShort: ["Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ", "Κυρ"],
|
||||
daysMin: ["Κυ", "Δε", "Τρ", "Τε", "Πε", "Πα", "Σα", "Κυ"],
|
||||
months: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"],
|
||||
monthsShort: ["Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"],
|
||||
today: "Σήμερα"
|
||||
};
|
||||
}(jQuery));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.es.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.es.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Spanish translation for bootstrap-datepicker
|
||||
* Bruno Bonamin <bruno.bonamin@gmail.com>
|
||||
*/
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.fi.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.fi.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Finnish translation for bootstrap-datepicker
|
||||
* Jaakko Salonen <https://github.com/jsalonen>
|
||||
*/
|
||||
;(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"
|
||||
};
|
||||
}(jQuery));
|
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js
vendored
Normal file
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* French translation for bootstrap-datepicker
|
||||
* Nico Mollet <nico.mollet@gmail.com>
|
||||
*/
|
||||
;(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",
|
||||
weekStart: 1,
|
||||
format: "dd/mm/yyyy"
|
||||
};
|
||||
}(jQuery));
|
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.he.js
vendored
Normal file
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.he.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Hebrew translation for bootstrap-datepicker
|
||||
* Sagie Maoz <sagie@maoz.info>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['he'] = {
|
||||
days: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"],
|
||||
daysShort: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"],
|
||||
daysMin: ["א", "ב", "ג", "ד", "ה", "ו", "ש", "א"],
|
||||
months: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"],
|
||||
monthsShort: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"],
|
||||
today: "היום",
|
||||
rtl: true
|
||||
};
|
||||
}(jQuery));
|
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js
vendored
Normal file
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.hr.js
vendored
Normal file
|
@ -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));
|
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.hu.js
vendored
Normal file
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.hu.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Hungarian translation for bootstrap-datepicker
|
||||
* Sotus László <lacisan@gmail.com>
|
||||
*/
|
||||
;(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));
|
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.id.js
vendored
Normal file
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.id.js
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Bahasa translation for bootstrap-datepicker
|
||||
* Azwar Akbar <azwar.akbar@gmail.com>
|
||||
*/
|
||||
;(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"]
|
||||
};
|
||||
}(jQuery));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.is.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.is.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Icelandic translation for bootstrap-datepicker
|
||||
* Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||
*/
|
||||
;(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));
|
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js
vendored
Normal file
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.it.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Italian translation for bootstrap-datepicker
|
||||
* Enrico Rubboli <rubboli@gmail.com>
|
||||
*/
|
||||
;(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));
|
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ja.js
vendored
Normal file
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ja.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Japanese translation for bootstrap-datepicker
|
||||
* Norio Suzuki <https://github.com/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));
|
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.kr.js
vendored
Normal file
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.kr.js
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Korean translation for bootstrap-datepicker
|
||||
* Gu Youn <http://github.com/guyoun>
|
||||
*/
|
||||
;(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));
|
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.lt.js
vendored
Normal file
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.lt.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Lithuanian translation for bootstrap-datepicker
|
||||
* Šarūnas Gliebus <ssharunas@yahoo.co.uk>
|
||||
*/
|
||||
|
||||
;(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));
|
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js
vendored
Normal file
16
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.lv.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Latvian translation for bootstrap-datepicker
|
||||
* Artis Avotins <artis@apit.lv>
|
||||
*/
|
||||
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ms.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ms.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Malay translation for bootstrap-datepicker
|
||||
* Ateman Faiz <noorulfaiz@gmail.com>
|
||||
*/
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.nb.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.nb.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Norwegian (bokmål) translation for bootstrap-datepicker
|
||||
* Fredrik Sundmyhr <http://github.com/fsundmyhr>
|
||||
*/
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.nl.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Dutch translation for bootstrap-datepicker
|
||||
* Reinier Goltstein <mrgoltstein@gmail.com>
|
||||
*/
|
||||
;(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));
|
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.pl.js
vendored
Normal file
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.pl.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Polish translation for bootstrap-datepicker
|
||||
* Robert <rtpm@gazeta.pl>
|
||||
*/
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt-BR.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt-BR.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Brazilian translation for bootstrap-datepicker
|
||||
* Cauan Cabral <cauan@radig.com.br>
|
||||
*/
|
||||
;(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"
|
||||
};
|
||||
}(jQuery));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.pt.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Portuguese translation for bootstrap-datepicker
|
||||
* Original code: Cauan Cabral <cauan@radig.com.br>
|
||||
* Tiago Melo <tiago.blackcode@gmail.com>
|
||||
*/
|
||||
;(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"]
|
||||
};
|
||||
}(jQuery));
|
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js
vendored
Normal file
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ro.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Romanian translation for bootstrap-datepicker
|
||||
* Cristian Vasile <cristi.mie@gmail.com>
|
||||
*/
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs-latin.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs-latin.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Serbian latin translation for bootstrap-datepicker
|
||||
* Bojan Milosavlević <milboj@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['rs'] = {
|
||||
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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.rs.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Serbian cyrillic translation for bootstrap-datepicker
|
||||
* Bojan Milosavlević <milboj@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['rs'] = {
|
||||
days: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота", "Недеља"],
|
||||
daysShort: ["Нед", "Пон", "Уто", "Сре", "Чет", "Пет", "Суб", "Нед"],
|
||||
daysMin: ["Н", "По", "У", "Ср", "Ч", "Пе", "Су", "Н"],
|
||||
months: ["Јануар", "Фебруар", "Март", "Април", "Мај", "Јун", "Јул", "Август", "Септембар", "Октобар", "Новембар", "Децембар"],
|
||||
monthsShort: ["Јан", "Феб", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"],
|
||||
today: "Данас"
|
||||
};
|
||||
}(jQuery));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ru.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.ru.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Russian translation for bootstrap-datepicker
|
||||
* Victor Taranenko <darwin@snowdale.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['ru'] = {
|
||||
days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"],
|
||||
daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Вск"],
|
||||
daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"],
|
||||
months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
|
||||
monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
|
||||
today: "Сегодня"
|
||||
};
|
||||
}(jQuery));
|
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.sk.js
vendored
Normal file
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.sk.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Slovak translation for bootstrap-datepicker
|
||||
* Marek Lichtner <marek@licht.sk>
|
||||
* Fixes by Michal Remiš <michal.remis@gmail.com>
|
||||
*/
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.sl.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.sl.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Slovene translation for bootstrap-datepicker
|
||||
* Gregor Rudolf <gregor.rudolf@gmail.com>
|
||||
*/
|
||||
;(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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.sv.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Swedish translation for bootstrap-datepicker
|
||||
* Patrik Ragnarsson <patrik@starkast.net>
|
||||
*/
|
||||
;(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"
|
||||
};
|
||||
}(jQuery));
|
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.sw.js
vendored
Normal file
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.sw.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Swahili translation for bootstrap-datepicker
|
||||
* Edwin Mugendi <https://github.com/edwinmugendi>
|
||||
* 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));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.th.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.th.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Thai translation for bootstrap-datepicker
|
||||
* Suchau Jiraprapot <seroz24@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['th'] = {
|
||||
days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"],
|
||||
daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"],
|
||||
daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"],
|
||||
months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"],
|
||||
monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."],
|
||||
today: "วันนี้"
|
||||
};
|
||||
}(jQuery));
|
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.tr.js
vendored
Normal file
15
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.tr.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Turkish translation for bootstrap-datepicker
|
||||
* Serkan Algur <kaisercrazy_2@hotmail.com>
|
||||
*/
|
||||
;(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"
|
||||
};
|
||||
}(jQuery));
|
||||
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.uk.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.uk.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Ukrainian translation for bootstrap-datepicker
|
||||
* Andrey Vityuk <andrey [dot] vityuk [at] gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['uk'] = {
|
||||
days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота", "Неділя"],
|
||||
daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"],
|
||||
daysMin: ["Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Нд"],
|
||||
months: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"],
|
||||
monthsShort: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"],
|
||||
today: "Сьогодні"
|
||||
};
|
||||
}(jQuery));
|
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js
vendored
Normal file
14
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Simplified Chinese translation for bootstrap-datepicker
|
||||
* Yuan Cheung <advanimal@gmail.com>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['zh-CN'] = {
|
||||
days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
|
||||
daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
||||
daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
|
||||
months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
today: "今日"
|
||||
};
|
||||
}(jQuery));
|
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-TW.js
vendored
Normal file
13
static/xadmin/vendor/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-TW.js
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Traditional Chinese translation for bootstrap-datepicker
|
||||
* Rung-Sheng Jang <daniel@i-trend.co.cc>
|
||||
*/
|
||||
;(function($){
|
||||
$.fn.datepicker.dates['zh-TW'] = {
|
||||
days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
|
||||
daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
||||
daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
|
||||
months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"]
|
||||
};
|
||||
}(jQuery));
|
153
static/xadmin/vendor/bootstrap-image-gallery/css/bootstrap-image-gallery.css
vendored
Normal file
153
static/xadmin/vendor/bootstrap-image-gallery/css/bootstrap-image-gallery.css
vendored
Normal file
|
@ -0,0 +1,153 @@
|
|||
@charset 'UTF-8';
|
||||
/*
|
||||
* Bootstrap Image Gallery CSS 2.5.3
|
||||
* https://github.com/blueimp/Bootstrap-Image-Gallery
|
||||
*
|
||||
* Copyright 2011, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
.modal-gallery {
|
||||
}
|
||||
.modal-gallery.fade.in {
|
||||
}
|
||||
.modal-gallery .modal-body {
|
||||
}
|
||||
.modal-gallery .modal-title {
|
||||
}
|
||||
.modal-gallery .modal-image {
|
||||
position: relative;
|
||||
margin: auto;
|
||||
min-width: 128px;
|
||||
min-height: 128px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
.modal-gallery .modal-footer {
|
||||
margin-top: 0px;
|
||||
}
|
||||
.modal-gallery .modal-image:hover:before,
|
||||
.modal-gallery .modal-image:hover:after {
|
||||
content: '\2039';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 15px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-top: -20px;
|
||||
font-size: 60px;
|
||||
font-weight: 100;
|
||||
line-height: 24px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
background: #222222;
|
||||
border: 3px solid #ffffff;
|
||||
-webkit-border-radius: 23px;
|
||||
-moz-border-radius: 23px;
|
||||
border-radius: 23px;
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
z-index: 1;
|
||||
}
|
||||
.modal-gallery .modal-image:hover:after {
|
||||
content: '\203A';
|
||||
left: auto;
|
||||
right: 15px;
|
||||
}
|
||||
.modal-single .modal-image:hover:before,
|
||||
.modal-single .modal-image:hover:after {
|
||||
display: none;
|
||||
}
|
||||
.modal-gallery.fade .modal-image, .modal-gallery.fade .modal-dialog {
|
||||
-webkit-transition: width 0.15s ease, height 0.15s ease;
|
||||
-moz-transition: width 0.15s ease, height 0.15s ease;
|
||||
-ms-transition: width 0.15s ease, height 0.15s ease;
|
||||
-o-transition: width 0.15s ease, height 0.15s ease;
|
||||
transition: width 0.15s ease, height 0.15s ease;
|
||||
}
|
||||
.modal-gallery .modal-image *:not(.loader) {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
.modal-gallery .modal-image *:not(.loader) {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
.modal-gallery .modal-image h1.loader {
|
||||
height: 50%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 4em;
|
||||
display: none;
|
||||
}
|
||||
.modal-loading.modal-gallery .modal-image h1.loader {
|
||||
display: block;
|
||||
}
|
||||
.modal-gallery.fade .modal-image * {
|
||||
-webkit-transition: opacity 0.5s linear;
|
||||
-moz-transition: opacity 0.5s linear;
|
||||
-ms-transition: opacity 0.5s linear;
|
||||
-o-transition: opacity 0.5s linear;
|
||||
transition: opacity 0.5s linear;
|
||||
}
|
||||
.modal-gallery .modal-image *.in {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.modal-fullscreen {
|
||||
border: none;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
}
|
||||
.modal-fullscreen.modal-loading {
|
||||
border: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.modal-fullscreen .modal-body {
|
||||
padding: 0;
|
||||
}
|
||||
.modal-fullscreen .modal-header,
|
||||
.modal-fullscreen .modal-footer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
opacity: 0;
|
||||
z-index: 2000;
|
||||
}
|
||||
.modal-fullscreen .modal-footer {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
}
|
||||
.modal-fullscreen .close,
|
||||
.modal-fullscreen .modal-title {
|
||||
color: #fff;
|
||||
text-shadow: 0 0 2px rgba(33, 33, 33, 0.8);
|
||||
}
|
||||
.modal-fullscreen .modal-header:hover,
|
||||
.modal-fullscreen .modal-footer:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.modal-gallery .btn span {
|
||||
display: none;
|
||||
}
|
||||
.modal-fullscreen {
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
22
static/xadmin/vendor/bootstrap-image-gallery/css/bootstrap-image-gallery.min.css
vendored
Normal file
22
static/xadmin/vendor/bootstrap-image-gallery/css/bootstrap-image-gallery.min.css
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
@charset 'UTF-8';
|
||||
.modal-gallery{width:auto;max-height:none;outline:none;}
|
||||
.modal-gallery.fade.in{top:50%;}
|
||||
.modal-gallery .modal-body{max-height:none;}
|
||||
.modal-gallery .modal-title{display:inline-block;max-height:54px;overflow:hidden;}
|
||||
.modal-gallery .modal-image{position:relative;margin:auto;min-width:128px;min-height:128px;overflow:hidden;cursor:pointer;}
|
||||
.modal-gallery .modal-image:hover:before,.modal-gallery .modal-image:hover:after{content:'\2039';position:absolute;top:50%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);z-index:1;}
|
||||
.modal-gallery .modal-image:hover:after{content:'\203A';left:auto;right:15px;}
|
||||
.modal-single .modal-image:hover:before,.modal-single .modal-image:hover:after{display:none;}
|
||||
.modal-loading .modal-image{background:url(../img/loading.gif) center no-repeat;}
|
||||
.modal-gallery.fade .modal-image{-webkit-transition:width 0.15s ease, height 0.15s ease;-moz-transition:width 0.15s ease, height 0.15s ease;-ms-transition:width 0.15s ease, height 0.15s ease;-o-transition:width 0.15s ease, height 0.15s ease;transition:width 0.15s ease, height 0.15s ease;}
|
||||
.modal-gallery .modal-image *{position:absolute;top:0;opacity:0;filter:alpha(opacity=0);}
|
||||
.modal-gallery.fade .modal-image *{-webkit-transition:opacity 0.5s linear;-moz-transition:opacity 0.5s linear;-ms-transition:opacity 0.5s linear;-o-transition:opacity 0.5s linear;transition:opacity 0.5s linear;}
|
||||
.modal-gallery .modal-image *.in{opacity:1;filter:alpha(opacity=100);}
|
||||
.modal-fullscreen{border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background:transparent;overflow:hidden;}
|
||||
.modal-fullscreen.modal-loading{border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
|
||||
.modal-fullscreen .modal-body{padding:0;}
|
||||
.modal-fullscreen .modal-header,.modal-fullscreen .modal-footer{position:absolute;top:0;right:0;left:0;background:transparent;border:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:0;z-index:2000;}
|
||||
.modal-fullscreen .modal-footer{top:auto;bottom:0;}
|
||||
.modal-fullscreen .close,.modal-fullscreen .modal-title{color:#fff;text-shadow:0 0 2px rgba(33, 33, 33, 0.8);}
|
||||
.modal-fullscreen .modal-header:hover,.modal-fullscreen .modal-footer:hover{opacity:1;}
|
||||
@media (max-width:767px){.modal-gallery .btn span{display:none;} .modal-fullscreen{right:0;left:0;}}
|
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
|
@ -0,0 +1,402 @@
|
|||
/*
|
||||
* Bootstrap Image Gallery 2.10
|
||||
* https://github.com/blueimp/Bootstrap-Image-Gallery
|
||||
*
|
||||
* Copyright 2011, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
/*jslint nomen: true, regexp: true */
|
||||
/*global define, window, document, jQuery */
|
||||
|
||||
(function (factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// Register as an anonymous AMD module:
|
||||
define([
|
||||
'jquery',
|
||||
'load-image',
|
||||
'bootstrap'
|
||||
], factory);
|
||||
} else {
|
||||
// Browser globals:
|
||||
factory(
|
||||
window.jQuery,
|
||||
window.loadImage
|
||||
);
|
||||
}
|
||||
}(function ($, loadImage) {
|
||||
'use strict';
|
||||
// Bootstrap Image Gallery is an extension to the Modal dialog of Twitter's
|
||||
// Bootstrap toolkit, to ease navigation between a set of gallery images.
|
||||
// It features transition effects, fullscreen mode and slideshow functionality.
|
||||
$.extend($.fn.modal.Constructor.DEFAULTS, {
|
||||
// Delegate to search gallery links from, can be anything that
|
||||
// is accepted as parameter for $():
|
||||
delegate: document,
|
||||
// Selector for gallery links:
|
||||
selector: null,
|
||||
// The filter for the selected gallery links (e.g. set to ":odd" to
|
||||
// filter out label and thumbnail linking twice to the same image):
|
||||
filter: '*',
|
||||
// The index of the first gallery image to show:
|
||||
index: 0,
|
||||
// The href of the first gallery image to show (overrides index):
|
||||
href: null,
|
||||
// The range of images around the current one to preload:
|
||||
preloadRange: 2,
|
||||
// Offset of image width to viewport width:
|
||||
offsetWidth: 100,
|
||||
// Offset of image height to viewport height:
|
||||
offsetHeight: 230,
|
||||
// Set to true to display images as canvas elements:
|
||||
canvas: false,
|
||||
// Shows the next image after the given time in ms (0 = disabled):
|
||||
slideshow: 0,
|
||||
// Defines the image division for previous/next clicks:
|
||||
imageClickDivision: 0.5
|
||||
});
|
||||
var originalShow = $.fn.modal.Constructor.prototype.show,
|
||||
originalHide = $.fn.modal.Constructor.prototype.hide;
|
||||
$.extend($.fn.modal.Constructor.prototype, {
|
||||
initLinks: function () {
|
||||
var $this = this,
|
||||
options = this.options,
|
||||
selector = options.selector ||
|
||||
'a[data-target=' + options.target + ']';
|
||||
this.$links = $(options.delegate).find(selector)
|
||||
.each(function (index) {
|
||||
if ($this.getUrl(this) === options.href) {
|
||||
options.index = index;
|
||||
}
|
||||
});
|
||||
if (!this.$links[options.index]) {
|
||||
options.index = 0;
|
||||
}
|
||||
},
|
||||
getUrl: function (element) {
|
||||
return element.href || $(element).data('href');
|
||||
},
|
||||
getDownloadUrl: function (element) {
|
||||
return $(element).data('download');
|
||||
},
|
||||
startSlideShow: function () {
|
||||
var $this = this;
|
||||
if (this.options.slideshow) {
|
||||
this._slideShow = window.setTimeout(
|
||||
function () {
|
||||
$this.next();
|
||||
},
|
||||
this.options.slideshow
|
||||
);
|
||||
}
|
||||
},
|
||||
stopSlideShow: function () {
|
||||
window.clearTimeout(this._slideShow);
|
||||
},
|
||||
toggleSlideShow: function () {
|
||||
var node = this.$element.find('.modal-slideshow');
|
||||
if (this.options.slideshow) {
|
||||
this.options.slideshow = 0;
|
||||
this.stopSlideShow();
|
||||
} else {
|
||||
this.options.slideshow = node.data('slideshow') || 5000;
|
||||
this.startSlideShow();
|
||||
}
|
||||
node.find('i').toggleClass('icon-play icon-pause');
|
||||
},
|
||||
preloadImages: function () {
|
||||
var options = this.options,
|
||||
range = options.index + options.preloadRange + 1,
|
||||
link,
|
||||
i;
|
||||
for (i = options.index - options.preloadRange; i < range; i += 1) {
|
||||
link = this.$links[i];
|
||||
if (link && i !== options.index) {
|
||||
$('<img>').prop('src', this.getUrl(link));
|
||||
}
|
||||
}
|
||||
},
|
||||
loadImage: function () {
|
||||
var $this = this,
|
||||
modal = this.$element,
|
||||
index = this.options.index,
|
||||
url = this.getUrl(this.$links[index]),
|
||||
download = this.getDownloadUrl(this.$links[index]),
|
||||
oldImg;
|
||||
this.abortLoad();
|
||||
this.stopSlideShow();
|
||||
modal.trigger('beforeLoad');
|
||||
// The timeout prevents displaying a loading status,
|
||||
// if the image has already been loaded:
|
||||
this._loadingTimeout = window.setTimeout(function () {
|
||||
modal.addClass('modal-loading');
|
||||
}, 100);
|
||||
oldImg = modal.find('.modal-image').children('img').removeClass('in');
|
||||
// The timeout allows transition effects to finish:
|
||||
window.setTimeout(function () {
|
||||
oldImg.remove();
|
||||
}, 3000);
|
||||
modal.find('.modal-title').text(this.$links[index].title);
|
||||
modal.find('.modal-download').prop(
|
||||
'href',
|
||||
download || url
|
||||
);
|
||||
this._loadingImage = loadImage(
|
||||
url,
|
||||
function (img) {
|
||||
$this.img = img;
|
||||
window.clearTimeout($this._loadingTimeout);
|
||||
modal.removeClass('modal-loading');
|
||||
modal.trigger('load');
|
||||
$this.showImage(img);
|
||||
$this.startSlideShow();
|
||||
},
|
||||
this._loadImageOptions
|
||||
);
|
||||
this.preloadImages();
|
||||
},
|
||||
showImage: function (img) {
|
||||
var modal = this.$element,
|
||||
transition = $.support.transition && modal.hasClass('fade'),
|
||||
method = transition ? modal.animate : modal.css,
|
||||
modalImage = modal.find('.modal-image'),
|
||||
clone,
|
||||
forceReflow;
|
||||
modalImage.css({
|
||||
width: img.width,
|
||||
height: img.height
|
||||
});
|
||||
if ($(window).width() > 767) {
|
||||
modal.find('.modal-dialog').css({width: Math.max(img.width + 60, 450)});
|
||||
}
|
||||
// modal.find('.modal-title').css({ width: Math.max(img.width, 380) });
|
||||
// if (transition) {
|
||||
// clone = modal.clone().hide().appendTo(document.body);
|
||||
// }
|
||||
// // if ($(window).width() > 767) {
|
||||
// // method.call(modal.stop(), {
|
||||
// // 'margin-top': -((clone || modal).outerHeight() / 2),
|
||||
// // 'margin-left': -((clone || modal).outerWidth() / 2)
|
||||
// // });
|
||||
// // } else {
|
||||
// // modal.css({
|
||||
// // top: ($(window).height() - (clone || modal).outerHeight()) / 2
|
||||
// // });
|
||||
// // }
|
||||
// if (clone) {
|
||||
// clone.remove();
|
||||
// }
|
||||
modalImage.append(img);
|
||||
forceReflow = img.offsetWidth;
|
||||
modal.trigger('display');
|
||||
if (transition) {
|
||||
if (modal.is(':visible')) {
|
||||
$(img).on(
|
||||
$.support.transition.end,
|
||||
function (e) {
|
||||
// Make sure we don't respond to other transitions events
|
||||
// in the container element, e.g. from button elements:
|
||||
if (e.target === img) {
|
||||
$(img).off($.support.transition.end);
|
||||
modal.trigger('displayed');
|
||||
}
|
||||
}
|
||||
).addClass('in');
|
||||
} else {
|
||||
$(img).addClass('in');
|
||||
modal.one('shown', function () {
|
||||
modal.trigger('displayed');
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$(img).addClass('in');
|
||||
modal.trigger('displayed');
|
||||
}
|
||||
},
|
||||
abortLoad: function () {
|
||||
if (this._loadingImage) {
|
||||
this._loadingImage.onload = this._loadingImage.onerror = null;
|
||||
}
|
||||
window.clearTimeout(this._loadingTimeout);
|
||||
},
|
||||
prev: function () {
|
||||
var options = this.options;
|
||||
options.index -= 1;
|
||||
if (options.index < 0) {
|
||||
options.index = this.$links.length - 1;
|
||||
}
|
||||
this.loadImage();
|
||||
},
|
||||
next: function () {
|
||||
var options = this.options;
|
||||
options.index += 1;
|
||||
if (options.index > this.$links.length - 1) {
|
||||
options.index = 0;
|
||||
}
|
||||
this.loadImage();
|
||||
},
|
||||
keyHandler: function (e) {
|
||||
switch (e.which) {
|
||||
case 37: // left
|
||||
case 38: // up
|
||||
e.preventDefault();
|
||||
this.prev();
|
||||
break;
|
||||
case 39: // right
|
||||
case 40: // down
|
||||
e.preventDefault();
|
||||
this.next();
|
||||
break;
|
||||
}
|
||||
},
|
||||
wheelHandler: function (e) {
|
||||
e.preventDefault();
|
||||
e = e.originalEvent;
|
||||
this._wheelCounter = this._wheelCounter || 0;
|
||||
this._wheelCounter += (e.wheelDelta || e.detail || 0);
|
||||
if ((e.wheelDelta && this._wheelCounter >= 120) ||
|
||||
(!e.wheelDelta && this._wheelCounter < 0)) {
|
||||
this.prev();
|
||||
this._wheelCounter = 0;
|
||||
} else if ((e.wheelDelta && this._wheelCounter <= -120) ||
|
||||
(!e.wheelDelta && this._wheelCounter > 0)) {
|
||||
this.next();
|
||||
this._wheelCounter = 0;
|
||||
}
|
||||
},
|
||||
initGalleryEvents: function () {
|
||||
var $this = this,
|
||||
modal = this.$element;
|
||||
modal.find('.modal-image').on('click.modal-gallery', function (e) {
|
||||
var modalImage = $(this);
|
||||
if ($this.$links.length === 1) {
|
||||
$this.hide();
|
||||
} else {
|
||||
if ((e.pageX - modalImage.offset().left) / modalImage.width() <
|
||||
$this.options.imageClickDivision) {
|
||||
$this.prev(e);
|
||||
} else {
|
||||
$this.next(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
modal.find('.modal-prev').on('click.modal-gallery', function (e) {
|
||||
$this.prev(e);
|
||||
});
|
||||
modal.find('.modal-next').on('click.modal-gallery', function (e) {
|
||||
$this.next(e);
|
||||
});
|
||||
modal.find('.modal-slideshow').on('click.modal-gallery', function (e) {
|
||||
$this.toggleSlideShow(e);
|
||||
});
|
||||
$(document)
|
||||
.on('keydown.modal-gallery', function (e) {
|
||||
$this.keyHandler(e);
|
||||
})
|
||||
.on(
|
||||
'mousewheel.modal-gallery, DOMMouseScroll.modal-gallery',
|
||||
function (e) {
|
||||
$this.wheelHandler(e);
|
||||
}
|
||||
);
|
||||
},
|
||||
destroyGalleryEvents: function () {
|
||||
var modal = this.$element;
|
||||
this.abortLoad();
|
||||
this.stopSlideShow();
|
||||
modal.find('.modal-image, .modal-prev, .modal-next, .modal-slideshow')
|
||||
.off('click.modal-gallery');
|
||||
$(document)
|
||||
.off('keydown.modal-gallery')
|
||||
.off('mousewheel.modal-gallery, DOMMouseScroll.modal-gallery');
|
||||
},
|
||||
show: function () {
|
||||
if (!this.isShown && this.$element.hasClass('modal-gallery')) {
|
||||
var modal = this.$element,
|
||||
options = this.options,
|
||||
windowWidth = $(window).width(),
|
||||
windowHeight = $(window).height();
|
||||
if (modal.hasClass('modal-fullscreen')) {
|
||||
this._loadImageOptions = {
|
||||
maxWidth: windowWidth,
|
||||
maxHeight: windowHeight,
|
||||
canvas: options.canvas
|
||||
};
|
||||
if (modal.hasClass('modal-fullscreen-stretch')) {
|
||||
this._loadImageOptions.minWidth = windowWidth;
|
||||
this._loadImageOptions.minHeight = windowHeight;
|
||||
}
|
||||
} else {
|
||||
this._loadImageOptions = {
|
||||
maxWidth: windowWidth - options.offsetWidth,
|
||||
maxHeight: windowHeight - options.offsetHeight,
|
||||
canvas: options.canvas
|
||||
};
|
||||
}
|
||||
// if (windowWidth > 767) {
|
||||
// modal.css({
|
||||
// 'margin-top': -(modal.outerHeight() / 2),
|
||||
// 'margin-left': -(modal.outerWidth() / 2)
|
||||
// });
|
||||
// } else {
|
||||
// modal.css({
|
||||
// top: ($(window).height() - modal.outerHeight()) / 2
|
||||
// });
|
||||
// }
|
||||
this.initGalleryEvents();
|
||||
this.initLinks();
|
||||
if (this.$links.length) {
|
||||
modal.find('.modal-slideshow, .modal-prev, .modal-next')
|
||||
.toggle(this.$links.length !== 1);
|
||||
modal.toggleClass(
|
||||
'modal-single',
|
||||
this.$links.length === 1
|
||||
);
|
||||
this.loadImage();
|
||||
}
|
||||
}
|
||||
originalShow.apply(this, arguments);
|
||||
},
|
||||
hide: function () {
|
||||
if (this.isShown && this.$element.hasClass('modal-gallery')) {
|
||||
this.options.delegate = document;
|
||||
this.options.href = null;
|
||||
this.destroyGalleryEvents();
|
||||
}
|
||||
originalHide.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
$(function () {
|
||||
$(document.body).on(
|
||||
'click.modal-gallery.data-api',
|
||||
'[data-toggle="modal-gallery"]',
|
||||
function (e) {
|
||||
var $this = $(this),
|
||||
options = $this.data(),
|
||||
modal = $(options.target),
|
||||
data = modal.data('bs.modal'),
|
||||
link;
|
||||
if (!data) {
|
||||
options = $.extend(modal.data(), options);
|
||||
}
|
||||
if (!options.selector) {
|
||||
options.selector = 'a[data-gallery=gallery]';
|
||||
}
|
||||
link = $(e.target).closest(options.selector);
|
||||
if (link.length && modal.length) {
|
||||
e.preventDefault();
|
||||
options.href = link.prop('href') || link.data('href');
|
||||
options.delegate = link[0] !== this ? this : document;
|
||||
if (data) {
|
||||
$.extend(data.options, options);
|
||||
}
|
||||
modal.modal(options);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}));
|
1
static/xadmin/vendor/bootstrap-image-gallery/js/bootstrap-image-gallery.min.js
vendored
Normal file
1
static/xadmin/vendor/bootstrap-image-gallery/js/bootstrap-image-gallery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,214 @@
|
|||
/*!
|
||||
* Bootstrap Modal
|
||||
*
|
||||
* Copyright Jordan Schroter
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* add a scroll bar to stop page from jerking around */
|
||||
.modal-open.page-overflow .page-container,
|
||||
.modal-open.page-overflow .page-container .navbar-fixed-top,
|
||||
.modal-open.page-overflow .page-container .navbar-fixed-bottom,
|
||||
.modal-open.page-overflow .modal-scrollable {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
@media (max-width: 979px) {
|
||||
.modal-open.page-overflow .page-container .navbar-fixed-top,
|
||||
.modal-open.page-overflow .page-container .navbar-fixed-bottom {
|
||||
overflow-y: visible;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.modal-scrollable {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.modal {
|
||||
outline: none;
|
||||
position: absolute;
|
||||
margin-top: 0;
|
||||
top: 50%;
|
||||
overflow: visible; /* allow content to popup out (i.e tooltips) */
|
||||
}
|
||||
|
||||
.modal.fade {
|
||||
top: -100%;
|
||||
-webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
|
||||
-moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
|
||||
-o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
|
||||
transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
|
||||
}
|
||||
|
||||
.modal.fade.in {
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
max-height: none;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.modal.modal-absolute {
|
||||
position: absolute;
|
||||
z-index: 950;
|
||||
}
|
||||
|
||||
.modal .loading-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.modal-backdrop.modal-absolute{
|
||||
position: absolute;
|
||||
z-index: 940;
|
||||
}
|
||||
|
||||
.modal-backdrop,
|
||||
.modal-backdrop.fade.in{
|
||||
opacity: 0.7;
|
||||
filter: alpha(opacity=70);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.modal.container {
|
||||
width: 940px;
|
||||
margin-left: -470px;
|
||||
}
|
||||
|
||||
/* Modal Overflow */
|
||||
|
||||
.modal-overflow.modal {
|
||||
top: 1%;
|
||||
}
|
||||
|
||||
.modal-overflow.modal.fade {
|
||||
top: -100%;
|
||||
}
|
||||
|
||||
.modal-overflow.modal.fade.in {
|
||||
top: 1%;
|
||||
}
|
||||
|
||||
.modal-overflow .modal-body {
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.modal.container {
|
||||
width: 1170px;
|
||||
margin-left: -585px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 979px) {
|
||||
.modal,
|
||||
.modal.container,
|
||||
.modal.modal-overflow {
|
||||
top: 1%;
|
||||
right: 1%;
|
||||
left: 1%;
|
||||
bottom: auto;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.modal.fade.in,
|
||||
.modal.container.fade.in,
|
||||
.modal.modal-overflow.fade.in {
|
||||
top: 1%;
|
||||
bottom: auto;
|
||||
}
|
||||
|
||||
.modal-body,
|
||||
.modal-overflow .modal-body {
|
||||
position: static;
|
||||
margin: 0;
|
||||
height: auto !important;
|
||||
max-height: none !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.modal-footer,
|
||||
.modal-overflow .modal-footer {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -12px 0 0 -12px;
|
||||
}
|
||||
|
||||
/*
|
||||
Animate.css - http://daneden.me/animate
|
||||
Licensed under the ☺ license (http://licence.visualidiot.com/)
|
||||
|
||||
Copyright (c) 2012 Dan Eden*/
|
||||
|
||||
.animated {
|
||||
-webkit-animation-duration: 1s;
|
||||
-moz-animation-duration: 1s;
|
||||
-o-animation-duration: 1s;
|
||||
animation-duration: 1s;
|
||||
-webkit-animation-fill-mode: both;
|
||||
-moz-animation-fill-mode: both;
|
||||
-o-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
@-webkit-keyframes shake {
|
||||
0%, 100% {-webkit-transform: translateX(0);}
|
||||
10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);}
|
||||
20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);}
|
||||
}
|
||||
|
||||
@-moz-keyframes shake {
|
||||
0%, 100% {-moz-transform: translateX(0);}
|
||||
10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);}
|
||||
20%, 40%, 60%, 80% {-moz-transform: translateX(10px);}
|
||||
}
|
||||
|
||||
@-o-keyframes shake {
|
||||
0%, 100% {-o-transform: translateX(0);}
|
||||
10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);}
|
||||
20%, 40%, 60%, 80% {-o-transform: translateX(10px);}
|
||||
}
|
||||
|
||||
@keyframes shake {
|
||||
0%, 100% {transform: translateX(0);}
|
||||
10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);}
|
||||
20%, 40%, 60%, 80% {transform: translateX(10px);}
|
||||
}
|
||||
|
||||
.shake {
|
||||
-webkit-animation-name: shake;
|
||||
-moz-animation-name: shake;
|
||||
-o-animation-name: shake;
|
||||
animation-name: shake;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue