replace compass with node-sass.

create new build tools.
This commit is contained in:
joyqi 2020-05-14 14:30:19 +08:00
parent 77ef00e1a0
commit 38f959890d
109 changed files with 43818 additions and 42091 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@ config.rb
!/usr/plugins/HelloWorld
/usr/themes/
!/usr/themes/default
node_modules/

View File

@ -1,748 +1,211 @@
/*
* Bento Grid System
* Source: https://github.com/fenbox/bento
* Version: 1.2.8
* Update: 2013.11.25
*/
/* line 23, ../scss/grid.scss */
.container, .row [class*="col-"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
/* line 31, ../scss/grid.scss */
.container {
margin-left: auto;
margin-right: auto;
padding-left: 10px;
padding-right: 10px; }
/* line 40, ../scss/grid.scss */
.row {
margin-right: -10px;
margin-left: -10px; }
/* line 46, ../scss/grid.scss */
.row [class*="col-"] {
float: left;
min-height: 1px;
padding-right: 10px;
padding-left: 10px; }
/* line 54, ../scss/grid.scss */
.row [class*="-push-"],
.row [class*="-pull-"] {
position: relative; }
/*
* Mobile and up
*/
/* line 65, ../scss/grid.scss */
.col-mb-1 {
width: 8.33333%; }
/* line 65, ../scss/grid.scss */
.col-mb-2 {
width: 16.66667%; }
/* line 65, ../scss/grid.scss */
.col-mb-3 {
width: 25%; }
/* line 65, ../scss/grid.scss */
.col-mb-4 {
width: 33.33333%; }
/* line 65, ../scss/grid.scss */
.col-mb-5 {
width: 41.66667%; }
/* line 65, ../scss/grid.scss */
.col-mb-6 {
width: 50%; }
/* line 65, ../scss/grid.scss */
.col-mb-7 {
width: 58.33333%; }
/* line 65, ../scss/grid.scss */
.col-mb-8 {
width: 66.66667%; }
/* line 65, ../scss/grid.scss */
.col-mb-9 {
width: 75%; }
/* line 65, ../scss/grid.scss */
.col-mb-10 {
width: 83.33333%; }
/* line 65, ../scss/grid.scss */
.col-mb-11 {
width: 91.66667%; }
/* line 65, ../scss/grid.scss */
.col-mb-12 {
width: 100%; }
/*
* Tablet and up
*/
@media (min-width: 768px) {
/* line 76, ../scss/grid.scss */
.container {
max-width: 728px; }
/* line 82, ../scss/grid.scss */
.col-tb-1 {
width: 8.33333%; }
/* line 82, ../scss/grid.scss */
.col-tb-2 {
width: 16.66667%; }
/* line 82, ../scss/grid.scss */
.col-tb-3 {
width: 25%; }
/* line 82, ../scss/grid.scss */
.col-tb-4 {
width: 33.33333%; }
/* line 82, ../scss/grid.scss */
.col-tb-5 {
width: 41.66667%; }
/* line 82, ../scss/grid.scss */
.col-tb-6 {
width: 50%; }
/* line 82, ../scss/grid.scss */
.col-tb-7 {
width: 58.33333%; }
/* line 82, ../scss/grid.scss */
.col-tb-8 {
width: 66.66667%; }
/* line 82, ../scss/grid.scss */
.col-tb-9 {
width: 75%; }
/* line 82, ../scss/grid.scss */
.col-tb-10 {
width: 83.33333%; }
/* line 82, ../scss/grid.scss */
.col-tb-11 {
width: 91.66667%; }
/* line 82, ../scss/grid.scss */
.col-tb-12 {
width: 100%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-0 {
margin-left: 0%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-1 {
margin-left: 8.33333%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-2 {
margin-left: 16.66667%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-3 {
margin-left: 25%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-4 {
margin-left: 33.33333%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-5 {
margin-left: 41.66667%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-6 {
margin-left: 50%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-7 {
margin-left: 58.33333%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-8 {
margin-left: 66.66667%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-9 {
margin-left: 75%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-10 {
margin-left: 83.33333%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-11 {
margin-left: 91.66667%; }
/* line 89, ../scss/grid.scss */
.col-tb-offset-12 {
margin-left: 100%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-0 {
right: 0%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-1 {
right: 8.33333%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-2 {
right: 16.66667%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-3 {
right: 25%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-4 {
right: 33.33333%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-5 {
right: 41.66667%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-6 {
right: 50%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-7 {
right: 58.33333%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-8 {
right: 66.66667%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-9 {
right: 75%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-10 {
right: 83.33333%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-11 {
right: 91.66667%; }
/* line 96, ../scss/grid.scss */
.col-tb-pull-12 {
right: 100%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-0 {
left: 0%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-1 {
left: 8.33333%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-2 {
left: 16.66667%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-3 {
left: 25%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-4 {
left: 33.33333%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-5 {
left: 41.66667%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-6 {
left: 50%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-7 {
left: 58.33333%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-8 {
left: 66.66667%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-9 {
left: 75%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-10 {
left: 83.33333%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-11 {
left: 91.66667%; }
/* line 103, ../scss/grid.scss */
.col-tb-push-12 {
left: 100%; } }
/*
* Desktop and up
*/
@media (min-width: 992px) {
/* line 115, ../scss/grid.scss */
.container {
max-width: 952px; }
/* line 121, ../scss/grid.scss */
.col-1 {
width: 8.33333%; }
/* line 121, ../scss/grid.scss */
.col-2 {
width: 16.66667%; }
/* line 121, ../scss/grid.scss */
.col-3 {
width: 25%; }
/* line 121, ../scss/grid.scss */
.col-4 {
width: 33.33333%; }
/* line 121, ../scss/grid.scss */
.col-5 {
width: 41.66667%; }
/* line 121, ../scss/grid.scss */
.col-6 {
width: 50%; }
/* line 121, ../scss/grid.scss */
.col-7 {
width: 58.33333%; }
/* line 121, ../scss/grid.scss */
.col-8 {
width: 66.66667%; }
/* line 121, ../scss/grid.scss */
.col-9 {
width: 75%; }
/* line 121, ../scss/grid.scss */
.col-10 {
width: 83.33333%; }
/* line 121, ../scss/grid.scss */
.col-11 {
width: 91.66667%; }
/* line 121, ../scss/grid.scss */
.col-12 {
width: 100%; }
/* line 128, ../scss/grid.scss */
.col-offset-0 {
margin-left: 0%; }
/* line 128, ../scss/grid.scss */
.col-offset-1 {
margin-left: 8.33333%; }
/* line 128, ../scss/grid.scss */
.col-offset-2 {
margin-left: 16.66667%; }
/* line 128, ../scss/grid.scss */
.col-offset-3 {
margin-left: 25%; }
/* line 128, ../scss/grid.scss */
.col-offset-4 {
margin-left: 33.33333%; }
/* line 128, ../scss/grid.scss */
.col-offset-5 {
margin-left: 41.66667%; }
/* line 128, ../scss/grid.scss */
.col-offset-6 {
margin-left: 50%; }
/* line 128, ../scss/grid.scss */
.col-offset-7 {
margin-left: 58.33333%; }
/* line 128, ../scss/grid.scss */
.col-offset-8 {
margin-left: 66.66667%; }
/* line 128, ../scss/grid.scss */
.col-offset-9 {
margin-left: 75%; }
/* line 128, ../scss/grid.scss */
.col-offset-10 {
margin-left: 83.33333%; }
/* line 128, ../scss/grid.scss */
.col-offset-11 {
margin-left: 91.66667%; }
/* line 128, ../scss/grid.scss */
.col-offset-12 {
margin-left: 100%; }
/* line 135, ../scss/grid.scss */
.col-pull-0 {
right: 0%; }
/* line 135, ../scss/grid.scss */
.col-pull-1 {
right: 8.33333%; }
/* line 135, ../scss/grid.scss */
.col-pull-2 {
right: 16.66667%; }
/* line 135, ../scss/grid.scss */
.col-pull-3 {
right: 25%; }
/* line 135, ../scss/grid.scss */
.col-pull-4 {
right: 33.33333%; }
/* line 135, ../scss/grid.scss */
.col-pull-5 {
right: 41.66667%; }
/* line 135, ../scss/grid.scss */
.col-pull-6 {
right: 50%; }
/* line 135, ../scss/grid.scss */
.col-pull-7 {
right: 58.33333%; }
/* line 135, ../scss/grid.scss */
.col-pull-8 {
right: 66.66667%; }
/* line 135, ../scss/grid.scss */
.col-pull-9 {
right: 75%; }
/* line 135, ../scss/grid.scss */
.col-pull-10 {
right: 83.33333%; }
/* line 135, ../scss/grid.scss */
.col-pull-11 {
right: 91.66667%; }
/* line 135, ../scss/grid.scss */
.col-pull-12 {
right: 100%; }
/* line 142, ../scss/grid.scss */
.col-push-0 {
left: 0%; }
/* line 142, ../scss/grid.scss */
.col-push-1 {
left: 8.33333%; }
/* line 142, ../scss/grid.scss */
.col-push-2 {
left: 16.66667%; }
/* line 142, ../scss/grid.scss */
.col-push-3 {
left: 25%; }
/* line 142, ../scss/grid.scss */
.col-push-4 {
left: 33.33333%; }
/* line 142, ../scss/grid.scss */
.col-push-5 {
left: 41.66667%; }
/* line 142, ../scss/grid.scss */
.col-push-6 {
left: 50%; }
/* line 142, ../scss/grid.scss */
.col-push-7 {
left: 58.33333%; }
/* line 142, ../scss/grid.scss */
.col-push-8 {
left: 66.66667%; }
/* line 142, ../scss/grid.scss */
.col-push-9 {
left: 75%; }
/* line 142, ../scss/grid.scss */
.col-push-10 {
left: 83.33333%; }
/* line 142, ../scss/grid.scss */
.col-push-11 {
left: 91.66667%; }
/* line 142, ../scss/grid.scss */
.col-push-12 {
left: 100%; } }
/*
* Widescreen and up
*/
@media (min-width: 1200px) {
/* line 154, ../scss/grid.scss */
.container {
max-width: 1160px; }
/* line 160, ../scss/grid.scss */
.col-wd-1 {
width: 8.33333%; }
/* line 160, ../scss/grid.scss */
.col-wd-2 {
width: 16.66667%; }
/* line 160, ../scss/grid.scss */
.col-wd-3 {
width: 25%; }
/* line 160, ../scss/grid.scss */
.col-wd-4 {
width: 33.33333%; }
/* line 160, ../scss/grid.scss */
.col-wd-5 {
width: 41.66667%; }
/* line 160, ../scss/grid.scss */
.col-wd-6 {
width: 50%; }
/* line 160, ../scss/grid.scss */
.col-wd-7 {
width: 58.33333%; }
/* line 160, ../scss/grid.scss */
.col-wd-8 {
width: 66.66667%; }
/* line 160, ../scss/grid.scss */
.col-wd-9 {
width: 75%; }
/* line 160, ../scss/grid.scss */
.col-wd-10 {
width: 83.33333%; }
/* line 160, ../scss/grid.scss */
.col-wd-11 {
width: 91.66667%; }
/* line 160, ../scss/grid.scss */
.col-wd-12 {
width: 100%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-0 {
margin-left: 0%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-1 {
margin-left: 8.33333%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-2 {
margin-left: 16.66667%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-3 {
margin-left: 25%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-4 {
margin-left: 33.33333%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-5 {
margin-left: 41.66667%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-6 {
margin-left: 50%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-7 {
margin-left: 58.33333%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-8 {
margin-left: 66.66667%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-9 {
margin-left: 75%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-10 {
margin-left: 83.33333%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-11 {
margin-left: 91.66667%; }
/* line 167, ../scss/grid.scss */
.col-wd-offset-12 {
margin-left: 100%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-0 {
right: 0%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-1 {
right: 8.33333%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-2 {
right: 16.66667%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-3 {
right: 25%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-4 {
right: 33.33333%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-5 {
right: 41.66667%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-6 {
right: 50%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-7 {
right: 58.33333%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-8 {
right: 66.66667%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-9 {
right: 75%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-10 {
right: 83.33333%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-11 {
right: 91.66667%; }
/* line 174, ../scss/grid.scss */
.col-wd-pull-12 {
right: 100%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-0 {
left: 0%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-1 {
left: 8.33333%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-2 {
left: 16.66667%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-3 {
left: 25%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-4 {
left: 33.33333%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-5 {
left: 41.66667%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-6 {
left: 50%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-7 {
left: 58.33333%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-8 {
left: 66.66667%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-9 {
left: 75%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-10 {
left: 83.33333%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-11 {
left: 91.66667%; }
/* line 181, ../scss/grid.scss */
.col-wd-push-12 {
left: 100%; } }
/*
* Responsive kit
*/
@media (max-width: 767px) {
/* line 194, ../scss/grid.scss */
.kit-hidden-mb {
display: none; } }
@media (max-width: 991px) {
/* line 201, ../scss/grid.scss */
.kit-hidden-tb {
display: none; } }
@media (max-width: 1199px) {
/* line 208, ../scss/grid.scss */
.kit-hidden {
display: none; } }
/*
* Clearfix
*/
/* line 217, ../scss/grid.scss */
.clearfix, .row {
zoom: 1; }
/* line 219, ../scss/grid.scss */
.clearfix:before, .row:before, .clearfix:after, .row:after {
content: " ";
display: table; }
/* line 223, ../scss/grid.scss */
.clearfix:after, .row:after {
clear: both; }
/* Bento Grid System Source: https://github.com/fenbox/bento Version: 1.2.8 Update: 2013.11.25 */
.container, .row [class*="col-"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
.container { margin-left: auto; margin-right: auto; padding-left: 10px; padding-right: 10px; }
.row { margin-right: -10px; margin-left: -10px; }
.row [class*="col-"] { float: left; min-height: 1px; padding-right: 10px; padding-left: 10px; }
.row [class*="-push-"], .row [class*="-pull-"] { position: relative; }
/* Mobile and up */
.col-mb-1 { width: 8.33333%; }
.col-mb-2 { width: 16.66667%; }
.col-mb-3 { width: 25%; }
.col-mb-4 { width: 33.33333%; }
.col-mb-5 { width: 41.66667%; }
.col-mb-6 { width: 50%; }
.col-mb-7 { width: 58.33333%; }
.col-mb-8 { width: 66.66667%; }
.col-mb-9 { width: 75%; }
.col-mb-10 { width: 83.33333%; }
.col-mb-11 { width: 91.66667%; }
.col-mb-12 { width: 100%; }
/* Tablet and up */
@media (min-width: 768px) { .container { max-width: 728px; }
.col-tb-1 { width: 8.33333%; }
.col-tb-2 { width: 16.66667%; }
.col-tb-3 { width: 25%; }
.col-tb-4 { width: 33.33333%; }
.col-tb-5 { width: 41.66667%; }
.col-tb-6 { width: 50%; }
.col-tb-7 { width: 58.33333%; }
.col-tb-8 { width: 66.66667%; }
.col-tb-9 { width: 75%; }
.col-tb-10 { width: 83.33333%; }
.col-tb-11 { width: 91.66667%; }
.col-tb-12 { width: 100%; }
.col-tb-offset-0 { margin-left: 0%; }
.col-tb-offset-1 { margin-left: 8.33333%; }
.col-tb-offset-2 { margin-left: 16.66667%; }
.col-tb-offset-3 { margin-left: 25%; }
.col-tb-offset-4 { margin-left: 33.33333%; }
.col-tb-offset-5 { margin-left: 41.66667%; }
.col-tb-offset-6 { margin-left: 50%; }
.col-tb-offset-7 { margin-left: 58.33333%; }
.col-tb-offset-8 { margin-left: 66.66667%; }
.col-tb-offset-9 { margin-left: 75%; }
.col-tb-offset-10 { margin-left: 83.33333%; }
.col-tb-offset-11 { margin-left: 91.66667%; }
.col-tb-offset-12 { margin-left: 100%; }
.col-tb-pull-0 { right: 0%; }
.col-tb-pull-1 { right: 8.33333%; }
.col-tb-pull-2 { right: 16.66667%; }
.col-tb-pull-3 { right: 25%; }
.col-tb-pull-4 { right: 33.33333%; }
.col-tb-pull-5 { right: 41.66667%; }
.col-tb-pull-6 { right: 50%; }
.col-tb-pull-7 { right: 58.33333%; }
.col-tb-pull-8 { right: 66.66667%; }
.col-tb-pull-9 { right: 75%; }
.col-tb-pull-10 { right: 83.33333%; }
.col-tb-pull-11 { right: 91.66667%; }
.col-tb-pull-12 { right: 100%; }
.col-tb-push-0 { left: 0%; }
.col-tb-push-1 { left: 8.33333%; }
.col-tb-push-2 { left: 16.66667%; }
.col-tb-push-3 { left: 25%; }
.col-tb-push-4 { left: 33.33333%; }
.col-tb-push-5 { left: 41.66667%; }
.col-tb-push-6 { left: 50%; }
.col-tb-push-7 { left: 58.33333%; }
.col-tb-push-8 { left: 66.66667%; }
.col-tb-push-9 { left: 75%; }
.col-tb-push-10 { left: 83.33333%; }
.col-tb-push-11 { left: 91.66667%; }
.col-tb-push-12 { left: 100%; } }
/* Desktop and up */
@media (min-width: 992px) { .container { max-width: 952px; }
.col-1 { width: 8.33333%; }
.col-2 { width: 16.66667%; }
.col-3 { width: 25%; }
.col-4 { width: 33.33333%; }
.col-5 { width: 41.66667%; }
.col-6 { width: 50%; }
.col-7 { width: 58.33333%; }
.col-8 { width: 66.66667%; }
.col-9 { width: 75%; }
.col-10 { width: 83.33333%; }
.col-11 { width: 91.66667%; }
.col-12 { width: 100%; }
.col-offset-0 { margin-left: 0%; }
.col-offset-1 { margin-left: 8.33333%; }
.col-offset-2 { margin-left: 16.66667%; }
.col-offset-3 { margin-left: 25%; }
.col-offset-4 { margin-left: 33.33333%; }
.col-offset-5 { margin-left: 41.66667%; }
.col-offset-6 { margin-left: 50%; }
.col-offset-7 { margin-left: 58.33333%; }
.col-offset-8 { margin-left: 66.66667%; }
.col-offset-9 { margin-left: 75%; }
.col-offset-10 { margin-left: 83.33333%; }
.col-offset-11 { margin-left: 91.66667%; }
.col-offset-12 { margin-left: 100%; }
.col-pull-0 { right: 0%; }
.col-pull-1 { right: 8.33333%; }
.col-pull-2 { right: 16.66667%; }
.col-pull-3 { right: 25%; }
.col-pull-4 { right: 33.33333%; }
.col-pull-5 { right: 41.66667%; }
.col-pull-6 { right: 50%; }
.col-pull-7 { right: 58.33333%; }
.col-pull-8 { right: 66.66667%; }
.col-pull-9 { right: 75%; }
.col-pull-10 { right: 83.33333%; }
.col-pull-11 { right: 91.66667%; }
.col-pull-12 { right: 100%; }
.col-push-0 { left: 0%; }
.col-push-1 { left: 8.33333%; }
.col-push-2 { left: 16.66667%; }
.col-push-3 { left: 25%; }
.col-push-4 { left: 33.33333%; }
.col-push-5 { left: 41.66667%; }
.col-push-6 { left: 50%; }
.col-push-7 { left: 58.33333%; }
.col-push-8 { left: 66.66667%; }
.col-push-9 { left: 75%; }
.col-push-10 { left: 83.33333%; }
.col-push-11 { left: 91.66667%; }
.col-push-12 { left: 100%; } }
/* Widescreen and up */
@media (min-width: 1200px) { .container { max-width: 1160px; }
.col-wd-1 { width: 8.33333%; }
.col-wd-2 { width: 16.66667%; }
.col-wd-3 { width: 25%; }
.col-wd-4 { width: 33.33333%; }
.col-wd-5 { width: 41.66667%; }
.col-wd-6 { width: 50%; }
.col-wd-7 { width: 58.33333%; }
.col-wd-8 { width: 66.66667%; }
.col-wd-9 { width: 75%; }
.col-wd-10 { width: 83.33333%; }
.col-wd-11 { width: 91.66667%; }
.col-wd-12 { width: 100%; }
.col-wd-offset-0 { margin-left: 0%; }
.col-wd-offset-1 { margin-left: 8.33333%; }
.col-wd-offset-2 { margin-left: 16.66667%; }
.col-wd-offset-3 { margin-left: 25%; }
.col-wd-offset-4 { margin-left: 33.33333%; }
.col-wd-offset-5 { margin-left: 41.66667%; }
.col-wd-offset-6 { margin-left: 50%; }
.col-wd-offset-7 { margin-left: 58.33333%; }
.col-wd-offset-8 { margin-left: 66.66667%; }
.col-wd-offset-9 { margin-left: 75%; }
.col-wd-offset-10 { margin-left: 83.33333%; }
.col-wd-offset-11 { margin-left: 91.66667%; }
.col-wd-offset-12 { margin-left: 100%; }
.col-wd-pull-0 { right: 0%; }
.col-wd-pull-1 { right: 8.33333%; }
.col-wd-pull-2 { right: 16.66667%; }
.col-wd-pull-3 { right: 25%; }
.col-wd-pull-4 { right: 33.33333%; }
.col-wd-pull-5 { right: 41.66667%; }
.col-wd-pull-6 { right: 50%; }
.col-wd-pull-7 { right: 58.33333%; }
.col-wd-pull-8 { right: 66.66667%; }
.col-wd-pull-9 { right: 75%; }
.col-wd-pull-10 { right: 83.33333%; }
.col-wd-pull-11 { right: 91.66667%; }
.col-wd-pull-12 { right: 100%; }
.col-wd-push-0 { left: 0%; }
.col-wd-push-1 { left: 8.33333%; }
.col-wd-push-2 { left: 16.66667%; }
.col-wd-push-3 { left: 25%; }
.col-wd-push-4 { left: 33.33333%; }
.col-wd-push-5 { left: 41.66667%; }
.col-wd-push-6 { left: 50%; }
.col-wd-push-7 { left: 58.33333%; }
.col-wd-push-8 { left: 66.66667%; }
.col-wd-push-9 { left: 75%; }
.col-wd-push-10 { left: 83.33333%; }
.col-wd-push-11 { left: 91.66667%; }
.col-wd-push-12 { left: 100%; } }
/* Responsive kit */
@media (max-width: 767px) { .kit-hidden-mb { display: none; } }
@media (max-width: 991px) { .kit-hidden-tb { display: none; } }
@media (max-width: 1199px) { .kit-hidden { display: none; } }
/* Clearfix */
.clearfix, .row { zoom: 1; }
.clearfix:before, .row:before, .clearfix:after, .row:after { content: " "; display: table; }
.clearfix:after, .row:after { clear: both; }

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

BIN
admin/img/icons-2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

BIN
admin/img/icons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

302
admin/js/html5shiv.js vendored
View File

@ -1,301 +1 @@
/**
* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
;(function(window, document) {
/*jshint evil:true */
/** version */
var version = '3.7.0';
/** Preset options */
var options = window.html5 || {};
/** Used to skip problem elements */
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
/** Name of the expando, to work with multiple documents or to re-shiv one document */
var expando = '_html5shiv';
/** The id for the the documents expando */
var expanID = 0;
/** Cached data for each document */
var expandoData = {};
/** Detect whether the browser supports unknown elements */
var supportsUnknownElements;
(function() {
try {
var a = document.createElement('a');
a.innerHTML = '<xyz></xyz>';
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
supportsHtml5Styles = ('hidden' in a);
supportsUnknownElements = a.childNodes.length == 1 || (function() {
// assign a false positive if unable to shiv
(document.createElement)('a');
var frag = document.createDocumentFragment();
return (
typeof frag.cloneNode == 'undefined' ||
typeof frag.createDocumentFragment == 'undefined' ||
typeof frag.createElement == 'undefined'
);
}());
} catch(e) {
// assign a false positive if detection fails => unable to shiv
supportsHtml5Styles = true;
supportsUnknownElements = true;
}
}());
/*--------------------------------------------------------------------------*/
/**
* Creates a style sheet with the given CSS text and adds it to the document.
* @private
* @param {Document} ownerDocument The document.
* @param {String} cssText The CSS text.
* @returns {StyleSheet} The style element.
*/
function addStyleSheet(ownerDocument, cssText) {
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
/**
* Returns the value of `html5.elements` as an array.
* @private
* @returns {Array} An array of shived element node names.
*/
function getElements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements;
}
/**
* Returns the data associated to the given document
* @private
* @param {Document} ownerDocument The document.
* @returns {Object} An object of data.
*/
function getExpandoData(ownerDocument) {
var data = expandoData[ownerDocument[expando]];
if (!data) {
data = {};
expanID++;
ownerDocument[expando] = expanID;
expandoData[expanID] = data;
}
return data;
}
/**
* returns a shived element for the given nodeName and document
* @memberOf html5
* @param {String} nodeName name of the element
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived element.
*/
function createElement(nodeName, ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if (!data) {
data = getExpandoData(ownerDocument);
}
var node;
if (data.cache[nodeName]) {
node = data.cache[nodeName].cloneNode();
} else if (saveClones.test(nodeName)) {
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
} else {
node = data.createElem(nodeName);
}
// Avoid adding some elements to fragments in IE < 9 because
// * Attributes like `name` or `type` cannot be set/changed once an element
// is inserted into a document/fragment
// * Link elements with `src` attributes that are inaccessible, as with
// a 403 response, will cause the tab/window to crash
// * Script elements appended to fragments will execute when their `src`
// or `text` property is set
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
}
/**
* returns a shived DocumentFragment for the given document
* @memberOf html5
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived DocumentFragment.
*/
function createDocumentFragment(ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data = data || getExpandoData(ownerDocument);
var clone = data.frag.cloneNode(),
i = 0,
elems = getElements(),
l = elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
}(this, document));
!function(e,l){var m,s,t=e.html5||{},r=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,n="_html5shiv",a=0,o={};function h(){var e=f.elements;return"string"==typeof e?e.split(" "):e}function u(e){var t=o[e[n]];return t||(t={},a++,e[n]=a,o[a]=t),t}function d(e,t,n){return t=t||l,s?t.createElement(e):(a=(n=n||u(t)).cache[e]?n.cache[e].cloneNode():c.test(e)?(n.cache[e]=n.createElem(e)).cloneNode():n.createElem(e)).canHaveChildren&&!r.test(e)?n.frag.appendChild(a):a;var a}function i(e){var t,n,a,r,c,o,i=u(e=e||l);return!f.shivCSS||m||i.hasCSS||(i.hasCSS=(n="article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}",a=(t=e).createElement("p"),r=t.getElementsByTagName("head")[0]||t.documentElement,a.innerHTML="x<style>"+n+"</style>",!!r.insertBefore(a.lastChild,r.firstChild))),s||(c=e,(o=i).cache||(o.cache={},o.createElem=c.createElement,o.createFrag=c.createDocumentFragment,o.frag=o.createFrag()),c.createElement=function(e){return f.shivMethods?d(e,c,o):o.createElem(e)},c.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/[\w\-]+/g,function(e){return o.createElem(e),o.frag.createElement(e),'c("'+e+'")'})+");return n}")(f,o.frag)),e}!function(){try{var e=l.createElement("a");e.innerHTML="<xyz></xyz>",m="hidden"in e,s=1==e.childNodes.length||function(){l.createElement("a");var e=l.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){s=m=!0}}();var f={elements:t.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==t.shivCSS,supportsUnknownElements:s,shivMethods:!1!==t.shivMethods,type:"default",shivDocument:i,createElement:d,createDocumentFragment:function(e,t){if(e=e||l,s)return e.createDocumentFragment();for(var n=(t=t||u(e)).frag.cloneNode(),a=0,r=h(),c=r.length;a<c;a++)n.createElement(r[a]);return n}};e.html5=f,i(l)}(this,document);

File diff suppressed because one or more lines are too long

4981
admin/js/jquery-ui.js vendored

File diff suppressed because one or more lines are too long

9185
admin/js/jquery.js vendored

File diff suppressed because one or more lines are too long

11715
admin/js/moxie.js Executable file → Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2498
admin/js/plupload.js Executable file → Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,237 +1 @@
/*! Respond.js v1.4.2: min/max-width media query polyfill
* Copyright 2013 Scott Jehl
* Licensed under MIT
* http://j.mp/respondjs */
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
(function(w) {
"use strict";
w.matchMedia = w.matchMedia || function(doc, undefined) {
var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
div.id = "mq-test-1";
div.style.cssText = "position:absolute;top:-100em";
fakeBody.style.background = "none";
fakeBody.appendChild(div);
return function(q) {
div.innerHTML = '&shy;<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
docElem.insertBefore(fakeBody, refNode);
bool = div.offsetWidth === 42;
docElem.removeChild(fakeBody);
return {
matches: bool,
media: q
};
};
}(w.document);
})(this);
(function(w) {
"use strict";
var respond = {};
w.respond = respond;
respond.update = function() {};
var requestQueue = [], xmlHttp = function() {
var xmlhttpmethod = false;
try {
xmlhttpmethod = new w.XMLHttpRequest();
} catch (e) {
xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
}
return function() {
return xmlhttpmethod;
};
}(), ajax = function(url, callback) {
var req = xmlHttp();
if (!req) {
return;
}
req.open("GET", url, true);
req.onreadystatechange = function() {
if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
return;
}
callback(req.responseText);
};
if (req.readyState === 4) {
return;
}
req.send(null);
}, isUnsupportedMediaQuery = function(query) {
return query.replace(respond.regex.minmaxwh, "").match(respond.regex.other);
};
respond.ajax = ajax;
respond.queue = requestQueue;
respond.unsupportedmq = isUnsupportedMediaQuery;
respond.regex = {
media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
comments: /\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,
urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
only: /(only\s+)?([a-zA-Z]+)\s?/,
minw: /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
maxw: /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
minmaxwh: /\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,
other: /\([^\)]*\)/g
};
respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
if (respond.mediaQueriesSupported) {
return;
}
var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
div.style.cssText = "position:absolute;font-size:1em;width:1em";
if (!body) {
body = fakeUsed = doc.createElement("body");
body.style.background = "none";
}
docElem.style.fontSize = "100%";
body.style.fontSize = "100%";
body.appendChild(div);
if (fakeUsed) {
docElem.insertBefore(body, docElem.firstChild);
}
ret = div.offsetWidth;
if (fakeUsed) {
docElem.removeChild(body);
} else {
body.removeChild(div);
}
docElem.style.fontSize = originalHTMLFontSize;
if (originalBodyFontSize) {
body.style.fontSize = originalBodyFontSize;
}
ret = eminpx = parseFloat(ret);
return ret;
}, applyMedia = function(fromResize) {
var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
if (fromResize && lastCall && now - lastCall < resizeThrottle) {
w.clearTimeout(resizeDefer);
resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
return;
} else {
lastCall = now;
}
for (var i in mediastyles) {
if (mediastyles.hasOwnProperty(i)) {
var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
if (!!min) {
min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
}
if (!!max) {
max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
}
if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
if (!styleBlocks[thisstyle.media]) {
styleBlocks[thisstyle.media] = [];
}
styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
}
}
}
for (var j in appendedEls) {
if (appendedEls.hasOwnProperty(j)) {
if (appendedEls[j] && appendedEls[j].parentNode === head) {
head.removeChild(appendedEls[j]);
}
}
}
appendedEls.length = 0;
for (var k in styleBlocks) {
if (styleBlocks.hasOwnProperty(k)) {
var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
ss.type = "text/css";
ss.media = k;
head.insertBefore(ss, lastLink.nextSibling);
if (ss.styleSheet) {
ss.styleSheet.cssText = css;
} else {
ss.appendChild(doc.createTextNode(css));
}
appendedEls.push(ss);
}
}
}, translate = function(styles, href, media) {
var qs = styles.replace(respond.regex.comments, "").replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
href = href.substring(0, href.lastIndexOf("/"));
var repUrls = function(css) {
return css.replace(respond.regex.urls, "$1" + href + "$2$3");
}, useMedia = !ql && media;
if (href.length) {
href += "/";
}
if (useMedia) {
ql = 1;
}
for (var i = 0; i < ql; i++) {
var fullq, thisq, eachq, eql;
if (useMedia) {
fullq = media;
rules.push(repUrls(styles));
} else {
fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
rules.push(RegExp.$2 && repUrls(RegExp.$2));
}
eachq = fullq.split(",");
eql = eachq.length;
for (var j = 0; j < eql; j++) {
thisq = eachq[j];
if (isUnsupportedMediaQuery(thisq)) {
continue;
}
mediastyles.push({
media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
rules: rules.length - 1,
hasquery: thisq.indexOf("(") > -1,
minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
});
}
}
applyMedia();
}, makeRequests = function() {
if (requestQueue.length) {
var thisRequest = requestQueue.shift();
ajax(thisRequest.href, function(styles) {
translate(styles, thisRequest.href, thisRequest.media);
parsedSheets[thisRequest.href] = true;
w.setTimeout(function() {
makeRequests();
}, 0);
});
}
}, ripCSS = function() {
for (var i = 0; i < links.length; i++) {
var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
if (!!href && isCSS && !parsedSheets[href]) {
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
translate(sheet.styleSheet.rawCssText, href, media);
parsedSheets[href] = true;
} else {
if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
if (href.substring(0, 2) === "//") {
href = w.location.protocol + href;
}
requestQueue.push({
href: href,
media: media
});
}
}
}
}
makeRequests();
};
ripCSS();
respond.update = ripCSS;
respond.getEmValue = getEmValue;
function callMedia() {
applyMedia(true);
}
if (w.addEventListener) {
w.addEventListener("resize", callMedia, false);
} else if (w.attachEvent) {
w.attachEvent("onresize", callMedia);
}
})(this);
!function(e){"use strict";var t,n,a,s,i,r;e.matchMedia=e.matchMedia||(t=e.document,a=t.documentElement,s=a.firstElementChild||a.firstChild,i=t.createElement("body"),(r=t.createElement("div")).id="mq-test-1",r.style.cssText="position:absolute;top:-100em",i.style.background="none",i.appendChild(r),function(e){return r.innerHTML='&shy;<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',a.insertBefore(i,s),n=42===r.offsetWidth,a.removeChild(i),{matches:n,media:e}})}(this),function(y){"use strict";var c={};(y.respond=c).update=function(){};function e(e,t){var n=a();n&&(n.open("GET",e,!0),n.onreadystatechange=function(){4!==n.readyState||200!==n.status&&304!==n.status||t(n.responseText)},4!==n.readyState&&n.send(null))}function p(e){return e.replace(c.regex.minmaxwh,"").match(c.regex.other)}var x,v,E,w,S,i,T,r,C,b,$,z,M,R,o,l,t,m=[],a=function(){var t=!1;try{t=new y.XMLHttpRequest}catch(e){t=new y.ActiveXObject("Microsoft.XMLHTTP")}return function(){return t}}();function n(){R(!0)}c.ajax=e,c.queue=m,c.unsupportedmq=p,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=y.matchMedia&&null!==y.matchMedia("only all")&&y.matchMedia("only all").matches,c.mediaQueriesSupported||(x=y.document,v=x.documentElement,E=[],w=[],S=[],i={},T=x.getElementsByTagName("head")[0]||v,r=x.getElementsByTagName("base")[0],C=T.getElementsByTagName("link"),M=function(){var e,t=x.createElement("div"),n=x.body,a=v.style.fontSize,s=n&&n.style.fontSize,i=!1;return t.style.cssText="position:absolute;font-size:1em;width:1em",n||((n=i=x.createElement("body")).style.background="none"),v.style.fontSize="100%",n.style.fontSize="100%",n.appendChild(t),i&&v.insertBefore(n,v.firstChild),e=t.offsetWidth,i?v.removeChild(n):n.removeChild(t),v.style.fontSize=a,s&&(n.style.fontSize=s),e=z=parseFloat(e)},R=function(e){var t,n,a,s,i,r,o,l="clientWidth",m=v[l],d="CSS1Compat"===x.compatMode&&m||x.body[l]||m,h={},u=C[C.length-1],c=(new Date).getTime();if(e&&b&&c-b<30)return y.clearTimeout($),void($=y.setTimeout(R,30));for(var p in b=c,E){E.hasOwnProperty(p)&&(n=null===(s=(t=E[p]).minw),a=null===(i=t.maxw),s=s&&parseFloat(s)*(-1<s.indexOf("em")?z||M():1),i=i&&parseFloat(i)*(-1<i.indexOf("em")?z||M():1),t.hasquery&&(n&&a||!(n||s<=d)||!(a||d<=i))||(h[t.media]||(h[t.media]=[]),h[t.media].push(w[t.rules])))}for(var f in S)S.hasOwnProperty(f)&&S[f]&&S[f].parentNode===T&&T.removeChild(S[f]);for(var g in S.length=0,h){h.hasOwnProperty(g)&&(r=x.createElement("style"),o=h[g].join("\n"),r.type="text/css",r.media=g,T.insertBefore(r,u.nextSibling),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(x.createTextNode(o)),S.push(r))}},o=function(e,t,n){function a(e){return e.replace(c.regex.urls,"$1"+t+"$2$3")}var s=e.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),i=s&&s.length||0,r=!i&&n;(t=t.substring(0,t.lastIndexOf("/"))).length&&(t+="/"),r&&(i=1);for(var o,l,m,d,h=0;h<i;h++){r?(o=n,w.push(a(e))):(o=s[h].match(c.regex.findStyles)&&RegExp.$1,w.push(RegExp.$2&&a(RegExp.$2))),d=(m=o.split(",")).length;for(var u=0;u<d;u++)l=m[u],p(l)||E.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:w.length-1,hasquery:-1<l.indexOf("("),minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}R()},l=function(){var t;m.length&&(t=m.shift(),e(t.href,function(e){o(e,t.href,t.media),i[t.href]=!0,y.setTimeout(function(){l()},0)}))},(t=function(){for(var e=0;e<C.length;e++){var t=C[e],n=t.href,a=t.media,s=t.rel&&"stylesheet"===t.rel.toLowerCase();n&&s&&!i[n]&&(t.styleSheet&&t.styleSheet.rawCssText?(o(t.styleSheet.rawCssText,n,a),i[n]=!0):(/^([a-zA-Z:]*\/\/)/.test(n)||r)&&n.replace(RegExp.$1,"").split("/")[0]!==y.location.host||("//"===n.substring(0,2)&&(n=y.location.protocol+n),m.push({href:n,media:a})))}l()})(),c.update=t,c.getEmValue=M,y.addEventListener?y.addEventListener("resize",n,!1):y.attachEvent&&y.attachEvent("onresize",n))}(this);

File diff suppressed because one or more lines are too long

878
admin/js/tokeninput.js Executable file → Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 697 B

After

Width:  |  Height:  |  Size: 697 B

View File

Before

Width:  |  Height:  |  Size: 298 B

After

Width:  |  Height:  |  Size: 298 B

View File

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

View File

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 131 B

View File

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 133 B

View File

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 127 B

View File

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 329 B

View File

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 488 B

View File

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 188 B

View File

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 127 B

View File

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

View File

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 587 B

View File

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

View File

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 143 B

View File

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

View File

Before

Width:  |  Height:  |  Size: 408 B

After

Width:  |  Height:  |  Size: 408 B

View File

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

View File

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 122 B

View File

Before

Width:  |  Height:  |  Size: 124 B

After

Width:  |  Height:  |  Size: 124 B

View File

Before

Width:  |  Height:  |  Size: 121 B

After

Width:  |  Height:  |  Size: 121 B

View File

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 118 B

View File

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 219 B

View File

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 287 B

View File

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 146 B

View File

Before

Width:  |  Height:  |  Size: 117 B

After

Width:  |  Height:  |  Size: 117 B

View File

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 123 B

View File

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 354 B

View File

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

View File

Before

Width:  |  Height:  |  Size: 121 B

After

Width:  |  Height:  |  Size: 121 B

View File

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 164 B

View File

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

View File

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

View File

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 284 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 134 B

View File

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 130 B

View File

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 129 B

View File

Before

Width:  |  Height:  |  Size: 139 B

After

Width:  |  Height:  |  Size: 139 B

View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

View File

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

View File

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

View File

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

View File

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 129 B

View File

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 186 B

View File

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

View File

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

View File

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 202 B

View File

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

View File

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 606 B

View File

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 122 B

View File

Before

Width:  |  Height:  |  Size: 121 B

After

Width:  |  Height:  |  Size: 121 B

View File

Before

Width:  |  Height:  |  Size: 121 B

After

Width:  |  Height:  |  Size: 121 B

View File

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 128 B

View File

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

View File

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 151 B

View File

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 127 B

View File

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 120 B

View File

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 120 B

View File

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 163 B

301
admin/src/js/html5shiv.js vendored Normal file
View File

@ -0,0 +1,301 @@
/**
* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
;(function(window, document) {
/*jshint evil:true */
/** version */
var version = '3.7.0';
/** Preset options */
var options = window.html5 || {};
/** Used to skip problem elements */
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
/** Name of the expando, to work with multiple documents or to re-shiv one document */
var expando = '_html5shiv';
/** The id for the the documents expando */
var expanID = 0;
/** Cached data for each document */
var expandoData = {};
/** Detect whether the browser supports unknown elements */
var supportsUnknownElements;
(function() {
try {
var a = document.createElement('a');
a.innerHTML = '<xyz></xyz>';
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
supportsHtml5Styles = ('hidden' in a);
supportsUnknownElements = a.childNodes.length == 1 || (function() {
// assign a false positive if unable to shiv
(document.createElement)('a');
var frag = document.createDocumentFragment();
return (
typeof frag.cloneNode == 'undefined' ||
typeof frag.createDocumentFragment == 'undefined' ||
typeof frag.createElement == 'undefined'
);
}());
} catch(e) {
// assign a false positive if detection fails => unable to shiv
supportsHtml5Styles = true;
supportsUnknownElements = true;
}
}());
/*--------------------------------------------------------------------------*/
/**
* Creates a style sheet with the given CSS text and adds it to the document.
* @private
* @param {Document} ownerDocument The document.
* @param {String} cssText The CSS text.
* @returns {StyleSheet} The style element.
*/
function addStyleSheet(ownerDocument, cssText) {
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
/**
* Returns the value of `html5.elements` as an array.
* @private
* @returns {Array} An array of shived element node names.
*/
function getElements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements;
}
/**
* Returns the data associated to the given document
* @private
* @param {Document} ownerDocument The document.
* @returns {Object} An object of data.
*/
function getExpandoData(ownerDocument) {
var data = expandoData[ownerDocument[expando]];
if (!data) {
data = {};
expanID++;
ownerDocument[expando] = expanID;
expandoData[expanID] = data;
}
return data;
}
/**
* returns a shived element for the given nodeName and document
* @memberOf html5
* @param {String} nodeName name of the element
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived element.
*/
function createElement(nodeName, ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if (!data) {
data = getExpandoData(ownerDocument);
}
var node;
if (data.cache[nodeName]) {
node = data.cache[nodeName].cloneNode();
} else if (saveClones.test(nodeName)) {
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
} else {
node = data.createElem(nodeName);
}
// Avoid adding some elements to fragments in IE < 9 because
// * Attributes like `name` or `type` cannot be set/changed once an element
// is inserted into a document/fragment
// * Link elements with `src` attributes that are inaccessible, as with
// a 403 response, will cause the tab/window to crash
// * Script elements appended to fragments will execute when their `src`
// or `text` property is set
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
}
/**
* returns a shived DocumentFragment for the given document
* @memberOf html5
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived DocumentFragment.
*/
function createDocumentFragment(ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data = data || getExpandoData(ownerDocument);
var clone = data.frag.cloneNode(),
i = 0,
elems = getElements(),
l = elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
}(this, document));

1272
admin/src/js/hyperdown.js Normal file

File diff suppressed because it is too large Load Diff

4980
admin/src/js/jquery-ui.js vendored Normal file

File diff suppressed because it is too large Load Diff

9184
admin/src/js/jquery.js vendored Normal file

File diff suppressed because it is too large Load Diff

11714
admin/src/js/moxie.js Executable file

File diff suppressed because it is too large Load Diff

4188
admin/src/js/pagedown.js Normal file

File diff suppressed because it is too large Load Diff

443
admin/src/js/paste.js Normal file
View File

@ -0,0 +1,443 @@
// Generated by CoffeeScript 1.12.7
/*
paste.js is an interface to read data ( text / image ) from clipboard in different browsers. It also contains several hacks.
https://github.com/layerssss/paste.js
*/
(function() {
var $, Paste, createHiddenEditable, dataURLtoBlob, isFocusable;
$ = window.jQuery;
$.paste = function(pasteContainer) {
var pm;
if (typeof console !== "undefined" && console !== null) {
console.log("DEPRECATED: This method is deprecated. Please use $.fn.pastableNonInputable() instead.");
}
pm = Paste.mountNonInputable(pasteContainer);
return pm._container;
};
$.fn.pastableNonInputable = function() {
var el, j, len, ref;
ref = this;
for (j = 0, len = ref.length; j < len; j++) {
el = ref[j];
if (el._pastable || $(el).is('textarea, input:text, [contenteditable]')) {
continue;
}
Paste.mountNonInputable(el);
el._pastable = true;
}
return this;
};
$.fn.pastableTextarea = function() {
var el, j, len, ref;
ref = this;
for (j = 0, len = ref.length; j < len; j++) {
el = ref[j];
if (el._pastable || $(el).is(':not(textarea, input:text)')) {
continue;
}
Paste.mountTextarea(el);
el._pastable = true;
}
return this;
};
$.fn.pastableContenteditable = function() {
var el, j, len, ref;
ref = this;
for (j = 0, len = ref.length; j < len; j++) {
el = ref[j];
if (el._pastable || $(el).is(':not([contenteditable])')) {
continue;
}
Paste.mountContenteditable(el);
el._pastable = true;
}
return this;
};
dataURLtoBlob = function(dataURL, sliceSize) {
var b64Data, byteArray, byteArrays, byteCharacters, byteNumbers, contentType, i, m, offset, ref, slice;
if (sliceSize == null) {
sliceSize = 512;
}
if (!(m = dataURL.match(/^data\:([^\;]+)\;base64\,(.+)$/))) {
return null;
}
ref = m, m = ref[0], contentType = ref[1], b64Data = ref[2];
byteCharacters = atob(b64Data);
byteArrays = [];
offset = 0;
while (offset < byteCharacters.length) {
slice = byteCharacters.slice(offset, offset + sliceSize);
byteNumbers = new Array(slice.length);
i = 0;
while (i < slice.length) {
byteNumbers[i] = slice.charCodeAt(i);
i++;
}
byteArray = new Uint8Array(byteNumbers);
byteArrays.push(byteArray);
offset += sliceSize;
}
return new Blob(byteArrays, {
type: contentType
});
};
createHiddenEditable = function() {
return $(document.createElement('div')).attr('contenteditable', true).attr('aria-hidden', true).attr('tabindex', -1).css({
width: 1,
height: 1,
position: 'fixed',
left: -100,
overflow: 'hidden',
opacity: 1e-17
});
};
isFocusable = function(element, hasTabindex) {
var fieldset, focusableIfVisible, img, map, mapName, nodeName;
map = void 0;
mapName = void 0;
img = void 0;
focusableIfVisible = void 0;
fieldset = void 0;
nodeName = element.nodeName.toLowerCase();
if ('area' === nodeName) {
map = element.parentNode;
mapName = map.name;
if (!element.href || !mapName || map.nodeName.toLowerCase() !== 'map') {
return false;
}
img = $('img[usemap=\'#' + mapName + '\']');
return img.length > 0 && img.is(':visible');
}
if (/^(input|select|textarea|button|object)$/.test(nodeName)) {
focusableIfVisible = !element.disabled;
if (focusableIfVisible) {
fieldset = $(element).closest('fieldset')[0];
if (fieldset) {
focusableIfVisible = !fieldset.disabled;
}
}
} else if ('a' === nodeName) {
focusableIfVisible = element.href || hasTabindex;
} else {
focusableIfVisible = hasTabindex;
}
focusableIfVisible = focusableIfVisible || $(element).is('[contenteditable]');
return focusableIfVisible && $(element).is(':visible');
};
Paste = (function() {
Paste.prototype._target = null;
Paste.prototype._container = null;
Paste.mountNonInputable = function(nonInputable) {
var paste;
paste = new Paste(createHiddenEditable().appendTo(nonInputable), nonInputable);
$(nonInputable).on('click', (function(_this) {
return function(ev) {
if (!(isFocusable(ev.target, false) || window.getSelection().toString())) {
return paste._container.focus();
}
};
})(this));
paste._container.on('focus', (function(_this) {
return function() {
return $(nonInputable).addClass('pastable-focus');
};
})(this));
return paste._container.on('blur', (function(_this) {
return function() {
return $(nonInputable).removeClass('pastable-focus');
};
})(this));
};
Paste.mountTextarea = function(textarea) {
var ctlDown, paste, ref, ref1;
if ((typeof DataTransfer !== "undefined" && DataTransfer !== null ? DataTransfer.prototype : void 0) && ((ref = Object.getOwnPropertyDescriptor) != null ? (ref1 = ref.call(Object, DataTransfer.prototype, 'items')) != null ? ref1.get : void 0 : void 0)) {
return this.mountContenteditable(textarea);
}
paste = new Paste(createHiddenEditable().insertBefore(textarea), textarea);
ctlDown = false;
$(textarea).on('keyup', function(ev) {
var ref2;
if ((ref2 = ev.keyCode) === 17 || ref2 === 224) {
ctlDown = false;
}
return null;
});
$(textarea).on('keydown', function(ev) {
var ref2;
if ((ref2 = ev.keyCode) === 17 || ref2 === 224) {
ctlDown = true;
}
if ((ev.ctrlKey != null) && (ev.metaKey != null)) {
ctlDown = ev.ctrlKey || ev.metaKey;
}
if (ctlDown && ev.keyCode === 86) {
paste._textarea_focus_stolen = true;
paste._container.focus();
paste._paste_event_fired = false;
setTimeout((function(_this) {
return function() {
if (!paste._paste_event_fired) {
$(textarea).focus();
return paste._textarea_focus_stolen = false;
}
};
})(this), 1);
}
return null;
});
$(textarea).on('paste', (function(_this) {
return function() {};
})(this));
$(textarea).on('focus', (function(_this) {
return function() {
if (!paste._textarea_focus_stolen) {
return $(textarea).addClass('pastable-focus');
}
};
})(this));
$(textarea).on('blur', (function(_this) {
return function() {
if (!paste._textarea_focus_stolen) {
return $(textarea).removeClass('pastable-focus');
}
};
})(this));
$(paste._target).on('_pasteCheckContainerDone', (function(_this) {
return function() {
$(textarea).focus();
return paste._textarea_focus_stolen = false;
};
})(this));
return $(paste._target).on('pasteText', (function(_this) {
return function(ev, data) {
var content, curEnd, curStart;
curStart = $(textarea).prop('selectionStart');
curEnd = $(textarea).prop('selectionEnd');
content = $(textarea).val();
$(textarea).val("" + content.slice(0, curStart) + data.text + content.slice(curEnd));
$(textarea)[0].setSelectionRange(curStart + data.text.length, curStart + data.text.length);
return $(textarea).trigger('change');
};
})(this));
};
Paste.mountContenteditable = function(contenteditable) {
var paste;
paste = new Paste(contenteditable, contenteditable);
$(contenteditable).on('focus', (function(_this) {
return function() {
return $(contenteditable).addClass('pastable-focus');
};
})(this));
return $(contenteditable).on('blur', (function(_this) {
return function() {
return $(contenteditable).removeClass('pastable-focus');
};
})(this));
};
function Paste(_container, _target) {
this._container = _container;
this._target = _target;
this._container = $(this._container);
this._target = $(this._target).addClass('pastable');
this._container.on('paste', (function(_this) {
return function(ev) {
var _i, clipboardData, file, fileType, item, j, k, l, len, len1, len2, pastedFilename, reader, ref, ref1, ref2, ref3, ref4, stringIsFilename, text;
_this.originalEvent = (ev.originalEvent !== null ? ev.originalEvent : null);
_this._paste_event_fired = true;
if (((ref = ev.originalEvent) != null ? ref.clipboardData : void 0) != null) {
clipboardData = ev.originalEvent.clipboardData;
if (clipboardData.items) {
pastedFilename = null;
_this.originalEvent.pastedTypes = [];
ref1 = clipboardData.items;
for (j = 0, len = ref1.length; j < len; j++) {
item = ref1[j];
if (item.type.match(/^text\/(plain|rtf|html)/)) {
_this.originalEvent.pastedTypes.push(item.type);
}
}
ref2 = clipboardData.items;
for (_i = k = 0, len1 = ref2.length; k < len1; _i = ++k) {
item = ref2[_i];
if (item.type.match(/^image\//)) {
reader = new FileReader();
reader.onload = function(event) {
return _this._handleImage(event.target.result, _this.originalEvent, pastedFilename);
};
try {
reader.readAsDataURL(item.getAsFile());
} catch (error) {}
ev.preventDefault();
break;
}
if (item.type === 'text/plain') {
if (_i === 0 && clipboardData.items.length > 1 && clipboardData.items[1].type.match(/^image\//)) {
stringIsFilename = true;
fileType = clipboardData.items[1].type;
}
item.getAsString(function(string) {
if (stringIsFilename) {
pastedFilename = string;
return _this._target.trigger('pasteText', {
text: string,
isFilename: true,
fileType: fileType,
originalEvent: _this.originalEvent
});
} else {
return _this._target.trigger('pasteText', {
text: string,
originalEvent: _this.originalEvent
});
}
});
}
if (item.type === 'text/rtf') {
item.getAsString(function(string) {
return _this._target.trigger('pasteTextRich', {
text: string,
originalEvent: _this.originalEvent
});
});
}
if (item.type === 'text/html') {
item.getAsString(function(string) {
return _this._target.trigger('pasteTextHtml', {
text: string,
originalEvent: _this.originalEvent
});
});
}
}
} else {
if (-1 !== Array.prototype.indexOf.call(clipboardData.types, 'text/plain')) {
text = clipboardData.getData('Text');
setTimeout(function() {
return _this._target.trigger('pasteText', {
text: text,
originalEvent: _this.originalEvent
});
}, 1);
}
_this._checkImagesInContainer(function(src) {
return _this._handleImage(src, _this.originalEvent);
});
}
}
if (clipboardData = window.clipboardData) {
if ((ref3 = (text = clipboardData.getData('Text'))) != null ? ref3.length : void 0) {
setTimeout(function() {
_this._target.trigger('pasteText', {
text: text,
originalEvent: _this.originalEvent
});
return _this._target.trigger('_pasteCheckContainerDone');
}, 1);
} else {
ref4 = clipboardData.files;
for (l = 0, len2 = ref4.length; l < len2; l++) {
file = ref4[l];
_this._handleImage(URL.createObjectURL(file), _this.originalEvent);
}
_this._checkImagesInContainer(function(src) {});
}
}
return null;
};
})(this));
}
Paste.prototype._handleImage = function(src, e, name) {
var loader;
if (src.match(/^webkit\-fake\-url\:\/\//)) {
return this._target.trigger('pasteImageError', {
message: "You are trying to paste an image in Safari, however we are unable to retieve its data."
});
}
this._target.trigger('pasteImageStart');
loader = new Image();
loader.crossOrigin = "anonymous";
loader.onload = (function(_this) {
return function() {
var blob, canvas, ctx, dataURL;
canvas = document.createElement('canvas');
canvas.width = loader.width;
canvas.height = loader.height;
ctx = canvas.getContext('2d');
ctx.drawImage(loader, 0, 0, canvas.width, canvas.height);
dataURL = null;
try {
dataURL = canvas.toDataURL('image/png');
blob = dataURLtoBlob(dataURL);
} catch (error) {}
if (dataURL) {
_this._target.trigger('pasteImage', {
blob: blob,
dataURL: dataURL,
width: loader.width,
height: loader.height,
originalEvent: e,
name: name
});
}
return _this._target.trigger('pasteImageEnd');
};
})(this);
loader.onerror = (function(_this) {
return function() {
_this._target.trigger('pasteImageError', {
message: "Failed to get image from: " + src,
url: src
});
return _this._target.trigger('pasteImageEnd');
};
})(this);
return loader.src = src;
};
Paste.prototype._checkImagesInContainer = function(cb) {
var img, j, len, ref, timespan;
timespan = Math.floor(1000 * Math.random());
ref = this._container.find('img');
for (j = 0, len = ref.length; j < len; j++) {
img = ref[j];
img["_paste_marked_" + timespan] = true;
}
return setTimeout((function(_this) {
return function() {
var k, len1, ref1;
ref1 = _this._container.find('img');
for (k = 0, len1 = ref1.length; k < len1; k++) {
img = ref1[k];
if (!img["_paste_marked_" + timespan]) {
cb(img.src);
$(img).remove();
}
}
return _this._target.trigger('_pasteCheckContainerDone');
};
})(this), 1);
};
return Paste;
})();
}).call(this);

2497
admin/src/js/plupload.js Executable file

File diff suppressed because it is too large Load Diff

237
admin/src/js/respond.js Normal file
View File

@ -0,0 +1,237 @@
/*! Respond.js v1.4.2: min/max-width media query polyfill
* Copyright 2013 Scott Jehl
* Licensed under MIT
* http://j.mp/respondjs */
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
(function(w) {
"use strict";
w.matchMedia = w.matchMedia || function(doc, undefined) {
var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
div.id = "mq-test-1";
div.style.cssText = "position:absolute;top:-100em";
fakeBody.style.background = "none";
fakeBody.appendChild(div);
return function(q) {
div.innerHTML = '&shy;<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
docElem.insertBefore(fakeBody, refNode);
bool = div.offsetWidth === 42;
docElem.removeChild(fakeBody);
return {
matches: bool,
media: q
};
};
}(w.document);
})(this);
(function(w) {
"use strict";
var respond = {};
w.respond = respond;
respond.update = function() {};
var requestQueue = [], xmlHttp = function() {
var xmlhttpmethod = false;
try {
xmlhttpmethod = new w.XMLHttpRequest();
} catch (e) {
xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
}
return function() {
return xmlhttpmethod;
};
}(), ajax = function(url, callback) {
var req = xmlHttp();
if (!req) {
return;
}
req.open("GET", url, true);
req.onreadystatechange = function() {
if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
return;
}
callback(req.responseText);
};
if (req.readyState === 4) {
return;
}
req.send(null);
}, isUnsupportedMediaQuery = function(query) {
return query.replace(respond.regex.minmaxwh, "").match(respond.regex.other);
};
respond.ajax = ajax;
respond.queue = requestQueue;
respond.unsupportedmq = isUnsupportedMediaQuery;
respond.regex = {
media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
comments: /\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,
urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
only: /(only\s+)?([a-zA-Z]+)\s?/,
minw: /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
maxw: /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
minmaxwh: /\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,
other: /\([^\)]*\)/g
};
respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
if (respond.mediaQueriesSupported) {
return;
}
var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
div.style.cssText = "position:absolute;font-size:1em;width:1em";
if (!body) {
body = fakeUsed = doc.createElement("body");
body.style.background = "none";
}
docElem.style.fontSize = "100%";
body.style.fontSize = "100%";
body.appendChild(div);
if (fakeUsed) {
docElem.insertBefore(body, docElem.firstChild);
}
ret = div.offsetWidth;
if (fakeUsed) {
docElem.removeChild(body);
} else {
body.removeChild(div);
}
docElem.style.fontSize = originalHTMLFontSize;
if (originalBodyFontSize) {
body.style.fontSize = originalBodyFontSize;
}
ret = eminpx = parseFloat(ret);
return ret;
}, applyMedia = function(fromResize) {
var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
if (fromResize && lastCall && now - lastCall < resizeThrottle) {
w.clearTimeout(resizeDefer);
resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
return;
} else {
lastCall = now;
}
for (var i in mediastyles) {
if (mediastyles.hasOwnProperty(i)) {
var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
if (!!min) {
min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
}
if (!!max) {
max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
}
if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
if (!styleBlocks[thisstyle.media]) {
styleBlocks[thisstyle.media] = [];
}
styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
}
}
}
for (var j in appendedEls) {
if (appendedEls.hasOwnProperty(j)) {
if (appendedEls[j] && appendedEls[j].parentNode === head) {
head.removeChild(appendedEls[j]);
}
}
}
appendedEls.length = 0;
for (var k in styleBlocks) {
if (styleBlocks.hasOwnProperty(k)) {
var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
ss.type = "text/css";
ss.media = k;
head.insertBefore(ss, lastLink.nextSibling);
if (ss.styleSheet) {
ss.styleSheet.cssText = css;
} else {
ss.appendChild(doc.createTextNode(css));
}
appendedEls.push(ss);
}
}
}, translate = function(styles, href, media) {
var qs = styles.replace(respond.regex.comments, "").replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
href = href.substring(0, href.lastIndexOf("/"));
var repUrls = function(css) {
return css.replace(respond.regex.urls, "$1" + href + "$2$3");
}, useMedia = !ql && media;
if (href.length) {
href += "/";
}
if (useMedia) {
ql = 1;
}
for (var i = 0; i < ql; i++) {
var fullq, thisq, eachq, eql;
if (useMedia) {
fullq = media;
rules.push(repUrls(styles));
} else {
fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
rules.push(RegExp.$2 && repUrls(RegExp.$2));
}
eachq = fullq.split(",");
eql = eachq.length;
for (var j = 0; j < eql; j++) {
thisq = eachq[j];
if (isUnsupportedMediaQuery(thisq)) {
continue;
}
mediastyles.push({
media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
rules: rules.length - 1,
hasquery: thisq.indexOf("(") > -1,
minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
});
}
}
applyMedia();
}, makeRequests = function() {
if (requestQueue.length) {
var thisRequest = requestQueue.shift();
ajax(thisRequest.href, function(styles) {
translate(styles, thisRequest.href, thisRequest.media);
parsedSheets[thisRequest.href] = true;
w.setTimeout(function() {
makeRequests();
}, 0);
});
}
}, ripCSS = function() {
for (var i = 0; i < links.length; i++) {
var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
if (!!href && isCSS && !parsedSheets[href]) {
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
translate(sheet.styleSheet.rawCssText, href, media);
parsedSheets[href] = true;
} else {
if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
if (href.substring(0, 2) === "//") {
href = w.location.protocol + href;
}
requestQueue.push({
href: href,
media: media
});
}
}
}
}
makeRequests();
};
ripCSS();
respond.update = ripCSS;
respond.getEmValue = getEmValue;
function callMedia() {
applyMedia(true);
}
if (w.addEventListener) {
w.addEventListener("resize", callMedia, false);
} else if (w.attachEvent) {
w.attachEvent("onresize", callMedia);
}
})(this);

2134
admin/src/js/timepicker.js Normal file

File diff suppressed because it is too large Load Diff

877
admin/src/js/tokeninput.js Executable file
View File

@ -0,0 +1,877 @@
/*
* jQuery Plugin: Tokenizing Autocomplete Text Entry
* Version 1.6.0
*
* Copyright (c) 2009 James Smith (http://loopj.com)
* Licensed jointly under the GPL and MIT licenses,
* choose which one suits your project best!
*
*/
(function ($) {
// Default settings
var DEFAULT_SETTINGS = {
// Search settings
method: "GET",
contentType: "json",
queryParam: "q",
searchDelay: 300,
minChars: 1,
propertyToSearch: "name",
jsonContainer: null,
// Display settings
hintText: "Type in a search term",
noResultsText: "No results",
searchingText: "Searching...",
deleteText: "&times;",
animateDropdown: true,
// Tokenization settings
tokenLimit: null,
tokenDelimiter: ",",
preventDuplicates: false,
// Output settings
tokenValue: "id",
// Prepopulation settings
prePopulate: null,
processPrePopulate: false,
// Manipulation settings
idPrefix: "token-input-",
// Formatters
resultsFormatter: function(item){ return "<li>" + item[this.propertyToSearch]+ "</li>" },
tokenFormatter: function(item) { return "<li><p>" + item[this.propertyToSearch] + "</p></li>" },
// Callbacks
onResult: null,
onAdd: null,
onDelete: null,
onReady: null
};
// Default classes to use when theming
var DEFAULT_CLASSES = {
tokenList: "token-input-list",
token: "token-input-token",
tokenDelete: "token-input-delete-token",
selectedToken: "token-input-selected-token",
highlightedToken: "token-input-highlighted-token",
dropdown: "token-input-dropdown",
dropdownItem: "token-input-dropdown-item",
dropdownItem2: "token-input-dropdown-item2",
selectedDropdownItem: "token-input-selected-dropdown-item",
inputToken: "token-input-input-token"
};
// Input box position "enum"
var POSITION = {
BEFORE: 0,
AFTER: 1,
END: 2
};
// Keys "enum"
var KEY = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
ESCAPE: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
NUMPAD_ENTER: 108,
COMMA: 188
};
// Additional public (exposed) methods
var methods = {
init: function(url_or_data_or_function, options) {
var settings = $.extend({}, DEFAULT_SETTINGS, options || {});
return this.each(function () {
$(this).data("tokenInputObject", new $.TokenList(this, url_or_data_or_function, settings));
});
},
clear: function() {
this.data("tokenInputObject").clear();
return this;
},
add: function(item) {
this.data("tokenInputObject").add(item);
return this;
},
remove: function(item) {
this.data("tokenInputObject").remove(item);
return this;
},
get: function() {
return this.data("tokenInputObject").getTokens();
}
}
// Expose the .tokenInput function to jQuery as a plugin
$.fn.tokenInput = function (method) {
// Method calling and initialization logic
if(methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else {
return methods.init.apply(this, arguments);
}
};
// TokenList class for each input
$.TokenList = function (input, url_or_data, settings) {
//
// Initialization
//
// Configure the data source
if($.type(url_or_data) === "string" || $.type(url_or_data) === "function") {
// Set the url to query against
settings.url = url_or_data;
// If the URL is a function, evaluate it here to do our initalization work
var url = computeURL();
// Make a smart guess about cross-domain if it wasn't explicitly specified
if(settings.crossDomain === undefined) {
if(url.indexOf("://") === -1) {
settings.crossDomain = false;
} else {
settings.crossDomain = (location.href.split(/\/+/g)[1] !== url.split(/\/+/g)[1]);
}
}
} else if(typeof(url_or_data) === "object") {
// Set the local data to search through
settings.local_data = url_or_data;
}
// Build class names
if(settings.classes) {
// Use custom class names
settings.classes = $.extend({}, DEFAULT_CLASSES, settings.classes);
} else if(settings.theme) {
// Use theme-suffixed default class names
settings.classes = {};
$.each(DEFAULT_CLASSES, function(key, value) {
settings.classes[key] = value + "-" + settings.theme;
});
} else {
settings.classes = DEFAULT_CLASSES;
}
// Save the tokens
var saved_tokens = [];
// Keep track of the number of tokens in the list
var token_count = 0;
// Basic cache to save on db hits
var cache = new $.TokenList.Cache();
// Keep track of the timeout, old vals
var timeout;
var input_val;
// Create a new text input an attach keyup events
var input_box = $("<input type=\"text\" autocomplete=\"off\">")
.css({
outline: "none"
})
.attr("id", settings.idPrefix + input.id)
.focus(function () {
if (settings.tokenLimit === null || settings.tokenLimit !== token_count) {
show_dropdown_hint();
}
})
.blur(function () {
hide_dropdown();
$(this).val("");
})
// .bind("keyup keydown blur update", resize_input)
.keydown(function (event) {
var previous_token;
var next_token;
switch(event.keyCode) {
case KEY.LEFT:
case KEY.RIGHT:
case KEY.UP:
case KEY.DOWN:
if(!$(this).val()) {
previous_token = input_token.prev();
next_token = input_token.next();
if((previous_token.length && previous_token.get(0) === selected_token) || (next_token.length && next_token.get(0) === selected_token)) {
// Check if there is a previous/next token and it is selected
if(event.keyCode === KEY.LEFT || event.keyCode === KEY.UP) {
deselect_token($(selected_token), POSITION.BEFORE);
} else {
deselect_token($(selected_token), POSITION.AFTER);
}
} else if((event.keyCode === KEY.LEFT || event.keyCode === KEY.UP) && previous_token.length) {
// We are moving left, select the previous token if it exists
select_token($(previous_token.get(0)));
} else if((event.keyCode === KEY.RIGHT || event.keyCode === KEY.DOWN) && next_token.length) {
// We are moving right, select the next token if it exists
select_token($(next_token.get(0)));
}
} else {
var dropdown_item = null;
if(event.keyCode === KEY.DOWN || event.keyCode === KEY.RIGHT) {
dropdown_item = $(selected_dropdown_item).next();
} else {
dropdown_item = $(selected_dropdown_item).prev();
}
if(dropdown_item.length) {
select_dropdown_item(dropdown_item);
}
return false;
}
break;
case KEY.BACKSPACE:
previous_token = input_token.prev();
if(!$(this).val().length) {
if(selected_token) {
delete_token($(selected_token));
hidden_input.change();
} else if(previous_token.length) {
select_token($(previous_token.get(0)));
}
return false;
} else if($(this).val().length === 1) {
hide_dropdown();
} else {
// set a timeout just long enough to let this function finish.
setTimeout(function(){do_search();}, 5);
}
break;
// case KEY.TAB:
case KEY.ENTER:
case KEY.NUMPAD_ENTER:
case KEY.COMMA:
if(selected_dropdown_item) {
add_token($(selected_dropdown_item).data("tokeninput"));
hidden_input.change();
return false;
} else {
add_token(null);
return false;
}
break;
case KEY.ESCAPE:
hide_dropdown();
return true;
default:
if(String.fromCharCode(event.which)) {
// set a timeout just long enough to let this function finish.
setTimeout(function(){do_search();}, 5);
}
break;
}
});
// Keep a reference to the original input box
var hidden_input = $(input)
.hide()
.val("")
.focus(function () {
input_box.focus();
})
.blur(function () {
input_box.blur();
});
// Keep a reference to the selected token and dropdown item
var selected_token = null;
var selected_token_index = 0;
var selected_dropdown_item = null;
// The list to store the token items in
var token_list = $("<ul />")
.addClass(settings.classes.tokenList)
.click(function (event) {
var li = $(event.target).closest("li");
if(li && li.get(0) && $.data(li.get(0), "tokeninput")) {
toggle_select_token(li);
} else {
// Deselect selected token
if(selected_token) {
deselect_token($(selected_token), POSITION.END);
}
// Focus input box
input_box.focus();
}
})
.mouseover(function (event) {
var li = $(event.target).closest("li");
if(li && selected_token !== this) {
li.addClass(settings.classes.highlightedToken);
}
})
.mouseout(function (event) {
var li = $(event.target).closest("li");
if(li && selected_token !== this) {
li.removeClass(settings.classes.highlightedToken);
}
})
.insertBefore(hidden_input);
// The token holding the input box
var input_token = $("<li />")
.addClass(settings.classes.inputToken)
.appendTo(token_list)
.append(input_box);
// The list to store the dropdown items in
var dropdown = $("<div>")
.addClass(settings.classes.dropdown)
.appendTo("body")
.hide();
// Magic element to help us resize the text input
var input_resizer = $("<tester/>")
.insertAfter(input_box)
.css({
position: "absolute",
top: -9999,
left: -9999,
width: "auto",
fontSize: input_box.css("fontSize"),
fontFamily: input_box.css("fontFamily"),
fontWeight: input_box.css("fontWeight"),
letterSpacing: input_box.css("letterSpacing"),
whiteSpace: "nowrap"
});
// Pre-populate list if items exist
hidden_input.val("");
var li_data = settings.prePopulate || hidden_input.data("pre");
if(settings.processPrePopulate && $.isFunction(settings.onResult)) {
li_data = settings.onResult.call(hidden_input, li_data);
}
if(li_data && li_data.length) {
$.each(li_data, function (index, value) {
insert_token(value);
checkTokenLimit();
});
}
// Initialization is done
if($.isFunction(settings.onReady)) {
settings.onReady.call();
}
//
// Public functions
//
this.clear = function() {
token_list.children("li").each(function() {
if ($(this).children("input").length === 0) {
delete_token($(this));
}
});
}
this.add = function(item) {
add_token(item);
}
this.remove = function(item) {
token_list.children("li").each(function() {
if ($(this).children("input").length === 0) {
var currToken = $(this).data("tokeninput");
var match = true;
for (var prop in item) {
if (item[prop] !== currToken[prop]) {
match = false;
break;
}
}
if (match) {
delete_token($(this));
}
}
});
}
this.getTokens = function() {
return saved_tokens;
}
//
// Private functions
//
function checkTokenLimit() {
if(settings.tokenLimit !== null && token_count >= settings.tokenLimit) {
input_box.hide();
hide_dropdown();
return;
}
}
function resize_input() {
if(input_val === (input_val = input_box.val())) {return;}
// Enter new content into resizer and resize input accordingly
var escaped = input_val.replace(/&/g, '&amp;').replace(/\s/g,' ').replace(/</g, '&lt;').replace(/>/g, '&gt;');
input_resizer.html(escaped);
input_box.width(input_resizer.width() + 30);
}
function is_printable_character(keycode) {
return ((keycode >= 48 && keycode <= 90) || // 0-1a-z
(keycode >= 96 && keycode <= 111) || // numpad 0-9 + - / * .
(keycode >= 186 && keycode <= 192) || // ; = , - . / ^
(keycode >= 219 && keycode <= 222)); // ( \ ) '
}
// Inner function to a token to the list
function insert_token(item) {
var this_token = settings.tokenFormatter(item);
this_token = $(this_token)
.addClass(settings.classes.token)
.insertBefore(input_token);
// The 'delete token' button
$("<span>" + settings.deleteText + "</span>")
.addClass(settings.classes.tokenDelete)
.appendTo(this_token)
.click(function () {
delete_token($(this).parent());
hidden_input.change();
return false;
});
// Store data on the token
var token_data = {"id": item.id};
token_data[settings.propertyToSearch] = item[settings.propertyToSearch];
$.data(this_token.get(0), "tokeninput", item);
// Save this token for duplicate checking
saved_tokens = saved_tokens.slice(0,selected_token_index).concat([token_data]).concat(saved_tokens.slice(selected_token_index));
selected_token_index++;
// Update the hidden input
update_hidden_input(saved_tokens, hidden_input);
token_count += 1;
// Check the token limit
if(settings.tokenLimit !== null && token_count >= settings.tokenLimit) {
input_box.hide();
hide_dropdown();
}
return this_token;
}
// Add a token to the token list based on user input
function add_token (item) {
var callback = settings.onAdd;
// fix null bug
if (!item && input_box.val().length > 0) {
item = {
id : input_box.val()
};
item[settings.propertyToSearch] = input_box.val();
}
if (!item) {
return false;
}
// See if the token already exists and select it if we don't want duplicates
if(token_count > 0 && settings.preventDuplicates) {
var found_existing_token = null;
token_list.children().each(function () {
var existing_token = $(this);
var existing_data = $.data(existing_token.get(0), "tokeninput");
if(existing_data && existing_data.id === item.id) {
found_existing_token = existing_token;
return false;
}
});
if(found_existing_token) {
select_token(found_existing_token);
input_token.insertAfter(found_existing_token);
input_box.focus();
return;
}
}
// Insert the new tokens
if(settings.tokenLimit == null || token_count < settings.tokenLimit) {
insert_token(item);
checkTokenLimit();
}
// Clear input box
input_box.val("");
// Don't show the help dropdown, they've got the idea
hide_dropdown();
// Execute the onAdd callback if defined
if($.isFunction(callback)) {
callback.call(hidden_input,item);
}
}
// Select a token in the token list
function select_token (token) {
token.addClass(settings.classes.selectedToken);
selected_token = token.get(0);
// Hide input box
input_box.val("");
// Hide dropdown if it is visible (eg if we clicked to select token)
hide_dropdown();
}
// Deselect a token in the token list
function deselect_token (token, position) {
token.removeClass(settings.classes.selectedToken);
selected_token = null;
if(position === POSITION.BEFORE) {
input_token.insertBefore(token);
selected_token_index--;
} else if(position === POSITION.AFTER) {
input_token.insertAfter(token);
selected_token_index++;
} else {
input_token.appendTo(token_list);
selected_token_index = token_count;
}
// Show the input box and give it focus again
input_box.focus();
}
// Toggle selection of a token in the token list
function toggle_select_token(token) {
var previous_selected_token = selected_token;
if(selected_token) {
deselect_token($(selected_token), POSITION.END);
}
if(previous_selected_token === token.get(0)) {
deselect_token(token, POSITION.END);
} else {
select_token(token);
}
}
// Delete a token from the token list
function delete_token (token) {
// Remove the id from the saved list
var token_data = $.data(token.get(0), "tokeninput");
var callback = settings.onDelete;
var index = token.prevAll().length;
if(index > selected_token_index) index--;
// Delete the token
token.remove();
selected_token = null;
// Show the input box and give it focus again
input_box.focus();
// Remove this token from the saved list
saved_tokens = saved_tokens.slice(0,index).concat(saved_tokens.slice(index+1));
if(index < selected_token_index) selected_token_index--;
// Update the hidden input
update_hidden_input(saved_tokens, hidden_input);
token_count -= 1;
if(settings.tokenLimit !== null) {
input_box
.show()
.val("")
.focus();
}
// Execute the onDelete callback if defined
if($.isFunction(callback)) {
callback.call(hidden_input,token_data);
}
}
// Update the hidden input box value
function update_hidden_input(saved_tokens, hidden_input) {
var token_values = $.map(saved_tokens, function (el) {
return el[settings.tokenValue];
});
hidden_input.val(token_values.join(settings.tokenDelimiter));
}
// Hide and clear the results dropdown
function hide_dropdown () {
dropdown.hide().empty();
selected_dropdown_item = null;
}
function show_dropdown() {
dropdown
.css({
position: "absolute",
top: $(token_list).offset().top + $(token_list).outerHeight(),
left: $(token_list).offset().left,
zindex: 999
})
.show();
}
function show_dropdown_searching () {
if(settings.searchingText) {
dropdown.html("<p>"+settings.searchingText+"</p>");
show_dropdown();
}
}
function show_dropdown_hint () {
if(settings.hintText) {
dropdown.html("<p>"+settings.hintText+"</p>");
show_dropdown();
}
}
// Highlight the query part of the search term
function highlight_term(value, term) {
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<b>$1</b>");
}
function find_value_and_highlight_term(template, value, term) {
return template.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + value + ")(?![^<>]*>)(?![^&;]+;)", "g"), highlight_term(value, term));
}
// Populate the results dropdown with some results
function populate_dropdown (query, results) {
if(results && results.length) {
dropdown.empty();
var dropdown_ul = $("<ul>")
.appendTo(dropdown)
.mouseover(function (event) {
select_dropdown_item($(event.target).closest("li"));
})
.mousedown(function (event) {
add_token($(event.target).closest("li").data("tokeninput"));
hidden_input.change();
return false;
})
.hide();
$.each(results, function(index, value) {
var this_li = settings.resultsFormatter(value);
this_li = find_value_and_highlight_term(this_li ,value[settings.propertyToSearch], query);
this_li = $(this_li).appendTo(dropdown_ul);
if(index % 2) {
this_li.addClass(settings.classes.dropdownItem);
} else {
this_li.addClass(settings.classes.dropdownItem2);
}
if(index === 0) {
select_dropdown_item(this_li);
}
$.data(this_li.get(0), "tokeninput", value);
});
show_dropdown();
if(settings.animateDropdown) {
dropdown_ul.slideDown("fast");
} else {
dropdown_ul.show();
}
} else {
if(settings.noResultsText) {
dropdown.html("<p>"+settings.noResultsText+"</p>");
show_dropdown();
}
}
}
// Highlight an item in the results dropdown
function select_dropdown_item (item) {
if(item) {
if(selected_dropdown_item) {
deselect_dropdown_item($(selected_dropdown_item));
}
item.addClass(settings.classes.selectedDropdownItem);
selected_dropdown_item = item.get(0);
}
}
// Remove highlighting from an item in the results dropdown
function deselect_dropdown_item (item) {
item.removeClass(settings.classes.selectedDropdownItem);
selected_dropdown_item = null;
}
// Do a search and show the "searching" dropdown if the input is longer
// than settings.minChars
function do_search() {
var val = input_box.val(), query = val.toLowerCase();
if(query && query.length) {
if(selected_token) {
deselect_token($(selected_token), POSITION.AFTER);
}
if(query.length >= settings.minChars) {
show_dropdown_searching();
clearTimeout(timeout);
timeout = setTimeout(function(){
run_search(query, val);
}, settings.searchDelay);
} else {
hide_dropdown();
}
}
}
// Do the actual search
function run_search(query, val) {
var cache_key = val + computeURL();
var cached_results = cache.get(cache_key);
if(cached_results) {
populate_dropdown(query, cached_results);
} else {
// Are we doing an ajax search or local data search?
if(settings.url) {
var url = computeURL();
// Extract exisiting get params
var ajax_params = {};
ajax_params.data = {};
if(url.indexOf("?") > -1) {
var parts = url.split("?");
ajax_params.url = parts[0];
var param_array = parts[1].split("&");
$.each(param_array, function (index, value) {
var kv = value.split("=");
ajax_params.data[kv[0]] = kv[1];
});
} else {
ajax_params.url = url;
}
// Prepare the request
ajax_params.data[settings.queryParam] = query;
ajax_params.type = settings.method;
ajax_params.dataType = settings.contentType;
if(settings.crossDomain) {
ajax_params.dataType = "jsonp";
}
// Attach the success callback
ajax_params.success = function(results) {
if($.isFunction(settings.onResult)) {
results = settings.onResult.call(hidden_input, results, query, val);
}
cache.add(cache_key, settings.jsonContainer ? results[settings.jsonContainer] : results);
// only populate the dropdown if the results are associated with the active search query
if(input_box.val().toLowerCase() === query) {
populate_dropdown(query, settings.jsonContainer ? results[settings.jsonContainer] : results);
}
};
// Make the request
$.ajax(ajax_params);
} else if(settings.local_data) {
// Do the search through local data
var results = $.grep(settings.local_data, function (row) {
return row[settings.propertyToSearch].toLowerCase().indexOf(query.toLowerCase()) > -1;
});
if($.isFunction(settings.onResult)) {
results = settings.onResult.call(hidden_input, results, query, val);
}
cache.add(cache_key, results);
populate_dropdown(query, results);
}
}
}
// compute the dynamic URL
function computeURL() {
var url = settings.url;
if(typeof settings.url == 'function') {
url = settings.url.call();
}
return url;
}
};
// Really basic cache for the results
$.TokenList.Cache = function (options) {
var settings = $.extend({
max_size: 500
}, options);
var data = {};
var size = 0;
var flush = function () {
data = {};
size = 0;
};
this.add = function (query, results) {
if(size > settings.max_size) {
flush();
}
if(!data[query]) {
size += 1;
}
data[query] = results;
};
this.get = function (query) {
return data[query];
};
};
}(jQuery));

1460
admin/src/js/typecho.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
@import "compass";
/**
* Buttons
@ -9,11 +8,11 @@
background-color: $color;
cursor: pointer;
@include border-radius(2px);
border-radius: 2px;
// @include transition-property(background-color);
&:hover {
@include transition-duration(.4s);
transition-duration: .4s;
background-color: darken($color, 6%);
}
&:active, &.active {

View File

@ -1,12 +1,21 @@
/**
* icons
*/
$sprites: sprite-map("icons/*.png");
$sprites-retina: sprite-map("icons-2x/*.png");
@import "icons/*.png";
@include all-icons-sprites(true);
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
@import "icons-2x/*.png";
@include all-icons-sprites();
}
/*
@mixin sprite-background($name) {
// background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
// background-position: sprite-position($sprites, $name);
@include icons-sprite($name);
// background-repeat: no-repeat;
// display: block;
// height: image-height(sprite-file($sprites, $name));
@ -14,33 +23,31 @@ $sprites-retina: sprite-map("icons-2x/*.png");
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
@include icons-2x-sprite($name);
// Workaround for https://gist.github.com/2140082
@if (sprite-position($sprites, $name) != sprite-position($sprites-retina, $name)) {
$ypos: round(nth(sprite-position($sprites-retina, $name), 2) / 2);
background-position: 0 $ypos;
}
//@if (sprite-position($sprites, $name) != sprite-position($sprites-retina, $name)) {
// $ypos: round(nth(sprite-position($sprites-retina, $name), 2) / 2);
// background-position: 0 $ypos;
//}
// Hard coded width of the normal sprite image. There must be a smarter way to do this.
// @include background-size(auto 256px);
// background-image: sprite-url($sprites-retina);
}
}
*/
%i-base {
display: inline-block;
vertical-align: text-bottom;
text-indent: -9999em;
background-image: sprite-url($sprites);
background-repeat: no-repeat;
&:hover {
@include opacity(0.75);
opacity: 0.75;
}
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
// Hard coded width of the normal sprite image. There must be a smarter way to do this.
@include background-size(auto 256px);
background-image: sprite-url($sprites-retina);
background-size: auto 256px;
}
}
@ -58,11 +65,11 @@ $sprites-retina: sprite-map("icons-2x/*.png");
.i-edit {
@extend %i-16;
@include sprite-background(icon-edit);
@include icons-sprite(icon-edit);
}
.i-delete {
@extend %i-16;
@include sprite-background(icon-delete);
@include icons-sprite(icon-delete);
}
@ -70,12 +77,12 @@ $sprites-retina: sprite-map("icons-2x/*.png");
.i-upload {
@extend %i-24;
@include sprite-background(icon-upload);
@include icons-sprite(icon-upload);
}
.i-upload-active {
@extend %i-24;
@include sprite-background(icon-upload-active);
@include icons-sprite(icon-upload-active);
}
// 小箭头
@ -100,7 +107,7 @@ $sprites-retina: sprite-map("icons-2x/*.png");
.i-exlink {
@extend %i-16;
@include sprite-background(icon-exlink);
@include icons-sprite(icon-exlink);
}
@ -108,52 +115,52 @@ $sprites-retina: sprite-map("icons-2x/*.png");
.mime-office {
@extend %i-16;
@include sprite-background(mime-office);
@include icons-sprite(mime-office);
}
.mime-text {
@extend %i-16;
@include sprite-background(mime-text);
@include icons-sprite(mime-text);
}
.mime-image {
@extend %i-16;
@include sprite-background(mime-image);
@include icons-sprite(mime-image);
}
.mime-html {
@extend %i-16;
@include sprite-background(mime-html);
@include icons-sprite(mime-html);
}
.mime-archive {
@extend %i-16;
@include sprite-background(mime-archive);
@include icons-sprite(mime-archive);
}
.mime-application {
@extend %i-16;
@include sprite-background(mime-application);
@include icons-sprite(mime-application);
}
.mime-audio {
@extend %i-16;
@include sprite-background(mime-audio);
@include icons-sprite(mime-audio);
}
.mime-script {
@extend %i-16;
@include sprite-background(mime-script);
@include icons-sprite(mime-script);
}
.mime-video {
@extend %i-16;
@include sprite-background(mime-video);
@include icons-sprite(mime-video);
}
.mime-unknow {
@extend %i-16;
@include sprite-background(mime-unknow);
@include icons-sprite(mime-unknow);
}
@ -164,15 +171,15 @@ $sprites-retina: sprite-map("icons-2x/*.png");
display: inline-block;
background: url("../img/typecho-logo.svg") no-repeat;
text-indent: -9999em;
@include background-size(auto 40px);
@include opacity(.15);
background-size: auto 40px;
opacity: .15;
&:hover {
@include opacity(.2);
opacity: .2;
}
}
.i-logo-s {
width: 26px;
height: 26px;
@include background-size(auto 26px);
background-size: auto 26px;
}

View File

@ -1,11 +1,10 @@
@import "compass";
/**
* 提示信息框
*/
.message {
padding: 8px 10px;
@include border-radius(2px);
border-radius: 2px;
}
.message a {
@ -45,7 +44,6 @@
font-size: 12px;
color: #FFF;
@include border-radius(20px);
border-radius: 20px;
}

View File

@ -22,7 +22,7 @@
.typecho-pager a {
display: block;
padding: 0 10px;
@include border-radius(2px);
border-radius: 2px;
}
.typecho-pager a:hover {
@ -33,4 +33,4 @@
.typecho-pager li.current a {
background: #E9E9E6;
color: #444;
}
}

Some files were not shown because too many files have changed in this diff Show More