init blog

This commit is contained in:
dengtongyu committed 2018-05-08 11:22:54 +08:00
1 parent 5acc46db8e
commit 843783ce9a
1820 files changed
+539344

No files matched your search

@@ -0,0 +1,172 @@
@charset "utf-8";
.cxcalendar {
display: none;
position: absolute;
width: 200px;
font: 12px Arial;
border: 1px solid #ccc;
background: #fff;
box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
z-index: 10000;
}
.cxcalendar .date_hd {
position: relative;
height: 20px;
padding: 8px 6px 2px 6px;
background: #fff;
}
.cxcalendar .date_pre,
.cxcalendar .date_next {
position: absolute;
top: 9px;
width: 9px;
height: 10px;
padding: 3px 4px;
border: 1px solid #fff;
border-radius: 2px;
color: #333;
font: 0/0 Arial;
text-decoration: none;
outline: 0;
*top: 7px;
*height: 14px;
*font: bold 14px/14px Arial;
}
.cxcalendar .date_pre {
left: 8px;
}
.cxcalendar .date_next {
right: 8px;
}
.cxcalendar .date_pre:before,
.cxcalendar .date_next:before {
content: '';
display: block;
font: 0/0 Arial;
width: 0;
height: 0;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
}
.cxcalendar .date_pre:before {
border-right: 9px solid #333;
}
.cxcalendar .date_next:before {
border-left: 9px solid #333;
}
.cxcalendar .date_pre:hover,
.cxcalendar .date_next:hover {
border: 1px solid #999;
background: #eee;
}
.cxcalendar .date_txt {
width: 120px;
margin: 0 auto;
border: 1px solid #fff;
border-radius: 2px;
color: #333;
font: bold 14px/18px Arial;
text-align: center;
cursor: pointer;
}
.cxcalendar .date_txt:hover {
border: 1px solid #999;
background: #eee;
}
.cxcalendar .date_txt .y {
padding: 0 6px 0 0;
}
.cxcalendar .date_txt .m {
padding: 0 6px;
}
.cxcalendar .date_set {
display: none;
width: 120px;
margin: 0 auto;
text-align: center;
}
.cxcalendar .year_set,
.cxcalendar .month_set {
margin: 0;
padding: 0;
border: 1px solid #999;
border-radius: 2px;
background: #fff;
font: 12px/20px Arial;
}
.cxcalendar table {
position: relative;
border-collapse: collapse;
table-layout: fixed;
empty-cells: show;
text-align: center;
z-index: 1;
}
.cxcalendar thead th,
.cxcalendar tbody td {
width: 24px;
height: 20px;
padding: 0;
border: 4px solid #fff;
font: 12px/20px Arial;
text-align: center;
}
.cxcalendar thead th {
color: #999;
}
.cxcalendar tbody td {
position: static;
}
.cxcalendar tbody .sat {
color: #06f
}
.cxcalendar tbody .sun {
color: #e00;
}
.cxcalendar tbody .now {
background: #ddd;
}
.cxcalendar tbody .num:hover {
background: #aaa;
color: #333;
text-decoration: none;
cursor: pointer;
}
.cxcalendar table .selected {
background: #090;
color: #fff;
}
.cxcalendar_lock {
display: none;
position: absolute;
top: 0;
left: 0;
background: #fff;
z-index: 9999;
filter: alpha(opacity=0);
opacity: 0;
}
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
@@ -0,0 +1,48 @@
/*! jQuery UI - v1.9.2 - 2014-10-02
* http://jqueryui.com
* Includes: jquery.ui.core.css, jquery.ui.slider.css
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
.ui-helper-clearfix:after { clear: both; }
.ui-helper-clearfix { zoom: 1; }
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: .8em; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }
@@ -0,0 +1,492 @@
@charset "utf-8";
#mpanel-wrap {
width: 1000px;
overflow: hidden;
margin: auto;
background: #FEFEFE;
border: 1px solid #E5E5E5;
box-shadow: 0 1px 1px rgba(0,0,0,.04);
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04);
margin-top: 30px;
position: relative;
}
#mpanel-load {
margin: -40px 0 0 -40px;
height: 80px;
width: 80px;
background: rgba(0,0,0,.8) url(../images/loading.gif) no-repeat center;
position: fixed;
top: 50%;
left: 50%;
z-index: 100;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
display: none;
}
#mpanel-form {
display: inline;
}
#mpanel-tooltip {
background: #000;
border-radius: 3px;
color: #FFF;
font-size: 12px;
padding: 3px 6px;
position: absolute;
opacity: .8;
word-break: break-all;
transform: translate(0,-100%);
-ms-transform: translate(0,-100%);
-moz-transform: translate(0,-100%);
-webkit-transform: translate(0,-100%);
-o-transform: translate(0,-100%);
min-width: 40px;
text-align: center;
z-index: 99999;
max-width: 200px;
display: none;
}
#mpanel-tooltip:after {
content: '';
left: 50%;
bottom: -5px;
border: 5px solid #000;
position: absolute;
transform: translate(-50%,0) rotate(45deg);
-ms-transform: translate(-50%,0) rotate(45deg);
-moz-transform: translate(-50%,0) rotate(45deg);
-webkit-transform: translate(-50%,0) rotate(45deg);
-o-transform: translate(-50%,0) rotate(45deg);
}
.mpanel-done {
background: rgba(0,0,0,.8) url(../images/done.png) no-repeat center !important;
}
.mpanel-error {
background: rgba(0,0,0,.8) url(../images/error.png) no-repeat center !important;
}
.mpanel-logo {
width: 150px;
height: 150px;
background: url(../images/logo.png) no-repeat center;
margin: 18px auto;
}
.mpanel-menu-box {
float: left;
width: 160px;
height: 100%;
background: #FAFAFA;
border-right: 1px solid #E5E5E5;
padding-bottom: 99999px;
margin-bottom: -99999px;
position: absolute;
}
.mpanel-menu {
margin: 0;
}
.mpanel-menu li {
height: 35px;
margin-bottom: 0;
line-height: 35px;
border-bottom: 1px solid #E5E5E5;
padding: 0 10px;
position: relative;
width: 141px;
cursor: pointer;
}
.mpanel-menu li:first-child {
border-top: 1px solid #E5E5E5;
}
.mpanel-menu li.current {
background: #FDFDFD;
border-left: 3px solid #35aadc;
padding-left: 7px;
}
.mpanel-menu li:hover {
background: #fff;
width: 140px;
}
.mpanel-menu li[class*="current"]:hover {
width: 141px;
}
.mpanel-help {
width: 16px;
height: 16px;
background: url(../images/help.png) no-repeat center;
display: block;
position: absolute;
right: 10px;
top: 16px;
cursor: help;
}
.mpanel-submit {
position: absolute;
height: 30px;
font-size: 13px;
background: #35aadc;
vertical-align: baseline;
color: #FFF;
cursor: pointer;
border: none;
-webkit-transition: .5s;
-moz-transition: .5s;
-o-transition: .5s;
-moz-transition-duration: .5s;
-o-transition-duration: .5s;
transition: .5s;
border-radius: 3px;
padding: 3px 8px;
line-height: 24px;
}
.mpanel-submit:disabled {
box-shadow: none;
background-color: #E5E5E5;
}
.mpanel-submit:hover {
background: #31c264;
}
.mpanel-save {
right: 20px;
top: 8px;
}
.mpanel-save2 {
bottom: 8px;
right: 20px;
}
.mpanel-restore-settings {
bottom: 8px;
left: 181px;
background: #ffb700;
}
.mpanel-mian-panel {
padding-left: 200px;
background: #FDFDFD;
}
.mpanel-mian-panel:after {
content: '';
display: block;
clear: both;
height: 0;
overflow: hidden;
}
.mpanel-page {
float: right;
width: auto;
padding: 0 20px;
min-height: 700px;
margin-bottom: 48px;
border-bottom: 1px solid #E5E5E5;
width: 100%;
}
.mpanel-page > h2.title {
margin: 14px -20px;
padding: 0 20px 12px;
margin-bottom: 20px;
line-height: 26px;
}
.mpnael-group {
border: 1px solid #E5E5E5;
margin-bottom: 20px;
background: #FFF;
}
.mpnael-group h3.title {
margin: 0;
border-bottom: 1px solid #E5E5E5;
background: #FAFAFA;
height: 40px;
line-height: 40px;
padding: 0 10px;
font-size: 16px;
}
.mpnael-group-box {
padding: 0 10px;
}
.mpanel-form-table input[type="number"] {
width: 80px;
}
.mpanel-form-table select {
width: 350px;
}
.mpanel-form-table select[multiple="multiple"] {
height: 100px;
}
.mpanel-form-table textarea {
width: 100%;
height: 88px;
float: left;
resize: vertical;
}
.mpanel-form-table input[type="text"],
.mpanel-form-table input[type="password"] {
width: 100%;
border-radius: 2px;
margin: 0;
}
.mpanel-form-table .btn {
background: #FFF;
border: 1px solid #dee5e7;
box-shadow: 0 1px 1px rgba(90,90,90,0.1);
cursor: pointer;
font-weight: 500;
border-radius: 2px;
padding: 6px 12px;
margin: 0;
outline: 0;
}
.mpanel-form-table {
border-bottom: 1px dashed #dee5e7;
margin: 0 -10px;
padding: 10px;
overflow: hidden;
position: relative;
width: 100%;
font-size: 13px;
}
.mpanel-form-table:last-child {
border-bottom: none;
}
.mpanel-panel-name {
width: 20%;
display: block;
margin-bottom: 0;
line-height: 28px;
float: left;
padding-right: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.mpanel-panel-box {
float: left;
width: 75%;
}
.mpanel-form-table .input-group {
position: relative;
display: table;
border-collapse: separate;
width: 100%;
}
.mpanel-form-table .input-group .text {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
display: table-cell;
position: relative;
z-index: 2;
float: left;
width: 100%;
}
.mpanel-form-table .input-group-btn {
position: relative;
font-size: 0;
white-space: nowrap;
width: 1%;
vertical-align: middle;
display: table-cell;
}
.mpanel-form-table .btn {
position: relative;
display: inline-block;
font-size: 14px;
margin-left: -1px;
height: 28px;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
line-height: 14px;
font-size: 12px;
}
.mpanel-form-table .btn:hover,
.mpanel-form-table .btn:focus {
border-color: #c7d3d6;
background: #edf1f2;
}
.mpanel-form-table .upload-img-box {
margin-top: 10px;
border: 1px solid #E5E5E5;
padding: 3px;
max-width: 100%;
position: relative;
}
.mpanel-form-table .upload-img-box img {
max-width: 100%;
height: auto;
display: block;
}
.mpanel-form-table .upload-img-box .delete {
position: absolute;
width: 20px;
height: 20px;
right: -8px;
top: -8px;
background: url(../images/delete.png);
cursor: pointer;
}
.mpanel-form-table-help {
background: #FEFEFE;
color: #666;
font-size: 12px;
}
.mpanel-form-table-color input[type="text"] {
width: 70px;
}
.mpanel-form-table-bigtext .mpanel-panel-box {
width: 100%;
}
.mpanel-form-table-bigtext textarea {
width: 100%;
}
.mpanel-form-table-list div .mpanel-list-enter {
width: 300px;
}
.mpanel-form-table-list div .mpanel-list-add {
width: 40px;
margin-left: 3px;
background: #FAFAFA;
display: inline-block;
text-align: center;
text-decoration: none;
height: 22px;
line-height: 22px;
padding: 1.5px 0;
border: 1px solid #E5E5E5;
color: #666;
}
.mpanel-form-table-list div .mpanel-list {
margin: 0;
}
.mpanel-form-table-list div .mpanel-list li {
height: 22px;
background: #FAFAFA;
padding: 5px;
line-height: 22px;
border: 1px solid #E5E5E5;
overflow: hidden;
margin-bottom: 0px;
margin-top: 6px;
}
.mpanel-form-table-list div .mpanel-list li .mpanel-list-li-name {
white-space: nowrap;
width: 520px;
overflow: hidden;
display: inline-block;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.mpanel-form-table-list div .mpanel-list li .mpanel-list-li-delete {
width: 22px;
height: 22px;
float: right;
display: inline-block;
background: url(../images/delete.png) no-repeat center;
line-height: 22px;
}
.mpanel-form-table-slider .ui-slider-horizontal {
background: #FAFAFA;
border: 1px solid #E5E5E5;
border-radius: 3px;
width: 68%;
display: inline-block;
margin-right: 2%;
margin-left: 5px;
}
.mpanel-form-table-slider .ui-slider-horizontal .ui-slider-handle {
background: #35aadc;
border-radius: 4px;
outline: none;
height: 1.6em;
top: -.45em;
box-shadow: .5px .5px .5px #888888;
cursor: pointer;
}
.mpanel-form-table .mpanel-explain {
margin: 0;
font-size: 12px;
-ms-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
color: #999;
width: 100%;
padding-left: 20%;
display: block;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.mpanel-form-table .mpanel-radio-box {
display: inline-block;
}
.mpanel-form-table .mpanel-radio-box label {
display: block;
margin-bottom: 8px;
}
.mpanel-form-table .mpanel-radio-box label input {
margin-right: 8px;
}
@media screen and (max-width:1200px) {
#mpanel-wrap {
width: 800px;
}
}
@@ -0,0 +1,22 @@
@charset "utf-8";
.switchery {
background-color: #fff;
border: 1px solid #dfdfdf;
border-radius: 20px;
cursor: pointer;
display: inline-block;
height: 24px;
position: relative;
vertical-align: middle;
width: 50px
}
.switchery > small {
background: #fff;
border-radius: 100%;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
height: 24px;
position: absolute;
top: 0;
width: 24px
}
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,2 @@
<?php
// Silence is golden.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

@@ -0,0 +1,2 @@
<?php
// Silence is golden.
@@ -0,0 +1,193 @@
/**
*mpanel JavaScript
*https://www.bgbk.org
*/
(function( $, args ){
//切换分页
$( document ).on( 'click', '.mpanel-menu li', function(){
$( '.mpanel-menu li' ).removeClass( 'current' );
$( this ).addClass( 'current' );
$( '.mpanel-mian-panel .mpanel-page' ).hide();
$( '.mpanel-mian-panel .mpanel-page' ).eq( $( this ).index() ).fadeIn();
} );
//控制显示
var panel_hide = new Array();
$.fn.checkbox_show = function( control ){
if( !$( this ).attr( 'checked' ) ) panel_hide.push( control );
$( this ).click(function(){
$( this ).attr( 'checked' ) ? $( control ).slideDown( 200 ) : $( control ).slideUp( 200 );
} );
}
$.fn.checkbox_hide = function( control ){
if( $( this ).attr( 'checked' ) ) panel_hide.push( control );
$( this ).click(function(){
$( this ).attr( 'checked' ) ? $( control ).slideUp( 200 ) : $( control ).slideDown( 200 );
} );
}
$.fn.radio_show = function( control ){
if( !$( this ).attr( 'checked' ) ) panel_hide.push( control );
$( this ).data( 'control-show', control );
}
$.fn.radio_hide = function( control ){
if( $( this ).attr( 'checked' ) ) panel_hide.push( control );
$( this ).data( 'control-hide', control );
}
$( document ).on( 'click', '.mpanel-radio-box input[type=radio]', function(){
$( this ).parent( 'label' ).parent( '.mpanel-radio-box' ).find( 'input[type=radio]' ).each(function(){
var show = $( this ).data( 'control-show' ),
hide = $( this ).data( 'control-hide' );
if( $( this ).attr( 'checked' ) ){
if( show ) $( show ).slideDown( 200 );
if( hide ) $( hide ).slideUp( 200 );
}else{
if( show ) $( show ).slideUp( 200 );
if( hide ) $( hide ).slideDown( 200 );
}
} );
} );
//自定义列表
$( document ).on( 'click', '.mpanel-list-add', function(){
var input = $( this ).prev( 'input' );
value = $( '<div/>' ).text( input.val().replace( /(^\s*)|(\s*$)/g, '' ) ).html(),
list = $( this ).next( 'ul.mpanel-list' );
if( $( this ).data( 'repeat' ) ){
var repeat_error = false;
list.find( 'li .mpanel-list-li-name' ).each( function(){
if( $( this ).text() === value ) repeat_error = true;
} );
if( repeat_error ){
alert( args.list_repeat_error );
return;
}
}
if( value ){
list.append( '<li><span class="mpanel-list-li-name">' + value + '</span><a href="javascript:;" class="mpanel-list-li-delete"></a></li>' );
$( '<input type="hidden" name="mpanel[' + $( this ).data( 'list-name' ) + '][]" class="mpanel-list-hidden-content">' ).val( value ).prependTo( list.children( 'li:last' ) );
input.val( '' );
}
} );
$( document ).on( 'click', '.mpanel-list .mpanel-list-li-delete', function(){
$( this ).parent().slideUp( 200, function(){
$( this ).remove();
} );
} );
//提示框
$( document ).on( 'mouseover', '.mpanel-help', function(){
if( !this.title ) return;
$( this ).data( 'tptitle', this.title );
this.title = '';
$( 'body' ).append( '<div id="mpanel-tooltip">' + $( this ).data( 'tptitle' ) + '</div>' );
$( '#mpanel-tooltip' ).css({
'left': $( this ).offset().left + $( this ).outerWidth( false ) / 2 - $( '#mpanel-tooltip' ).outerWidth( false ) / 2,
'top': $( this ).offset().top - 8
} );
$( '#mpanel-tooltip' ).fadeIn();
} );
$( document ).on( 'mouseout', '.mpanel-help', function(){
if( !$( this ).data( 'tptitle' ) ) return;
$( '#mpanel-tooltip' ).remove();
this.title = $( this ).data( 'tptitle' );
} );
//Ajax 表单
$( document ).on( 'submit', '#mpanel-form', function(){
var load = $( '#mpanel-load' ),
save = $( '.mpanel-save, .mpanel-save2' );
if( $( '#mpanel-item-import' ).val() ) return true;
save.attr( 'disabled', true );
load.fadeIn( 200 );
$.post( args.admin_ajax, $( '#mpanel-form' ).serialize() + '&action=mpanel-save', function( data ){
if( data === '1' ){
load.addClass( 'mpanel-done' );
setTimeout( function(){
load.fadeOut( 200 );
save.attr( 'disabled', false );
}, 1200 );
setTimeout( function(){
load.removeClass( 'mpanel-done' );
}, 1400 );
return false;
}
load.addClass( 'mpanel-error' );
setTimeout( function(){
load.fadeOut( 200 );
save.attr( 'disabled', false );
}, 1200 );
setTimeout( function(){
load.removeClass( 'mpanel-done' );
}, 1400 );
} );
return false;
} );
//文件上传
$( document ).on( 'click', '.mpanel-upload-button', function(){
var upload_frame,
value = $( '#' + $( this ).data( 'value' ) ),
top_parent = $( this ).parent( '.input-group-btn' ).parent( '.input-group' );
if( upload_frame ){
upload_frame.open();
return;
}
upload_frame = wp.media( {
title: 'Upload',
button: {
text: 'Upload',
},
multiple: false
} );
upload_frame.on( 'select', function(){
attachment = upload_frame.state().get( 'selection' ).first().toJSON();
var url = attachment.url,
box = top_parent.next( '.upload-img-box' );
box.length === 0 ? top_parent.after( '<div class="upload-img-box"><img src="' + url + '" /><span class="delete"></span></div>' ) : box.find( 'img' ).attr( 'src', url );
value.val( url ).trigger( 'change' );
} );
upload_frame.open();
} );
$( document ).on( 'click', '.upload-img-box .delete', function(){
var box = $( this ).parent( '.upload-img-box' );
$( '#' + box.prev( '.input-group' ).find( '.mpanel-upload-button' ).data( 'value' ) ).val( '' );
box.fadeOut( 100, function(){
$( this ).remove();
} );
} );
//Onload
$(function(){
//复选框
$( '.mpanel-checkbox' ).each(function(){
new Switchery( this );
} );
//隐藏开关控制的元素
for( var i = 0; i < panel_hide.length; i++ ){
$( panel_hide[i] ).hide();
}
//设置默认分页
$( '.mpanel-menu li:first' ).addClass( 'current' );
$( '.mpanel-mian-panel .mpanel-page:not(:first)' ).hide();
//颜色选择器
$( '.colorSelector' ).wpColorPicker();
//日期选择器
$( 'input.mpanel-cxcalendar' ).each( function(){
$( this ).cxCalendar();
} );
} );
})( jQuery, mpanel_base_args );
@@ -0,0 +1,5 @@
/**
*cxCalendar
*https://www.bgbk.org
*/
!function(a){a.fn.cxCalendar=function(b,c){var d,e,f,g,h,i,j,k,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(!(this.length<1)){for(d={},e=d.jqobj=this,f=d.fun={},b=a.extend({},a.cxCalendar.defaults,b,{beginyear:e.data("beginyear"),endyear:e.data("endyear"),type:e.data("type"),hyphen:e.data("hyphen"),wday:e.data("wday")}),c=a.extend({},a.cxCalendar.language,c),h=function(a){var b=a;return b=b.replace(/\./g,"/"),b=b.replace(/-/g,"/"),b=b.replace(/\//g,"/"),b=Date.parse(b)},i=function(a){return 0==a%4&&0!=a%100||0==a%400?1:0},e.val().length>0&&(b.date=h(e.val())),b.date=new Date(b.date),isNaN(b.date.getFullYear())&&(b.date=new Date),b.date.setHours(0),b.date.setMinutes(0),b.date.setSeconds(0),j=b.date.getFullYear(),k=b.date.getMonth()+1,b.date.getDate(),m=new Array(31,28+i(j),31,30,31,30,31,31,30,31,30,31),n=c.weekList,o=6-b.wday,p=7-b.wday>=7?0:7-b.wday,q=a("<div></div>",{"class":"cxcalendar"}),r=a("<div></div>",{"class":"date_hd"}).appendTo(q),t=a("<table></table>").appendTo(q),r.html("<a class='date_pre' href='javascript://' rel='pre'>&lt;</a><a class='date_next' href='javascript://' rel='next'>&gt;</a>"),w=a("<div></div>",{"class":"date_txt"}).appendTo(r),s=a("<div></div>",{"class":"date_set"}).appendTo(r),v="",z=b.beginyear;z<=b.endyear;z++)v+="<option value='"+z+"'>"+z+"</option>";for(x=a("<select></select>",{"class":"year_set"}).html(v).appendTo(s).val(j),s.append(" - "),v="",z=0;12>z;z++)v+="<option value='"+(z+1)+"'>"+c.monthList[z]+"</option>";for(y=a("<select></select>",{"class":"month_set"}).html(v).appendTo(s).val(k),v="<thead><tr>",z=0;7>z;z++)v+="<th class='",z==o?v+=" sat":z==p&&(v+=" sun"),v+="'>",v+=z+b.wday<7?n[z+b.wday]:n[z+b.wday-7],v+="</th>";return v+="</tr></thead>",v+="<tbody></tbody>",t.html(v),q.appendTo("body"),u=a("<div></div>",{"class":"cxcalendar_lock"}).appendTo("body"),f.show=function(){var a=document.body.clientWidth,b=document.body.clientHeight,d=q.outerWidth(),f=q.outerHeight(),g=e.offset().top,h=e.offset().left,i=e.outerWidth(),j=e.outerHeight();return g=g+f+j>b?g-f:g+j,h=h+d>a?h-(d-i):h,w.html("<span class='y'>"+x.val()+"</span>"+c.year+"<span class='m'>"+c.monthList[y.val()-1]+"</span>"+c.month),q.css({top:g,left:h}).show(),u.css({width:a,height:b}).show(),this},f.hide=function(){return q.hide(),u.hide(),s.hide(),w.show(),this},f.change=function(a,d){var f,g,j,k,l,n,q,r,s,u,z,A;for(1>d?(a--,d=12):d>12&&(a++,d=1),f=d,d--,a<b.beginyear?a=b.endyear:a>b.endyear&&(a=b.beginyear),m[1]=28+i(a),v="",g=new Date(a,d,1),j=new Date,j.setHours(0),j.setMinutes(0),j.setSeconds(0),k=new Date,k.setHours(0),k.setMinutes(0),k.setSeconds(0),k=h(e.val()),k=new Date(k),isNaN(k.getFullYear())&&(k=null),l=g.getDay()-b.wday<0?g.getDay()-b.wday+7:g.getDay()-b.wday,n=Math.ceil((m[d]+l)/7),z=0;n>z;z++){for(v+="<tr>",A=0;7>A;A++)q=7*z+A,r=q-l+1,r=0>=r||r>m[d]?"":q-l+1,v+="<td","number"==typeof r&&(s=null,u=null,g=new Date(a,d,r),s=Date.parse(j)-Date.parse(g),u=Date.parse(k)-Date.parse(g),v+=" title='"+a+b.hyphen+f+b.hyphen+r+"' class='num",0==u?v+=" selected":0==s?v+=" now":A==o?v+=" sat":A==p&&(v+=" sun"),v+="'"),v+=" data-day='"+r+"'>"+r+"</td>";v+="</tr>"}return t.find("tbody").html(v),w.html("<span class='y'>"+a+"</span>"+c.year+"<span class='m'>"+c.monthList[d]+"</span>"+c.month),x.val(a),y.val(d+1),this},f.selected=function(a){var c,d;return c=y.val(),d=a,"yyyy-mm-dd"==b.type&&(c="0"+y.val(),d="0"+a,c=c.substr(c.length-2,c.length),d=d.substr(d.length-2,d.length)),e.val(x.val()+b.hyphen+c+b.hyphen+d),e.trigger("change"),f.hide(),this},f.clear=function(){return e.val(""),f.change(j,k),f.hide(),this},f.getdate=function(){return e.val()},f.setdate=function(b,c,d){if("string"==typeof b)return f.setdate({date:b}),void 0;if("number"==typeof b&&"number"==typeof c&&"number"==typeof d)return f.setdate({year:b,month:c,day:d}),void 0;if("object"!=typeof b)return!1;b=a.extend({},{date:null,year:null,month:null,day:null,set:!0},b);var e;return"string"==typeof b.date&&(b.date=h(b.date),e=new Date(b.date),e.setHours(0),e.setMinutes(0),e.setSeconds(0),b.year=e.getFullYear(),b.month=e.getMonth()+1,b.day=e.getDate()),f.change(b.year,b.month),b.set&&f.selected(b.day),this},f.gotodate=function(a,b){return"string"==typeof a?f.setdate({date:a,set:!1}):"number"==typeof a&&"number"==typeof b&&f.setdate({year:a,month:b,day:1,set:!1}),this},q.delegate("a","click",function(){if(this.rel){var a=this.rel;switch(a){case"pre":return f.change(x.val(),parseInt(y.val(),10)-1),!1;case"next":return f.change(x.val(),parseInt(y.val(),10)+1),!1;case"clear":return f.clear(),!1}}}),t.delegate("td","click",function(){var b=a(this);b.hasClass("num")&&(t.find("td").removeClass("selected"),b.addClass("selected"),f.selected(b.data("day")))}),e.bind("click",f.show),u.bind("click",f.hide),w.bind("click",function(){w.hide(),s.show()}),x.bind("change",function(){f.change(x.val(),y.val())}),y.bind("change",function(){f.change(x.val(),y.val())}),f.change(j,k),g={jqobj:d.jqobj,show:f.show,hide:f.hide,getdate:f.getdate,setdate:f.setdate,gotodate:f.gotodate,clearLine truncated
@@ -0,0 +1,2 @@
<?php
// Silence is golden.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,5 @@
/**
*Switchery
*https://www.bgbk.org
*/
(function(){function require(path,parent,orig){var resolved=require.resolve(path);if(null==resolved){orig=orig||path;parent=parent||"root";var err=new Error('Failed to require "'+orig+'" from "'+parent+'"');err.path=orig;err.parent=parent;err.require=true;throw err}var module=require.modules[resolved];if(!module._resolving&&!module.exports){var mod={};mod.exports={};mod.client=mod.component=true;module._resolving=true;module.call(this,mod.exports,require.relative(resolved),mod);delete module._resolving;module.exports=mod.exports}return module.exports}require.modules={};require.aliases={};require.resolve=function(path){if(path.charAt(0)==="/")path=path.slice(1);var paths=[path,path+".js",path+".json",path+"/index.js",path+"/index.json"];for(var i=0;i<paths.length;i++){var path=paths[i];if(require.modules.hasOwnProperty(path))return path;if(require.aliases.hasOwnProperty(path))return require.aliases[path]}};require.normalize=function(curr,path){var segs=[];if("."!=path.charAt(0))return path;curr=curr.split("/");path=path.split("/");for(var i=0;i<path.length;++i){if(".."==path[i]){curr.pop()}else if("."!=path[i]&&""!=path[i]){segs.push(path[i])}}return curr.concat(segs).join("/")};require.register=function(path,definition){require.modules[path]=definition};require.alias=function(from,to){if(!require.modules.hasOwnProperty(from)){throw new Error('Failed to alias "'+from+'", it does not exist')}require.aliases[to]=from};require.relative=function(parent){var p=require.normalize(parent,"..");function lastIndexOf(arr,obj){var i=arr.length;while(i--){if(arr[i]===obj)return i}return-1}function localRequire(path){var resolved=localRequire.resolve(path);return require(resolved,parent,path)}localRequire.resolve=function(path){var c=path.charAt(0);if("/"==c)return path.slice(1);if("."==c)return require.normalize(p,path);var segs=parent.split("/");var i=lastIndexOf(segs,"deps")+1;if(!i)i=0;path=segs.slice(0,i+1).join("/")+"/deps/"+path;return path};localRequire.exists=function(path){return require.modules.hasOwnProperty(localRequire.resolve(path))};return localRequire};require.register("abpetkov-transitionize/transitionize.js",function(exports,require,module){module.exports=Transitionize;function Transitionize(element,props){if(!(this instanceof Transitionize))return new Transitionize(element,props);this.element=element;this.props=props||{};this.init()}Transitionize.prototype.isSafari=function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)};Transitionize.prototype.init=function(){var transitions=[];for(var key in this.props){transitions.push(key+" "+this.props[key])}this.element.style.transition=transitions.join(", ");if(this.isSafari())this.element.style.webkitTransition=transitions.join(", ")}});require.register("switchery/switchery.js",function(exports,require,module){var transitionize=require("transitionize");module.exports=Switchery;var defaults={color:"#64bd63",secondaryColor:"#dfdfdf",className:"switchery",disabled:false,disabledOpacity:.5,speed:"0.4s"};function Switchery(element,options){if(!(this instanceof Switchery))return new Switchery(element,options);this.element=element;this.options=options||{};for(var i in defaults){if(this.options[i]==null){this.options[i]=defaults[i]}}if(this.element.type=="checkbox")this.init()}Switchery.prototype.hide=function(){this.element.style.display="none"};Switchery.prototype.show=function(){var switcher=this.create();this.insertAfter(this.element,switcher)};Switchery.prototype.create=function(){this.switcher=document.createElement("span");this.jack=document.createElement("small");this.switcher.appendChild(this.jack);this.switcher.className=this.options.className;return this.switcher};Switchery.prototype.insertAfter=function(reference,target){reference.parentNode.insertBefore(target,reference.nextSibling)};Switchery.prototype.isChecked=function(){return this.element.checked};Switchery.prototype.isDisabled=function(){return this.options.disabled||this.element.disabled};Switchery.prototype.setPosition=function(clicked){var checked=this.isChecked(),switcher=this.switcher,jack=this.jack;if(clicked&&checked)checked=false;else if(clicked&&!checked)checked=true;if(checked===true){this.element.checked=true;if(window.getComputedStyle)jack.style.left=parseInt(window.getComputedStyle(switcher).width)-jack.offsetWidth+"px";else jack.style.left=parseInt(switcher.currentStyle["width"])-jack.offsetWidth+"px";if(this.options.color)this.colorize();this.setSpeed()}else{jack.style.left=0;this.element.checked=false;this.switcher.style.boxShadow="inset 0 0 0 0 "+this.options.secondaryColor;this.switcher.style.borderColor=this.options.secondaryColor;this.switcher.style.backgroundColor="";this.setSpeed()}};Switchery.prototype.setSpeed=function(){var switcherProp={},jackProp={left:this.options.speed.replace(/[a-z]/,"")/2+"s"};if(this.isChecked()){switcherProp={border:this.options.speed,"box-shadow":this.options.speed,"background-color":this.options.speed.replace(/[Line truncated
@@ -0,0 +1,15 @@
<?php
/**
* 设置选项
*
* @package WordPress
* @subpackage Beginning
*
* @since Unknown
* @deprecated Beginning 4.0.5 Use `functions/class-mpanel.php`。
*/
_deprecated_file( basename( __FILE__ ), '4.0.5', 'functions/class-mpanel.php' );
require_once( get_template_directory() . '/functions/class-mpanel.php' );
// End of page.
@@ -0,0 +1,15 @@
<?php
/**
* 选项面板
*
* @package WordPress
* @subpackage Beginning
*
* @since Unknown
* @deprecated Beginning 4.0.5 Use `functions/class-mpanel-panel.php`。
*/
_deprecated_file( basename( __FILE__ ), '4.0.5', 'functions/class-mpanel-panel.php' );
require_once( get_template_directory() . '/functions/class-mpanel-panel.php' );
// End of page.
File diff suppressed because it is too large. Load diff